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.
process (pulse_in,clk)
begin
IF pulse_in = '1' THEN
pulse_latch <= '1';
ELSIF RISING_EDGE(clk) THEN
pulse_latch <= '0';
END IF;
IF RISING_EDGE(clk) THEN
pulse_out <= pulse_latch;
END IF;
end process;
process (pulse_in,clk)
begin
IF pulse_out = '1' THEN
pulse_latch <= '0';
ELSIF RISING_EDGE(pulse_in) THEN
pulse_latch <= '1';
END IF;
end process;
process (clk)
begin
IF RISING_EDGE(clk) THEN
pulse_out <= pulse_latch;
END IF;
end process;
always @(in or sync_s2 or rst_n) begin
if(!rst_n) latch <= 0;
else if(sync_s2) latch <= 0;
else if(in) latch <= 1;
end
always @(posedge clk100mhz or negedge rst_n) begin
if(!rst_n) {sync_s1, sync_s2} <= 2'b0;
else
{sync_s2, sync_s1} <= {sync_s1, latch};
end
assign use_this_in_100MHz_domain = sync_s2;