What is all inside the TLM?

Hi All…

TLM is the mechanism used for data transfer between components!! What is the things used inside an TLM??? By default do they use “fifo” for data transfer ?? Or are there any other mechanism behind TLM communication bcoz they had given tlm_fifo dedicatedly… So what actually do they use them?? Kindly share out your thoughts & views…

Thanks,
Desperado ---->> hmmmm in deep thoughts

Hi,

If i am not wrong

TLM is just a Standard, which is intended to provide interoperability.

Now What TLM defines are the standard interfaces for communication.

Transaction-level communication between components is handled via its ports, exports, and imps, all of which derive from ovm_port_base.

The ovm_port_base extends Interface(IF), which is the type of the interface implemented by derived port, export, or implementation. IF is also a type parameter to ovm_port_base.

Making a call to port.connect(export) makes a P2P connect between a port and export.

Thus Ports and exports are P2P connection via hidden interface and doesn’t require any data storage.

On the other hand OVM provides tlm channels which is nothing bit a FIFO with tlm interface (one for each direction). Again to connect with tlm channel we have to use P2P port connection from our producer to channel and same for receiver port.

Regards,
Abhi

hi,

So the medium of transport in TLM is not “FIFO”, rather its just an interface is that rite??

So, when the export doesn’t get the transaction from the port (i.e. blocking type) so during this process where does the data stays, since as you say they dont use any storage medium !!!

Can you brief out on the same plz!!

Thanks,
Desperado…

hi,
So the medium of transport in TLM is not “FIFO”, rather its just an interface is that rite??
So, when the export doesn’t get the transaction from the port (i.e. blocking type) so during this process where does the data stays, since as you say they dont use any storage medium !!!
Can you brief out on the same plz!!
Thanks,
Desperado…

Data transfer between port and export

Its “Tightly couple Data Transfer”

There are two types of port connection :- blocking & Non-blocking.

For Port-export interface, we have to implement the TLM interfaces like PUT, GET, PEEK … etc

For Example:-
Now when ever we call port.get() the ‘get’ implementation is searched in the component where ‘export’ is there. Now in the PUT implementation user has to make sure it waits until data is ready and then only return from task with data.


class get_consumer extends ovm_component;

       ovm_blocking_get_port #(simple_trans) get_port;
       function new( string name, ovm_component parent);
              get_port = new(“get_port”, this);
             ...
      endfunction

      virtual task run();
                simple_trans t;
                for(int i = 0; i < N; i++) begin
                   // Generate t.
                  get_port.get(t);
               end
      endtask

endclass


class get_producer extends ovm_component;

          ovm_blocking_get_imp #(simple_trans, get_producer) get_export;
          ...

          task get(output simple_trans t);
                 simple_trans tmp = new();
                 //wait until data ready 
                 // Assign data to tmp.
                t = tmp;
         endtask

endclass

As shown in example, the consumer will be blocked until producer releases the data.

In case of non-blocking implementation task returns immediately with / without data.

Thus indeed there is no intermediate data storage, its P2P connection.

But in case you need intermediate storage then built-in OVM tlm_channel is the answer, which has FIFO in between.

Regards,
Abhi

Hi Abhi,

Thanks a lot…

One more doubt… say in my producer I had randomized the transaction class, and now I have to put the transaction to the consumer…

AS per TLM rules, the producer has the definition of the get task, which used to call in the consumer to get the data!!!

Now, can we just as such use only get to get the transaction instead of putting the transaction from the producer?? Would that be possible to transfer info from producer to consumer??? Or we need the mechanism of put ↔ get to transfer the info!! sounds silly but kindly let me know…

Thanks,
Desperado

Hi Abhi,
Thanks a lot…
One more doubt… say in my producer I had randomized the transaction class, and now I have to put the transaction to the consumer…
AS per TLM rules, the producer has the definition of the get task, which used to call in the consumer to get the data!!!
Now, can we just as such use only get to get the transaction instead of putting the transaction from the producer?? Would that be possible to transfer info from producer to consumer??? Or we need the mechanism of put ↔ get to transfer the info!! sounds silly but kindly let me know…
Thanks,
Desperado

You can connect ovm_put_port to ovm_put_imp and same is applicable for ovm_get_port.

Now this connects are unidirectional. Thus if you want to get certain data from producer you should use ovm_get_port and ovm_get_imp and similarly a separate put port to put data.

There are certain ports which allow bidirectional transfer also like ‘transport port’.

Kindly go through ovm_*_port class.

Regards,
Abhi