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

Subversion Repositories idea

[/] [idea/] [trunk/] [behavioral/] [inout_port/] [dec1to2.vbe] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 marta
--   File Name    : dec1to2.vbe                               --
2
--   Description  : The 32-bit 1-to-2 decoder                 --
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 dec1to2 is
12
port(
13
  a       : in       bit_vector(31 downto 0);
14
  sel     : in       bit;
15
  clk     : in       bit;
16
  rst     : in       bit;
17
  o1,o2   : out      bit_vector(31 downto 0);
18
  vdd     : in       bit;
19
  vss     : in       bit
20
  );
21
end dec1to2;
22
 
23
architecture vbe of dec1to2 is
24
signal reg1   : reg_vector(31 downto 0) register;
25
signal reg2   : reg_vector(31 downto 0) register;
26
signal o11    : bit_vector(31 downto 0);
27
signal o22    : bit_vector(31 downto 0);
28
begin
29
  assert ((vdd and not (vss)) = '1')
30
    report "power supply is missing on dec1to2"
31
    severity warning;
32
 
33
  o11 <= a when(sel='0') else not reg1;
34
  o22 <= a when(sel='1') else not reg2;
35
 
36
  REG1 : BLOCK ((clk = '1') and not clk'STABLE)
37
     BEGIN
38
     reg1 <= GUARDED X"1111_1111" when(rst='1') else not o11;
39
  END BLOCK REG1;
40
 
41
  REG2 : BLOCK ((clk = '1') and not clk'STABLE)
42
     BEGIN
43
     reg2 <= GUARDED X"1111_1111" when(rst='1') else not o22;
44
  END BLOCK REG2;
45
 
46
  o1 <= not reg1;
47
  o2 <= not reg2;
48
end;
49
 
50
 
51
 
52
 
53
 
54
 
55
 
56
 
57
 
58
 
59
 
60
 
61
 
62
 
63
 
64
 
65
 
66
 

powered by: WebSVN 2.1.0

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