Jump to content


  • Content Count

  • Joined

  • Last visited

About AnandRamesh

  • Rank

Profile Information

  • Gender
    Not Telling
  1. Thank you @Roman. The version of the header file shown above does not have the overloads as its simplified. I do have them all overloaded. I like the SC_MODULE(reg_file) idea. Essentially I want to model a module with a bunch of registers whose SC_CTHREAD and SC_MODULE is sensitive to the these its own register file. How do I implement the SC_MODULE?
  2. Hi, I'm a newbie with systemc and using it for design. I want to implement a class representing a generic register file which requires a mandatory parameter NUM_REGS in its constructor. I want to then contain this register file inside sc_signal<> to allow event handling. The reg_files header looks something like this (simplified version): #include<systemc.h> class reg_file { private: sc_uint<8> *reg_set; public: unsigned REG_NUMS; reg_file(const unsigned numberOfRegs) { REG_NUMS = numberOfRegs; reg_set = new sc_uint<8> [REG_NUMS]; } ~reg_file() { delete reg_set; } }; I want to contain the objects of this class in sc_signal by passing numberOfRegs as as a parameter during a creation of the the signal like this: sc_signal<reg_file> tmr_regs; // Where to pass numberOfRegs?
  • Create New...