TLM FIFO v/s SV Interface v/s home-made conections

Hi,

I am developing a new verification environment using OVM and I am curious to know, what people think about “ways to connect components”

There are few ways available

  1. TLM Fifo
  2. seq_item_get_ for driver and sequencer
  3. SV Interface
  4. home made (uising tasks & functions)

Which was are you using ? Advantages ? Dis-advantages?

All of the first three are used in OVM environments. Interfaces connect the drivers to the DUT. The TLM Fifo is one way to connect two ovm_components. Usually, the components can be connected directly without a Fifo in between. Use a Fifo when connecting two threaded components or two non-threaded components together. The seq_item_prod/cons_if can be thought of as a special purpose TLM interface for connecting drivers to sequencers.

Home made task & function interfaces are not advised. The components aren’t as reusable or flexible.

Usually, the components can be connected directly without a Fifo in between.

Thanks…
Can you elaborate more on components can be connected directly ?
IMHO, that is a bad thing since now components needs to know each other and If I were to implement some kind of port between them, rather use TLM fifo.

Please correct and Thanks Again.

The OVM User Guide has a chapter titled “Transaction Level Modeling” that explains it better than I can.

Basically, you have an ovm_component which is a producer of transactions and another component which is a consumer. One or the other is a threaded component. (Usually, a component is threaded because it implements its run() task.) The threaded component is the initiator, it initiates the transaction transfer. The non-threaded component is called the target. Initiators can be producers or consumers, so can targets. There are interface types for all combinations. But an initiator must connect to a target. You only need the FIFO if you’re trying to connect two threaded components (initiators) together or two non-threaded components (targets).

There are more details to concern yourself with, bi-directional interfaces, blocking versus non-blocking calls, and analysis interfaces. The User Guide and Reference documents are the best resources to learn about these things.

Steve

Thanks .

As you suggested, I will refer to the userguide !!

Hi Shail,
Check out the following entry and code samples that I posted not so long ago on my blog…

It shows how you can do connections with or without FIFOs and explains the advantages/disadvantages of each approach. Normally a FIFO should not be used unless you have two independent threads that need to be synchronized.

Back to your original question, each of the first 3 ways you mentioned is used in OVM for a distinct purpose. #1,2 are used for transaction level communication, and #3 is used for signal level communication. #1 is used by monitors to report transactions to analysis elements such as coverage collectors, scoreboards and response sequences. #2 is used by drivers to communicate with sequences.

Avidan Efody
www.specman-verification.com

Thanks Avi.

That makese sense and you are bang on point, about why people tend to use Fifos more.

Apart from difficulty in debug, I would sometime also evaluate performance penalty of using fifo.

-Shailesh