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

Subversion Repositories idea

[/] [idea/] [trunk/] [behavioral/] [inout_port/] [dec1to3.vbe] - Blame information for rev 11

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

Line No. Rev Author Line
1 6 marta
--   File Name    : dec1to3.vbe                               --
2
--   Description  : The 32-bit 1-to-3 decoder                 --
3
--   Purpose      : To be used by ASIMUT and SCMAP            --
4
--   Date         : Aug 30, 2001                              --
5
--   Version      : 1.1                                       --
6
--   Author       : Sigit Dewantoro                            --
7
--   Address      : VLSI RG, Dept. of Electrical Engineering  --
8
--                  ITB, Bandung, Indonesia                   --
9
--   E-mail       : sigit@vlsi.itb.ac.id                      --
10
 
11
entity dec1to3 is
12
port(
13
  a       : in       bit_vector(31 downto 0);
14
  sel     : in       bit_vector(1 downto 0);
15
  clk     : in       bit;
16
  rst     : in       bit;
17
  o1,o2,o3   : out      bit_vector(31 downto 0);
18
  vdd     : in       bit;
19
  vss     : in       bit
20
  );
21
end dec1to3;
22
 
23
architecture vbe of dec1to3 is
24
signal reg1   : reg_vector(31 downto 0) register;
25
signal reg2   : reg_vector(31 downto 0) register;
26
signal reg3   : reg_vector(31 downto 0) register;
27
signal o11    : bit_vector(31 downto 0);
28
signal o22    : bit_vector(31 downto 0);
29
signal o33    : bit_vectro(31 downto 0);
30
begin
31
  assert ((vdd and not (vss)) = '1')
32
    report "power supply is missing on dec1to2"
33
    severity warning;
34
 
35
  o11 <= a when(sel="00") else not reg1;
36
  o22 <= a when(sel="01") else not reg2;
37
  o33 <= a when(sel="10") else not reg3;
38
 
39
  REG1 : BLOCK ((clk = '1') and not clk'STABLE)
40
     BEGIN
41
     reg1 <= GUARDED X"1111_1111" when(rst='1') else not o11;
42
  END BLOCK REG1;
43
 
44
  REG2 : BLOCK ((clk = '1') and not clk'STABLE)
45
     BEGIN
46
     reg2 <= GUARDED X"1111_1111" when(rst='1') else not o22;
47
  END BLOCK REG2;
48
 
49
  REG3: BLOCK ((clk = '1' and not clk'STABLE)
50
        BEGIN
51
        reg3 < GUARDED X"1111_1111" when (rst) else not o33;
52
 END BLOCK REG3;
53
 
54
  o1 <= not reg1;
55
  o2 <= not reg2;
56
  o3 <= not reg3;
57
end;
58
 
59
 
60
 
61
 
62
 
63
 
64
 
65
 
66
 
67
 
68
 
69
 
70
 
71
 
72
 
73
 
74
 
75
 

powered by: WebSVN 2.1.0

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