This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Flop with Sync set/reset. | |
process (clk) | |
begin | |
if (rising_edge(clk)) then | |
if (rst1 = '0') then | |
out1 <= '0'; | |
elsif (rst2 = '1') then | |
out1 <= '1'; | |
else | |
out1 <= in1; | |
end if; | |
end if; | |
end process; | |
-- Flop with multi Sync reset. | |
process (clk) | |
begin | |
if (rising_edge(clk)) then | |
if (rst1 = '0') then | |
out2 <= '0'; | |
elsif (rst2 = '1') then | |
out2 <= '0'; | |
else | |
out2 <= in2; | |
end if; | |
end if; | |
end process; | |
-- Flop with Async set/reset | |
process (clk, rst1, rst2) | |
begin | |
if (rst1 = '0') then | |
out1 <= '0'; | |
else | |
if (rst2 = '1') then | |
out1 <= '1'; | |
else | |
if (rising_edge(clk)) then | |
out1 <= in1; | |
end if; | |
end if; | |
end if; | |
end process; | |
-- Flop with multi Async reset | |
process (clk, rst1, rst2) | |
begin | |
if (rst1 = '0') then | |
out2 <= '0'; | |
else | |
if (rst2 = '1') then | |
out2 <= '0'; | |
else | |
if (rising_edge(clk)) then | |
out2 <= in2; | |
end if; | |
end if; | |
end if; | |
end process; | |
-- Latch with Async set/reset | |
process (clk, rst1, rst2) | |
begin | |
if(rst1 = '0') then | |
out1 <= '0'; | |
elsif(rst2 = '1') then | |
out1 <= '1'; | |
elsif (clk = '1') then | |
out1 <= in1; | |
end if; | |
end process; | |
-- Latch with multi Async reset | |
process (clk, rst1, rst2) | |
begin | |
if (rst1 = '0' or rst2 = '1') then | |
out2 <= '0'; | |
elsif (clk = '1') then | |
out2 <= in2; | |
end if; | |
end process; | |
-- Flop with Sync reset | |
process (clk) | |
begin | |
if (rising_edge(clk)) then | |
if (rst = '0') then | |
out2 <= '0'; | |
else | |
out2 <= in1; | |
end if; | |
end if; | |
end process; |
Great article this is very informative .......keep posting Thanks Regards
ReplyDeleteFree Source Code
Free Source code For Academic
Academic Project Download
Academic Project Free Download
Freelancer In India