Sending two different type of packet using same TLM/analysis port

HI All,

I want to send two different type of packets(pkt1 of class1 and pkt2 of class2) using same TLM/analysis port from driver to SB, how can i achieve this?

Please reply the suggestions

Thanks,
Rahul kumar

There are 2 points to answer your question:

  1. You might not be able to send 2 completely different and disconnected packets from single analysis port. As all the subscriber who would connect to this analysis port and implement the write task should be able to handle 2 different kinds of packets, which might not be possible.
  2. It is recommended that you should not be sending any data from driver to scoreboard, instead get it from the interface through monitor and then send the collected data across.
  • Ashith

Since the analysis port is parameterized by the class type going through it, the only way to send different objects through the analysis port is if they are both extensions of the same base class (or one is an extension of the other). Parameterize the analysis port using the base class and then, as mentioned, have the write() method distinguish and upcast the transaction to the appropriate type.

In reply to tfitz:

Hi All,

Thanks for reply.

In reply to Ashith:

Hi ashith
some time requirement to connect driver rsp directely to monitor ,so there is chances of data from driver to scoreboard

but not neccesarily all time

In reply to rahulkumarkhokher@gmail.com:

tfitz ,
it very good solution and agreeable with that more than 1 parameterised class pass through analysis port but implementation of reciever class are many ,so it very difficult to handle with more classes