SystemC 不能在 visual studio 2019 中使用“+”“-”运算符

SystemC cannot use "+" "-" operators in visual studio 2019

enter image description here 我正在尝试构建计数器,当 "dec1" 信号为高时,8 位无符号整数计数器将减 1。我正在使用 visual sidio 2019 编译 counter.cpp 文件,并且 "Hello worlds" .cpp 成功到 运行。

SystemC 信号不提供对其内部值类型的所有成员函数的访问,仅提供隐式转换。您需要写出

的长格式
  counter1 = counter1 + 1;

systemc 不能做信号操作, 所以每件事都应该有输入信号并进行类型转换。

sc_in > 计数器;

计数器=计数器+1; // 不会工作

sc_uint<16> local_counter = counter.read(); //这会起作用

local_counter = local_counter + 1; //将工作