I am working on WISHBONE UVC that can have MASTER and SLAVE agents.
I implemented base classes for all components and objects (driver, monitor, item…).
Then I implemented MASTER/SLAVE specific classes that extend base classes and incorporate additional logic.
One thing that is not clear to me is whether I should create child classes for monitor and item.
If we take monitor for example:
From my point of view monitor should behave the same regardless of agent nature (master or slave) so I don’t see the point of creating two child classes.
This leads to my questions:
According to UVM, should there be any difference between MASTER and SLAVE monitor implementation?
Is it wrong to use base classes of monitor and item in child classes of driver and agent?
Can i find somewhere to download MASTER/SLAVE UVC code template? (any protocol)
Most probably the monitor class has some callbacks in it, and user need to re-defined the monitor to override that callback functions.
This will allow you better control your DUT received results.
According to UVM, should there be any difference between MASTER and SLAVE monitor implementation?
For getting the signals from DUT, I think no - same interface style. But depending on protocol the Master and Slave monitor functions can be different.
Is it wrong to use base classes of monitor and item in child classes of driver and agent?
I think no, if the monitor meets your needs i.e. provides all needed data, than I do not see any problem using it.
Can i find somewhere to download MASTER/SLAVE UVC code template? (any protocol)
To be honest, the UVM does not recommend anything for master/slave implementations. This is completely application specific.
The question if you need master and slave monitors or not depend on the objectives you have.
In many applications it might be sufficient to have only 1 monitor observing the interface between all master and slave components.
For others it might be useful to have specific monitors for each master and each slave component.