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