Hi,
Why do we use non-blocking for driving the signals to DUT while using clocking block and use blocking to sample the signal from DUT.
Thanks,
Mukul
Hi,
Why do we use non-blocking for driving the signals to DUT while using clocking block and use blocking to sample the signal from DUT.
Thanks,
Mukul
In reply to mukul1996:
I don’t understand your question. You use a synchronous drive statement to make assignments to clocking block outputs. You do not use block or non-blocking assignments to read clocking block inputs.
In reply to dave_59:
interface arb_if(input bit clk);
logic [1:0] grant, request;
logic rst;
clocking cb @(posedge clk);
output request;
input grant;
endclocking
modport TEST (clocking cb,
output rst);
modport DUT (input request, rst, output grant);
endinterface
module test(arb_if.TEST arbif);
initial begin
arbif.cb.request <= 0;
@arbif.cb;
$display("@%Ot: Grant = %b", $time, arbif.cb.grant);
end
endmodule
Here in the above eg. arbif.cb.request is driven by non blocking. If I would have used blocking here, it would give me an error.why?