implement a reference counter

Hi,

I want to implement a reference counter for the duct in UVM environment. I do not know where to aadd this counter. This reference counter needs to track the dut counter whenever I call it, meaning I will be doing a comparison between them to see if they are in sync. I start the dut counter by sending a transaction to the driver, which will assert a start signal in the dut, so it can start.

You can easily implement a uvm_component object as your reference model in the environment and feed ist with the retrieved transaction.

Can I implement the counter using object? and then i can add a reference counter their. then how do i run the counter ? like do i have to use the same clk from dut counter clk or use $reslrime() to do the count computation.

Your counter reference model belongs to the TB architecture. It should be of type uvm_component.

You can feed it with tansactions.