Translating System Verilog code to system C

In reply to Rogers:

These constructs need to be translated to C++; there is nothing directly in SystemC that would help you.

  1. Strange way to write buff_id[9:8] in SystemVerilog, but the equivalent in C++ is
    l_lcm_num = (buff_id>>8)& 0x3;
    or better readability
    l_lcm_num = (buff_id0 & x0180) >> 8;
  2. This is an associative array of queues in SystemVerilog. You will have to translate this using the Standard Template Library(STL) Map and Queue templates. Translating the declaration is trivial—the usage is more effort.
  3. This has a direct translation to C/C++ unget().