Advertisement
hbinderup94

one_digit_clock_tester

May 25th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.86 KB | None | 0 0
  1. --------- one_digit_clock_tester ---------
  2. Library ieee;
  3. use ieee.std_logic_1164.all;
  4.  
  5. entity one_digit_clock_tester is
  6. port(
  7.     KEY         : in std_logic_vector(3 downto 0);
  8.     CLOCK_50    : in std_logic;
  9.     SW          : in std_logic_vector(17 downto 16);
  10.     HEX0        : out std_logic_vector(6 downto 0);
  11.     LEDR        : out std_logic_vector(0 downto 0));
  12. end one_digit_clock_tester;
  13.  
  14. architecture structural of one_digit_clock_tester is
  15.     signal countBin     : std_logic_vector(3 downto 0);
  16.     signal clkOut       : std_logic;   
  17. begin
  18.  
  19. I1: entity work.clock_gen
  20.      port map(
  21.         clk     => CLOCK_50,
  22.         reset   => KEY(3),
  23.         speed   => KEY(0),
  24.         clk_out => clkOut);
  25.        
  26. I2: entity work.multi_counter
  27.      port map(
  28.         CLK     => clkOut,
  29.         reset   => KEY(3),
  30.         mode    => SW,
  31.         count   => countBin,
  32.         cout    => LEDR);      
  33.  
  34. I3: entity work.bin2hex
  35.      port map(
  36.         bin     => countBin,
  37.         seg     => HEX0);
  38.  
  39. end structural;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement