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

Subversion Repositories idea

[/] [idea/] [trunk/] [behavioral/] [main control/] [cfb.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 `cfb`
2
--              date : Sat Sep  1 20:21:49 2001
3
 
4
 
5
-- Entity Declaration
6
 
7
ENTITY cfb 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
  e : in BIT;   -- e
15
  first_dt : inout BIT; -- first_dt
16
  e_mesin : out BIT;    -- e_mesin
17
  s_mesin : out BIT;    -- s_mesin
18
  s_gen_key : out BIT;  -- s_gen_key
19
  emp_buf : out BIT;    -- emp_buf
20
  cp_ready : out BIT;   -- cp_ready
21
  cke_b_mode : out BIT; -- cke_b_mode
22
  en_in : out BIT;      -- en_in
23
  en_iv : out BIT;      -- en_iv
24
  en_rcbc : out BIT;    -- en_rcbc
25
  en_out : out BIT;     -- en_out
26
  sel1 : out bit_vector(1 DOWNTO 0) ;   -- sel1
27
  sel2 : out bit_vector(1 DOWNTO 0) ;   -- sel2
28
  sel3 : out bit_vector(1 DOWNTO 0) ;   -- sel3
29
  vdd : in BIT; -- vdd
30
  vss : in BIT  -- vss
31
  );
32
END cfb;
33
 
34
 
35
-- Architecture Declaration
36
 
37
ARCHITECTURE VBE OF cfb IS
38
  SIGNAL current_state : REG_VECTOR(3 DOWNTO 0) REGISTER;       -- current_state
39
  SIGNAL current_state_s14 : BIT;               -- current_state_s14
40
  SIGNAL next_state_s14 : BIT;          -- next_state_s14
41
  SIGNAL current_state_s13 : BIT;               -- current_state_s13
42
  SIGNAL next_state_s13 : BIT;          -- next_state_s13
43
  SIGNAL current_state_s12 : BIT;               -- current_state_s12
44
  SIGNAL next_state_s12 : BIT;          -- next_state_s12
45
  SIGNAL current_state_s11 : BIT;               -- current_state_s11
46
  SIGNAL next_state_s11 : BIT;          -- next_state_s11
47
  SIGNAL current_state_s10 : BIT;               -- current_state_s10
48
  SIGNAL next_state_s10 : BIT;          -- next_state_s10
49
  SIGNAL current_state_s9 : BIT;                -- current_state_s9
50
  SIGNAL next_state_s9 : BIT;           -- next_state_s9
51
  SIGNAL current_state_s8 : BIT;                -- current_state_s8
52
  SIGNAL next_state_s8 : BIT;           -- next_state_s8
53
  SIGNAL current_state_s7 : BIT;                -- current_state_s7
54
  SIGNAL next_state_s7 : BIT;           -- next_state_s7
55
  SIGNAL current_state_s6 : BIT;                -- current_state_s6
56
  SIGNAL next_state_s6 : BIT;           -- next_state_s6
57
  SIGNAL current_state_s5 : BIT;                -- current_state_s5
58
  SIGNAL next_state_s5 : BIT;           -- next_state_s5
59
  SIGNAL current_state_s4 : BIT;                -- current_state_s4
60
  SIGNAL next_state_s4 : BIT;           -- next_state_s4
61
  SIGNAL current_state_s3 : BIT;                -- current_state_s3
62
  SIGNAL next_state_s3 : BIT;           -- next_state_s3
63
  SIGNAL current_state_s2 : BIT;                -- current_state_s2
64
  SIGNAL next_state_s2 : BIT;           -- next_state_s2
65
  SIGNAL current_state_s1 : BIT;                -- current_state_s1
66
  SIGNAL next_state_s1 : BIT;           -- next_state_s1
67
  SIGNAL current_state_s0 : BIT;                -- current_state_s0
68
  SIGNAL next_state_s0 : BIT;           -- next_state_s0
69
  SIGNAL next_state : BIT_VECTOR(3 DOWNTO 0);   -- next_state
70
 
71
BEGIN
72
  next_state(0) <= (next_state_s0 OR next_state_s3 OR next_state_s4
73
OR next_state_s6 OR next_state_s10 OR
74
next_state_s11 OR next_state_s13);
75
  next_state(1) <= (next_state_s0 OR next_state_s5 OR next_state_s6
76
OR next_state_s7 OR next_state_s9 OR next_state_s11
77
 OR next_state_s12);
78
  next_state(2) <= (next_state_s0 OR next_state_s2 OR next_state_s4
79
OR next_state_s9 OR next_state_s10 OR
80
next_state_s12 OR next_state_s14);
81
  next_state(3) <= (next_state_s2 OR next_state_s7 OR next_state_s8
82
OR next_state_s9 OR next_state_s10 OR
83
next_state_s11 OR next_state_s13);
84
  next_state_s0 <= '0';
85
  current_state_s0 <= (current_state(2) AND current_state(1) AND
86
current_state(0));
87
  next_state_s1 <= (current_state_s0 OR (current_state_s1 AND (NOT(
88
dt_ready) OR NOT(key_ready))));
89
  current_state_s1 <= (NOT(current_state(3)) AND NOT(current_state(2))
90
AND NOT(current_state(1)) AND NOT(current_state(0)));
91
  next_state_s2 <= (current_state_s1 AND first_dt AND dt_ready AND
92
key_ready);
93
  current_state_s2 <= (current_state(3) AND current_state(2) AND NOT(
94
current_state(1)) AND NOT(current_state(0)));
95
  next_state_s3 <= current_state_s2;
96
  current_state_s3 <= (NOT(current_state(3)) AND NOT(current_state(2))
97
AND NOT(current_state(1)) AND current_state(0));
98
  next_state_s4 <= current_state_s3;
99
  current_state_s4 <= (NOT(current_state(3)) AND current_state(2) AND
100
NOT(current_state(1)) AND current_state(0));
101
  next_state_s5 <= (current_state_s1 AND NOT(first_dt) AND dt_ready
102
AND key_ready);
103
  current_state_s5 <= (NOT(current_state(3)) AND NOT(current_state(2))
104
AND current_state(1) AND NOT(current_state(0)));
105
  next_state_s6 <= current_state_s5;
106
  current_state_s6 <= (NOT(current_state(3)) AND NOT(current_state(2))
107
AND current_state(1) AND current_state(0));
108
  next_state_s7 <= (current_state_s4 OR current_state_s6);
109
  current_state_s7 <= (current_state(3) AND NOT(current_state(2)) AND
110
current_state(1) AND NOT(current_state(0)));
111
  next_state_s8 <= (current_state_s7 OR (current_state_s8 AND (NOT(
112
dt_ready) OR NOT(finish))));
113
  current_state_s8 <= (current_state(3) AND NOT(current_state(2)) AND
114
NOT(current_state(1)) AND NOT(current_state(0)));
115
  next_state_s9 <= (current_state_s8 AND dt_ready AND finish);
116
  current_state_s9 <= (current_state(3) AND current_state(2) AND
117
current_state(1));
118
  next_state_s10 <= (current_state_s9 AND e);
119
  current_state_s10 <= (current_state(3) AND current_state(2) AND
120
current_state(0));
121
  next_state_s11 <= (current_state_s9 AND NOT(e));
122
  current_state_s11 <= (current_state(3) AND current_state(1) AND
123
current_state(0));
124
  next_state_s12 <= (current_state_s10 OR current_state_s11);
125
  current_state_s12 <= (NOT(current_state(3)) AND current_state(2) AND
126
current_state(1) AND NOT(current_state(0)));
127
  next_state_s13 <= current_state_s12;
128
  current_state_s13 <= (current_state(3) AND NOT(current_state(2)) AND
129
NOT(current_state(1)) AND current_state(0));
130
  next_state_s14 <= (current_state_s13 OR current_state_s14);
131
  current_state_s14 <= (NOT(current_state(3)) AND current_state(2) AND
132
NOT(current_state(1)) AND NOT(current_state(0)));
133
  label0 : BLOCK ((NOT((clk'STABLE)) AND NOT(clk)) = '1')
134
  BEGIN
135
    current_state(0) <= GUARDED (next_state(0) OR active);
136
  END BLOCK label0;
137
  label1 : BLOCK ((NOT((clk'STABLE)) AND NOT(clk)) = '1')
138
  BEGIN
139
    current_state(1) <= GUARDED (next_state(1) OR active);
140
  END BLOCK label1;
141
  label2 : BLOCK ((NOT((clk'STABLE)) AND NOT(clk)) = '1')
142
  BEGIN
143
    current_state(2) <= GUARDED (next_state(2) OR active);
144
  END BLOCK label2;
145
  label3 : BLOCK ((NOT((clk'STABLE)) AND NOT(clk)) = '1')
146
  BEGIN
147
    current_state(3) <= GUARDED (next_state(3) AND NOT(active));
148
  END BLOCK label3;
149
 
150
sel3(0) <= ((current_state_s5 AND NOT(active)) OR (
151
current_state_s7 AND NOT(active)) OR (current_state_s8 AND NOT(
152
active)) OR (current_state_s9 AND NOT(active)));
153
 
154
sel3(1) <= (active OR (current_state_s0 AND NOT(active)) OR
155
(current_state_s1 AND NOT(active)) OR (
156
current_state_s2 AND NOT(active)) OR (current_state_s3 AND NOT(
157
active)) OR (current_state_s4 AND NOT(active)) OR (
158
current_state_s6 AND NOT(active)) OR (current_state_s10 AND NOT(
159
active)) OR (current_state_s11 AND NOT(active)) OR (
160
current_state_s12 AND NOT(active)) OR (current_state_s13 AND NOT(
161
active)) OR (current_state_s14 AND NOT(active)));
162
 
163
sel2(0) <= ((current_state_s3 AND NOT(active)) OR (
164
current_state_s5 AND NOT(active)));
165
 
166
sel2(1) <= (active OR (current_state_s0 AND NOT(active)) OR
167
(current_state_s1 AND NOT(active)) OR (
168
current_state_s2 AND NOT(active)) OR (current_state_s4 AND NOT(
169
active)) OR (current_state_s6 AND NOT(active)) OR (
170
current_state_s7 AND NOT(active)) OR (current_state_s8 AND NOT(
171
active)) OR (current_state_s9 AND NOT(active)) OR (
172
current_state_s10 AND NOT(active)) OR (current_state_s11 AND NOT(
173
active)) OR (current_state_s12 AND NOT(active)) OR (
174
current_state_s13 AND NOT(active)) OR (current_state_s14 AND NOT(
175
active)));
176
 
177
sel1(0) <= ((current_state_s1 AND first_dt AND dt_ready AND
178
key_ready AND NOT(active)) OR (current_state_s2 AND NOT(
179
active)) OR (current_state_s9 AND NOT(e) AND NOT(active
180
)));
181
 
182
sel1(1) <= (active OR (current_state_s0 AND NOT(active)) OR
183
(current_state_s1 AND (NOT(first_dt) OR NOT(
184
dt_ready) OR NOT(key_ready)) AND NOT(active)) OR (
185
current_state_s3 AND NOT(active)) OR (current_state_s4 AND NOT(
186
active)) OR (current_state_s5 AND NOT(active)) OR (
187
current_state_s6 AND NOT(active)) OR (current_state_s7 AND NOT(
188
active)) OR (current_state_s8 AND NOT(active)) OR (
189
current_state_s10 AND NOT(active)) OR (current_state_s11 AND NOT(
190
active)) OR (current_state_s12 AND NOT(active)) OR (
191
current_state_s13 AND NOT(active)) OR (current_state_s14 AND NOT(
192
active)));
193
 
194
en_out <= ((current_state_s10 AND NOT(active)) OR (
195
current_state_s11 AND NOT(active)));
196
 
197
en_rcbc <= '0';
198
 
199
en_iv <= ((current_state_s1 AND NOT(first_dt) AND dt_ready
200
 AND key_ready AND NOT(active)) OR (
201
current_state_s2 AND NOT(active)));
202
 
203
en_in <= ((current_state_s1 AND first_dt AND dt_ready AND
204
key_ready AND NOT(active)) OR (current_state_s8 AND
205
dt_ready AND finish AND NOT(active)) OR (current_state_s9
206
 AND NOT(active)));
207
 
208
cke_b_mode <= ((current_state_s0 AND NOT(active)) OR (
209
current_state_s1 AND NOT(active)) OR (current_state_s2 AND NOT(
210
active)) OR (current_state_s3 AND NOT(active)) OR (
211
current_state_s4 AND NOT(active)) OR (current_state_s5 AND NOT(
212
active)) OR (current_state_s6 AND NOT(active)) OR (
213
current_state_s7 AND NOT(active)) OR (current_state_s8 AND NOT(
214
active)) OR (current_state_s9 AND NOT(active)) OR (
215
current_state_s10 AND NOT(active)) OR (current_state_s11 AND NOT(
216
active)) OR (current_state_s12 AND NOT(active)) OR (
217
current_state_s13 AND NOT(active)) OR (current_state_s14 AND NOT(
218
active)));
219
 
220
cp_ready <= (current_state_s12 AND NOT(active));
221
 
222
emp_buf <= ((current_state_s1 AND first_dt AND dt_ready AND
223
key_ready AND NOT(active)) OR (current_state_s8 AND
224
dt_ready AND finish AND NOT(active)) OR (current_state_s9
225
 AND NOT(active)));
226
 
227
s_gen_key <= ((current_state_s0 AND NOT(active)) OR (
228
current_state_s1 AND NOT(active)) OR (current_state_s2 AND NOT(
229
active)) OR (current_state_s3 AND NOT(active)) OR (
230
current_state_s4 AND NOT(active)) OR (current_state_s5 AND NOT(
231
active)) OR (current_state_s6 AND NOT(active)) OR (
232
current_state_s7 AND NOT(active)) OR (current_state_s8 AND NOT(
233
active)) OR (current_state_s9 AND NOT(active)) OR (
234
current_state_s10 AND NOT(active)) OR (current_state_s11 AND NOT(
235
active)) OR (current_state_s12 AND NOT(active)) OR (
236
current_state_s13 AND NOT(active)) OR (current_state_s14 AND NOT(
237
active)));
238
 
239
s_mesin <= ((current_state_s4 AND NOT(active)) OR (
240
current_state_s6 AND NOT(active)) OR (current_state_s7 AND NOT(
241
active)) OR (current_state_s8 AND (NOT(dt_ready) OR NOT
242
(finish)) AND NOT(active)));
243
 
244
e_mesin <= (active OR (current_state_s0 AND NOT(active)) OR
245
(current_state_s1 AND NOT(active)) OR (
246
current_state_s2 AND NOT(active)) OR (current_state_s3 AND NOT(
247
active)) OR (current_state_s4 AND NOT(active)) OR (
248
current_state_s5 AND NOT(active)) OR (current_state_s6 AND NOT(
249
active)) OR (current_state_s7 AND NOT(active)) OR (
250
current_state_s8 AND NOT(active)) OR (current_state_s9 AND NOT(
251
active)) OR (current_state_s10 AND NOT(active)) OR (
252
current_state_s11 AND NOT(active)) OR (current_state_s12 AND NOT(
253
active)) OR (current_state_s13 AND NOT(active)) OR (
254
current_state_s14 AND NOT(active)));
255
 
256
first_dt <= (active OR (current_state_s0 AND NOT(active)) OR
257
(current_state_s1 AND NOT(active)) OR (
258
current_state_s5 AND NOT(active)));
259
END;

powered by: WebSVN 2.1.0

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