process (clk)
if(clk'event and clk=1) then
inter_signal_1 <= pluse_in;
inter_signal_2 <= inter_signal_1;
end if;
pluse_out <= inter_signal_1 and (not inter_signal_2);
只要改变你的clk的频率,就可以获得你想要的脉冲了!而且只有一个!
wire PLUSE_OUT;
reg INTER_PULSE_1,INTER_PULSE_2;
always @ (negedge SYS_RST_N or posedge SYS_CLK)
if(!SYS_RST_N)
begin
INTER_PULSE_1 <= 0;
INTER_PULSE_2 <= 0;
end
else
begin
INTER_PULSE_1 <=PULSE_IN;
INTER_PULSE_2 <=INTER_PULSE_1;
end
assign PULSE_OUT = INTER_PULSE_1 && (!INTER_PULSE_2)