John Aynsley, CTO, Doulos
In this post I am going to highlight the benefits of using the TLM-2.0 standard within VMM. In discussing this issue, I am motivated in part by the current activity within the Accellera VIP Technical Subcommittee on the development of a Universal Verification Methodology, or UVM, which is to take input from both VMM and OVM. As I write, the VIP TSC is wrestling with the issue of which TLM features should be included in UVM.
As I remarked in an earlier post, VMM has always used transaction-level communication, but based on the vmm_channel rather than on a wider industry standard. Now that multi-language simulation environments are so common, it makes sense to consider using formal standards for transaction-level communication across the language boundary. But is that the only reason that TLM-2.0 was introduced into VMM? No, not quite. Let us look at four benefits that TLM-2.0 can bring to VMM:
Benefit 1 – Direct communication. The SystemC TLM standard supports direct communication between producers and consumers using a single function call, rather than having communication mediated through a channel. Learning to use this new style of communication involves a shift in mindset for anyone familiar only with the vmm_channel-style of communication, but in many circumstances it is worth the effort. Put simply, removing the intermediate channel reduces the number of function calls, the number of events, and the number of processes, all of which can speed up simulation. More specifically, the behavior of the consumer can be executed directly within the function call made from the producer, thus avoiding the need to context-switch between multiple processes.
Benefit 2 – Simple completion model. The SystemC TLM-2.0 standard carefully defines the conditions for the completion of each transaction such that producers and consumers can tell when a transaction is complete without having to understand and track the protocol-specific details of the communication. In some situations this can help decouple the producer and consumer transactors behaviorally, making the overall verification environment more robust. (On the other hand, there are other situations where it is better to have an intermediate channel. VMM supports both approaches: direct TLM function calls and mediated communication.)
Benefit 3 – Simple type-safe connections. Making TLM connections has been likened to plumbing. As long as the pipes and connectors are the same size, you simply make the proper joints and water will flow. In the case of SystemC and SystemVerilog, if you get it wrong you get a compile-time error, which is a good thing. But if you make connections of the correct type, there is a good chance that the transaction-level communication is going to work as expected. This helps make transactors more reusable.
Benefit 4 – Better interoperability. There are now solutions for passing transactions across the language boundary using the TLM-2.0 standard. For example, there is the VCS TLI (Transaction Level Interface), which allows transactions to be passed in either direction between SystemVerilog and SystemC. vmm_channel can be a great solution for internal use within a VMM environment, but does not help with communication with other languages.
So, although vmm_channel works fine in many situations, there are benefits to be gained from using the new TLM-2.0-inspired features introduced with VMM 1.2 where appropriate.
ShareThis
Posted in