Sunday, October 25, 2015

TLM (Transaction Level Modeling)

What is TLM?

TLM provide API. API is application programming interface. Let me explain API in some simple terms. In software, say in movie ticket booking application, the application gives you information about theater and seats and when you select it and go for payment, API connects it with payment gateway which deals with your credit card information. For Mobile app developer that payment gateway is independent software or module, which is connected through API. So seat selecting module and payment gateway both are independent module, don't know or don't dependent on each other, connected through API.

In testbench driver and sequencer are two individual block, which is independent to each other, but can communicate through API, which is TLM.

TLM works on some terminology like,

Producer : who produces transaction. In our case Sequencer.
Consumer : Who consumes transaction. Here Driver
Port : It is actually a TLM port which either put the transaction in producer or get the transaction in consumer.
Export : It is a TLM port which either implement put method in consumer or get method in producer
Put : It is blocking task which put transaction(seq_item) from producer.
Get : It is blocking task which get seq_item from consumer.
Try_put : Same as put but its non blocking (a function basically) with return type as bit. It return TRUE if process is successful else return FALSE.
Try_Get : Same as Get. But non blocking (function)

TLM connection would be as below

m_driver.seq_item_port.connect(m_sequencer.seq_item_export);

seq_item_port from driver is connected to seq_item_export of sequencer.
Driver will call seq_item_port.get_next_item(req_item).

Due to above connection made in environment, it will actually call m_sequencer.seq_item_export.get_next_item which finally calls get_next_item of sequencer.


seq_item_port.get_next_item(req) and seq_item_port.item_done() is the handshake mechanism between driver and sequencer. Once this handshake done, only then driver can ask for next seq_item.

Symbolic Notation :
Square : Indicate Port
Circle : Indicate Export
Diamond : Indicate Analysis Port

 












In Figure 1 Put method is implemented is in consumer, So export (Circle) will be at consumer.
Figure 2 get method is implemented in produce , so Port (Sqiare) will be producer.
Figure 3 , write method is implemented in subscriber, so export is always subscriber and here consumer will be analysis port. 

1 comment:

  1. softcare infotech is one of the best web design and development company.
    https://www.softcareinfotech.in/

    ReplyDelete