Transactional-level modelling (TLM) 1.0 standard used conventional C++ concepts of multiple inheritance.
An SC_MODULE that implements an interface just inherits it:
class my_component: public sc_module, ethernet_if, usb_if
{
// SC_METHODs and SC_THREADs for normal internal behaviour
...
// methods to implement ethernet_if
...
// methods to implement usb_if
...
// Constructor and sensitivity
...
}
The sc_port and sc_export constructs are used to wire TLM ports together.
Problem: how to have multiple TLM ports on a component with the same interface type: e.g. a packet router.
Problem: no standardised structure for ports and payloads.
Problem: no standardised timing annotation mechanism.
NB: Full CST credit can be gained using any of TLM1.0 or TLM2.0 styles or your own pseudo code sketches in an OO language of your choice.
| 15: (C) 2008-18, DJ Greaves, University of Cambridge, Computer Laboratory. |