Advertisement
Guest User

Untitled

a guest
May 24th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 1.24 KB | None | 0 0
  1. ----------------------------------------------------------------------------------
  2. -- Company:
  3. -- Engineer:
  4. --
  5. -- Create Date:    19:10:01 05/12/2016
  6. -- Design Name:
  7. -- Module Name:    regtot - Behavioral
  8. -- Project Name:
  9. -- Target Devices:
  10. -- Tool versions:
  11. -- Description:
  12. --
  13. -- Dependencies:
  14. --
  15. -- Revision:
  16. -- Revision 0.01 - File Created
  17. -- Additional Comments:
  18. --
  19. ----------------------------------------------------------------------------------
  20. library IEEE;
  21. use IEEE.STD_LOGIC_1164.ALL;
  22.  
  23. -- Uncomment the following library declaration if using
  24. -- arithmetic functions with Signed or Unsigned values
  25. --use IEEE.NUMERIC_STD.ALL;
  26.  
  27. -- Uncomment the following library declaration if instantiating
  28. -- any Xilinx primitives in this code.
  29. --library UNISIM;
  30. --use UNISIM.VComponents.all;
  31.  
  32. entity regtot is
  33.     Port ( t_ld: in STD_LOGIC;
  34.              t_clr : in STD_LOGIC;
  35.              s_somador :in STD_LOGIC_VECTOR ( 3 downto 0);
  36.              t_saida : out STD_LOGIC_VECTOR (3 downto 0));
  37.  
  38. end regtot;
  39.  
  40.  
  41. architecture Behavioral of regtot is
  42. begin
  43.  
  44. registrador: process (t_clr, t_ld)
  45. begin
  46.     if t_clr = '1' then
  47.         t_saida <= "0000" ;
  48.     elsif rising_edge(t_ld) then
  49.          t_saida<= s_somador;    
  50.     end if;
  51. end process;
  52.  
  53.  
  54. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement