Jump to content

Weiwei Chen

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. Is it a good idea to have multiple SC_Threads in one module? Thanks!
  2. We need to write functional models with some shared memory features. Would it be a good idea to have multiple threads in one module sharing its member variable? Or model multiple modules and use port variables for communication? Is there any examples / tutorials online that are worth referring to? Many thanks!!
  3. Weiwei Chen

    SystemC design guidelines

    Thanks, Phillipp, I think my tool will need to support nested classes although using such way of coding needs a lot of discretions. It might happen that some designs need certain type of classes just be private in its parent class, for a clean design perspective. I'll take a look at the convenience sockets in TLM-2.0 for more details. Thank you very much for directing me to these cases. Greetings from Irvine! -- Weiwei
  4. Weiwei Chen

    SystemC design guidelines

    Actually, I am working on a SystemC front-end now. I need to know if such case will actually happen in real design so that my front-end parsing/analysis tool will not mishandle it. From the modeling perspective, it might be handy to have some embedded classes, e.g. define an arbiter class in the class for bus protocols. This should be doable in C++. I'm just curious whether the SystemC design guidelines discourage embedded classes so that my front-end tool can omit such complicated situation, or not. Thanks!
  5. Weiwei Chen

    SystemC design guidelines

    I need some expert idea on defining SystemC modules and classes. Are there any design guidelines on defining SystemC modules, channels and regular C++ classes for the following situations: 1. Define a class drived from sc_module in a class that is also derived from sc_module, e.g class Top : public sc_module { public: class A : public sc_module { }; }; 2. Define a regular C++ class in a class that is derived from sc_module, e.g class Top : public sc_module { public: class A { }; }; 3. Define a class drived from sc_module in a regular C++ class, e.g. class Top { public: class A : public sc_module { }; }; 4. Define a class drived from sc_channel in a class that is derived from sc_module, e.g class Top : public sc_module { public: class A : public sc_channel { }; }; and vice versa, e.g. class Top : public sc_channel { public: class A : public sc_module { }; }; These definitions are technically allowed by C++. I am not sure if they are also considered as good practice in C++ or not desirable according to SystemC design guidelines. Thank you very much!
×