Simple checker

My RTL has a signal I want compare to a variable in a class.

A module has visibility to the RTL signal, but not the model variable.

  1. I could create a monitor and a scoreboard, and have the monitor and model provide transactions to it (scoreboard it).
    Seems like overkill; a one-line assertion somewhere would be nicer.

  2. set up a checker task in the model that waits on events from an interface, then compares the RTL signal to its local variable.

thoughts?

In reply to bmorris:

My RTL has a signal I want compare to a variable in a class.
A module has visibility to the RTL signal, but not the model variable.

  1. I could create a monitor and a scoreboard, and have the monitor and model provide transactions to it (scoreboard it).
    Seems like overkill; a one-line assertion somewhere would be nicer.
  2. set up a checker task in the model that waits on events from an interface, then compares the RTL signal to its local variable.
    thoughts?

Why not create a TB only interface. Assign the signal value to virtual interfaces and then check the RTL vs model in the interface task. This is especially handy if there is some temporal aspect to the check

In reply to verif_learner:

Yup; got it. This is a little cleaner than what I did (a perpetual task in the model itself).

In reply to verif_learner:

In reply to bmorris:
Why not create a TB only interface. Assign the signal value to virtual interfaces and then check the RTL vs model in the interface task. This is especially handy if there is some temporal aspect to the check

Hello verif_learner,

Could you please provide a short snippet of code about the solution you proposed I’m really interested in learning how to do what you are referring to.

Thanks,
-R

In reply to rgarcia07:

In reply to verif_learner:
Hello verif_learner,
Could you please provide a short snippet of code about the solution you proposed I’m really interested in learning how to do what you are referring to.
Thanks,
-R

Actually, there is nothing special about what I mentioned. We do this in all our UVM TBs.

  1. create an ad-hoc interface of signals that you would like to move from UVM to non UVM world (class vs non-class domain)
  2. instantiate the interface in tb top and pass interface using set method to the UVM domain
  3. scoreboard uses the virtual interface and controls the signal present in the interface
  4. the signal from interface is available in non uvm domain and can be used to compare value sent by uvm in non uvm domain