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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [xmatch_sim7/] [src/] [pointer_array.vhd] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 eejlny
--This library is free software; you can redistribute it and/or
2
--modify it under the terms of the GNU Lesser General Public
3
--License as published by the Free Software Foundation; either
4
--version 2.1 of the License, or (at your option) any later version.
5
 
6
--This library is distributed in the hope that it will be useful,
7
--but WITHOUT ANY WARRANTY; without even the implied warranty of
8
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9
--Lesser General Public License for more details.
10
 
11
--You should have received a copy of the GNU Lesser General Public
12
--License along with this library; if not, write to the Free Software
13
--Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
14
 
15
-- e_mail : j.l.nunez-yanez@byacom.co.uk
16
 
17
---------------------------------
18
--  ENTITY       = POINTER_ARRAY   --
19
--  version      = 1.0         --
20
--  last update  = 9/05/00    --
21
--  author       = Jose Nunez  --
22
---------------------------------
23
 
24
 
25
-- FUNCTION
26
-- 16x4 element POINTER array.
27
-- Used only for decompression in the full duplex device
28
 
29
 
30
--  PIN LIST
31
--  PREVIOUS  = input to load pointer in the pointer array
32
--  MOVE      = movement control
33
--  SEL_WRITE  = selection of address to write in RAM. To the top of the pointer array
34
--  SEL_READ = selection of address to read in RAM
35
--  CLK       = master clock
36
--  CLEAR     = asynchronous reset of the data latch (active LOW)
37
--  WRITE_ADDRESS = address to write in RAM 
38
--  READ_ADDRESS = address to read in RAM
39
 
40
 
41
library ieee,dzx;
42
use ieee.std_logic_1164.all;
43
use ieee.std_logic_arith.all;
44
use dzx.bit_utils.all;
45
use dzx.attributes.all;
46
 
47
entity POINTER_ARRAY is
48
port
49
(
50
 
51
        PREVIOUS : in bit_vector(3 downto 0);
52
        MOVE : in bit_vector(15 downto 1);
53
        MOVE_ENABLE : in bit;
54
        SEL_WRITE : in bit_vector(15 downto 0);
55
        SEL_READ : in bit_vector(15 downto 0);
56
        CLEAR : in bit;
57
        RESET : in bit;
58
        CLK : in bit ;
59
        WRITE_ADDRESS : out bit_vector(3 downto 0);
60
        READ_ADDRESS : out bit_vector(3 downto 0)
61
 
62
);
63
 
64
end POINTER_ARRAY;
65
 
66
 
67
architecture ARRAY1 of POINTER_ARRAY is
68
 
69
component POINTER_FIRST
70
port
71
(
72
        PREVIOUS : in bit_vector(3 downto 0);
73
        MOVE_ENABLE : in bit;
74
        CLEAR : in bit;
75
        RESET : in bit;
76
        CLK : in bit;
77
        DOUT : out bit_vector(3 downto 0)
78
);
79
end component;
80
 
81
 
82
component POINTER_1
83
port
84
(
85
        PREVIOUS : in bit_vector(3 downto 0);
86
        MOVE : in bit;
87
        CLEAR : in bit;
88
        RESET : in bit;
89
        CLK : in bit;
90
        DOUT : out bit_vector(3 downto 0)
91
);
92
end component;
93
 
94
 
95
component POINTER_2
96
port
97
(
98
        PREVIOUS : in bit_vector(3 downto 0);
99
        MOVE : in bit;
100
        CLEAR : in bit;
101
        RESET : in bit;
102
        CLK : in bit;
103
        DOUT : out bit_vector(3 downto 0)
104
);
105
end component;
106
 
107
component POINTER_3
108
port
109
(
110
        PREVIOUS : in bit_vector(3 downto 0);
111
        MOVE : in bit;
112
        CLEAR : in bit;
113
        RESET : in bit;
114
        CLK : in bit;
115
        DOUT : out bit_vector(3 downto 0)
116
);
117
end component;
118
 
119
component POINTER_4
120
port
121
(
122
        PREVIOUS : in bit_vector(3 downto 0);
123
        MOVE : in bit;
124
        CLEAR : in bit;
125
        RESET : in bit;
126
        CLK : in bit;
127
        DOUT : out bit_vector(3 downto 0)
128
);
129
end component;
130
 
131
component POINTER_5
132
port
133
(
134
        PREVIOUS : in bit_vector(3 downto 0);
135
        MOVE : in bit;
136
        CLEAR : in bit;
137
        RESET : in bit;
138
        CLK : in bit;
139
        DOUT : out bit_vector(3 downto 0)
140
);
141
end component;
142
 
143
component POINTER_6
144
port
145
(
146
        PREVIOUS : in bit_vector(3 downto 0);
147
        MOVE : in bit;
148
        CLEAR : in bit;
149
        RESET : in bit;
150
        CLK : in bit;
151
        DOUT : out bit_vector(3 downto 0)
152
);
153
end component;
154
 
155
component POINTER_7
156
port
157
(
158
        PREVIOUS : in bit_vector(3 downto 0);
159
        MOVE : in bit;
160
        CLEAR : in bit;
161
        RESET : in bit;
162
        CLK : in bit;
163
        DOUT : out bit_vector(3 downto 0)
164
);
165
end component;
166
 
167
component POINTER_8
168
port
169
(
170
        PREVIOUS : in bit_vector(3 downto 0);
171
        MOVE : in bit;
172
        CLEAR : in bit;
173
        RESET : in bit;
174
        CLK : in bit;
175
        DOUT : out bit_vector(3 downto 0)
176
);
177
end component;
178
 
179
component POINTER_9
180
port
181
(
182
        PREVIOUS : in bit_vector(3 downto 0);
183
        MOVE : in bit;
184
        CLEAR : in bit;
185
        RESET : in bit;
186
        CLK : in bit;
187
        DOUT : out bit_vector(3 downto 0)
188
);
189
end component;
190
 
191
component POINTER_10
192
port
193
(
194
        PREVIOUS : in bit_vector(3 downto 0);
195
        MOVE : in bit;
196
        CLEAR : in bit;
197
        RESET : in bit;
198
        CLK : in bit;
199
        DOUT : out bit_vector(3 downto 0)
200
);
201
end component;
202
 
203
component POINTER_11
204
port
205
(
206
        PREVIOUS : in bit_vector(3 downto 0);
207
        MOVE : in bit;
208
        CLEAR : in bit;
209
        RESET : in bit;
210
        CLK : in bit;
211
        DOUT : out bit_vector(3 downto 0)
212
);
213
end component;
214
 
215
component POINTER_12
216
port
217
(
218
        PREVIOUS : in bit_vector(3 downto 0);
219
        MOVE : in bit;
220
        CLEAR : in bit;
221
        RESET : in bit;
222
        CLK : in bit;
223
        DOUT : out bit_vector(3 downto 0)
224
);
225
end component;
226
 
227
component POINTER_13
228
port
229
(
230
        PREVIOUS : in bit_vector(3 downto 0);
231
        MOVE : in bit;
232
        CLEAR : in bit;
233
        RESET : in bit;
234
        CLK : in bit;
235
        DOUT : out bit_vector(3 downto 0)
236
);
237
end component;
238
 
239
component POINTER_14
240
port
241
(
242
        PREVIOUS : in bit_vector(3 downto 0);
243
        MOVE : in bit;
244
        CLEAR : in bit;
245
        RESET : in bit;
246
        CLK : in bit;
247
        DOUT : out bit_vector(3 downto 0)
248
);
249
end component;
250
 
251
 
252
 
253
component POINTER_15
254
port
255
(
256
        PREVIOUS : in bit_vector(3 downto 0);
257
        MOVE : in bit;
258
        CLEAR : in bit;
259
        RESET : in bit;
260
        CLK : in bit;
261
        DOUT : out bit_vector(3 downto 0)
262
);
263
end component;
264
 
265
 
266
 
267
 
268
type DATA_ARRAY is array(15 downto 0) of bit_vector(3 downto 0);
269
signal MUX_DATA : DATA_ARRAY;
270
 
271
type MUX_ARRAY is array(3 downto 0) of bit_vector(15 downto 0);
272
signal MOVE_AUX : bit_vector(15 downto 1);
273
 
274
 
275
begin
276
 
277
 
278
P_ARRAY_FIRST_LOC0 : POINTER_FIRST
279
                                port map ( PREVIOUS => PREVIOUS,
280
                                                 MOVE_ENABLE => MOVE_ENABLE,
281
                                               CLEAR => CLEAR,
282
                                                   RESET => RESET,
283
                                       CLK => CLK,
284
                                       DOUT => MUX_DATA(0));
285
 
286
 
287
 
288
P_ARRAY_REMAINING_REST_1 : POINTER_1
289
                                port map ( PREVIOUS => MUX_DATA(0),
290
                                           MOVE => MOVE_AUX(1),
291
                                           CLEAR => CLEAR,
292
                                                   RESET => RESET,
293
                                           CLK => CLK,
294
                                           DOUT => MUX_DATA(1));
295
 
296
 
297
P_ARRAY_REMAINING_REST_2 : POINTER_2
298
                                port map ( PREVIOUS => MUX_DATA(1),
299
                                           MOVE => MOVE_AUX(2),
300
                                        CLEAR => CLEAR,
301
                                                        RESET => RESET,
302
                                                CLK => CLK,
303
                                            DOUT => MUX_DATA(2));
304
 
305
P_ARRAY_REMAINING_REST_3 : POINTER_3
306
                                port map ( PREVIOUS => MUX_DATA(2),
307
                                           MOVE => MOVE_AUX(3),
308
                                                  CLEAR => CLEAR,
309
                                                  RESET => RESET,
310
                                                  CLK => CLK,
311
                                                  DOUT => MUX_DATA(3));
312
 
313
P_ARRAY_REMAINING_REST_4 : POINTER_4
314
                                port map (
315
                                                PREVIOUS => MUX_DATA(3),
316
                                                MOVE => MOVE_AUX(4),
317
                                                CLEAR => CLEAR,
318
                                                RESET => RESET,
319
                                                CLK => CLK,
320
                                                DOUT => MUX_DATA(4));
321
 
322
 
323
 
324
P_ARRAY_REMAINING_REST_5 : POINTER_5 port map (
325
                                                PREVIOUS => MUX_DATA(4),
326
                                                MOVE => MOVE_AUX(5),
327
                                                CLEAR => CLEAR,
328
                                                RESET => RESET,
329
                                                CLK => CLK,
330
                                                DOUT => MUX_DATA(5));
331
 
332
 
333
P_ARRAY_REMAINING_REST_6 : POINTER_6 port map (
334
                                                PREVIOUS => MUX_DATA(5),
335
                                                MOVE => MOVE_AUX(6),
336
                                                CLEAR => CLEAR,
337
                                                RESET => RESET,
338
                                                CLK => CLK,
339
                                                DOUT => MUX_DATA(6));
340
 
341
P_ARRAY_REMAINING_REST_7 : POINTER_7 port map (
342
                                                PREVIOUS => MUX_DATA(6),
343
                                                MOVE => MOVE_AUX(7),
344
                                                CLEAR => CLEAR,
345
                                                RESET => RESET,
346
                                                CLK => CLK,
347
                                                DOUT => MUX_DATA(7));
348
 
349
P_ARRAY_REMAINING_REST_8 : POINTER_8 port map (
350
                                                PREVIOUS => MUX_DATA(7),
351
                                                MOVE => MOVE_AUX(8),
352
                                                CLEAR => CLEAR,
353
                                                RESET => RESET,
354
                                                CLK => CLK,
355
                                                DOUT => MUX_DATA(8));
356
 
357
 
358
P_ARRAY_REMAINING_REST_9 : POINTER_9 port map (
359
                                                PREVIOUS => MUX_DATA(8),
360
                                                MOVE => MOVE_AUX(9),
361
                                                CLEAR => CLEAR,
362
                                                RESET => RESET,
363
                                                CLK => CLK,
364
                                                DOUT => MUX_DATA(9));
365
 
366
 
367
 
368
P_ARRAY_REMAINING_REST_10 : POINTER_10 port map (
369
                                                PREVIOUS => MUX_DATA(9),
370
                                                MOVE => MOVE_AUX(10),
371
                                                CLEAR => CLEAR,
372
                                                RESET => RESET,
373
                                                CLK => CLK,
374
                                                DOUT => MUX_DATA(10));
375
 
376
 
377
P_ARRAY_REMAINING_REST_11 : POINTER_11 port map (
378
                                                PREVIOUS => MUX_DATA(10),
379
                                                MOVE => MOVE_AUX(11),
380
                                                CLEAR => CLEAR,
381
                                                RESET => RESET,
382
                                                CLK => CLK,
383
                                                DOUT => MUX_DATA(11));
384
 
385
P_ARRAY_REMAINING_REST_12 : POINTER_12 port map (
386
                                                PREVIOUS => MUX_DATA(11),
387
                                                MOVE => MOVE_AUX(12),
388
                                                CLEAR => CLEAR,
389
                                                RESET => RESET,
390
                                                CLK => CLK,
391
                                                DOUT => MUX_DATA(12));
392
 
393
P_ARRAY_REMAINING_REST_13 : POINTER_13 port map (
394
                                                PREVIOUS => MUX_DATA(12),
395
                                                MOVE => MOVE_AUX(13),
396
                                                CLEAR => CLEAR,
397
                                                RESET => RESET,
398
                                                CLK => CLK,
399
                                                DOUT => MUX_DATA(13));
400
 
401
 
402
 
403
P_ARRAY_REMAINING_REST_14 : POINTER_14 port map (
404
                                                PREVIOUS => MUX_DATA(13),
405
                                                MOVE => MOVE_AUX(14),
406
                                                CLEAR => CLEAR,
407
                                                RESET => RESET,
408
                                                CLK => CLK,
409
                                                DOUT => MUX_DATA(14));
410
 
411
P_ARRAY_REMAINING_REST_15 : POINTER_15 port map (
412
                                                PREVIOUS => MUX_DATA(14),
413
                                                MOVE => MOVE_AUX(15),
414
                                                CLEAR => CLEAR,
415
                                                RESET => RESET,
416
                                                CLK => CLK,
417
                                                DOUT => MUX_DATA(15));
418
 
419
 
420
 
421
-- MOVE_AUX <= MOVE when MOVE_ENABLE = '0' else "000000000000000";
422
 
423
MOVE_AUX <= MOVE;
424
 
425
-- mux is implemented as an or-and array
426
MUX_WRITE : process ( MUX_DATA , SEL_WRITE )            -- multiplex out the selected data element
427
variable TEMP_OUT : MUX_ARRAY;
428
begin
429
for COL_BIT in 0 to 3 loop
430
        for LOC in 0 to 15 loop
431
                TEMP_OUT(COL_BIT)(LOC) := MUX_DATA(LOC)(COL_BIT) and SEL_WRITE(15-LOC);
432
        end loop;
433
end loop;
434
 
435
for COL in 0 to 3 loop
436
        WRITE_ADDRESS(COL) <= Or_Bits(TEMP_OUT(COL));
437
end loop;
438
 
439
end process MUX_WRITE;
440
 
441
MUX_READ : process ( MUX_DATA , SEL_READ )            -- multiplex out the selected data element
442
variable TEMP_OUT : MUX_ARRAY;
443
begin
444
for COL_BIT in 0 to 3 loop
445
        for LOC in 0 to 15 loop
446
                TEMP_OUT(COL_BIT)(LOC) := MUX_DATA(LOC)(COL_BIT) and SEL_READ(LOC);
447
        end loop;
448
end loop;
449
 
450
for COL in 0 to 3 loop
451
        READ_ADDRESS(COL) <= Or_Bits(TEMP_OUT(COL));
452
end loop;
453
 
454
end process MUX_READ;
455
 
456
end ARRAY1;  -- end of architecture
457
 
458
 
459
 

powered by: WebSVN 2.1.0

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