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

Subversion Repositories core_arm

[/] [core_arm/] [trunk/] [vhdl/] [sparc/] [leon_iface.vhd] - Blame information for rev 5

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

Line No. Rev Author Line
1 2 tarookumic
 
2
 
3
 
4
 
5
----------------------------------------------------------------------------
6
--  This file is a part of the LEON VHDL model
7
--  Copyright (C) 1999  European Space Agency (ESA)
8
--
9
--  This library is free software; you can redistribute it and/or
10
--  modify it under the terms of the GNU Lesser General Public
11
--  License as published by the Free Software Foundation; either
12
--  version 2 of the License, or (at your option) any later version.
13
--
14
--  See the file COPYING.LGPL for the full details of the license.
15
 
16
 
17
-----------------------------------------------------------------------------
18
-- Entity:      iface
19
-- File:        iface.vhd
20
-- Author:      Jiri Gaisler - ESA/ESTEC
21
-- Description: Package with type declarations for module interconnections
22
------------------------------------------------------------------------------
23
 
24
library IEEE;
25
use IEEE.std_logic_1164.all;
26
use work.leon_target.all;
27
use work.leon_config.all;
28
use work.mmuconfig.all;
29
use work.sparcv8.all;
30
 
31
package leon_iface is
32
 
33
 
34
subtype clk_type is std_logic;
35
 
36
 
37
------------------------------------------------------------------------------
38
-- Add I/Os for custom peripherals in the records below
39
------------------------------------------------------------------------------
40
-- peripheral inputs
41
-- peripheral outputs
42
type io_out_type is record
43
  piol             : std_logic_vector(15 downto 0); -- I/O port outputs
44
  piodir           : std_logic_vector(15 downto 0); -- I/O port direction
45
  errorn  : std_logic;                              -- CPU in error mode
46
  wdog    : std_logic;                              -- watchdog output
47
 
48
  pci_arb_gnt_n    : std_logic_vector(0 to 3);
49
end record;
50
------------------------------------------------------------------------------
51
 
52
-- IU register file signals
53
 
54
type rf_in_type is record
55
  rd1addr       : std_logic_vector(RABITS-1 downto 0); -- read address 1
56
  rd2addr       : std_logic_vector(RABITS-1 downto 0); -- read address 2
57
  wraddr        : std_logic_vector(RABITS-1 downto 0); -- write address
58
  wrdata        : std_logic_vector(RDBITS-1 downto 0);     -- write data
59
  ren1          : std_logic;                         -- read 1 enable
60
  ren2          : std_logic;                         -- read 2 enable
61
  wren          : std_logic;                         -- write enable
62
 
63
end record;
64
 
65
type rf_out_type is record
66
  data1         : std_logic_vector(RDBITS-1 downto 0); -- read data 1
67
  data2         : std_logic_vector(RDBITS-1 downto 0); -- read data 2
68
end record;
69
 
70
-- co-processor register file signals
71
 
72
type rf_cp_in_type is record
73
  rd1addr       : std_logic_vector(3 downto 0); -- read address 1
74
  rd2addr       : std_logic_vector(3 downto 0); -- read address 2
75
  wraddr        : std_logic_vector(3 downto 0); -- write address
76
  wrdata        : std_logic_vector(RDBITS-1 downto 0);     -- write data
77
  ren1          : std_logic;                         -- read 1 enable
78
  ren2          : std_logic;                         -- read 2 enable
79
  wren          : std_logic;                         -- write enable
80
 
81
end record;
82
 
83
type rf_cp_out_type is record
84
  data1         : std_logic_vector(RDBITS-1 downto 0); -- read data 1
85
  data2         : std_logic_vector(RDBITS-1 downto 0); -- read data 2
86
end record;
87
 
88
-- instruction cache diagnostic access inputs
89
 
90
type icdiag_in_type is record
91
  addr             : std_logic_vector(31 downto 0); -- memory stage address
92
  enable           : std_logic;
93
  read             : std_logic;
94
  tag              : std_logic;
95
  ctx              : std_logic;
96
  flush            : std_logic;
97
  pflush           : std_logic;
98
  pflushaddr       : std_logic_vector(VA_I_U downto VA_I_D);
99
  pflushtyp        : std_logic;
100
end record;
101
 
102
-- data cache controller inputs
103
 
104
type dcache_in_type is record
105
  asi              : std_logic_vector(7 downto 0); -- ASI for load/store
106
  maddress         : std_logic_vector(31 downto 0); -- memory stage address
107
  eaddress         : std_logic_vector(31 downto 0); -- execute stage address
108
  edata            : std_logic_vector(31 downto 0); -- execute stage data
109
  size             : std_logic_vector(1 downto 0);
110
  signed           : std_logic;
111
  enaddr           : std_logic;
112
  eenaddr          : std_logic;
113
  nullify          : std_logic;
114
  lock             : std_logic;
115
  read             : std_logic;
116
  write            : std_logic;
117
  flush            : std_logic;
118
  dsuen            : std_logic;
119
  msu              : std_logic;                   -- memory stage supervisor
120
  esu              : std_logic;                   -- execution stage supervisor
121
end record;
122
 
123
-- data cache controller outputs
124
 
125
type dcache_out_type is record
126
  data             : std_logic_vector(31 downto 0); -- Data bus address
127
  mexc             : std_logic;         -- memory exception
128
  hold             : std_logic;
129
  mds              : std_logic;
130
  werr             : std_logic;         -- memory write error
131
  icdiag           : icdiag_in_type;
132
  dsudata          : std_logic_vector(31 downto 0);
133
end record;
134
 
135
type icache_in_type is record
136
  rpc              : std_logic_vector(31 downto PCLOW); -- raw address (npc)
137
  fpc              : std_logic_vector(31 downto PCLOW); -- latched address (fpc)
138
  dpc              : std_logic_vector(31 downto PCLOW); -- latched address (dpc)
139
  rbranch          : std_logic;                 -- Instruction branch
140
  fbranch          : std_logic;                 -- Instruction branch
141
  nullify          : std_logic;                 -- instruction nullify
142
  su               : std_logic;                 -- super-user
143
  flush            : std_logic;                 -- flush icache
144
end record;
145
 
146
type icache_out_type is record
147
  data             : std_logic_vector(31 downto 0);
148
  exception        : std_logic;
149
  hold             : std_logic;
150
  flush            : std_logic;                 -- flush in progress
151
  diagrdy          : std_logic;                 -- diagnostic access ready
152
  diagdata         : std_logic_vector(31 downto 0); -- diagnostic data
153
  mds              : std_logic;                 -- memory data strobe
154
end record;
155
 
156
type memory_ic_in_type is record
157
  address          : std_logic_vector(31 downto 0); -- memory address
158
  burst            : std_logic;                 -- burst request
159
  req              : std_logic;                 -- memory cycle request
160
  su               : std_logic;                 -- supervisor address space
161
  flush            : std_logic;                 -- flush in progress
162
 
163
end record;
164
 
165
type memory_ic_out_type is record
166
  data             : std_logic_vector(31 downto 0); -- memory data
167
  ready            : std_logic;                     -- cycle ready
168
  grant            : std_logic;                     -- 
169
  retry            : std_logic;                     -- 
170
  mexc             : std_logic;                     -- memory exception
171
  burst            : std_logic;                     -- memory burst enable
172
  ics              : std_logic_vector(1 downto 0); -- icache state (from CCR)
173
  cache            : std_logic;         -- cacheable data
174
 
175
end record;
176
 
177
type memory_dc_in_type is record
178
  address          : std_logic_vector(31 downto 0);
179
  data             : std_logic_vector(31 downto 0);
180
  asi              : std_logic_vector(3 downto 0); -- ASI for load/store
181
  size             : std_logic_vector(1 downto 0);
182
  burst            : std_logic;
183
  read             : std_logic;
184
  req              : std_logic;
185
  flush            : std_logic;                 -- flush in progress
186
  lock             : std_logic;
187
  su               : std_logic;
188
 
189
end record;
190
 
191
type memory_dc_out_type is record
192
  data             : std_logic_vector(31 downto 0); -- memory data
193
  ready            : std_logic;                     -- cycle ready
194
  grant            : std_logic;                     -- 
195
  retry            : std_logic;                     -- 
196
  mexc             : std_logic;                     -- memory exception
197
  werr             : std_logic;                     -- memory write error
198
  dcs              : std_logic_vector(1 downto 0);
199
  iflush           : std_logic;         -- flush icache (from CCR)
200
  dflush           : std_logic;         -- flush dcache (from CCR)
201
  cache            : std_logic;         -- cacheable data
202
  dsnoop           : std_logic;         -- snoop enable
203
  ba               : std_logic;         -- bus active (used for snooping)
204
  bg               : std_logic;         -- bus grant  (used for snooping)
205
 
206
end record;
207
 
208
 
209
 
210
type ahbstat_out_type is record
211
  ahberr           : std_logic;
212
end record;
213
 
214
 
215
 
216
type itram_in_type is record
217
  tag           : std_logic_vector(ITAG_BITS - ILINE_SIZE - 1 downto 0);
218
  lrr           : std_logic;
219
  lock          : std_logic;
220
  valid         : std_logic_vector(ILINE_SIZE -1 downto 0);
221
  enable        : std_logic;
222
  ctx           : std_logic_vector(M_CTX_SZ-1 downto 0);    --#mmu: ctx number
223
  write         : std_logic_vector(0 to MAXSETS-1);
224
  flush         : std_logic;
225
 
226
end record;
227
 
228
type itram_out_single_type is record
229
  tag           : std_logic_vector(ITAG_BITS - ILINE_SIZE -1 downto 0);
230
  lrr           : std_logic;
231
  lock          : std_logic;
232
  valid         : std_logic_vector(ILINE_SIZE -1 downto 0);
233
  ctx           : std_logic_vector(M_CTX_SZ-1 downto 0);    --#mmu: ctx number
234
end record;
235
 
236
type itram_out_type is  array (0 to MAXSETS-1) of itram_out_single_type;
237
 
238
type idram_in_type is record
239
  address       : std_logic_vector((IOFFSET_BITS + ILINE_BITS -1) downto 0);
240
  data          : std_logic_vector(31 downto 0);
241
  enable        : std_logic;
242
  write         : std_logic_vector(0 to MAXSETS-1);
243
 
244
end record;
245
 
246
type idram_out_single_type is record
247
  data          : std_logic_vector(31 downto 0);
248
 
249
end record;
250
 
251
type idram_out_type is array (0 to MAXSETS-1) of idram_out_single_type;
252
 
253
type dtram_in_type is record
254
  tag           : std_logic_vector(DTAG_BITS - DLINE_SIZE - 1 downto 0);
255
  lrr           : std_logic_vector(0 to MAXSETS-1);
256
  lock          : std_logic_vector(0 to MAXSETS-1);
257
  valid         : std_logic_vector(DLINE_SIZE -1 downto 0);
258
  enable        : std_logic;
259
  write         : std_logic_vector(0 to MAXSETS-1);
260
  ctx           : std_logic_vector(M_CTX_SZ-1 downto 0);  --#mmu: ctx number
261
  flush         : std_logic;
262
 
263
end record;
264
 
265
type dtram_out_single_type is record
266
  tag           : std_logic_vector(DTAG_BITS - DLINE_SIZE -1 downto 0);
267
  lrr           : std_logic;
268
  lock          : std_logic;
269
  valid         : std_logic_vector(DLINE_SIZE -1 downto 0);
270
  ctx           : std_logic_vector(M_CTX_SZ-1 downto 0);  --#mmu: ctx number
271
end record;
272
 
273
type dtram_out_type is array (0 to MAXSETS-1) of dtram_out_single_type;
274
 
275
type dtramsn_in_type is record
276
  enable        : std_logic;
277
  write         : std_logic_vector(0 to MAXSETS-1);
278
  address       : std_logic_vector((DOFFSET_BITS-1) downto 0);
279
  tag           : std_logic_vector(DTAG_BITS - DLINE_SIZE -1 downto 0);
280
 
281
end record;
282
 
283
type dtramsn_out_single_type is record
284
  tag           : std_logic_vector(DTAG_BITS - DLINE_SIZE -1 downto 0);
285
end record;
286
 
287
type dtramsn_out_type is array (0 to MAXSETS-1) of dtramsn_out_single_type;
288
 
289
type ddram_in_type is record
290
  address       : std_logic_vector((DOFFSET_BITS + DLINE_BITS -1) downto 0);
291
  data          : std_logic_vector(31 downto 0);
292
  enable        : std_logic;
293
  write         : std_logic_vector(0 to MAXSETS-1);
294
 
295
end record;
296
 
297
type ddram_out_single_type is record
298
  data          : std_logic_vector(31 downto 0);
299
 
300
end record;
301
 
302
type ddram_out_type is array (0 to MAXSETS-1) of ddram_out_single_type;
303
 
304
type ldram_in_type is record
305
  address       : std_logic_vector(LOCAL_RAM_BITS + 1 downto 2);
306
  enable        : std_logic;
307
  read          : std_logic;
308
  write         : std_logic;
309
end record;
310
 
311
type icram_in_type is record
312
  itramin       : itram_in_type;
313
  idramin       : idram_in_type;
314
end record;
315
 
316
type icram_out_type is record
317
  itramout      : itram_out_type;
318
  idramout      : idram_out_type;
319
end record;
320
 
321
type dcram_in_type is record
322
  dtramin       : dtram_in_type;
323
  ddramin       : ddram_in_type;
324
  ldramin       : ldram_in_type;
325
  dtraminsn     : dtramsn_in_type;
326
end record;
327
 
328
type dcram_out_type is record
329
  dtramout      : dtram_out_type;
330
  ddramout      : ddram_out_type;
331
  dtramoutsn    : dtramsn_out_type;
332
end record;
333
 
334
type cram_in_type is record
335
  icramin       : icram_in_type;
336
  dcramin       : dcram_in_type;
337
end record;
338
 
339
type cram_out_type is record
340
  icramout      : icram_out_type;
341
  dcramout      : dcram_out_type;
342
end record;
343
 
344
 
345
 
346
-- iu pipeline control type (defined here to be visible to debug and coprocessor)
347
 
348
type pipeline_control_type is record
349
  inst   : std_logic_vector(31 downto 0);     -- instruction word
350
  pc     : std_logic_vector(31 downto PCLOW);     -- program counter
351
  annul  : std_logic;                         -- instruction annul
352
  cnt    : std_logic_vector(1 downto 0);      -- cycle number (multi-cycle inst)
353
  ld     : std_logic;                         -- load cycle
354
  pv     : std_logic;                         -- PC valid
355
  rett   : std_logic;                         -- RETT indicator
356
  trap   : std_logic;                         -- trap pending flag
357
  tt     : std_logic_vector(5 downto 0);      -- trap type
358
  rd     : std_logic_vector(RABITS-1 downto 0); -- destination register address
359
end record;
360
 
361
-- Stucture for FPU/CP control
362
type cp_debug_in_type is record
363
  daddr      : std_logic_vector(4 downto 0);
364
  dread_fsr  : std_logic;
365
  dwrite_fsr : std_logic;
366
  denable    : std_logic;
367
  dwrite     : std_logic;
368
  ddata      : std_logic_vector(31 downto 0);
369
end record;
370
 
371
type cp_debug_out_type is record
372
  ddata       : std_logic_vector(63 downto 0);
373
  wr_fp       : std_logic;
374
  wr2_fp      : std_logic;
375
  write_fpreg : std_logic_vector(1 downto 0);
376
  write_fsr   : std_logic;
377
  fpreg       : std_logic_vector(3 downto 0);
378
  op          : std_logic_vector(31 downto 0);
379
  pc          : std_logic_vector(31 downto PCLOW);
380
end record;
381
 
382
type cp_in_type is record
383
  flush         : std_logic;                      -- pipeline flush
384
  exack         : std_logic;                      -- CP exception acknowledge
385
  fdata         : std_logic_vector(31 downto 0);  -- fetch stage data
386
  frdy          : std_logic;                      -- fetch stage data ready  
387
  dannul        : std_logic;                      -- decode stage annul
388
  dtrap         : std_logic;                      -- decode stage trap
389
  dcnt          : std_logic_vector(1 downto 0);     -- decode stage cycle counter
390
  dinst         : std_logic_vector(31 downto 0);     -- decode stage instruction
391
  ex            : pipeline_control_type;          -- iu pipeline ctrl (ex)
392
  me            : pipeline_control_type;          -- iu pipeline ctrl (me)
393
  wr            : pipeline_control_type;          -- iu pipeline ctrl (wr)
394
  lddata        : std_logic_vector(31 downto 0);     -- load data
395
  debug         : cp_debug_in_type;               -- CP debug signals    
396
end record;
397
 
398
type cp_out_type is record
399
  data          : std_logic_vector(31 downto 0); -- store data
400
  exc           : std_logic;                     -- CP exception
401
  cc            : std_logic_vector(1 downto 0);  -- CP condition codes
402
  ccv           : std_logic;                     -- CP condition codes valid
403
  holdn         : std_logic;                     -- CP pipeline hold
404
  ldlock        : std_logic;                     -- CP load/store interlock
405
  debug         : cp_debug_out_type;             -- CP debug signals
406
end record;
407
 
408
 
409
-- iu debug port
410
type iu_debug_in_type is record
411
  dsuen   : std_logic;  -- DSU enable
412
  dbreak  : std_logic;  -- debug break-in
413
  btrapa  : std_logic;  -- break on IU trap
414
  btrape  : std_logic;  -- break on IU trap
415
  berror  : std_logic;  -- break on IU error mode
416
  bwatch  : std_logic;  -- break on IU watchpoint
417
  bsoft   : std_logic;  -- break on software breakpoint (TA 1)
418
  rerror  : std_logic;  -- reset processor error mode
419
  step    : std_logic;  -- single step
420
  denable : std_logic;  -- diagnostic register access enable
421
  dwrite   : std_logic;  -- read/write
422
  daddr   : std_logic_vector(21 downto 2); -- diagnostic address
423
  ddata   : std_logic_vector(31 downto 0); -- diagnostic data
424
end record;
425
 
426
type iu_debug_out_type is record
427
  clk   : std_logic;
428
  rst   : std_logic;
429
  holdn : std_logic;
430
  ex    : pipeline_control_type;
431
  me    : pipeline_control_type;
432
  wr    : pipeline_control_type;
433
  write_reg  : std_logic;
434
  mresult : std_logic_vector(31 downto 0);
435
  result  : std_logic_vector(31 downto 0);
436
  trap    : std_logic;
437
  error   : std_logic;
438
  dmode   : std_logic;
439
  dmode2  : std_logic;
440
  vdmode  : std_logic;
441
  dbreak  : std_logic;
442
  tt      : std_logic_vector(7 downto 0);
443
  psrtt   : std_logic_vector(7 downto 0);
444
  psrpil  : std_logic_vector(3 downto 0);
445
  diagrdy : std_logic;
446
  ddata   : std_logic_vector(31 downto 0);   -- diagnostic data
447
  fpdbg   : cp_debug_out_type;
448
end record;
449
 
450
type iu_in_type is record
451
  irl              : std_logic_vector(3 downto 0); -- interrupt request level
452
  debug   : iu_debug_in_type;
453
end record;
454
 
455
type iu_out_type is record
456
  error   : std_logic;
457
  intack  : std_logic;
458
  irqvec  : std_logic_vector(3 downto 0);
459
  ipend   : std_logic;
460
  debug   : iu_debug_out_type;
461
end record;
462
 
463
-- Meiko FPU interface
464
type fpu_in_type is record
465
    FpInst     : std_logic_vector(9 downto 0);
466
    FpOp       : std_logic;
467
    FpLd       : std_logic;
468
    Reset      : std_logic;
469
    fprf_dout1 : std_logic_vector(63 downto 0);
470
    fprf_dout2 : std_logic_vector(63 downto 0);
471
    RoundingMode : std_logic_vector(1 downto 0);
472
    ss_scan_mode : std_logic;
473
    fp_ctl_scan_in : std_logic;
474
    fpuholdn   : std_logic;
475
end record;
476
 
477
type fpu_out_type is record
478
    FpBusy     : std_logic;
479
    FracResult : std_logic_vector(54 downto 3);
480
    ExpResult  : std_logic_vector(10 downto 0);
481
    SignResult : std_logic;
482
    SNnotDB    : std_logic;
483
    Excep      : std_logic_vector(5 downto 0);
484
    ConditionCodes : std_logic_vector(1 downto 0);
485
    fp_ctl_scan_out : std_logic;
486
end record;
487
 
488
type cp_unit_in_type is record          -- coprocessor execution unit input
489
  op1      : std_logic_vector (63 downto 0); -- operand 1
490
  op2      : std_logic_vector (63 downto 0); -- operand 2
491
  opcode   : std_logic_vector (9 downto 0);  -- opcode
492
  start    : std_logic;                      -- start
493
  load     : std_logic;                      -- load operands
494
  flush    : std_logic;                      -- cancel operation
495
end record;
496
 
497
type cp_unit_out_type is record -- coprocessor execution unit output
498
  res      : std_logic_vector (63 downto 0); -- result
499
  cc       : std_logic_vector (1 downto 0);  -- condition codes
500
  exc      : std_logic_vector (5 downto 0);  -- exception
501
  busy     : std_logic;                      -- eu busy  
502
end record;
503
 
504
-- pci_[in|out]_type groups all EXTERNAL pci ports in unidirectional form
505
-- as well as the required enable signals for the pads
506
type pci_in_type is record
507
 
508
  pci_rst_in_n     : std_logic;
509
  pci_gnt_in_n     : std_logic;
510
  pci_idsel_in     : std_logic;
511
 
512
  pci_adin         : std_logic_vector(31 downto 0);
513
  pci_cbein_n      : std_logic_vector(3 downto 0);
514
  pci_frame_in_n   : std_logic;
515
  pci_irdy_in_n    : std_logic;
516
  pci_trdy_in_n    : std_logic;
517
  pci_devsel_in_n  : std_logic;
518
  pci_stop_in_n    : std_logic;
519
  pci_lock_in_n    : std_logic;
520
  pci_perr_in_n    : std_logic;
521
  pci_serr_in_n    : std_logic;
522
  pci_par_in       : std_logic;
523
  pci_host         : std_logic;
524
  pci_66           : std_logic;
525
  pme_status       : std_logic;
526
 
527
end record;
528
 
529
 
530
type pci_out_type is record
531
 
532
  pci_aden_n       : std_logic_vector(31 downto 0);
533
  pci_cbe0_en_n    : std_logic;
534
  pci_cbe1_en_n    : std_logic;
535
  pci_cbe2_en_n    : std_logic;
536
  pci_cbe3_en_n    : std_logic;
537
 
538
  pci_frame_en_n   : std_logic;
539
  pci_irdy_en_n    : std_logic;
540
  pci_trdy_en_n    : std_logic;
541
  pci_devsel_en_n    : std_logic;
542
  pci_stop_en_n    : std_logic;
543
  pci_ctrl_en_n    : std_logic;
544
  pci_perr_en_n    : std_logic;
545
  pci_par_en_n     : std_logic;
546
  pci_req_en_n     : std_logic;
547
  pci_lock_en_n    : std_logic;
548
  pci_serr_en_n    : std_logic;
549
  pci_int_en_n     : std_logic;
550
 
551
  pci_req_out_n    : std_logic;
552
  pci_adout        : std_logic_vector(31 downto 0);
553
  pci_cbeout_n     : std_logic_vector(3 downto 0);
554
  pci_frame_out_n  : std_logic;
555
  pci_irdy_out_n   : std_logic;
556
  pci_trdy_out_n   : std_logic;
557
  pci_devsel_out_n : std_logic;
558
  pci_stop_out_n   : std_logic;
559
  pci_perr_out_n   : std_logic;
560
  pci_serr_out_n   : std_logic;
561
  pci_par_out      : std_logic;
562
  pci_lock_out_n   : std_logic;
563
  power_state      : std_logic_vector(1 downto 0);
564
  pme_enable       : std_logic;
565
  pme_clear        : std_logic;
566
  pci_int_out_n    : std_logic;
567
 
568
end record;
569
 
570
type div_in_type is record
571
  op1              : std_logic_vector(32 downto 0); -- operand 1
572
  op2              : std_logic_vector(32 downto 0); -- operand 2
573
  y                : std_logic_vector(32 downto 0); -- Y (MSB divident)
574
  flush            : std_logic;
575
  signed           : std_logic;
576
  start            : std_logic;
577
end record;
578
 
579
type div_out_type is record
580
  ready           : std_logic;
581
  icc             : std_logic_vector(3 downto 0); -- ICC
582
  result          : std_logic_vector(31 downto 0); -- div result
583
end record;
584
 
585
type mul_in_type is record
586
  op1              : std_logic_vector(32 downto 0); -- operand 1
587
  op2              : std_logic_vector(32 downto 0); -- operand 2
588
  flush            : std_logic;
589
  signed           : std_logic;
590
  start            : std_logic;
591
  mac              : std_logic;
592
  y                : std_logic_vector(7 downto 0); -- Y (MSB MAC register)
593
  asr18           : std_logic_vector(31 downto 0); -- LSB MAC register
594
end record;
595
 
596
type mul_out_type is record
597
  ready           : std_logic;
598
  icc             : std_logic_vector(3 downto 0); -- ICC
599
  result          : std_logic_vector(63 downto 0); -- mul result
600
end record;
601
 
602
type ahb_dma_in_type is record
603
  address         : std_logic_vector(31 downto 0);
604
  wdata           : std_logic_vector(31 downto 0);
605
  start           : std_logic;
606
  burst           : std_logic;
607
  write           : std_logic;
608
  size            : std_logic_vector(1 downto 0);
609
end record;
610
 
611
type ahb_dma_out_type is record
612
  start           : std_logic;
613
  active          : std_logic;
614
  ready           : std_logic;
615
  retry           : std_logic;
616
  mexc            : std_logic;
617
  haddr           : std_logic_vector(9 downto 0);
618
  rdata           : std_logic_vector(31 downto 0);
619
end record;
620
 
621
type actpci_be_in_type is record
622
  mem_ad_int      : std_logic_vector(31 downto 0);
623
  mem_data        : std_logic_vector(31 downto 0);
624
  dp_done         : std_logic;
625
  dp_start        : std_logic;
626
  rd_be_now       : std_logic;
627
  rd_cyc          : std_logic;
628
  wr_be_now       : std_logic_vector(3 downto 0);
629
  wr_cyc          : std_logic;
630
  bar0_mem_cyc    : std_logic;
631
  busy            : std_logic_vector(3 downto 0);
632
  master_active   : std_logic;
633
  be_gnt          : std_logic;
634
end record;
635
 
636
type actpci_be_out_type is record
637
  rd_be_rdy       : std_logic;
638
  wr_be_rdy       : std_logic;
639
  error           : std_logic;
640
  busy            : std_logic;
641
  mem_data        : std_logic_vector(31 downto 0);
642
  cs_controln     : std_logic;
643
  rd_controln     : std_logic;
644
  wr_controln     : std_logic;
645
  control_add     : std_logic_vector(1 downto 0);
646
  ext_intn        : std_logic;
647
  be_req          : std_logic;
648
end record;
649
 
650
type dsu_in_type is record
651
  dsuen           : std_logic;
652
  dsubre          : std_logic;
653
end record;
654
 
655
type dsu_out_type is record
656
  dsuact          : std_logic;
657
  ntrace          : std_logic;
658
  freezetime      : std_logic;
659
  lresp           : std_logic;
660
  dresp           : std_logic;
661
  dsuen           : std_logic;
662
  dsubre          : std_logic;
663
end record;
664
 
665
type dcom_in_type is record
666
  dsurx           : std_logic;
667
end record;
668
 
669
type dcom_out_type is record
670
  dsutx           : std_logic;
671
end record;
672
 
673
type dsuif_in_type is record
674
  dsui            : dsu_in_type;
675
  dcomi           : dcom_in_type;
676
end record;
677
 
678
type dsuif_out_type is record
679
  dsuo            : dsu_out_type;
680
  dcomo           : dcom_out_type;
681
end record;
682
 
683
type dcom_uart_in_type is record
684
  rxd           : std_logic;
685
  read          : std_logic;
686
  write         : std_logic;
687
  data          : std_logic_vector(7 downto 0);
688
  dsuen         : std_logic;
689
end record;
690
 
691
type dcom_uart_out_type is record
692
  txd           : std_logic;
693
  dready        : std_logic;
694
  tsempty       : std_logic;
695
  thempty       : std_logic;
696
  lock          : std_logic;
697
  enable        : std_logic;
698
  data          : std_logic_vector(7 downto 0);
699
end record;
700
 
701
type tracebuf_in_type is record
702
  addr           : std_logic_vector(TBUFABITS downto 0);
703
  data           : std_logic_vector(127 downto 0);
704
  enable         : std_logic;
705
  write          : std_logic_vector(3 downto 0);
706
end record;
707
 
708
type tracebuf_out_type is record
709
  data          : std_logic_vector(127 downto 0);
710
end record;
711
 
712
type dsumem_in_type is record
713
  pbufi  : tracebuf_in_type;
714
  abufi  : tracebuf_in_type;
715
end record;
716
 
717
type dsumem_out_type is record
718
  pbufo  : tracebuf_out_type;
719
  abufo  : tracebuf_out_type;
720
end record;
721
 
722
type eth_in_type is record
723
  tx_clk : std_logic;
724
  rx_clk : std_logic;
725
  rxd    : std_logic_vector(3 downto 0);
726
  rx_dv  : std_logic;
727
  rx_er  : std_logic;
728
  rx_col : std_logic;
729
  rx_crs : std_logic;
730
  mdio_i : std_logic;
731
end record;
732
 
733
type eth_out_type is record
734
  reset   : std_logic;
735
  txd     : std_logic_vector(3 downto 0);
736
  tx_en   : std_logic;
737
  tx_er   : std_logic;
738
  mdc     : std_logic;
739
  mdio_o  : std_logic;
740
  mdio_oe : std_logic;
741
end record;
742
 
743
type clkgen_in_type is record
744
  pllref  : std_logic;                  -- optional reference for PLL
745
  pllrst  : std_logic;                  -- optional reset for PLL
746
  pllctrl : std_logic_vector(1 downto 0);  -- optional control for PLL
747
end record;
748
 
749
type clkgen_out_type is record
750
  clklock : std_logic;
751
  pcilock : std_logic;
752
end record;
753
 
754
-- mmu i/o
755
 
756
type mmuidc_data_in_type is record
757
  data             : std_logic_vector(31 downto 0);
758
  su               : std_logic;
759
  read             : std_logic;
760
  isid             : mmu_idcache;
761
end record;
762
 
763
type mmuidc_data_out_type is record
764
  finish           : std_logic;
765
  data             : std_logic_vector(31 downto 0);
766
  cache            : std_logic;
767
  accexc           : std_logic;
768
end record;
769
 
770
type mmudc_in_type is record
771
  trans_op         : std_logic;
772
  transdata        : mmuidc_data_in_type;
773
 
774
  -- dcache extra signals
775
  flush_op         : std_logic;
776
  diag_op          : std_logic;
777
 
778
  fsread           : std_logic;
779
  mmctrl1          : mmctrl_type1;
780
end record;
781
 
782
type mmudc_out_type is record
783
  grant            : std_logic;
784
  transdata        : mmuidc_data_out_type;
785
  -- dcache extra signals
786
  mmctrl2          : mmctrl_type2;
787
end record;
788
 
789
type mmuic_in_type is record
790
  trans_op         : std_logic;
791
  transdata        : mmuidc_data_in_type;
792
end record;
793
 
794
type mmuic_out_type is record
795
  grant            : std_logic;
796
  transdata        : mmuidc_data_out_type;
797
end record;
798
 
799
type mmutlbcam_in_type is record
800
  tagin    : tlbcam_tfp;
801
  tagwrite : tlbcam_reg;
802
  trans_op : std_logic;
803
  flush_op : std_logic;
804
  write_op : std_logic;
805
  mmuen    : std_logic;
806
  mset     : std_logic;
807
end record;
808
type mmutlbcami_a is array (natural range <>) of mmutlbcam_in_type;
809
 
810
type mmutlbcam_out_type is record
811
  pteout   : std_logic_vector(31 downto 0);
812
  LVL      : std_logic_vector(1 downto 0);    -- level in pth
813
  hit      : std_logic;
814
  ctx      : std_logic_vector(M_CTX_SZ-1 downto 0);    -- for diagnostic access
815
  valid    : std_logic;                                -- for diagnostic access
816
  vaddr    : std_logic_vector(31 downto 0);            -- for diagnostic access
817
  NEEDSYNC : std_logic;
818
end record;
819
type mmutlbcamo_a is array (natural range <>) of mmutlbcam_out_type;
820
 
821
--#lrue i/o
822
type mmulrue_in_type is record
823
  touch        : std_logic;
824
  pos          : std_logic_vector(M_ENT_MAX_LOG-1 downto 0);
825
  clear        : std_logic;
826
 
827
  left         : std_logic_vector(M_ENT_MAX_LOG-1 downto 0);
828
  fromleft     : std_logic;
829
  right        : std_logic_vector(M_ENT_MAX_LOG-1 downto 0);
830
  fromright    : std_logic;
831
end record;
832
type mmulruei_a is array (natural range <>) of mmulrue_in_type;
833
 
834
type mmulrue_out_type is record
835
  pos          : std_logic_vector(M_ENT_MAX_LOG-1 downto 0);
836
  movetop      : std_logic;
837
end record;
838
type mmulrueo_a is array (natural range <>) of mmulrue_out_type;
839
 
840
--#lru i/o
841
type mmulru_in_type is record
842
  touch     : std_logic;
843
  touchmin  : std_logic;
844
  pos       : std_logic_vector(M_ENT_MAX_LOG-1 downto 0);
845
  mmctrl1   : mmctrl_type1;
846
end record;
847
 
848
type mmulru_out_type is record
849
  pos      : std_logic_vector(M_ENT_MAX_LOG-1 downto 0);
850
end record;
851
 
852
--#mmu: tw i/o
853
type memory_mm_in_type is record
854
  address          : std_logic_vector(31 downto 0);
855
  data             : std_logic_vector(31 downto 0);
856
  size             : std_logic_vector(1 downto 0);
857
  burst            : std_logic;
858
  read             : std_logic;
859
  req              : std_logic;
860
  lock             : std_logic;
861
end record;
862
 
863
type memory_mm_out_type is record
864
  data             : std_logic_vector(31 downto 0); -- memory data
865
  ready            : std_logic;                     -- cycle ready
866
  grant            : std_logic;                     -- 
867
  retry            : std_logic;                     -- 
868
  mexc             : std_logic;                     -- memory exception
869
  werr             : std_logic;                     -- memory write error
870
  cache            : std_logic;                     -- cacheable data
871
end record;
872
 
873
type mmutw_in_type is record
874
  walk_op_ur       : std_logic;
875
  areq_ur          : std_logic;
876
 
877
  data             : std_logic_vector(31 downto 0);
878
  adata            : std_logic_vector(31 downto 0);
879
  aaddr            : std_logic_vector(31 downto 0);
880
end record;
881
type mmutwi_a is array (natural range <>) of mmutw_in_type;
882
 
883
type mmutw_out_type is record
884
  finish           : std_logic;
885
  data             : std_logic_vector(31 downto 0);
886
  addr             : std_logic_vector(31 downto 0);
887
  lvl              : std_logic_vector(1 downto 0);
888
  fault_mexc       : std_logic;
889
  fault_trans      : std_logic;
890
  fault_inv        : std_logic;
891
  fault_lvl        : std_logic_vector(1 downto 0);
892
end record;
893
type mmutwo_a is array (natural range <>) of mmutw_out_type;
894
 
895
-- mmu tlb i/o
896
 
897
type mmutlb_in_type is record
898
  flush_op    : std_logic;
899
  diag_op_ur  : std_logic;
900
 
901
  trans_op    : std_logic;
902
  transdata   : mmuidc_data_in_type;
903
  s2valid     : std_logic;
904
 
905
  annul       : std_logic;
906
  mmctrl1     : mmctrl_type1;
907
end record;
908
type mmutlbi_a is array (natural range <>) of mmutlb_in_type;
909
 
910
type mmutlbfault_out_type is record
911
  fault_pro   : std_logic;
912
  fault_pri   : std_logic;
913
  fault_access     : std_logic;
914
  fault_mexc       : std_logic;
915
  fault_trans      : std_logic;
916
  fault_inv        : std_logic;
917
  fault_lvl        : std_logic_vector(1 downto 0);
918
  fault_su         : std_logic;
919
  fault_read       : std_logic;
920
  fault_isid       : mmu_idcache;
921
  fault_addr       : std_logic_vector(31 downto 0);
922
end record;
923
 
924
type mmutlb_out_type is record
925
  transdata   : mmuidc_data_out_type;
926
  fault       : mmutlbfault_out_type;
927
  nexttrans   : std_logic;
928
  s1finished  : std_logic;
929
end record;
930
type mmutlbo_a is array (natural range <>) of mmutlb_out_type;
931
 
932
end;
933
 

powered by: WebSVN 2.1.0

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