Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- entity registrador is
- port ( clk,enable,reset,set : in bit;
- d : in bit_vector (7 downto 0);
- q : out bit_vector (7 downto 0)
- );
- end registrador;
- architecture registro of registrador is
- begin
- process(clk,reset,set)
- begin
- if (reset='1') then q <= (others => '0');
- elsif (set='1') then q <= (others => '1');
- elsif (clk'EVENT and clk = '1') then
- if (enable ='1') then q <=d;
- end if;
- end if;
- end process;
- end registro;
Add Comment
Please, Sign In to add comment