I am a beginner in SystemC programming and there is one thing I noticed (looking in the SystemC official documentation): all types that I used to deal with in VHDL simulations have not been “ported” to SystemC.
I mean:
- Consider
std_logicin the VHDL standard library, there is not an equivalent in SystemC, however, in the SystemC documentation, I see many examples usingbool. - Consider
std_logic_vector, I see no equivalent in SystemC. Instead I can see, in many examples, usage ofsc_int.
So I’m thinking that SystemC does not provide types in order to manage single bits or electric signals, but it provides a higher abstraction like in every common C/C++ applications.
Is it so or am I missing something?
It’s not all that correct.
In SystemC you can use
sc_logicandsc_lv< T >asstd_logicandstd_logic_vectorrespectively.You can assign to
SC_LOGIC_0orSC_LOGIC_1literals tosc_logic.While you can use integer, hex or even ‘bit-specific’ literal to assign
sc_lv< T >a value.For example:
Hope that helps.