Advertisement
Guest User

Clock Code

a guest
Mar 26th, 2017
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.88 KB | None | 0 0
  1. library IEEE;
  2. library UNISIM;
  3. use IEEE.STD_LOGIC_1164.ALL;
  4. use IEEE.STD_LOGIC_ARITH.ALL;
  5. use IEEE.STD_LOGIC_UNSIGNED.ALL;
  6. use IEEE.NUMERIC_STD.all;
  7. use UNISIM.VComponents.all;
  8.  
  9. entity Clock is
  10.     Port ( PRESET : in std_logic;
  11.               CLR : in std_logic;
  12.               clk : out std_logic);
  13. end Clock;
  14.  
  15. architecture behavioral of Clock is
  16.  
  17.     constant D : std_logic := '0';  -- Data input
  18.     constant G : std_logic := '0';  -- Gate input
  19.     constant GE : std_logic := '0'; -- Gate Enable
  20.    
  21. begin
  22.    
  23.      LDCPEInstance : LDCPE generic map (INIT => '0') -- Initial value of the latch
  24.      port map (
  25.         Q => clk,       -- Data output
  26.         CLR => CLR,     -- Asynchronous clear/reset input
  27.         D => D,         -- Data input is grounded
  28.         G => G,         -- Gate input is grounded
  29.         GE => GE,       -- Gate Enable input is grounded
  30.         PRE => PRESET   -- Asynchronous preset/set input
  31.      );
  32.      
  33. end behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement