I have a query regarding TLM ports. Usually we connect monitor to scoreboard using TLM port to send transactions. Can we also connect driver to scoreboard using TLM ports?
In reply to Nathan Lyon:
Of course you can do it. You have to add an analysis port to the driver. Note you have to put a copy of the seq_item to this port.
If the information is going to be useful for the scoreboard to make decisions, then it can be done. The analysis port from the driver will inform the scoreboard what transaction the driver “plans to drive on the bus”, while the analysis port from the monitor informs the scoreboard “what was driven on the bus”.
This may or may not be the same depending on situations like error injection etc.
Yes, you can as mentioned by “logie”. But it is not the best practice in general.
- The data is broadcasted to the subscribers (e.g. in this case scoreboard) before it is propagated into the bus.
- In case you have any callback function implemented in any other part of the TB (other than the driver class) which changes the transaction item’s certain fields, data driven on the bus will be different than the data broadcasted from the analysis port of the driver. Scoreboard in that context will not receive the same data as it is on the bus. This is a typical scenario in case of error injection.
In reply to Sadat Rahman:
Yes, you can as mentioned by “logie”. But it is not the best practice in general.
- The data is broadcasted to the subscribers (e.g. in this case scoreboard) before it is propagated into the bus.
- In case you have any callback function implemented in any other part of the TB (other than the driver class) which changes the transaction item’s certain fields, data driven on the bus will be different than the data broadcasted from the analysis port of the driver. Scoreboard in that context will not receive the same data as it is on the bus. This is a typical scenario in case of error injection.
Is this why we need monitor?
What I am trying to understand here is why do we need monitor when we can do the same thing using a driver, by connecting driver and scoreboard through analysis port?
In reply to Ashwin_L:
Connecting your Driver via a TLM port to a scoreboard or a coverage collector is always a god practice when you are Aware whar you are doing. I use this Approach in most of my Projects. But you have to take care you are Monitoring your pin Interface in another way,i.e. with an Assertion checker.