Jump to content

Maxim Vorontsov

Members
  • Content Count

    4
  • Joined

  • Last visited

  1. Yes, that's exactly how I'm workarounding it now. Would you please narrow me, where this derived from SCV documentation, to I might look for the limitations in the future? Because I've been looking into scv headers and that was not really clear. Thanks
  2. Thanks basarts, I indeed got rid of compilation error, but there is simulation runtime error: tb.cpp: #include "systemc.h" #include "scv.h" // // struct aaa { sc_uint<32> addr; }; // struct addr_rnd : public scv_constraint_base { scv_smart_ptr<sc_uint<32>> addr; SCV_CONSTRAINT_CTOR(addr_rnd) { SCV_CONSTRAINT( addr->range(1,0) == 0 ); } }; // int sc_main(int argc, char * argv[]) { // // addr_rnd addr("addr"); addr.next(); // // return 0; } $ g++ -lsystemc -lscv -std=gnu++17 tb.cpp $ ./a.out SystemC 2.3.3-Accellera --- Dec 20 2018 16:31:
  3. Dear accellera community, I'm trying to assign randomization constraint to a bit range: tb.cpp: #include "systemc.h" #include "scv.h" // // struct addr_rnd : public scv_constraint_base { scv_smart_ptr<sc_uint<32>> addr; SCV_CONSTRAINT_CTOR(addr_rnd) { SCV_CONSTRAINT( addr().range(1,0) == 0 ); } }; // int sc_main(int argc, char * argv[]) { // // addr_rnd addr("addr"); addr.next(); // // return 0; } g++ -lsystemc -lscv -std=gnu++17 tb.cpp And I get the following error: In file included fro
×
×
  • Create New...