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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [lib/] [gaisler/] [leon3/] [leon3.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
------------------------------------------------------------------------------
2
--  This file is a part of the GRLIB VHDL IP LIBRARY
3
--  Copyright (C) 2003, Gaisler Research
4
--
5
--  This program is free software; you can redistribute it and/or modify
6
--  it under the terms of the GNU General Public License as published by
7
--  the Free Software Foundation; either version 2 of the License, or
8
--  (at your option) any later version.
9
--
10
--  This program is distributed in the hope that it will be useful,
11
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
--  GNU General Public License for more details.
14
--
15
--  You should have received a copy of the GNU General Public License
16
--  along with this program; if not, write to the Free Software
17
--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
18
-----------------------------------------------------------------------------
19
-- Package:     leon3
20
-- File:        leon3.vhd
21
-- Author:      Jiri Gaisler, Gaisler Research
22
-- Description: LEON3 types and components
23
------------------------------------------------------------------------------
24
 
25
 
26
library ieee;
27
use ieee.std_logic_1164.all;
28
library grlib;
29
use grlib.amba.all;
30
library techmap;
31
use techmap.gencomp.all;
32
 
33
package leon3 is
34
 
35
  constant LEON3_VERSION : integer := 0;
36
 
37
  type l3_irq_in_type is record
38
    irl         : std_logic_vector(3 downto 0);
39
    rst         : std_ulogic;
40
    run         : std_ulogic;
41
    rstvec      : std_logic_vector(31 downto 12);
42
  end record;
43
 
44
  type l3_irq_out_type is record
45
    intack      : std_ulogic;
46
    irl         : std_logic_vector(3 downto 0);
47
    pwd         : std_ulogic;
48
  end record;
49
 
50
  type l3_debug_in_type is record
51
    dsuen   : std_ulogic;  -- DSU enable
52
    denable : std_ulogic;  -- diagnostic register access enable
53
    dbreak  : std_ulogic;  -- debug break-in
54
    step    : std_ulogic;  -- single step    
55
    halt    : std_ulogic;  -- halt processor
56
    reset   : std_ulogic;  -- reset processor
57
    dwrite  : std_ulogic;  -- read/write
58
    daddr   : std_logic_vector(23 downto 2); -- diagnostic address
59
    ddata   : std_logic_vector(31 downto 0); -- diagnostic data
60
    btrapa  : std_ulogic;          -- break on IU trap
61
    btrape  : std_ulogic;       -- break on IU trap
62
    berror  : std_ulogic;       -- break on IU error mode
63
    bwatch  : std_ulogic;       -- break on IU watchpoint
64
    bsoft   : std_ulogic;       -- break on software breakpoint (TA 1)
65
    tenable : std_ulogic;
66
    timer   :  std_logic_vector(30 downto 0);                                                -- 
67
  end record;
68
 
69
  type l3_debug_out_type is record
70
    data    : std_logic_vector(31 downto 0);
71
    crdy    : std_ulogic;
72
    dsu     : std_ulogic;
73
    dsumode : std_ulogic;
74
    error   : std_ulogic;
75
    halt    : std_ulogic;
76
    pwd     : std_ulogic;
77
    idle    : std_ulogic;
78
    ipend   : std_ulogic;
79
    icnt    : std_ulogic;
80
  end record;
81
 
82
  type l3_debug_in_vector is array (natural range <>) of l3_debug_in_type;
83
  type l3_debug_out_vector is array (natural range <>) of l3_debug_out_type;
84
 
85
  component leon3s
86
  generic (
87
    hindex    : integer               := 0;
88
    fabtech   : integer range 0 to NTECH  := DEFFABTECH;
89
    memtech   : integer range 0 to NTECH  := DEFMEMTECH;
90
    nwindows  : integer range 2 to 32 := 8;
91
    dsu       : integer range 0 to 1  := 0;
92
    fpu       : integer range 0 to 31 := 0;
93
    v8        : integer range 0 to 63 := 0;
94
    cp        : integer range 0 to 1  := 0;
95
    mac       : integer range 0 to 1  := 0;
96
    pclow     : integer range 0 to 2  := 2;
97
    notag     : integer range 0 to 1  := 0;
98
    nwp       : integer range 0 to 4  := 0;
99
    icen      : integer range 0 to 1  := 0;
100
    irepl     : integer range 0 to 2  := 2;
101
    isets     : integer range 1 to 4  := 1;
102
    ilinesize : integer range 4 to 8  := 4;
103
    isetsize  : integer range 1 to 256 := 1;
104
    isetlock  : integer range 0 to 1  := 0;
105
    dcen      : integer range 0 to 1  := 0;
106
    drepl     : integer range 0 to 2  := 2;
107
    dsets     : integer range 1 to 4  := 1;
108
    dlinesize : integer range 4 to 8  := 4;
109
    dsetsize  : integer range 1 to 256 := 1;
110
    dsetlock  : integer range 0 to 1  := 0;
111
    dsnoop    : integer range 0 to 6  := 0;
112
    ilram     : integer range 0 to 1 := 0;
113
    ilramsize : integer range 1 to 512 := 1;
114
    ilramstart: integer range 0 to 255 := 16#8e#;
115
    dlram     : integer range 0 to 1 := 0;
116
    dlramsize : integer range 1 to 512 := 1;
117
    dlramstart: integer range 0 to 255 := 16#8f#;
118
    mmuen     : integer range 0 to 1  := 0;
119
    itlbnum   : integer range 2 to 64 := 8;
120
    dtlbnum   : integer range 2 to 64 := 8;
121
    tlb_type  : integer range 0 to 3 := 1;
122
    tlb_rep   : integer range 0 to 1 := 0;
123
    lddel     : integer range 1 to 2 := 2;
124
    disas     : integer range 0 to 2 := 0;
125
    tbuf      : integer range 0 to 64 := 0;
126
    pwd       : integer range 0 to 2 := 2;     -- power-down
127
    svt       : integer range 0 to 1 := 1;     -- single vector trapping
128
    rstaddr   : integer := 16#00000#;          -- reset vector address [31:12]
129
    smp       : integer range 0 to 15 := 0;    -- support SMP systems
130
    cached    : integer               := 0;     -- cacheability table
131
    scantest  : integer               := 0
132
  );
133
  port (
134
    clk    : in  std_ulogic;
135
    rstn   : in  std_ulogic;
136
    ahbi   : in  ahb_mst_in_type;
137
    ahbo   : out ahb_mst_out_type;
138
    ahbsi  : in  ahb_slv_in_type;
139
    ahbso  : in  ahb_slv_out_vector;
140
    irqi   : in  l3_irq_in_type;
141
    irqo   : out l3_irq_out_type;
142
    dbgi   : in  l3_debug_in_type;
143
    dbgo   : out l3_debug_out_type
144
  );
145
  end component;
146
 
147
  component leon3cg
148
  generic (
149
    hindex    : integer               := 0;
150
    fabtech   : integer range 0 to NTECH  := DEFFABTECH;
151
    memtech   : integer range 0 to NTECH  := DEFMEMTECH;
152
    nwindows  : integer range 2 to 32 := 8;
153
    dsu       : integer range 0 to 1  := 0;
154
    fpu       : integer range 0 to 31 := 0;
155
    v8        : integer range 0 to 63 := 0;
156
    cp        : integer range 0 to 1  := 0;
157
    mac       : integer range 0 to 1  := 0;
158
    pclow     : integer range 0 to 2  := 2;
159
    notag     : integer range 0 to 1  := 0;
160
    nwp       : integer range 0 to 4  := 0;
161
    icen      : integer range 0 to 1  := 0;
162
    irepl     : integer range 0 to 2  := 2;
163
    isets     : integer range 1 to 4  := 1;
164
    ilinesize : integer range 4 to 8  := 4;
165
    isetsize  : integer range 1 to 256 := 1;
166
    isetlock  : integer range 0 to 1  := 0;
167
    dcen      : integer range 0 to 1  := 0;
168
    drepl     : integer range 0 to 2  := 2;
169
    dsets     : integer range 1 to 4  := 1;
170
    dlinesize : integer range 4 to 8  := 4;
171
    dsetsize  : integer range 1 to 256 := 1;
172
    dsetlock  : integer range 0 to 1  := 0;
173
    dsnoop    : integer range 0 to 6  := 0;
174
    ilram     : integer range 0 to 1 := 0;
175
    ilramsize : integer range 1 to 512 := 1;
176
    ilramstart: integer range 0 to 255 := 16#8e#;
177
    dlram     : integer range 0 to 1 := 0;
178
    dlramsize : integer range 1 to 512 := 1;
179
    dlramstart: integer range 0 to 255 := 16#8f#;
180
    mmuen     : integer range 0 to 1  := 0;
181
    itlbnum   : integer range 2 to 64 := 8;
182
    dtlbnum   : integer range 2 to 64 := 8;
183
    tlb_type  : integer range 0 to 3 := 1;
184
    tlb_rep   : integer range 0 to 1 := 0;
185
    lddel     : integer range 1 to 2 := 2;
186
    disas     : integer range 0 to 2 := 0;
187
    tbuf      : integer range 0 to 64 := 0;
188
    pwd       : integer range 0 to 2 := 2;     -- power-down
189
    svt       : integer range 0 to 1 := 1;     -- single vector trapping
190
    rstaddr   : integer := 16#00000#;          -- reset vector address [31:12]
191
    smp       : integer range 0 to 15 := 0;    -- support SMP systems
192
    cached    : integer               := 0;     -- cacheability table
193
    scantest  : integer               := 0
194
  );
195
  port (
196
    clk    : in  std_ulogic;
197
    rstn   : in  std_ulogic;
198
    ahbi   : in  ahb_mst_in_type;
199
    ahbo   : out ahb_mst_out_type;
200
    ahbsi  : in  ahb_slv_in_type;
201
    ahbso  : in  ahb_slv_out_vector;
202
    irqi   : in  l3_irq_in_type;
203
    irqo   : out l3_irq_out_type;
204
    dbgi   : in  l3_debug_in_type;
205
    dbgo   : out l3_debug_out_type;
206
    gclk   : in  std_ulogic
207
  );
208
  end component;
209
 
210
  component leon3ft
211
  generic (
212
    hindex    : integer               := 0;
213
    fabtech   : integer range 0 to NTECH  := DEFFABTECH;
214
    memtech   : integer range 0 to NTECH  := DEFMEMTECH;
215
    nwindows  : integer range 2 to 32 := 8;
216
    dsu       : integer range 0 to 1  := 0;
217
    fpu       : integer range 0 to 31 := 0;
218
    v8        : integer range 0 to 63 := 0;
219
    cp        : integer range 0 to 1  := 0;
220
    mac       : integer range 0 to 1  := 0;
221
    pclow     : integer range 0 to 2  := 2;
222
    notag     : integer range 0 to 1  := 0;
223
    nwp       : integer range 0 to 4  := 0;
224
    icen      : integer range 0 to 1  := 0;
225
    irepl     : integer range 0 to 2  := 2;
226
    isets     : integer range 1 to 4  := 1;
227
    ilinesize : integer range 4 to 8  := 4;
228
    isetsize  : integer range 1 to 256 := 1;
229
    isetlock  : integer range 0 to 1  := 0;
230
    dcen      : integer range 0 to 1  := 0;
231
    drepl     : integer range 0 to 2  := 2;
232
    dsets     : integer range 1 to 4  := 1;
233
    dlinesize : integer range 4 to 8  := 4;
234
    dsetsize  : integer range 1 to 256 := 1;
235
    dsetlock  : integer range 0 to 1  := 0;
236
    dsnoop    : integer range 0 to 6  := 0;
237
    ilram     : integer range 0 to 1 := 0;
238
    ilramsize : integer range 1 to 512 := 1;
239
    ilramstart: integer range 0 to 255 := 16#8e#;
240
    dlram     : integer range 0 to 1 := 0;
241
    dlramsize : integer range 1 to 512 := 1;
242
    dlramstart: integer range 0 to 255 := 16#8f#;
243
    mmuen     : integer range 0 to 1  := 0;
244
    itlbnum   : integer range 2 to 64 := 8;
245
    dtlbnum   : integer range 2 to 64 := 8;
246
    tlb_type  : integer range 0 to 3 := 1;
247
    tlb_rep   : integer range 0 to 1 := 0;
248
    lddel     : integer range 1 to 2 := 2;
249
    disas     : integer range 0 to 2 := 0;
250
    tbuf      : integer range 0 to 64 := 0;
251
    pwd       : integer range 0 to 2 := 2;     -- power-down
252
    svt       : integer range 0 to 1 := 1;     -- single vector trapping
253
    rstaddr   : integer := 16#00000#;   -- reset vector address [31:12]
254
    smp       : integer range 0 to 15 := 0;    -- support SMP systems
255
    iuft      : integer range 0 to 4  := 0;
256
    fpft      : integer range 0 to 4  := 0;
257
    cmft      : integer range 0 to 1  := 0;
258
    iuinj     : integer               := 0;
259
    ceinj     : integer range 0 to 3  := 0;
260
    cached    : integer               := 0;     -- cacheability table
261
    netlist   : integer               := 0;     -- use netlist
262
    scantest  : integer               := 0      -- enable scan test support
263
  );
264
  port (
265
    clk    : in  std_ulogic;
266
    rstn   : in  std_ulogic;
267
    ahbi   : in  ahb_mst_in_type;
268
    ahbo   : out ahb_mst_out_type;
269
    ahbsi  : in  ahb_slv_in_type;
270
    ahbso  : in  ahb_slv_out_vector;
271
    irqi   : in  l3_irq_in_type;
272
    irqo   : out l3_irq_out_type;
273
    dbgi   : in  l3_debug_in_type;
274
    dbgo   : out l3_debug_out_type;
275
    gclk   : in  std_ulogic
276
  );
277
  end component;
278
 
279
  component leon3s2x
280
  generic (
281
    hindex    : integer               := 0;
282
    fabtech   : integer range 0 to NTECH  := DEFFABTECH;
283
    memtech   : integer range 0 to NTECH  := DEFMEMTECH;
284
    nwindows  : integer range 2 to 32 := 8;
285
    dsu       : integer range 0 to 1  := 0;
286
    fpu       : integer range 0 to 31 := 0;
287
    v8        : integer range 0 to 63 := 0;
288
    cp        : integer range 0 to 1  := 0;
289
    mac       : integer range 0 to 1  := 0;
290
    pclow     : integer range 0 to 2  := 2;
291
    notag     : integer range 0 to 1  := 0;
292
    nwp       : integer range 0 to 4  := 0;
293
    icen      : integer range 0 to 1  := 0;
294
    irepl     : integer range 0 to 2  := 2;
295
    isets     : integer range 1 to 4  := 1;
296
    ilinesize : integer range 4 to 8  := 4;
297
    isetsize  : integer range 1 to 256 := 1;
298
    isetlock  : integer range 0 to 1  := 0;
299
    dcen      : integer range 0 to 1  := 0;
300
    drepl     : integer range 0 to 2  := 2;
301
    dsets     : integer range 1 to 4  := 1;
302
    dlinesize : integer range 4 to 8  := 4;
303
    dsetsize  : integer range 1 to 256 := 1;
304
    dsetlock  : integer range 0 to 1  := 0;
305
    dsnoop    : integer range 0 to 6  := 0;
306
    ilram      : integer range 0 to 1 := 0;
307
    ilramsize  : integer range 1 to 512 := 1;
308
    ilramstart : integer range 0 to 255 := 16#8e#;
309
    dlram      : integer range 0 to 1 := 0;
310
    dlramsize  : integer range 1 to 512 := 1;
311
    dlramstart : integer range 0 to 255 := 16#8f#;
312
    mmuen     : integer range 0 to 1  := 0;
313
    itlbnum   : integer range 2 to 64 := 8;
314
    dtlbnum   : integer range 2 to 64 := 8;
315
    tlb_type  : integer range 0 to 3  := 1;
316
    tlb_rep   : integer range 0 to 1  := 0;
317
    lddel     : integer range 1 to 2  := 2;
318
    disas     : integer range 0 to 2 := 0;
319
    tbuf      : integer range 0 to 64 := 0;
320
    pwd       : integer range 0 to 2  := 2;     -- power-down
321
    svt       : integer range 0 to 1  := 1;     -- single vector trapping
322
    rstaddr   : integer               := 0;
323
    smp       : integer range 0 to 15 := 0;     -- support SMP systems
324
    cached    : integer               := 0;      -- cacheability table
325
    clk2x     : integer               := 1;
326
    scantest  : integer               := 0
327
  );
328
  port (
329
    clk    : in  std_ulogic;
330
    gclk2  : in  std_ulogic;    -- gated clock
331
    clk2   : in  std_ulogic;    -- continuous clock
332
    rstn   : in  std_ulogic;
333
    ahbi   : in  ahb_mst_in_type;
334
    ahbo   : out ahb_mst_out_type;
335
    ahbsi  : in  ahb_slv_in_type;
336
    ahbso  : in  ahb_slv_out_vector;
337
    irqi   : in  l3_irq_in_type;
338
    irqo   : out l3_irq_out_type;
339
    dbgi   : in  l3_debug_in_type;
340
    dbgo   : out l3_debug_out_type;
341
    clken : in std_ulogic
342
  );
343
  end component;
344
 
345
    -- GRFPU interface
346
 
347
  type fp_rf_in_type is record
348
    rd1addr     : std_logic_vector(3 downto 0); -- read address 1
349
    rd2addr     : std_logic_vector(3 downto 0); -- read address 2
350
    wraddr      : std_logic_vector(3 downto 0); -- write address
351
    wrdata      : std_logic_vector(31 downto 0);     -- write data
352
    ren1        : std_ulogic;                        -- read 1 enable
353
    ren2        : std_ulogic;                        -- read 2 enable
354
    wren        : std_ulogic;                        -- write enable
355
  end record;
356
 
357
  type fp_rf_out_type is record
358
    data1       : std_logic_vector(31 downto 0); -- read data 1
359
    data2       : std_logic_vector(31 downto 0); -- read data 2
360
  end record;
361
 
362
  type fpc_pipeline_control_type is record
363
    pc    : std_logic_vector(31 downto 0);
364
    inst  : std_logic_vector(31 downto 0);
365
    cnt   : std_logic_vector(1 downto 0);
366
    trap  : std_ulogic;
367
    annul : std_ulogic;
368
    pv    : std_ulogic;
369
  end record;
370
 
371
  type fpc_debug_in_type is record
372
    enable : std_ulogic;
373
    write  : std_ulogic;
374
    fsr    : std_ulogic;                            -- FSR access
375
    addr   : std_logic_vector(4 downto 0);
376
    data   : std_logic_vector(31 downto 0);
377
  end record;
378
 
379
  type fpc_debug_out_type is record
380
    data   : std_logic_vector(31 downto 0);
381
  end record;
382
 
383
  type fpc_in_type is record
384
    flush       : std_ulogic;                     -- pipeline flush
385
    exack       : std_ulogic;                     -- FP exception acknowledge
386
    a_rs1       : std_logic_vector(4 downto 0);
387
    d             : fpc_pipeline_control_type;
388
    a             : fpc_pipeline_control_type;
389
    e             : fpc_pipeline_control_type;
390
    m             : fpc_pipeline_control_type;
391
    x             : fpc_pipeline_control_type;
392
    lddata        : std_logic_vector(31 downto 0);     -- load data
393
    dbg           : fpc_debug_in_type;               -- debug signals
394
  end record;
395
 
396
  type fpc_out_type is record
397
    data          : std_logic_vector(31 downto 0); -- store data
398
    exc                 : std_logic;                     -- FP exception
399
    cc            : std_logic_vector(1 downto 0);  -- FP condition codes
400
    ccv                 : std_ulogic;                    -- FP condition codes valid
401
    ldlock        : std_logic;                   -- FP pipeline hold
402
    holdn          : std_ulogic;
403
    dbg           : fpc_debug_out_type;             -- FP debug signals    
404
  end record;
405
 
406
  type grfpu_in_type is record
407
    start   : std_logic;
408
    nonstd  : std_logic;
409
    flop    : std_logic_vector(8 downto 0);
410
    op1     : std_logic_vector(63 downto 0);
411
    op2     : std_logic_vector(63 downto 0);
412
    opid    : std_logic_vector(7 downto 0);
413
    flush   : std_logic;
414
    flushid : std_logic_vector(5 downto 0);
415
    rndmode : std_logic_vector(1 downto 0);
416
    req     : std_logic;
417
  end record;
418
 
419
  type grfpu_out_type is record
420
    res     : std_logic_vector(63 downto 0);
421
    exc     : std_logic_vector(5 downto 0);
422
    allow   : std_logic_vector(2 downto 0);
423
    rdy     : std_logic;
424
    cc      : std_logic_vector(1 downto 0);
425
    idout   : std_logic_vector(7 downto 0);
426
  end record;
427
 
428
  type grfpu_out_vector_type is array (integer range 0 to 7) of grfpu_out_type;
429
  type grfpu_in_vector_type is array (integer range 0 to 7) of grfpu_in_type;
430
 
431
  component grfpushwx
432
  generic (mul    : integer              := 0;
433
           nshare : integer range 0 to 8 := 0);
434
  port(
435
    clk     : in  std_logic;
436
    reset   : in  std_logic;
437
    fpvi    : in  grfpu_in_vector_type;
438
    fpvo    : out grfpu_out_vector_type
439
    );
440
  end component;
441
 
442
  component grfpwxsh
443
  generic (tech     : integer range 0 to NTECH := 0;
444
           pclow    : integer range 0 to 2 := 2;
445
           dsu      : integer range 0 to 1 := 0;
446
           disas    : integer range 0 to 2 := 0;
447
           id       : integer range 0 to 7 := 0);
448
  port (
449
    rst    : in  std_ulogic;                    -- Reset
450
    clk    : in  std_ulogic;
451
    holdn  : in  std_ulogic;                    -- pipeline hold
452
    cpi    : in  fpc_in_type;
453
    cpo    : out fpc_out_type;
454
    fpui   : out grfpu_in_type;
455
    fpuo   : in  grfpu_out_type
456
    );
457
  end component;
458
 
459
  component leon3sh
460
  generic (
461
    hindex    : integer               := 0;
462
    fabtech   : integer range 0 to NTECH  := DEFFABTECH;
463
    memtech   : integer range 0 to NTECH  := DEFMEMTECH;
464
    nwindows  : integer range 2 to 32 := 8;
465
    dsu       : integer range 0 to 1  := 0;
466
    fpu       : integer range 0 to 31 := 0;
467
    v8        : integer range 0 to 63 := 0;
468
    cp        : integer range 0 to 1  := 0;
469
    mac       : integer range 0 to 1  := 0;
470
    pclow     : integer range 0 to 2  := 2;
471
    notag     : integer range 0 to 1  := 0;
472
    nwp       : integer range 0 to 4  := 0;
473
    icen      : integer range 0 to 1  := 0;
474
    irepl     : integer range 0 to 2  := 2;
475
    isets     : integer range 1 to 4  := 1;
476
    ilinesize : integer range 4 to 8  := 4;
477
    isetsize  : integer range 1 to 256 := 1;
478
    isetlock  : integer range 0 to 1  := 0;
479
    dcen      : integer range 0 to 1  := 0;
480
    drepl     : integer range 0 to 2  := 2;
481
    dsets     : integer range 1 to 4  := 1;
482
    dlinesize : integer range 4 to 8  := 4;
483
    dsetsize  : integer range 1 to 256 := 1;
484
    dsetlock  : integer range 0 to 1  := 0;
485
    dsnoop    : integer range 0 to 6  := 0;
486
    ilram      : integer range 0 to 1 := 0;
487
    ilramsize  : integer range 1 to 512 := 1;
488
    ilramstart : integer range 0 to 255 := 16#8e#;
489
    dlram      : integer range 0 to 1 := 0;
490
    dlramsize  : integer range 1 to 512 := 1;
491
    dlramstart : integer range 0 to 255 := 16#8f#;
492
    mmuen     : integer range 0 to 1  := 0;
493
    itlbnum   : integer range 2 to 64 := 8;
494
    dtlbnum   : integer range 2 to 64 := 8;
495
    tlb_type  : integer range 0 to 3  := 1;
496
    tlb_rep   : integer range 0 to 1  := 0;
497
    lddel     : integer range 1 to 2  := 2;
498
    disas     : integer range 0 to 2  := 0;
499
    tbuf      : integer range 0 to 64 := 0;
500
    pwd       : integer range 0 to 2  := 2;     -- power-down
501
    svt       : integer range 0 to 1  := 1;     -- single vector trapping
502
    rstaddr   : integer               := 0;
503
    smp       : integer range 0 to 15 := 0;     -- support SMP systems
504
    cached    : integer               := 0;      -- cacheability table
505
    scantest  : integer               := 0
506
  );
507
  port (
508
    clk    : in  std_ulogic;
509
    rstn   : in  std_ulogic;
510
    ahbi   : in  ahb_mst_in_type;
511
    ahbo   : out ahb_mst_out_type;
512
    ahbsi  : in  ahb_slv_in_type;
513
    ahbso  : in  ahb_slv_out_vector;
514
    irqi   : in  l3_irq_in_type;
515
    irqo   : out l3_irq_out_type;
516
    dbgi   : in  l3_debug_in_type;
517
    dbgo   : out l3_debug_out_type;
518
    fpui   : out grfpu_in_type;
519
    fpuo   : in  grfpu_out_type
520
  );
521
  end component;
522
 
523
  type dsu_in_type is record
524
    enable  : std_ulogic;
525
    break   : std_ulogic;
526
  end record;
527
 
528
  type dsu_out_type is record
529
    active          : std_ulogic;
530
    tstop           : std_ulogic;
531
    pwd             : std_logic_vector(15 downto 0);
532
  end record;
533
 
534
  component dsu3
535
  generic (
536
    hindex  : integer := 0;
537
    haddr   : integer := 16#900#;
538
    hmask   : integer := 16#f00#;
539
    ncpu    : integer := 1;
540
    tbits   : integer := 30; -- timer bits (instruction trace time tag)
541
    tech    : integer := DEFMEMTECH;
542
    irq     : integer := 0;
543
    kbytes  : integer := 0
544
  );
545
  port (
546
    rst    : in  std_ulogic;
547
    clk    : in  std_ulogic;
548
    ahbmi  : in  ahb_mst_in_type;
549
    ahbsi  : in  ahb_slv_in_type;
550
    ahbso  : out ahb_slv_out_type;
551
    dbgi   : in l3_debug_out_vector(0 to NCPU-1);
552
    dbgo   : out l3_debug_in_vector(0 to NCPU-1);
553
    dsui   : in dsu_in_type;
554
    dsuo   : out dsu_out_type
555
  );
556
  end component;
557
 
558
  component dsu3_2x
559
  generic (
560
    hindex  : integer := 0;
561
    haddr : integer := 16#900#;
562
    hmask : integer := 16#f00#;
563
    ncpu    : integer := 1;
564
    tbits   : integer := 30; -- timer bits (instruction trace time tag)
565
    tech    : integer := DEFMEMTECH;
566
    irq     : integer := 0;
567
    kbytes  : integer := 0
568
  );
569
  port (
570
    rst    : in  std_ulogic;
571
    hclk   : in  std_ulogic;
572
    cpuclk : in std_ulogic;
573
    ahbmi  : in  ahb_mst_in_type;
574
    ahbsi  : in  ahb_slv_in_type;
575
    ahbso  : out ahb_slv_out_type;
576
    dbgi   : in l3_debug_out_vector(0 to NCPU-1);
577
    dbgo   : out l3_debug_in_vector(0 to NCPU-1);
578
    dsui   : in dsu_in_type;
579
    dsuo   : out dsu_out_type;
580
    hclken : in std_ulogic
581
  );
582
  end component;
583
 
584
 
585
  component dsu3x
586
  generic (
587
    hindex  : integer := 0;
588
    haddr : integer := 16#900#;
589
    hmask : integer := 16#f00#;
590
    ncpu    : integer := 1;
591
    tbits   : integer := 30; -- timer bits (instruction trace time tag)
592
    tech    : integer := DEFMEMTECH;
593
    irq     : integer := 0;
594
    kbytes  : integer := 0;
595
    clk2x   : integer range 0 to 1 := 0
596
  );
597
  port (
598
    rst    : in  std_ulogic;
599
    hclk   : in  std_ulogic;
600
    cpuclk : in std_ulogic;
601
    ahbmi  : in  ahb_mst_in_type;
602
    ahbsi  : in  ahb_slv_in_type;
603
    ahbso  : out ahb_slv_out_type;
604
    dbgi   : in l3_debug_out_vector(0 to NCPU-1);
605
    dbgo   : out l3_debug_in_vector(0 to NCPU-1);
606
    dsui   : in dsu_in_type;
607
    dsuo   : out dsu_out_type;
608
    hclken : in std_ulogic
609
  );
610
  end component;
611
 
612
  type irq_in_vector  is array (Natural range <> ) of l3_irq_in_type;
613
  type irq_out_vector is array (Natural range <> ) of l3_irq_out_type;
614
 
615
  component irqmp
616
  generic (
617
    pindex  : integer := 0;
618
    paddr   : integer := 0;
619
    pmask   : integer := 16#fff#;
620
    ncpu    : integer := 1;
621
    eirq    : integer := 0
622
  );
623
  port (
624
    rst    : in  std_ulogic;
625
    clk    : in  std_ulogic;
626
    apbi   : in  apb_slv_in_type;
627
    apbo   : out apb_slv_out_type;
628
    irqi   : in  irq_out_vector(0 to ncpu-1);
629
    irqo   : out irq_in_vector(0 to ncpu-1)
630
  );
631
  end component;
632
 
633
  component irqmp2x
634
  generic (
635
    pindex  : integer := 0;
636
    paddr   : integer := 0;
637
    pmask   : integer := 16#fff#;
638
    ncpu    : integer := 1;
639
    eirq    : integer := 0;
640
    clkfact : integer := 2
641
  );
642
  port (
643
    rst    : in  std_ulogic;
644
    hclk    : in  std_ulogic;
645
    cpuclk : in  std_ulogic;
646
    apbi   : in  apb_slv_in_type;
647
    apbo   : out apb_slv_out_type;
648
    irqi   : in  irq_out_vector(0 to ncpu-1);
649
    irqo   : out irq_in_vector(0 to ncpu-1);
650
    hclken : in std_ulogic
651
  );
652
  end component;
653
 
654
component leon3ftsh
655
  generic (
656
    hindex    : integer               := 0;
657
    fabtech   : integer range 0 to NTECH  := DEFFABTECH;
658
    memtech   : integer range 0 to NTECH  := DEFMEMTECH;
659
    nwindows  : integer range 2 to 32 := 8;
660
    dsu       : integer range 0 to 1  := 0;
661
    fpu       : integer range 0 to 31 := 0;
662
    v8        : integer range 0 to 63 := 0;
663
    cp        : integer range 0 to 1  := 0;
664
    mac       : integer range 0 to 1  := 0;
665
    pclow     : integer range 0 to 2  := 2;
666
    notag     : integer range 0 to 1  := 0;
667
    nwp       : integer range 0 to 4  := 0;
668
    icen      : integer range 0 to 1  := 0;
669
    irepl     : integer range 0 to 2  := 2;
670
    isets     : integer range 1 to 4  := 1;
671
    ilinesize : integer range 4 to 8  := 4;
672
    isetsize  : integer range 1 to 256 := 1;
673
    isetlock  : integer range 0 to 1  := 0;
674
    dcen      : integer range 0 to 1  := 0;
675
    drepl     : integer range 0 to 2  := 2;
676
    dsets     : integer range 1 to 4  := 1;
677
    dlinesize : integer range 4 to 8  := 4;
678
    dsetsize  : integer range 1 to 256 := 1;
679
    dsetlock  : integer range 0 to 1  := 0;
680
    dsnoop    : integer range 0 to 6  := 0;
681
    ilram      : integer range 0 to 1 := 0;
682
    ilramsize  : integer range 1 to 512 := 1;
683
    ilramstart : integer range 0 to 255 := 16#8e#;
684
    dlram      : integer range 0 to 1 := 0;
685
    dlramsize  : integer range 1 to 512 := 1;
686
    dlramstart : integer range 0 to 255 := 16#8f#;
687
    mmuen     : integer range 0 to 1  := 0;
688
    itlbnum   : integer range 2 to 64 := 8;
689
    dtlbnum   : integer range 2 to 64 := 8;
690
    tlb_type  : integer range 0 to 3  := 1;
691
    tlb_rep   : integer range 0 to 1  := 0;
692
    lddel     : integer range 1 to 2  := 2;
693
    disas     : integer range 0 to 2  := 0;
694
    tbuf      : integer range 0 to 64 := 0;
695
    pwd       : integer range 0 to 2  := 2;     -- power-down
696
    svt       : integer range 0 to 1  := 1;     -- single vector trapping
697
    rstaddr   : integer               := 0;
698
    smp       : integer range 0 to 15 := 0;    -- support SMP systems
699
    iuft      : integer range 0 to 4  := 0;
700
    fpft      : integer range 0 to 4  := 0;
701
    cmft      : integer range 0 to 1  := 0;
702
    iuinj     : integer               := 0;
703
    ceinj     : integer range 0 to 3  := 0;
704
    cached    : integer               := 0;
705
    netlist   : integer               := 0;
706
    scantest  : integer               := 0
707
  );
708
  port (
709
    clk    : in  std_ulogic;    -- free-running clock
710
    rstn   : in  std_ulogic;
711
    ahbi   : in  ahb_mst_in_type;
712
    ahbo   : out ahb_mst_out_type;
713
    ahbsi  : in  ahb_slv_in_type;
714
    ahbso  : in  ahb_slv_out_vector;
715
    irqi   : in  l3_irq_in_type;
716
    irqo   : out l3_irq_out_type;
717
    dbgi   : in  l3_debug_in_type;
718
    dbgo   : out l3_debug_out_type;
719
    gclk   : in  std_ulogic;    -- gated clock
720
    fpui   : out grfpu_in_type;
721
    fpuo   : in  grfpu_out_type
722
  );
723
end component;
724
 
725
end;

powered by: WebSVN 2.1.0

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