⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cnt.cpp

📁 VHDL to System C translator
💻 CPP
字号:
#include "cnt.h"

#ifdef MTI_SYSTEMC
    SC_MODULE_EXPORT(cnt);
#endif


void cnt::process_line37() {
  if (reset.read() == 1) {
  count_s.write((sc_uint<3>)("0b000"));
  } else 
if (clk.posedge()) {
  if (updown.read() == 1) {
  count_s.write((sc_uint<3>)(count_s.read() + 1 ));
  } else {
 count_s.write((sc_uint<3>)(count_s.read() - 1 ));

 
}   
} 
if (!!((count_s.read() == 7))) SC_REPORT_FATAL("","Counter Overflow");
}
void cnt::comb_assignments() {

count.write((sc_uint<3>)(count_s.read() ));

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -