virtual task runphase(uvmphase phase); @(negedge aif.rst); forever begin…
- User
virtual task run_phase(uvm_phase phase); @(negedge aif.rst); forever begin repeat(2)@(posedge aif.clk); t.a = aif.a; t.b = aif.b; t.y = aif.y; `uvm_info("MON", $sformatf("Data send to Scoreboard a : %0d , b : %0d and y : %0d", t.a,t.b,t.y), UVM_NONE); send.write(t); end endtask //////// clock is always #10 aif.clk = ~aif.clk; here I have one issue he said @(negedge aif.rst); so that means if negedge rst happens at 10 and clk also happens at 10 seconds repeat(2)@(posedge aif.clk); does that mean i this line repeat(2)@(posedge aif.clk); happens at 30 or at 50
Assistant
Let me analyze the timing behavior of your monitor's
run_phasetask in relation to the clock and reset signals.Understanding the Timing:
-
Clock Generation:
always #10 aif.clk = ~aif.clk;creates a clock with a period of 20 time units (10 units high, 10 units low)- Clock edges occur at: 10, 30, 50, 70, etc. (positive edges) and 20, 40, 60, etc. (negative edges)
-
Reset Behavior:
- The reset is asserted at time 0 (initial block) and deasserted after 5 positive clock edges (at time 50)
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.