Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
dd2001 said:Hi,
I don't know how to write verilog code to generate a single pulse?
Anyone can help?
dd2001 said:Hi,
I don't know how to write verilog code to generate a single pulse?
Anyone can help?
jelydonut said:I'm not sure what your asking.. but theres this..
thing is a high going transition which creates a oneshot pulsy at the same time..
reg thing_dly;
wire pulsy;
assign pulsy = thing & ~thing_dly;
always @(posedge clk or posedge rst)
if(rst)
thing_dly <= 1'b0;
else
thing_dly <= thing;
If your looking for a quick pulse (say to clear a reg/combinatorial) then your coding the problem incorrectly.. never use gate delays.. there is always ways around it.. just hard to figure out..
jelydonut