------------------------------------------------------------
-- Copyright: 2011 Integrated Sytems Laboratory, ETH Zurich
--            http://www.iis.ee.ethz.ch/~sha3
------------------------------------------------------------
-------------------------------------------------------------------------------
-- Title      : Clock gate RTL description
-- Project    : 
-------------------------------------------------------------------------------
-- File       : clockgate.vhd
-- Author     : Frank K. Guerkaynak  
-- Company    : Integrated Systems Laboratory, ETH Zurich
-- Created    : 2011-08-25
-- Last update: 2011-08-25
-- Platform   : ModelSim (simulation), Synopsys (synthesis)
-- Standard   : VHDL'87
-------------------------------------------------------------------------------
-- Description: This is an instance so that we can gate clock both in RTL and
--              gatelevel 
-------------------------------------------------------------------------------
-- Copyright (c) 2011 Integrated Systems Laboratory, ETH Zurich
-------------------------------------------------------------------------------
-- Revisions  :
-- Date        Version  Author  Description
-- 2011-08-25  1.0      kgf	Created
-------------------------------------------------------------------------------

library ieee;
use ieee.std_logic_1164.all;

entity clockgate is
  
  port (
    ClkInxCI  : in  std_logic;
    EnxSI     : in  std_logic;
    ClkOutxCO : out std_logic);

end clockgate;

architecture rtl of clockgate is

 signal LatchOutxD : std_logic;
  
begin  -- rtl
  -- should compile to LAGCE in UMC65LL
  
  -- first a latch
  p_latch: process (EnxSI, ClkInxCI)
  begin  -- process p_latch
    if ClkInxCI = '1' then  -- rising clock edge
      LatchOutxD <= EnxSI;
    end if;
  end process p_latch;

  
  -- followed by an AND
  ClkOutxCO <= LatchOutxD and ClkInxCI;
  

end rtl;

Generated on Tue Nov 22 15:16:34 CET 2011
Home