A suitable coding style for sending calls `along the nets' (prior to the TLM 2.0 standard):
//Define the interfaces: class write_if: public sc_interface { public: virtual void write(char) = 0; virtual void reset() = 0; }; class read_if: public sc_interface { public: virtual char read() = 0; }; //Define a component that inherits: class fifo_dev: sc_module("fifo_dev"), public write_if, public read_if, ... { void write(char) { ... } void reset() { ... } ... } | ![]() | SC_MODULE("fifo_writer") { sc_port |
Here a thread passes between modules, but modules are plumbed in Hardware/EDS netlist structural style.