OpenCores
URL https://opencores.org/ocsvn/idea/idea/trunk

Subversion Repositories idea

[/] [idea/] [trunk/] [behavioral/] [inout_port/] [mux2to1.vbe] - Rev 9

Compare with Previous | Blame | View Log

--   File Name    : mux2to1.vbe                               --        
--   Description  : The 32-bit 2-to-1 mux                     --
--   Purpose      : To be used by ASIMUT and SCMAP            --        
--   Date         : Aug 30, 2001                              --
--   Version      : 1.1                                       --
--   Author       : Martadinata A.                            --
--   Address      : VLSI RG, Dept. of Electrical Engineering  --
--                  ITB, Bandung, Indonesia                   --
--   E-mail       : marta@vlsi.itb.ac.id                      --
                         
entity mux2to1 is
port(
  y             : in       bit_vector(63 downto 0);
  sel           : in       bit;
  clk           : in       bit;
  rst           : in       bit;
  cp            : out      bit_vector(31 downto 0);
  vdd           : in       bit; 
  vss           : in       bit  
  );
end mux2to1;

architecture vbe of mux2to1 is
signal reg   : reg_vector(31 downto 0) register;
signal cpp   : bit_vector(31 downto 0);

begin
  assert ((vdd and not (vss)) = '1')
    report "power supply is missing on mux2to1"
    severity warning;

  with sel select
     cpp <= y(63 downto 32) when '0',
            y(31 downto 0) when '1';
 
  REG1 : BLOCK ((clk = '1') and not clk'STABLE)
     BEGIN
     reg <= GUARDED X"1111_1111" when(rst='1') else not cpp;
  END BLOCK REG1;

  cp <= not reg;
end;


















Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.