1 |
6 |
marta |
-- VHDL data flow description generated from `ofb`
|
2 |
|
|
-- date : Sat Sep 1 20:13:14 2001
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
-- Entity Declaration
|
6 |
|
|
|
7 |
|
|
ENTITY ofb IS
|
8 |
|
|
PORT (
|
9 |
|
|
active : in BIT; -- active
|
10 |
|
|
clk : in BIT; -- clk
|
11 |
|
|
key_ready : in BIT; -- key_ready
|
12 |
|
|
dt_ready : in BIT; -- dt_ready
|
13 |
|
|
finish : in BIT; -- finish
|
14 |
|
|
first_dt : inout BIT; -- first_dt
|
15 |
|
|
e_mesin : out BIT; -- e_mesin
|
16 |
|
|
s_mesin : out BIT; -- s_mesin
|
17 |
|
|
emp_buf : out BIT; -- emp_buf
|
18 |
|
|
cp_ready : out BIT; -- cp_ready
|
19 |
|
|
cke_b_mode : out BIT; -- cke_b_mode
|
20 |
|
|
en_in : out BIT; -- en_in
|
21 |
|
|
en_iv : out BIT; -- en_iv
|
22 |
|
|
en_rcbc : out BIT; -- en_rcbc
|
23 |
|
|
en_out : out BIT; -- en_out
|
24 |
|
|
sel1 : out bit_vector(1 DOWNTO 0) ; -- sel1
|
25 |
|
|
sel2 : out bit_vector(1 DOWNTO 0) ; -- sel2
|
26 |
|
|
sel3 : out bit_vector(1 DOWNTO 0) ; -- sel3
|
27 |
|
|
vdd : in BIT; -- vdd
|
28 |
|
|
vss : in BIT -- vss
|
29 |
|
|
);
|
30 |
|
|
END ofb;
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
-- Architecture Declaration
|
34 |
|
|
|
35 |
|
|
ARCHITECTURE VBE OF ofb IS
|
36 |
|
|
SIGNAL current_state : REG_VECTOR(3 DOWNTO 0) REGISTER; -- current_state
|
37 |
|
|
SIGNAL current_state_s13 : BIT; -- current_state_s13
|
38 |
|
|
SIGNAL next_state_s13 : BIT; -- next_state_s13
|
39 |
|
|
SIGNAL current_state_s12 : BIT; -- current_state_s12
|
40 |
|
|
SIGNAL next_state_s12 : BIT; -- next_state_s12
|
41 |
|
|
SIGNAL current_state_s11 : BIT; -- current_state_s11
|
42 |
|
|
SIGNAL next_state_s11 : BIT; -- next_state_s11
|
43 |
|
|
SIGNAL current_state_s10 : BIT; -- current_state_s10
|
44 |
|
|
SIGNAL next_state_s10 : BIT; -- next_state_s10
|
45 |
|
|
SIGNAL current_state_s9 : BIT; -- current_state_s9
|
46 |
|
|
SIGNAL next_state_s9 : BIT; -- next_state_s9
|
47 |
|
|
SIGNAL current_state_s8 : BIT; -- current_state_s8
|
48 |
|
|
SIGNAL next_state_s8 : BIT; -- next_state_s8
|
49 |
|
|
SIGNAL current_state_s7 : BIT; -- current_state_s7
|
50 |
|
|
SIGNAL next_state_s7 : BIT; -- next_state_s7
|
51 |
|
|
SIGNAL current_state_s6 : BIT; -- current_state_s6
|
52 |
|
|
SIGNAL next_state_s6 : BIT; -- next_state_s6
|
53 |
|
|
SIGNAL current_state_s5 : BIT; -- current_state_s5
|
54 |
|
|
SIGNAL next_state_s5 : BIT; -- next_state_s5
|
55 |
|
|
SIGNAL current_state_s4 : BIT; -- current_state_s4
|
56 |
|
|
SIGNAL next_state_s4 : BIT; -- next_state_s4
|
57 |
|
|
SIGNAL current_state_s3 : BIT; -- current_state_s3
|
58 |
|
|
SIGNAL next_state_s3 : BIT; -- next_state_s3
|
59 |
|
|
SIGNAL current_state_s2 : BIT; -- current_state_s2
|
60 |
|
|
SIGNAL next_state_s2 : BIT; -- next_state_s2
|
61 |
|
|
SIGNAL current_state_s1 : BIT; -- current_state_s1
|
62 |
|
|
SIGNAL next_state_s1 : BIT; -- next_state_s1
|
63 |
|
|
SIGNAL current_state_s0 : BIT; -- current_state_s0
|
64 |
|
|
SIGNAL next_state_s0 : BIT; -- next_state_s0
|
65 |
|
|
SIGNAL next_state : BIT_VECTOR(3 DOWNTO 0); -- next_state
|
66 |
|
|
|
67 |
|
|
BEGIN
|
68 |
|
|
next_state(0) <= (next_state_s3 OR next_state_s6 OR next_state_s7
|
69 |
|
|
OR next_state_s9 OR next_state_s10 OR
|
70 |
|
|
next_state_s12 OR next_state_s13);
|
71 |
|
|
next_state(1) <= (next_state_s0 OR next_state_s2 OR next_state_s3
|
72 |
|
|
OR next_state_s10 OR next_state_s11 OR
|
73 |
|
|
next_state_s12 OR next_state_s13);
|
74 |
|
|
next_state(2) <= (next_state_s0 OR next_state_s4 OR next_state_s5
|
75 |
|
|
OR next_state_s6 OR next_state_s9 OR next_state_s10
|
76 |
|
|
OR next_state_s11 OR next_state_s13);
|
77 |
|
|
next_state(3) <= (next_state_s4 OR next_state_s8 OR next_state_s9
|
78 |
|
|
OR next_state_s11 OR next_state_s12 OR
|
79 |
|
|
next_state_s13);
|
80 |
|
|
next_state_s0 <= '0';
|
81 |
|
|
current_state_s0 <= (NOT(current_state(3)) AND current_state(2) AND
|
82 |
|
|
current_state(1) AND NOT(current_state(0)));
|
83 |
|
|
next_state_s1 <= (current_state_s0 OR (current_state_s1 AND (NOT(
|
84 |
|
|
dt_ready) OR NOT(key_ready))));
|
85 |
|
|
current_state_s1 <= (NOT(current_state(3)) AND NOT(current_state(2))
|
86 |
|
|
AND NOT(current_state(1)) AND NOT(current_state(0)));
|
87 |
|
|
next_state_s2 <= (current_state_s1 AND dt_ready AND first_dt AND
|
88 |
|
|
key_ready);
|
89 |
|
|
current_state_s2 <= (NOT(current_state(2)) AND current_state(1) AND
|
90 |
|
|
NOT(current_state(0)));
|
91 |
|
|
next_state_s3 <= current_state_s2;
|
92 |
|
|
current_state_s3 <= (NOT(current_state(3)) AND NOT(current_state(2))
|
93 |
|
|
AND current_state(1) AND current_state(0));
|
94 |
|
|
next_state_s4 <= current_state_s3;
|
95 |
|
|
current_state_s4 <= (current_state(3) AND current_state(2) AND NOT(
|
96 |
|
|
current_state(1)) AND NOT(current_state(0)));
|
97 |
|
|
next_state_s5 <= (current_state_s1 AND dt_ready AND NOT(first_dt)
|
98 |
|
|
AND key_ready);
|
99 |
|
|
current_state_s5 <= (NOT(current_state(3)) AND current_state(2) AND
|
100 |
|
|
NOT(current_state(1)) AND NOT(current_state(0)));
|
101 |
|
|
next_state_s6 <= (current_state_s4 OR current_state_s5);
|
102 |
|
|
current_state_s6 <= (NOT(current_state(3)) AND current_state(2) AND
|
103 |
|
|
NOT(current_state(1)) AND current_state(0));
|
104 |
|
|
next_state_s7 <= (current_state_s6 OR (current_state_s7 AND (NOT(
|
105 |
|
|
dt_ready) OR NOT(finish))));
|
106 |
|
|
current_state_s7 <= (NOT(current_state(2)) AND NOT(current_state(1))
|
107 |
|
|
AND current_state(0));
|
108 |
|
|
next_state_s8 <= (current_state_s7 AND dt_ready AND finish);
|
109 |
|
|
current_state_s8 <= (current_state(3) AND NOT(current_state(2)) AND
|
110 |
|
|
NOT(current_state(1)));
|
111 |
|
|
next_state_s9 <= current_state_s8;
|
112 |
|
|
current_state_s9 <= (current_state(3) AND NOT(current_state(1)) AND
|
113 |
|
|
current_state(0));
|
114 |
|
|
next_state_s10 <= current_state_s9;
|
115 |
|
|
current_state_s10 <= (NOT(current_state(3)) AND current_state(2) AND
|
116 |
|
|
current_state(1) AND current_state(0));
|
117 |
|
|
next_state_s11 <= current_state_s10;
|
118 |
|
|
current_state_s11 <= (current_state(3) AND current_state(1) AND NOT(
|
119 |
|
|
current_state(0)));
|
120 |
|
|
next_state_s12 <= current_state_s11;
|
121 |
|
|
current_state_s12 <= (current_state(3) AND NOT(current_state(2)) AND
|
122 |
|
|
current_state(1));
|
123 |
|
|
next_state_s13 <= (current_state_s12 OR current_state_s13);
|
124 |
|
|
current_state_s13 <= (current_state(3) AND current_state(2) AND
|
125 |
|
|
current_state(1) AND current_state(0));
|
126 |
|
|
label0 : BLOCK ((NOT((clk'STABLE)) AND NOT(clk)) = '1')
|
127 |
|
|
BEGIN
|
128 |
|
|
current_state(0) <= GUARDED (next_state(0) AND NOT(active));
|
129 |
|
|
END BLOCK label0;
|
130 |
|
|
label1 : BLOCK ((NOT((clk'STABLE)) AND NOT(clk)) = '1')
|
131 |
|
|
BEGIN
|
132 |
|
|
current_state(1) <= GUARDED (next_state(1) OR active);
|
133 |
|
|
END BLOCK label1;
|
134 |
|
|
label2 : BLOCK ((NOT((clk'STABLE)) AND NOT(clk)) = '1')
|
135 |
|
|
BEGIN
|
136 |
|
|
current_state(2) <= GUARDED (next_state(2) OR active);
|
137 |
|
|
END BLOCK label2;
|
138 |
|
|
label3 : BLOCK ((NOT((clk'STABLE)) AND NOT(clk)) = '1')
|
139 |
|
|
BEGIN
|
140 |
|
|
current_state(3) <= GUARDED (next_state(3) AND NOT(active));
|
141 |
|
|
END BLOCK label3;
|
142 |
|
|
|
143 |
|
|
sel3(0) <= ((current_state_s1 AND dt_ready AND NOT(first_dt)
|
144 |
|
|
AND key_ready AND NOT(active)) OR (
|
145 |
|
|
current_state_s9 AND NOT(active)) OR (current_state_s10 AND NOT(
|
146 |
|
|
active)) OR (current_state_s11 AND NOT(active)) OR (
|
147 |
|
|
current_state_s12 AND NOT(active)) OR (current_state_s13 AND NOT(
|
148 |
|
|
active)));
|
149 |
|
|
|
150 |
|
|
sel3(1) <= NOT((current_state_s1 AND dt_ready AND NOT(
|
151 |
|
|
first_dt) AND key_ready AND NOT(active)) OR (
|
152 |
|
|
current_state_s9 AND NOT(active)) OR (current_state_s10 AND NOT(
|
153 |
|
|
active)) OR (current_state_s11 AND NOT(active)) OR (
|
154 |
|
|
current_state_s12 AND NOT(active)) OR (current_state_s13 AND NOT(
|
155 |
|
|
active)));
|
156 |
|
|
|
157 |
|
|
sel2(0) <= ((current_state_s1 AND dt_ready AND NOT(first_dt)
|
158 |
|
|
AND key_ready AND NOT(active)) OR (
|
159 |
|
|
current_state_s3 AND NOT(active)));
|
160 |
|
|
|
161 |
|
|
sel2(1) <= NOT((current_state_s1 AND dt_ready AND NOT(
|
162 |
|
|
first_dt) AND key_ready AND NOT(active)) OR (
|
163 |
|
|
current_state_s3 AND NOT(active)));
|
164 |
|
|
|
165 |
|
|
sel1(0) <= ((current_state_s1 AND dt_ready AND first_dt AND
|
166 |
|
|
key_ready AND NOT(active)) OR (current_state_s2 AND NOT(
|
167 |
|
|
active)));
|
168 |
|
|
|
169 |
|
|
sel1(1) <= NOT((current_state_s1 AND dt_ready AND first_dt
|
170 |
|
|
AND key_ready AND NOT(active)) OR (current_state_s2
|
171 |
|
|
AND NOT(active)) OR (current_state_s7 AND dt_ready
|
172 |
|
|
AND finish AND NOT(active)) OR (current_state_s8 AND
|
173 |
|
|
NOT(active)));
|
174 |
|
|
|
175 |
|
|
en_out <= (current_state_s10 AND NOT(active));
|
176 |
|
|
|
177 |
|
|
en_rcbc <= '0';
|
178 |
|
|
|
179 |
|
|
en_iv <= ((current_state_s2 AND NOT(active)) OR (
|
180 |
|
|
current_state_s8 AND NOT(active)));
|
181 |
|
|
|
182 |
|
|
en_in <= ((current_state_s1 AND dt_ready AND first_dt AND
|
183 |
|
|
key_ready AND NOT(active)) OR (current_state_s7 AND
|
184 |
|
|
dt_ready AND finish AND NOT(active)) OR (current_state_s8
|
185 |
|
|
AND NOT(active)));
|
186 |
|
|
|
187 |
|
|
cke_b_mode <= NOT(active);
|
188 |
|
|
|
189 |
|
|
cp_ready <= (current_state_s11 AND NOT(active));
|
190 |
|
|
|
191 |
|
|
emp_buf <= ((current_state_s1 AND dt_ready AND first_dt AND
|
192 |
|
|
key_ready AND NOT(active)) OR (current_state_s7 AND
|
193 |
|
|
dt_ready AND finish AND NOT(active)) OR (current_state_s8
|
194 |
|
|
AND NOT(active)));
|
195 |
|
|
|
196 |
|
|
s_mesin <= ((current_state_s4 AND NOT(active)) OR (
|
197 |
|
|
current_state_s5 AND NOT(active)) OR (current_state_s6 AND NOT(
|
198 |
|
|
active)) OR (current_state_s7 AND (NOT(dt_ready) OR NOT
|
199 |
|
|
(finish)) AND NOT(active)));
|
200 |
|
|
|
201 |
|
|
e_mesin <= '1';
|
202 |
|
|
|
203 |
|
|
first_dt <= (active OR (current_state_s0 AND NOT(active)) OR
|
204 |
|
|
(current_state_s1 AND NOT(active)));
|
205 |
|
|
END;
|