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

Subversion Repositories core_arm

[/] [core_arm/] [trunk/] [vhdl/] [sparc/] [leon_target.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) 2003 Gaisler Research
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:      target
19
-- File:        target.vhd
20
-- Author:      Jiri Gaisler - Gaisler Research
21
-- Description: LEON target configuration package
22
------------------------------------------------------------------------------
23
 
24
library IEEE;
25
use IEEE.std_logic_1164.all;
26
 
27
package leon_target is
28
type targettechs is
29
  (gen, virtex, virtex2, atc35, atc25, atc18, fs90, umc18, tsmc25, proasic, axcel);
30
 
31
-- synthesis configuration
32
type syn_config_type is record
33
  targettech    : targettechs;
34
  infer_ram     : boolean;      -- infer cache and dsu ram automatically 
35
  infer_regf    : boolean;      -- infer regfile automatically 
36
  infer_rom     : boolean;      -- infer boot prom automatically
37
  infer_pads    : boolean;      -- infer pads automatically
38
  infer_pci     : boolean;      -- infer PCI pads automatically
39
  infer_mult    : boolean;      -- infer multiplier automatically
40
  rftype        : integer;      -- regfile implementation option
41
  targetclk     : targettechs;  -- use technology specific clock generation
42
  clk_mul       : integer;      -- PLL clock multiply factor
43
  clk_div       : integer;      -- PLL clock divide factor
44
  pci_dll       : boolean;      -- Re-synchronize PCI clock using a DLL
45
  pci_sysclk    : boolean;      -- Use PCI clock as system clock
46
end record;
47
 
48
-- processor configuration
49
type multypes is (none, iterative, m32x8, m16x16, m32x16, m32x32);
50
type divtypes is (none, radix2);
51
 
52
type iu_config_type is record
53
  nwindows      : integer;      -- # register windows (2 - 32)
54
  multiplier    : multypes;     -- multiplier type
55
  mulpipe       : boolean;      -- m16x16 pipeline register
56
  divider       : divtypes;     -- divider type
57
  mac           : boolean;      -- multiply/accumulate
58
  fpuen         : integer range 0 to 1;  -- FPU enable (integer due to synopsys limitations....sigh!)
59
  cpen          : boolean;      -- co-processor enable 
60
  fastjump      : boolean;      -- enable fast jump address generation
61
  icchold       : boolean;      -- enable fast branch logic
62
  lddelay       : integer range 1 to 2; -- # load delay cycles (1-2)
63
  fastdecode    : boolean;      -- optimise instruction decoding (FPGA only)
64
  rflowpow      : boolean;      -- disable regfile when not accessed
65
  watchpoints   : integer range 0 to 4; -- # hardware watchpoints (0-4)
66
  impl          : integer range 0 to 15; -- IU implementation ID
67
  version       : integer range 0 to 15; -- IU version ID
68
end record;
69
 
70
-- FPU configuration
71
type fpucoretype  is (meiko, lth, grfpu);               -- FPU core type
72
type fpuiftype is (none, serial, parallel);             -- FPU interface type
73
 
74
type fpu_config_type is record
75
  core          : fpucoretype;  -- FPU core type
76
  interface     : fpuiftype;    -- FPU inteface type
77
  fregs         : integer;      -- 32 for serial interface, 0 for parallel 
78
  version       : integer range 0 to 7; -- FPU version ID
79
end record;
80
 
81
-- co-processor configuration
82
type cptype is (none, cpc); -- CP type
83
 
84
-- cache configuration
85
type dsnoop_type is (none, slow, fast); -- snoop implementation type
86
constant PROC_CACHE_MAX : integer := 4;   -- maximum cacheability ranges
87
constant PROC_CACHE_ADDR_MSB : integer := 4; -- MSB address bits to decode cacheability
88
type cache_replace_type is (lru, lrr, rnd);  -- cache replacement algorithm
89
constant MAXSETS  : integer := 4;
90
 
91
type cache_config_type is record
92
  isets         : integer range 1 to 4;   -- # of sets in icache
93
  isetsize      : integer;      -- I-cache size per set in Kbytes
94
  ilinesize     : integer;      -- # words per I-cache line
95
  ireplace      : cache_replace_type;         -- icache replacement algorithm
96
  ilock         : integer;      -- icache locking
97
  dsets         : integer range 1 to 4;   -- # of sets in dcache
98
  dsetsize      : integer;      -- D-cache size per set in Kbytes
99
  dlinesize     : integer;      -- # words per D-cache line
100
  dreplace      : cache_replace_type;         -- icache replacement algorithm
101
  dlock         : integer;      -- dcache locking
102
  dsnoop        : dsnoop_type;  -- data-cache snooping
103
  drfast        : boolean;      -- data-cache fast read-data generation
104
  dwfast        : boolean;      -- data-cache fast write-data generation
105
  dlram         : boolean;      -- local data ram enable
106
  dlramsize     : integer;      -- local data ram size in kbytes
107
  dlramaddr     : integer;      -- local data ram start address (8 msb)
108
end record;
109
 
110
-- mmu configuration
111
type mmu_tlb_type is (splittlb, combinedtlb);
112
type mmu_tlb_rep is (replruarray, repincrement);  -- cache replacement algorithm
113
type mmu_config_type is record
114
  enable        : integer range 0 to 1;
115
  itlbnum       : integer range 2 to 64;
116
  dtlbnum       : integer range 2 to 32;
117
  tlb_type      : mmu_tlb_type;
118
  tlb_rep       : mmu_tlb_rep;
119
  tlb_diag      : boolean;
120
end record;
121
 
122
-- memory controller configuration
123
type mctrl_config_type is record
124
  bus8en        : boolean;      -- enable 8-bit bus operation
125
  bus16en       : boolean;      -- enable 16-bit bus operation
126
  wendfb        : boolean;      -- enable wen feed-back to data bus drivers
127
  ramsel5       : boolean;      -- enable 5th ram select
128
  sdramen       : boolean;      -- enable sdram controller
129
  sdinvclk      : boolean;      -- invert sdram clock
130
end record;
131
 
132
type boottype is (memory, prom, dual);
133
type boot_config_type is record
134
  boot          : boottype;     -- select boot source
135
  ramrws        : integer;      -- ram read waitstates
136
  ramwws        : integer;      -- ram write waitstates
137
  sysclk        : integer;      -- cpu clock
138
  baud          : positive;     -- UART baud rate
139
  extbaud       : boolean;      -- use external baud rate setting
140
  pabits        : positive;     -- internal boot-prom address bits
141
end record;
142
 
143
-- PCI configuration
144
type pcitype is (none, insilicon, target_only, opencores); -- PCI core type
145
type pci_config_type is record
146
  pcicore       : pcitype;      -- PCI core type
147
  ahbmasters    : integer;      -- number of ahb master interfaces
148
  ahbslaves     : integer;      -- number of ahb slave interfaces
149
  arbiter       : boolean;      -- enable PCI arbiter
150
  fixpri        : boolean;      -- use fixed arbitration priority
151
  prilevels     : integer;      -- number of priority levels in arbiter
152
  pcimasters    : integer;      -- number of PCI masters to be handled by arbiter
153
  vendorid      : integer;      -- PCI vendor ID
154
  deviceid      : integer;      -- PCI device ID
155
  subsysid      : integer;      -- PCI subsystem ID
156
  revisionid    : integer;      -- PCI revision ID
157
  classcode     : integer;      -- PCI class code
158
  pmepads       : boolean;      -- enable power down pads
159
  p66pad        : boolean;      -- enable PCI66 pad
160
  pcirstall     : boolean;      -- PCI reset affects complete processor
161
end record;
162
 
163
-- debug configuration
164
type debug_config_type is record
165
  enable        : boolean;      -- enable debug port
166
  uart          : boolean;      -- enable fast uart data to console
167
  iureg         : boolean;      -- enable tracing of iu register writes
168
  fpureg        : boolean;      -- enable tracing of fpu register writes
169
  nohalt        : boolean;      -- dont halt on error
170
  pclow         : integer;      -- set to 2 for synthesis, 0 for debug
171
  dsuenable     : boolean;      -- enable DSU
172
  dsutrace      : boolean;      -- enable trace buffer
173
  dsumixed      : boolean;      -- enable mixed-mode trace buffer
174
  dsudpram      : boolean;      -- use dual-port ram for trace buffer
175
  tracelines    : integer range 64 to 1024; -- # trace lines (needs 16 bytes/line)
176
end record;
177
 
178
-- AMBA configuration types
179
constant AHB_MST_MAX    : integer := 4;   -- maximum AHB masters
180
constant AHB_SLV_MAX    : integer := 7;   -- maximum AHB slaves
181
constant AHB_SLV_ADDR_MSB : integer := 4; -- MSB address bits to decode slaves
182
subtype ahb_range_addr_type is std_logic_vector(AHB_SLV_ADDR_MSB-1 downto 0);
183
type ahbslv_addr_type is array (0 to 15) of integer range 0 to AHB_SLV_MAX;
184
 
185
type ahb_config_type is record
186
  masters       : integer range 1 to AHB_MST_MAX;
187
  defmst        : integer range 0 to AHB_MST_MAX-1;
188
  split         : boolean;      -- add support for SPLIT reponse
189
  testmod       : boolean;      -- add AHB test module (not for synthesis!)
190
end record;
191
 
192
constant APB_SLV_MAX       : integer := 16;  -- maximum APB slaves
193
constant APB_SLV_ADDR_BITS : integer := 10;  -- address bits to decode APB slaves
194
subtype apb_range_addr_type is std_logic_vector(APB_SLV_ADDR_BITS-1 downto 0);
195
 
196
type irq_filter_type is (lvl0, lvl1, edge0, edge1);
197
type irq_filter_vec is array (0 to 31) of irq_filter_type;
198
 
199
type irq2type is record
200
  enable        : boolean;      -- enable chained interrupt controller
201
  channels      : integer;      -- number of additional interrupts (1 - 32)
202
  filter        : irq_filter_vec; -- irq filter definitions
203
end record;
204
 
205
type peri_config_type is record
206
  cfgreg        : boolean;      -- enable LEON configuration register
207
  ahbstat       : boolean;      -- enable AHB status register
208
  wprot         : boolean;      -- enable RAM write-protection unit
209
  wdog          : boolean;      -- enable watchdog
210
  irq2en        : boolean;      -- chained interrupt controller enable
211
  ahbram        : boolean;      -- enable AHB RAM
212
  ahbrambits    : integer;      -- address bits in AHB ram
213
  ethen         : boolean;      -- enable ethernet core
214
end record;
215
 
216
constant irq2none : irq2type := ( enable => false, channels => 32,
217
  filter => (others => lvl1));
218
--constant irq2chan4 : irq2type := ( enable => true, channels => 4,
219
--  filter => (lvl1, lvl1, edge0, edge1, others => lvl0));
220
 
221
end;

powered by: WebSVN 2.1.0

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