2 TLM2 Wrapper Insertion Library Design Talking about the instrumentation of a model description there are basically two features to consider, see figure 1. The former is the knowledge and availability of the model source description in order to know where to instrument. The latter is the binding procedure, this is how the instrumentation code is inserted into the model. In the case of the interception library proposed in this work, it is important to emphasize that its main goal is to provide basic
between both modules, a Fault Injection Wrapper is created by means of the C++ new operator. After the creation of the wrapper, the add tlm2 wrapper method is invoked to insert the wrapper into the trans- action path. To do this, the hierarchical SystemC name of the initiator socket is passed as a parameter. The other parameter is a constant value indicating the specific interface to be intercepted, B TRANSPORT in this example. Once the wrapper is inserted, the same call issued by the initiator in
call the original entry of the modified VTABLE in order to maintain the overall transaction path. The WIL class has four methods: • wil get fw interface: For internal use. This method gets the TLM2 forward interface pointer given the hierarchical SystemC name of the socket.
3 Performance and Usability Issues The interception library has been coded in a C++ object oriented style. This makes the specialization of the wrappers very easy through inheritance. The library has less than 2.000 lines of code as shown in table 1 along with the amount of code that is compiler dependent. The source code of TLM2 Wrapper Library V1.0 can be found at https://dl.dropbox.com/u/19987939/TLM2Wrapper.zip. The usage example distributed in the main module defines just two TLM2 modules and