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

Subversion Repositories idea

[/] [idea/] [trunk/] [behavioral/] [inout_port/] [dec1to4.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    : dec1to4.vbe                               --
2
--   Description  : The 32-bit 1-to-4 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,o4   : 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 reg4   : reg_vectro (31 downto 0) register;
28
signal o11    : bit_vector(31 downto 0);
29
signal o22    : bit_vector(31 downto 0);
30
signal o33    : bit_vectro(31 downto 0);
31
signal o44    : bit_vector (31 downto 0);
32
begin
33
  assert ((vdd and not (vss)) = '1')
34
    report "power supply is missing on dec1to2"
35
    severity warning;
36
 
37
  o11 <= a when(sel="00") else not reg1;
38
  o22 <= a when(sel="01") else not reg2;
39
  o33 <= a when(sel="10") else not reg3;
40
  o44 <= a when (sel="11") else not reg4;
41
 
42
  REG1 : BLOCK ((clk = '1') and not clk'STABLE)
43
     BEGIN
44
     reg1 <= GUARDED X"1111_1111" when(rst='1') else not o11;
45
  END BLOCK REG1;
46
 
47
  REG2 : BLOCK ((clk = '1') and not clk'STABLE)
48
     BEGIN
49
     reg2 <= GUARDED X"1111_1111" when(rst='1') else not o22;
50
  END BLOCK REG2;
51
 
52
  REG3: BLOCK ((clk = '1' and not clk'STABLE)
53
        BEGIN
54
        reg3 < GUARDED X"1111_1111" when (rst) else not o33;
55
 END BLOCK REG3;
56
 
57
  REG4: BLOCK ((clk = '1' and not clk'stable)
58
        begin
59
        reg4 <= guarded X"1111_1111" when rst else not o44;
60
 end block reg4;
61
 
62
  o1 <= not reg1;
63
  o2 <= not reg2;
64
  o3 <= not reg3;
65
  o4 <= not reg4;
66
end;
67
 
68
 
69
 
70
 
71
 
72
 
73
 
74
 
75
 
76
 
77
 
78
 
79
 
80
 
81
 
82
 
83
 
84
 

powered by: WebSVN 2.1.0

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