Jump to content

CapUnderPantsRLZ

Members
  • Content count

    2
  • Joined

  • Last visited

About CapUnderPantsRLZ

  • Rank
    Member

Contact Methods

  • Website URL
    http://www.linkedin.com/in/lvcargnini

Profile Information

  • Gender
    Male
  • Location
    United States
  1. CapUnderPantsRLZ

    Scope of SC_HAS_PROCESS

    "Personally, I prefer to put SC_HAS_PROCESS directly into the constructor body, which works very reliably. All that SC_HAS_PROCESS does is to create a typedef " Yep you right: "All that SC_HAS_PROCESS does is to create a typedef", now explain to your compiler to 'construct' something, that it was not defined before the constructor call. how do you do that? (rhetoric) . That it is precisely why the authors of SystemC: From the Ground Up, explained to place SC_HAS_PROCESS before the constructors. GCC, lets this kind of 'thing' pass, try with Clang++ now. Plus you don't place that in the header file, instead, it is in the implementation file the .cc, .cpp, (whatever extension you are using) that will contain it inside your own namespace if it is the case.
  2. CapUnderPantsRLZ

    Scope of SC_HAS_PROCESS

    However, if you are splitting into .h and .cpp files for module, e.g., Blah, you must place the SC_HAS_PROCESS(Blah), on the top of the implementation (.cpp) file, this way: //.h #import <systemc.h> ... class Blah: sc_module { Blah(sc_module_name); ~Blah(); } //.cpp file #include "Blah.h" SC_HAS_PROCESS(Blah); Blah::Blah(sc_module_name nm): sc_module(nm) { } Blah::~Blah(){ }
×