I dont have much experience in cpp, let alone systemc.
Why doenst this work?
sc_in<sc_uint<8>> a,b;
adder.cpp:5: error: ‘a’ was not declared in this scope
adder.cpp:5: error: ‘b’ was not declared in this scope
adder.cpp:5: error: wrong number of template arguments (2, should be 1)
This does work:
sc_in<int> a,b;
In C++03, you can't have the two
>
characters next to each other because the compiler thinks you're trying to perform a right shift.It then gets really confused, thinking you mean this:
If you had managed to get that far, it would later complain about the two missing
>
characters before;
, ironically taking you back to where you started.You have to write
sc_in<sc_uint<8> >
instead.That's fixed as of C++11.