Hello all,
I am having a requirement to implement subscriber component where master monitor and slave monitor are sending packets using analysis ports to subscriber. Currently in my AHB VIP, both monitors are sampling the same data from interface so eventually both packets are also same so sampling twice makes no sense but in future requirement may change and reference model can be added between monitor and subscriber, so packets may be different also. So, my question is, if we want to make the generic subscriber which can work in all scenarios, then when should I sample the packets?
In reply to Mahammadshahid Shaikh:
Hello Shahid,
I think, you will not have to add ref_model between monitor and subscriber.
You can just directly after finishing your transaction send that transaction from analysis port to subscriber and sample it as you get the packet.
In reply to Mahammadshahid Shaikh:
Hello all,
I am having a requirement to implement subscriber component where master monitor and slave monitor are sending packets using analysis ports to subscriber. Currently in my AHB VIP, both monitors are sampling the same data from interface so eventually both packets are also same so sampling twice makes no sense but in future requirement may change and reference model can be added between monitor and subscriber, so packets may be different also. So, my question is, if we want to make the generic subscriber which can work in all scenarios, then when should I sample the packets?
Your understanding is wrong.
Your monitors are observing the interface signals at different times. The slave monitor is extracting slave transactions and the master monitor is extracting master transactions.
After you have finished the collection of your monitor data you can publish them on the analysis ports and the covergroups will be triggered. A ref model will never come between the output monitors and the subscriber.
Let me to add more information, I am not having different transactions for master and slave side, both monitors are sampling AHB based write operation as well as read operation from interface and sending to scoreboard and subscriber.
Eventually both monitors sampling the same data and sending to subscriber and scoreboard. Practically thinking, only one of the packet is needed to sample which will generate coverage but if there are some errors in one of the monitor and if its packet is not getting sampled then coverage can’t be considered perfect. So in this approach, both packets are needed to be sample.
So my real question is, do we need to sample only one packet of both then which one, and if both packet need to be sampled then how to avoid double sampling?
In reply to Mahammadshahid Shaikh:
As you are telling that both monitors are sampling same thing so send any of the packet to coverage and sample it. And if monitor have some errors then that’s the mistake of monitor but coverage will get the packet from any 1 monitor.