process(clk, rst )
begin
if rst = '1' then
count <= 0;
pin_out_o <= '1';
elsif rising_edge(clk) then
if pin_in_fall = '1' then
pin_out_o <= '1';
elsif count = 5 then
pin_out_o <= '0';
count <= 0;
elsif pin_out_o = '1' then
count <= count + 1;
end if;
end process;
pin_out <= pin_out_o;
process(clk, rst )
begin
if rst = '1' then
temp1 <= '0';
temp2 <= '0';
elsif rising_edge(clk) then
temp1 <= pin_in;
temp2 <= temp1;
end if;
end process;
begin
if rst = '1' then
count <= 0;
pin_out_o <= '1';
elsif rising_edge(clk) then
if pin_in_fall = '1' then
pin_out_o <= '1';
elsif count = 5 then
pin_out_o <= '0';
count <= 0;
elsif pin_out_o = '1' then
count <= count + 1;
end if;
end process;
pin_out <= pin_out_o;
process(clk, rst )
begin
if rst = '1' then
temp1 <= '0';
temp2 <= '0';
elsif rising_edge(clk) then
temp1 <= pin_in;
temp2 <= temp1;
end if;
end process;
pin_in_fall <= not temp1 and temp2;
一周热门 更多>