fork download
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3.  
  4. entity Register_8bit is
  5. Port (
  6. Clock : in STD_LOGIC;
  7. Reset : in STD_LOGIC;
  8. Data_in : in STD_LOGIC_VECTOR (7 downto 0);
  9. Data_out : out STD_LOGIC_VECTOR (7 downto 0)
  10. );
  11. end Register_8bit;
  12.  
  13. architecture Behavioral of Register_8bit is
  14. begin
  15. process(Clock, Reset)
  16. begin
  17. if Reset = '1' then
  18. Data_out <= "00000000";
  19. elsif rising_edge(Clock) then
  20. Data_out <= Data_in;
  21. end if;
  22. end process;
  23. end Behavioral;
Success #stdin #stdout 0.02s 25832KB
stdin
Standard input is empty
stdout
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity Register_8bit is
    Port ( 
        Clock : in STD_LOGIC;
        Reset : in STD_LOGIC;
        Data_in : in STD_LOGIC_VECTOR (7 downto 0);
        Data_out : out STD_LOGIC_VECTOR (7 downto 0)
    );
end Register_8bit;

architecture Behavioral of Register_8bit is
begin
    process(Clock, Reset)
    begin
        if Reset = '1' then
            Data_out <= "00000000";
        elsif rising_edge(Clock) then
            Data_out <= Data_in;
        end if;
    end process;
end Behavioral;