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

Subversion Repositories mkjpeg

[/] [mkjpeg/] [trunk/] [design/] [huffman/] [AC_CR_ROM.vhd] - Blame information for rev 36

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 36 mikel262
-------------------------------------------------------------------------------
2
-- File Name :  AC_CR_ROM.vhd
3
--
4
-- Project   : JPEG_ENC
5
--
6
-- Module    : AC_CR_ROM
7
--
8
-- Content   : AC_CR_ROM Chrominance
9
--
10
-- Description : 
11
--
12
-- Spec.     : 
13
--
14
-- Author    : Michal Krepa
15
--
16
-------------------------------------------------------------------------------
17
-- History :
18
-- 20090329: (MK): Initial Creation.
19
-------------------------------------------------------------------------------
20
 
21
-------------------------------------------------------------------------------
22
-------------------------------------------------------------------------------
23
----------------------------------- LIBRARY/PACKAGE ---------------------------
24
-------------------------------------------------------------------------------
25
-------------------------------------------------------------------------------
26
 
27
-------------------------------------------------------------------------------
28
-- generic packages/libraries:
29
-------------------------------------------------------------------------------
30
library ieee;
31
  use ieee.std_logic_1164.all;
32
  use ieee.numeric_std.all;
33
 
34
-------------------------------------------------------------------------------
35
-- user packages/libraries:
36
-------------------------------------------------------------------------------
37
 
38
-------------------------------------------------------------------------------
39
-------------------------------------------------------------------------------
40
----------------------------------- ENTITY ------------------------------------
41
-------------------------------------------------------------------------------
42
-------------------------------------------------------------------------------
43
entity AC_CR_ROM is
44
  port
45
  (
46
        CLK                : in  std_logic;
47
        RST                : in  std_logic;
48
        runlength          : in  std_logic_vector(3 downto 0);
49
        VLI_size           : in  std_logic_vector(3 downto 0);
50
 
51
        VLC_AC_size        : out unsigned(4 downto 0);
52
        VLC_AC             : out unsigned(15 downto 0)
53
    );
54
end entity AC_CR_ROM;
55
 
56
-------------------------------------------------------------------------------
57
-------------------------------------------------------------------------------
58
----------------------------------- ARCHITECTURE ------------------------------
59
-------------------------------------------------------------------------------
60
-------------------------------------------------------------------------------
61
architecture RTL of AC_CR_ROM is
62
 
63
  signal rom_addr : std_logic_vector(7 downto 0);
64
 
65
-------------------------------------------------------------------------------
66
-- Architecture: begin
67
-------------------------------------------------------------------------------
68
begin
69
 
70
  rom_addr <= runlength & VLI_size;
71
 
72
  -------------------------------------------------------------------
73
  -- AC-ROM
74
  -------------------------------------------------------------------
75
  p_AC_CR_ROM : process(CLK, RST)
76
  begin
77
    if RST = '1' then
78
      VLC_AC_size <= (others => '0');
79
      VLC_AC      <= (others => '0');
80
    elsif CLK'event and CLK = '1' then
81
      case runlength is
82
        when X"0" =>
83
 
84
          case VLI_size is
85
            when X"0" =>
86
              VLC_AC_size <= to_unsigned(2, VLC_AC_size'length);
87
              VLC_AC      <= resize("00", VLC_AC'length);
88
            when X"1" =>
89
              VLC_AC_size <= to_unsigned(2, VLC_AC_size'length);
90
              VLC_AC      <= resize("01", VLC_AC'length);
91
            when X"2" =>
92
              VLC_AC_size <= to_unsigned(3, VLC_AC_size'length);
93
              VLC_AC      <= resize("100", VLC_AC'length);
94
            when X"3" =>
95
              VLC_AC_size <= to_unsigned(4, VLC_AC_size'length);
96
              VLC_AC      <= resize("1010", VLC_AC'length);
97
            when X"4" =>
98
              VLC_AC_size <= to_unsigned(5, VLC_AC_size'length);
99
              VLC_AC      <= resize("11000", VLC_AC'length);
100
            when X"5" =>
101
              VLC_AC_size <= to_unsigned(5, VLC_AC_size'length);
102
              VLC_AC      <= resize("11001", VLC_AC'length);
103
            when X"6" =>
104
              VLC_AC_size <= to_unsigned(6, VLC_AC_size'length);
105
              VLC_AC      <= resize("111000", VLC_AC'length);
106
            when X"7" =>
107
              VLC_AC_size <= to_unsigned(7, VLC_AC_size'length);
108
              VLC_AC      <= resize("1111000", VLC_AC'length);
109
            when X"8" =>
110
              VLC_AC_size <= to_unsigned(9, VLC_AC_size'length);
111
              VLC_AC      <= resize("111110100", VLC_AC'length);
112
            when X"9" =>
113
              VLC_AC_size <= to_unsigned(10, VLC_AC_size'length);
114
              VLC_AC      <= resize("1111110110", VLC_AC'length);
115
            when X"A" =>
116
              VLC_AC_size <= to_unsigned(12, VLC_AC_size'length);
117
              VLC_AC      <= resize("111111110100", VLC_AC'length);
118
            when others =>
119
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
120
              VLC_AC      <= resize("0", VLC_AC'length);
121
          end case;
122
 
123
        when X"1" =>
124
 
125
          case VLI_size is
126
            when X"1" =>
127
              VLC_AC_size <= to_unsigned(4, VLC_AC_size'length);
128
              VLC_AC      <= resize("1011", VLC_AC'length);
129
            when X"2" =>
130
              VLC_AC_size <= to_unsigned(6, VLC_AC_size'length);
131
              VLC_AC      <= resize("111001", VLC_AC'length);
132
            when X"3" =>
133
              VLC_AC_size <= to_unsigned(8, VLC_AC_size'length);
134
              VLC_AC      <= resize("11110110", VLC_AC'length);
135
            when X"4" =>
136
              VLC_AC_size <= to_unsigned(9, VLC_AC_size'length);
137
              VLC_AC      <= resize("111110101", VLC_AC'length);
138
            when X"5" =>
139
              VLC_AC_size <= to_unsigned(11, VLC_AC_size'length);
140
              VLC_AC      <= resize("11111110110", VLC_AC'length);
141
            when X"6" =>
142
              VLC_AC_size <= to_unsigned(12, VLC_AC_size'length);
143
              VLC_AC      <= resize("111111110101", VLC_AC'length);
144
            when X"7" =>
145
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
146
              VLC_AC      <= resize("1111111110001000", VLC_AC'length);
147
            when X"8" =>
148
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
149
              VLC_AC      <= resize("1111111110001001", VLC_AC'length);
150
            when X"9" =>
151
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
152
              VLC_AC      <= resize("1111111110001010", VLC_AC'length);
153
            when X"A" =>
154
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
155
              VLC_AC      <= resize("1111111110001011", VLC_AC'length);
156
            when others =>
157
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
158
              VLC_AC      <= resize("0", VLC_AC'length);
159
          end case;
160
 
161
        when X"2" =>
162
 
163
          case VLI_size is
164
            when X"1" =>
165
              VLC_AC_size <= to_unsigned(5, VLC_AC_size'length);
166
              VLC_AC      <= resize("11010", VLC_AC'length);
167
            when X"2" =>
168
              VLC_AC_size <= to_unsigned(8, VLC_AC_size'length);
169
              VLC_AC      <= resize("11110111", VLC_AC'length);
170
            when X"3" =>
171
              VLC_AC_size <= to_unsigned(10, VLC_AC_size'length);
172
              VLC_AC      <= resize("1111110111", VLC_AC'length);
173
            when X"4" =>
174
              VLC_AC_size <= to_unsigned(12, VLC_AC_size'length);
175
              VLC_AC      <= resize("111111110110", VLC_AC'length);
176
            when X"5" =>
177
              VLC_AC_size <= to_unsigned(15, VLC_AC_size'length);
178
              VLC_AC      <= resize("111111111000010", VLC_AC'length);
179
            when X"6" =>
180
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
181
              VLC_AC      <= resize("1111111110001100", VLC_AC'length);
182
            when X"7" =>
183
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
184
              VLC_AC      <= resize("1111111110001101", VLC_AC'length);
185
            when X"8" =>
186
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
187
              VLC_AC      <= resize("1111111110001110", VLC_AC'length);
188
            when X"9" =>
189
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
190
              VLC_AC      <= resize("1111111110001111", VLC_AC'length);
191
            when X"A" =>
192
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
193
              VLC_AC      <= resize("1111111110010000", VLC_AC'length);
194
            when others =>
195
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
196
              VLC_AC      <= resize("0", VLC_AC'length);
197
          end case;
198
 
199
        when X"3" =>
200
 
201
          case VLI_size is
202
            when X"1" =>
203
              VLC_AC_size <= to_unsigned(5, VLC_AC_size'length);
204
              VLC_AC      <= resize("11011", VLC_AC'length);
205
            when X"2" =>
206
              VLC_AC_size <= to_unsigned(8, VLC_AC_size'length);
207
              VLC_AC      <= resize("11111000", VLC_AC'length);
208
            when X"3" =>
209
              VLC_AC_size <= to_unsigned(10, VLC_AC_size'length);
210
              VLC_AC      <= resize("1111111000", VLC_AC'length);
211
            when X"4" =>
212
              VLC_AC_size <= to_unsigned(12, VLC_AC_size'length);
213
              VLC_AC      <= resize("111111110111", VLC_AC'length);
214
            when X"5" =>
215
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
216
              VLC_AC      <= resize("1111111110010001", VLC_AC'length);
217
            when X"6" =>
218
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
219
              VLC_AC      <= resize("1111111110010010", VLC_AC'length);
220
            when X"7" =>
221
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
222
              VLC_AC      <= resize("1111111110010011", VLC_AC'length);
223
            when X"8" =>
224
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
225
              VLC_AC      <= resize("1111111110010100", VLC_AC'length);
226
            when X"9" =>
227
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
228
              VLC_AC      <= resize("1111111110010101", VLC_AC'length);
229
            when X"A" =>
230
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
231
              VLC_AC      <= resize("1111111110010110", VLC_AC'length);
232
            when others =>
233
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
234
              VLC_AC      <= resize("0", VLC_AC'length);
235
          end case;
236
 
237
        when X"4" =>
238
 
239
          case VLI_size is
240
            when X"1" =>
241
              VLC_AC_size <= to_unsigned(6, VLC_AC_size'length);
242
              VLC_AC      <= resize("111010", VLC_AC'length);
243
            when X"2" =>
244
              VLC_AC_size <= to_unsigned(9, VLC_AC_size'length);
245
              VLC_AC      <= resize("111110110", VLC_AC'length);
246
            when X"3" =>
247
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
248
              VLC_AC      <= resize("1111111110010111", VLC_AC'length);
249
            when X"4" =>
250
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
251
              VLC_AC      <= resize("1111111110011000", VLC_AC'length);
252
            when X"5" =>
253
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
254
              VLC_AC      <= resize("1111111110011001", VLC_AC'length);
255
            when X"6" =>
256
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
257
              VLC_AC      <= resize("1111111110011010", VLC_AC'length);
258
            when X"7" =>
259
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
260
              VLC_AC      <= resize("1111111110011011", VLC_AC'length);
261
            when X"8" =>
262
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
263
              VLC_AC      <= resize("1111111110011100", VLC_AC'length);
264
            when X"9" =>
265
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
266
              VLC_AC      <= resize("1111111110011101", VLC_AC'length);
267
            when X"A" =>
268
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
269
              VLC_AC      <= resize("1111111110011110", VLC_AC'length);
270
            when others =>
271
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
272
              VLC_AC      <= resize("0", VLC_AC'length);
273
          end case;
274
 
275
        when X"5" =>
276
 
277
          case VLI_size is
278
            when X"1" =>
279
              VLC_AC_size <= to_unsigned(6, VLC_AC_size'length);
280
              VLC_AC      <= resize("111011", VLC_AC'length);
281
            when X"2" =>
282
              VLC_AC_size <= to_unsigned(10, VLC_AC_size'length);
283
              VLC_AC      <= resize("1111111001", VLC_AC'length);
284
            when X"3" =>
285
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
286
              VLC_AC      <= resize("1111111110011111", VLC_AC'length);
287
            when X"4" =>
288
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
289
              VLC_AC      <= resize("1111111110100000", VLC_AC'length);
290
            when X"5" =>
291
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
292
              VLC_AC      <= resize("1111111110100001", VLC_AC'length);
293
            when X"6" =>
294
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
295
              VLC_AC      <= resize("1111111110100010", VLC_AC'length);
296
            when X"7" =>
297
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
298
              VLC_AC      <= resize("1111111110100011", VLC_AC'length);
299
            when X"8" =>
300
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
301
              VLC_AC      <= resize("1111111110100100", VLC_AC'length);
302
            when X"9" =>
303
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
304
              VLC_AC      <= resize("1111111110100101", VLC_AC'length);
305
            when X"A" =>
306
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
307
              VLC_AC      <= resize("1111111110100110", VLC_AC'length);
308
            when others =>
309
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
310
              VLC_AC      <= resize("0", VLC_AC'length);
311
          end case;
312
 
313
        when X"6" =>
314
 
315
          case VLI_size is
316
            when X"1" =>
317
              VLC_AC_size <= to_unsigned(7, VLC_AC_size'length);
318
              VLC_AC      <= resize("1111001", VLC_AC'length);
319
            when X"2" =>
320
              VLC_AC_size <= to_unsigned(11, VLC_AC_size'length);
321
              VLC_AC      <= resize("11111110111", VLC_AC'length);
322
            when X"3" =>
323
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
324
              VLC_AC      <= resize("1111111110100111", VLC_AC'length);
325
            when X"4" =>
326
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
327
              VLC_AC      <= resize("1111111110101000", VLC_AC'length);
328
            when X"5" =>
329
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
330
              VLC_AC      <= resize("1111111110101001", VLC_AC'length);
331
            when X"6" =>
332
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
333
              VLC_AC      <= resize("1111111110101010", VLC_AC'length);
334
            when X"7" =>
335
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
336
              VLC_AC      <= resize("1111111110101011", VLC_AC'length);
337
            when X"8" =>
338
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
339
              VLC_AC      <= resize("1111111110101100", VLC_AC'length);
340
            when X"9" =>
341
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
342
              VLC_AC      <= resize("1111111110101101", VLC_AC'length);
343
            when X"A" =>
344
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
345
              VLC_AC      <= resize("1111111110101110", VLC_AC'length);
346
            when others =>
347
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
348
              VLC_AC      <= resize("0", VLC_AC'length);
349
          end case;
350
 
351
        when X"7" =>
352
 
353
          case VLI_size is
354
            when X"1" =>
355
              VLC_AC_size <= to_unsigned(7, VLC_AC_size'length);
356
              VLC_AC      <= resize("1111010", VLC_AC'length);
357
            when X"2" =>
358
              VLC_AC_size <= to_unsigned(11, VLC_AC_size'length);
359
              VLC_AC      <= resize("11111111000", VLC_AC'length);
360
            when X"3" =>
361
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
362
              VLC_AC      <= resize("1111111110101111", VLC_AC'length);
363
            when X"4" =>
364
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
365
              VLC_AC      <= resize("1111111110110000", VLC_AC'length);
366
            when X"5" =>
367
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
368
              VLC_AC      <= resize("1111111110110001", VLC_AC'length);
369
            when X"6" =>
370
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
371
              VLC_AC      <= resize("1111111110110010", VLC_AC'length);
372
            when X"7" =>
373
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
374
              VLC_AC      <= resize("1111111110110011", VLC_AC'length);
375
            when X"8" =>
376
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
377
              VLC_AC      <= resize("1111111110110100", VLC_AC'length);
378
            when X"9" =>
379
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
380
              VLC_AC      <= resize("1111111110110101", VLC_AC'length);
381
            when X"A" =>
382
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
383
              VLC_AC      <= resize("1111111110110110", VLC_AC'length);
384
            when others =>
385
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
386
              VLC_AC      <= resize("0", VLC_AC'length);
387
          end case;
388
 
389
        when X"8" =>
390
 
391
          case VLI_size is
392
            when X"1" =>
393
              VLC_AC_size <= to_unsigned(8, VLC_AC_size'length);
394
              VLC_AC      <= resize("11111001", VLC_AC'length);
395
            when X"2" =>
396
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
397
              VLC_AC      <= resize("1111111110110111", VLC_AC'length);
398
            when X"3" =>
399
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
400
              VLC_AC      <= resize("1111111110111000", VLC_AC'length);
401
            when X"4" =>
402
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
403
              VLC_AC      <= resize("1111111110111001", VLC_AC'length);
404
            when X"5" =>
405
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
406
              VLC_AC      <= resize("1111111110111010", VLC_AC'length);
407
            when X"6" =>
408
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
409
              VLC_AC      <= resize("1111111110111011", VLC_AC'length);
410
            when X"7" =>
411
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
412
              VLC_AC      <= resize("1111111110111100", VLC_AC'length);
413
            when X"8" =>
414
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
415
              VLC_AC      <= resize("1111111110111101", VLC_AC'length);
416
            when X"9" =>
417
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
418
              VLC_AC      <= resize("1111111110111110", VLC_AC'length);
419
            when X"A" =>
420
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
421
              VLC_AC      <= resize("1111111110111111", VLC_AC'length);
422
            when others =>
423
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
424
              VLC_AC      <= resize("0", VLC_AC'length);
425
          end case;
426
 
427
        when X"9" =>
428
 
429
          case VLI_size is
430
            when X"1" =>
431
              VLC_AC_size <= to_unsigned(9, VLC_AC_size'length);
432
              VLC_AC      <= resize("111110111", VLC_AC'length);
433
            when X"2" =>
434
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
435
              VLC_AC      <= resize("1111111111000000", VLC_AC'length);
436
            when X"3" =>
437
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
438
              VLC_AC      <= resize("1111111111000001", VLC_AC'length);
439
            when X"4" =>
440
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
441
              VLC_AC      <= resize("1111111111000010", VLC_AC'length);
442
            when X"5" =>
443
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
444
              VLC_AC      <= resize("1111111111000011", VLC_AC'length);
445
            when X"6" =>
446
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
447
              VLC_AC      <= resize("1111111111000100", VLC_AC'length);
448
            when X"7" =>
449
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
450
              VLC_AC      <= resize("1111111111000101", VLC_AC'length);
451
            when X"8" =>
452
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
453
              VLC_AC      <= resize("1111111111000110", VLC_AC'length);
454
            when X"9" =>
455
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
456
              VLC_AC      <= resize("1111111111000111", VLC_AC'length);
457
            when X"A" =>
458
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
459
              VLC_AC      <= resize("1111111111001000", VLC_AC'length);
460
            when others =>
461
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
462
              VLC_AC      <= resize("0", VLC_AC'length);
463
          end case;
464
 
465
        when X"A" =>
466
 
467
          case VLI_size is
468
            when X"1" =>
469
              VLC_AC_size <= to_unsigned(9, VLC_AC_size'length);
470
              VLC_AC      <= resize("111111000", VLC_AC'length);
471
            when X"2" =>
472
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
473
              VLC_AC      <= resize("1111111111001001", VLC_AC'length);
474
            when X"3" =>
475
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
476
              VLC_AC      <= resize("1111111111001010", VLC_AC'length);
477
            when X"4" =>
478
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
479
              VLC_AC      <= resize("1111111111001011", VLC_AC'length);
480
            when X"5" =>
481
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
482
              VLC_AC      <= resize("1111111111001100", VLC_AC'length);
483
            when X"6" =>
484
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
485
              VLC_AC      <= resize("1111111111001101", VLC_AC'length);
486
            when X"7" =>
487
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
488
              VLC_AC      <= resize("1111111111001110", VLC_AC'length);
489
            when X"8" =>
490
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
491
              VLC_AC      <= resize("1111111111001111", VLC_AC'length);
492
            when X"9" =>
493
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
494
              VLC_AC      <= resize("1111111111010000", VLC_AC'length);
495
            when X"A" =>
496
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
497
              VLC_AC      <= resize("1111111111010001", VLC_AC'length);
498
            when others =>
499
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
500
              VLC_AC      <= resize("0", VLC_AC'length);
501
          end case;
502
 
503
        when X"B" =>
504
 
505
          case VLI_size is
506
            when X"1" =>
507
              VLC_AC_size <= to_unsigned(9, VLC_AC_size'length);
508
              VLC_AC      <= resize("111111001", VLC_AC'length);
509
            when X"2" =>
510
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
511
              VLC_AC      <= resize("1111111111010010", VLC_AC'length);
512
            when X"3" =>
513
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
514
              VLC_AC      <= resize("1111111111010011", VLC_AC'length);
515
            when X"4" =>
516
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
517
              VLC_AC      <= resize("1111111111010100", VLC_AC'length);
518
            when X"5" =>
519
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
520
              VLC_AC      <= resize("1111111111010101", VLC_AC'length);
521
            when X"6" =>
522
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
523
              VLC_AC      <= resize("1111111111010110", VLC_AC'length);
524
            when X"7" =>
525
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
526
              VLC_AC      <= resize("1111111111010111", VLC_AC'length);
527
            when X"8" =>
528
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
529
              VLC_AC      <= resize("1111111111011000", VLC_AC'length);
530
            when X"9" =>
531
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
532
              VLC_AC      <= resize("1111111111011001", VLC_AC'length);
533
            when X"A" =>
534
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
535
              VLC_AC      <= resize("1111111111011010", VLC_AC'length);
536
            when others =>
537
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
538
              VLC_AC      <= resize("0", VLC_AC'length);
539
          end case;
540
 
541
        when X"C" =>
542
 
543
          case VLI_size is
544
            when X"1" =>
545
              VLC_AC_size <= to_unsigned(9, VLC_AC_size'length);
546
              VLC_AC      <= resize("111111010", VLC_AC'length);
547
            when X"2" =>
548
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
549
              VLC_AC      <= resize("1111111111011011", VLC_AC'length);
550
            when X"3" =>
551
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
552
              VLC_AC      <= resize("1111111111011100", VLC_AC'length);
553
            when X"4" =>
554
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
555
              VLC_AC      <= resize("1111111111011101", VLC_AC'length);
556
            when X"5" =>
557
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
558
              VLC_AC      <= resize("1111111111011110", VLC_AC'length);
559
            when X"6" =>
560
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
561
              VLC_AC      <= resize("1111111111011111", VLC_AC'length);
562
            when X"7" =>
563
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
564
              VLC_AC      <= resize("1111111111100000", VLC_AC'length);
565
            when X"8" =>
566
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
567
              VLC_AC      <= resize("1111111111100001", VLC_AC'length);
568
            when X"9" =>
569
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
570
              VLC_AC      <= resize("1111111111100010", VLC_AC'length);
571
            when X"A" =>
572
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
573
              VLC_AC      <= resize("1111111111100011", VLC_AC'length);
574
            when others =>
575
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
576
              VLC_AC      <= resize("0", VLC_AC'length);
577
          end case;
578
 
579
        when X"D" =>
580
 
581
          case VLI_size is
582
            when X"1" =>
583
              VLC_AC_size <= to_unsigned(11, VLC_AC_size'length);
584
              VLC_AC      <= resize("11111111001", VLC_AC'length);
585
            when X"2" =>
586
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
587
              VLC_AC      <= resize("1111111111100100", VLC_AC'length);
588
            when X"3" =>
589
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
590
              VLC_AC      <= resize("1111111111100101", VLC_AC'length);
591
            when X"4" =>
592
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
593
              VLC_AC      <= resize("1111111111100110", VLC_AC'length);
594
            when X"5" =>
595
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
596
              VLC_AC      <= resize("1111111111100111", VLC_AC'length);
597
            when X"6" =>
598
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
599
              VLC_AC      <= resize("1111111111101000", VLC_AC'length);
600
            when X"7" =>
601
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
602
              VLC_AC      <= resize("1111111111101001", VLC_AC'length);
603
            when X"8" =>
604
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
605
              VLC_AC      <= resize("1111111111101010", VLC_AC'length);
606
            when X"9" =>
607
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
608
              VLC_AC      <= resize("1111111111101011", VLC_AC'length);
609
            when X"A" =>
610
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
611
              VLC_AC      <= resize("1111111111101100", VLC_AC'length);
612
            when others =>
613
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
614
              VLC_AC      <= resize("0", VLC_AC'length);
615
          end case;
616
 
617
        when X"E" =>
618
 
619
          case VLI_size is
620
            when X"1" =>
621
              VLC_AC_size <= to_unsigned(14, VLC_AC_size'length);
622
              VLC_AC      <= resize("11111111100000", VLC_AC'length);
623
            when X"2" =>
624
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
625
              VLC_AC      <= resize("1111111111101101", VLC_AC'length);
626
            when X"3" =>
627
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
628
              VLC_AC      <= resize("1111111111101110", VLC_AC'length);
629
            when X"4" =>
630
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
631
              VLC_AC      <= resize("1111111111101111", VLC_AC'length);
632
            when X"5" =>
633
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
634
              VLC_AC      <= resize("1111111111110000", VLC_AC'length);
635
            when X"6" =>
636
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
637
              VLC_AC      <= resize("1111111111110001", VLC_AC'length);
638
            when X"7" =>
639
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
640
              VLC_AC      <= resize("1111111111110010", VLC_AC'length);
641
            when X"8" =>
642
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
643
              VLC_AC      <= resize("1111111111110011", VLC_AC'length);
644
            when X"9" =>
645
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
646
              VLC_AC      <= resize("1111111111110100", VLC_AC'length);
647
            when X"A" =>
648
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
649
              VLC_AC      <= resize("1111111111110101", VLC_AC'length);
650
            when others =>
651
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
652
              VLC_AC      <= resize("0", VLC_AC'length);
653
          end case;
654
 
655
        when X"F" =>
656
 
657
          case VLI_size is
658
            when X"0" =>
659
              VLC_AC_size <= to_unsigned(10, VLC_AC_size'length);
660
              VLC_AC      <= resize("1111111010", VLC_AC'length);
661
            when X"1" =>
662
              VLC_AC_size <= to_unsigned(15, VLC_AC_size'length);
663
              VLC_AC      <= resize("111111111000011", VLC_AC'length);
664
            when X"2" =>
665
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
666
              VLC_AC      <= resize("1111111111110110", VLC_AC'length);
667
            when X"3" =>
668
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
669
              VLC_AC      <= resize("1111111111110111", VLC_AC'length);
670
            when X"4" =>
671
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
672
              VLC_AC      <= resize("1111111111111000", VLC_AC'length);
673
            when X"5" =>
674
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
675
              VLC_AC      <= resize("1111111111111001", VLC_AC'length);
676
            when X"6" =>
677
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
678
              VLC_AC      <= resize("1111111111111010", VLC_AC'length);
679
            when X"7" =>
680
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
681
              VLC_AC      <= resize("1111111111111011", VLC_AC'length);
682
            when X"8" =>
683
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
684
              VLC_AC      <= resize("1111111111111100", VLC_AC'length);
685
            when X"9" =>
686
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
687
              VLC_AC      <= resize("1111111111111101", VLC_AC'length);
688
            when X"A" =>
689
              VLC_AC_size <= to_unsigned(16, VLC_AC_size'length);
690
              VLC_AC      <= resize("1111111111111110", VLC_AC'length);
691
            when others =>
692
              VLC_AC_size <= to_unsigned(0, VLC_AC_size'length);
693
              VLC_AC      <= resize("0", VLC_AC'length);
694
          end case;
695
 
696
        when others =>
697
          VLC_AC_size <= (others => '0');
698
          VLC_AC      <= (others => '0');
699
      end case;
700
    end if;
701
  end process;
702
 
703
 
704
 
705
end architecture RTL;
706
-------------------------------------------------------------------------------
707
-- Architecture: end
708
-------------------------------------------------------------------------------

powered by: WebSVN 2.1.0

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