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

Subversion Repositories idea

[/] [idea/] [trunk/] [behavioral/] [key_regulator/] [count3.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
-- VHDL data flow description generated from `count3`
2
--              date : Thu Aug  2 09:53:06 2001
3
 
4
 
5
-- Entity Declaration
6
 
7
ENTITY count3 IS
8
  PORT (
9
  clk : in BIT; -- clk
10
  rst : in BIT; -- rst
11
  q : out bit_vector(2 DOWNTO 0) ;      -- q
12
  vdd : in BIT; -- vdd
13
  vss : in BIT  -- vss
14
  );
15
END count3;
16
 
17
 
18
-- Architecture Declaration
19
 
20
ARCHITECTURE behaviour_data_flow OF count3 IS
21
  SIGNAL current_state : REG_VECTOR(2 DOWNTO 0) REGISTER;       -- current_state
22
  SIGNAL aux9 : BIT;            -- aux9
23
 
24
BEGIN
25
  aux9 <= not ((not (current_state (0)) and current_state (2)));
26
  label0 : BLOCK ((clk and not (clk'STABLE)) = '1')
27
  BEGIN
28
    current_state (0) <= GUARDED (rst or not ((current_state (2) xor current_state (1) xor current_state
29
(0))));
30
  END BLOCK label0;
31
  label1 : BLOCK ((clk and not (clk'STABLE)) = '1')
32
  BEGIN
33
    current_state (1) <= GUARDED (not (rst) and (current_state (2) or current_state (1)) and aux9);
34
  END BLOCK label1;
35
  label2 : BLOCK ((clk and not (clk'STABLE)) = '1')
36
  BEGIN
37
    current_state (2) <= GUARDED (not (current_state (2)) or rst);
38
  END BLOCK label2;
39
 
40
q (0) <= (not (current_state (2)) and not (rst));
41
 
42
q (1) <= (not (rst) and not ((current_state (0) xor (current_state (2)
43
and current_state (1)))));
44
 
45
q (2) <= (not (rst) and (not (current_state (1)) or current_state (2))
46
and not ((current_state (2) and current_state (0))));
47
END;

powered by: WebSVN 2.1.0

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