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

Subversion Repositories idea

[/] [idea/] [trunk/] [behavioral/] [key_regulator/] [count4.vbe] - Blame information for rev 10

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

Line No. Rev Author Line
1 6 marta
-- VHDL data flow description generated from `count4`
2
--              date : Thu Aug  2 08:55:51 2001
3
 
4
 
5
-- Entity Declaration
6
 
7
ENTITY count4 IS
8
  PORT (
9
  clk : in BIT; -- clk
10
  rst : in BIT; -- rst
11
  q : out bit_vector(3 DOWNTO 0) ;      -- q
12
  vdd : in BIT; -- vdd
13
  vss : in BIT  -- vss
14
  );
15
END count4;
16
 
17
 
18
-- Architecture Declaration
19
 
20
ARCHITECTURE behaviour_data_flow OF count4 IS
21
  SIGNAL current_state : REG_VECTOR(3 DOWNTO 0) REGISTER;       -- current_state
22
  SIGNAL aux35 : BIT;           -- aux35
23
  SIGNAL aux27 : BIT;           -- aux27
24
  SIGNAL aux31 : BIT;           -- aux31
25
  SIGNAL aux32 : BIT;           -- aux32
26
 
27
BEGIN
28
  aux32 <= (not (rst) and not (current_state (2)));
29
  aux31 <= (not (rst) and current_state (2));
30
  aux27 <= (not (current_state (0)) and current_state (1));
31
  aux35 <= (rst or (not (current_state (2)) and not (current_state (0))
32
and not (current_state (1))));
33
  label0 : BLOCK ((clk and not (clk'STABLE)) = '1')
34
  BEGIN
35
    current_state (0) <= GUARDED ((not (current_state (3)) and not (current_state (0))) or (current_state
36
(2) and (not (current_state (3)) or aux27)) or aux35);
37
  END BLOCK label0;
38
  label1 : BLOCK ((clk and not (clk'STABLE)) = '1')
39
  BEGIN
40
    current_state (1) <= GUARDED (rst or (current_state (0) and (current_state (2) or current_state
41
(1))) or (not (current_state (0)) and not (current_state (3))
42
and not (current_state (1))));
43
  END BLOCK label1;
44
  label2 : BLOCK ((clk and not (clk'STABLE)) = '1')
45
  BEGIN
46
    current_state (2) <= GUARDED ((current_state (3) and (not (current_state (0)) or current_state
47
(1))) or (current_state (2) and not ((not (current_state (0))
48
or not (current_state (1))))) or aux35);
49
  END BLOCK label2;
50
  label3 : BLOCK ((clk and not (clk'STABLE)) = '1')
51
  BEGIN
52
    current_state (3) <= GUARDED ((current_state (3) and aux32 and (not (current_state (0)) or
53
not (current_state (1)))) or (aux31 and (current_state (0) or
54
(not (current_state (3)) and current_state (1)))));
55
  END BLOCK label3;
56
 
57
q (0) <= ((not (current_state (0)) and aux32) or (aux31 and (current_state
58
(3) xor (not (current_state (0)) or not (current_state (1))))));
59
 
60
q (1) <= ((not (current_state (1)) and aux32) or (aux31 and ((not (current_state
61
(0)) and current_state (3)) or (not (current_state (3)) and
62
not (current_state (1))))));
63
 
64
q (2) <= (not (rst) and (not (current_state (2)) or aux27) and (not (current_state
65
(3)) or not (aux27)));
66
 
67
q (3) <= ((not (current_state (1)) and (not (current_state (0)) or current_state
68
(3)) and aux31) or (aux32 and (not (current_state (3)) or aux27)));
69
END;

powered by: WebSVN 2.1.0

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