- TLM is all about communication through method calls.
- A TLM port specifies the “API” to be used.
- A TLM export supplies the implementation of the methods.
- Connections are between ports/exports, not components.
- Transactions are objects.
- Ports & exports are parameterized by the transaction type being communicated
Difference between export and import:
Basically, both exports and imps provide the implementations of whatever methods your TLM port requires. The difference is an export is an indirect connection to an implementation. It normally used when there is component hierarchy involved.
- Last Export is actually an ‘imp’
- All TLM connections go from ‘origin’ to ‘destination’
- parent_export.connect(child_export); // or imp
The uvm_analysis_port (represented as a diamond on the monitor in Figure) is a specialized TLM port whose interface consists of a single function, write().
- Use imp suffixes defined via macro:
- Declare macros outside of component
- Instantiate suffixed imps
- Implement write_SUFFIX methods
- Write methods are functions
- Can’t synchronize between streams (because there is no way through which we can delay in write() method since it is a function)
- Use embedded fifos
- Declare analysis exports
- Connect exports to fifos
- Run_phase must actively pull from fifos