Coding Styles

TLM-2 lists modeling 3 different modes (called Coding Styles in official documents): untimed, Loosely-timed and Approximately-timed. Each serves a specific purpose, and to model different types of systems. We must also take into account the cost of each simulation mode (untimed less expensive, Approximatelly-timed more expensive).


Untimed

This mode uses only the blocking interface. This interface carries no information on response times, simply initiator uses the b_transport function to send data to target.

Is the most simple basis to use and simulate, and we can use to verify that the system is well designed and partitioned.

Loosely-timed

This mode also uses the blocking interface. Thus we have two points of time: b_transport function call and return (when it begins and when ends the transaction).

This mode allows use temporary decoupling. We can talk about this in another post, but the idea is that we have parts of our model and run “in his own time” until they need to synchronize with the rest of the model.

Approximately timed

This mode uses non-blocking interface, so you can record times in all phases of a transaction (typically a protocol is 3 or 4 phases).

This mode is the most detailed and therefore also be the slowest simulated.

These are the 3 ways that provide for the TLM-2.0 Standard (anyone needs something more?) And we talk in detail about each in future posts.

Leave a Reply