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

Subversion Repositories core_arm

[/] [core_arm/] [trunk/] [vhdl/] [tech/] [tech_tsmc25.vhd] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tarookumic
----------------------------------------------------------------------------
2
--  This file is a part of the LEON VHDL model
3
--  Copyright (C) 1999  European Space Agency (ESA)
4
--
5
--  This library is free software; you can redistribute it and/or
6
--  modify it under the terms of the GNU Lesser General Public
7
--  License as published by the Free Software Foundation; either
8
--  version 2 of the License, or (at your option) any later version.
9
--
10
--  See the file COPYING.LGPL for the full details of the license.
11
 
12
 
13
-----------------------------------------------------------------------------
14
-- Entity:      tech_tsmc25
15
-- File:        tech_tsmc25.vhd
16
-- Author:      Jiri Gaisler - Gaisler Research
17
-- Author:      Daniel Mok - Institute for Communications Research
18
-- Description: Contains TSMC 0.25um process specific pads and ram generators
19
--              from Artisan libraries (http: 
20
--              
21
------------------------------------------------------------------------------
22
 
23
LIBRARY ieee;
24
use IEEE.std_logic_1164.all;
25
use work.leon_iface.all;
26
 
27
package tech_tsmc25 is
28
 
29
-- sync ram generator
30
 
31
component tsmc25_syncram
32
  generic ( abits : integer := 10; dbits : integer := 8 );
33
  port (
34
    address  : in std_logic_vector(abits -1 downto 0);
35
    clk      : in std_logic;
36
    datain   : in std_logic_vector(dbits -1 downto 0);
37
    dataout  : out std_logic_vector(dbits -1 downto 0);
38
    enable   : in std_logic;
39
    write    : in std_logic);
40
  end component;
41
 
42
-- regfile generator
43
 
44
component tsmc25_regfile_iu
45
  generic ( abits : integer := 8; dbits : integer := 32; words : integer := 128);
46
  port (
47
    rst      : in std_logic;
48
    clk      : in std_logic;
49
    clkn     : in std_logic;
50
    rfi      : in rf_in_type;
51
    rfo      : out rf_out_type);
52
end component;
53
 
54
component tsmc25_regfile_cp
55
  generic (
56
    abits : integer := 4;
57
    dbits : integer := 32;
58
    words : integer := 16
59
  );
60
  port (
61
    rst      : in std_logic;
62
    clk      : in std_logic;
63
    rfi      : in rf_cp_in_type;
64
    rfo      : out rf_cp_out_type);
65
end component;
66
 
67
component tsmc25_dpram
68
  generic ( abits : integer := 10; dbits : integer := 8 );
69
  port (
70
    address1 : in std_logic_vector((abits -1) downto 0);
71
    clk      : in std_logic;
72
    datain1  : in std_logic_vector((dbits -1) downto 0);
73
    dataout1 : out std_logic_vector((dbits -1) downto 0);
74
    enable1  : in std_logic;
75
    write1   : in std_logic;
76
    address2 : in std_logic_vector((abits -1) downto 0);
77
    datain2  : in std_logic_vector((dbits -1) downto 0);
78
    dataout2 : out std_logic_vector((dbits -1) downto 0);
79
    enable2  : in std_logic;
80
    write2   : in std_logic
81
   );
82
end component;
83
 
84
-- pads
85
 
86
  component tsmc25_inpad
87
    port (pad : in std_logic; q : out std_logic);
88
  end component;
89
  component tsmc25_smpad
90
    port (pad : in std_logic; q : out std_logic);
91
  end component;
92
  component tsmc25_outpad
93
    generic (drive : integer := 2);
94
    port (d : in  std_logic; pad : out  std_logic);
95
  end component;
96
  component tsmc25_toutpadu
97
    generic (drive : integer := 2);
98
    port (d, en : in  std_logic; pad : out  std_logic);
99
  end component;
100
  component tsmc25_iopad
101
    generic (drive : integer := 2);
102
    port ( d, en : in std_logic; q : out std_logic; pad : inout std_logic);
103
  end component;
104
  component tsmc25_iodpad
105
    generic (drive : integer := 2);
106
    port ( d : in std_logic; q : out std_logic; pad : inout std_logic);
107
  end component;
108
  component tsmc25_odpad
109
    generic (drive : integer := 2);
110
    port ( d : in std_logic; pad : out std_logic);
111
  end component;
112
  component tsmc25_smiopad
113
    generic (drive : integer := 2);
114
    port ( d, en : in std_logic; q : out std_logic; pad : inout std_logic);
115
  end component;
116
 
117
end;
118
 
119
------------------------------------------------------------------
120
-- Behavioural models only needed for simulation, not synthesis.
121
------------------------------------------------------------------
122
 
123
-- synopsys translate_off
124
 
125
------------------------------------------------------------------
126
-- behavioural ram models ----------------------------------------
127
------------------------------------------------------------------
128
 
129
-- Synchronous SRAM simulation model
130
 
131
library ieee;
132
use ieee.std_logic_1164.all;
133
use ieee.std_logic_arith.all;
134
 
135
entity tsmc25_syncram_ss is
136
  generic ( abits : integer := 10; dbits : integer := 8 );
137
  port (
138
    CLK: in std_logic;
139
    CEN: in std_logic;
140
    WEN: in std_logic_vector(3 downto 0);
141
    A:  in  std_logic_vector((abits -1) downto 0);
142
    D:  in  std_logic_vector((dbits -1) downto 0);
143
    Q:  out std_logic_vector((dbits -1) downto 0)
144
  );
145
end;
146
 
147
architecture behavioral of tsmc25_syncram_ss is
148
  subtype word is std_logic_vector((dbits -1) downto 0);
149
  type mem is array(0 to (2**abits -1)) of word;
150
begin
151
g0:if dbits = 32 generate
152
  main : process(CLK)
153
  variable memarr : mem;
154
  begin
155
    if rising_edge(CLK) and (CEN = '0') then
156
      if not is_x(A) then
157
        if WEN(0) = '0' then
158
          memarr(conv_integer(unsigned(A)))(7 downto 0) := D(7 downto 0);
159
        end if;
160
        if WEN(1) = '0' then
161
          memarr(conv_integer(unsigned(A)))(15 downto 8) := D(15 downto 8);
162
        end if;
163
        if WEN(2) = '0' then
164
          memarr(conv_integer(unsigned(A)))(23 downto 16) := D(23 downto 16);
165
        end if;
166
        if WEN(3) = '0' then
167
          memarr(conv_integer(unsigned(A)))(31 downto 24) := D(31 downto 24);
168
        end if;
169
        Q <= memarr(conv_integer(unsigned(A)));
170
      else
171
        Q <= (others => 'Z');
172
      end if;
173
    end if;
174
  end process;
175
  end generate;
176
 
177
g1:if dbits /= 32 generate
178
  main : process(CLK)
179
  variable memarr : mem;
180
  begin
181
    if rising_edge(CLK) and (CEN = '0') then
182
      if not is_x(A) then
183
        if WEN(0) = '0' then
184
          memarr(conv_integer(unsigned(A))) := D;
185
        end if;
186
        Q <= memarr(conv_integer(unsigned(A)));
187
      else
188
        Q <= (others => 'Z');
189
      end if;
190
    end if;
191
  end process;
192
  end generate;
193
 
194
end behavioral;
195
 
196
 
197
-- Synchronous DPRAM simulation model
198
 
199
LIBRARY ieee;
200
use IEEE.std_logic_1164.all;
201
use IEEE.std_logic_arith.all;
202
 
203
entity tsmc25_dpram_ss is
204
  generic (
205
    abits : integer := 8;
206
    dbits : integer := 32;
207
    words : integer := 256
208
  );
209
  port (
210
    CLKA: in std_logic;
211
    CENA: in std_logic;
212
    WENA: in std_logic;
213
    AA: in std_logic_vector (abits -1 downto 0);
214
    DA: in std_logic_vector (dbits -1 downto 0);
215
    QA: out std_logic_vector (dbits -1 downto 0);
216
    CLKB: in std_logic;
217
    CENB: in std_logic;
218
    WENB: in std_logic;
219
    AB: in std_logic_vector (abits -1 downto 0);
220
    DB: in std_logic_vector (dbits -1 downto 0);
221
    QB: out std_logic_vector (dbits -1 downto 0)
222
  );
223
end;
224
 
225
architecture behav of tsmc25_dpram_ss is
226
 
227
  signal writea : std_logic := '0';
228
  signal writeb : std_logic := '0';
229
  signal reada  : std_logic := '0';
230
  signal readb  : std_logic := '0';
231
 
232
  subtype word is std_logic_vector((dbits -1) downto 0);
233
  type mem is array(0 to words-1) of word;
234
 
235
  constant t_cc : time := 2 ns;  -- clock collision time
236
  constant t_ac : time := 3 ns;  -- access time
237
 
238
begin
239
 
240
  portA : process(CLKA,CLKB)
241
 
242
  variable memarr : mem;
243
  variable last_addr: std_logic_vector (abits -1 downto 0);
244
 
245
  begin
246
    if rising_edge(CLKA) and (CENA = '0') then
247
      if not is_x(AA) then
248
        if writeb = '1'  and last_addr = AA then
249
          if WENA = '0' then  -- write-write collision
250
            memarr(conv_integer(unsigned(AA))) := (others => 'X');
251
            QA <= DA  after t_ac;
252
            writea <= '1', '0' after t_cc;
253
          else
254
            QA <= (others => 'X'); -- write-read collision
255
          end if;
256
        else
257
          if WENA = '0' then
258
            memarr(conv_integer(unsigned(AA))) := DA;
259
            writea <= '1', '0' after t_cc;
260
            if readb = '1' and last_addr = AA then
261
              QB <= (others => 'X');  -- read-write collision
262
            end if;
263
          else
264
            reada <= '1', '0' after t_cc;
265
          end if;
266
          last_addr := AA;
267
          QA <= memarr(conv_integer(unsigned(AA))) after t_ac;
268
        end if;
269
      else
270
        QA <= (others => 'X');
271
      end if;
272
    end if;
273
 
274
    if rising_edge(CLKB) and (CENB = '0') then
275
      if not is_x(AB) then
276
        if writea = '1' and last_addr = AA then
277
          if WENB = '0' then   -- write-write collision
278
            memarr(conv_integer(unsigned(AB))) := (others => 'X');
279
            QB <= DB after t_ac;
280
            writeb <= '1', '0' after t_cc;
281
          else
282
            QB <= (others => 'X'); -- write-read collision
283
          end if;
284
        else
285
          if WENB = '0' then
286
            memarr(conv_integer(unsigned(AB))) := DB;
287
            writeb <= '1', '0' after t_cc;
288
            if reada = '1' and last_addr = AB then
289
              QA <= (others => 'X');  -- read-write collision
290
            end if;
291
          else
292
            readb <= '1', '0' after t_cc;
293
          end if;
294
          last_addr := AB;
295
          QB <= memarr(conv_integer(unsigned(AB))) after t_ac;
296
        end if;
297
      else
298
        QB <= (others => 'X');
299
      end if;
300
    end if;
301
 
302
  end process;
303
 
304
end behav;
305
 
306
 
307
-----------------------------------------------------------
308
-- syncronous tsmc25 sram simulation model package --------
309
-----------------------------------------------------------
310
 
311
LIBRARY ieee;
312
use IEEE.std_logic_1164.all;
313
package tech_tsmc25_sim is
314
 
315
component tsmc25_syncram_ss
316
  generic ( abits : integer := 10; dbits : integer := 8 );
317
  port (
318
  CLK: in std_logic;
319
  CEN: in std_logic;
320
  WEN: in std_logic_vector(3 downto 0);
321
  A: in std_logic_vector((abits -1) downto 0);
322
  D: in std_logic_vector((dbits -1) downto 0);
323
  Q: out std_logic_vector((dbits -1) downto 0)
324
  );
325
end component;
326
 
327
component tsmc25_dpram_ss
328
  generic (
329
    abits : integer := 8;
330
    dbits : integer := 32;
331
    words : integer := 256
332
  );
333
  port (
334
   CLKA: in std_logic;
335
   CENA: in std_logic;
336
   WENA: in std_logic;
337
   AA: in std_logic_vector (abits -1 downto 0);
338
   DA: in std_logic_vector (dbits -1 downto 0);
339
   QA: out std_logic_vector (dbits -1 downto 0);
340
   CLKB: in std_logic;
341
   CENB: in std_logic;
342
   WENB: in std_logic;
343
   AB: in std_logic_vector (abits -1 downto 0);
344
   DB: in std_logic_vector (dbits -1 downto 0);
345
   QB: out std_logic_vector (dbits -1 downto 0)
346
  );
347
end component;
348
 
349
end;
350
 
351
-----------------------------------------------------------
352
 
353
library ieee;
354
use IEEE.std_logic_1164.all;
355
use work.tech_tsmc25_sim.all;
356
 
357
entity ram16384x32 is
358
   port (
359
   CLK: in std_logic;
360
   CEN: in std_logic;
361
   WEN: in std_logic;
362
   A: in std_logic_vector(13 downto 0);
363
   D: in std_logic_vector(31 downto 0);
364
   Q: out std_logic_vector(31 downto 0)
365
   );
366
end;
367
 
368
architecture behavioral of ram16384x32 is
369
signal wen_s: std_logic_vector(3 downto 0);
370
begin
371
  wen_s(0) <= wen;
372
  wen_s(1) <= wen;
373
  wen_s(2) <= wen;
374
  wen_s(3) <= wen;
375
  syncram0 : tsmc25_syncram_ss
376
    generic map ( abits => 14, dbits => 32)
377
    port map (
378
    CLK => CLK,
379
    CEN => CEN,
380
    WEN => wen_s,
381
    A   => A,
382
    D   => D,
383
    Q   => Q
384
    );
385
end behavioral;
386
 
387
library ieee;
388
use IEEE.std_logic_1164.all;
389
use work.tech_tsmc25_sim.all;
390
 
391
entity ram8192x32 is
392
   port (
393
   CLK: in std_logic;
394
   CEN: in std_logic;
395
   WEN: in std_logic;
396
   A: in std_logic_vector(12 downto 0);
397
   D: in std_logic_vector(31 downto 0);
398
   Q: out std_logic_vector(31 downto 0)
399
   );
400
end;
401
 
402
architecture behavioral of ram8192x32 is
403
signal wen_s: std_logic_vector(3 downto 0);
404
begin
405
  wen_s(0) <= wen;
406
  wen_s(1) <= wen;
407
  wen_s(2) <= wen;
408
  wen_s(3) <= wen;
409
  syncram0 : tsmc25_syncram_ss
410
    generic map ( abits => 13, dbits => 32)
411
    port map (
412
    CLK => CLK,
413
    CEN => CEN,
414
    WEN => wen_s,
415
    A   => A,
416
    D   => D,
417
    Q   => Q
418
    );
419
end behavioral;
420
 
421
library ieee;
422
use IEEE.std_logic_1164.all;
423
use work.tech_tsmc25_sim.all;
424
 
425
entity ram4096x32 is
426
   port (
427
   CLK: in std_logic;
428
   CEN: in std_logic;
429
   WEN: in std_logic_vector(3 downto 0);
430
   A: in std_logic_vector(11 downto 0);
431
   D: in std_logic_vector(31 downto 0);
432
   Q: out std_logic_vector(31 downto 0)
433
   );
434
end;
435
 
436
architecture behavioral of ram4096x32 is
437
begin
438
  syncram0 : tsmc25_syncram_ss
439
    generic map ( abits => 12, dbits => 32)
440
    port map (
441
    CLK => CLK,
442
    CEN => CEN,
443
    WEN => WEN,
444
    A   => A,
445
    D   => D,
446
    Q   => Q
447
    );
448
end behavioral;
449
 
450
library ieee;
451
use IEEE.std_logic_1164.all;
452
use work.tech_tsmc25_sim.all;
453
 
454
entity ram2400x32 is
455
   port (
456
   CLK: in std_logic;
457
   CEN: in std_logic;
458
   WEN: in std_logic;
459
   A: in std_logic_vector(11 downto 0);
460
   D: in std_logic_vector(31 downto 0);
461
   Q: out std_logic_vector(31 downto 0)
462
   );
463
end;
464
 
465
architecture behavioral of ram2400x32 is
466
signal wen_s: std_logic_vector(3 downto 0);
467
begin
468
  wen_s(0) <= wen;
469
  wen_s(1) <= wen;
470
  wen_s(2) <= wen;
471
  wen_s(3) <= wen;
472
  syncram0 : tsmc25_syncram_ss
473
    generic map ( abits => 12, dbits => 32)
474
    port map (
475
    CLK => CLK,
476
    CEN => CEN,
477
    WEN => wen_s,
478
    A   => A,
479
    D   => D,
480
    Q   => Q
481
    );
482
end behavioral;
483
 
484
library ieee;
485
use IEEE.std_logic_1164.all;
486
use work.tech_tsmc25_sim.all;
487
 
488
entity ram2048x32 is
489
   port (
490
   CLK: in std_logic;
491
   CEN: in std_logic;
492
   WEN: in std_logic_vector(3 downto 0);
493
   A: in std_logic_vector(10 downto 0);
494
   D: in std_logic_vector(31 downto 0);
495
   Q: out std_logic_vector(31 downto 0)
496
   );
497
end;
498
 
499
architecture behavioral of ram2048x32 is
500
begin
501
  syncram0 : tsmc25_syncram_ss
502
    generic map ( abits => 11, dbits => 32)
503
    port map (
504
    CLK => CLK,
505
    CEN => CEN,
506
    WEN => WEN,
507
    A   => A,
508
    D   => D,
509
    Q   => Q
510
    );
511
end behavioral;
512
 
513
library ieee;
514
use IEEE.std_logic_1164.all;
515
use work.tech_tsmc25_sim.all;
516
 
517
entity ram1024x32 is
518
   port (
519
   CLK: in std_logic;
520
   CEN: in std_logic;
521
   WEN: in std_logic_vector(3 downto 0);
522
   A: in std_logic_vector(9 downto 0);
523
   D: in std_logic_vector(31 downto 0);
524
   Q: out std_logic_vector(31 downto 0)
525
   );
526
end;
527
 
528
architecture behavioral of ram1024x32 is
529
begin
530
  syncram0 : tsmc25_syncram_ss
531
    generic map ( abits => 10, dbits => 32)
532
    port map (
533
    CLK => CLK,
534
    CEN => CEN,
535
    WEN => WEN,
536
    A   => A,
537
    D   => D,
538
    Q   => Q
539
    );
540
end behavioral;
541
 
542
library ieee;
543
use IEEE.std_logic_1164.all;
544
use work.tech_tsmc25_sim.all;
545
 
546
entity ram512x32 is
547
   port (
548
   CLK: in std_logic;
549
   CEN: in std_logic;
550
   WEN: in std_logic;
551
   A: in std_logic_vector(8 downto 0);
552
   D: in std_logic_vector(31 downto 0);
553
   Q: out std_logic_vector(31 downto 0)
554
   );
555
end;
556
 
557
architecture behavioral of ram512x32 is
558
signal wen_s: std_logic_vector(3 downto 0);
559
begin
560
  wen_s(0) <= wen;
561
  wen_s(1) <= wen;
562
  wen_s(2) <= wen;
563
  wen_s(3) <= wen;
564
  syncram0 : tsmc25_syncram_ss
565
    generic map ( abits => 9, dbits => 32)
566
    port map (
567
    CLK => CLK,
568
    CEN => CEN,
569
    WEN => wen_s,
570
    A   => A,
571
    D   => D,
572
    Q   => Q
573
    );
574
end behavioral;
575
 
576
library ieee;
577
use IEEE.std_logic_1164.all;
578
use work.tech_tsmc25_sim.all;
579
 
580
entity ram256x32 is
581
   port (
582
   CLK: in std_logic;
583
   CEN: in std_logic;
584
   WEN: in std_logic;
585
   A: in std_logic_vector(7 downto 0);
586
   D: in std_logic_vector(31 downto 0);
587
   Q: out std_logic_vector(31 downto 0)
588
   );
589
end;
590
 
591
architecture behavioral of ram256x32 is
592
signal wen_s: std_logic_vector(3 downto 0);
593
begin
594
  wen_s(0) <= wen;
595
  wen_s(1) <= wen;
596
  wen_s(2) <= wen;
597
  wen_s(3) <= wen;
598
  syncram0 : tsmc25_syncram_ss
599
    generic map ( abits => 8, dbits => 32)
600
    port map (
601
    CLK => CLK,
602
    CEN => CEN,
603
    WEN => wen_s,
604
    A   => A,
605
    D   => D,
606
    Q   => Q
607
    );
608
end behavioral;
609
 
610
library ieee;
611
use IEEE.std_logic_1164.all;
612
use work.tech_tsmc25_sim.all;
613
 
614
entity ram128x32 is
615
   port (
616
   CLK: in std_logic;
617
   CEN: in std_logic;
618
   WEN: in std_logic;
619
   A: in std_logic_vector(6 downto 0);
620
   D: in std_logic_vector(31 downto 0);
621
   Q: out std_logic_vector(31 downto 0)
622
   );
623
end;
624
 
625
architecture behavioral of ram128x32 is
626
signal wen_s: std_logic_vector(3 downto 0);
627
begin
628
  wen_s(0) <= wen;
629
  wen_s(1) <= wen;
630
  wen_s(2) <= wen;
631
  wen_s(3) <= wen;
632
  syncram0 : tsmc25_syncram_ss
633
    generic map ( abits => 7, dbits => 32)
634
    port map (
635
    CLK => CLK,
636
    CEN => CEN,
637
    WEN => wen_s,
638
    A   => A,
639
    D   => D,
640
    Q   => Q
641
    );
642
end behavioral;
643
 
644
library ieee;
645
use IEEE.std_logic_1164.all;
646
use work.tech_tsmc25_sim.all;
647
 
648
entity ram64x32 is
649
   port (
650
   CLK: in std_logic;
651
   CEN: in std_logic;
652
   WEN: in std_logic;
653
   A: in std_logic_vector(5 downto 0);
654
   D: in std_logic_vector(31 downto 0);
655
   Q: out std_logic_vector(31 downto 0)
656
   );
657
end;
658
 
659
architecture behavioral of ram64x32 is
660
signal wen_s: std_logic_vector(3 downto 0);
661
begin
662
  wen_s(0) <= wen;
663
  wen_s(1) <= wen;
664
  wen_s(2) <= wen;
665
  wen_s(3) <= wen;
666
  syncram0 : tsmc25_syncram_ss
667
    generic map ( abits => 6, dbits => 32)
668
    port map (
669
    CLK => CLK,
670
    CEN => CEN,
671
    WEN => wen_s,
672
    A   => A,
673
    D   => D,
674
    Q   => Q
675
    );
676
end behavioral;
677
 
678
library ieee;
679
use IEEE.std_logic_1164.all;
680
use work.tech_tsmc25_sim.all;
681
 
682
entity ram32x32 is
683
   port (
684
   CLK: in std_logic;
685
   CEN: in std_logic;
686
   WEN: in std_logic;
687
   A: in std_logic_vector(4 downto 0);
688
   D: in std_logic_vector(31 downto 0);
689
   Q: out std_logic_vector(31 downto 0)
690
   );
691
end;
692
 
693
architecture behavioral of ram32x32 is
694
signal wen_s: std_logic_vector(3 downto 0);
695
begin
696
  wen_s(0) <= wen;
697
  wen_s(1) <= wen;
698
  wen_s(2) <= wen;
699
  wen_s(3) <= wen;
700
  syncram0 : tsmc25_syncram_ss
701
    generic map ( abits => 5, dbits => 32)
702
    port map (
703
    CLK => CLK,
704
    CEN => CEN,
705
    WEN => wen_s,
706
    A   => A,
707
    D   => D,
708
    Q   => Q
709
    );
710
end behavioral;
711
 
712
library ieee;
713
use IEEE.std_logic_1164.all;
714
use work.tech_tsmc25_sim.all;
715
 
716
entity ram64x31 is
717
   port (
718
   CLK: in std_logic;
719
   CEN: in std_logic;
720
   WEN: in std_logic;
721
   A: in std_logic_vector(5 downto 0);
722
   D: in std_logic_vector(30 downto 0);
723
   Q: out std_logic_vector(30 downto 0)
724
   );
725
end;
726
 
727
architecture behavioral of ram64x31 is
728
signal wen_s: std_logic_vector(3 downto 0);
729
begin
730
  wen_s(0) <= wen;
731
  wen_s(1) <= wen;
732
  wen_s(2) <= wen;
733
  wen_s(3) <= wen;
734
  syncram0 : tsmc25_syncram_ss
735
    generic map ( abits => 6, dbits => 31)
736
    port map (
737
    CLK => CLK,
738
    CEN => CEN,
739
    WEN => wen_s,
740
    A   => A,
741
    D   => D,
742
    Q   => Q
743
    );
744
end behavioral;
745
 
746
library ieee;
747
use IEEE.std_logic_1164.all;
748
use work.tech_tsmc25_sim.all;
749
 
750
entity ram32x31 is
751
   port (
752
   CLK: in std_logic;
753
   CEN: in std_logic;
754
   WEN: in std_logic;
755
   A: in std_logic_vector(4 downto 0);
756
   D: in std_logic_vector(30 downto 0);
757
   Q: out std_logic_vector(30 downto 0)
758
   );
759
end;
760
 
761
architecture behavioral of ram32x31 is
762
signal wen_s: std_logic_vector(3 downto 0);
763
begin
764
  wen_s(0) <= wen;
765
  wen_s(1) <= wen;
766
  wen_s(2) <= wen;
767
  wen_s(3) <= wen;
768
  syncram0 : tsmc25_syncram_ss
769
    generic map ( abits => 5, dbits => 31)
770
    port map (
771
    CLK => CLK,
772
    CEN => CEN,
773
    WEN => wen_s,
774
    A   => A,
775
    D   => D,
776
    Q   => Q
777
    );
778
end behavioral;
779
 
780
library ieee;
781
use IEEE.std_logic_1164.all;
782
use work.tech_tsmc25_sim.all;
783
 
784
entity ram32x30 is
785
   port (
786
   CLK: in std_logic;
787
   CEN: in std_logic;
788
   WEN: in std_logic;
789
   A: in std_logic_vector(4 downto 0);
790
   D: in std_logic_vector(29 downto 0);
791
   Q: out std_logic_vector(29 downto 0)
792
   );
793
end;
794
 
795
architecture behavioral of ram32x30 is
796
signal wen_s: std_logic_vector(3 downto 0);
797
begin
798
  wen_s(0) <= wen;
799
  wen_s(1) <= wen;
800
  wen_s(2) <= wen;
801
  wen_s(3) <= wen;
802
  syncram0 : tsmc25_syncram_ss
803
    generic map ( abits => 5, dbits => 30)
804
    port map (
805
    CLK => CLK,
806
    CEN => CEN,
807
    WEN => wen_s,
808
    A   => A,
809
    D   => D,
810
    Q   => Q
811
    );
812
end behavioral;
813
 
814
library ieee;
815
use IEEE.std_logic_1164.all;
816
use work.tech_tsmc25_sim.all;
817
 
818
entity ram64x30 is
819
   port (
820
   CLK: in std_logic;
821
   CEN: in std_logic;
822
   WEN: in std_logic;
823
   A: in std_logic_vector(5 downto 0);
824
   D: in std_logic_vector(29 downto 0);
825
   Q: out std_logic_vector(29 downto 0)
826
   );
827
end;
828
 
829
architecture behavioral of ram64x30 is
830
signal wen_s: std_logic_vector(3 downto 0);
831
begin
832
  wen_s(0) <= wen;
833
  wen_s(1) <= wen;
834
  wen_s(2) <= wen;
835
  wen_s(3) <= wen;
836
  syncram0 : tsmc25_syncram_ss
837
    generic map ( abits => 6, dbits => 30)
838
    port map (
839
    CLK => CLK,
840
    CEN => CEN,
841
    WEN => wen_s,
842
    A   => A,
843
    D   => D,
844
    Q   => Q
845
    );
846
end behavioral;
847
 
848
library ieee;
849
use IEEE.std_logic_1164.all;
850
use work.tech_tsmc25_sim.all;
851
 
852
entity ram128x30 is
853
   port (
854
   CLK: in std_logic;
855
   CEN: in std_logic;
856
   WEN: in std_logic;
857
   A: in std_logic_vector(6 downto 0);
858
   D: in std_logic_vector(29 downto 0);
859
   Q: out std_logic_vector(29 downto 0)
860
   );
861
end;
862
 
863
architecture behavioral of ram128x30 is
864
signal wen_s: std_logic_vector(3 downto 0);
865
begin
866
  wen_s(0) <= wen;
867
  wen_s(1) <= wen;
868
  wen_s(2) <= wen;
869
  wen_s(3) <= wen;
870
  syncram0 : tsmc25_syncram_ss
871
    generic map ( abits => 7, dbits => 30)
872
    port map (
873
    CLK => CLK,
874
    CEN => CEN,
875
    WEN => wen_s,
876
    A   => A,
877
    D   => D,
878
    Q   => Q
879
    );
880
end behavioral;
881
 
882
library ieee;
883
use IEEE.std_logic_1164.all;
884
use work.tech_tsmc25_sim.all;
885
 
886
entity ram256x29 is
887
   port (
888
   CLK: in std_logic;
889
   CEN: in std_logic;
890
   WEN: in std_logic;
891
   A: in std_logic_vector(7 downto 0);
892
   D: in std_logic_vector(28 downto 0);
893
   Q: out std_logic_vector(28 downto 0)
894
   );
895
end;
896
 
897
architecture behavioral of ram256x29 is
898
signal wen_s: std_logic_vector(3 downto 0);
899
begin
900
  wen_s(0) <= wen;
901
  wen_s(1) <= wen;
902
  wen_s(2) <= wen;
903
  wen_s(3) <= wen;
904
  syncram0 : tsmc25_syncram_ss
905
    generic map ( abits => 8, dbits => 29)
906
    port map (
907
    CLK => CLK,
908
    CEN => CEN,
909
    WEN => wen_s,
910
    A   => A,
911
    D   => D,
912
    Q   => Q
913
    );
914
end behavioral;
915
 
916
library ieee;
917
use IEEE.std_logic_1164.all;
918
use work.tech_tsmc25_sim.all;
919
 
920
entity ram128x29 is
921
   port (
922
   CLK: in std_logic;
923
   CEN: in std_logic;
924
   WEN: in std_logic;
925
   A: in std_logic_vector(6 downto 0);
926
   D: in std_logic_vector(28 downto 0);
927
   Q: out std_logic_vector(28 downto 0)
928
   );
929
end;
930
 
931
architecture behavioral of ram128x29 is
932
signal wen_s: std_logic_vector(3 downto 0);
933
begin
934
  wen_s(0) <= wen;
935
  wen_s(1) <= wen;
936
  wen_s(2) <= wen;
937
  wen_s(3) <= wen;
938
  syncram0 : tsmc25_syncram_ss
939
    generic map ( abits => 7, dbits => 29)
940
    port map (
941
    CLK => CLK,
942
    CEN => CEN,
943
    WEN => wen_s,
944
    A   => A,
945
    D   => D,
946
    Q   => Q
947
    );
948
end behavioral;
949
 
950
library ieee;
951
use IEEE.std_logic_1164.all;
952
use work.tech_tsmc25_sim.all;
953
 
954
entity ram64x29 is
955
   port (
956
   CLK: in std_logic;
957
   CEN: in std_logic;
958
   WEN: in std_logic;
959
   A: in std_logic_vector(5 downto 0);
960
   D: in std_logic_vector(28 downto 0);
961
   Q: out std_logic_vector(28 downto 0)
962
   );
963
end;
964
 
965
architecture behavioral of ram64x29 is
966
signal wen_s: std_logic_vector(3 downto 0);
967
begin
968
  wen_s(0) <= wen;
969
  wen_s(1) <= wen;
970
  wen_s(2) <= wen;
971
  wen_s(3) <= wen;
972
  syncram0 : tsmc25_syncram_ss
973
    generic map ( abits => 6, dbits => 29)
974
    port map (
975
    CLK => CLK,
976
    CEN => CEN,
977
    WEN => wen_s,
978
    A   => A,
979
    D   => D,
980
    Q   => Q
981
    );
982
end behavioral;
983
 
984
library ieee;
985
use IEEE.std_logic_1164.all;
986
use work.tech_tsmc25_sim.all;
987
 
988
entity ram512x28 is
989
   port (
990
   CLK: in std_logic;
991
   CEN: in std_logic;
992
   WEN: in std_logic;
993
   A: in std_logic_vector(8 downto 0);
994
   D: in std_logic_vector(27 downto 0);
995
   Q: out std_logic_vector(27 downto 0)
996
   );
997
end;
998
 
999
architecture behavioral of ram512x28 is
1000
signal wen_s: std_logic_vector(3 downto 0);
1001
begin
1002
  wen_s(0) <= wen;
1003
  wen_s(1) <= wen;
1004
  wen_s(2) <= wen;
1005
  wen_s(3) <= wen;
1006
  syncram0 : tsmc25_syncram_ss
1007
    generic map ( abits => 9, dbits => 28)
1008
    port map (
1009
    CLK => CLK,
1010
    CEN => CEN,
1011
    WEN => wen_s,
1012
    A   => A,
1013
    D   => D,
1014
    Q   => Q
1015
    );
1016
end behavioral;
1017
 
1018
library ieee;
1019
use IEEE.std_logic_1164.all;
1020
use work.tech_tsmc25_sim.all;
1021
 
1022
entity ram256x28 is
1023
   port (
1024
   CLK: in std_logic;
1025
   CEN: in std_logic;
1026
   WEN: in std_logic;
1027
   A: in std_logic_vector(7 downto 0);
1028
   D: in std_logic_vector(27 downto 0);
1029
   Q: out std_logic_vector(27 downto 0)
1030
   );
1031
end;
1032
 
1033
architecture behavioral of ram256x28 is
1034
signal wen_s: std_logic_vector(3 downto 0);
1035
begin
1036
  wen_s(0) <= wen;
1037
  wen_s(1) <= wen;
1038
  wen_s(2) <= wen;
1039
  wen_s(3) <= wen;
1040
  syncram0 : tsmc25_syncram_ss
1041
    generic map ( abits => 8, dbits => 28)
1042
    port map (
1043
    CLK => CLK,
1044
    CEN => CEN,
1045
    WEN => wen_s,
1046
    A   => A,
1047
    D   => D,
1048
    Q   => Q
1049
    );
1050
end behavioral;
1051
 
1052
library ieee;
1053
use IEEE.std_logic_1164.all;
1054
use work.tech_tsmc25_sim.all;
1055
 
1056
entity ram128x28 is
1057
   port (
1058
   CLK: in std_logic;
1059
   CEN: in std_logic;
1060
   WEN: in std_logic;
1061
   A: in std_logic_vector(6 downto 0);
1062
   D: in std_logic_vector(27 downto 0);
1063
   Q: out std_logic_vector(27 downto 0)
1064
   );
1065
end;
1066
 
1067
architecture behavioral of ram128x28 is
1068
signal wen_s: std_logic_vector(3 downto 0);
1069
begin
1070
  wen_s(0) <= wen;
1071
  wen_s(1) <= wen;
1072
  wen_s(2) <= wen;
1073
  wen_s(3) <= wen;
1074
  syncram0 : tsmc25_syncram_ss
1075
    generic map ( abits => 7, dbits => 28)
1076
    port map (
1077
    CLK => CLK,
1078
    CEN => CEN,
1079
    WEN => wen_s,
1080
    A   => A,
1081
    D   => D,
1082
    Q   => Q
1083
    );
1084
end behavioral;
1085
 
1086
library ieee;
1087
use IEEE.std_logic_1164.all;
1088
use work.tech_tsmc25_sim.all;
1089
 
1090
entity ram64x28 is
1091
   port (
1092
   CLK: in std_logic;
1093
   CEN: in std_logic;
1094
   WEN: in std_logic;
1095
   A: in std_logic_vector(5 downto 0);
1096
   D: in std_logic_vector(27 downto 0);
1097
   Q: out std_logic_vector(27 downto 0)
1098
   );
1099
end;
1100
 
1101
architecture behavioral of ram64x28 is
1102
signal wen_s: std_logic_vector(3 downto 0);
1103
begin
1104
  wen_s(0) <= wen;
1105
  wen_s(1) <= wen;
1106
  wen_s(2) <= wen;
1107
  wen_s(3) <= wen;
1108
  syncram0 : tsmc25_syncram_ss
1109
    generic map ( abits => 6, dbits => 28)
1110
    port map (
1111
    CLK => CLK,
1112
    CEN => CEN,
1113
    WEN => wen_s,
1114
    A   => A,
1115
    D   => D,
1116
    Q   => Q
1117
    );
1118
end behavioral;
1119
 
1120
library ieee;
1121
use IEEE.std_logic_1164.all;
1122
use work.tech_tsmc25_sim.all;
1123
 
1124
entity ram1024x27 is
1125
   port (
1126
   CLK: in std_logic;
1127
   CEN: in std_logic;
1128
   WEN: in std_logic;
1129
   A: in std_logic_vector(9 downto 0);
1130
   D: in std_logic_vector(26 downto 0);
1131
   Q: out std_logic_vector(26 downto 0)
1132
   );
1133
end;
1134
 
1135
architecture behavioral of ram1024x27 is
1136
signal wen_s: std_logic_vector(3 downto 0);
1137
begin
1138
  wen_s(0) <= wen;
1139
  wen_s(1) <= wen;
1140
  wen_s(2) <= wen;
1141
  wen_s(3) <= wen;
1142
  syncram0 : tsmc25_syncram_ss
1143
    generic map ( abits => 10, dbits => 27)
1144
    port map (
1145
    CLK => CLK,
1146
    CEN => CEN,
1147
    WEN => wen_s,
1148
    A   => A,
1149
    D   => D,
1150
    Q   => Q
1151
    );
1152
end behavioral;
1153
 
1154
library ieee;
1155
use IEEE.std_logic_1164.all;
1156
use work.tech_tsmc25_sim.all;
1157
 
1158
entity ram512x27 is
1159
   port (
1160
   CLK: in std_logic;
1161
   CEN: in std_logic;
1162
   WEN: in std_logic;
1163
   A: in std_logic_vector(8 downto 0);
1164
   D: in std_logic_vector(26 downto 0);
1165
   Q: out std_logic_vector(26 downto 0)
1166
   );
1167
end;
1168
 
1169
architecture behavioral of ram512x27 is
1170
signal wen_s: std_logic_vector(3 downto 0);
1171
begin
1172
  wen_s(0) <= wen;
1173
  wen_s(1) <= wen;
1174
  wen_s(2) <= wen;
1175
  wen_s(3) <= wen;
1176
  syncram0 : tsmc25_syncram_ss
1177
    generic map ( abits => 9, dbits => 27)
1178
    port map (
1179
    CLK => CLK,
1180
    CEN => CEN,
1181
    WEN => wen_s,
1182
    A   => A,
1183
    D   => D,
1184
    Q   => Q
1185
    );
1186
end behavioral;
1187
 
1188
library ieee;
1189
use IEEE.std_logic_1164.all;
1190
use work.tech_tsmc25_sim.all;
1191
 
1192
entity ram256x27 is
1193
   port (
1194
   CLK: in std_logic;
1195
   CEN: in std_logic;
1196
   WEN: in std_logic;
1197
   A: in std_logic_vector(7 downto 0);
1198
   D: in std_logic_vector(26 downto 0);
1199
   Q: out std_logic_vector(26 downto 0)
1200
   );
1201
end;
1202
 
1203
architecture behavioral of ram256x27 is
1204
signal wen_s: std_logic_vector(3 downto 0);
1205
begin
1206
  wen_s(0) <= wen;
1207
  wen_s(1) <= wen;
1208
  wen_s(2) <= wen;
1209
  wen_s(3) <= wen;
1210
  syncram0 : tsmc25_syncram_ss
1211
    generic map ( abits => 8, dbits => 27)
1212
    port map (
1213
    CLK => CLK,
1214
    CEN => CEN,
1215
    WEN => wen_s,
1216
    A   => A,
1217
    D   => D,
1218
    Q   => Q
1219
    );
1220
end behavioral;
1221
 
1222
library ieee;
1223
use IEEE.std_logic_1164.all;
1224
use work.tech_tsmc25_sim.all;
1225
 
1226
entity ram128x27 is
1227
   port (
1228
   CLK: in std_logic;
1229
   CEN: in std_logic;
1230
   WEN: in std_logic;
1231
   A: in std_logic_vector(6 downto 0);
1232
   D: in std_logic_vector(26 downto 0);
1233
   Q: out std_logic_vector(26 downto 0)
1234
   );
1235
end;
1236
 
1237
architecture behavioral of ram128x27 is
1238
signal wen_s: std_logic_vector(3 downto 0);
1239
begin
1240
  wen_s(0) <= wen;
1241
  wen_s(1) <= wen;
1242
  wen_s(2) <= wen;
1243
  wen_s(3) <= wen;
1244
  syncram0 : tsmc25_syncram_ss
1245
    generic map ( abits => 7, dbits => 27)
1246
    port map (
1247
    CLK => CLK,
1248
    CEN => CEN,
1249
    WEN => wen_s,
1250
    A   => A,
1251
    D   => D,
1252
    Q   => Q
1253
    );
1254
end behavioral;
1255
 
1256
library ieee;
1257
use IEEE.std_logic_1164.all;
1258
use work.tech_tsmc25_sim.all;
1259
 
1260
entity ram64x27 is
1261
   port (
1262
   CLK: in std_logic;
1263
   CEN: in std_logic;
1264
   WEN: in std_logic;
1265
   A: in std_logic_vector(5 downto 0);
1266
   D: in std_logic_vector(26 downto 0);
1267
   Q: out std_logic_vector(26 downto 0)
1268
   );
1269
end;
1270
 
1271
architecture behavioral of ram64x27 is
1272
signal wen_s: std_logic_vector(3 downto 0);
1273
begin
1274
  wen_s(0) <= wen;
1275
  wen_s(1) <= wen;
1276
  wen_s(2) <= wen;
1277
  wen_s(3) <= wen;
1278
  syncram0 : tsmc25_syncram_ss
1279
    generic map ( abits => 6, dbits => 27)
1280
    port map (
1281
    CLK => CLK,
1282
    CEN => CEN,
1283
    WEN => wen_s,
1284
    A   => A,
1285
    D   => D,
1286
    Q   => Q
1287
    );
1288
end behavioral;
1289
 
1290
library ieee;
1291
use IEEE.std_logic_1164.all;
1292
use work.tech_tsmc25_sim.all;
1293
 
1294
entity ram2048x26 is
1295
   port (
1296
   CLK: in std_logic;
1297
   CEN: in std_logic;
1298
   WEN: in std_logic;
1299
   A: in std_logic_vector(10 downto 0);
1300
   D: in std_logic_vector(25 downto 0);
1301
   Q: out std_logic_vector(25 downto 0)
1302
   );
1303
end;
1304
 
1305
architecture behavioral of ram2048x26 is
1306
signal wen_s: std_logic_vector(3 downto 0);
1307
begin
1308
  wen_s(0) <= wen;
1309
  wen_s(1) <= wen;
1310
  wen_s(2) <= wen;
1311
  wen_s(3) <= wen;
1312
  syncram0 : tsmc25_syncram_ss
1313
    generic map ( abits => 11, dbits => 26)
1314
    port map (
1315
    CLK => CLK,
1316
    CEN => CEN,
1317
    WEN => wen_s,
1318
    A   => A,
1319
    D   => D,
1320
    Q   => Q
1321
    );
1322
end behavioral;
1323
 
1324
library ieee;
1325
use IEEE.std_logic_1164.all;
1326
use work.tech_tsmc25_sim.all;
1327
 
1328
entity ram1024x26 is
1329
   port (
1330
   CLK: in std_logic;
1331
   CEN: in std_logic;
1332
   WEN: in std_logic;
1333
   A: in std_logic_vector(9 downto 0);
1334
   D: in std_logic_vector(25 downto 0);
1335
   Q: out std_logic_vector(25 downto 0)
1336
   );
1337
end;
1338
 
1339
architecture behavioral of ram1024x26 is
1340
signal wen_s: std_logic_vector(3 downto 0);
1341
begin
1342
  wen_s(0) <= wen;
1343
  wen_s(1) <= wen;
1344
  wen_s(2) <= wen;
1345
  wen_s(3) <= wen;
1346
  syncram0 : tsmc25_syncram_ss
1347
    generic map ( abits => 10, dbits => 26)
1348
    port map (
1349
    CLK => CLK,
1350
    CEN => CEN,
1351
    WEN => wen_s,
1352
    A   => A,
1353
    D   => D,
1354
    Q   => Q
1355
    );
1356
end behavioral;
1357
 
1358
library ieee;
1359
use IEEE.std_logic_1164.all;
1360
use work.tech_tsmc25_sim.all;
1361
 
1362
entity ram512x26 is
1363
   port (
1364
   CLK: in std_logic;
1365
   CEN: in std_logic;
1366
   WEN: in std_logic;
1367
   A: in std_logic_vector(8 downto 0);
1368
   D: in std_logic_vector(25 downto 0);
1369
   Q: out std_logic_vector(25 downto 0)
1370
   );
1371
end;
1372
 
1373
architecture behavioral of ram512x26 is
1374
signal wen_s: std_logic_vector(3 downto 0);
1375
begin
1376
  wen_s(0) <= wen;
1377
  wen_s(1) <= wen;
1378
  wen_s(2) <= wen;
1379
  wen_s(3) <= wen;
1380
  syncram0 : tsmc25_syncram_ss
1381
    generic map ( abits => 9, dbits => 26)
1382
    port map (
1383
    CLK => CLK,
1384
    CEN => CEN,
1385
    WEN => wen_s,
1386
    A   => A,
1387
    D   => D,
1388
    Q   => Q
1389
    );
1390
end behavioral;
1391
 
1392
library ieee;
1393
use IEEE.std_logic_1164.all;
1394
use work.tech_tsmc25_sim.all;
1395
 
1396
entity ram256x26 is
1397
   port (
1398
   CLK: in std_logic;
1399
   CEN: in std_logic;
1400
   WEN: in std_logic;
1401
   A: in std_logic_vector(7 downto 0);
1402
   D: in std_logic_vector(25 downto 0);
1403
   Q: out std_logic_vector(25 downto 0)
1404
   );
1405
end;
1406
 
1407
architecture behavioral of ram256x26 is
1408
signal wen_s: std_logic_vector(3 downto 0);
1409
begin
1410
  wen_s(0) <= wen;
1411
  wen_s(1) <= wen;
1412
  wen_s(2) <= wen;
1413
  wen_s(3) <= wen;
1414
  syncram0 : tsmc25_syncram_ss
1415
    generic map ( abits => 8, dbits => 26)
1416
    port map (
1417
    CLK => CLK,
1418
    CEN => CEN,
1419
    WEN => wen_s,
1420
    A   => A,
1421
    D   => D,
1422
    Q   => Q
1423
    );
1424
end behavioral;
1425
 
1426
library ieee;
1427
use IEEE.std_logic_1164.all;
1428
use work.tech_tsmc25_sim.all;
1429
 
1430
entity ram128x26 is
1431
   port (
1432
   CLK: in std_logic;
1433
   CEN: in std_logic;
1434
   WEN: in std_logic;
1435
   A: in std_logic_vector(6 downto 0);
1436
   D: in std_logic_vector(25 downto 0);
1437
   Q: out std_logic_vector(25 downto 0)
1438
   );
1439
end;
1440
 
1441
architecture behavioral of ram128x26 is
1442
signal wen_s: std_logic_vector(3 downto 0);
1443
begin
1444
  wen_s(0) <= wen;
1445
  wen_s(1) <= wen;
1446
  wen_s(2) <= wen;
1447
  wen_s(3) <= wen;
1448
  syncram0 : tsmc25_syncram_ss
1449
    generic map ( abits => 7, dbits => 26)
1450
    port map (
1451
    CLK => CLK,
1452
    CEN => CEN,
1453
    WEN => wen_s,
1454
    A   => A,
1455
    D   => D,
1456
    Q   => Q
1457
    );
1458
end behavioral;
1459
 
1460
library ieee;
1461
use IEEE.std_logic_1164.all;
1462
use work.tech_tsmc25_sim.all;
1463
 
1464
entity ram64x26 is
1465
   port (
1466
   CLK: in std_logic;
1467
   CEN: in std_logic;
1468
   WEN: in std_logic;
1469
   A: in std_logic_vector(5 downto 0);
1470
   D: in std_logic_vector(25 downto 0);
1471
   Q: out std_logic_vector(25 downto 0)
1472
   );
1473
end;
1474
 
1475
architecture behavioral of ram64x26 is
1476
signal wen_s: std_logic_vector(3 downto 0);
1477
begin
1478
  wen_s(0) <= wen;
1479
  wen_s(1) <= wen;
1480
  wen_s(2) <= wen;
1481
  wen_s(3) <= wen;
1482
  syncram0 : tsmc25_syncram_ss
1483
    generic map ( abits => 6, dbits => 26)
1484
    port map (
1485
    CLK => CLK,
1486
    CEN => CEN,
1487
    WEN => wen_s,
1488
    A   => A,
1489
    D   => D,
1490
    Q   => Q
1491
    );
1492
end behavioral;
1493
 
1494
library ieee;
1495
use IEEE.std_logic_1164.all;
1496
use work.tech_tsmc25_sim.all;
1497
 
1498
entity ram2048x25 is
1499
   port (
1500
   CLK: in std_logic;
1501
   CEN: in std_logic;
1502
   WEN: in std_logic;
1503
   A: in std_logic_vector(10 downto 0);
1504
   D: in std_logic_vector(24 downto 0);
1505
   Q: out std_logic_vector(24 downto 0)
1506
   );
1507
end;
1508
 
1509
architecture behavioral of ram2048x25 is
1510
signal wen_s: std_logic_vector(3 downto 0);
1511
begin
1512
  wen_s(0) <= wen;
1513
  wen_s(1) <= wen;
1514
  wen_s(2) <= wen;
1515
  wen_s(3) <= wen;
1516
  syncram0 : tsmc25_syncram_ss
1517
    generic map ( abits => 11, dbits => 25)
1518
    port map (
1519
    CLK => CLK,
1520
    CEN => CEN,
1521
    WEN => wen_s,
1522
    A   => A,
1523
    D   => D,
1524
    Q   => Q
1525
    );
1526
end behavioral;
1527
 
1528
library ieee;
1529
use IEEE.std_logic_1164.all;
1530
use work.tech_tsmc25_sim.all;
1531
 
1532
entity ram1024x25 is
1533
   port (
1534
   CLK: in std_logic;
1535
   CEN: in std_logic;
1536
   WEN: in std_logic;
1537
   A: in std_logic_vector(9 downto 0);
1538
   D: in std_logic_vector(24 downto 0);
1539
   Q: out std_logic_vector(24 downto 0)
1540
   );
1541
end;
1542
 
1543
architecture behavioral of ram1024x25 is
1544
signal wen_s: std_logic_vector(3 downto 0);
1545
begin
1546
  wen_s(0) <= wen;
1547
  wen_s(1) <= wen;
1548
  wen_s(2) <= wen;
1549
  wen_s(3) <= wen;
1550
  syncram0 : tsmc25_syncram_ss
1551
    generic map ( abits => 10, dbits => 25)
1552
    port map (
1553
    CLK => CLK,
1554
    CEN => CEN,
1555
    WEN => wen_s,
1556
    A   => A,
1557
    D   => D,
1558
    Q   => Q
1559
    );
1560
end behavioral;
1561
 
1562
library ieee;
1563
use IEEE.std_logic_1164.all;
1564
use work.tech_tsmc25_sim.all;
1565
 
1566
entity ram512x25 is
1567
   port (
1568
   CLK: in std_logic;
1569
   CEN: in std_logic;
1570
   WEN: in std_logic;
1571
   A: in std_logic_vector(8 downto 0);
1572
   D: in std_logic_vector(24 downto 0);
1573
   Q: out std_logic_vector(24 downto 0)
1574
   );
1575
end;
1576
 
1577
architecture behavioral of ram512x25 is
1578
signal wen_s: std_logic_vector(3 downto 0);
1579
begin
1580
  wen_s(0) <= wen;
1581
  wen_s(1) <= wen;
1582
  wen_s(2) <= wen;
1583
  wen_s(3) <= wen;
1584
  syncram0 : tsmc25_syncram_ss
1585
    generic map ( abits => 9, dbits => 25)
1586
    port map (
1587
    CLK => CLK,
1588
    CEN => CEN,
1589
    WEN => wen_s,
1590
    A   => A,
1591
    D   => D,
1592
    Q   => Q
1593
    );
1594
end behavioral;
1595
 
1596
library ieee;
1597
use IEEE.std_logic_1164.all;
1598
use work.tech_tsmc25_sim.all;
1599
 
1600
entity ram256x25 is
1601
   port (
1602
   CLK: in std_logic;
1603
   CEN: in std_logic;
1604
   WEN: in std_logic;
1605
   A: in std_logic_vector(7 downto 0);
1606
   D: in std_logic_vector(24 downto 0);
1607
   Q: out std_logic_vector(24 downto 0)
1608
   );
1609
end;
1610
 
1611
architecture behavioral of ram256x25 is
1612
signal wen_s: std_logic_vector(3 downto 0);
1613
begin
1614
  wen_s(0) <= wen;
1615
  wen_s(1) <= wen;
1616
  wen_s(2) <= wen;
1617
  wen_s(3) <= wen;
1618
  syncram0 : tsmc25_syncram_ss
1619
    generic map ( abits => 8, dbits => 25)
1620
    port map (
1621
    CLK => CLK,
1622
    CEN => CEN,
1623
    WEN => wen_s,
1624
    A   => A,
1625
    D   => D,
1626
    Q   => Q
1627
    );
1628
end behavioral;
1629
 
1630
library ieee;
1631
use IEEE.std_logic_1164.all;
1632
use work.tech_tsmc25_sim.all;
1633
 
1634
entity ram128x25 is
1635
   port (
1636
   CLK: in std_logic;
1637
   CEN: in std_logic;
1638
   WEN: in std_logic;
1639
   A: in std_logic_vector(6 downto 0);
1640
   D: in std_logic_vector(24 downto 0);
1641
   Q: out std_logic_vector(24 downto 0)
1642
   );
1643
end;
1644
 
1645
architecture behavioral of ram128x25 is
1646
signal wen_s: std_logic_vector(3 downto 0);
1647
begin
1648
  wen_s(0) <= wen;
1649
  wen_s(1) <= wen;
1650
  wen_s(2) <= wen;
1651
  wen_s(3) <= wen;
1652
  syncram0 : tsmc25_syncram_ss
1653
    generic map ( abits => 7, dbits => 25)
1654
    port map (
1655
    CLK => CLK,
1656
    CEN => CEN,
1657
    WEN => wen_s,
1658
    A   => A,
1659
    D   => D,
1660
    Q   => Q
1661
    );
1662
end behavioral;
1663
 
1664
library ieee;
1665
use IEEE.std_logic_1164.all;
1666
use work.tech_tsmc25_sim.all;
1667
 
1668
entity ram2048x24 is
1669
   port (
1670
   CLK: in std_logic;
1671
   CEN: in std_logic;
1672
   WEN: in std_logic;
1673
   A: in std_logic_vector(10 downto 0);
1674
   D: in std_logic_vector(23 downto 0);
1675
   Q: out std_logic_vector(23 downto 0)
1676
   );
1677
end;
1678
 
1679
architecture behavioral of ram2048x24 is
1680
signal wen_s: std_logic_vector(3 downto 0);
1681
begin
1682
  wen_s(0) <= wen;
1683
  wen_s(1) <= wen;
1684
  wen_s(2) <= wen;
1685
  wen_s(3) <= wen;
1686
  syncram0 : tsmc25_syncram_ss
1687
    generic map ( abits => 11, dbits => 24)
1688
    port map (
1689
    CLK => CLK,
1690
    CEN => CEN,
1691
    WEN => wen_s,
1692
    A   => A,
1693
    D   => D,
1694
    Q   => Q
1695
    );
1696
end behavioral;
1697
 
1698
library ieee;
1699
use IEEE.std_logic_1164.all;
1700
use work.tech_tsmc25_sim.all;
1701
 
1702
entity ram1024x24 is
1703
   port (
1704
   CLK: in std_logic;
1705
   CEN: in std_logic;
1706
   WEN: in std_logic;
1707
   A: in std_logic_vector(9 downto 0);
1708
   D: in std_logic_vector(23 downto 0);
1709
   Q: out std_logic_vector(23 downto 0)
1710
   );
1711
end;
1712
 
1713
architecture behavioral of ram1024x24 is
1714
signal wen_s: std_logic_vector(3 downto 0);
1715
begin
1716
  wen_s(0) <= wen;
1717
  wen_s(1) <= wen;
1718
  wen_s(2) <= wen;
1719
  wen_s(3) <= wen;
1720
  syncram0 : tsmc25_syncram_ss
1721
    generic map ( abits => 10, dbits => 24)
1722
    port map (
1723
    CLK => CLK,
1724
    CEN => CEN,
1725
    WEN => wen_s,
1726
    A   => A,
1727
    D   => D,
1728
    Q   => Q
1729
    );
1730
end behavioral;
1731
 
1732
library ieee;
1733
use IEEE.std_logic_1164.all;
1734
use work.tech_tsmc25_sim.all;
1735
 
1736
entity ram512x24 is
1737
   port (
1738
   CLK: in std_logic;
1739
   CEN: in std_logic;
1740
   WEN: in std_logic;
1741
   A: in std_logic_vector(8 downto 0);
1742
   D: in std_logic_vector(23 downto 0);
1743
   Q: out std_logic_vector(23 downto 0)
1744
   );
1745
end;
1746
 
1747
architecture behavioral of ram512x24 is
1748
signal wen_s: std_logic_vector(3 downto 0);
1749
begin
1750
  wen_s(0) <= wen;
1751
  wen_s(1) <= wen;
1752
  wen_s(2) <= wen;
1753
  wen_s(3) <= wen;
1754
  syncram0 : tsmc25_syncram_ss
1755
    generic map ( abits => 9, dbits => 24)
1756
    port map (
1757
    CLK => CLK,
1758
    CEN => CEN,
1759
    WEN => wen_s,
1760
    A   => A,
1761
    D   => D,
1762
    Q   => Q
1763
    );
1764
end behavioral;
1765
 
1766
library ieee;
1767
use IEEE.std_logic_1164.all;
1768
use work.tech_tsmc25_sim.all;
1769
 
1770
entity ram256x24 is
1771
   port (
1772
   CLK: in std_logic;
1773
   CEN: in std_logic;
1774
   WEN: in std_logic;
1775
   A: in std_logic_vector(7 downto 0);
1776
   D: in std_logic_vector(23 downto 0);
1777
   Q: out std_logic_vector(23 downto 0)
1778
   );
1779
end;
1780
 
1781
architecture behavioral of ram256x24 is
1782
signal wen_s: std_logic_vector(3 downto 0);
1783
begin
1784
  wen_s(0) <= wen;
1785
  wen_s(1) <= wen;
1786
  wen_s(2) <= wen;
1787
  wen_s(3) <= wen;
1788
  syncram0 : tsmc25_syncram_ss
1789
    generic map ( abits => 8, dbits => 24)
1790
    port map (
1791
    CLK => CLK,
1792
    CEN => CEN,
1793
    WEN => wen_s,
1794
    A   => A,
1795
    D   => D,
1796
    Q   => Q
1797
    );
1798
end behavioral;
1799
 
1800
library ieee;
1801
use IEEE.std_logic_1164.all;
1802
use work.tech_tsmc25_sim.all;
1803
 
1804
entity ram2048x23 is
1805
   port (
1806
   CLK: in std_logic;
1807
   CEN: in std_logic;
1808
   WEN: in std_logic;
1809
   A: in std_logic_vector(10 downto 0);
1810
   D: in std_logic_vector(22 downto 0);
1811
   Q: out std_logic_vector(22 downto 0)
1812
   );
1813
end;
1814
 
1815
architecture behavioral of ram2048x23 is
1816
signal wen_s: std_logic_vector(3 downto 0);
1817
begin
1818
  wen_s(0) <= wen;
1819
  wen_s(1) <= wen;
1820
  wen_s(2) <= wen;
1821
  wen_s(3) <= wen;
1822
  syncram0 : tsmc25_syncram_ss
1823
    generic map ( abits => 11, dbits => 23)
1824
    port map (
1825
    CLK => CLK,
1826
    CEN => CEN,
1827
    WEN => wen_s,
1828
    A   => A,
1829
    D   => D,
1830
    Q   => Q
1831
    );
1832
end behavioral;
1833
 
1834
library ieee;
1835
use IEEE.std_logic_1164.all;
1836
use work.tech_tsmc25_sim.all;
1837
 
1838
entity ram1024x23 is
1839
   port (
1840
   CLK: in std_logic;
1841
   CEN: in std_logic;
1842
   WEN: in std_logic;
1843
   A: in std_logic_vector(9 downto 0);
1844
   D: in std_logic_vector(22 downto 0);
1845
   Q: out std_logic_vector(22 downto 0)
1846
   );
1847
end;
1848
 
1849
architecture behavioral of ram1024x23 is
1850
signal wen_s: std_logic_vector(3 downto 0);
1851
begin
1852
  wen_s(0) <= wen;
1853
  wen_s(1) <= wen;
1854
  wen_s(2) <= wen;
1855
  wen_s(3) <= wen;
1856
  syncram0 : tsmc25_syncram_ss
1857
    generic map ( abits => 10, dbits => 23)
1858
    port map (
1859
    CLK => CLK,
1860
    CEN => CEN,
1861
    WEN => wen_s,
1862
    A   => A,
1863
    D   => D,
1864
    Q   => Q
1865
    );
1866
end behavioral;
1867
 
1868
library ieee;
1869
use IEEE.std_logic_1164.all;
1870
use work.tech_tsmc25_sim.all;
1871
 
1872
entity ram512x23 is
1873
   port (
1874
   CLK: in std_logic;
1875
   CEN: in std_logic;
1876
   WEN: in std_logic;
1877
   A: in std_logic_vector(8 downto 0);
1878
   D: in std_logic_vector(22 downto 0);
1879
   Q: out std_logic_vector(22 downto 0)
1880
   );
1881
end;
1882
 
1883
architecture behavioral of ram512x23 is
1884
signal wen_s: std_logic_vector(3 downto 0);
1885
begin
1886
  wen_s(0) <= wen;
1887
  wen_s(1) <= wen;
1888
  wen_s(2) <= wen;
1889
  wen_s(3) <= wen;
1890
  syncram0 : tsmc25_syncram_ss
1891
    generic map ( abits => 9, dbits => 23)
1892
    port map (
1893
    CLK => CLK,
1894
    CEN => CEN,
1895
    WEN => wen_s,
1896
    A   => A,
1897
    D   => D,
1898
    Q   => Q
1899
    );
1900
end behavioral;
1901
 
1902
library ieee;
1903
use IEEE.std_logic_1164.all;
1904
use work.tech_tsmc25_sim.all;
1905
 
1906
entity ram4096x22 is
1907
   port (
1908
   CLK: in std_logic;
1909
   CEN: in std_logic;
1910
   WEN: in std_logic;
1911
   A: in std_logic_vector(11 downto 0);
1912
   D: in std_logic_vector(21 downto 0);
1913
   Q: out std_logic_vector(21 downto 0)
1914
   );
1915
end;
1916
 
1917
architecture behavioral of ram4096x22 is
1918
signal wen_s: std_logic_vector(3 downto 0);
1919
begin
1920
  wen_s(0) <= wen;
1921
  wen_s(1) <= wen;
1922
  wen_s(2) <= wen;
1923
  wen_s(3) <= wen;
1924
  syncram0 : tsmc25_syncram_ss
1925
    generic map ( abits => 12, dbits => 22)
1926
    port map (
1927
    CLK => CLK,
1928
    CEN => CEN,
1929
    WEN => wen_s,
1930
    A   => A,
1931
    D   => D,
1932
    Q   => Q
1933
    );
1934
end behavioral;
1935
 
1936
library ieee;
1937
use IEEE.std_logic_1164.all;
1938
use work.tech_tsmc25_sim.all;
1939
 
1940
entity ram2048x22 is
1941
   port (
1942
   CLK: in std_logic;
1943
   CEN: in std_logic;
1944
   WEN: in std_logic;
1945
   A: in std_logic_vector(10 downto 0);
1946
   D: in std_logic_vector(21 downto 0);
1947
   Q: out std_logic_vector(21 downto 0)
1948
   );
1949
end;
1950
 
1951
architecture behavioral of ram2048x22 is
1952
signal wen_s: std_logic_vector(3 downto 0);
1953
begin
1954
  wen_s(0) <= wen;
1955
  wen_s(1) <= wen;
1956
  wen_s(2) <= wen;
1957
  wen_s(3) <= wen;
1958
  syncram0 : tsmc25_syncram_ss
1959
    generic map ( abits => 11, dbits => 22)
1960
    port map (
1961
    CLK => CLK,
1962
    CEN => CEN,
1963
    WEN => wen_s,
1964
    A   => A,
1965
    D   => D,
1966
    Q   => Q
1967
    );
1968
end behavioral;
1969
 
1970
library ieee;
1971
use IEEE.std_logic_1164.all;
1972
use work.tech_tsmc25_sim.all;
1973
 
1974
entity ram1024x22 is
1975
   port (
1976
   CLK: in std_logic;
1977
   CEN: in std_logic;
1978
   WEN: in std_logic;
1979
   A: in std_logic_vector(9 downto 0);
1980
   D: in std_logic_vector(21 downto 0);
1981
   Q: out std_logic_vector(21 downto 0)
1982
   );
1983
end;
1984
 
1985
architecture behavioral of ram1024x22 is
1986
signal wen_s: std_logic_vector(3 downto 0);
1987
begin
1988
  wen_s(0) <= wen;
1989
  wen_s(1) <= wen;
1990
  wen_s(2) <= wen;
1991
  wen_s(3) <= wen;
1992
  syncram0 : tsmc25_syncram_ss
1993
    generic map ( abits => 10, dbits => 22)
1994
    port map (
1995
    CLK => CLK,
1996
    CEN => CEN,
1997
    WEN => wen_s,
1998
    A   => A,
1999
    D   => D,
2000
    Q   => Q
2001
    );
2002
end behavioral;
2003
 
2004
library ieee;
2005
use IEEE.std_logic_1164.all;
2006
use work.tech_tsmc25_sim.all;
2007
 
2008
entity ram4096x21 is
2009
   port (
2010
   CLK: in std_logic;
2011
   CEN: in std_logic;
2012
   WEN: in std_logic;
2013
   A: in std_logic_vector(11 downto 0);
2014
   D: in std_logic_vector(20 downto 0);
2015
   Q: out std_logic_vector(20 downto 0)
2016
   );
2017
end;
2018
 
2019
architecture behavioral of ram4096x21 is
2020
signal wen_s: std_logic_vector(3 downto 0);
2021
begin
2022
  wen_s(0) <= wen;
2023
  wen_s(1) <= wen;
2024
  wen_s(2) <= wen;
2025
  wen_s(3) <= wen;
2026
  syncram0 : tsmc25_syncram_ss
2027
    generic map ( abits => 12, dbits => 21)
2028
    port map (
2029
    CLK => CLK,
2030
    CEN => CEN,
2031
    WEN => wen_s,
2032
    A   => A,
2033
    D   => D,
2034
    Q   => Q
2035
    );
2036
end behavioral;
2037
 
2038
library ieee;
2039
use IEEE.std_logic_1164.all;
2040
use work.tech_tsmc25_sim.all;
2041
 
2042
entity ram2048x21 is
2043
   port (
2044
   CLK: in std_logic;
2045
   CEN: in std_logic;
2046
   WEN: in std_logic;
2047
   A: in std_logic_vector(10 downto 0);
2048
   D: in std_logic_vector(20 downto 0);
2049
   Q: out std_logic_vector(20 downto 0)
2050
   );
2051
end;
2052
 
2053
architecture behavioral of ram2048x21 is
2054
signal wen_s: std_logic_vector(3 downto 0);
2055
begin
2056
  wen_s(0) <= wen;
2057
  wen_s(1) <= wen;
2058
  wen_s(2) <= wen;
2059
  wen_s(3) <= wen;
2060
  syncram0 : tsmc25_syncram_ss
2061
    generic map ( abits => 11, dbits => 21)
2062
    port map (
2063
    CLK => CLK,
2064
    CEN => CEN,
2065
    WEN => wen_s,
2066
    A   => A,
2067
    D   => D,
2068
    Q   => Q
2069
    );
2070
end behavioral;
2071
 
2072
library ieee;
2073
use IEEE.std_logic_1164.all;
2074
use work.tech_tsmc25_sim.all;
2075
 
2076
entity ram4096x20 is
2077
   port (
2078
   CLK: in std_logic;
2079
   CEN: in std_logic;
2080
   WEN: in std_logic;
2081
   A: in std_logic_vector(11 downto 0);
2082
   D: in std_logic_vector(19 downto 0);
2083
   Q: out std_logic_vector(19 downto 0)
2084
   );
2085
end;
2086
 
2087
architecture behavioral of ram4096x20 is
2088
signal wen_s: std_logic_vector(3 downto 0);
2089
begin
2090
  wen_s(0) <= wen;
2091
  wen_s(1) <= wen;
2092
  wen_s(2) <= wen;
2093
  wen_s(3) <= wen;
2094
  syncram0 : tsmc25_syncram_ss
2095
    generic map ( abits => 12, dbits => 20)
2096
    port map (
2097
    CLK => CLK,
2098
    CEN => CEN,
2099
    WEN => wen_s,
2100
    A   => A,
2101
    D   => D,
2102
    Q   => Q
2103
    );
2104
end behavioral;
2105
 
2106
-- dpram simulation models
2107
 
2108
library ieee;
2109
use IEEE.std_logic_1164.all;
2110
use work.tech_tsmc25_sim.all;
2111
 
2112
entity dpram16x32 is
2113
   port (
2114
   CLKA: in std_logic;
2115
   CENA: in std_logic;
2116
   WENA: in std_logic;
2117
   AA: in std_logic_vector(3 downto 0);
2118
   DA: in std_logic_vector(31 downto 0);
2119
   QA: out std_logic_vector(31 downto 0);
2120
   CLKB: in std_logic;
2121
   CENB: in std_logic;
2122
   WENB: in std_logic;
2123
   AB: in std_logic_vector(3 downto 0);
2124
   DB: in std_logic_vector(31 downto 0);
2125
   QB: out std_logic_vector(31 downto 0)
2126
   );
2127
end;
2128
 
2129
architecture behavioral of dpram16x32 is
2130
begin
2131
dpram0: tsmc25_dpram_ss
2132
  generic map(
2133
    abits => 4,
2134
    dbits => 32,
2135
    words => 16)
2136
  port map (
2137
   CLKA => CLKA,
2138
   CENA => CENA,
2139
   WENA => WENA,
2140
   AA   => AA,
2141
   DA   => DA,
2142
   QA   => QA,
2143
   CLKB => CLKB,
2144
   CENB => CENB,
2145
   WENB => WENB,
2146
   AB   => AB,
2147
   DB   => DB,
2148
   QB   => QB
2149
  );
2150
end behavioral;
2151
 
2152
library ieee;
2153
use IEEE.std_logic_1164.all;
2154
use work.tech_tsmc25_sim.all;
2155
 
2156
entity dpram136x32 is
2157
   port (
2158
   CLKA: in std_logic;
2159
   CENA: in std_logic;
2160
   WENA: in std_logic;
2161
   AA: in std_logic_vector(7 downto 0);
2162
   DA: in std_logic_vector(31 downto 0);
2163
   QA: out std_logic_vector(31 downto 0);
2164
   CLKB: in std_logic;
2165
   CENB: in std_logic;
2166
   WENB: in std_logic;
2167
   AB: in std_logic_vector(7 downto 0);
2168
   DB: in std_logic_vector(31 downto 0);
2169
   QB: out std_logic_vector(31 downto 0)
2170
   );
2171
end;
2172
 
2173
architecture behavioral of dpram136x32 is
2174
begin
2175
dpram0: tsmc25_dpram_ss
2176
  generic map(
2177
    abits => 8,
2178
    dbits => 32,
2179
    words => 136)
2180
  port map (
2181
   CLKA => CLKA,
2182
   CENA => CENA,
2183
   WENA => WENA,
2184
   AA   => AA,
2185
   DA   => DA,
2186
   QA   => QA,
2187
   CLKB => CLKB,
2188
   CENB => CENB,
2189
   WENB => WENB,
2190
   AB   => AB,
2191
   DB   => DB,
2192
   QB   => QB
2193
  );
2194
end behavioral;
2195
 
2196
library ieee;
2197
use IEEE.std_logic_1164.all;
2198
use work.tech_tsmc25_sim.all;
2199
 
2200
entity dpram168x32 is
2201
   port (
2202
   CLKA: in std_logic;
2203
   CENA: in std_logic;
2204
   WENA: in std_logic;
2205
   AA: in std_logic_vector(7 downto 0);
2206
   DA: in std_logic_vector(31 downto 0);
2207
   QA: out std_logic_vector(31 downto 0);
2208
   CLKB: in std_logic;
2209
   CENB: in std_logic;
2210
   WENB: in std_logic;
2211
   AB: in std_logic_vector(7 downto 0);
2212
   DB: in std_logic_vector(31 downto 0);
2213
   QB: out std_logic_vector(31 downto 0)
2214
   );
2215
end;
2216
 
2217
architecture behavioral of dpram168x32 is
2218
begin
2219
dpram0: tsmc25_dpram_ss
2220
  generic map(
2221
    abits => 8,
2222
    dbits => 32,
2223
    words => 168)
2224
  port map (
2225
   CLKA => CLKA,
2226
   CENA => CENA,
2227
   WENA => WENA,
2228
   AA   => AA,
2229
   DA   => DA,
2230
   QA   => QA,
2231
   CLKB => CLKB,
2232
   CENB => CENB,
2233
   WENB => WENB,
2234
   AB   => AB,
2235
   DB   => DB,
2236
   QB   => QB
2237
  );
2238
end behavioral;
2239
 
2240
library ieee;
2241
use IEEE.std_logic_1164.all;
2242
use work.tech_tsmc25_sim.all;
2243
 
2244
entity dpram2048x32 is
2245
   port (
2246
   CLKA: in std_logic;
2247
   CENA: in std_logic;
2248
   WENA: in std_logic;
2249
   AA: in std_logic_vector(10 downto 0);
2250
   DA: in std_logic_vector(31 downto 0);
2251
   QA: out std_logic_vector(31 downto 0);
2252
   CLKB: in std_logic;
2253
   CENB: in std_logic;
2254
   WENB: in std_logic;
2255
   AB: in std_logic_vector(10 downto 0);
2256
   DB: in std_logic_vector(31 downto 0);
2257
   QB: out std_logic_vector(31 downto 0)
2258
   );
2259
end;
2260
 
2261
architecture behavioral of dpram2048x32 is
2262
begin
2263
dpram0: tsmc25_dpram_ss
2264
  generic map(
2265
    abits => 11,
2266
    dbits => 32,
2267
    words => 2048)
2268
  port map (
2269
   CLKA => CLKA,
2270
   CENA => CENA,
2271
   WENA => WENA,
2272
   AA   => AA,
2273
   DA   => DA,
2274
   QA   => QA,
2275
   CLKB => CLKB,
2276
   CENB => CENB,
2277
   WENB => WENB,
2278
   AB   => AB,
2279
   DB   => DB,
2280
   QB   => QB
2281
  );
2282
end behavioral;
2283
 
2284
library ieee;
2285
use IEEE.std_logic_1164.all;
2286
use work.tech_tsmc25_sim.all;
2287
 
2288
entity dpram1024x32 is
2289
   port (
2290
   CLKA: in std_logic;
2291
   CENA: in std_logic;
2292
   WENA: in std_logic;
2293
   AA: in std_logic_vector(9 downto 0);
2294
   DA: in std_logic_vector(31 downto 0);
2295
   QA: out std_logic_vector(31 downto 0);
2296
   CLKB: in std_logic;
2297
   CENB: in std_logic;
2298
   WENB: in std_logic;
2299
   AB: in std_logic_vector(9 downto 0);
2300
   DB: in std_logic_vector(31 downto 0);
2301
   QB: out std_logic_vector(31 downto 0)
2302
   );
2303
end;
2304
 
2305
architecture behavioral of dpram1024x32 is
2306
begin
2307
dpram0: tsmc25_dpram_ss
2308
  generic map(
2309
    abits => 10,
2310
    dbits => 32,
2311
    words => 1024)
2312
  port map (
2313
   CLKA => CLKA,
2314
   CENA => CENA,
2315
   WENA => WENA,
2316
   AA   => AA,
2317
   DA   => DA,
2318
   QA   => QA,
2319
   CLKB => CLKB,
2320
   CENB => CENB,
2321
   WENB => WENB,
2322
   AB   => AB,
2323
   DB   => DB,
2324
   QB   => QB
2325
  );
2326
end behavioral;
2327
 
2328
library ieee;
2329
use IEEE.std_logic_1164.all;
2330
use work.tech_tsmc25_sim.all;
2331
 
2332
entity dpram512x32 is
2333
   port (
2334
   CLKA: in std_logic;
2335
   CENA: in std_logic;
2336
   WENA: in std_logic;
2337
   AA: in std_logic_vector(8 downto 0);
2338
   DA: in std_logic_vector(31 downto 0);
2339
   QA: out std_logic_vector(31 downto 0);
2340
   CLKB: in std_logic;
2341
   CENB: in std_logic;
2342
   WENB: in std_logic;
2343
   AB: in std_logic_vector(8 downto 0);
2344
   DB: in std_logic_vector(31 downto 0);
2345
   QB: out std_logic_vector(31 downto 0)
2346
   );
2347
end;
2348
 
2349
architecture behavioral of dpram512x32 is
2350
begin
2351
dpram0: tsmc25_dpram_ss
2352
  generic map(
2353
    abits => 9,
2354
    dbits => 32,
2355
    words => 512)
2356
  port map (
2357
   CLKA => CLKA,
2358
   CENA => CENA,
2359
   WENA => WENA,
2360
   AA   => AA,
2361
   DA   => DA,
2362
   QA   => QA,
2363
   CLKB => CLKB,
2364
   CENB => CENB,
2365
   WENB => WENB,
2366
   AB   => AB,
2367
   DB   => DB,
2368
   QB   => QB
2369
  );
2370
end behavioral;
2371
 
2372
library ieee;
2373
use IEEE.std_logic_1164.all;
2374
use work.tech_tsmc25_sim.all;
2375
 
2376
entity dpram256x32 is
2377
   port (
2378
   CLKA: in std_logic;
2379
   CENA: in std_logic;
2380
   WENA: in std_logic;
2381
   AA: in std_logic_vector(7 downto 0);
2382
   DA: in std_logic_vector(31 downto 0);
2383
   QA: out std_logic_vector(31 downto 0);
2384
   CLKB: in std_logic;
2385
   CENB: in std_logic;
2386
   WENB: in std_logic;
2387
   AB: in std_logic_vector(7 downto 0);
2388
   DB: in std_logic_vector(31 downto 0);
2389
   QB: out std_logic_vector(31 downto 0)
2390
   );
2391
end;
2392
 
2393
architecture behavioral of dpram256x32 is
2394
begin
2395
dpram0: tsmc25_dpram_ss
2396
  generic map(
2397
    abits => 8,
2398
    dbits => 32,
2399
    words => 256)
2400
  port map (
2401
   CLKA => CLKA,
2402
   CENA => CENA,
2403
   WENA => WENA,
2404
   AA   => AA,
2405
   DA   => DA,
2406
   QA   => QA,
2407
   CLKB => CLKB,
2408
   CENB => CENB,
2409
   WENB => WENB,
2410
   AB   => AB,
2411
   DB   => DB,
2412
   QB   => QB
2413
  );
2414
end behavioral;
2415
 
2416
library ieee;
2417
use IEEE.std_logic_1164.all;
2418
use work.tech_tsmc25_sim.all;
2419
 
2420
entity dpram128x32 is
2421
   port (
2422
   CLKA: in std_logic;
2423
   CENA: in std_logic;
2424
   WENA: in std_logic;
2425
   AA: in std_logic_vector(6 downto 0);
2426
   DA: in std_logic_vector(31 downto 0);
2427
   QA: out std_logic_vector(31 downto 0);
2428
   CLKB: in std_logic;
2429
   CENB: in std_logic;
2430
   WENB: in std_logic;
2431
   AB: in std_logic_vector(6 downto 0);
2432
   DB: in std_logic_vector(31 downto 0);
2433
   QB: out std_logic_vector(31 downto 0)
2434
   );
2435
end;
2436
 
2437
architecture behavioral of dpram128x32 is
2438
begin
2439
dpram0: tsmc25_dpram_ss
2440
  generic map(
2441
    abits => 7,
2442
    dbits => 32,
2443
    words => 128)
2444
  port map (
2445
   CLKA => CLKA,
2446
   CENA => CENA,
2447
   WENA => WENA,
2448
   AA   => AA,
2449
   DA   => DA,
2450
   QA   => QA,
2451
   CLKB => CLKB,
2452
   CENB => CENB,
2453
   WENB => WENB,
2454
   AB   => AB,
2455
   DB   => DB,
2456
   QB   => QB
2457
  );
2458
end behavioral;
2459
 
2460
library ieee;
2461
use IEEE.std_logic_1164.all;
2462
use work.tech_tsmc25_sim.all;
2463
 
2464
entity dpram64x32 is
2465
   port (
2466
   CLKA: in std_logic;
2467
   CENA: in std_logic;
2468
   WENA: in std_logic;
2469
   AA: in std_logic_vector(5 downto 0);
2470
   DA: in std_logic_vector(31 downto 0);
2471
   QA: out std_logic_vector(31 downto 0);
2472
   CLKB: in std_logic;
2473
   CENB: in std_logic;
2474
   WENB: in std_logic;
2475
   AB: in std_logic_vector(5 downto 0);
2476
   DB: in std_logic_vector(31 downto 0);
2477
   QB: out std_logic_vector(31 downto 0)
2478
   );
2479
end;
2480
 
2481
architecture behavioral of dpram64x32 is
2482
begin
2483
dpram0: tsmc25_dpram_ss
2484
  generic map(
2485
    abits => 6,
2486
    dbits => 32,
2487
    words => 64)
2488
  port map (
2489
   CLKA => CLKA,
2490
   CENA => CENA,
2491
   WENA => WENA,
2492
   AA   => AA,
2493
   DA   => DA,
2494
   QA   => QA,
2495
   CLKB => CLKB,
2496
   CENB => CENB,
2497
   WENB => WENB,
2498
   AB   => AB,
2499
   DB   => DB,
2500
   QB   => QB
2501
  );
2502
end behavioral;
2503
 
2504
library ieee;
2505
use IEEE.std_logic_1164.all;
2506
use work.tech_tsmc25_sim.all;
2507
 
2508
entity dpram32x32 is
2509
   port (
2510
   CLKA: in std_logic;
2511
   CENA: in std_logic;
2512
   WENA: in std_logic;
2513
   AA: in std_logic_vector(4 downto 0);
2514
   DA: in std_logic_vector(31 downto 0);
2515
   QA: out std_logic_vector(31 downto 0);
2516
   CLKB: in std_logic;
2517
   CENB: in std_logic;
2518
   WENB: in std_logic;
2519
   AB: in std_logic_vector(4 downto 0);
2520
   DB: in std_logic_vector(31 downto 0);
2521
   QB: out std_logic_vector(31 downto 0)
2522
   );
2523
end;
2524
 
2525
architecture behavioral of dpram32x32 is
2526
begin
2527
dpram0: tsmc25_dpram_ss
2528
  generic map(
2529
    abits => 5,
2530
    dbits => 32,
2531
    words => 32)
2532
  port map (
2533
   CLKA => CLKA,
2534
   CENA => CENA,
2535
   WENA => WENA,
2536
   AA   => AA,
2537
   DA   => DA,
2538
   QA   => QA,
2539
   CLKB => CLKB,
2540
   CENB => CENB,
2541
   WENB => WENB,
2542
   AB   => AB,
2543
   DB   => DB,
2544
   QB   => QB
2545
  );
2546
end behavioral;
2547
 
2548
library ieee;
2549
use IEEE.std_logic_1164.all;
2550
use work.tech_tsmc25_sim.all;
2551
 
2552
entity dpram64x31 is
2553
   port (
2554
   CLKA: in std_logic;
2555
   CENA: in std_logic;
2556
   WENA: in std_logic;
2557
   AA: in std_logic_vector(5 downto 0);
2558
   DA: in std_logic_vector(30 downto 0);
2559
   QA: out std_logic_vector(30 downto 0);
2560
   CLKB: in std_logic;
2561
   CENB: in std_logic;
2562
   WENB: in std_logic;
2563
   AB: in std_logic_vector(5 downto 0);
2564
   DB: in std_logic_vector(30 downto 0);
2565
   QB: out std_logic_vector(30 downto 0)
2566
   );
2567
end;
2568
 
2569
architecture behavioral of dpram64x31 is
2570
begin
2571
dpram0: tsmc25_dpram_ss
2572
  generic map(
2573
    abits => 6,
2574
    dbits => 31,
2575
    words => 64)
2576
  port map (
2577
   CLKA => CLKA,
2578
   CENA => CENA,
2579
   WENA => WENA,
2580
   AA   => AA,
2581
   DA   => DA,
2582
   QA   => QA,
2583
   CLKB => CLKB,
2584
   CENB => CENB,
2585
   WENB => WENB,
2586
   AB   => AB,
2587
   DB   => DB,
2588
   QB   => QB
2589
  );
2590
end behavioral;
2591
 
2592
library ieee;
2593
use IEEE.std_logic_1164.all;
2594
use work.tech_tsmc25_sim.all;
2595
 
2596
entity dpram32x31 is
2597
   port (
2598
   CLKA: in std_logic;
2599
   CENA: in std_logic;
2600
   WENA: in std_logic;
2601
   AA: in std_logic_vector(4 downto 0);
2602
   DA: in std_logic_vector(30 downto 0);
2603
   QA: out std_logic_vector(30 downto 0);
2604
   CLKB: in std_logic;
2605
   CENB: in std_logic;
2606
   WENB: in std_logic;
2607
   AB: in std_logic_vector(4 downto 0);
2608
   DB: in std_logic_vector(30 downto 0);
2609
   QB: out std_logic_vector(30 downto 0)
2610
   );
2611
end;
2612
 
2613
architecture behavioral of dpram32x31 is
2614
begin
2615
dpram0: tsmc25_dpram_ss
2616
  generic map(
2617
    abits => 5,
2618
    dbits => 31,
2619
    words => 32)
2620
  port map (
2621
   CLKA => CLKA,
2622
   CENA => CENA,
2623
   WENA => WENA,
2624
   AA   => AA,
2625
   DA   => DA,
2626
   QA   => QA,
2627
   CLKB => CLKB,
2628
   CENB => CENB,
2629
   WENB => WENB,
2630
   AB   => AB,
2631
   DB   => DB,
2632
   QB   => QB
2633
  );
2634
end behavioral;
2635
 
2636
library ieee;
2637
use IEEE.std_logic_1164.all;
2638
use work.tech_tsmc25_sim.all;
2639
 
2640
entity dpram128x30 is
2641
   port (
2642
   CLKA: in std_logic;
2643
   CENA: in std_logic;
2644
   WENA: in std_logic;
2645
   AA: in std_logic_vector(6 downto 0);
2646
   DA: in std_logic_vector(29 downto 0);
2647
   QA: out std_logic_vector(29 downto 0);
2648
   CLKB: in std_logic;
2649
   CENB: in std_logic;
2650
   WENB: in std_logic;
2651
   AB: in std_logic_vector(6 downto 0);
2652
   DB: in std_logic_vector(29 downto 0);
2653
   QB: out std_logic_vector(29 downto 0)
2654
   );
2655
end;
2656
 
2657
architecture behavioral of dpram128x30 is
2658
begin
2659
dpram0: tsmc25_dpram_ss
2660
  generic map(
2661
    abits => 7,
2662
    dbits => 30,
2663
    words => 128)
2664
  port map (
2665
   CLKA => CLKA,
2666
   CENA => CENA,
2667
   WENA => WENA,
2668
   AA   => AA,
2669
   DA   => DA,
2670
   QA   => QA,
2671
   CLKB => CLKB,
2672
   CENB => CENB,
2673
   WENB => WENB,
2674
   AB   => AB,
2675
   DB   => DB,
2676
   QB   => QB
2677
  );
2678
end behavioral;
2679
 
2680
library ieee;
2681
use IEEE.std_logic_1164.all;
2682
use work.tech_tsmc25_sim.all;
2683
 
2684
entity dpram64x30 is
2685
   port (
2686
   CLKA: in std_logic;
2687
   CENA: in std_logic;
2688
   WENA: in std_logic;
2689
   AA: in std_logic_vector(5 downto 0);
2690
   DA: in std_logic_vector(29 downto 0);
2691
   QA: out std_logic_vector(29 downto 0);
2692
   CLKB: in std_logic;
2693
   CENB: in std_logic;
2694
   WENB: in std_logic;
2695
   AB: in std_logic_vector(5 downto 0);
2696
   DB: in std_logic_vector(29 downto 0);
2697
   QB: out std_logic_vector(29 downto 0)
2698
   );
2699
end;
2700
 
2701
architecture behavioral of dpram64x30 is
2702
begin
2703
dpram0: tsmc25_dpram_ss
2704
  generic map(
2705
    abits => 6,
2706
    dbits => 30,
2707
    words => 64)
2708
  port map (
2709
   CLKA => CLKA,
2710
   CENA => CENA,
2711
   WENA => WENA,
2712
   AA   => AA,
2713
   DA   => DA,
2714
   QA   => QA,
2715
   CLKB => CLKB,
2716
   CENB => CENB,
2717
   WENB => WENB,
2718
   AB   => AB,
2719
   DB   => DB,
2720
   QB   => QB
2721
  );
2722
end behavioral;
2723
 
2724
library ieee;
2725
use IEEE.std_logic_1164.all;
2726
use work.tech_tsmc25_sim.all;
2727
 
2728
entity dpram32x30 is
2729
   port (
2730
   CLKA: in std_logic;
2731
   CENA: in std_logic;
2732
   WENA: in std_logic;
2733
   AA: in std_logic_vector(4 downto 0);
2734
   DA: in std_logic_vector(29 downto 0);
2735
   QA: out std_logic_vector(29 downto 0);
2736
   CLKB: in std_logic;
2737
   CENB: in std_logic;
2738
   WENB: in std_logic;
2739
   AB: in std_logic_vector(4 downto 0);
2740
   DB: in std_logic_vector(29 downto 0);
2741
   QB: out std_logic_vector(29 downto 0)
2742
   );
2743
end;
2744
 
2745
architecture behavioral of dpram32x30 is
2746
begin
2747
dpram0: tsmc25_dpram_ss
2748
  generic map(
2749
    abits => 5,
2750
    dbits => 30,
2751
    words => 32)
2752
  port map (
2753
   CLKA => CLKA,
2754
   CENA => CENA,
2755
   WENA => WENA,
2756
   AA   => AA,
2757
   DA   => DA,
2758
   QA   => QA,
2759
   CLKB => CLKB,
2760
   CENB => CENB,
2761
   WENB => WENB,
2762
   AB   => AB,
2763
   DB   => DB,
2764
   QB   => QB
2765
  );
2766
end behavioral;
2767
 
2768
library ieee;
2769
use IEEE.std_logic_1164.all;
2770
use work.tech_tsmc25_sim.all;
2771
 
2772
entity dpram256x29 is
2773
   port (
2774
   CLKA: in std_logic;
2775
   CENA: in std_logic;
2776
   WENA: in std_logic;
2777
   AA: in std_logic_vector(7 downto 0);
2778
   DA: in std_logic_vector(28 downto 0);
2779
   QA: out std_logic_vector(28 downto 0);
2780
   CLKB: in std_logic;
2781
   CENB: in std_logic;
2782
   WENB: in std_logic;
2783
   AB: in std_logic_vector(7 downto 0);
2784
   DB: in std_logic_vector(28 downto 0);
2785
   QB: out std_logic_vector(28 downto 0)
2786
   );
2787
end;
2788
 
2789
architecture behavioral of dpram256x29 is
2790
begin
2791
dpram0: tsmc25_dpram_ss
2792
  generic map(
2793
    abits => 8,
2794
    dbits => 29,
2795
    words => 256)
2796
  port map (
2797
   CLKA => CLKA,
2798
   CENA => CENA,
2799
   WENA => WENA,
2800
   AA   => AA,
2801
   DA   => DA,
2802
   QA   => QA,
2803
   CLKB => CLKB,
2804
   CENB => CENB,
2805
   WENB => WENB,
2806
   AB   => AB,
2807
   DB   => DB,
2808
   QB   => QB
2809
  );
2810
end behavioral;
2811
 
2812
library ieee;
2813
use IEEE.std_logic_1164.all;
2814
use work.tech_tsmc25_sim.all;
2815
 
2816
entity dpram128x29 is
2817
   port (
2818
   CLKA: in std_logic;
2819
   CENA: in std_logic;
2820
   WENA: in std_logic;
2821
   AA: in std_logic_vector(6 downto 0);
2822
   DA: in std_logic_vector(28 downto 0);
2823
   QA: out std_logic_vector(28 downto 0);
2824
   CLKB: in std_logic;
2825
   CENB: in std_logic;
2826
   WENB: in std_logic;
2827
   AB: in std_logic_vector(6 downto 0);
2828
   DB: in std_logic_vector(28 downto 0);
2829
   QB: out std_logic_vector(28 downto 0)
2830
   );
2831
end;
2832
 
2833
architecture behavioral of dpram128x29 is
2834
begin
2835
dpram0: tsmc25_dpram_ss
2836
  generic map(
2837
    abits => 7,
2838
    dbits => 29,
2839
    words => 128)
2840
  port map (
2841
   CLKA => CLKA,
2842
   CENA => CENA,
2843
   WENA => WENA,
2844
   AA   => AA,
2845
   DA   => DA,
2846
   QA   => QA,
2847
   CLKB => CLKB,
2848
   CENB => CENB,
2849
   WENB => WENB,
2850
   AB   => AB,
2851
   DB   => DB,
2852
   QB   => QB
2853
  );
2854
end behavioral;
2855
 
2856
library ieee;
2857
use IEEE.std_logic_1164.all;
2858
use work.tech_tsmc25_sim.all;
2859
 
2860
entity dpram64x29 is
2861
   port (
2862
   CLKA: in std_logic;
2863
   CENA: in std_logic;
2864
   WENA: in std_logic;
2865
   AA: in std_logic_vector(5 downto 0);
2866
   DA: in std_logic_vector(28 downto 0);
2867
   QA: out std_logic_vector(28 downto 0);
2868
   CLKB: in std_logic;
2869
   CENB: in std_logic;
2870
   WENB: in std_logic;
2871
   AB: in std_logic_vector(5 downto 0);
2872
   DB: in std_logic_vector(28 downto 0);
2873
   QB: out std_logic_vector(28 downto 0)
2874
   );
2875
end;
2876
 
2877
architecture behavioral of dpram64x29 is
2878
begin
2879
dpram0: tsmc25_dpram_ss
2880
  generic map(
2881
    abits => 6,
2882
    dbits => 29,
2883
    words => 64)
2884
  port map (
2885
   CLKA => CLKA,
2886
   CENA => CENA,
2887
   WENA => WENA,
2888
   AA   => AA,
2889
   DA   => DA,
2890
   QA   => QA,
2891
   CLKB => CLKB,
2892
   CENB => CENB,
2893
   WENB => WENB,
2894
   AB   => AB,
2895
   DB   => DB,
2896
   QB   => QB
2897
  );
2898
end behavioral;
2899
 
2900
library ieee;
2901
use IEEE.std_logic_1164.all;
2902
use work.tech_tsmc25_sim.all;
2903
 
2904
entity dpram512x28 is
2905
   port (
2906
   CLKA: in std_logic;
2907
   CENA: in std_logic;
2908
   WENA: in std_logic;
2909
   AA: in std_logic_vector(8 downto 0);
2910
   DA: in std_logic_vector(27 downto 0);
2911
   QA: out std_logic_vector(27 downto 0);
2912
   CLKB: in std_logic;
2913
   CENB: in std_logic;
2914
   WENB: in std_logic;
2915
   AB: in std_logic_vector(8 downto 0);
2916
   DB: in std_logic_vector(27 downto 0);
2917
   QB: out std_logic_vector(27 downto 0)
2918
   );
2919
end;
2920
 
2921
architecture behavioral of dpram512x28 is
2922
begin
2923
dpram0: tsmc25_dpram_ss
2924
  generic map(
2925
    abits => 9,
2926
    dbits => 28,
2927
    words => 512)
2928
  port map (
2929
   CLKA => CLKA,
2930
   CENA => CENA,
2931
   WENA => WENA,
2932
   AA   => AA,
2933
   DA   => DA,
2934
   QA   => QA,
2935
   CLKB => CLKB,
2936
   CENB => CENB,
2937
   WENB => WENB,
2938
   AB   => AB,
2939
   DB   => DB,
2940
   QB   => QB
2941
  );
2942
end behavioral;
2943
 
2944
library ieee;
2945
use IEEE.std_logic_1164.all;
2946
use work.tech_tsmc25_sim.all;
2947
 
2948
entity dpram256x28 is
2949
   port (
2950
   CLKA: in std_logic;
2951
   CENA: in std_logic;
2952
   WENA: in std_logic;
2953
   AA: in std_logic_vector(7 downto 0);
2954
   DA: in std_logic_vector(27 downto 0);
2955
   QA: out std_logic_vector(27 downto 0);
2956
   CLKB: in std_logic;
2957
   CENB: in std_logic;
2958
   WENB: in std_logic;
2959
   AB: in std_logic_vector(7 downto 0);
2960
   DB: in std_logic_vector(27 downto 0);
2961
   QB: out std_logic_vector(27 downto 0)
2962
   );
2963
end;
2964
 
2965
architecture behavioral of dpram256x28 is
2966
begin
2967
dpram0: tsmc25_dpram_ss
2968
  generic map(
2969
    abits => 8,
2970
    dbits => 28,
2971
    words => 256)
2972
  port map (
2973
   CLKA => CLKA,
2974
   CENA => CENA,
2975
   WENA => WENA,
2976
   AA   => AA,
2977
   DA   => DA,
2978
   QA   => QA,
2979
   CLKB => CLKB,
2980
   CENB => CENB,
2981
   WENB => WENB,
2982
   AB   => AB,
2983
   DB   => DB,
2984
   QB   => QB
2985
  );
2986
end behavioral;
2987
 
2988
library ieee;
2989
use IEEE.std_logic_1164.all;
2990
use work.tech_tsmc25_sim.all;
2991
 
2992
entity dpram128x28 is
2993
   port (
2994
   CLKA: in std_logic;
2995
   CENA: in std_logic;
2996
   WENA: in std_logic;
2997
   AA: in std_logic_vector(6 downto 0);
2998
   DA: in std_logic_vector(27 downto 0);
2999
   QA: out std_logic_vector(27 downto 0);
3000
   CLKB: in std_logic;
3001
   CENB: in std_logic;
3002
   WENB: in std_logic;
3003
   AB: in std_logic_vector(6 downto 0);
3004
   DB: in std_logic_vector(27 downto 0);
3005
   QB: out std_logic_vector(27 downto 0)
3006
   );
3007
end;
3008
 
3009
architecture behavioral of dpram128x28 is
3010
begin
3011
dpram0: tsmc25_dpram_ss
3012
  generic map(
3013
    abits => 7,
3014
    dbits => 28,
3015
    words => 128)
3016
  port map (
3017
   CLKA => CLKA,
3018
   CENA => CENA,
3019
   WENA => WENA,
3020
   AA   => AA,
3021
   DA   => DA,
3022
   QA   => QA,
3023
   CLKB => CLKB,
3024
   CENB => CENB,
3025
   WENB => WENB,
3026
   AB   => AB,
3027
   DB   => DB,
3028
   QB   => QB
3029
  );
3030
end behavioral;
3031
 
3032
library ieee;
3033
use IEEE.std_logic_1164.all;
3034
use work.tech_tsmc25_sim.all;
3035
 
3036
entity dpram64x28 is
3037
   port (
3038
   CLKA: in std_logic;
3039
   CENA: in std_logic;
3040
   WENA: in std_logic;
3041
   AA: in std_logic_vector(5 downto 0);
3042
   DA: in std_logic_vector(27 downto 0);
3043
   QA: out std_logic_vector(27 downto 0);
3044
   CLKB: in std_logic;
3045
   CENB: in std_logic;
3046
   WENB: in std_logic;
3047
   AB: in std_logic_vector(5 downto 0);
3048
   DB: in std_logic_vector(27 downto 0);
3049
   QB: out std_logic_vector(27 downto 0)
3050
   );
3051
end;
3052
 
3053
architecture behavioral of dpram64x28 is
3054
begin
3055
dpram0: tsmc25_dpram_ss
3056
  generic map(
3057
    abits => 6,
3058
    dbits => 28,
3059
    words => 64)
3060
  port map (
3061
   CLKA => CLKA,
3062
   CENA => CENA,
3063
   WENA => WENA,
3064
   AA   => AA,
3065
   DA   => DA,
3066
   QA   => QA,
3067
   CLKB => CLKB,
3068
   CENB => CENB,
3069
   WENB => WENB,
3070
   AB   => AB,
3071
   DB   => DB,
3072
   QB   => QB
3073
  );
3074
end behavioral;
3075
 
3076
library ieee;
3077
use IEEE.std_logic_1164.all;
3078
use work.tech_tsmc25_sim.all;
3079
 
3080
entity dpram1024x27 is
3081
   port (
3082
   CLKA: in std_logic;
3083
   CENA: in std_logic;
3084
   WENA: in std_logic;
3085
   AA: in std_logic_vector(9 downto 0);
3086
   DA: in std_logic_vector(26 downto 0);
3087
   QA: out std_logic_vector(26 downto 0);
3088
   CLKB: in std_logic;
3089
   CENB: in std_logic;
3090
   WENB: in std_logic;
3091
   AB: in std_logic_vector(9 downto 0);
3092
   DB: in std_logic_vector(26 downto 0);
3093
   QB: out std_logic_vector(26 downto 0)
3094
   );
3095
end;
3096
 
3097
architecture behavioral of dpram1024x27 is
3098
begin
3099
dpram0: tsmc25_dpram_ss
3100
  generic map(
3101
    abits => 10,
3102
    dbits => 27,
3103
    words => 1024)
3104
  port map (
3105
   CLKA => CLKA,
3106
   CENA => CENA,
3107
   WENA => WENA,
3108
   AA   => AA,
3109
   DA   => DA,
3110
   QA   => QA,
3111
   CLKB => CLKB,
3112
   CENB => CENB,
3113
   WENB => WENB,
3114
   AB   => AB,
3115
   DB   => DB,
3116
   QB   => QB
3117
  );
3118
end behavioral;
3119
 
3120
library ieee;
3121
use IEEE.std_logic_1164.all;
3122
use work.tech_tsmc25_sim.all;
3123
 
3124
entity dpram512x27 is
3125
   port (
3126
   CLKA: in std_logic;
3127
   CENA: in std_logic;
3128
   WENA: in std_logic;
3129
   AA: in std_logic_vector(8 downto 0);
3130
   DA: in std_logic_vector(26 downto 0);
3131
   QA: out std_logic_vector(26 downto 0);
3132
   CLKB: in std_logic;
3133
   CENB: in std_logic;
3134
   WENB: in std_logic;
3135
   AB: in std_logic_vector(8 downto 0);
3136
   DB: in std_logic_vector(26 downto 0);
3137
   QB: out std_logic_vector(26 downto 0)
3138
   );
3139
end;
3140
 
3141
architecture behavioral of dpram512x27 is
3142
begin
3143
dpram0: tsmc25_dpram_ss
3144
  generic map(
3145
    abits => 9,
3146
    dbits => 27,
3147
    words => 512)
3148
  port map (
3149
   CLKA => CLKA,
3150
   CENA => CENA,
3151
   WENA => WENA,
3152
   AA   => AA,
3153
   DA   => DA,
3154
   QA   => QA,
3155
   CLKB => CLKB,
3156
   CENB => CENB,
3157
   WENB => WENB,
3158
   AB   => AB,
3159
   DB   => DB,
3160
   QB   => QB
3161
  );
3162
end behavioral;
3163
 
3164
library ieee;
3165
use IEEE.std_logic_1164.all;
3166
use work.tech_tsmc25_sim.all;
3167
 
3168
entity dpram256x27 is
3169
   port (
3170
   CLKA: in std_logic;
3171
   CENA: in std_logic;
3172
   WENA: in std_logic;
3173
   AA: in std_logic_vector(7 downto 0);
3174
   DA: in std_logic_vector(26 downto 0);
3175
   QA: out std_logic_vector(26 downto 0);
3176
   CLKB: in std_logic;
3177
   CENB: in std_logic;
3178
   WENB: in std_logic;
3179
   AB: in std_logic_vector(7 downto 0);
3180
   DB: in std_logic_vector(26 downto 0);
3181
   QB: out std_logic_vector(26 downto 0)
3182
   );
3183
end;
3184
 
3185
architecture behavioral of dpram256x27 is
3186
begin
3187
dpram0: tsmc25_dpram_ss
3188
  generic map(
3189
    abits => 8,
3190
    dbits => 27,
3191
    words => 256)
3192
  port map (
3193
   CLKA => CLKA,
3194
   CENA => CENA,
3195
   WENA => WENA,
3196
   AA   => AA,
3197
   DA   => DA,
3198
   QA   => QA,
3199
   CLKB => CLKB,
3200
   CENB => CENB,
3201
   WENB => WENB,
3202
   AB   => AB,
3203
   DB   => DB,
3204
   QB   => QB
3205
  );
3206
end behavioral;
3207
 
3208
library ieee;
3209
use IEEE.std_logic_1164.all;
3210
use work.tech_tsmc25_sim.all;
3211
 
3212
entity dpram128x27 is
3213
   port (
3214
   CLKA: in std_logic;
3215
   CENA: in std_logic;
3216
   WENA: in std_logic;
3217
   AA: in std_logic_vector(6 downto 0);
3218
   DA: in std_logic_vector(26 downto 0);
3219
   QA: out std_logic_vector(26 downto 0);
3220
   CLKB: in std_logic;
3221
   CENB: in std_logic;
3222
   WENB: in std_logic;
3223
   AB: in std_logic_vector(6 downto 0);
3224
   DB: in std_logic_vector(26 downto 0);
3225
   QB: out std_logic_vector(26 downto 0)
3226
   );
3227
end;
3228
 
3229
architecture behavioral of dpram128x27 is
3230
begin
3231
dpram0: tsmc25_dpram_ss
3232
  generic map(
3233
    abits => 7,
3234
    dbits => 27,
3235
    words => 128)
3236
  port map (
3237
   CLKA => CLKA,
3238
   CENA => CENA,
3239
   WENA => WENA,
3240
   AA   => AA,
3241
   DA   => DA,
3242
   QA   => QA,
3243
   CLKB => CLKB,
3244
   CENB => CENB,
3245
   WENB => WENB,
3246
   AB   => AB,
3247
   DB   => DB,
3248
   QB   => QB
3249
  );
3250
end behavioral;
3251
 
3252
library ieee;
3253
use IEEE.std_logic_1164.all;
3254
use work.tech_tsmc25_sim.all;
3255
 
3256
entity dpram64x27 is
3257
   port (
3258
   CLKA: in std_logic;
3259
   CENA: in std_logic;
3260
   WENA: in std_logic;
3261
   AA: in std_logic_vector(5 downto 0);
3262
   DA: in std_logic_vector(26 downto 0);
3263
   QA: out std_logic_vector(26 downto 0);
3264
   CLKB: in std_logic;
3265
   CENB: in std_logic;
3266
   WENB: in std_logic;
3267
   AB: in std_logic_vector(5 downto 0);
3268
   DB: in std_logic_vector(26 downto 0);
3269
   QB: out std_logic_vector(26 downto 0)
3270
   );
3271
end;
3272
 
3273
architecture behavioral of dpram64x27 is
3274
begin
3275
dpram0: tsmc25_dpram_ss
3276
  generic map(
3277
    abits => 6,
3278
    dbits => 27,
3279
    words => 64)
3280
  port map (
3281
   CLKA => CLKA,
3282
   CENA => CENA,
3283
   WENA => WENA,
3284
   AA   => AA,
3285
   DA   => DA,
3286
   QA   => QA,
3287
   CLKB => CLKB,
3288
   CENB => CENB,
3289
   WENB => WENB,
3290
   AB   => AB,
3291
   DB   => DB,
3292
   QB   => QB
3293
  );
3294
end behavioral;
3295
 
3296
library ieee;
3297
use IEEE.std_logic_1164.all;
3298
use work.tech_tsmc25_sim.all;
3299
 
3300
entity dpram2048x26 is
3301
   port (
3302
   CLKA: in std_logic;
3303
   CENA: in std_logic;
3304
   WENA: in std_logic;
3305
   AA: in std_logic_vector(10 downto 0);
3306
   DA: in std_logic_vector(25 downto 0);
3307
   QA: out std_logic_vector(25 downto 0);
3308
   CLKB: in std_logic;
3309
   CENB: in std_logic;
3310
   WENB: in std_logic;
3311
   AB: in std_logic_vector(10 downto 0);
3312
   DB: in std_logic_vector(25 downto 0);
3313
   QB: out std_logic_vector(25 downto 0)
3314
   );
3315
end;
3316
 
3317
architecture behavioral of dpram2048x26 is
3318
begin
3319
dpram0: tsmc25_dpram_ss
3320
  generic map(
3321
    abits => 11,
3322
    dbits => 26,
3323
    words => 2048)
3324
  port map (
3325
   CLKA => CLKA,
3326
   CENA => CENA,
3327
   WENA => WENA,
3328
   AA   => AA,
3329
   DA   => DA,
3330
   QA   => QA,
3331
   CLKB => CLKB,
3332
   CENB => CENB,
3333
   WENB => WENB,
3334
   AB   => AB,
3335
   DB   => DB,
3336
   QB   => QB
3337
  );
3338
end behavioral;
3339
 
3340
library ieee;
3341
use IEEE.std_logic_1164.all;
3342
use work.tech_tsmc25_sim.all;
3343
 
3344
entity dpram1024x26 is
3345
   port (
3346
   CLKA: in std_logic;
3347
   CENA: in std_logic;
3348
   WENA: in std_logic;
3349
   AA: in std_logic_vector(9 downto 0);
3350
   DA: in std_logic_vector(25 downto 0);
3351
   QA: out std_logic_vector(25 downto 0);
3352
   CLKB: in std_logic;
3353
   CENB: in std_logic;
3354
   WENB: in std_logic;
3355
   AB: in std_logic_vector(9 downto 0);
3356
   DB: in std_logic_vector(25 downto 0);
3357
   QB: out std_logic_vector(25 downto 0)
3358
   );
3359
end;
3360
 
3361
architecture behavioral of dpram1024x26 is
3362
begin
3363
dpram0: tsmc25_dpram_ss
3364
  generic map(
3365
    abits => 10,
3366
    dbits => 26,
3367
    words => 1024)
3368
  port map (
3369
   CLKA => CLKA,
3370
   CENA => CENA,
3371
   WENA => WENA,
3372
   AA   => AA,
3373
   DA   => DA,
3374
   QA   => QA,
3375
   CLKB => CLKB,
3376
   CENB => CENB,
3377
   WENB => WENB,
3378
   AB   => AB,
3379
   DB   => DB,
3380
   QB   => QB
3381
  );
3382
end behavioral;
3383
 
3384
library ieee;
3385
use IEEE.std_logic_1164.all;
3386
use work.tech_tsmc25_sim.all;
3387
 
3388
entity dpram512x26 is
3389
   port (
3390
   CLKA: in std_logic;
3391
   CENA: in std_logic;
3392
   WENA: in std_logic;
3393
   AA: in std_logic_vector(8 downto 0);
3394
   DA: in std_logic_vector(25 downto 0);
3395
   QA: out std_logic_vector(25 downto 0);
3396
   CLKB: in std_logic;
3397
   CENB: in std_logic;
3398
   WENB: in std_logic;
3399
   AB: in std_logic_vector(8 downto 0);
3400
   DB: in std_logic_vector(25 downto 0);
3401
   QB: out std_logic_vector(25 downto 0)
3402
   );
3403
end;
3404
 
3405
architecture behavioral of dpram512x26 is
3406
begin
3407
dpram0: tsmc25_dpram_ss
3408
  generic map(
3409
    abits => 9,
3410
    dbits => 26,
3411
    words => 512)
3412
  port map (
3413
   CLKA => CLKA,
3414
   CENA => CENA,
3415
   WENA => WENA,
3416
   AA   => AA,
3417
   DA   => DA,
3418
   QA   => QA,
3419
   CLKB => CLKB,
3420
   CENB => CENB,
3421
   WENB => WENB,
3422
   AB   => AB,
3423
   DB   => DB,
3424
   QB   => QB
3425
  );
3426
end behavioral;
3427
 
3428
library ieee;
3429
use IEEE.std_logic_1164.all;
3430
use work.tech_tsmc25_sim.all;
3431
 
3432
entity dpram256x26 is
3433
   port (
3434
   CLKA: in std_logic;
3435
   CENA: in std_logic;
3436
   WENA: in std_logic;
3437
   AA: in std_logic_vector(7 downto 0);
3438
   DA: in std_logic_vector(25 downto 0);
3439
   QA: out std_logic_vector(25 downto 0);
3440
   CLKB: in std_logic;
3441
   CENB: in std_logic;
3442
   WENB: in std_logic;
3443
   AB: in std_logic_vector(7 downto 0);
3444
   DB: in std_logic_vector(25 downto 0);
3445
   QB: out std_logic_vector(25 downto 0)
3446
   );
3447
end;
3448
 
3449
architecture behavioral of dpram256x26 is
3450
begin
3451
dpram0: tsmc25_dpram_ss
3452
  generic map(
3453
    abits => 8,
3454
    dbits => 26,
3455
    words => 256)
3456
  port map (
3457
   CLKA => CLKA,
3458
   CENA => CENA,
3459
   WENA => WENA,
3460
   AA   => AA,
3461
   DA   => DA,
3462
   QA   => QA,
3463
   CLKB => CLKB,
3464
   CENB => CENB,
3465
   WENB => WENB,
3466
   AB   => AB,
3467
   DB   => DB,
3468
   QB   => QB
3469
  );
3470
end behavioral;
3471
 
3472
library ieee;
3473
use IEEE.std_logic_1164.all;
3474
use work.tech_tsmc25_sim.all;
3475
 
3476
entity dpram128x26 is
3477
   port (
3478
   CLKA: in std_logic;
3479
   CENA: in std_logic;
3480
   WENA: in std_logic;
3481
   AA: in std_logic_vector(6 downto 0);
3482
   DA: in std_logic_vector(25 downto 0);
3483
   QA: out std_logic_vector(25 downto 0);
3484
   CLKB: in std_logic;
3485
   CENB: in std_logic;
3486
   WENB: in std_logic;
3487
   AB: in std_logic_vector(6 downto 0);
3488
   DB: in std_logic_vector(25 downto 0);
3489
   QB: out std_logic_vector(25 downto 0)
3490
   );
3491
end;
3492
 
3493
architecture behavioral of dpram128x26 is
3494
begin
3495
dpram0: tsmc25_dpram_ss
3496
  generic map(
3497
    abits => 7,
3498
    dbits => 26,
3499
    words => 128)
3500
  port map (
3501
   CLKA => CLKA,
3502
   CENA => CENA,
3503
   WENA => WENA,
3504
   AA   => AA,
3505
   DA   => DA,
3506
   QA   => QA,
3507
   CLKB => CLKB,
3508
   CENB => CENB,
3509
   WENB => WENB,
3510
   AB   => AB,
3511
   DB   => DB,
3512
   QB   => QB
3513
  );
3514
end behavioral;
3515
 
3516
library ieee;
3517
use IEEE.std_logic_1164.all;
3518
use work.tech_tsmc25_sim.all;
3519
 
3520
entity dpram64x26 is
3521
   port (
3522
   CLKA: in std_logic;
3523
   CENA: in std_logic;
3524
   WENA: in std_logic;
3525
   AA: in std_logic_vector(5 downto 0);
3526
   DA: in std_logic_vector(25 downto 0);
3527
   QA: out std_logic_vector(25 downto 0);
3528
   CLKB: in std_logic;
3529
   CENB: in std_logic;
3530
   WENB: in std_logic;
3531
   AB: in std_logic_vector(5 downto 0);
3532
   DB: in std_logic_vector(25 downto 0);
3533
   QB: out std_logic_vector(25 downto 0)
3534
   );
3535
end;
3536
 
3537
architecture behavioral of dpram64x26 is
3538
begin
3539
dpram0: tsmc25_dpram_ss
3540
  generic map(
3541
    abits => 6,
3542
    dbits => 26,
3543
    words => 64)
3544
  port map (
3545
   CLKA => CLKA,
3546
   CENA => CENA,
3547
   WENA => WENA,
3548
   AA   => AA,
3549
   DA   => DA,
3550
   QA   => QA,
3551
   CLKB => CLKB,
3552
   CENB => CENB,
3553
   WENB => WENB,
3554
   AB   => AB,
3555
   DB   => DB,
3556
   QB   => QB
3557
  );
3558
end behavioral;
3559
 
3560
library ieee;
3561
use IEEE.std_logic_1164.all;
3562
use work.tech_tsmc25_sim.all;
3563
 
3564
entity dpram2048x25 is
3565
   port (
3566
   CLKA: in std_logic;
3567
   CENA: in std_logic;
3568
   WENA: in std_logic;
3569
   AA: in std_logic_vector(10 downto 0);
3570
   DA: in std_logic_vector(24 downto 0);
3571
   QA: out std_logic_vector(24 downto 0);
3572
   CLKB: in std_logic;
3573
   CENB: in std_logic;
3574
   WENB: in std_logic;
3575
   AB: in std_logic_vector(10 downto 0);
3576
   DB: in std_logic_vector(24 downto 0);
3577
   QB: out std_logic_vector(24 downto 0)
3578
   );
3579
end;
3580
 
3581
architecture behavioral of dpram2048x25 is
3582
begin
3583
dpram0: tsmc25_dpram_ss
3584
  generic map(
3585
    abits => 11,
3586
    dbits => 25,
3587
    words => 2048)
3588
  port map (
3589
   CLKA => CLKA,
3590
   CENA => CENA,
3591
   WENA => WENA,
3592
   AA   => AA,
3593
   DA   => DA,
3594
   QA   => QA,
3595
   CLKB => CLKB,
3596
   CENB => CENB,
3597
   WENB => WENB,
3598
   AB   => AB,
3599
   DB   => DB,
3600
   QB   => QB
3601
  );
3602
end behavioral;
3603
 
3604
library ieee;
3605
use IEEE.std_logic_1164.all;
3606
use work.tech_tsmc25_sim.all;
3607
 
3608
entity dpram1024x25 is
3609
   port (
3610
   CLKA: in std_logic;
3611
   CENA: in std_logic;
3612
   WENA: in std_logic;
3613
   AA: in std_logic_vector(9 downto 0);
3614
   DA: in std_logic_vector(24 downto 0);
3615
   QA: out std_logic_vector(24 downto 0);
3616
   CLKB: in std_logic;
3617
   CENB: in std_logic;
3618
   WENB: in std_logic;
3619
   AB: in std_logic_vector(9 downto 0);
3620
   DB: in std_logic_vector(24 downto 0);
3621
   QB: out std_logic_vector(24 downto 0)
3622
   );
3623
end;
3624
 
3625
architecture behavioral of dpram1024x25 is
3626
begin
3627
dpram0: tsmc25_dpram_ss
3628
  generic map(
3629
    abits => 10,
3630
    dbits => 25,
3631
    words => 1024)
3632
  port map (
3633
   CLKA => CLKA,
3634
   CENA => CENA,
3635
   WENA => WENA,
3636
   AA   => AA,
3637
   DA   => DA,
3638
   QA   => QA,
3639
   CLKB => CLKB,
3640
   CENB => CENB,
3641
   WENB => WENB,
3642
   AB   => AB,
3643
   DB   => DB,
3644
   QB   => QB
3645
  );
3646
end behavioral;
3647
 
3648
library ieee;
3649
use IEEE.std_logic_1164.all;
3650
use work.tech_tsmc25_sim.all;
3651
 
3652
entity dpram512x25 is
3653
   port (
3654
   CLKA: in std_logic;
3655
   CENA: in std_logic;
3656
   WENA: in std_logic;
3657
   AA: in std_logic_vector(8 downto 0);
3658
   DA: in std_logic_vector(24 downto 0);
3659
   QA: out std_logic_vector(24 downto 0);
3660
   CLKB: in std_logic;
3661
   CENB: in std_logic;
3662
   WENB: in std_logic;
3663
   AB: in std_logic_vector(8 downto 0);
3664
   DB: in std_logic_vector(24 downto 0);
3665
   QB: out std_logic_vector(24 downto 0)
3666
   );
3667
end;
3668
 
3669
architecture behavioral of dpram512x25 is
3670
begin
3671
dpram0: tsmc25_dpram_ss
3672
  generic map(
3673
    abits => 9,
3674
    dbits => 25,
3675
    words => 512)
3676
  port map (
3677
   CLKA => CLKA,
3678
   CENA => CENA,
3679
   WENA => WENA,
3680
   AA   => AA,
3681
   DA   => DA,
3682
   QA   => QA,
3683
   CLKB => CLKB,
3684
   CENB => CENB,
3685
   WENB => WENB,
3686
   AB   => AB,
3687
   DB   => DB,
3688
   QB   => QB
3689
  );
3690
end behavioral;
3691
 
3692
library ieee;
3693
use IEEE.std_logic_1164.all;
3694
use work.tech_tsmc25_sim.all;
3695
 
3696
entity dpram256x25 is
3697
   port (
3698
   CLKA: in std_logic;
3699
   CENA: in std_logic;
3700
   WENA: in std_logic;
3701
   AA: in std_logic_vector(7 downto 0);
3702
   DA: in std_logic_vector(24 downto 0);
3703
   QA: out std_logic_vector(24 downto 0);
3704
   CLKB: in std_logic;
3705
   CENB: in std_logic;
3706
   WENB: in std_logic;
3707
   AB: in std_logic_vector(7 downto 0);
3708
   DB: in std_logic_vector(24 downto 0);
3709
   QB: out std_logic_vector(24 downto 0)
3710
   );
3711
end;
3712
 
3713
architecture behavioral of dpram256x25 is
3714
begin
3715
dpram0: tsmc25_dpram_ss
3716
  generic map(
3717
    abits => 8,
3718
    dbits => 25,
3719
    words => 256)
3720
  port map (
3721
   CLKA => CLKA,
3722
   CENA => CENA,
3723
   WENA => WENA,
3724
   AA   => AA,
3725
   DA   => DA,
3726
   QA   => QA,
3727
   CLKB => CLKB,
3728
   CENB => CENB,
3729
   WENB => WENB,
3730
   AB   => AB,
3731
   DB   => DB,
3732
   QB   => QB
3733
  );
3734
end behavioral;
3735
 
3736
library ieee;
3737
use IEEE.std_logic_1164.all;
3738
use work.tech_tsmc25_sim.all;
3739
 
3740
entity dpram128x25 is
3741
   port (
3742
   CLKA: in std_logic;
3743
   CENA: in std_logic;
3744
   WENA: in std_logic;
3745
   AA: in std_logic_vector(6 downto 0);
3746
   DA: in std_logic_vector(24 downto 0);
3747
   QA: out std_logic_vector(24 downto 0);
3748
   CLKB: in std_logic;
3749
   CENB: in std_logic;
3750
   WENB: in std_logic;
3751
   AB: in std_logic_vector(6 downto 0);
3752
   DB: in std_logic_vector(24 downto 0);
3753
   QB: out std_logic_vector(24 downto 0)
3754
   );
3755
end;
3756
 
3757
architecture behavioral of dpram128x25 is
3758
begin
3759
dpram0: tsmc25_dpram_ss
3760
  generic map(
3761
    abits => 7,
3762
    dbits => 25,
3763
    words => 128)
3764
  port map (
3765
   CLKA => CLKA,
3766
   CENA => CENA,
3767
   WENA => WENA,
3768
   AA   => AA,
3769
   DA   => DA,
3770
   QA   => QA,
3771
   CLKB => CLKB,
3772
   CENB => CENB,
3773
   WENB => WENB,
3774
   AB   => AB,
3775
   DB   => DB,
3776
   QB   => QB
3777
  );
3778
end behavioral;
3779
 
3780
library ieee;
3781
use IEEE.std_logic_1164.all;
3782
use work.tech_tsmc25_sim.all;
3783
 
3784
entity dpram2048x24 is
3785
   port (
3786
   CLKA: in std_logic;
3787
   CENA: in std_logic;
3788
   WENA: in std_logic;
3789
   AA: in std_logic_vector(10 downto 0);
3790
   DA: in std_logic_vector(23 downto 0);
3791
   QA: out std_logic_vector(23 downto 0);
3792
   CLKB: in std_logic;
3793
   CENB: in std_logic;
3794
   WENB: in std_logic;
3795
   AB: in std_logic_vector(10 downto 0);
3796
   DB: in std_logic_vector(23 downto 0);
3797
   QB: out std_logic_vector(23 downto 0)
3798
   );
3799
end;
3800
 
3801
architecture behavioral of dpram2048x24 is
3802
begin
3803
dpram0: tsmc25_dpram_ss
3804
  generic map(
3805
    abits => 11,
3806
    dbits => 24,
3807
    words => 2048)
3808
  port map (
3809
   CLKA => CLKA,
3810
   CENA => CENA,
3811
   WENA => WENA,
3812
   AA   => AA,
3813
   DA   => DA,
3814
   QA   => QA,
3815
   CLKB => CLKB,
3816
   CENB => CENB,
3817
   WENB => WENB,
3818
   AB   => AB,
3819
   DB   => DB,
3820
   QB   => QB
3821
  );
3822
end behavioral;
3823
 
3824
library ieee;
3825
use IEEE.std_logic_1164.all;
3826
use work.tech_tsmc25_sim.all;
3827
 
3828
entity dpram1024x24 is
3829
   port (
3830
   CLKA: in std_logic;
3831
   CENA: in std_logic;
3832
   WENA: in std_logic;
3833
   AA: in std_logic_vector(9 downto 0);
3834
   DA: in std_logic_vector(23 downto 0);
3835
   QA: out std_logic_vector(23 downto 0);
3836
   CLKB: in std_logic;
3837
   CENB: in std_logic;
3838
   WENB: in std_logic;
3839
   AB: in std_logic_vector(9 downto 0);
3840
   DB: in std_logic_vector(23 downto 0);
3841
   QB: out std_logic_vector(23 downto 0)
3842
   );
3843
end;
3844
 
3845
architecture behavioral of dpram1024x24 is
3846
begin
3847
dpram0: tsmc25_dpram_ss
3848
  generic map(
3849
    abits => 10,
3850
    dbits => 24,
3851
    words => 1024)
3852
  port map (
3853
   CLKA => CLKA,
3854
   CENA => CENA,
3855
   WENA => WENA,
3856
   AA   => AA,
3857
   DA   => DA,
3858
   QA   => QA,
3859
   CLKB => CLKB,
3860
   CENB => CENB,
3861
   WENB => WENB,
3862
   AB   => AB,
3863
   DB   => DB,
3864
   QB   => QB
3865
  );
3866
end behavioral;
3867
 
3868
library ieee;
3869
use IEEE.std_logic_1164.all;
3870
use work.tech_tsmc25_sim.all;
3871
 
3872
entity dpram512x24 is
3873
   port (
3874
   CLKA: in std_logic;
3875
   CENA: in std_logic;
3876
   WENA: in std_logic;
3877
   AA: in std_logic_vector(8 downto 0);
3878
   DA: in std_logic_vector(23 downto 0);
3879
   QA: out std_logic_vector(23 downto 0);
3880
   CLKB: in std_logic;
3881
   CENB: in std_logic;
3882
   WENB: in std_logic;
3883
   AB: in std_logic_vector(8 downto 0);
3884
   DB: in std_logic_vector(23 downto 0);
3885
   QB: out std_logic_vector(23 downto 0)
3886
   );
3887
end;
3888
 
3889
architecture behavioral of dpram512x24 is
3890
begin
3891
dpram0: tsmc25_dpram_ss
3892
  generic map(
3893
    abits => 9,
3894
    dbits => 24,
3895
    words => 512)
3896
  port map (
3897
   CLKA => CLKA,
3898
   CENA => CENA,
3899
   WENA => WENA,
3900
   AA   => AA,
3901
   DA   => DA,
3902
   QA   => QA,
3903
   CLKB => CLKB,
3904
   CENB => CENB,
3905
   WENB => WENB,
3906
   AB   => AB,
3907
   DB   => DB,
3908
   QB   => QB
3909
  );
3910
end behavioral;
3911
 
3912
library ieee;
3913
use IEEE.std_logic_1164.all;
3914
use work.tech_tsmc25_sim.all;
3915
 
3916
entity dpram256x24 is
3917
   port (
3918
   CLKA: in std_logic;
3919
   CENA: in std_logic;
3920
   WENA: in std_logic;
3921
   AA: in std_logic_vector(7 downto 0);
3922
   DA: in std_logic_vector(23 downto 0);
3923
   QA: out std_logic_vector(23 downto 0);
3924
   CLKB: in std_logic;
3925
   CENB: in std_logic;
3926
   WENB: in std_logic;
3927
   AB: in std_logic_vector(7 downto 0);
3928
   DB: in std_logic_vector(23 downto 0);
3929
   QB: out std_logic_vector(23 downto 0)
3930
   );
3931
end;
3932
 
3933
architecture behavioral of dpram256x24 is
3934
begin
3935
dpram0: tsmc25_dpram_ss
3936
  generic map(
3937
    abits => 8,
3938
    dbits => 24,
3939
    words => 256)
3940
  port map (
3941
   CLKA => CLKA,
3942
   CENA => CENA,
3943
   WENA => WENA,
3944
   AA   => AA,
3945
   DA   => DA,
3946
   QA   => QA,
3947
   CLKB => CLKB,
3948
   CENB => CENB,
3949
   WENB => WENB,
3950
   AB   => AB,
3951
   DB   => DB,
3952
   QB   => QB
3953
  );
3954
end behavioral;
3955
 
3956
library ieee;
3957
use IEEE.std_logic_1164.all;
3958
use work.tech_tsmc25_sim.all;
3959
 
3960
entity dpram2048x23 is
3961
   port (
3962
   CLKA: in std_logic;
3963
   CENA: in std_logic;
3964
   WENA: in std_logic;
3965
   AA: in std_logic_vector(10 downto 0);
3966
   DA: in std_logic_vector(22 downto 0);
3967
   QA: out std_logic_vector(22 downto 0);
3968
   CLKB: in std_logic;
3969
   CENB: in std_logic;
3970
   WENB: in std_logic;
3971
   AB: in std_logic_vector(10 downto 0);
3972
   DB: in std_logic_vector(22 downto 0);
3973
   QB: out std_logic_vector(22 downto 0)
3974
   );
3975
end;
3976
 
3977
architecture behavioral of dpram2048x23 is
3978
begin
3979
dpram0: tsmc25_dpram_ss
3980
  generic map(
3981
    abits => 11,
3982
    dbits => 23,
3983
    words => 2048)
3984
  port map (
3985
   CLKA => CLKA,
3986
   CENA => CENA,
3987
   WENA => WENA,
3988
   AA   => AA,
3989
   DA   => DA,
3990
   QA   => QA,
3991
   CLKB => CLKB,
3992
   CENB => CENB,
3993
   WENB => WENB,
3994
   AB   => AB,
3995
   DB   => DB,
3996
   QB   => QB
3997
  );
3998
end behavioral;
3999
 
4000
library ieee;
4001
use IEEE.std_logic_1164.all;
4002
use work.tech_tsmc25_sim.all;
4003
 
4004
entity dpram1024x23 is
4005
   port (
4006
   CLKA: in std_logic;
4007
   CENA: in std_logic;
4008
   WENA: in std_logic;
4009
   AA: in std_logic_vector(9 downto 0);
4010
   DA: in std_logic_vector(22 downto 0);
4011
   QA: out std_logic_vector(22 downto 0);
4012
   CLKB: in std_logic;
4013
   CENB: in std_logic;
4014
   WENB: in std_logic;
4015
   AB: in std_logic_vector(9 downto 0);
4016
   DB: in std_logic_vector(22 downto 0);
4017
   QB: out std_logic_vector(22 downto 0)
4018
   );
4019
end;
4020
 
4021
architecture behavioral of dpram1024x23 is
4022
begin
4023
dpram0: tsmc25_dpram_ss
4024
  generic map(
4025
    abits => 10,
4026
    dbits => 23,
4027
    words => 1024)
4028
  port map (
4029
   CLKA => CLKA,
4030
   CENA => CENA,
4031
   WENA => WENA,
4032
   AA   => AA,
4033
   DA   => DA,
4034
   QA   => QA,
4035
   CLKB => CLKB,
4036
   CENB => CENB,
4037
   WENB => WENB,
4038
   AB   => AB,
4039
   DB   => DB,
4040
   QB   => QB
4041
  );
4042
end behavioral;
4043
 
4044
library ieee;
4045
use IEEE.std_logic_1164.all;
4046
use work.tech_tsmc25_sim.all;
4047
 
4048
entity dpram512x23 is
4049
   port (
4050
   CLKA: in std_logic;
4051
   CENA: in std_logic;
4052
   WENA: in std_logic;
4053
   AA: in std_logic_vector(8 downto 0);
4054
   DA: in std_logic_vector(22 downto 0);
4055
   QA: out std_logic_vector(22 downto 0);
4056
   CLKB: in std_logic;
4057
   CENB: in std_logic;
4058
   WENB: in std_logic;
4059
   AB: in std_logic_vector(8 downto 0);
4060
   DB: in std_logic_vector(22 downto 0);
4061
   QB: out std_logic_vector(22 downto 0)
4062
   );
4063
end;
4064
 
4065
architecture behavioral of dpram512x23 is
4066
begin
4067
dpram0: tsmc25_dpram_ss
4068
  generic map(
4069
    abits => 9,
4070
    dbits => 23,
4071
    words => 512)
4072
  port map (
4073
   CLKA => CLKA,
4074
   CENA => CENA,
4075
   WENA => WENA,
4076
   AA   => AA,
4077
   DA   => DA,
4078
   QA   => QA,
4079
   CLKB => CLKB,
4080
   CENB => CENB,
4081
   WENB => WENB,
4082
   AB   => AB,
4083
   DB   => DB,
4084
   QB   => QB
4085
  );
4086
end behavioral;
4087
 
4088
library ieee;
4089
use IEEE.std_logic_1164.all;
4090
use work.tech_tsmc25_sim.all;
4091
 
4092
entity dpram4096x22 is
4093
   port (
4094
   CLKA: in std_logic;
4095
   CENA: in std_logic;
4096
   WENA: in std_logic;
4097
   AA: in std_logic_vector(11 downto 0);
4098
   DA: in std_logic_vector(21 downto 0);
4099
   QA: out std_logic_vector(21 downto 0);
4100
   CLKB: in std_logic;
4101
   CENB: in std_logic;
4102
   WENB: in std_logic;
4103
   AB: in std_logic_vector(11 downto 0);
4104
   DB: in std_logic_vector(21 downto 0);
4105
   QB: out std_logic_vector(21 downto 0)
4106
   );
4107
end;
4108
 
4109
architecture behavioral of dpram4096x22 is
4110
begin
4111
dpram0: tsmc25_dpram_ss
4112
  generic map(
4113
    abits => 12,
4114
    dbits => 22,
4115
    words => 4096)
4116
  port map (
4117
   CLKA => CLKA,
4118
   CENA => CENA,
4119
   WENA => WENA,
4120
   AA   => AA,
4121
   DA   => DA,
4122
   QA   => QA,
4123
   CLKB => CLKB,
4124
   CENB => CENB,
4125
   WENB => WENB,
4126
   AB   => AB,
4127
   DB   => DB,
4128
   QB   => QB
4129
  );
4130
end behavioral;
4131
 
4132
library ieee;
4133
use IEEE.std_logic_1164.all;
4134
use work.tech_tsmc25_sim.all;
4135
 
4136
entity dpram2048x22 is
4137
   port (
4138
   CLKA: in std_logic;
4139
   CENA: in std_logic;
4140
   WENA: in std_logic;
4141
   AA: in std_logic_vector(10 downto 0);
4142
   DA: in std_logic_vector(21 downto 0);
4143
   QA: out std_logic_vector(21 downto 0);
4144
   CLKB: in std_logic;
4145
   CENB: in std_logic;
4146
   WENB: in std_logic;
4147
   AB: in std_logic_vector(10 downto 0);
4148
   DB: in std_logic_vector(21 downto 0);
4149
   QB: out std_logic_vector(21 downto 0)
4150
   );
4151
end;
4152
 
4153
architecture behavioral of dpram2048x22 is
4154
begin
4155
dpram0: tsmc25_dpram_ss
4156
  generic map(
4157
    abits => 11,
4158
    dbits => 22,
4159
    words => 2048)
4160
  port map (
4161
   CLKA => CLKA,
4162
   CENA => CENA,
4163
   WENA => WENA,
4164
   AA   => AA,
4165
   DA   => DA,
4166
   QA   => QA,
4167
   CLKB => CLKB,
4168
   CENB => CENB,
4169
   WENB => WENB,
4170
   AB   => AB,
4171
   DB   => DB,
4172
   QB   => QB
4173
  );
4174
end behavioral;
4175
 
4176
library ieee;
4177
use IEEE.std_logic_1164.all;
4178
use work.tech_tsmc25_sim.all;
4179
 
4180
entity dpram1024x22 is
4181
   port (
4182
   CLKA: in std_logic;
4183
   CENA: in std_logic;
4184
   WENA: in std_logic;
4185
   AA: in std_logic_vector(9 downto 0);
4186
   DA: in std_logic_vector(21 downto 0);
4187
   QA: out std_logic_vector(21 downto 0);
4188
   CLKB: in std_logic;
4189
   CENB: in std_logic;
4190
   WENB: in std_logic;
4191
   AB: in std_logic_vector(9 downto 0);
4192
   DB: in std_logic_vector(21 downto 0);
4193
   QB: out std_logic_vector(21 downto 0)
4194
   );
4195
end;
4196
 
4197
architecture behavioral of dpram1024x22 is
4198
begin
4199
dpram0: tsmc25_dpram_ss
4200
  generic map(
4201
    abits => 10,
4202
    dbits => 22,
4203
    words => 1024)
4204
  port map (
4205
   CLKA => CLKA,
4206
   CENA => CENA,
4207
   WENA => WENA,
4208
   AA   => AA,
4209
   DA   => DA,
4210
   QA   => QA,
4211
   CLKB => CLKB,
4212
   CENB => CENB,
4213
   WENB => WENB,
4214
   AB   => AB,
4215
   DB   => DB,
4216
   QB   => QB
4217
  );
4218
end behavioral;
4219
 
4220
library ieee;
4221
use IEEE.std_logic_1164.all;
4222
use work.tech_tsmc25_sim.all;
4223
 
4224
entity dpram4096x21 is
4225
   port (
4226
   CLKA: in std_logic;
4227
   CENA: in std_logic;
4228
   WENA: in std_logic;
4229
   AA: in std_logic_vector(11 downto 0);
4230
   DA: in std_logic_vector(20 downto 0);
4231
   QA: out std_logic_vector(20 downto 0);
4232
   CLKB: in std_logic;
4233
   CENB: in std_logic;
4234
   WENB: in std_logic;
4235
   AB: in std_logic_vector(11 downto 0);
4236
   DB: in std_logic_vector(20 downto 0);
4237
   QB: out std_logic_vector(20 downto 0)
4238
   );
4239
end;
4240
 
4241
architecture behavioral of dpram4096x21 is
4242
begin
4243
dpram0: tsmc25_dpram_ss
4244
  generic map(
4245
    abits => 12,
4246
    dbits => 21,
4247
    words => 4096)
4248
  port map (
4249
   CLKA => CLKA,
4250
   CENA => CENA,
4251
   WENA => WENA,
4252
   AA   => AA,
4253
   DA   => DA,
4254
   QA   => QA,
4255
   CLKB => CLKB,
4256
   CENB => CENB,
4257
   WENB => WENB,
4258
   AB   => AB,
4259
   DB   => DB,
4260
   QB   => QB
4261
  );
4262
end behavioral;
4263
 
4264
library ieee;
4265
use IEEE.std_logic_1164.all;
4266
use work.tech_tsmc25_sim.all;
4267
 
4268
entity dpram2048x21 is
4269
   port (
4270
   CLKA: in std_logic;
4271
   CENA: in std_logic;
4272
   WENA: in std_logic;
4273
   AA: in std_logic_vector(10 downto 0);
4274
   DA: in std_logic_vector(20 downto 0);
4275
   QA: out std_logic_vector(20 downto 0);
4276
   CLKB: in std_logic;
4277
   CENB: in std_logic;
4278
   WENB: in std_logic;
4279
   AB: in std_logic_vector(10 downto 0);
4280
   DB: in std_logic_vector(20 downto 0);
4281
   QB: out std_logic_vector(20 downto 0)
4282
   );
4283
end;
4284
 
4285
architecture behavioral of dpram2048x21 is
4286
begin
4287
dpram0: tsmc25_dpram_ss
4288
  generic map(
4289
    abits => 11,
4290
    dbits => 21,
4291
    words => 2048)
4292
  port map (
4293
   CLKA => CLKA,
4294
   CENA => CENA,
4295
   WENA => WENA,
4296
   AA   => AA,
4297
   DA   => DA,
4298
   QA   => QA,
4299
   CLKB => CLKB,
4300
   CENB => CENB,
4301
   WENB => WENB,
4302
   AB   => AB,
4303
   DB   => DB,
4304
   QB   => QB
4305
  );
4306
end behavioral;
4307
 
4308
library ieee;
4309
use IEEE.std_logic_1164.all;
4310
use work.tech_tsmc25_sim.all;
4311
 
4312
entity dpram4096x20 is
4313
   port (
4314
   CLKA: in std_logic;
4315
   CENA: in std_logic;
4316
   WENA: in std_logic;
4317
   AA: in std_logic_vector(11 downto 0);
4318
   DA: in std_logic_vector(19 downto 0);
4319
   QA: out std_logic_vector(19 downto 0);
4320
   CLKB: in std_logic;
4321
   CENB: in std_logic;
4322
   WENB: in std_logic;
4323
   AB: in std_logic_vector(11 downto 0);
4324
   DB: in std_logic_vector(19 downto 0);
4325
   QB: out std_logic_vector(19 downto 0)
4326
   );
4327
end;
4328
 
4329
architecture behavioral of dpram4096x20 is
4330
begin
4331
dpram0: tsmc25_dpram_ss
4332
  generic map(
4333
    abits => 12,
4334
    dbits => 20,
4335
    words => 4096)
4336
  port map (
4337
   CLKA => CLKA,
4338
   CENA => CENA,
4339
   WENA => WENA,
4340
   AA   => AA,
4341
   DA   => DA,
4342
   QA   => QA,
4343
   CLKB => CLKB,
4344
   CENB => CENB,
4345
   WENB => WENB,
4346
   AB   => AB,
4347
   DB   => DB,
4348
   QB   => QB
4349
  );
4350
end behavioral;
4351
 
4352
 
4353
------------------------------------------------
4354
-- Behavioural models for tie high/low cells
4355
------------------------------------------------
4356
 
4357
library ieee;
4358
use IEEE.std_logic_1164.all;
4359
 
4360
entity TIEHI is
4361
  port(
4362
  Y : out std_logic
4363
  );
4364
end;
4365
 
4366
architecture behavioral of TIEHI is
4367
begin
4368
  Y <= '1';
4369
end behavioral;
4370
 
4371
 
4372
library ieee;
4373
use IEEE.std_logic_1164.all;
4374
 
4375
entity TIELO is
4376
  port(
4377
  Y : out std_logic
4378
  );
4379
end;
4380
 
4381
architecture behavioral of TIELO is
4382
begin
4383
  Y <= '0';
4384
end behavioral;
4385
 
4386
 
4387
 
4388
------------------------------------------------------------------
4389
-- behavioural pad models for TSMC 0.25um : fb_tpz873g_200d ------
4390
------------------------------------------------------------------
4391
 
4392
-- input pad 5V tolerant
4393
library IEEE;
4394
use IEEE.std_logic_1164.all;
4395
entity PDIDGZ is port (PAD : in std_logic; C : out std_logic); end;
4396
architecture rtl of PDIDGZ is begin C <= to_x01(PAD) after 1 ns; end;
4397
 
4398
-- schmitt trigger input pad 5V tolerant
4399
library IEEE;
4400
use IEEE.std_logic_1164.all;
4401
entity PDISDGZ is port (PAD : in std_logic; C : out std_logic); end;
4402
architecture rtl of PDISDGZ is begin C <= to_x01(PAD) after 1 ns; end;
4403
 
4404
-- CMOS 3-state output pads 5V tolerant (2,4,8,12,16,24 mA)
4405
library IEEE;
4406
use IEEE.std_logic_1164.all;
4407
entity PDT02DGZ is port (I : in  std_logic; PAD : out  std_logic;
4408
                         OEN: in std_logic); end;
4409
architecture rtl of PDT02DGZ is begin
4410
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns; end;
4411
library IEEE;
4412
use IEEE.std_logic_1164.all;
4413
entity PDT04DGZ is port (I : in  std_logic; PAD : out  std_logic;
4414
                         OEN: in std_logic); end;
4415
architecture rtl of PDT04DGZ is begin
4416
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns; end;
4417
library IEEE;
4418
use IEEE.std_logic_1164.all;
4419
entity PDT08DGZ is port (I : in  std_logic; PAD : out  std_logic;
4420
                         OEN: in std_logic); end;
4421
architecture rtl of PDT08DGZ is begin
4422
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns; end;
4423
library IEEE;
4424
use IEEE.std_logic_1164.all;
4425
entity PDT12DGZ is port (I : in  std_logic; PAD : out  std_logic;
4426
                         OEN: in std_logic); end;
4427
architecture rtl of PDT12DGZ is begin
4428
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns; end;
4429
library IEEE;
4430
use IEEE.std_logic_1164.all;
4431
entity PDT16DGZ is port (I : in  std_logic; PAD : out  std_logic;
4432
                         OEN: in std_logic); end;
4433
architecture rtl of PDT16DGZ is begin
4434
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns; end;
4435
library IEEE;
4436
use IEEE.std_logic_1164.all;
4437
entity PDT24DGZ is port (I : in  std_logic; PAD : out  std_logic;
4438
                         OEN: in std_logic); end;
4439
architecture rtl of PDT24DGZ is begin
4440
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns; end;
4441
 
4442
 
4443
-- CMOS 3-state Output pad with input and Pullup 5V tolerant
4444
library IEEE;
4445
use IEEE.std_logic_1164.all;
4446
entity PDU02DGZ is port (I : in  std_logic; PAD : inout  std_logic;
4447
                         OEN: in std_logic; C : out std_logic); end;
4448
architecture rtl of PDU02DGZ is begin
4449
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'H' after 2 ns;
4450
   C   <= to_x01(PAD) after 1 ns; end;
4451
library IEEE;
4452
use IEEE.std_logic_1164.all;
4453
entity PDU04DGZ is port (I : in  std_logic; PAD : inout  std_logic;
4454
                         OEN: in std_logic; C : out std_logic); end;
4455
architecture rtl of PDU04DGZ is begin
4456
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'H' after 2 ns;
4457
   C   <= to_x01(PAD) after 1 ns; end;
4458
library IEEE;
4459
use IEEE.std_logic_1164.all;
4460
entity PDU08DGZ is port (I : in  std_logic; PAD : inout  std_logic;
4461
                         OEN: in std_logic; C : out std_logic); end;
4462
architecture rtl of PDU08DGZ is begin
4463
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'H' after 2 ns;
4464
   C   <= to_x01(PAD) after 1 ns; end;
4465
library IEEE;
4466
use IEEE.std_logic_1164.all;
4467
entity PDU12DGZ is port (I : in  std_logic; PAD : inout  std_logic;
4468
                         OEN: in std_logic; C : out std_logic); end;
4469
architecture rtl of PDU12DGZ is begin
4470
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'H' after 2 ns;
4471
   C   <= to_x01(PAD) after 1 ns; end;
4472
library IEEE;
4473
use IEEE.std_logic_1164.all;
4474
entity PDU16DGZ is port (I : in  std_logic; PAD : inout  std_logic;
4475
                         OEN: in std_logic; C : out std_logic); end;
4476
architecture rtl of PDU16DGZ is begin
4477
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'H' after 2 ns;
4478
   C   <= to_x01(PAD) after 1 ns; end;
4479
library IEEE;
4480
use IEEE.std_logic_1164.all;
4481
entity PDU24DGZ is port (I : in  std_logic; PAD : inout  std_logic;
4482
                         OEN: in std_logic; C : out std_logic); end;
4483
architecture rtl of PDU24DGZ is begin
4484
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'H' after 2 ns;
4485
   C   <= to_x01(PAD) after 1 ns; end;
4486
 
4487
 
4488
-- CMOS 3-state Output pad with input 5V tolerant
4489
library IEEE;
4490
use IEEE.std_logic_1164.all;
4491
entity PDB02DGZ is port (I : in  std_logic; PAD : inout  std_logic;
4492
                         OEN: in std_logic; C : out std_logic); end;
4493
architecture rtl of PDB02DGZ is begin
4494
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns;
4495
   C   <= to_x01(PAD) after 1 ns; end;
4496
library IEEE;
4497
use IEEE.std_logic_1164.all;
4498
entity PDB04DGZ is port (I : in  std_logic; PAD : inout  std_logic;
4499
                         OEN: in std_logic; C : out std_logic); end;
4500
architecture rtl of PDB04DGZ is begin
4501
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns;
4502
   C   <= to_x01(PAD) after 1 ns; end;
4503
library IEEE;
4504
use IEEE.std_logic_1164.all;
4505
entity PDB08DGZ is port (I : in  std_logic; PAD : inout  std_logic;
4506
                         OEN: in std_logic; C : out std_logic); end;
4507
architecture rtl of PDB08DGZ is begin
4508
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns;
4509
   C   <= to_x01(PAD) after 1 ns; end;
4510
library IEEE;
4511
use IEEE.std_logic_1164.all;
4512
entity PDB12DGZ is port (I : in  std_logic; PAD : inout  std_logic;
4513
                         OEN: in std_logic; C : out std_logic); end;
4514
architecture rtl of PDB12DGZ is begin
4515
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns;
4516
   C   <= to_x01(PAD) after 1 ns; end;
4517
library IEEE;
4518
use IEEE.std_logic_1164.all;
4519
entity PDB16DGZ is port (I : in  std_logic; PAD : inout  std_logic;
4520
                         OEN: in std_logic; C : out std_logic); end;
4521
architecture rtl of PDB16DGZ is begin
4522
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns;
4523
   C   <= to_x01(PAD) after 1 ns; end;
4524
library IEEE;
4525
use IEEE.std_logic_1164.all;
4526
entity PDB24DGZ is port (I : in  std_logic; PAD : inout  std_logic;
4527
                         OEN: in std_logic; C : out std_logic); end;
4528
architecture rtl of PDB24DGZ is begin
4529
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns;
4530
   C   <= to_x01(PAD) after 1 ns; end;
4531
 
4532
 
4533
-- CMOS 3-state Output pad with schmitt trigger input 5V tolerant
4534
library IEEE;
4535
use IEEE.std_logic_1164.all;
4536
entity PDB02SDGZ is port (I : in  std_logic; PAD : inout  std_logic;
4537
                         OEN: in std_logic; C : out std_logic); end;
4538
architecture rtl of PDB02SDGZ is begin
4539
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns;
4540
   C   <= to_x01(PAD) after 1 ns; end;
4541
library IEEE;
4542
use IEEE.std_logic_1164.all;
4543
entity PDB04SDGZ is port (I : in  std_logic; PAD : inout  std_logic;
4544
                         OEN: in std_logic; C : out std_logic); end;
4545
architecture rtl of PDB04SDGZ is begin
4546
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns;
4547
   C   <= to_x01(PAD) after 1 ns; end;
4548
library IEEE;
4549
use IEEE.std_logic_1164.all;
4550
entity PDB08SDGZ is port (I : in  std_logic; PAD : inout  std_logic;
4551
                         OEN: in std_logic; C : out std_logic); end;
4552
architecture rtl of PDB08SDGZ is begin
4553
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns;
4554
   C   <= to_x01(PAD) after 1 ns; end;
4555
library IEEE;
4556
use IEEE.std_logic_1164.all;
4557
entity PDB12SDGZ is port (I : in  std_logic; PAD : inout  std_logic;
4558
                         OEN: in std_logic; C : out std_logic); end;
4559
architecture rtl of PDB12SDGZ is begin
4560
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns;
4561
   C   <= to_x01(PAD) after 1 ns; end;
4562
library IEEE;
4563
use IEEE.std_logic_1164.all;
4564
entity PDB16SDGZ is port (I : in  std_logic; PAD : inout  std_logic;
4565
                         OEN: in std_logic; C : out std_logic); end;
4566
architecture rtl of PDB16SDGZ is begin
4567
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns;
4568
   C   <= to_x01(PAD) after 1 ns; end;
4569
library IEEE;
4570
use IEEE.std_logic_1164.all;
4571
entity PDB24SDGZ is port (I : in  std_logic; PAD : inout  std_logic;
4572
                         OEN: in std_logic; C : out std_logic); end;
4573
architecture rtl of PDB24SDGZ is begin
4574
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns;
4575
   C   <= to_x01(PAD) after 1 ns; end;
4576
 
4577
 
4578
library IEEE;
4579
use IEEE.std_logic_1164.all;
4580
entity PRB08DGZ is port (I : in  std_logic; PAD : inout  std_logic;
4581
                         OEN: in std_logic; C : out std_logic); end;
4582
architecture rtl of PRB08DGZ is begin
4583
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns;
4584
   C   <= to_x01(PAD) after 1 ns; end;
4585
 
4586
library IEEE;
4587
use IEEE.std_logic_1164.all;
4588
entity PRT08DGZ is port (I : in  std_logic; PAD : out  std_logic;
4589
                         OEN: in std_logic); end;
4590
architecture rtl of PRT08DGZ is begin
4591
   PAD <= to_x01(I) after 2 ns when OEN = '0' else 'Z' after 2 ns; end;
4592
 
4593
------------------------------------------------------------------
4594
-- End of Behavioural models
4595
------------------------------------------------------------------
4596
 
4597
-- synopsys translate_on
4598
 
4599
------------------------------------------------------------------
4600
-- component declarations from true tech library
4601
------------------------------------------------------------------
4602
LIBRARY ieee;
4603
use IEEE.std_logic_1164.all;
4604
 
4605
package tech_tsmc25_syn is
4606
 
4607
-- Sync single-port RAM cells for instr/data cache & scratch-pad RAM
4608
component ram16384x32
4609
   port (
4610
   CLK: in std_logic;
4611
   CEN: in std_logic;
4612
   WEN: in std_logic;
4613
   A: in std_logic_vector(13 downto 0);
4614
   D: in std_logic_vector(31 downto 0);
4615
   Q: out std_logic_vector(31 downto 0)
4616
   );
4617
end component;
4618
 
4619
component ram8192x32
4620
   port (
4621
   CLK: in std_logic;
4622
   CEN: in std_logic;
4623
   WEN: in std_logic;
4624
   A: in std_logic_vector(12 downto 0);
4625
   D: in std_logic_vector(31 downto 0);
4626
   Q: out std_logic_vector(31 downto 0)
4627
   );
4628
end component;
4629
 
4630
component ram4096x32
4631
   port (
4632
   CLK: in std_logic;
4633
   CEN: in std_logic;
4634
   WEN: in std_logic_vector(3 downto 0);
4635
   A: in std_logic_vector(11 downto 0);
4636
   D: in std_logic_vector(31 downto 0);
4637
   Q: out std_logic_vector(31 downto 0)
4638
   );
4639
end component;
4640
 
4641
component ram2400x32
4642
   port (
4643
   CLK: in std_logic;
4644
   CEN: in std_logic;
4645
   WEN: in std_logic;
4646
   A: in std_logic_vector(11 downto 0);
4647
   D: in std_logic_vector(31 downto 0);
4648
   Q: out std_logic_vector(31 downto 0)
4649
   );
4650
end component;
4651
 
4652
component ram2048x32
4653
   port (
4654
   CLK: in std_logic;
4655
   CEN: in std_logic;
4656
   WEN: in std_logic_vector(3 downto 0);
4657
   A: in std_logic_vector(10 downto 0);
4658
   D: in std_logic_vector(31 downto 0);
4659
   Q: out std_logic_vector(31 downto 0)
4660
   );
4661
end component;
4662
 
4663
component ram1024x32
4664
   port (
4665
   CLK: in std_logic;
4666
   CEN: in std_logic;
4667
   WEN: in std_logic_vector(3 downto 0);
4668
   A: in std_logic_vector(9 downto 0);
4669
   D: in std_logic_vector(31 downto 0);
4670
   Q: out std_logic_vector(31 downto 0)
4671
   );
4672
end component;
4673
 
4674
component ram512x32
4675
   port (
4676
   CLK: in std_logic;
4677
   CEN: in std_logic;
4678
   WEN: in std_logic;
4679
   A: in std_logic_vector(8 downto 0);
4680
   D: in std_logic_vector(31 downto 0);
4681
   Q: out std_logic_vector(31 downto 0)
4682
   );
4683
end component;
4684
 
4685
component ram256x32
4686
   port (
4687
   CLK: in std_logic;
4688
   CEN: in std_logic;
4689
   WEN: in std_logic;
4690
   A: in std_logic_vector(7 downto 0);
4691
   D: in std_logic_vector(31 downto 0);
4692
   Q: out std_logic_vector(31 downto 0)
4693
   );
4694
end component;
4695
 
4696
component ram128x32
4697
   port (
4698
   CLK: in std_logic;
4699
   CEN: in std_logic;
4700
   WEN: in std_logic;
4701
   A: in std_logic_vector(6 downto 0);
4702
   D: in std_logic_vector(31 downto 0);
4703
   Q: out std_logic_vector(31 downto 0)
4704
   );
4705
end component;
4706
 
4707
component ram64x32
4708
   port (
4709
   CLK: in std_logic;
4710
   CEN: in std_logic;
4711
   WEN: in std_logic;
4712
   A: in std_logic_vector(5 downto 0);
4713
   D: in std_logic_vector(31 downto 0);
4714
   Q: out std_logic_vector(31 downto 0)
4715
   );
4716
end component;
4717
 
4718
component ram32x32
4719
   port (
4720
   CLK: in std_logic;
4721
   CEN: in std_logic;
4722
   WEN: in std_logic;
4723
   A: in std_logic_vector(4 downto 0);
4724
   D: in std_logic_vector(31 downto 0);
4725
   Q: out std_logic_vector(31 downto 0)
4726
   );
4727
end component;
4728
 
4729
component ram64x31
4730
   port (
4731
   CLK: in std_logic;
4732
   CEN: in std_logic;
4733
   WEN: in std_logic;
4734
   A: in std_logic_vector(5 downto 0);
4735
   D: in std_logic_vector(30 downto 0);
4736
   Q: out std_logic_vector(30 downto 0)
4737
   );
4738
end component;
4739
 
4740
component ram32x31
4741
   port (
4742
   CLK: in std_logic;
4743
   CEN: in std_logic;
4744
   WEN: in std_logic;
4745
   A: in std_logic_vector(4 downto 0);
4746
   D: in std_logic_vector(30 downto 0);
4747
   Q: out std_logic_vector(30 downto 0)
4748
   );
4749
end component;
4750
 
4751
component ram128x30
4752
   port (
4753
   CLK: in std_logic;
4754
   CEN: in std_logic;
4755
   WEN: in std_logic;
4756
   A: in std_logic_vector(6 downto 0);
4757
   D: in std_logic_vector(29 downto 0);
4758
   Q: out std_logic_vector(29 downto 0)
4759
   );
4760
end component;
4761
 
4762
component ram64x30
4763
   port (
4764
   CLK: in std_logic;
4765
   CEN: in std_logic;
4766
   WEN: in std_logic;
4767
   A: in std_logic_vector(5 downto 0);
4768
   D: in std_logic_vector(29 downto 0);
4769
   Q: out std_logic_vector(29 downto 0)
4770
   );
4771
end component;
4772
 
4773
component ram32x30
4774
   port (
4775
   CLK: in std_logic;
4776
   CEN: in std_logic;
4777
   WEN: in std_logic;
4778
   A: in std_logic_vector(4 downto 0);
4779
   D: in std_logic_vector(29 downto 0);
4780
   Q: out std_logic_vector(29 downto 0)
4781
   );
4782
end component;
4783
 
4784
component ram256x29
4785
   port (
4786
   CLK: in std_logic;
4787
   CEN: in std_logic;
4788
   WEN: in std_logic;
4789
   A: in std_logic_vector(7 downto 0);
4790
   D: in std_logic_vector(28 downto 0);
4791
   Q: out std_logic_vector(28 downto 0)
4792
   );
4793
end component;
4794
 
4795
component ram128x29
4796
   port (
4797
   CLK: in std_logic;
4798
   CEN: in std_logic;
4799
   WEN: in std_logic;
4800
   A: in std_logic_vector(6 downto 0);
4801
   D: in std_logic_vector(28 downto 0);
4802
   Q: out std_logic_vector(28 downto 0)
4803
   );
4804
end component;
4805
 
4806
component ram64x29
4807
   port (
4808
   CLK: in std_logic;
4809
   CEN: in std_logic;
4810
   WEN: in std_logic;
4811
   A: in std_logic_vector(5 downto 0);
4812
   D: in std_logic_vector(28 downto 0);
4813
   Q: out std_logic_vector(28 downto 0)
4814
   );
4815
end component;
4816
 
4817
component ram512x28
4818
   port (
4819
   CLK: in std_logic;
4820
   CEN: in std_logic;
4821
   WEN: in std_logic;
4822
   A: in std_logic_vector(8 downto 0);
4823
   D: in std_logic_vector(27 downto 0);
4824
   Q: out std_logic_vector(27 downto 0)
4825
   );
4826
end component;
4827
 
4828
component ram256x28
4829
   port (
4830
   CLK: in std_logic;
4831
   CEN: in std_logic;
4832
   WEN: in std_logic;
4833
   A: in std_logic_vector(7 downto 0);
4834
   D: in std_logic_vector(27 downto 0);
4835
   Q: out std_logic_vector(27 downto 0)
4836
   );
4837
end component;
4838
 
4839
component ram128x28
4840
   port (
4841
   CLK: in std_logic;
4842
   CEN: in std_logic;
4843
   WEN: in std_logic;
4844
   A: in std_logic_vector(6 downto 0);
4845
   D: in std_logic_vector(27 downto 0);
4846
   Q: out std_logic_vector(27 downto 0)
4847
   );
4848
end component;
4849
 
4850
component ram64x28
4851
   port (
4852
   CLK: in std_logic;
4853
   CEN: in std_logic;
4854
   WEN: in std_logic;
4855
   A: in std_logic_vector(5 downto 0);
4856
   D: in std_logic_vector(27 downto 0);
4857
   Q: out std_logic_vector(27 downto 0)
4858
   );
4859
end component;
4860
 
4861
component ram1024x27
4862
   port (
4863
   CLK: in std_logic;
4864
   CEN: in std_logic;
4865
   WEN: in std_logic;
4866
   A: in std_logic_vector(9 downto 0);
4867
   D: in std_logic_vector(26 downto 0);
4868
   Q: out std_logic_vector(26 downto 0)
4869
   );
4870
end component;
4871
 
4872
component ram512x27
4873
   port (
4874
   CLK: in std_logic;
4875
   CEN: in std_logic;
4876
   WEN: in std_logic;
4877
   A: in std_logic_vector(8 downto 0);
4878
   D: in std_logic_vector(26 downto 0);
4879
   Q: out std_logic_vector(26 downto 0)
4880
   );
4881
end component;
4882
 
4883
component ram256x27
4884
   port (
4885
   CLK: in std_logic;
4886
   CEN: in std_logic;
4887
   WEN: in std_logic;
4888
   A: in std_logic_vector(7 downto 0);
4889
   D: in std_logic_vector(26 downto 0);
4890
   Q: out std_logic_vector(26 downto 0)
4891
   );
4892
end component;
4893
 
4894
component ram128x27
4895
   port (
4896
   CLK: in std_logic;
4897
   CEN: in std_logic;
4898
   WEN: in std_logic;
4899
   A: in std_logic_vector(6 downto 0);
4900
   D: in std_logic_vector(26 downto 0);
4901
   Q: out std_logic_vector(26 downto 0)
4902
   );
4903
end component;
4904
 
4905
component ram64x27
4906
   port (
4907
   CLK: in std_logic;
4908
   CEN: in std_logic;
4909
   WEN: in std_logic;
4910
   A: in std_logic_vector(5 downto 0);
4911
   D: in std_logic_vector(26 downto 0);
4912
   Q: out std_logic_vector(26 downto 0)
4913
   );
4914
end component;
4915
 
4916
component ram2048x26
4917
   port (
4918
   CLK: in std_logic;
4919
   CEN: in std_logic;
4920
   WEN: in std_logic;
4921
   A: in std_logic_vector(10 downto 0);
4922
   D: in std_logic_vector(25 downto 0);
4923
   Q: out std_logic_vector(25 downto 0)
4924
   );
4925
end component;
4926
 
4927
component ram1024x26
4928
   port (
4929
   CLK: in std_logic;
4930
   CEN: in std_logic;
4931
   WEN: in std_logic;
4932
   A: in std_logic_vector(9 downto 0);
4933
   D: in std_logic_vector(25 downto 0);
4934
   Q: out std_logic_vector(25 downto 0)
4935
   );
4936
end component;
4937
 
4938
component ram512x26
4939
   port (
4940
   CLK: in std_logic;
4941
   CEN: in std_logic;
4942
   WEN: in std_logic;
4943
   A: in std_logic_vector(8 downto 0);
4944
   D: in std_logic_vector(25 downto 0);
4945
   Q: out std_logic_vector(25 downto 0)
4946
   );
4947
end component;
4948
 
4949
component ram256x26
4950
   port (
4951
   CLK: in std_logic;
4952
   CEN: in std_logic;
4953
   WEN: in std_logic;
4954
   A: in std_logic_vector(7 downto 0);
4955
   D: in std_logic_vector(25 downto 0);
4956
   Q: out std_logic_vector(25 downto 0)
4957
   );
4958
end component;
4959
 
4960
component ram128x26
4961
   port (
4962
   CLK: in std_logic;
4963
   CEN: in std_logic;
4964
   WEN: in std_logic;
4965
   A: in std_logic_vector(6 downto 0);
4966
   D: in std_logic_vector(25 downto 0);
4967
   Q: out std_logic_vector(25 downto 0)
4968
   );
4969
end component;
4970
 
4971
component ram64x26
4972
   port (
4973
   CLK: in std_logic;
4974
   CEN: in std_logic;
4975
   WEN: in std_logic;
4976
   A: in std_logic_vector(5 downto 0);
4977
   D: in std_logic_vector(25 downto 0);
4978
   Q: out std_logic_vector(25 downto 0)
4979
   );
4980
end component;
4981
 
4982
component ram2048x25
4983
   port (
4984
   CLK: in std_logic;
4985
   CEN: in std_logic;
4986
   WEN: in std_logic;
4987
   A: in std_logic_vector(10 downto 0);
4988
   D: in std_logic_vector(24 downto 0);
4989
   Q: out std_logic_vector(24 downto 0)
4990
   );
4991
end component;
4992
 
4993
component ram1024x25
4994
   port (
4995
   CLK: in std_logic;
4996
   CEN: in std_logic;
4997
   WEN: in std_logic;
4998
   A: in std_logic_vector(9 downto 0);
4999
   D: in std_logic_vector(24 downto 0);
5000
   Q: out std_logic_vector(24 downto 0)
5001
   );
5002
end component;
5003
 
5004
component ram512x25
5005
   port (
5006
   CLK: in std_logic;
5007
   CEN: in std_logic;
5008
   WEN: in std_logic;
5009
   A: in std_logic_vector(8 downto 0);
5010
   D: in std_logic_vector(24 downto 0);
5011
   Q: out std_logic_vector(24 downto 0)
5012
   );
5013
end component;
5014
 
5015
component ram256x25
5016
   port (
5017
   CLK: in std_logic;
5018
   CEN: in std_logic;
5019
   WEN: in std_logic;
5020
   A: in std_logic_vector(7 downto 0);
5021
   D: in std_logic_vector(24 downto 0);
5022
   Q: out std_logic_vector(24 downto 0)
5023
   );
5024
end component;
5025
 
5026
component ram128x25
5027
   port (
5028
   CLK: in std_logic;
5029
   CEN: in std_logic;
5030
   WEN: in std_logic;
5031
   A: in std_logic_vector(6 downto 0);
5032
   D: in std_logic_vector(24 downto 0);
5033
   Q: out std_logic_vector(24 downto 0)
5034
   );
5035
end component;
5036
 
5037
component ram2048x24
5038
   port (
5039
   CLK: in std_logic;
5040
   CEN: in std_logic;
5041
   WEN: in std_logic;
5042
   A: in std_logic_vector(10 downto 0);
5043
   D: in std_logic_vector(23 downto 0);
5044
   Q: out std_logic_vector(23 downto 0)
5045
   );
5046
end component;
5047
 
5048
component ram1024x24
5049
   port (
5050
   CLK: in std_logic;
5051
   CEN: in std_logic;
5052
   WEN: in std_logic;
5053
   A: in std_logic_vector(9 downto 0);
5054
   D: in std_logic_vector(23 downto 0);
5055
   Q: out std_logic_vector(23 downto 0)
5056
   );
5057
end component;
5058
 
5059
component ram512x24
5060
   port (
5061
   CLK: in std_logic;
5062
   CEN: in std_logic;
5063
   WEN: in std_logic;
5064
   A: in std_logic_vector(8 downto 0);
5065
   D: in std_logic_vector(23 downto 0);
5066
   Q: out std_logic_vector(23 downto 0)
5067
   );
5068
end component;
5069
 
5070
component ram256x24
5071
   port (
5072
   CLK: in std_logic;
5073
   CEN: in std_logic;
5074
   WEN: in std_logic;
5075
   A: in std_logic_vector(7 downto 0);
5076
   D: in std_logic_vector(23 downto 0);
5077
   Q: out std_logic_vector(23 downto 0)
5078
   );
5079
end component;
5080
 
5081
component ram2048x23
5082
   port (
5083
   CLK: in std_logic;
5084
   CEN: in std_logic;
5085
   WEN: in std_logic;
5086
   A: in std_logic_vector(10 downto 0);
5087
   D: in std_logic_vector(22 downto 0);
5088
   Q: out std_logic_vector(22 downto 0)
5089
   );
5090
end component;
5091
 
5092
component ram1024x23
5093
   port (
5094
   CLK: in std_logic;
5095
   CEN: in std_logic;
5096
   WEN: in std_logic;
5097
   A: in std_logic_vector(9 downto 0);
5098
   D: in std_logic_vector(22 downto 0);
5099
   Q: out std_logic_vector(22 downto 0)
5100
   );
5101
end component;
5102
 
5103
component ram512x23
5104
   port (
5105
   CLK: in std_logic;
5106
   CEN: in std_logic;
5107
   WEN: in std_logic;
5108
   A: in std_logic_vector(8 downto 0);
5109
   D: in std_logic_vector(22 downto 0);
5110
   Q: out std_logic_vector(22 downto 0)
5111
   );
5112
end component;
5113
 
5114
component ram4096x22
5115
   port (
5116
   CLK: in std_logic;
5117
   CEN: in std_logic;
5118
   WEN: in std_logic;
5119
   A: in std_logic_vector(11 downto 0);
5120
   D: in std_logic_vector(21 downto 0);
5121
   Q: out std_logic_vector(21 downto 0)
5122
   );
5123
end component;
5124
 
5125
component ram2048x22
5126
   port (
5127
   CLK: in std_logic;
5128
   CEN: in std_logic;
5129
   WEN: in std_logic;
5130
   A: in std_logic_vector(10 downto 0);
5131
   D: in std_logic_vector(21 downto 0);
5132
   Q: out std_logic_vector(21 downto 0)
5133
   );
5134
end component;
5135
 
5136
component ram1024x22
5137
   port (
5138
   CLK: in std_logic;
5139
   CEN: in std_logic;
5140
   WEN: in std_logic;
5141
   A: in std_logic_vector(9 downto 0);
5142
   D: in std_logic_vector(21 downto 0);
5143
   Q: out std_logic_vector(21 downto 0)
5144
   );
5145
end component;
5146
 
5147
component ram4096x21
5148
   port (
5149
   CLK: in std_logic;
5150
   CEN: in std_logic;
5151
   WEN: in std_logic;
5152
   A: in std_logic_vector(11 downto 0);
5153
   D: in std_logic_vector(20 downto 0);
5154
   Q: out std_logic_vector(20 downto 0)
5155
   );
5156
end component;
5157
 
5158
component ram2048x21
5159
   port (
5160
   CLK: in std_logic;
5161
   CEN: in std_logic;
5162
   WEN: in std_logic;
5163
   A: in std_logic_vector(10 downto 0);
5164
   D: in std_logic_vector(20 downto 0);
5165
   Q: out std_logic_vector(20 downto 0)
5166
   );
5167
end component;
5168
 
5169
component ram4096x20
5170
   port (
5171
   CLK: in std_logic;
5172
   CEN: in std_logic;
5173
   WEN: in std_logic;
5174
   A: in std_logic_vector(11 downto 0);
5175
   D: in std_logic_vector(19 downto 0);
5176
   Q: out std_logic_vector(19 downto 0)
5177
   );
5178
end component;
5179
 
5180
 
5181
 
5182
 
5183
 
5184
 
5185
 
5186
-- Sync dpram cell for regfile iu & cp
5187
component dpram16x32
5188
   port (
5189
   CLKA: in std_logic;
5190
   CENA: in std_logic;
5191
   WENA: in std_logic;
5192
   AA: in std_logic_vector(3 downto 0);
5193
   DA: in std_logic_vector(31 downto 0);
5194
   QA: out std_logic_vector(31 downto 0);
5195
   CLKB: in std_logic;
5196
   CENB: in std_logic;
5197
   WENB: in std_logic;
5198
   AB: in std_logic_vector(3 downto 0);
5199
   DB: in std_logic_vector(31 downto 0);
5200
   QB: out std_logic_vector(31 downto 0)
5201
   );
5202
end component;
5203
 
5204
component dpram136x32
5205
   port (
5206
   CLKA: in std_logic;
5207
   CENA: in std_logic;
5208
   WENA: in std_logic;
5209
   AA: in std_logic_vector(7 downto 0);
5210
   DA: in std_logic_vector(31 downto 0);
5211
   QA: out std_logic_vector(31 downto 0);
5212
   CLKB: in std_logic;
5213
   CENB: in std_logic;
5214
   WENB: in std_logic;
5215
   AB: in std_logic_vector(7 downto 0);
5216
   DB: in std_logic_vector(31 downto 0);
5217
   QB: out std_logic_vector(31 downto 0)
5218
   );
5219
end component;
5220
 
5221
component dpram168x32
5222
   port (
5223
   CLKA: in std_logic;
5224
   CENA: in std_logic;
5225
   WENA: in std_logic;
5226
   AA: in std_logic_vector(7 downto 0);
5227
   DA: in std_logic_vector(31 downto 0);
5228
   QA: out std_logic_vector(31 downto 0);
5229
   CLKB: in std_logic;
5230
   CENB: in std_logic;
5231
   WENB: in std_logic;
5232
   AB: in std_logic_vector(7 downto 0);
5233
   DB: in std_logic_vector(31 downto 0);
5234
   QB: out std_logic_vector(31 downto 0)
5235
   );
5236
end component;
5237
 
5238
-- Sync dpram cells for tags when snooping is enabled or DSU trace buffer
5239
component dpram2048x32
5240
   port (
5241
   CLKA: in std_logic;
5242
   CENA: in std_logic;
5243
   WENA: in std_logic;
5244
   AA: in std_logic_vector(10 downto 0);
5245
   DA: in std_logic_vector(31 downto 0);
5246
   QA: out std_logic_vector(31 downto 0);
5247
   CLKB: in std_logic;
5248
   CENB: in std_logic;
5249
   WENB: in std_logic;
5250
   AB: in std_logic_vector(10 downto 0);
5251
   DB: in std_logic_vector(31 downto 0);
5252
   QB: out std_logic_vector(31 downto 0)
5253
   );
5254
end component;
5255
 
5256
component dpram1024x32
5257
   port (
5258
   CLKA: in std_logic;
5259
   CENA: in std_logic;
5260
   WENA: in std_logic;
5261
   AA: in std_logic_vector(9 downto 0);
5262
   DA: in std_logic_vector(31 downto 0);
5263
   QA: out std_logic_vector(31 downto 0);
5264
   CLKB: in std_logic;
5265
   CENB: in std_logic;
5266
   WENB: in std_logic;
5267
   AB: in std_logic_vector(9 downto 0);
5268
   DB: in std_logic_vector(31 downto 0);
5269
   QB: out std_logic_vector(31 downto 0)
5270
   );
5271
end component;
5272
 
5273
component dpram512x32
5274
   port (
5275
   CLKA: in std_logic;
5276
   CENA: in std_logic;
5277
   WENA: in std_logic;
5278
   AA: in std_logic_vector(8 downto 0);
5279
   DA: in std_logic_vector(31 downto 0);
5280
   QA: out std_logic_vector(31 downto 0);
5281
   CLKB: in std_logic;
5282
   CENB: in std_logic;
5283
   WENB: in std_logic;
5284
   AB: in std_logic_vector(8 downto 0);
5285
   DB: in std_logic_vector(31 downto 0);
5286
   QB: out std_logic_vector(31 downto 0)
5287
   );
5288
end component;
5289
 
5290
component dpram256x32
5291
   port (
5292
   CLKA: in std_logic;
5293
   CENA: in std_logic;
5294
   WENA: in std_logic;
5295
   AA: in std_logic_vector(7 downto 0);
5296
   DA: in std_logic_vector(31 downto 0);
5297
   QA: out std_logic_vector(31 downto 0);
5298
   CLKB: in std_logic;
5299
   CENB: in std_logic;
5300
   WENB: in std_logic;
5301
   AB: in std_logic_vector(7 downto 0);
5302
   DB: in std_logic_vector(31 downto 0);
5303
   QB: out std_logic_vector(31 downto 0)
5304
   );
5305
end component;
5306
 
5307
component dpram128x32
5308
   port (
5309
   CLKA: in std_logic;
5310
   CENA: in std_logic;
5311
   WENA: in std_logic;
5312
   AA: in std_logic_vector(6 downto 0);
5313
   DA: in std_logic_vector(31 downto 0);
5314
   QA: out std_logic_vector(31 downto 0);
5315
   CLKB: in std_logic;
5316
   CENB: in std_logic;
5317
   WENB: in std_logic;
5318
   AB: in std_logic_vector(6 downto 0);
5319
   DB: in std_logic_vector(31 downto 0);
5320
   QB: out std_logic_vector(31 downto 0)
5321
   );
5322
end component;
5323
 
5324
component dpram64x32
5325
   port (
5326
   CLKA: in std_logic;
5327
   CENA: in std_logic;
5328
   WENA: in std_logic;
5329
   AA: in std_logic_vector(5 downto 0);
5330
   DA: in std_logic_vector(31 downto 0);
5331
   QA: out std_logic_vector(31 downto 0);
5332
   CLKB: in std_logic;
5333
   CENB: in std_logic;
5334
   WENB: in std_logic;
5335
   AB: in std_logic_vector(5 downto 0);
5336
   DB: in std_logic_vector(31 downto 0);
5337
   QB: out std_logic_vector(31 downto 0)
5338
   );
5339
end component;
5340
 
5341
component dpram32x32
5342
   port (
5343
   CLKA: in std_logic;
5344
   CENA: in std_logic;
5345
   WENA: in std_logic;
5346
   AA: in std_logic_vector(4 downto 0);
5347
   DA: in std_logic_vector(31 downto 0);
5348
   QA: out std_logic_vector(31 downto 0);
5349
   CLKB: in std_logic;
5350
   CENB: in std_logic;
5351
   WENB: in std_logic;
5352
   AB: in std_logic_vector(4 downto 0);
5353
   DB: in std_logic_vector(31 downto 0);
5354
   QB: out std_logic_vector(31 downto 0)
5355
   );
5356
end component;
5357
 
5358
component dpram64x31
5359
   port (
5360
   CLKA: in std_logic;
5361
   CENA: in std_logic;
5362
   WENA: in std_logic;
5363
   AA: in std_logic_vector(5 downto 0);
5364
   DA: in std_logic_vector(30 downto 0);
5365
   QA: out std_logic_vector(30 downto 0);
5366
   CLKB: in std_logic;
5367
   CENB: in std_logic;
5368
   WENB: in std_logic;
5369
   AB: in std_logic_vector(5 downto 0);
5370
   DB: in std_logic_vector(30 downto 0);
5371
   QB: out std_logic_vector(30 downto 0)
5372
   );
5373
end component;
5374
 
5375
component dpram32x31
5376
   port (
5377
   CLKA: in std_logic;
5378
   CENA: in std_logic;
5379
   WENA: in std_logic;
5380
   AA: in std_logic_vector(4 downto 0);
5381
   DA: in std_logic_vector(30 downto 0);
5382
   QA: out std_logic_vector(30 downto 0);
5383
   CLKB: in std_logic;
5384
   CENB: in std_logic;
5385
   WENB: in std_logic;
5386
   AB: in std_logic_vector(4 downto 0);
5387
   DB: in std_logic_vector(30 downto 0);
5388
   QB: out std_logic_vector(30 downto 0)
5389
   );
5390
end component;
5391
 
5392
component dpram128x30
5393
   port (
5394
   CLKA: in std_logic;
5395
   CENA: in std_logic;
5396
   WENA: in std_logic;
5397
   AA: in std_logic_vector(6 downto 0);
5398
   DA: in std_logic_vector(29 downto 0);
5399
   QA: out std_logic_vector(29 downto 0);
5400
   CLKB: in std_logic;
5401
   CENB: in std_logic;
5402
   WENB: in std_logic;
5403
   AB: in std_logic_vector(6 downto 0);
5404
   DB: in std_logic_vector(29 downto 0);
5405
   QB: out std_logic_vector(29 downto 0)
5406
   );
5407
end component;
5408
 
5409
component dpram64x30
5410
   port (
5411
   CLKA: in std_logic;
5412
   CENA: in std_logic;
5413
   WENA: in std_logic;
5414
   AA: in std_logic_vector(5 downto 0);
5415
   DA: in std_logic_vector(29 downto 0);
5416
   QA: out std_logic_vector(29 downto 0);
5417
   CLKB: in std_logic;
5418
   CENB: in std_logic;
5419
   WENB: in std_logic;
5420
   AB: in std_logic_vector(5 downto 0);
5421
   DB: in std_logic_vector(29 downto 0);
5422
   QB: out std_logic_vector(29 downto 0)
5423
   );
5424
end component;
5425
 
5426
component dpram32x30
5427
   port (
5428
   CLKA: in std_logic;
5429
   CENA: in std_logic;
5430
   WENA: in std_logic;
5431
   AA: in std_logic_vector(4 downto 0);
5432
   DA: in std_logic_vector(29 downto 0);
5433
   QA: out std_logic_vector(29 downto 0);
5434
   CLKB: in std_logic;
5435
   CENB: in std_logic;
5436
   WENB: in std_logic;
5437
   AB: in std_logic_vector(4 downto 0);
5438
   DB: in std_logic_vector(29 downto 0);
5439
   QB: out std_logic_vector(29 downto 0)
5440
   );
5441
end component;
5442
 
5443
component dpram256x29
5444
   port (
5445
   CLKA: in std_logic;
5446
   CENA: in std_logic;
5447
   WENA: in std_logic;
5448
   AA: in std_logic_vector(7 downto 0);
5449
   DA: in std_logic_vector(28 downto 0);
5450
   QA: out std_logic_vector(28 downto 0);
5451
   CLKB: in std_logic;
5452
   CENB: in std_logic;
5453
   WENB: in std_logic;
5454
   AB: in std_logic_vector(7 downto 0);
5455
   DB: in std_logic_vector(28 downto 0);
5456
   QB: out std_logic_vector(28 downto 0)
5457
   );
5458
end component;
5459
 
5460
component dpram128x29
5461
   port (
5462
   CLKA: in std_logic;
5463
   CENA: in std_logic;
5464
   WENA: in std_logic;
5465
   AA: in std_logic_vector(6 downto 0);
5466
   DA: in std_logic_vector(28 downto 0);
5467
   QA: out std_logic_vector(28 downto 0);
5468
   CLKB: in std_logic;
5469
   CENB: in std_logic;
5470
   WENB: in std_logic;
5471
   AB: in std_logic_vector(6 downto 0);
5472
   DB: in std_logic_vector(28 downto 0);
5473
   QB: out std_logic_vector(28 downto 0)
5474
   );
5475
end component;
5476
 
5477
component dpram64x29
5478
   port (
5479
   CLKA: in std_logic;
5480
   CENA: in std_logic;
5481
   WENA: in std_logic;
5482
   AA: in std_logic_vector(5 downto 0);
5483
   DA: in std_logic_vector(28 downto 0);
5484
   QA: out std_logic_vector(28 downto 0);
5485
   CLKB: in std_logic;
5486
   CENB: in std_logic;
5487
   WENB: in std_logic;
5488
   AB: in std_logic_vector(5 downto 0);
5489
   DB: in std_logic_vector(28 downto 0);
5490
   QB: out std_logic_vector(28 downto 0)
5491
   );
5492
end component;
5493
 
5494
component dpram512x28
5495
   port (
5496
   CLKA: in std_logic;
5497
   CENA: in std_logic;
5498
   WENA: in std_logic;
5499
   AA: in std_logic_vector(8 downto 0);
5500
   DA: in std_logic_vector(27 downto 0);
5501
   QA: out std_logic_vector(27 downto 0);
5502
   CLKB: in std_logic;
5503
   CENB: in std_logic;
5504
   WENB: in std_logic;
5505
   AB: in std_logic_vector(8 downto 0);
5506
   DB: in std_logic_vector(27 downto 0);
5507
   QB: out std_logic_vector(27 downto 0)
5508
   );
5509
end component;
5510
 
5511
component dpram256x28
5512
   port (
5513
   CLKA: in std_logic;
5514
   CENA: in std_logic;
5515
   WENA: in std_logic;
5516
   AA: in std_logic_vector(7 downto 0);
5517
   DA: in std_logic_vector(27 downto 0);
5518
   QA: out std_logic_vector(27 downto 0);
5519
   CLKB: in std_logic;
5520
   CENB: in std_logic;
5521
   WENB: in std_logic;
5522
   AB: in std_logic_vector(7 downto 0);
5523
   DB: in std_logic_vector(27 downto 0);
5524
   QB: out std_logic_vector(27 downto 0)
5525
   );
5526
end component;
5527
 
5528
component dpram128x28
5529
   port (
5530
   CLKA: in std_logic;
5531
   CENA: in std_logic;
5532
   WENA: in std_logic;
5533
   AA: in std_logic_vector(6 downto 0);
5534
   DA: in std_logic_vector(27 downto 0);
5535
   QA: out std_logic_vector(27 downto 0);
5536
   CLKB: in std_logic;
5537
   CENB: in std_logic;
5538
   WENB: in std_logic;
5539
   AB: in std_logic_vector(6 downto 0);
5540
   DB: in std_logic_vector(27 downto 0);
5541
   QB: out std_logic_vector(27 downto 0)
5542
   );
5543
end component;
5544
 
5545
component dpram64x28
5546
   port (
5547
   CLKA: in std_logic;
5548
   CENA: in std_logic;
5549
   WENA: in std_logic;
5550
   AA: in std_logic_vector(5 downto 0);
5551
   DA: in std_logic_vector(27 downto 0);
5552
   QA: out std_logic_vector(27 downto 0);
5553
   CLKB: in std_logic;
5554
   CENB: in std_logic;
5555
   WENB: in std_logic;
5556
   AB: in std_logic_vector(5 downto 0);
5557
   DB: in std_logic_vector(27 downto 0);
5558
   QB: out std_logic_vector(27 downto 0)
5559
   );
5560
end component;
5561
 
5562
component dpram1024x27
5563
   port (
5564
   CLKA: in std_logic;
5565
   CENA: in std_logic;
5566
   WENA: in std_logic;
5567
   AA: in std_logic_vector(9 downto 0);
5568
   DA: in std_logic_vector(26 downto 0);
5569
   QA: out std_logic_vector(26 downto 0);
5570
   CLKB: in std_logic;
5571
   CENB: in std_logic;
5572
   WENB: in std_logic;
5573
   AB: in std_logic_vector(9 downto 0);
5574
   DB: in std_logic_vector(26 downto 0);
5575
   QB: out std_logic_vector(26 downto 0)
5576
   );
5577
end component;
5578
 
5579
component dpram512x27
5580
   port (
5581
   CLKA: in std_logic;
5582
   CENA: in std_logic;
5583
   WENA: in std_logic;
5584
   AA: in std_logic_vector(8 downto 0);
5585
   DA: in std_logic_vector(26 downto 0);
5586
   QA: out std_logic_vector(26 downto 0);
5587
   CLKB: in std_logic;
5588
   CENB: in std_logic;
5589
   WENB: in std_logic;
5590
   AB: in std_logic_vector(8 downto 0);
5591
   DB: in std_logic_vector(26 downto 0);
5592
   QB: out std_logic_vector(26 downto 0)
5593
   );
5594
end component;
5595
 
5596
component dpram256x27
5597
   port (
5598
   CLKA: in std_logic;
5599
   CENA: in std_logic;
5600
   WENA: in std_logic;
5601
   AA: in std_logic_vector(7 downto 0);
5602
   DA: in std_logic_vector(26 downto 0);
5603
   QA: out std_logic_vector(26 downto 0);
5604
   CLKB: in std_logic;
5605
   CENB: in std_logic;
5606
   WENB: in std_logic;
5607
   AB: in std_logic_vector(7 downto 0);
5608
   DB: in std_logic_vector(26 downto 0);
5609
   QB: out std_logic_vector(26 downto 0)
5610
   );
5611
end component;
5612
 
5613
component dpram128x27
5614
   port (
5615
   CLKA: in std_logic;
5616
   CENA: in std_logic;
5617
   WENA: in std_logic;
5618
   AA: in std_logic_vector(6 downto 0);
5619
   DA: in std_logic_vector(26 downto 0);
5620
   QA: out std_logic_vector(26 downto 0);
5621
   CLKB: in std_logic;
5622
   CENB: in std_logic;
5623
   WENB: in std_logic;
5624
   AB: in std_logic_vector(6 downto 0);
5625
   DB: in std_logic_vector(26 downto 0);
5626
   QB: out std_logic_vector(26 downto 0)
5627
   );
5628
end component;
5629
 
5630
component dpram64x27
5631
   port (
5632
   CLKA: in std_logic;
5633
   CENA: in std_logic;
5634
   WENA: in std_logic;
5635
   AA: in std_logic_vector(5 downto 0);
5636
   DA: in std_logic_vector(26 downto 0);
5637
   QA: out std_logic_vector(26 downto 0);
5638
   CLKB: in std_logic;
5639
   CENB: in std_logic;
5640
   WENB: in std_logic;
5641
   AB: in std_logic_vector(5 downto 0);
5642
   DB: in std_logic_vector(26 downto 0);
5643
   QB: out std_logic_vector(26 downto 0)
5644
   );
5645
end component;
5646
 
5647
component dpram2048x26
5648
   port (
5649
   CLKA: in std_logic;
5650
   CENA: in std_logic;
5651
   WENA: in std_logic;
5652
   AA: in std_logic_vector(10 downto 0);
5653
   DA: in std_logic_vector(25 downto 0);
5654
   QA: out std_logic_vector(25 downto 0);
5655
   CLKB: in std_logic;
5656
   CENB: in std_logic;
5657
   WENB: in std_logic;
5658
   AB: in std_logic_vector(10 downto 0);
5659
   DB: in std_logic_vector(25 downto 0);
5660
   QB: out std_logic_vector(25 downto 0)
5661
   );
5662
end component;
5663
 
5664
component dpram1024x26
5665
   port (
5666
   CLKA: in std_logic;
5667
   CENA: in std_logic;
5668
   WENA: in std_logic;
5669
   AA: in std_logic_vector(9 downto 0);
5670
   DA: in std_logic_vector(25 downto 0);
5671
   QA: out std_logic_vector(25 downto 0);
5672
   CLKB: in std_logic;
5673
   CENB: in std_logic;
5674
   WENB: in std_logic;
5675
   AB: in std_logic_vector(9 downto 0);
5676
   DB: in std_logic_vector(25 downto 0);
5677
   QB: out std_logic_vector(25 downto 0)
5678
   );
5679
end component;
5680
 
5681
component dpram512x26
5682
   port (
5683
   CLKA: in std_logic;
5684
   CENA: in std_logic;
5685
   WENA: in std_logic;
5686
   AA: in std_logic_vector(8 downto 0);
5687
   DA: in std_logic_vector(25 downto 0);
5688
   QA: out std_logic_vector(25 downto 0);
5689
   CLKB: in std_logic;
5690
   CENB: in std_logic;
5691
   WENB: in std_logic;
5692
   AB: in std_logic_vector(8 downto 0);
5693
   DB: in std_logic_vector(25 downto 0);
5694
   QB: out std_logic_vector(25 downto 0)
5695
   );
5696
end component;
5697
 
5698
component dpram256x26
5699
   port (
5700
   CLKA: in std_logic;
5701
   CENA: in std_logic;
5702
   WENA: in std_logic;
5703
   AA: in std_logic_vector(7 downto 0);
5704
   DA: in std_logic_vector(25 downto 0);
5705
   QA: out std_logic_vector(25 downto 0);
5706
   CLKB: in std_logic;
5707
   CENB: in std_logic;
5708
   WENB: in std_logic;
5709
   AB: in std_logic_vector(7 downto 0);
5710
   DB: in std_logic_vector(25 downto 0);
5711
   QB: out std_logic_vector(25 downto 0)
5712
   );
5713
end component;
5714
 
5715
component dpram128x26
5716
   port (
5717
   CLKA: in std_logic;
5718
   CENA: in std_logic;
5719
   WENA: in std_logic;
5720
   AA: in std_logic_vector(6 downto 0);
5721
   DA: in std_logic_vector(25 downto 0);
5722
   QA: out std_logic_vector(25 downto 0);
5723
   CLKB: in std_logic;
5724
   CENB: in std_logic;
5725
   WENB: in std_logic;
5726
   AB: in std_logic_vector(6 downto 0);
5727
   DB: in std_logic_vector(25 downto 0);
5728
   QB: out std_logic_vector(25 downto 0)
5729
   );
5730
end component;
5731
 
5732
component dpram64x26
5733
   port (
5734
   CLKA: in std_logic;
5735
   CENA: in std_logic;
5736
   WENA: in std_logic;
5737
   AA: in std_logic_vector(5 downto 0);
5738
   DA: in std_logic_vector(25 downto 0);
5739
   QA: out std_logic_vector(25 downto 0);
5740
   CLKB: in std_logic;
5741
   CENB: in std_logic;
5742
   WENB: in std_logic;
5743
   AB: in std_logic_vector(5 downto 0);
5744
   DB: in std_logic_vector(25 downto 0);
5745
   QB: out std_logic_vector(25 downto 0)
5746
   );
5747
end component;
5748
 
5749
component dpram2048x25
5750
   port (
5751
   CLKA: in std_logic;
5752
   CENA: in std_logic;
5753
   WENA: in std_logic;
5754
   AA: in std_logic_vector(10 downto 0);
5755
   DA: in std_logic_vector(24 downto 0);
5756
   QA: out std_logic_vector(24 downto 0);
5757
   CLKB: in std_logic;
5758
   CENB: in std_logic;
5759
   WENB: in std_logic;
5760
   AB: in std_logic_vector(10 downto 0);
5761
   DB: in std_logic_vector(24 downto 0);
5762
   QB: out std_logic_vector(24 downto 0)
5763
   );
5764
end component;
5765
 
5766
component dpram1024x25
5767
   port (
5768
   CLKA: in std_logic;
5769
   CENA: in std_logic;
5770
   WENA: in std_logic;
5771
   AA: in std_logic_vector(9 downto 0);
5772
   DA: in std_logic_vector(24 downto 0);
5773
   QA: out std_logic_vector(24 downto 0);
5774
   CLKB: in std_logic;
5775
   CENB: in std_logic;
5776
   WENB: in std_logic;
5777
   AB: in std_logic_vector(9 downto 0);
5778
   DB: in std_logic_vector(24 downto 0);
5779
   QB: out std_logic_vector(24 downto 0)
5780
   );
5781
end component;
5782
 
5783
component dpram512x25
5784
   port (
5785
   CLKA: in std_logic;
5786
   CENA: in std_logic;
5787
   WENA: in std_logic;
5788
   AA: in std_logic_vector(8 downto 0);
5789
   DA: in std_logic_vector(24 downto 0);
5790
   QA: out std_logic_vector(24 downto 0);
5791
   CLKB: in std_logic;
5792
   CENB: in std_logic;
5793
   WENB: in std_logic;
5794
   AB: in std_logic_vector(8 downto 0);
5795
   DB: in std_logic_vector(24 downto 0);
5796
   QB: out std_logic_vector(24 downto 0)
5797
   );
5798
end component;
5799
 
5800
component dpram256x25
5801
   port (
5802
   CLKA: in std_logic;
5803
   CENA: in std_logic;
5804
   WENA: in std_logic;
5805
   AA: in std_logic_vector(7 downto 0);
5806
   DA: in std_logic_vector(24 downto 0);
5807
   QA: out std_logic_vector(24 downto 0);
5808
   CLKB: in std_logic;
5809
   CENB: in std_logic;
5810
   WENB: in std_logic;
5811
   AB: in std_logic_vector(7 downto 0);
5812
   DB: in std_logic_vector(24 downto 0);
5813
   QB: out std_logic_vector(24 downto 0)
5814
   );
5815
end component;
5816
 
5817
component dpram128x25
5818
   port (
5819
   CLKA: in std_logic;
5820
   CENA: in std_logic;
5821
   WENA: in std_logic;
5822
   AA: in std_logic_vector(6 downto 0);
5823
   DA: in std_logic_vector(24 downto 0);
5824
   QA: out std_logic_vector(24 downto 0);
5825
   CLKB: in std_logic;
5826
   CENB: in std_logic;
5827
   WENB: in std_logic;
5828
   AB: in std_logic_vector(6 downto 0);
5829
   DB: in std_logic_vector(24 downto 0);
5830
   QB: out std_logic_vector(24 downto 0)
5831
   );
5832
end component;
5833
 
5834
component dpram2048x24
5835
   port (
5836
   CLKA: in std_logic;
5837
   CENA: in std_logic;
5838
   WENA: in std_logic;
5839
   AA: in std_logic_vector(10 downto 0);
5840
   DA: in std_logic_vector(23 downto 0);
5841
   QA: out std_logic_vector(23 downto 0);
5842
   CLKB: in std_logic;
5843
   CENB: in std_logic;
5844
   WENB: in std_logic;
5845
   AB: in std_logic_vector(10 downto 0);
5846
   DB: in std_logic_vector(23 downto 0);
5847
   QB: out std_logic_vector(23 downto 0)
5848
   );
5849
end component;
5850
 
5851
component dpram1024x24
5852
   port (
5853
   CLKA: in std_logic;
5854
   CENA: in std_logic;
5855
   WENA: in std_logic;
5856
   AA: in std_logic_vector(9 downto 0);
5857
   DA: in std_logic_vector(23 downto 0);
5858
   QA: out std_logic_vector(23 downto 0);
5859
   CLKB: in std_logic;
5860
   CENB: in std_logic;
5861
   WENB: in std_logic;
5862
   AB: in std_logic_vector(9 downto 0);
5863
   DB: in std_logic_vector(23 downto 0);
5864
   QB: out std_logic_vector(23 downto 0)
5865
   );
5866
end component;
5867
 
5868
component dpram512x24
5869
   port (
5870
   CLKA: in std_logic;
5871
   CENA: in std_logic;
5872
   WENA: in std_logic;
5873
   AA: in std_logic_vector(8 downto 0);
5874
   DA: in std_logic_vector(23 downto 0);
5875
   QA: out std_logic_vector(23 downto 0);
5876
   CLKB: in std_logic;
5877
   CENB: in std_logic;
5878
   WENB: in std_logic;
5879
   AB: in std_logic_vector(8 downto 0);
5880
   DB: in std_logic_vector(23 downto 0);
5881
   QB: out std_logic_vector(23 downto 0)
5882
   );
5883
end component;
5884
 
5885
component dpram256x24
5886
   port (
5887
   CLKA: in std_logic;
5888
   CENA: in std_logic;
5889
   WENA: in std_logic;
5890
   AA: in std_logic_vector(7 downto 0);
5891
   DA: in std_logic_vector(23 downto 0);
5892
   QA: out std_logic_vector(23 downto 0);
5893
   CLKB: in std_logic;
5894
   CENB: in std_logic;
5895
   WENB: in std_logic;
5896
   AB: in std_logic_vector(7 downto 0);
5897
   DB: in std_logic_vector(23 downto 0);
5898
   QB: out std_logic_vector(23 downto 0)
5899
   );
5900
end component;
5901
 
5902
component dpram2048x23
5903
   port (
5904
   CLKA: in std_logic;
5905
   CENA: in std_logic;
5906
   WENA: in std_logic;
5907
   AA: in std_logic_vector(10 downto 0);
5908
   DA: in std_logic_vector(22 downto 0);
5909
   QA: out std_logic_vector(22 downto 0);
5910
   CLKB: in std_logic;
5911
   CENB: in std_logic;
5912
   WENB: in std_logic;
5913
   AB: in std_logic_vector(10 downto 0);
5914
   DB: in std_logic_vector(22 downto 0);
5915
   QB: out std_logic_vector(22 downto 0)
5916
   );
5917
end component;
5918
 
5919
component dpram1024x23
5920
   port (
5921
   CLKA: in std_logic;
5922
   CENA: in std_logic;
5923
   WENA: in std_logic;
5924
   AA: in std_logic_vector(9 downto 0);
5925
   DA: in std_logic_vector(22 downto 0);
5926
   QA: out std_logic_vector(22 downto 0);
5927
   CLKB: in std_logic;
5928
   CENB: in std_logic;
5929
   WENB: in std_logic;
5930
   AB: in std_logic_vector(9 downto 0);
5931
   DB: in std_logic_vector(22 downto 0);
5932
   QB: out std_logic_vector(22 downto 0)
5933
   );
5934
end component;
5935
 
5936
component dpram512x23
5937
   port (
5938
   CLKA: in std_logic;
5939
   CENA: in std_logic;
5940
   WENA: in std_logic;
5941
   AA: in std_logic_vector(8 downto 0);
5942
   DA: in std_logic_vector(22 downto 0);
5943
   QA: out std_logic_vector(22 downto 0);
5944
   CLKB: in std_logic;
5945
   CENB: in std_logic;
5946
   WENB: in std_logic;
5947
   AB: in std_logic_vector(8 downto 0);
5948
   DB: in std_logic_vector(22 downto 0);
5949
   QB: out std_logic_vector(22 downto 0)
5950
   );
5951
end component;
5952
 
5953
component dpram4096x22
5954
   port (
5955
   CLKA: in std_logic;
5956
   CENA: in std_logic;
5957
   WENA: in std_logic;
5958
   AA: in std_logic_vector(11 downto 0);
5959
   DA: in std_logic_vector(21 downto 0);
5960
   QA: out std_logic_vector(21 downto 0);
5961
   CLKB: in std_logic;
5962
   CENB: in std_logic;
5963
   WENB: in std_logic;
5964
   AB: in std_logic_vector(11 downto 0);
5965
   DB: in std_logic_vector(21 downto 0);
5966
   QB: out std_logic_vector(21 downto 0)
5967
   );
5968
end component;
5969
 
5970
component dpram2048x22
5971
   port (
5972
   CLKA: in std_logic;
5973
   CENA: in std_logic;
5974
   WENA: in std_logic;
5975
   AA: in std_logic_vector(10 downto 0);
5976
   DA: in std_logic_vector(21 downto 0);
5977
   QA: out std_logic_vector(21 downto 0);
5978
   CLKB: in std_logic;
5979
   CENB: in std_logic;
5980
   WENB: in std_logic;
5981
   AB: in std_logic_vector(10 downto 0);
5982
   DB: in std_logic_vector(21 downto 0);
5983
   QB: out std_logic_vector(21 downto 0)
5984
   );
5985
end component;
5986
 
5987
component dpram1024x22
5988
   port (
5989
   CLKA: in std_logic;
5990
   CENA: in std_logic;
5991
   WENA: in std_logic;
5992
   AA: in std_logic_vector(9 downto 0);
5993
   DA: in std_logic_vector(21 downto 0);
5994
   QA: out std_logic_vector(21 downto 0);
5995
   CLKB: in std_logic;
5996
   CENB: in std_logic;
5997
   WENB: in std_logic;
5998
   AB: in std_logic_vector(9 downto 0);
5999
   DB: in std_logic_vector(21 downto 0);
6000
   QB: out std_logic_vector(21 downto 0)
6001
   );
6002
end component;
6003
 
6004
component dpram4096x21
6005
   port (
6006
   CLKA: in std_logic;
6007
   CENA: in std_logic;
6008
   WENA: in std_logic;
6009
   AA: in std_logic_vector(11 downto 0);
6010
   DA: in std_logic_vector(20 downto 0);
6011
   QA: out std_logic_vector(20 downto 0);
6012
   CLKB: in std_logic;
6013
   CENB: in std_logic;
6014
   WENB: in std_logic;
6015
   AB: in std_logic_vector(11 downto 0);
6016
   DB: in std_logic_vector(20 downto 0);
6017
   QB: out std_logic_vector(20 downto 0)
6018
   );
6019
end component;
6020
 
6021
component dpram2048x21
6022
   port (
6023
   CLKA: in std_logic;
6024
   CENA: in std_logic;
6025
   WENA: in std_logic;
6026
   AA: in std_logic_vector(10 downto 0);
6027
   DA: in std_logic_vector(20 downto 0);
6028
   QA: out std_logic_vector(20 downto 0);
6029
   CLKB: in std_logic;
6030
   CENB: in std_logic;
6031
   WENB: in std_logic;
6032
   AB: in std_logic_vector(10 downto 0);
6033
   DB: in std_logic_vector(20 downto 0);
6034
   QB: out std_logic_vector(20 downto 0)
6035
   );
6036
end component;
6037
 
6038
component dpram4096x20
6039
   port (
6040
   CLKA: in std_logic;
6041
   CENA: in std_logic;
6042
   WENA: in std_logic;
6043
   AA: in std_logic_vector(11 downto 0);
6044
   DA: in std_logic_vector(19 downto 0);
6045
   QA: out std_logic_vector(19 downto 0);
6046
   CLKB: in std_logic;
6047
   CENB: in std_logic;
6048
   WENB: in std_logic;
6049
   AB: in std_logic_vector(11 downto 0);
6050
   DB: in std_logic_vector(19 downto 0);
6051
   QB: out std_logic_vector(19 downto 0)
6052
   );
6053
end component;
6054
 
6055
 
6056
-- Tie high/low cells
6057
 
6058
component TIEHI
6059
   port(
6060
   Y : out std_logic
6061
   );
6062
end component;
6063
 
6064
component TIELO
6065
   port(
6066
   Y : out std_logic
6067
   );
6068
end component;
6069
 
6070
-- high drive clock input pad 5V tolerant
6071
component PDCH0DGZ  port (CLK : in std_logic; CP : out std_logic); end component;
6072
component PDCH1DGZ  port (CLK : in std_logic; CP : out std_logic); end component;
6073
component PDCH2DGZ  port (CLK : in std_logic; CP : out std_logic); end component;
6074
component PDCH3DGZ  port (CLK : in std_logic; CP : out std_logic); end component;
6075
 
6076
-- input pad 5V tolerant
6077
component PDIDGZ  port (PAD : in std_logic; C : out std_logic); end component;
6078
 
6079
-- schmitt trigger input pad 5V tolerant
6080
component PDISDGZ port (PAD : in std_logic; C : out std_logic); end component;
6081
 
6082
-- CMOS 3-state output pads 5V tolerant (2,4,8,12,16,24 mA)
6083
component PDT02DGZ port (I  : in std_logic; PAD : out  std_logic;
6084
                            OEN: in std_logic); end component;
6085
component PDT04DGZ port (I  : in std_logic; PAD : out  std_logic;
6086
                            OEN: in std_logic); end component;
6087
component PDT08DGZ port (I  : in std_logic; PAD : out  std_logic;
6088
                            OEN: in std_logic); end component;
6089
component PDT12DGZ port (I  : in std_logic; PAD : out  std_logic;
6090
                            OEN: in std_logic); end component;
6091
component PDT16DGZ port (I  : in std_logic; PAD : out  std_logic;
6092
                            OEN: in std_logic); end component;
6093
component PDT24DGZ port (I  : in std_logic; PAD : out  std_logic;
6094
                            OEN: in std_logic); end component;
6095
 
6096
-- CMOS 3-state Output pad with input and Pullup 5V tolerant
6097
component PDU02DGZ port (I  : in std_logic; PAD : inout std_logic;
6098
                            OEN: in std_logic; C   : out std_logic); end component;
6099
component PDU04DGZ port (I  : in std_logic; PAD : inout  std_logic;
6100
                            OEN: in std_logic; C   : out std_logic); end component;
6101
component PDU08DGZ port (I  : in std_logic; PAD : inout  std_logic;
6102
                            OEN: in std_logic; C   : out std_logic); end component;
6103
component PDU12DGZ port (I  : in std_logic; PAD : inout  std_logic;
6104
                            OEN: in std_logic; C   : out std_logic); end component;
6105
component PDU16DGZ port (I  : in std_logic; PAD : inout  std_logic;
6106
                            OEN: in std_logic; C   : out std_logic); end component;
6107
component PDU24DGZ port (I  : in std_logic; PAD : inout  std_logic;
6108
                            OEN: in std_logic; C   : out std_logic); end component;
6109
 
6110
-- CMOS 3-state Output pad with input 5V tolerant
6111
component PDB02DGZ port (I  : in std_logic; PAD : inout  std_logic;
6112
                            OEN: in std_logic; C : out std_logic); end component;
6113
component PDB04DGZ port (I  : in std_logic; PAD : inout  std_logic;
6114
                            OEN: in std_logic; C : out std_logic); end component;
6115
component PDB08DGZ port (I  : in std_logic; PAD : inout  std_logic;
6116
                            OEN: in std_logic; C : out std_logic); end component;
6117
component PDB12DGZ port (I  : in std_logic; PAD : inout  std_logic;
6118
                            OEN: in std_logic; C : out std_logic); end component;
6119
component PDB16DGZ port (I  : in std_logic; PAD : inout  std_logic;
6120
                            OEN: in std_logic; C : out std_logic); end component;
6121
component PDB24DGZ port (I  : in std_logic; PAD : inout  std_logic;
6122
                            OEN: in std_logic; C : out std_logic); end component;
6123
 
6124
-- CMOS 3-state Output pad with schmitt trigger input 5V tolerant
6125
component PDB02SDGZ port (I  : in std_logic; PAD : inout  std_logic;
6126
                             OEN: in std_logic; C : out std_logic); end component;
6127
component PDB04SDGZ port (I  : in std_logic; PAD : inout  std_logic;
6128
                             OEN: in std_logic; C : out std_logic); end component;
6129
component PDB08SDGZ port (I  : in std_logic; PAD : inout  std_logic;
6130
                             OEN: in std_logic; C : out std_logic); end component;
6131
component PDB12SDGZ port (I  : in std_logic; PAD : inout  std_logic;
6132
                             OEN: in std_logic; C : out std_logic); end component;
6133
component PDB16SDGZ port (I  : in std_logic; PAD : inout  std_logic;
6134
                             OEN: in std_logic; C : out std_logic); end component;
6135
component PDB24SDGZ port (I  : in std_logic; PAD : inout  std_logic;
6136
                             OEN: in std_logic; C : out std_logic); end component;
6137
 
6138
-- CMOS 3-state output pads with limited slew rate 5V tolerant (8,12,16,24 mA)
6139
component PRT08DGZ port (I  : in std_logic; PAD : out  std_logic;
6140
                            OEN: in std_logic); end component;
6141
component PRT12DGZ port (I  : in std_logic; PAD : out  std_logic;
6142
                            OEN: in std_logic); end component;
6143
component PRT16DGZ port (I  : in std_logic; PAD : out  std_logic;
6144
                            OEN: in std_logic); end component;
6145
component PRT24DGZ port (I  : in std_logic; PAD : out  std_logic;
6146
                            OEN: in std_logic); end component;
6147
 
6148
-- CMOS 3-state Output pad qith input and limited slew rate 5V tolerant (8,12,16,24 mA)
6149
component PRB08DGZ port (I  : in std_logic; PAD : inout  std_logic;
6150
                             OEN: in std_logic; C : out std_logic); end component;
6151
component PRB12DGZ port (I  : in std_logic; PAD : inout  std_logic;
6152
                             OEN: in std_logic; C : out std_logic); end component;
6153
component PRB16DGZ port (I  : in std_logic; PAD : inout  std_logic;
6154
                             OEN: in std_logic; C : out std_logic); end component;
6155
component PRB24DGZ port (I  : in std_logic; PAD : inout  std_logic;
6156
                             OEN: in std_logic; C : out std_logic); end component;
6157
 
6158
end;
6159
 
6160
------------------------------------------------------------------
6161
-- sync ram generator --------------------------------------------
6162
------------------------------------------------------------------
6163
 
6164
library IEEE;
6165
use IEEE.std_logic_1164.all;
6166
use work.tech_tsmc25_syn.all;
6167
 
6168
entity tsmc25_syncram is
6169
  generic ( abits : integer := 10; dbits : integer := 8 );
6170
  port (
6171
    address  : in std_logic_vector(abits -1 downto 0);
6172
    clk      : in std_logic;
6173
    datain   : in std_logic_vector(dbits -1 downto 0);
6174
    dataout  : out std_logic_vector(dbits -1 downto 0);
6175
    enable   : in std_logic;
6176
    write    : in std_logic
6177
  );
6178
end;
6179
 
6180
architecture rtl of tsmc25_syncram is
6181
  signal cen  : std_logic;
6182
  signal wen  : std_logic_vector(3 downto 0);
6183
  signal a    : std_logic_vector(19 downto 0);
6184
  signal d, q : std_logic_vector(34 downto 0);
6185
  constant synopsys_bug : std_logic_vector(37 downto 0) := (others => '0');
6186
begin
6187
 
6188
  wen(0) <= not write;
6189
  wen(1) <= not write;
6190
  wen(2) <= not write;
6191
  wen(3) <= not write;
6192
  cen <= not enable;
6193
  a(abits -1 downto 0) <= address;
6194
  a(abits+1 downto abits) <= synopsys_bug(abits+1 downto abits);
6195
  d(dbits -1 downto 0) <= datain;
6196
  d(dbits+1 downto dbits) <= synopsys_bug(dbits+1 downto dbits);
6197
 
6198
  dataout <= q(dbits -1 downto 0);
6199
 
6200
a14d32: if (abits = 14) and (dbits = 32) generate
6201
   id0: ram16384x32
6202
        port map (
6203
        CLK => clk,
6204
        CEN => cen,
6205
        WEN => wen(0),
6206
        A => a(13 downto 0),
6207
        D => d(31 downto 0),
6208
        Q => q(31 downto 0)
6209
        );
6210
end generate;
6211
 
6212
a13d32: if (abits = 13) and (dbits = 32) generate
6213
   id0: ram8192x32
6214
        port map (
6215
        CLK => clk,
6216
        CEN => cen,
6217
        WEN => wen(0),
6218
        A => a(12 downto 0),
6219
        D => d(31 downto 0),
6220
        Q => q(31 downto 0)
6221
        );
6222
end generate;
6223
 
6224
 
6225
a12d32: if (abits = 12) and (dbits = 32) generate
6226
   id0: ram4096x32
6227
        port map (
6228
        CLK => clk,
6229
        CEN => cen,
6230
        WEN => wen,
6231
        A => a(11 downto 0),
6232
        D => d(31 downto 0),
6233
        Q => q(31 downto 0)
6234
        );
6235
end generate;
6236
 
6237
a11d32: if (abits = 11) and (dbits = 32) generate
6238
   id0: ram2048x32
6239
        port map (
6240
        CLK => clk,
6241
        CEN => cen,
6242
        WEN => wen,
6243
        A => a(10 downto 0),
6244
        D => d(31 downto 0),
6245
        Q => q(31 downto 0)
6246
        );
6247
end generate;
6248
 
6249
a10d32: if (abits = 10) and (dbits = 32) generate
6250
   id0: ram1024x32
6251
        port map (
6252
        CLK => clk,
6253
        CEN => cen,
6254
        WEN => wen,
6255
        A => a( 9 downto 0),
6256
        D => d(31 downto 0),
6257
        Q => q(31 downto 0)
6258
        );
6259
end generate;
6260
 
6261
a9d32: if (abits = 9) and (dbits = 32) generate
6262
   id0: ram512x32
6263
        port map (
6264
        CLK => clk,
6265
        CEN => cen,
6266
        WEN => wen(0),
6267
        A => a( 8 downto 0),
6268
        D => d(31 downto 0),
6269
        Q => q(31 downto 0)
6270
        );
6271
end generate;
6272
 
6273
a8d32: if (abits = 8) and (dbits = 32) generate
6274
   id0: ram256x32
6275
        port map (
6276
        CLK => clk,
6277
        CEN => cen,
6278
        WEN => wen(0),
6279
        A => a( 7 downto 0),
6280
        D => d(31 downto 0),
6281
        Q => q(31 downto 0)
6282
        );
6283
end generate;
6284
 
6285
a7d32: if (abits = 7) and (dbits = 32) generate
6286
   id0: ram128x32
6287
        port map (
6288
        CLK => clk,
6289
        CEN => cen,
6290
        WEN => wen(0),
6291
        A => a( 6 downto 0),
6292
        D => d(31 downto 0),
6293
        Q => q(31 downto 0)
6294
        );
6295
end generate;
6296
 
6297
a6d32: if (abits = 6) and (dbits = 32) generate
6298
   id0: ram64x32
6299
        port map (
6300
        CLK => clk,
6301
        CEN => cen,
6302
        WEN => wen(0),
6303
        A => a( 5 downto 0),
6304
        D => d(31 downto 0),
6305
        Q => q(31 downto 0)
6306
        );
6307
end generate;
6308
 
6309
a5d32: if (abits = 5) and (dbits = 32) generate
6310
   id0: ram32x32
6311
        port map (
6312
        CLK => clk,
6313
        CEN => cen,
6314
        WEN => wen(0),
6315
        A => a( 4 downto 0),
6316
        D => d(31 downto 0),
6317
        Q => q(31 downto 0)
6318
        );
6319
end generate;
6320
 
6321
a6d31: if (abits = 6) and (dbits = 31) generate
6322
   id0: ram64x31
6323
        port map (
6324
        CLK => clk,
6325
        CEN => cen,
6326
        WEN => wen(0),
6327
        A => a( 5 downto 0),
6328
        D => d(30 downto 0),
6329
        Q => q(30 downto 0)
6330
        );
6331
end generate;
6332
 
6333
a5d31: if (abits = 5) and (dbits = 31) generate
6334
   id0: ram32x31
6335
        port map (
6336
        CLK => clk,
6337
        CEN => cen,
6338
        WEN => wen(0),
6339
        A => a( 4 downto 0),
6340
        D => d(30 downto 0),
6341
        Q => q(30 downto 0)
6342
        );
6343
end generate;
6344
 
6345
a7d30: if (abits = 7) and (dbits = 30) generate
6346
   id0: ram128x30
6347
        port map (
6348
        CLK => clk,
6349
        CEN => cen,
6350
        WEN => wen(0),
6351
        A => a( 6 downto 0),
6352
        D => d(29 downto 0),
6353
        Q => q(29 downto 0)
6354
        );
6355
end generate;
6356
 
6357
a6d30: if (abits = 6) and (dbits = 30) generate
6358
   id0: ram64x30
6359
        port map (
6360
        CLK => clk,
6361
        CEN => cen,
6362
        WEN => wen(0),
6363
        A => a( 5 downto 0),
6364
        D => d(29 downto 0),
6365
        Q => q(29 downto 0)
6366
        );
6367
end generate;
6368
 
6369
a5d30: if (abits = 5) and (dbits = 30) generate
6370
   id0: ram32x30
6371
        port map (
6372
        CLK => clk,
6373
        CEN => cen,
6374
        WEN => wen(0),
6375
        A => a( 4 downto 0),
6376
        D => d(29 downto 0),
6377
        Q => q(29 downto 0)
6378
        );
6379
end generate;
6380
 
6381
a8d29: if (abits = 8) and (dbits = 29) generate
6382
   id0: ram256x29
6383
        port map (
6384
        CLK => clk,
6385
        CEN => cen,
6386
        WEN => wen(0),
6387
        A => a( 7 downto 0),
6388
        D => d(28 downto 0),
6389
        Q => q(28 downto 0)
6390
        );
6391
end generate;
6392
 
6393
a7d29: if (abits = 7) and (dbits = 29) generate
6394
   id0: ram128x29
6395
        port map (
6396
        CLK => clk,
6397
        CEN => cen,
6398
        WEN => wen(0),
6399
        A => a( 6 downto 0),
6400
        D => d(28 downto 0),
6401
        Q => q(28 downto 0)
6402
        );
6403
end generate;
6404
 
6405
a6d29: if (abits = 6) and (dbits = 29) generate
6406
   id0: ram64x29
6407
        port map (
6408
        CLK => clk,
6409
        CEN => cen,
6410
        WEN => wen(0),
6411
        A => a( 5 downto 0),
6412
        D => d(28 downto 0),
6413
        Q => q(28 downto 0)
6414
        );
6415
end generate;
6416
 
6417
a9d28: if (abits = 9) and (dbits = 28) generate
6418
   id0: ram512x28
6419
        port map (
6420
        CLK => clk,
6421
        CEN => cen,
6422
        WEN => wen(0),
6423
        A => a( 8 downto 0),
6424
        D => d(27 downto 0),
6425
        Q => q(27 downto 0)
6426
        );
6427
end generate;
6428
 
6429
a8d28: if (abits = 8) and (dbits = 28) generate
6430
   id0: ram256x28
6431
        port map (
6432
        CLK => clk,
6433
        CEN => cen,
6434
        WEN => wen(0),
6435
        A => a( 7 downto 0),
6436
        D => d(27 downto 0),
6437
        Q => q(27 downto 0)
6438
        );
6439
end generate;
6440
 
6441
a7d28: if (abits = 7) and (dbits = 28) generate
6442
   id0: ram128x28
6443
        port map (
6444
        CLK => clk,
6445
        CEN => cen,
6446
        WEN => wen(0),
6447
        A => a( 6 downto 0),
6448
        D => d(27 downto 0),
6449
        Q => q(27 downto 0)
6450
        );
6451
end generate;
6452
 
6453
a6d28: if (abits = 6) and (dbits = 28) generate
6454
   id0: ram64x28
6455
        port map (
6456
        CLK => clk,
6457
        CEN => cen,
6458
        WEN => wen(0),
6459
        A => a( 5 downto 0),
6460
        D => d(27 downto 0),
6461
        Q => q(27 downto 0)
6462
        );
6463
end generate;
6464
 
6465
a10d27: if (abits = 10) and (dbits = 27) generate
6466
   id0: ram1024x27
6467
        port map (
6468
        CLK => clk,
6469
        CEN => cen,
6470
        WEN => wen(0),
6471
        A => a( 9 downto 0),
6472
        D => d(26 downto 0),
6473
        Q => q(26 downto 0)
6474
        );
6475
end generate;
6476
 
6477
a9d27: if (abits = 9) and (dbits = 27) generate
6478
   id0: ram512x27
6479
        port map (
6480
        CLK => clk,
6481
        CEN => cen,
6482
        WEN => wen(0),
6483
        A => a( 8 downto 0),
6484
        D => d(26 downto 0),
6485
        Q => q(26 downto 0)
6486
        );
6487
end generate;
6488
 
6489
a8d27: if (abits = 8) and (dbits = 27) generate
6490
   id0: ram256x27
6491
        port map (
6492
        CLK => clk,
6493
        CEN => cen,
6494
        WEN => wen(0),
6495
        A => a( 7 downto 0),
6496
        D => d(26 downto 0),
6497
        Q => q(26 downto 0)
6498
        );
6499
end generate;
6500
 
6501
a7d27: if (abits = 7) and (dbits = 27) generate
6502
   id0: ram128x27
6503
        port map (
6504
        CLK => clk,
6505
        CEN => cen,
6506
        WEN => wen(0),
6507
        A => a( 6 downto 0),
6508
        D => d(26 downto 0),
6509
        Q => q(26 downto 0)
6510
        );
6511
end generate;
6512
 
6513
a6d27: if (abits = 6) and (dbits = 27) generate
6514
   id0: ram64x27
6515
        port map (
6516
        CLK => clk,
6517
        CEN => cen,
6518
        WEN => wen(0),
6519
        A => a( 5 downto 0),
6520
        D => d(26 downto 0),
6521
        Q => q(26 downto 0)
6522
        );
6523
end generate;
6524
 
6525
a11d26: if (abits = 11) and (dbits = 26) generate
6526
   id0: ram2048x26
6527
        port map (
6528
        CLK => clk,
6529
        CEN => cen,
6530
        WEN => wen(0),
6531
        A => a(10 downto 0),
6532
        D => d(25 downto 0),
6533
        Q => q(25 downto 0)
6534
        );
6535
end generate;
6536
 
6537
a10d26: if (abits = 10) and (dbits = 26) generate
6538
   id0: ram1024x26
6539
        port map (
6540
        CLK => clk,
6541
        CEN => cen,
6542
        WEN => wen(0),
6543
        A => a( 9 downto 0),
6544
        D => d(25 downto 0),
6545
        Q => q(25 downto 0)
6546
        );
6547
end generate;
6548
 
6549
a9d26: if (abits = 9) and (dbits = 26) generate
6550
   id0: ram512x26
6551
        port map (
6552
        CLK => clk,
6553
        CEN => cen,
6554
        WEN => wen(0),
6555
        A => a( 8 downto 0),
6556
        D => d(25 downto 0),
6557
        Q => q(25 downto 0)
6558
        );
6559
end generate;
6560
 
6561
a8d26: if (abits = 8) and (dbits = 26) generate
6562
   id0: ram256x26
6563
        port map (
6564
        CLK => clk,
6565
        CEN => cen,
6566
        WEN => wen(0),
6567
        A => a( 7 downto 0),
6568
        D => d(25 downto 0),
6569
        Q => q(25 downto 0)
6570
        );
6571
end generate;
6572
 
6573
a7d26: if (abits = 7) and (dbits = 26) generate
6574
   id0: ram128x26
6575
        port map (
6576
        CLK => clk,
6577
        CEN => cen,
6578
        WEN => wen(0),
6579
        A => a( 6 downto 0),
6580
        D => d(25 downto 0),
6581
        Q => q(25 downto 0)
6582
        );
6583
end generate;
6584
 
6585
a6d26: if (abits = 6) and (dbits = 26) generate
6586
   id0: ram64x26
6587
        port map (
6588
        CLK => clk,
6589
        CEN => cen,
6590
        WEN => wen(0),
6591
        A => a( 5 downto 0),
6592
        D => d(25 downto 0),
6593
        Q => q(25 downto 0)
6594
        );
6595
end generate;
6596
 
6597
a11d25: if (abits = 11) and (dbits = 25) generate
6598
   id0: ram2048x25
6599
        port map (
6600
        CLK => clk,
6601
        CEN => cen,
6602
        WEN => wen(0),
6603
        A => a(10 downto 0),
6604
        D => d(24 downto 0),
6605
        Q => q(24 downto 0)
6606
        );
6607
end generate;
6608
 
6609
a10d25: if (abits = 10) and (dbits = 25) generate
6610
   id0: ram1024x25
6611
        port map (
6612
        CLK => clk,
6613
        CEN => cen,
6614
        WEN => wen(0),
6615
        A => a( 9 downto 0),
6616
        D => d(24 downto 0),
6617
        Q => q(24 downto 0)
6618
        );
6619
end generate;
6620
 
6621
a9d25: if (abits = 9) and (dbits = 25) generate
6622
   id0: ram512x25
6623
        port map (
6624
        CLK => clk,
6625
        CEN => cen,
6626
        WEN => wen(0),
6627
        A => a( 8 downto 0),
6628
        D => d(24 downto 0),
6629
        Q => q(24 downto 0)
6630
        );
6631
end generate;
6632
 
6633
a8d25: if (abits = 8) and (dbits = 25) generate
6634
   id0: ram256x25
6635
        port map (
6636
        CLK => clk,
6637
        CEN => cen,
6638
        WEN => wen(0),
6639
        A => a( 7 downto 0),
6640
        D => d(24 downto 0),
6641
        Q => q(24 downto 0)
6642
        );
6643
end generate;
6644
 
6645
a7d25: if (abits = 7) and (dbits = 25) generate
6646
   id0: ram128x25
6647
        port map (
6648
        CLK => clk,
6649
        CEN => cen,
6650
        WEN => wen(0),
6651
        A => a( 6 downto 0),
6652
        D => d(24 downto 0),
6653
        Q => q(24 downto 0)
6654
        );
6655
end generate;
6656
 
6657
a11d24: if (abits = 11) and (dbits = 24) generate
6658
   id0: ram2048x24
6659
        port map (
6660
        CLK => clk,
6661
        CEN => cen,
6662
        WEN => wen(0),
6663
        A => a(10 downto 0),
6664
        D => d(23 downto 0),
6665
        Q => q(23 downto 0)
6666
        );
6667
end generate;
6668
 
6669
a10d24: if (abits = 10) and (dbits = 24) generate
6670
   id0: ram1024x24
6671
        port map (
6672
        CLK => clk,
6673
        CEN => cen,
6674
        WEN => wen(0),
6675
        A => a( 9 downto 0),
6676
        D => d(23 downto 0),
6677
        Q => q(23 downto 0)
6678
        );
6679
end generate;
6680
 
6681
a9d24: if (abits = 9) and (dbits = 24) generate
6682
   id0: ram512x24
6683
        port map (
6684
        CLK => clk,
6685
        CEN => cen,
6686
        WEN => wen(0),
6687
        A => a( 8 downto 0),
6688
        D => d(23 downto 0),
6689
        Q => q(23 downto 0)
6690
        );
6691
end generate;
6692
 
6693
a8d24: if (abits = 8) and (dbits = 24) generate
6694
   id0: ram256x24
6695
        port map (
6696
        CLK => clk,
6697
        CEN => cen,
6698
        WEN => wen(0),
6699
        A => a( 7 downto 0),
6700
        D => d(23 downto 0),
6701
        Q => q(23 downto 0)
6702
        );
6703
end generate;
6704
 
6705
a11d23: if (abits = 11) and (dbits = 23) generate
6706
   id0: ram2048x23
6707
        port map (
6708
        CLK => clk,
6709
        CEN => cen,
6710
        WEN => wen(0),
6711
        A => a(10 downto 0),
6712
        D => d(22 downto 0),
6713
        Q => q(22 downto 0)
6714
        );
6715
end generate;
6716
 
6717
a10d23: if (abits = 10) and (dbits = 23) generate
6718
   id0: ram1024x23
6719
        port map (
6720
        CLK => clk,
6721
        CEN => cen,
6722
        WEN => wen(0),
6723
        A => a( 9 downto 0),
6724
        D => d(22 downto 0),
6725
        Q => q(22 downto 0)
6726
        );
6727
end generate;
6728
 
6729
a9d23: if (abits = 9) and (dbits = 23) generate
6730
   id0: ram512x23
6731
        port map (
6732
        CLK => clk,
6733
        CEN => cen,
6734
        WEN => wen(0),
6735
        A => a( 8 downto 0),
6736
        D => d(22 downto 0),
6737
        Q => q(22 downto 0)
6738
        );
6739
end generate;
6740
 
6741
a12d22: if (abits = 12) and (dbits = 22) generate
6742
   id0: ram4096x22
6743
        port map (
6744
        CLK => clk,
6745
        CEN => cen,
6746
        WEN => wen(0),
6747
        A => a(11 downto 0),
6748
        D => d(21 downto 0),
6749
        Q => q(21 downto 0)
6750
        );
6751
end generate;
6752
 
6753
a11d22: if (abits = 11) and (dbits = 22) generate
6754
   id0: ram2048x22
6755
        port map (
6756
        CLK => clk,
6757
        CEN => cen,
6758
        WEN => wen(0),
6759
        A => a(10 downto 0),
6760
        D => d(21 downto 0),
6761
        Q => q(21 downto 0)
6762
        );
6763
end generate;
6764
 
6765
a10d22: if (abits = 10) and (dbits = 22) generate
6766
   id0: ram1024x22
6767
        port map (
6768
        CLK => clk,
6769
        CEN => cen,
6770
        WEN => wen(0),
6771
        A => a( 9 downto 0),
6772
        D => d(21 downto 0),
6773
        Q => q(21 downto 0)
6774
        );
6775
end generate;
6776
 
6777
a12d21: if (abits = 12) and (dbits = 21) generate
6778
   id0: ram4096x21
6779
        port map (
6780
        CLK => clk,
6781
        CEN => cen,
6782
        WEN => wen(0),
6783
        A => a(11 downto 0),
6784
        D => d(20 downto 0),
6785
        Q => q(20 downto 0)
6786
        );
6787
end generate;
6788
 
6789
a11d21: if (abits = 11) and (dbits = 21) generate
6790
   id0: ram2048x21
6791
        port map (
6792
        CLK => clk,
6793
        CEN => cen,
6794
        WEN => wen(0),
6795
        A => a(10 downto 0),
6796
        D => d(20 downto 0),
6797
        Q => q(20 downto 0)
6798
        );
6799
end generate;
6800
 
6801
a12d20: if (abits = 12) and (dbits = 20) generate
6802
   id0: ram4096x20
6803
        port map (
6804
        CLK => clk,
6805
        CEN => cen,
6806
        WEN => wen(0),
6807
        A => a(11 downto 0),
6808
        D => d(19 downto 0),
6809
        Q => q(19 downto 0)
6810
        );
6811
end generate;
6812
 
6813
end rtl;
6814
 
6815
 
6816
------------------------------------------------------------------
6817
-- sync dpram generator --------------------------------------------
6818
------------------------------------------------------------------
6819
 
6820
library IEEE;
6821
use IEEE.std_logic_1164.all;
6822
use work.tech_tsmc25_syn.all;
6823
use work.leon_iface.all;
6824
 
6825
 
6826
entity tsmc25_dpram is
6827
  generic ( abits : integer := 10; dbits : integer := 8 );
6828
  port (
6829
    address1 : in std_logic_vector((abits -1) downto 0);
6830
    clk      : in std_logic;
6831
    datain1  : in std_logic_vector((dbits -1) downto 0);
6832
    dataout1 : out std_logic_vector((dbits -1) downto 0);
6833
    enable1  : in std_logic;
6834
    write1   : in std_logic;
6835
    address2 : in std_logic_vector((abits -1) downto 0);
6836
    datain2  : in std_logic_vector((dbits -1) downto 0);
6837
    dataout2 : out std_logic_vector((dbits -1) downto 0);
6838
    enable2  : in std_logic;
6839
    write2   : in std_logic
6840
   );
6841
end;
6842
 
6843
architecture rtl of tsmc25_dpram is
6844
 
6845
signal cena, cenb, wena, wenb : std_logic;
6846
 
6847
begin
6848
  cena <= not enable1;
6849
  cenb <= not enable2;
6850
  wena <= not write1;
6851
  wenb <= not write2;
6852
 
6853
  dp2048x32 : if (abits = 11) and (dbits = 32) generate
6854
    dp0:dpram2048x32
6855
        port map(
6856
        CLKA => clk, CENA => cena, WENA => wena,
6857
        AA   => address1(abits -1 downto 0),
6858
        DA   => datain1 (dbits -1 downto 0),
6859
        QA   => dataout1(dbits -1 downto 0),
6860
        CLKB => clk, CENB => cenb, WENB => wenb,
6861
        AB   => address2(abits -1 downto 0),
6862
        DB   => datain2 (dbits -1 downto 0),
6863
        QB   => dataout2(dbits -1 downto 0)
6864
        );
6865
  end generate;
6866
 
6867
  dp1024x32 : if (abits = 10) and (dbits = 32) generate
6868
    dp0:dpram1024x32
6869
        port map(
6870
        CLKA => clk, CENA => cena, WENA => wena,
6871
        AA   => address1(abits -1 downto 0),
6872
        DA   => datain1 (dbits -1 downto 0),
6873
        QA   => dataout1(dbits -1 downto 0),
6874
        CLKB => clk, CENB => cenb, WENB => wenb,
6875
        AB   => address2(abits -1 downto 0),
6876
        DB   => datain2 (dbits -1 downto 0),
6877
        QB   => dataout2(dbits -1 downto 0)
6878
        );
6879
  end generate;
6880
 
6881
  dp512x32 : if (abits = 9) and (dbits = 32) generate
6882
    dp0:dpram512x32
6883
        port map(
6884
        CLKA => clk, CENA => cena, WENA => wena,
6885
        AA   => address1(abits -1 downto 0),
6886
        DA   => datain1 (dbits -1 downto 0),
6887
        QA   => dataout1(dbits -1 downto 0),
6888
        CLKB => clk, CENB => cenb, WENB => wenb,
6889
        AB   => address2(abits -1 downto 0),
6890
        DB   => datain2 (dbits -1 downto 0),
6891
        QB   => dataout2(dbits -1 downto 0)
6892
        );
6893
  end generate;
6894
 
6895
  dp256x32 : if (abits = 8) and (dbits = 32) generate
6896
    dp0:dpram256x32
6897
        port map(
6898
        CLKA => clk, CENA => cena, WENA => wena,
6899
        AA   => address1(abits -1 downto 0),
6900
        DA   => datain1 (dbits -1 downto 0),
6901
        QA   => dataout1(dbits -1 downto 0),
6902
        CLKB => clk, CENB => cenb, WENB => wenb,
6903
        AB   => address2(abits -1 downto 0),
6904
        DB   => datain2 (dbits -1 downto 0),
6905
        QB   => dataout2(dbits -1 downto 0)
6906
        );
6907
  end generate;
6908
 
6909
  dp128x32 : if (abits = 7) and (dbits = 32) generate
6910
    dp0:dpram128x32
6911
        port map(
6912
        CLKA => clk, CENA => cena, WENA => wena,
6913
        AA   => address1(abits -1 downto 0),
6914
        DA   => datain1 (dbits -1 downto 0),
6915
        QA   => dataout1(dbits -1 downto 0),
6916
        CLKB => clk, CENB => cenb, WENB => wenb,
6917
        AB   => address2(abits -1 downto 0),
6918
        DB   => datain2 (dbits -1 downto 0),
6919
        QB   => dataout2(dbits -1 downto 0)
6920
        );
6921
  end generate;
6922
 
6923
  dp64x32 : if (abits = 6) and (dbits = 32) generate
6924
    dp0:dpram64x32
6925
        port map(
6926
        CLKA => clk, CENA => cena, WENA => wena,
6927
        AA   => address1(abits -1 downto 0),
6928
        DA   => datain1 (dbits -1 downto 0),
6929
        QA   => dataout1(dbits -1 downto 0),
6930
        CLKB => clk, CENB => cenb, WENB => wenb,
6931
        AB   => address2(abits -1 downto 0),
6932
        DB   => datain2 (dbits -1 downto 0),
6933
        QB   => dataout2(dbits -1 downto 0)
6934
        );
6935
  end generate;
6936
 
6937
  dp32x32 : if (abits = 5) and (dbits = 32) generate
6938
    dp0:dpram32x32
6939
        port map(
6940
        CLKA => clk, CENA => cena, WENA => wena,
6941
        AA   => address1(abits -1 downto 0),
6942
        DA   => datain1 (dbits -1 downto 0),
6943
        QA   => dataout1(dbits -1 downto 0),
6944
        CLKB => clk, CENB => cenb, WENB => wenb,
6945
        AB   => address2(abits -1 downto 0),
6946
        DB   => datain2 (dbits -1 downto 0),
6947
        QB   => dataout2(dbits -1 downto 0)
6948
        );
6949
  end generate;
6950
 
6951
  dp64x31 : if (abits = 6) and (dbits = 31) generate
6952
    dp0:dpram64x31
6953
        port map(
6954
        CLKA => clk, CENA => cena, WENA => wena,
6955
        AA   => address1(abits -1 downto 0),
6956
        DA   => datain1 (dbits -1 downto 0),
6957
        QA   => dataout1(dbits -1 downto 0),
6958
        CLKB => clk, CENB => cenb, WENB => wenb,
6959
        AB   => address2(abits -1 downto 0),
6960
        DB   => datain2 (dbits -1 downto 0),
6961
        QB   => dataout2(dbits -1 downto 0)
6962
        );
6963
  end generate;
6964
 
6965
  dp32x31 : if (abits = 5) and (dbits = 31) generate
6966
    dp0:dpram32x31
6967
        port map(
6968
        CLKA => clk, CENA => cena, WENA => wena,
6969
        AA   => address1(abits -1 downto 0),
6970
        DA   => datain1 (dbits -1 downto 0),
6971
        QA   => dataout1(dbits -1 downto 0),
6972
        CLKB => clk, CENB => cenb, WENB => wenb,
6973
        AB   => address2(abits -1 downto 0),
6974
        DB   => datain2 (dbits -1 downto 0),
6975
        QB   => dataout2(dbits -1 downto 0)
6976
        );
6977
  end generate;
6978
 
6979
  dp128x30 : if (abits = 7) and (dbits = 30) generate
6980
    dp0:dpram128x30
6981
        port map(
6982
        CLKA => clk, CENA => cena, WENA => wena,
6983
        AA   => address1(abits -1 downto 0),
6984
        DA   => datain1 (dbits -1 downto 0),
6985
        QA   => dataout1(dbits -1 downto 0),
6986
        CLKB => clk, CENB => cenb, WENB => wenb,
6987
        AB   => address2(abits -1 downto 0),
6988
        DB   => datain2 (dbits -1 downto 0),
6989
        QB   => dataout2(dbits -1 downto 0)
6990
        );
6991
  end generate;
6992
 
6993
  dp64x30 : if (abits = 6) and (dbits = 30) generate
6994
    dp0:dpram64x30
6995
        port map(
6996
        CLKA => clk, CENA => cena, WENA => wena,
6997
        AA   => address1(abits -1 downto 0),
6998
        DA   => datain1 (dbits -1 downto 0),
6999
        QA   => dataout1(dbits -1 downto 0),
7000
        CLKB => clk, CENB => cenb, WENB => wenb,
7001
        AB   => address2(abits -1 downto 0),
7002
        DB   => datain2 (dbits -1 downto 0),
7003
        QB   => dataout2(dbits -1 downto 0)
7004
        );
7005
  end generate;
7006
 
7007
  dp32x30 : if (abits = 5) and (dbits = 30) generate
7008
    dp0:dpram32x30
7009
        port map(
7010
        CLKA => clk, CENA => cena, WENA => wena,
7011
        AA   => address1(abits -1 downto 0),
7012
        DA   => datain1 (dbits -1 downto 0),
7013
        QA   => dataout1(dbits -1 downto 0),
7014
        CLKB => clk, CENB => cenb, WENB => wenb,
7015
        AB   => address2(abits -1 downto 0),
7016
        DB   => datain2 (dbits -1 downto 0),
7017
        QB   => dataout2(dbits -1 downto 0)
7018
        );
7019
  end generate;
7020
 
7021
  dp256x29 : if (abits = 8) and (dbits = 29) generate
7022
    dp0:dpram256x29
7023
        port map(
7024
        CLKA => clk, CENA => cena, WENA => wena,
7025
        AA   => address1(abits -1 downto 0),
7026
        DA   => datain1 (dbits -1 downto 0),
7027
        QA   => dataout1(dbits -1 downto 0),
7028
        CLKB => clk, CENB => cenb, WENB => wenb,
7029
        AB   => address2(abits -1 downto 0),
7030
        DB   => datain2 (dbits -1 downto 0),
7031
        QB   => dataout2(dbits -1 downto 0)
7032
        );
7033
  end generate;
7034
 
7035
  dp128x29 : if (abits = 7) and (dbits = 29) generate
7036
    dp0:dpram128x29
7037
        port map(
7038
        CLKA => clk, CENA => cena, WENA => wena,
7039
        AA   => address1(abits -1 downto 0),
7040
        DA   => datain1 (dbits -1 downto 0),
7041
        QA   => dataout1(dbits -1 downto 0),
7042
        CLKB => clk, CENB => cenb, WENB => wenb,
7043
        AB   => address2(abits -1 downto 0),
7044
        DB   => datain2 (dbits -1 downto 0),
7045
        QB   => dataout2(dbits -1 downto 0)
7046
        );
7047
  end generate;
7048
 
7049
  dp64x29 : if (abits = 6) and (dbits = 29) generate
7050
    dp0:dpram64x29
7051
        port map(
7052
        CLKA => clk, CENA => cena, WENA => wena,
7053
        AA   => address1(abits -1 downto 0),
7054
        DA   => datain1 (dbits -1 downto 0),
7055
        QA   => dataout1(dbits -1 downto 0),
7056
        CLKB => clk, CENB => cenb, WENB => wenb,
7057
        AB   => address2(abits -1 downto 0),
7058
        DB   => datain2 (dbits -1 downto 0),
7059
        QB   => dataout2(dbits -1 downto 0)
7060
        );
7061
  end generate;
7062
 
7063
  dp512x28 : if (abits = 9) and (dbits = 28) generate
7064
    dp0:dpram512x28
7065
        port map(
7066
        CLKA => clk, CENA => cena, WENA => wena,
7067
        AA   => address1(abits -1 downto 0),
7068
        DA   => datain1 (dbits -1 downto 0),
7069
        QA   => dataout1(dbits -1 downto 0),
7070
        CLKB => clk, CENB => cenb, WENB => wenb,
7071
        AB   => address2(abits -1 downto 0),
7072
        DB   => datain2 (dbits -1 downto 0),
7073
        QB   => dataout2(dbits -1 downto 0)
7074
        );
7075
  end generate;
7076
 
7077
  dp256x28 : if (abits = 8) and (dbits = 28) generate
7078
    dp0:dpram256x28
7079
        port map(
7080
        CLKA => clk, CENA => cena, WENA => wena,
7081
        AA   => address1(abits -1 downto 0),
7082
        DA   => datain1 (dbits -1 downto 0),
7083
        QA   => dataout1(dbits -1 downto 0),
7084
        CLKB => clk, CENB => cenb, WENB => wenb,
7085
        AB   => address2(abits -1 downto 0),
7086
        DB   => datain2 (dbits -1 downto 0),
7087
        QB   => dataout2(dbits -1 downto 0)
7088
        );
7089
  end generate;
7090
 
7091
  dp128x28 : if (abits = 7) and (dbits = 28) generate
7092
    dp0:dpram128x28
7093
        port map(
7094
        CLKA => clk, CENA => cena, WENA => wena,
7095
        AA   => address1(abits -1 downto 0),
7096
        DA   => datain1 (dbits -1 downto 0),
7097
        QA   => dataout1(dbits -1 downto 0),
7098
        CLKB => clk, CENB => cenb, WENB => wenb,
7099
        AB   => address2(abits -1 downto 0),
7100
        DB   => datain2 (dbits -1 downto 0),
7101
        QB   => dataout2(dbits -1 downto 0)
7102
        );
7103
  end generate;
7104
 
7105
  dp64x28 : if (abits = 6) and (dbits = 28) generate
7106
    dp0:dpram64x28
7107
        port map(
7108
        CLKA => clk, CENA => cena, WENA => wena,
7109
        AA   => address1(abits -1 downto 0),
7110
        DA   => datain1 (dbits -1 downto 0),
7111
        QA   => dataout1(dbits -1 downto 0),
7112
        CLKB => clk, CENB => cenb, WENB => wenb,
7113
        AB   => address2(abits -1 downto 0),
7114
        DB   => datain2 (dbits -1 downto 0),
7115
        QB   => dataout2(dbits -1 downto 0)
7116
        );
7117
  end generate;
7118
 
7119
  dp1024x27 : if (abits = 10) and (dbits = 27) generate
7120
    dp0:dpram1024x27
7121
        port map(
7122
        CLKA => clk, CENA => cena, WENA => wena,
7123
        AA   => address1(abits -1 downto 0),
7124
        DA   => datain1 (dbits -1 downto 0),
7125
        QA   => dataout1(dbits -1 downto 0),
7126
        CLKB => clk, CENB => cenb, WENB => wenb,
7127
        AB   => address2(abits -1 downto 0),
7128
        DB   => datain2 (dbits -1 downto 0),
7129
        QB   => dataout2(dbits -1 downto 0)
7130
        );
7131
  end generate;
7132
 
7133
  dp512x27 : if (abits = 9) and (dbits = 27) generate
7134
    dp0:dpram512x27
7135
        port map(
7136
        CLKA => clk, CENA => cena, WENA => wena,
7137
        AA   => address1(abits -1 downto 0),
7138
        DA   => datain1 (dbits -1 downto 0),
7139
        QA   => dataout1(dbits -1 downto 0),
7140
        CLKB => clk, CENB => cenb, WENB => wenb,
7141
        AB   => address2(abits -1 downto 0),
7142
        DB   => datain2 (dbits -1 downto 0),
7143
        QB   => dataout2(dbits -1 downto 0)
7144
        );
7145
  end generate;
7146
 
7147
  dp256x27 : if (abits = 8) and (dbits = 27) generate
7148
    dp0:dpram256x27
7149
        port map(
7150
        CLKA => clk, CENA => cena, WENA => wena,
7151
        AA   => address1(abits -1 downto 0),
7152
        DA   => datain1 (dbits -1 downto 0),
7153
        QA   => dataout1(dbits -1 downto 0),
7154
        CLKB => clk, CENB => cenb, WENB => wenb,
7155
        AB   => address2(abits -1 downto 0),
7156
        DB   => datain2 (dbits -1 downto 0),
7157
        QB   => dataout2(dbits -1 downto 0)
7158
        );
7159
  end generate;
7160
 
7161
  dp128x27 : if (abits = 7) and (dbits = 27) generate
7162
    dp0:dpram128x27
7163
        port map(
7164
        CLKA => clk, CENA => cena, WENA => wena,
7165
        AA   => address1(abits -1 downto 0),
7166
        DA   => datain1 (dbits -1 downto 0),
7167
        QA   => dataout1(dbits -1 downto 0),
7168
        CLKB => clk, CENB => cenb, WENB => wenb,
7169
        AB   => address2(abits -1 downto 0),
7170
        DB   => datain2 (dbits -1 downto 0),
7171
        QB   => dataout2(dbits -1 downto 0)
7172
        );
7173
  end generate;
7174
 
7175
  dp64x27 : if (abits = 6) and (dbits = 27) generate
7176
    dp0:dpram64x27
7177
        port map(
7178
        CLKA => clk, CENA => cena, WENA => wena,
7179
        AA   => address1(abits -1 downto 0),
7180
        DA   => datain1 (dbits -1 downto 0),
7181
        QA   => dataout1(dbits -1 downto 0),
7182
        CLKB => clk, CENB => cenb, WENB => wenb,
7183
        AB   => address2(abits -1 downto 0),
7184
        DB   => datain2 (dbits -1 downto 0),
7185
        QB   => dataout2(dbits -1 downto 0)
7186
        );
7187
  end generate;
7188
 
7189
  dp2048x26 : if (abits = 11) and (dbits = 26) generate
7190
    dp0:dpram2048x26
7191
        port map(
7192
        CLKA => clk, CENA => cena, WENA => wena,
7193
        AA   => address1(abits -1 downto 0),
7194
        DA   => datain1 (dbits -1 downto 0),
7195
        QA   => dataout1(dbits -1 downto 0),
7196
        CLKB => clk, CENB => cenb, WENB => wenb,
7197
        AB   => address2(abits -1 downto 0),
7198
        DB   => datain2 (dbits -1 downto 0),
7199
        QB   => dataout2(dbits -1 downto 0)
7200
        );
7201
  end generate;
7202
 
7203
  dp1024x26 : if (abits = 10) and (dbits = 26) generate
7204
    dp0:dpram1024x26
7205
        port map(
7206
        CLKA => clk, CENA => cena, WENA => wena,
7207
        AA   => address1(abits -1 downto 0),
7208
        DA   => datain1 (dbits -1 downto 0),
7209
        QA   => dataout1(dbits -1 downto 0),
7210
        CLKB => clk, CENB => cenb, WENB => wenb,
7211
        AB   => address2(abits -1 downto 0),
7212
        DB   => datain2 (dbits -1 downto 0),
7213
        QB   => dataout2(dbits -1 downto 0)
7214
        );
7215
  end generate;
7216
 
7217
  dp512x26 : if (abits = 9) and (dbits = 26) generate
7218
    dp0:dpram512x26
7219
        port map(
7220
        CLKA => clk, CENA => cena, WENA => wena,
7221
        AA   => address1(abits -1 downto 0),
7222
        DA   => datain1 (dbits -1 downto 0),
7223
        QA   => dataout1(dbits -1 downto 0),
7224
        CLKB => clk, CENB => cenb, WENB => wenb,
7225
        AB   => address2(abits -1 downto 0),
7226
        DB   => datain2 (dbits -1 downto 0),
7227
        QB   => dataout2(dbits -1 downto 0)
7228
        );
7229
  end generate;
7230
 
7231
  dp256x26 : if (abits = 8) and (dbits = 26) generate
7232
    dp0:dpram256x26
7233
        port map(
7234
        CLKA => clk, CENA => cena, WENA => wena,
7235
        AA   => address1(abits -1 downto 0),
7236
        DA   => datain1 (dbits -1 downto 0),
7237
        QA   => dataout1(dbits -1 downto 0),
7238
        CLKB => clk, CENB => cenb, WENB => wenb,
7239
        AB   => address2(abits -1 downto 0),
7240
        DB   => datain2 (dbits -1 downto 0),
7241
        QB   => dataout2(dbits -1 downto 0)
7242
        );
7243
  end generate;
7244
 
7245
  dp128x26 : if (abits = 7) and (dbits = 26) generate
7246
    dp0:dpram128x26
7247
        port map(
7248
        CLKA => clk, CENA => cena, WENA => wena,
7249
        AA   => address1(abits -1 downto 0),
7250
        DA   => datain1 (dbits -1 downto 0),
7251
        QA   => dataout1(dbits -1 downto 0),
7252
        CLKB => clk, CENB => cenb, WENB => wenb,
7253
        AB   => address2(abits -1 downto 0),
7254
        DB   => datain2 (dbits -1 downto 0),
7255
        QB   => dataout2(dbits -1 downto 0)
7256
        );
7257
  end generate;
7258
 
7259
  dp64x26 : if (abits = 6) and (dbits = 26) generate
7260
    dp0:dpram64x26
7261
        port map(
7262
        CLKA => clk, CENA => cena, WENA => wena,
7263
        AA   => address1(abits -1 downto 0),
7264
        DA   => datain1 (dbits -1 downto 0),
7265
        QA   => dataout1(dbits -1 downto 0),
7266
        CLKB => clk, CENB => cenb, WENB => wenb,
7267
        AB   => address2(abits -1 downto 0),
7268
        DB   => datain2 (dbits -1 downto 0),
7269
        QB   => dataout2(dbits -1 downto 0)
7270
        );
7271
  end generate;
7272
 
7273
  dp2048x25 : if (abits = 11) and (dbits = 25) generate
7274
    dp0:dpram2048x25
7275
        port map(
7276
        CLKA => clk, CENA => cena, WENA => wena,
7277
        AA   => address1(abits -1 downto 0),
7278
        DA   => datain1 (dbits -1 downto 0),
7279
        QA   => dataout1(dbits -1 downto 0),
7280
        CLKB => clk, CENB => cenb, WENB => wenb,
7281
        AB   => address2(abits -1 downto 0),
7282
        DB   => datain2 (dbits -1 downto 0),
7283
        QB   => dataout2(dbits -1 downto 0)
7284
        );
7285
  end generate;
7286
 
7287
  dp1024x25 : if (abits = 10) and (dbits = 25) generate
7288
    dp0:dpram1024x25
7289
        port map(
7290
        CLKA => clk, CENA => cena, WENA => wena,
7291
        AA   => address1(abits -1 downto 0),
7292
        DA   => datain1 (dbits -1 downto 0),
7293
        QA   => dataout1(dbits -1 downto 0),
7294
        CLKB => clk, CENB => cenb, WENB => wenb,
7295
        AB   => address2(abits -1 downto 0),
7296
        DB   => datain2 (dbits -1 downto 0),
7297
        QB   => dataout2(dbits -1 downto 0)
7298
        );
7299
  end generate;
7300
 
7301
  dp512x25 : if (abits = 9) and (dbits = 25) generate
7302
    dp0:dpram512x25
7303
        port map(
7304
        CLKA => clk, CENA => cena, WENA => wena,
7305
        AA   => address1(abits -1 downto 0),
7306
        DA   => datain1 (dbits -1 downto 0),
7307
        QA   => dataout1(dbits -1 downto 0),
7308
        CLKB => clk, CENB => cenb, WENB => wenb,
7309
        AB   => address2(abits -1 downto 0),
7310
        DB   => datain2 (dbits -1 downto 0),
7311
        QB   => dataout2(dbits -1 downto 0)
7312
        );
7313
  end generate;
7314
 
7315
  dp256x25 : if (abits = 8) and (dbits = 25) generate
7316
    dp0:dpram256x25
7317
        port map(
7318
        CLKA => clk, CENA => cena, WENA => wena,
7319
        AA   => address1(abits -1 downto 0),
7320
        DA   => datain1 (dbits -1 downto 0),
7321
        QA   => dataout1(dbits -1 downto 0),
7322
        CLKB => clk, CENB => cenb, WENB => wenb,
7323
        AB   => address2(abits -1 downto 0),
7324
        DB   => datain2 (dbits -1 downto 0),
7325
        QB   => dataout2(dbits -1 downto 0)
7326
        );
7327
  end generate;
7328
 
7329
  dp128x25 : if (abits = 7) and (dbits = 25) generate
7330
    dp0:dpram128x25
7331
        port map(
7332
        CLKA => clk, CENA => cena, WENA => wena,
7333
        AA   => address1(abits -1 downto 0),
7334
        DA   => datain1 (dbits -1 downto 0),
7335
        QA   => dataout1(dbits -1 downto 0),
7336
        CLKB => clk, CENB => cenb, WENB => wenb,
7337
        AB   => address2(abits -1 downto 0),
7338
        DB   => datain2 (dbits -1 downto 0),
7339
        QB   => dataout2(dbits -1 downto 0)
7340
        );
7341
  end generate;
7342
 
7343
  dp2048x24 : if (abits = 11) and (dbits = 24) generate
7344
    dp0:dpram2048x24
7345
        port map(
7346
        CLKA => clk, CENA => cena, WENA => wena,
7347
        AA   => address1(abits -1 downto 0),
7348
        DA   => datain1 (dbits -1 downto 0),
7349
        QA   => dataout1(dbits -1 downto 0),
7350
        CLKB => clk, CENB => cenb, WENB => wenb,
7351
        AB   => address2(abits -1 downto 0),
7352
        DB   => datain2 (dbits -1 downto 0),
7353
        QB   => dataout2(dbits -1 downto 0)
7354
        );
7355
  end generate;
7356
 
7357
  dp1024x24 : if (abits = 10) and (dbits = 24) generate
7358
    dp0:dpram1024x24
7359
        port map(
7360
        CLKA => clk, CENA => cena, WENA => wena,
7361
        AA   => address1(abits -1 downto 0),
7362
        DA   => datain1 (dbits -1 downto 0),
7363
        QA   => dataout1(dbits -1 downto 0),
7364
        CLKB => clk, CENB => cenb, WENB => wenb,
7365
        AB   => address2(abits -1 downto 0),
7366
        DB   => datain2 (dbits -1 downto 0),
7367
        QB   => dataout2(dbits -1 downto 0)
7368
        );
7369
  end generate;
7370
 
7371
  dp512x24 : if (abits = 9) and (dbits = 24) generate
7372
    dp0:dpram512x24
7373
        port map(
7374
        CLKA => clk, CENA => cena, WENA => wena,
7375
        AA   => address1(abits -1 downto 0),
7376
        DA   => datain1 (dbits -1 downto 0),
7377
        QA   => dataout1(dbits -1 downto 0),
7378
        CLKB => clk, CENB => cenb, WENB => wenb,
7379
        AB   => address2(abits -1 downto 0),
7380
        DB   => datain2 (dbits -1 downto 0),
7381
        QB   => dataout2(dbits -1 downto 0)
7382
        );
7383
  end generate;
7384
 
7385
  dp256x24 : if (abits = 8) and (dbits = 24) generate
7386
    dp0:dpram256x24
7387
        port map(
7388
        CLKA => clk, CENA => cena, WENA => wena,
7389
        AA   => address1(abits -1 downto 0),
7390
        DA   => datain1 (dbits -1 downto 0),
7391
        QA   => dataout1(dbits -1 downto 0),
7392
        CLKB => clk, CENB => cenb, WENB => wenb,
7393
        AB   => address2(abits -1 downto 0),
7394
        DB   => datain2 (dbits -1 downto 0),
7395
        QB   => dataout2(dbits -1 downto 0)
7396
        );
7397
  end generate;
7398
 
7399
  dp2048x23 : if (abits = 11) and (dbits = 23) generate
7400
    dp0:dpram2048x23
7401
        port map(
7402
        CLKA => clk, CENA => cena, WENA => wena,
7403
        AA   => address1(abits -1 downto 0),
7404
        DA   => datain1 (dbits -1 downto 0),
7405
        QA   => dataout1(dbits -1 downto 0),
7406
        CLKB => clk, CENB => cenb, WENB => wenb,
7407
        AB   => address2(abits -1 downto 0),
7408
        DB   => datain2 (dbits -1 downto 0),
7409
        QB   => dataout2(dbits -1 downto 0)
7410
        );
7411
  end generate;
7412
 
7413
  dp1024x23 : if (abits = 10) and (dbits = 23) generate
7414
    dp0:dpram1024x23
7415
        port map(
7416
        CLKA => clk, CENA => cena, WENA => wena,
7417
        AA   => address1(abits -1 downto 0),
7418
        DA   => datain1 (dbits -1 downto 0),
7419
        QA   => dataout1(dbits -1 downto 0),
7420
        CLKB => clk, CENB => cenb, WENB => wenb,
7421
        AB   => address2(abits -1 downto 0),
7422
        DB   => datain2 (dbits -1 downto 0),
7423
        QB   => dataout2(dbits -1 downto 0)
7424
        );
7425
  end generate;
7426
 
7427
  dp512x23 : if (abits = 9) and (dbits = 23) generate
7428
    dp0:dpram512x23
7429
        port map(
7430
        CLKA => clk, CENA => cena, WENA => wena,
7431
        AA   => address1(abits -1 downto 0),
7432
        DA   => datain1 (dbits -1 downto 0),
7433
        QA   => dataout1(dbits -1 downto 0),
7434
        CLKB => clk, CENB => cenb, WENB => wenb,
7435
        AB   => address2(abits -1 downto 0),
7436
        DB   => datain2 (dbits -1 downto 0),
7437
        QB   => dataout2(dbits -1 downto 0)
7438
        );
7439
  end generate;
7440
 
7441
  dp4096x22 : if (abits = 12) and (dbits = 22) generate
7442
    dp0:dpram4096x22
7443
        port map(
7444
        CLKA => clk, CENA => cena, WENA => wena,
7445
        AA   => address1(abits -1 downto 0),
7446
        DA   => datain1 (dbits -1 downto 0),
7447
        QA   => dataout1(dbits -1 downto 0),
7448
        CLKB => clk, CENB => cenb, WENB => wenb,
7449
        AB   => address2(abits -1 downto 0),
7450
        DB   => datain2 (dbits -1 downto 0),
7451
        QB   => dataout2(dbits -1 downto 0)
7452
        );
7453
  end generate;
7454
 
7455
  dp2048x22 : if (abits = 11) and (dbits = 22) generate
7456
    dp0:dpram2048x22
7457
        port map(
7458
        CLKA => clk, CENA => cena, WENA => wena,
7459
        AA   => address1(abits -1 downto 0),
7460
        DA   => datain1 (dbits -1 downto 0),
7461
        QA   => dataout1(dbits -1 downto 0),
7462
        CLKB => clk, CENB => cenb, WENB => wenb,
7463
        AB   => address2(abits -1 downto 0),
7464
        DB   => datain2 (dbits -1 downto 0),
7465
        QB   => dataout2(dbits -1 downto 0)
7466
        );
7467
  end generate;
7468
 
7469
  dp1024x22 : if (abits = 10) and (dbits = 22) generate
7470
    dp0:dpram1024x22
7471
        port map(
7472
        CLKA => clk, CENA => cena, WENA => wena,
7473
        AA   => address1(abits -1 downto 0),
7474
        DA   => datain1 (dbits -1 downto 0),
7475
        QA   => dataout1(dbits -1 downto 0),
7476
        CLKB => clk, CENB => cenb, WENB => wenb,
7477
        AB   => address2(abits -1 downto 0),
7478
        DB   => datain2 (dbits -1 downto 0),
7479
        QB   => dataout2(dbits -1 downto 0)
7480
        );
7481
  end generate;
7482
 
7483
  dp4096x21 : if (abits = 12) and (dbits = 21) generate
7484
    dp0:dpram4096x21
7485
        port map(
7486
        CLKA => clk, CENA => cena, WENA => wena,
7487
        AA   => address1(abits -1 downto 0),
7488
        DA   => datain1 (dbits -1 downto 0),
7489
        QA   => dataout1(dbits -1 downto 0),
7490
        CLKB => clk, CENB => cenb, WENB => wenb,
7491
        AB   => address2(abits -1 downto 0),
7492
        DB   => datain2 (dbits -1 downto 0),
7493
        QB   => dataout2(dbits -1 downto 0)
7494
        );
7495
  end generate;
7496
 
7497
  dp2048x21 : if (abits = 11) and (dbits = 21) generate
7498
    dp0:dpram2048x21
7499
        port map(
7500
        CLKA => clk, CENA => cena, WENA => wena,
7501
        AA   => address1(abits -1 downto 0),
7502
        DA   => datain1 (dbits -1 downto 0),
7503
        QA   => dataout1(dbits -1 downto 0),
7504
        CLKB => clk, CENB => cenb, WENB => wenb,
7505
        AB   => address2(abits -1 downto 0),
7506
        DB   => datain2 (dbits -1 downto 0),
7507
        QB   => dataout2(dbits -1 downto 0)
7508
        );
7509
  end generate;
7510
 
7511
  dp4096x20 : if (abits = 12) and (dbits = 20) generate
7512
    dp0:dpram4096x20
7513
        port map(
7514
        CLKA => clk, CENA => cena, WENA => wena,
7515
        AA   => address1(abits -1 downto 0),
7516
        DA   => datain1 (dbits -1 downto 0),
7517
        QA   => dataout1(dbits -1 downto 0),
7518
        CLKB => clk, CENB => cenb, WENB => wenb,
7519
        AB   => address2(abits -1 downto 0),
7520
        DB   => datain2 (dbits -1 downto 0),
7521
        QB   => dataout2(dbits -1 downto 0)
7522
        );
7523
  end generate;
7524
 
7525
end rtl;
7526
 
7527
------------------------------------------------------------------
7528
-- regfile generator for iu & cp ---------------------------------
7529
------------------------------------------------------------------
7530
 
7531
LIBRARY ieee;
7532
use IEEE.std_logic_1164.all;
7533
use IEEE.std_logic_arith.all;
7534
use work.leon_iface.all;
7535
use work.tech_tsmc25_syn.all;
7536
 
7537
entity tsmc25_regfile_iu is
7538
  generic (
7539
    abits : integer := 8;
7540
    dbits : integer := 32;
7541
    words : integer := 128
7542
  );
7543
  port (
7544
    rst   : in std_logic;
7545
    clk   : in std_logic;
7546
    clkn  : in std_logic;
7547
    rfi   : in rf_in_type;
7548
    rfo   : out rf_out_type);
7549
end;
7550
 
7551
architecture rtl of tsmc25_regfile_iu is
7552
 
7553
signal qq0, qq1 : std_logic_vector(dbits-1 downto 0);
7554
signal wen, ren1, ren2 : std_logic;
7555
signal high0, high1 : std_logic;
7556
signal low0, low1 : std_logic;
7557
signal qa0 : std_logic_vector(31 downto 0);
7558
signal qa1 : std_logic_vector(31 downto 0);
7559
signal db0 : std_logic_vector(31 downto 0);
7560
signal db1 : std_logic_vector(31 downto 0);
7561
signal ra1, ra2, wa : std_logic_vector(12 downto 0);
7562
 
7563
begin
7564
  ren1 <= not rfi.ren1;
7565
  ren2 <= not rfi.ren2;
7566
  wen  <= not rfi.wren;
7567
  db0  <= (others => low0);
7568
  db1  <= (others => low1);
7569
 
7570
  ra1(abits-1 downto 0) <= rfi.rd1addr;
7571
  ra1(12 downto abits) <= (others => '0');
7572
  ra2(abits-1 downto 0) <= rfi.rd2addr;
7573
  ra2(12 downto abits) <= (others => '0');
7574
  wa(abits-1 downto 0) <= rfi.wraddr;
7575
  wa(12 downto abits) <= (others => '0');
7576
 
7577
  dp136x32 : if (words = 136) and (dbits = 32) generate
7578
    u0: dpram136x32
7579
        port map(
7580
        CLKA => clk, CENA => wen, WENA => wen,
7581
        AA   => wa(abits -1 downto 0),
7582
        DA   => rfi.wrdata(dbits -1 downto 0),
7583
        QA   => qa0,
7584
        CLKB => clkn, CENB => ren1, WENB => high0,
7585
        AB   => ra1(abits -1 downto 0),
7586
        DB   => db0,
7587
        QB   => qq0
7588
        );
7589
    u1: dpram136x32
7590
        port map(
7591
        CLKA => clk, CENA => wen, WENA => wen,
7592
        AA   => wa(abits -1 downto 0),
7593
        DA   => rfi.wrdata(dbits -1 downto 0),
7594
        QA   => qa1,
7595
        CLKB => clkn, CENB => ren2, WENB => high1,
7596
        AB   => ra2(abits -1 downto 0),
7597
        DB   => db1,
7598
        QB   => qq1
7599
        );
7600
  end generate;
7601
 
7602
  dp168x32 : if (words = 168) and (dbits = 32) generate
7603
    u0: dpram168x32
7604
        port map(
7605
        CLKA => clk, CENA => wen, WENA => wen,
7606
        AA   => wa(abits -1 downto 0),
7607
        DA   => ra1(dbits -1 downto 0),
7608
        QA   => qa0,
7609
        CLKB => clkn, CENB => ren1, WENB => high0,
7610
        AB   => rfi.rd1addr(abits -1 downto 0),
7611
        DB   => db0,
7612
        QB   => qq0
7613
        );
7614
    u1: dpram168x32
7615
        port map(
7616
        CLKA => clk, CENA => wen, WENA => wen,
7617
        AA   => wa(abits -1 downto 0),
7618
        DA   => rfi.wrdata(dbits -1 downto 0),
7619
        QA   => qa1,
7620
        CLKB => clkn, CENB => ren2, WENB => high1,
7621
        AB   => ra2(abits -1 downto 0),
7622
        DB   => db1,
7623
        QB   => qq1
7624
        );
7625
  end generate;
7626
 
7627
  rfo.data1 <= qq0(dbits-1 downto 0);
7628
  rfo.data2 <= qq1(dbits-1 downto 0);
7629
 
7630
  th0: TIEHI
7631
       port map(
7632
       Y => high0
7633
       );
7634
 
7635
  th1: TIEHI
7636
       port map(
7637
       Y => high1
7638
       );
7639
 
7640
  tl0: TIELO
7641
       port map(
7642
       Y => low0
7643
       );
7644
 
7645
  tl1: TIELO
7646
       port map(
7647
       Y => low1
7648
       );
7649
 
7650
end;
7651
 
7652
LIBRARY ieee;
7653
use IEEE.std_logic_1164.all;
7654
use IEEE.std_logic_arith.all;
7655
use work.leon_iface.all;
7656
use work.tech_tsmc25_syn.all;
7657
 
7658
entity tsmc25_regfile_cp is
7659
  generic (
7660
    abits : integer := 4;
7661
    dbits : integer := 32;
7662
    words : integer := 16
7663
  );
7664
  port (
7665
    rst      : in std_logic;
7666
    clk      : in std_logic;
7667
    rfi      : in rf_cp_in_type;
7668
    rfo      : out rf_cp_out_type);
7669
end;
7670
 
7671
architecture rtl of tsmc25_regfile_cp is
7672
 
7673
signal qq0, qq1 : std_logic_vector(dbits-1 downto 0);
7674
signal wen, ren1, ren2 : std_logic;
7675
signal high0, high1 : std_logic;
7676
signal low0, low1   : std_logic;
7677
signal qa0 : std_logic_vector(31 downto 0);
7678
signal qa1 : std_logic_vector(31 downto 0);
7679
signal db0 : std_logic_vector(31 downto 0);
7680
signal db1 : std_logic_vector(31 downto 0);
7681
signal ra1, ra2, wa : std_logic_vector(12 downto 0);
7682
 
7683
begin
7684
  ren1 <= not rfi.ren1;
7685
  ren2 <= not rfi.ren2;
7686
  wen  <= not rfi.wren;
7687
  db0  <= (others => low0);
7688
  db1  <= (others => low1);
7689
 
7690
  ra1(abits-1 downto 0) <= rfi.rd1addr;
7691
  ra1(12 downto abits)  <= (others => '0');
7692
  ra2(abits-1 downto 0) <= rfi.rd2addr;
7693
  ra2(12 downto abits)  <= (others => '0');
7694
  wa(abits-1 downto 0)  <= rfi.wraddr;
7695
  wa(12 downto abits)   <= (others => '0');
7696
 
7697
  -- Port A: write port, B: read port
7698
  dp16x32 : if (words = 16) and (dbits = 32) generate
7699
    u0: dpram16x32
7700
        port map(
7701
        CLKA => clk, CENA => wen, WENA => wen,
7702
        AA   => wa(3 downto 0),
7703
        DA   => rfi.wrdata(dbits -1 downto 0),
7704
        QA   => qa0,
7705
        CLKB => clk, CENB => ren1, WENB => high0,
7706
        AB   => ra1(3 downto 0),
7707
        DB   => db0,
7708
        QB   => qq0
7709
        );
7710
    u1: dpram16x32
7711
        port map(
7712
        CLKA => clk, CENA => wen, WENA => wen,
7713
        AA   => wa(3 downto 0),
7714
        DA   => rfi.wrdata(dbits -1 downto 0),
7715
        QA   => qa1,
7716
        CLKB => clk, CENB => ren2, WENB => high1,
7717
        AB   => ra2(3 downto 0),
7718
        DB   => db1,
7719
        QB   => qq1
7720
        );
7721
  end generate;
7722
 
7723
  rfo.data1 <= qq0(dbits-1 downto 0);
7724
  rfo.data2 <= qq1(dbits-1 downto 0);
7725
 
7726
  th0: TIEHI
7727
       port map(
7728
       Y => high0
7729
       );
7730
 
7731
  th1: TIEHI
7732
       port map(
7733
       Y => high1
7734
       );
7735
 
7736
  tl0: TIELO
7737
       port map(
7738
       Y => low0
7739
       );
7740
 
7741
  tl1: TIELO
7742
       port map(
7743
       Y => low1
7744
       );
7745
 
7746
end;
7747
 
7748
 
7749
------------------------------------------------------------------
7750
-- mapping generic pads on tech pads -----------------------------
7751
------------------------------------------------------------------
7752
 
7753
-- input pad
7754
library IEEE;
7755
use IEEE.std_logic_1164.all;
7756
use work.tech_tsmc25_syn.all;
7757
entity tsmc25_inpad is port (pad : in std_logic; q : out std_logic); end;
7758
architecture syn of tsmc25_inpad is begin
7759
  i0 : PDIDGZ port map (PAD => pad, C => q);
7760
end;
7761
 
7762
-- input schmitt pad
7763
library IEEE;
7764
use IEEE.std_logic_1164.all;
7765
use work.tech_tsmc25_syn.all;
7766
entity tsmc25_smpad is port (pad : in std_logic; q : out std_logic); end;
7767
architecture syn of tsmc25_smpad is begin
7768
  i0 : PDISDGZ port map (PAD => pad, C => q);
7769
end;
7770
 
7771
-- output pads
7772
library IEEE;
7773
use IEEE.std_logic_1164.all;
7774
use work.tech_tsmc25_syn.all;
7775
entity tsmc25_outpad is
7776
  generic (drive : integer := 2);  --2,4,8,12,16,24 mA
7777
  port (d : in std_logic; pad : out std_logic);
7778
 end;
7779
architecture syn of tsmc25_outpad is
7780
signal en : std_logic;
7781
begin
7782
  d2 : if drive = 1 generate
7783
    i0 : PDT02DGZ port map (I => d, PAD => pad, OEN => en );
7784
  end generate;
7785
  d4 : if drive = 2 generate
7786
    i0 : PDT04DGZ port map (I => d, PAD => pad, OEN => en );
7787
  end generate;
7788
  d8 : if drive = 3 generate
7789
    i0 : PDT08DGZ port map (I => d, PAD => pad, OEN => en );
7790
  end generate;
7791
  d12: if drive = 4 generate
7792
    i0 : PDT12DGZ port map (I => d, PAD => pad, OEN => en );
7793
  end generate;
7794
  d16: if drive = 5 generate
7795
    i0 : PDT16DGZ port map (I => d, PAD => pad, OEN => en );
7796
  end generate;
7797
  d24: if drive >= 5 generate
7798
    i0 : PDT24DGZ port map (I => d, PAD => pad, OEN => en );
7799
  end generate;
7800
 
7801
  tl0: TIELO
7802
       port map(
7803
       Y => en
7804
       );
7805
 
7806
end;
7807
 
7808
-- tri-state output pads with pull-up
7809
library IEEE;
7810
use IEEE.std_logic_1164.all;
7811
use work.tech_tsmc25_syn.all;
7812
entity tsmc25_toutpadu is
7813
  generic (drive : integer := 2);   --2,4,8,12,16,24 mA
7814
  port (d, en : in  std_logic; pad : out  std_logic);
7815
end;
7816
architecture syn of tsmc25_toutpadu is
7817
signal nc, q: std_logic;
7818
begin
7819
pad <= q;
7820
  d2 : if drive = 1 generate
7821
    i0 : PDU02DGZ port map (I => d, PAD => q, OEN => en, C => nc);
7822
  end generate;
7823
  d4 : if drive = 2 generate
7824
    i0 : PDU04DGZ port map (I => d, PAD => q, OEN => en, C => nc);
7825
  end generate;
7826
  d8: if drive = 3 generate
7827
    i0 : PDU08DGZ port map (I => d, PAD => q, OEN => en, C => nc);
7828
  end generate;
7829
  d12: if drive = 4 generate
7830
    i0 : PDU12DGZ port map (I => d, PAD => q, OEN => en, C => nc);
7831
  end generate;
7832
  d16: if drive = 5 generate
7833
    i0 : PDU16DGZ port map (I => d, PAD => q, OEN => en, C => nc);
7834
  end generate;
7835
  d24: if drive >= 5 generate
7836
    i0 : PDU24DGZ port map (I => d, PAD => q, OEN => en, C => nc);
7837
  end generate;
7838
end;
7839
 
7840
-- bidirectional pads
7841
library IEEE;
7842
use IEEE.std_logic_1164.all;
7843
use work.tech_tsmc25_syn.all;
7844
entity tsmc25_iopad is
7845
  generic (drive : integer := 2);
7846
  port ( d, en : in std_logic; q : out std_logic; pad : inout std_logic);
7847
end;
7848
architecture syn of tsmc25_iopad is
7849
begin
7850
  d2 : if drive = 1 generate
7851
    i0 : PDB02DGZ port map (I => d, PAD => pad, OEN => en, C => q);
7852
  end generate;
7853
  d4 : if drive = 2 generate
7854
    i0 : PDB04DGZ port map (I => d, PAD => pad, OEN => en, C => q);
7855
  end generate;
7856
  d8 : if drive = 3 generate
7857
    i0 : PDB08DGZ port map (I => d, PAD => pad, OEN => en, C => q);
7858
  end generate;
7859
  d12: if drive = 4 generate
7860
    i0 : PDB12DGZ port map (I => d, PAD => pad, OEN => en, C => q);
7861
  end generate;
7862
  d16: if drive = 5 generate
7863
    i0 : PDB16DGZ port map (I => d, PAD => pad, OEN => en, C => q);
7864
  end generate;
7865
  d24: if drive >= 5 generate
7866
    i0 : PDB24DGZ port map (I => d, PAD => pad, OEN => en, C => q);
7867
  end generate;
7868
end;
7869
 
7870
-- bidirectional open-drain pads
7871
library IEEE;
7872
use IEEE.std_logic_1164.all;
7873
use work.tech_tsmc25_syn.all;
7874
entity tsmc25_iodpad is
7875
  generic (drive : integer := 2);
7876
  port ( d : in std_logic; q : out std_logic; pad : inout std_logic);
7877
end;
7878
architecture syn of tsmc25_iodpad is
7879
signal dis : std_logic;
7880
begin
7881
  d2 : if drive = 1 generate
7882
    i0 : PDB02DGZ port map (I => dis, PAD => pad, OEN => d, C => q);
7883
  end generate;
7884
  d4 : if drive = 2 generate
7885
    i0 : PDB04DGZ port map (I => dis, PAD => pad, OEN => d, C => q);
7886
  end generate;
7887
  d8 : if drive = 3 generate
7888
    i0 : PDB08DGZ port map (I => dis, PAD => pad, OEN => d, C => q);
7889
  end generate;
7890
  d12: if drive = 4 generate
7891
    i0 : PDB12DGZ port map (I => dis, PAD => pad, OEN => d, C => q);
7892
  end generate;
7893
  d16: if drive = 5 generate
7894
    i0 : PDB16DGZ port map (I => dis, PAD => pad, OEN => d, C => q);
7895
  end generate;
7896
  d24: if drive >= 5 generate
7897
    i0 : PDB24DGZ port map (I => dis, PAD => pad, OEN => d, C => q);
7898
  end generate;
7899
 
7900
  tl0: TIELO
7901
       port map(
7902
       Y => dis
7903
       );
7904
end;
7905
 
7906
-- output open-drain pads
7907
library IEEE;
7908
use IEEE.std_logic_1164.all;
7909
use work.tech_tsmc25_syn.all;
7910
entity tsmc25_odpad is
7911
  generic (drive : integer := 2);
7912
  port (d : in std_logic; pad : out std_logic);
7913
end;
7914
architecture syn of tsmc25_odpad is
7915
signal dis : std_logic;
7916
begin
7917
 
7918
  d2 : if drive = 1 generate
7919
    i0 : PDT02DGZ port map (I => dis, PAD => pad, OEN => d);
7920
  end generate;
7921
  d4 : if drive = 2 generate
7922
    i0 : PDT04DGZ port map (I => dis, PAD => pad, OEN => d);
7923
  end generate;
7924
  d8 : if drive = 3 generate
7925
    i0 : PDT08DGZ port map (I => dis, PAD => pad, OEN => d);
7926
  end generate;
7927
  d12: if drive = 4 generate
7928
    i0 : PDT12DGZ port map (I => dis, PAD => pad, OEN => d);
7929
  end generate;
7930
  d16: if drive = 5 generate
7931
    i0 : PDT16DGZ port map (I => dis, PAD => pad, OEN => d);
7932
  end generate;
7933
  d24: if drive >= 5 generate
7934
    i0 : PDT24DGZ port map (I => dis, PAD => pad, OEN => d);
7935
  end generate;
7936
 
7937
  tl0: TIELO
7938
       port map(
7939
       Y => dis
7940
       );
7941
end;
7942
 
7943
-- bidirectional I/O pads with schmitt trigger
7944
library IEEE;
7945
use IEEE.std_logic_1164.all;
7946
use work.tech_tsmc25_syn.all;
7947
entity tsmc25_smiopad is
7948
  generic (drive : integer := 2);
7949
  port ( d, en : in std_logic; q : out std_logic; pad : inout std_logic);
7950
end;
7951
architecture syn of tsmc25_smiopad is
7952
signal dis : std_logic;
7953
begin
7954
  d2 : if drive = 1 generate
7955
    i0 : PDB02SDGZ port map (I => d, PAD => pad, OEN => en, C => q);
7956
  end generate;
7957
  d4 : if drive = 2 generate
7958
    i0 : PDB04SDGZ port map (I => d, PAD => pad, OEN => en, C => q);
7959
  end generate;
7960
  d8: if drive = 3 generate
7961
    i0 : PDB08SDGZ port map (I => d, PAD => pad, OEN => en, C => q);
7962
  end generate;
7963
  d12: if drive = 4 generate
7964
    i0 : PDB12SDGZ port map (I => d, PAD => pad, OEN => en, C => q);
7965
  end generate;
7966
  d16: if drive = 5 generate
7967
    i0 : PDB16SDGZ port map (I => d, PAD => pad, OEN => en, C => q);
7968
  end generate;
7969
  d24: if drive >= 5 generate
7970
    i0 : PDB24SDGZ port map (I => d, PAD => pad, OEN => en, C => q);
7971
  end generate;
7972
end;
7973
 
7974
 
7975
 
7976
 
7977
 

powered by: WebSVN 2.1.0

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