|
Not only for testbench, also for RTL simulation.<br>
ex.<br>
<br>
always @(negedge rstn or posedge PPC_LCLK1) begin <br>
if (~rstn) uPD_USB_INTCn_D = #1 1'b1;<br>
else uPD_USB_INTCn_D = #1 uPD_USB_INTCn; <br>
end<br>
<br>
#1 means data delay 1 time unit after clock changed. If no #1 you will find data and clk change at the same edge , it is not real world.<br>
For a D type FF, you can find the a parameter that is CLK to Q propagation delay. You can implement ck-> q delay here.<br>
#N let your RTL design more close to real world. Just more close, Synthesizer will ignore #N, but you will get a delay #M at gate level.<br>
The delay between RTL and gate level is different (#N/#M) but they all have dealy. If no #N, that means no delay, it is quite different. |
|