This is wrong. In the write function you have to define what happens with the extracted transaction.
In the run_phase of the monitor you have to assemble your tarnsaction from the values of the virtual interface.
In your monitor run_phase task you have to declare and construct a Transaction.Assign to the data memebers of this Transaction the corresponding Values from the Virtual interface.
If you have done this you Can write this transaction to the analysis port of your monitor.
I strongly recommend to watch the videos from the UVM Courses!
You do not understand the TLM - Transaction Level Modelling. But this is key for the UVM.
seq.outp represents the result and works as the refernce model. This data is not driven to the design. I Could do this also in the scoreboard. Where to do this is a question of taste.
I put the “`UVM_INFO” after DRIVER and MONITOR operations
am given inputs to dut(out=int_a + int_b) int=3,int_b=4 in line 1;
from the 2 line says about driver drive the that inputs into VIF i.e int_a=3,int=4; line 2 then,
in case for monitor
monitoring the data after DUT operation ,so int_a=3,int_b=4 displaying properly but out signal displayed as 0 ,from line 3 .
My question is : we are driving the inputs to VIF ,VIF instantiated with DUT in top then, in monitor we monitor inputs and output from VIF right even though it displaying output as “zero” .
What you see is correct. @50 is the first edge of your clock. At that time the output from the DUT is not updated. It is still 0.
You are working on both clock edges. Is this your intention?
Please review in detail my solution I have provided to you!
It is not a good solution to have functional coverage inside the monitor. Create a seperate coverage collector component and connet this to the analysis port of the monitor.
Best is to use as baseclas for the coverage collector uvm_subscriber.