-- VHDL data flow description generated from `count5`
|
-- VHDL data flow description generated from `count5`
|
-- date : Thu Aug 2 08:47:45 2001
|
-- date : Thu Aug 2 08:47:45 2001
|
|
|
|
|
-- Entity Declaration
|
-- Entity Declaration
|
|
|
ENTITY count5 IS
|
ENTITY count5 IS
|
PORT (
|
PORT (
|
clk : in BIT; -- clk
|
clk : in BIT; -- clk
|
rst : in BIT; -- rst
|
rst : in BIT; -- rst
|
q : out bit_vector(4 DOWNTO 0) ; -- q
|
q : out bit_vector(4 DOWNTO 0) ; -- q
|
vdd : in BIT; -- vdd
|
vdd : in BIT; -- vdd
|
vss : in BIT -- vss
|
vss : in BIT -- vss
|
);
|
);
|
END count5;
|
END count5;
|
|
|
|
|
-- Architecture Declaration
|
-- Architecture Declaration
|
|
|
ARCHITECTURE behaviour_data_flow OF count5 IS
|
ARCHITECTURE behaviour_data_flow OF count5 IS
|
SIGNAL current_state : REG_VECTOR(4 DOWNTO 0) REGISTER; -- current_state
|
SIGNAL current_state : REG_VECTOR(4 DOWNTO 0) REGISTER; -- current_state
|
SIGNAL aux51 : BIT; -- aux51
|
SIGNAL aux51 : BIT; -- aux51
|
SIGNAL aux48 : BIT; -- aux48
|
SIGNAL aux48 : BIT; -- aux48
|
SIGNAL aux46 : BIT; -- aux46
|
SIGNAL aux46 : BIT; -- aux46
|
SIGNAL aux45 : BIT; -- aux45
|
SIGNAL aux45 : BIT; -- aux45
|
|
|
BEGIN
|
BEGIN
|
aux45 <= (current_state (2) and current_state (1));
|
aux45 <= (current_state (2) and current_state (1));
|
aux46 <= (not (current_state (1)) or current_state (2));
|
aux46 <= (not (current_state (1)) or current_state (2));
|
aux48 <= not ((not (current_state (3)) and not (current_state (2))));
|
aux48 <= not ((not (current_state (3)) and not (current_state (2))));
|
aux51 <= (not (current_state (2)) and current_state (3));
|
aux51 <= (not (current_state (2)) and current_state (3));
|
label0 : BLOCK ((clk and not (clk'STABLE)) = '1')
|
label0 : BLOCK ((clk and not (clk'STABLE)) = '1')
|
BEGIN
|
BEGIN
|
current_state (0) <= GUARDED (rst or (not (current_state (0)) and current_state (3) and not
|
current_state (0) <= GUARDED (rst or (not (current_state (0)) and current_state (3) and not
|
(current_state (1)) and current_state (2)) or (current_state
|
(current_state (1)) and current_state (2)) or (current_state
|
(4) and current_state (1) and aux48) or (not (current_state
|
(4) and current_state (1) and aux48) or (not (current_state
|
(4)) and not (current_state (1)) and not ((current_state (3)
|
(4)) and not (current_state (1)) and not ((current_state (3)
|
xor current_state (2)))) or (current_state (0) and (not (current_state
|
xor current_state (2)))) or (current_state (0) and (not (current_state
|
(3)) or not (current_state (2))) and (current_state (4) or aux45)));
|
(3)) or not (current_state (2))) and (current_state (4) or aux45)));
|
END BLOCK label0;
|
END BLOCK label0;
|
label1 : BLOCK ((clk and not (clk'STABLE)) = '1')
|
label1 : BLOCK ((clk and not (clk'STABLE)) = '1')
|
BEGIN
|
BEGIN
|
current_state (1) <= GUARDED (rst or (current_state (0) and ((not (current_state (1)) and
|
current_state (1) <= GUARDED (rst or (current_state (0) and ((not (current_state (1)) and
|
aux48) or (current_state (4) and not ((not (current_state (3))
|
aux48) or (current_state (4) and not ((not (current_state (3))
|
or not (current_state (2))))))) or (not (current_state (0))
|
or not (current_state (2))))))) or (not (current_state (0))
|
and (current_state (4) or not ((current_state (3) or current_state
|
and (current_state (4) or not ((current_state (3) or current_state
|
(1))) or aux51) and (not (current_state (4)) or not ((not (current_state
|
(1))) or aux51) and (not (current_state (4)) or not ((not (current_state
|
(1)) and (not (current_state (2)) or current_state (3)))))));
|
(1)) and (not (current_state (2)) or current_state (3)))))));
|
END BLOCK label1;
|
END BLOCK label1;
|
label2 : BLOCK ((clk and not (clk'STABLE)) = '1')
|
label2 : BLOCK ((clk and not (clk'STABLE)) = '1')
|
BEGIN
|
BEGIN
|
current_state (2) <= GUARDED (rst or (current_state (4) and not (current_state (3)) and not
|
current_state (2) <= GUARDED (rst or (current_state (4) and not (current_state (3)) and not
|
(current_state (1)) and current_state (2)) or (not (current_state
|
(current_state (1)) and current_state (2)) or (not (current_state
|
(4)) and not ((current_state (1) xor aux48))) or (current_state
|
(4)) and not ((current_state (1) xor aux48))) or (current_state
|
(0) and (not ((not (current_state (2)) or current_state (3)))
|
(0) and (not ((not (current_state (2)) or current_state (3)))
|
or (current_state (3) and not ((not (current_state (1)) and
|
or (current_state (3) and not ((not (current_state (1)) and
|
current_state (2)))))));
|
current_state (2)))))));
|
END BLOCK label2;
|
END BLOCK label2;
|
label3 : BLOCK ((clk and not (clk'STABLE)) = '1')
|
label3 : BLOCK ((clk and not (clk'STABLE)) = '1')
|
BEGIN
|
BEGIN
|
current_state (3) <= GUARDED (rst or (current_state (0) and (not ((not (current_state (3))
|
current_state (3) <= GUARDED (rst or (current_state (0) and (not ((not (current_state (3))
|
or (not (current_state (2)) and not (current_state (1))))) or
|
or (not (current_state (2)) and not (current_state (1))))) or
|
not ((current_state (4) or aux45)))) or (not (current_state
|
not ((current_state (4) or aux45)))) or (not (current_state
|
(0)) and ((not (current_state (4)) and not (current_state (1))
|
(0)) and ((not (current_state (4)) and not (current_state (1))
|
and not (aux51)) or (current_state (4) and current_state (3)
|
and not (aux51)) or (current_state (4) and current_state (3)
|
and aux46))));
|
and aux46))));
|
END BLOCK label3;
|
END BLOCK label3;
|
label4 : BLOCK ((clk and not (clk'STABLE)) = '1')
|
label4 : BLOCK ((clk and not (clk'STABLE)) = '1')
|
BEGIN
|
BEGIN
|
current_state (4) <= GUARDED (rst or ((not (aux46) or (not (current_state (3)) and not (current_state
|
current_state (4) <= GUARDED (rst or ((not (aux46) or (not (current_state (3)) and not (current_state
|
(1)) and current_state (2)) or not ((not (current_state (4))
|
(1)) and current_state (2)) or not ((not (current_state (4))
|
and (current_state (0) or (not (current_state (3)) and current_state
|
and (current_state (0) or (not (current_state (3)) and current_state
|
(1)))))) and (not (current_state (4)) or (not (current_state
|
(1)))))) and (not (current_state (4)) or (not (current_state
|
(0)) and aux45) or (current_state (0) and (aux51 or (not (current_state
|
(0)) and aux45) or (current_state (0) and (aux51 or (not (current_state
|
(3)) and current_state (1)))))));
|
(3)) and current_state (1)))))));
|
END BLOCK label4;
|
END BLOCK label4;
|
|
|
q (0) <= (not (rst) and ((not (current_state (3)) and not (current_state
|
q (0) <= (not (rst) and ((not (current_state (3)) and not (current_state
|
(1)) and current_state (2)) or (not (current_state (2)) and
|
(1)) and current_state (2)) or (not (current_state (2)) and
|
current_state (0) and (current_state (3) or current_state (1)))
|
current_state (0) and (current_state (3) or current_state (1)))
|
or (not (current_state (4)) and (not (current_state (2)) or
|
or (not (current_state (4)) and (not (current_state (2)) or
|
(current_state (3) and current_state (1) and current_state (0))))));
|
(current_state (3) and current_state (1) and current_state (0))))));
|
|
|
q (1) <= (not (rst) and (not (current_state (0)) or current_state (4)
|
q (1) <= (not (rst) and (not (current_state (0)) or current_state (4)
|
or not (current_state (3)) or (not (current_state (2)) and not
|
or not (current_state (3)) or (not (current_state (2)) and not
|
(current_state (1)))) and ((not (current_state (1)) and (not
|
(current_state (1)))) and ((not (current_state (1)) and (not
|
(current_state (2)) or current_state (3))) or (not (current_state
|
(current_state (2)) or current_state (3))) or (not (current_state
|
(4)) and (current_state (3) xor current_state (2)))));
|
(4)) and (current_state (3) xor current_state (2)))));
|
|
|
q (2) <= (not (rst) and (not (current_state (0)) or current_state (4)
|
q (2) <= (not (rst) and (not (current_state (0)) or current_state (4)
|
or aux46) and (not (current_state (3)) or (not (current_state
|
or aux46) and (not (current_state (3)) or (not (current_state
|
(0)) and not (current_state (4)) and aux45)));
|
(0)) and not (current_state (4)) and aux45)));
|
|
|
q (3) <= ((not (rst) and current_state (4) and current_state (0) and current_state
|
q (3) <= ((not (rst) and current_state (4) and current_state (0) and current_state
|
(3) and (current_state (2) xor current_state (1))) or (not (rst)
|
(3) and (current_state (2) xor current_state (1))) or (not (rst)
|
and (not (current_state (0)) or not (aux48)) and (not (current_state
|
and (not (current_state (0)) or not (aux48)) and (not (current_state
|
(2)) or current_state (0) or (current_state (4) and current_state
|
(2)) or current_state (0) or (current_state (4) and current_state
|
(1)))));
|
(1)))));
|
|
|
q (4) <= ((not (rst) and not (current_state (0)) and current_state (4)
|
q (4) <= ((not (rst) and not (current_state (0)) and current_state (4)
|
and not (aux45)) or (not (rst) and not ((not (current_state
|
and not (aux45)) or (not (rst) and not ((not (current_state
|
(0)) or current_state (4))) and ((not (current_state (1)) and
|
(0)) or current_state (4))) and ((not (current_state (1)) and
|
current_state (3)) or not (aux46))) or (not (current_state (4))
|
current_state (3)) or not (aux46))) or (not (current_state (4))
|
and not (rst) and not (current_state (0)) and not ((current_state
|
and not (rst) and not (current_state (0)) and not ((current_state
|
(3) and (current_state (2) xor current_state (1))))));
|
(3) and (current_state (2) xor current_state (1))))));
|
END;
|
END;
|
|
|