it_boy
Full Member level 3
I am trying to generate a pulse at every rising edge of "inp" signal. I am using event to do the same.
Problem occurs whenever event triggers during the delay of the pulse_width.
Named block gets disabled, but never event does not trigger.
Have a look at attached file to see what I mean.
Can someone help me understand why the event does not trigger during the second event? or why inp_pulse always stays high?
Problem occurs whenever event triggers during the delay of the pulse_width.
Named block gets disabled, but never event does not trigger.
Have a look at attached file to see what I mean.
Can someone help me understand why the event does not trigger during the second event? or why inp_pulse always stays high?
Code:
always @(posedge inp) begin
disable pulse_gen;
-> inp_rise;
end
always @(inp_rise) begin: pulse_gen
inp_pulse = 1'b1;
#pulse_width;
inp_pulse = 1'b0;
end