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

Subversion Repositories idea

[/] [idea/] [trunk/] [behavioral/] [inout_port/] [mux2to1.vbe] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 marta
--   File Name    : mux2to1.vbe                               --
2
--   Description  : The 32-bit 2-to-1 mux                     --
3
--   Purpose      : To be used by ASIMUT and SCMAP            --
4
--   Date         : Aug 30, 2001                              --
5
--   Version      : 1.1                                       --
6
--   Author       : Martadinata A.                            --
7
--   Address      : VLSI RG, Dept. of Electrical Engineering  --
8
--                  ITB, Bandung, Indonesia                   --
9
--   E-mail       : marta@vlsi.itb.ac.id                      --
10
 
11
entity mux2to1 is
12
port(
13
  y             : in       bit_vector(63 downto 0);
14
  sel           : in       bit;
15
  clk           : in       bit;
16
  rst           : in       bit;
17
  cp            : out      bit_vector(31 downto 0);
18
  vdd           : in       bit;
19
  vss           : in       bit
20
  );
21
end mux2to1;
22
 
23
architecture vbe of mux2to1 is
24
signal reg   : reg_vector(31 downto 0) register;
25
signal cpp   : bit_vector(31 downto 0);
26
 
27
begin
28
  assert ((vdd and not (vss)) = '1')
29
    report "power supply is missing on mux2to1"
30
    severity warning;
31
 
32
  with sel select
33
     cpp <= y(63 downto 32) when '0',
34
            y(31 downto 0) when '1';
35
 
36
  REG1 : BLOCK ((clk = '1') and not clk'STABLE)
37
     BEGIN
38
     reg <= GUARDED X"1111_1111" when(rst='1') else not cpp;
39
  END BLOCK REG1;
40
 
41
  cp <= not reg;
42
end;
43
 
44
 
45
 
46
 
47
 
48
 
49
 
50
 
51
 
52
 
53
 
54
 
55
 
56
 
57
 
58
 
59
 
60
 

powered by: WebSVN 2.1.0

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