I have the following DUT for which i want to build a UVM env:
inputs: events_in[15:0], data_in, clk, rst
outputs: events_out[2:0]
events_in interface gets an agent and data_in interface gets an agent.
however how should events_out be handled? it’s an output only interface - should it have a passive-agent (which only wraps a monitor) or should a monitor be directly instantiated in the environment?
both work functionally but i wonder if there’s a UVM guideline to follow here.
The decision how many agents you have is not related to inputs and outputs, menas inputs in 1 or more agentss, outputs in another agent. The question is what belongs together with respect to the functionality. To make a decision with respect to this you have to answer the question how doeas data_in and events_in influence events_out. The solution might be to have only 1 agent covering all your inputs and outputs.
thanks, i thought about that option as well
data_in interface affects events_out just like events_in affect events_out.
data_in item is different from events_in item, which is what made me consider a different agent for each of them.
would your recommendation be to also unify the two items - and then it’s all really one agent?
Seperating your functionality to 3 interfaces with 3 agents might complicate your verification. As I guess all belongs together it is just easy having 1 agent. This will simplify your verification.
I agree, for the principle i would still ask,
say you have an output-only DUT (say for the example, interrupt every 100 clks).
would you create a uvm_agent for this DUT or just an interrupt monitor?
I’m trying to figure out if the UVM methodology forces me to wrap everything with an ‘agent’, or a stand-alone monitor is also ok?
Nobody is forcing you in the UVM. You have a lot of freedom. The agent concept is supporting in a good way the reuse aspect, because you can configure an agent passive (monitoring only) and actice (driving and monitoring). This is what you have to take in account.