1 |
6 |
marta |
-- VHDL data flow description generated from `cfb_bop`
|
2 |
|
|
-- date : Sat Sep 1 20:22:55 2001
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
-- Entity Declaration
|
6 |
|
|
|
7 |
|
|
ENTITY cfb_bop IS
|
8 |
|
|
PORT (
|
9 |
|
|
vss : in BIT; -- vss
|
10 |
|
|
vdd : in BIT; -- vdd
|
11 |
|
|
sel3 : out bit_vector(0 TO 1) ; -- sel3
|
12 |
|
|
sel2 : out bit_vector(0 TO 1) ; -- sel2
|
13 |
|
|
sel1 : out bit_vector(0 TO 1) ; -- sel1
|
14 |
|
|
en_out : out BIT; -- en_out
|
15 |
|
|
en_rcbc : out BIT; -- en_rcbc
|
16 |
|
|
en_iv : out BIT; -- en_iv
|
17 |
|
|
en_in : out BIT; -- en_in
|
18 |
|
|
cke_b_mode : out BIT; -- cke_b_mode
|
19 |
|
|
cp_ready : out BIT; -- cp_ready
|
20 |
|
|
emp_buf : out BIT; -- emp_buf
|
21 |
|
|
s_gen_key : out BIT; -- s_gen_key
|
22 |
|
|
s_mesin : out BIT; -- s_mesin
|
23 |
|
|
e_mesin : out BIT; -- e_mesin
|
24 |
|
|
first_dt : inout BIT; -- first_dt
|
25 |
|
|
e : in BIT; -- e
|
26 |
|
|
finish : in BIT; -- finish
|
27 |
|
|
dt_ready : in BIT; -- dt_ready
|
28 |
|
|
key_ready : in BIT; -- key_ready
|
29 |
|
|
clk : in BIT; -- clk
|
30 |
|
|
active : in BIT -- active
|
31 |
|
|
);
|
32 |
|
|
END cfb_bop;
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
-- Architecture Declaration
|
36 |
|
|
|
37 |
|
|
ARCHITECTURE behaviour_data_flow OF cfb_bop IS
|
38 |
|
|
SIGNAL current_state : REG_VECTOR(0 TO 3) REGISTER; -- current_state
|
39 |
|
|
SIGNAL aux7 : BIT; -- aux7
|
40 |
|
|
SIGNAL aux6 : BIT; -- aux6
|
41 |
|
|
SIGNAL aux5 : BIT; -- aux5
|
42 |
|
|
SIGNAL aux3 : BIT; -- aux3
|
43 |
|
|
SIGNAL aux0 : BIT; -- aux0
|
44 |
|
|
SIGNAL current_state_s1 : BIT; -- current_state_s1
|
45 |
|
|
SIGNAL next_state_s2 : BIT; -- next_state_s2
|
46 |
|
|
SIGNAL current_state_s2 : BIT; -- current_state_s2
|
47 |
|
|
SIGNAL current_state_s3 : BIT; -- current_state_s3
|
48 |
|
|
SIGNAL current_state_s4 : BIT; -- current_state_s4
|
49 |
|
|
SIGNAL current_state_s5 : BIT; -- current_state_s5
|
50 |
|
|
SIGNAL current_state_s6 : BIT; -- current_state_s6
|
51 |
|
|
SIGNAL next_state_s7 : BIT; -- next_state_s7
|
52 |
|
|
SIGNAL current_state_s7 : BIT; -- current_state_s7
|
53 |
|
|
SIGNAL current_state_s8 : BIT; -- current_state_s8
|
54 |
|
|
SIGNAL next_state_s9 : BIT; -- next_state_s9
|
55 |
|
|
SIGNAL current_state_s9 : BIT; -- current_state_s9
|
56 |
|
|
SIGNAL next_state_s11 : BIT; -- next_state_s11
|
57 |
|
|
SIGNAL next_state_s12 : BIT; -- next_state_s12
|
58 |
|
|
SIGNAL current_state_s12 : BIT; -- current_state_s12
|
59 |
|
|
SIGNAL aux18 : BIT; -- aux18
|
60 |
|
|
SIGNAL aux19 : BIT; -- aux19
|
61 |
|
|
SIGNAL aux20 : BIT; -- aux20
|
62 |
|
|
SIGNAL aux22 : BIT; -- aux22
|
63 |
|
|
SIGNAL aux25 : BIT; -- aux25
|
64 |
|
|
|
65 |
|
|
BEGIN
|
66 |
|
|
aux25 <= (current_state_s12 or next_state_s11 or (e and current_state_s9));
|
67 |
|
|
aux22 <= (not ((dt_ready and finish)) and current_state_s8);
|
68 |
|
|
aux20 <= (current_state_s9 or current_state_s7 or current_state_s8 or
|
69 |
|
|
current_state_s6 or aux19);
|
70 |
|
|
aux19 <= ((current_state (1) and current_state (3) and current_state (0))
|
71 |
|
|
or (current_state (2) and current_state (3) and current_state
|
72 |
|
|
(0)) or current_state_s12 or aux18);
|
73 |
|
|
aux18 <= ((not (current_state (0)) and not (current_state (3)) and not
|
74 |
|
|
(current_state (1)) and current_state (2)) or (current_state
|
75 |
|
|
(0) and current_state (3) and not (current_state (2)) and not
|
76 |
|
|
(current_state (1))));
|
77 |
|
|
current_state_s12 <= (not (current_state (0)) and not (current_state (3)) and current_state
|
78 |
|
|
(2) and current_state (1));
|
79 |
|
|
next_state_s12 <= ((current_state (1) and current_state (3) and current_state (0))
|
80 |
|
|
or (current_state (2) and current_state (3) and current_state
|
81 |
|
|
(0)));
|
82 |
|
|
next_state_s11 <= (not (e) and current_state_s9);
|
83 |
|
|
current_state_s9 <= (current_state (3) and current_state (2) and current_state (1));
|
84 |
|
|
next_state_s9 <= (dt_ready and finish and current_state_s8);
|
85 |
|
|
current_state_s8 <= (not (current_state (0)) and current_state (3) and not (current_state
|
86 |
|
|
(2)) and not (current_state (1)));
|
87 |
|
|
current_state_s7 <= (not (current_state (2)) and current_state (1) and not (current_state
|
88 |
|
|
(0)) and current_state (3));
|
89 |
|
|
next_state_s7 <= (current_state_s6 or current_state_s4);
|
90 |
|
|
current_state_s6 <= (current_state (0) and not (current_state (3)) and not (current_state
|
91 |
|
|
(2)) and current_state (1));
|
92 |
|
|
current_state_s5 <= (not (current_state (0)) and not (current_state (3)) and not
|
93 |
|
|
(current_state (2)) and current_state (1));
|
94 |
|
|
current_state_s4 <= (current_state (0) and not (current_state (3)) and not (current_state
|
95 |
|
|
(1)) and current_state (2));
|
96 |
|
|
current_state_s3 <= (current_state (0) and not (current_state (3)) and not (current_state
|
97 |
|
|
(2)) and not (current_state (1)));
|
98 |
|
|
current_state_s2 <= (not (current_state (1)) and current_state (2) and not (current_state
|
99 |
|
|
(0)) and current_state (3));
|
100 |
|
|
next_state_s2 <= (not ((not (dt_ready) or not (key_ready) or not (first_dt)))
|
101 |
|
|
and current_state_s1);
|
102 |
|
|
current_state_s1 <= (not (current_state (0)) and not (current_state (3)) and not
|
103 |
|
|
(current_state (2)) and not (current_state (1)));
|
104 |
|
|
aux0 <= (active or (current_state (0) and current_state (2) and current_state
|
105 |
|
|
(1)));
|
106 |
|
|
aux3 <= (current_state_s4 or current_state_s3 or current_state_s2 or
|
107 |
|
|
current_state_s1 or aux0);
|
108 |
|
|
aux5 <= (not (active) and (current_state_s2 or (current_state (0) and
|
109 |
|
|
current_state (2) and current_state (1)) or current_state_s4
|
110 |
|
|
or current_state_s3 or current_state_s1 or current_state_s5
|
111 |
|
|
or aux20));
|
112 |
|
|
aux6 <= (not (active) and (current_state_s9 or next_state_s9 or next_state_s2));
|
113 |
|
|
aux7 <= (not (first_dt) and key_ready and dt_ready and current_state_s1);
|
114 |
|
|
label0 : BLOCK ((not (clk) and not (clk'STABLE)) = '1')
|
115 |
|
|
BEGIN
|
116 |
|
|
current_state (3) <= GUARDED (not (active) and (current_state_s7 or next_state_s9 or next_state_s7
|
117 |
|
|
or next_state_s2 or aux22 or aux25));
|
118 |
|
|
END BLOCK label0;
|
119 |
|
|
label1 : BLOCK ((not (clk) and not (clk'STABLE)) = '1')
|
120 |
|
|
BEGIN
|
121 |
|
|
current_state (2) <= GUARDED (active or current_state_s3 or next_state_s12 or (e and current_state_s9)
|
122 |
|
|
or next_state_s9 or next_state_s2 or aux18);
|
123 |
|
|
END BLOCK label1;
|
124 |
|
|
label2 : BLOCK ((not (clk) and not (clk'STABLE)) = '1')
|
125 |
|
|
BEGIN
|
126 |
|
|
current_state (1) <= GUARDED (active or current_state_s5 or next_state_s12 or next_state_s11
|
127 |
|
|
or next_state_s9 or next_state_s7 or aux7);
|
128 |
|
|
END BLOCK label2;
|
129 |
|
|
label3 : BLOCK ((not (clk) and not (clk'STABLE)) = '1')
|
130 |
|
|
BEGIN
|
131 |
|
|
current_state (0) <= GUARDED (active or current_state_s2 or current_state_s5 or current_state_s3
|
132 |
|
|
or aux25);
|
133 |
|
|
END BLOCK label3;
|
134 |
|
|
|
135 |
|
|
first_dt <= (current_state_s5 or current_state_s1 or aux0);
|
136 |
|
|
|
137 |
|
|
e_mesin <= (current_state_s5 or aux3 or aux20);
|
138 |
|
|
|
139 |
|
|
s_mesin <= ((not (active) and aux22) or (not (active) and (current_state_s7
|
140 |
|
|
or next_state_s7)));
|
141 |
|
|
|
142 |
|
|
s_gen_key <= aux5;
|
143 |
|
|
|
144 |
|
|
emp_buf <= aux6;
|
145 |
|
|
|
146 |
|
|
cp_ready <= (not (active) and current_state_s12);
|
147 |
|
|
|
148 |
|
|
cke_b_mode <= aux5;
|
149 |
|
|
|
150 |
|
|
en_in <= aux6;
|
151 |
|
|
|
152 |
|
|
en_iv <= (not (active) and (current_state_s2 or aux7));
|
153 |
|
|
|
154 |
|
|
en_rcbc <= '0';
|
155 |
|
|
|
156 |
|
|
en_out <= (not (active) and next_state_s12);
|
157 |
|
|
|
158 |
|
|
sel1 (1) <= (current_state_s7 or current_state_s8 or current_state_s6 or
|
159 |
|
|
current_state_s5 or current_state_s4 or current_state_s3 or
|
160 |
|
|
aux0 or ((not (dt_ready) or not (key_ready) or not (first_dt))
|
161 |
|
|
and current_state_s1) or aux19);
|
162 |
|
|
|
163 |
|
|
sel1 (0) <= ((not (active) and next_state_s11) or (not (active) and (current_state_s2
|
164 |
|
|
or next_state_s2)));
|
165 |
|
|
|
166 |
|
|
sel2 (1) <= (current_state_s4 or current_state_s2 or current_state_s1 or
|
167 |
|
|
aux0 or aux20);
|
168 |
|
|
|
169 |
|
|
sel2 (0) <= (not (active) and (current_state_s5 or current_state_s3));
|
170 |
|
|
|
171 |
|
|
sel3 (1) <= (current_state_s6 or aux19 or aux3);
|
172 |
|
|
|
173 |
|
|
sel3 (0) <= (not (active) and (current_state_s9 or current_state_s7 or current_state_s8
|
174 |
|
|
or current_state_s5));
|
175 |
|
|
END;
|