1 |
2 |
dimamali |
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
-----------------------------------------------------------------------------
|
8 |
|
|
-- LEON3 Demonstration design test bench configuration
|
9 |
|
|
-- Copyright (C) 2004 Jiri Gaisler, Gaisler Research
|
10 |
|
|
--
|
11 |
|
|
-- This program is free software; you can redistribute it and/or modify
|
12 |
|
|
-- it under the terms of the GNU General Public License as published by
|
13 |
|
|
-- the Free Software Foundation; either version 2 of the License, or
|
14 |
|
|
-- (at your option) any later version.
|
15 |
|
|
--
|
16 |
|
|
-- This program is distributed in the hope that it will be useful,
|
17 |
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18 |
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19 |
|
|
-- GNU General Public License for more details.
|
20 |
|
|
------------------------------------------------------------------------------
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
library techmap;
|
24 |
|
|
use techmap.gencomp.all;
|
25 |
|
|
library gleichmann;
|
26 |
|
|
use gleichmann.miscellaneous.all;
|
27 |
|
|
|
28 |
|
|
package config is
|
29 |
|
|
|
30 |
|
|
-----------------------------------------------------------------------------
|
31 |
|
|
-- GLEICHMANN SPECIFIC OPTIONS
|
32 |
|
|
-----------------------------------------------------------------------------
|
33 |
|
|
|
34 |
|
|
-- HPE board version
|
35 |
|
|
-- for valid options see package miscellaneous
|
36 |
|
|
constant CFG_HPEVER : integer := midi;
|
37 |
|
|
|
38 |
|
|
-- provide ahb signals for an external slave
|
39 |
|
|
-- slave number can be defined below
|
40 |
|
|
-- numbers 8 to 15 can be used safely, numbers below
|
41 |
|
|
-- might be used by other LEON cores depending on configuration
|
42 |
|
|
constant CFG_EXTAHB : integer := 0;
|
43 |
|
|
|
44 |
|
|
constant CFG_EXTAHB_ADDR : integer := 16#0#;
|
45 |
|
|
|
46 |
|
|
-- interrupt number the external slave is assigned to
|
47 |
|
|
-- unused at the moment
|
48 |
|
|
constant CFG_EXTAHB_IRQ : integer := 0;
|
49 |
|
|
|
50 |
|
|
-- AHB slave number the external slave is assigned to
|
51 |
|
|
constant CFG_EXTAHB_NR : integer := 8;
|
52 |
|
|
|
53 |
|
|
-- index number the external slave is assigned to
|
54 |
|
|
constant CFG_EXTAHB_ID : integer := 8;
|
55 |
|
|
|
56 |
|
|
-- lsb sdram address to bit
|
57 |
|
|
constant CFG_SDSHIFT : integer := 0;
|
58 |
|
|
|
59 |
|
|
-----------------------------------------------------------------------------
|
60 |
|
|
-- END GLEICHMANN SPECIFIC OPTIONS
|
61 |
|
|
-----------------------------------------------------------------------------
|
62 |
|
|
-- Technology and synthesis options
|
63 |
|
|
constant CFG_FABTECH : integer := stratix2;
|
64 |
|
|
constant CFG_MEMTECH : integer := stratix2;
|
65 |
|
|
constant CFG_PADTECH : integer := stratix2;
|
66 |
|
|
constant CFG_NOASYNC : integer := 0;
|
67 |
|
|
constant CFG_SCAN : integer := 0;
|
68 |
|
|
-- Clock generator
|
69 |
|
|
constant CFG_CLKTECH : integer := stratix2;
|
70 |
|
|
constant CFG_CLKMUL : integer := (4);
|
71 |
|
|
constant CFG_CLKDIV : integer := (4);
|
72 |
|
|
constant CFG_OCLKDIV : integer := 2;
|
73 |
|
|
constant CFG_PCIDLL : integer := 0;
|
74 |
|
|
constant CFG_PCISYSCLK: integer := 0;
|
75 |
|
|
constant CFG_CLK_NOFB : integer := 0;
|
76 |
|
|
-- LEON3 processor core
|
77 |
|
|
constant CFG_LEON3 : integer := 1;
|
78 |
|
|
constant CFG_NCPU : integer := (1);
|
79 |
|
|
constant CFG_NWIN : integer := (8);
|
80 |
|
|
constant CFG_V8 : integer := 2;
|
81 |
|
|
constant CFG_MAC : integer := 0;
|
82 |
|
|
constant CFG_SVT : integer := 1;
|
83 |
|
|
constant CFG_RSTADDR : integer := 16#00000#;
|
84 |
|
|
constant CFG_LDDEL : integer := (1);
|
85 |
|
|
constant CFG_NWP : integer := (2);
|
86 |
|
|
constant CFG_PWD : integer := 0*2;
|
87 |
|
|
constant CFG_FPU : integer := 0 + 16*0;
|
88 |
|
|
constant CFG_GRFPUSH : integer := 0;
|
89 |
|
|
constant CFG_ICEN : integer := 1;
|
90 |
|
|
constant CFG_ISETS : integer := 2;
|
91 |
|
|
constant CFG_ISETSZ : integer := 8;
|
92 |
|
|
constant CFG_ILINE : integer := 8;
|
93 |
|
|
constant CFG_IREPL : integer := 0;
|
94 |
|
|
constant CFG_ILOCK : integer := 0;
|
95 |
|
|
constant CFG_ILRAMEN : integer := 0;
|
96 |
|
|
constant CFG_ILRAMADDR: integer := 16#8E#;
|
97 |
|
|
constant CFG_ILRAMSZ : integer := 1;
|
98 |
|
|
constant CFG_DCEN : integer := 1;
|
99 |
|
|
constant CFG_DSETS : integer := 2;
|
100 |
|
|
constant CFG_DSETSZ : integer := 4;
|
101 |
|
|
constant CFG_DLINE : integer := 4;
|
102 |
|
|
constant CFG_DREPL : integer := 0;
|
103 |
|
|
constant CFG_DLOCK : integer := 0;
|
104 |
|
|
constant CFG_DSNOOP : integer := 1 + 0 + 4*0;
|
105 |
|
|
constant CFG_DFIXED : integer := 16#0#;
|
106 |
|
|
constant CFG_DLRAMEN : integer := 0;
|
107 |
|
|
constant CFG_DLRAMADDR: integer := 16#8F#;
|
108 |
|
|
constant CFG_DLRAMSZ : integer := 1;
|
109 |
|
|
constant CFG_MMUEN : integer := 1;
|
110 |
|
|
constant CFG_ITLBNUM : integer := 8;
|
111 |
|
|
constant CFG_DTLBNUM : integer := 8;
|
112 |
|
|
constant CFG_TLB_TYPE : integer := 0 + 1*2;
|
113 |
|
|
constant CFG_TLB_REP : integer := 0;
|
114 |
|
|
constant CFG_DSU : integer := 1;
|
115 |
|
|
constant CFG_ITBSZ : integer := 2;
|
116 |
|
|
constant CFG_ATBSZ : integer := 2;
|
117 |
|
|
constant CFG_LEON3FT_EN : integer := 0;
|
118 |
|
|
constant CFG_IUFT_EN : integer := 0;
|
119 |
|
|
constant CFG_FPUFT_EN : integer := 0;
|
120 |
|
|
constant CFG_RF_ERRINJ : integer := 0;
|
121 |
|
|
constant CFG_CACHE_FT_EN : integer := 0;
|
122 |
|
|
constant CFG_CACHE_ERRINJ : integer := 0;
|
123 |
|
|
constant CFG_LEON3_NETLIST: integer := 0;
|
124 |
|
|
constant CFG_DISAS : integer := 0 + 0;
|
125 |
|
|
constant CFG_PCLOW : integer := 2;
|
126 |
|
|
-- AMBA settings
|
127 |
|
|
constant CFG_DEFMST : integer := (0);
|
128 |
|
|
constant CFG_RROBIN : integer := 1;
|
129 |
|
|
constant CFG_SPLIT : integer := 0;
|
130 |
|
|
constant CFG_AHBIO : integer := 16#FFF#;
|
131 |
|
|
constant CFG_APBADDR : integer := 16#800#;
|
132 |
|
|
constant CFG_AHB_MON : integer := 0;
|
133 |
|
|
constant CFG_AHB_MONERR : integer := 0;
|
134 |
|
|
constant CFG_AHB_MONWAR : integer := 0;
|
135 |
|
|
-- DSU UART
|
136 |
|
|
constant CFG_AHB_UART : integer := 1;
|
137 |
|
|
-- JTAG based DSU interface
|
138 |
|
|
constant CFG_AHB_JTAG : integer := 1;
|
139 |
|
|
-- Ethernet DSU
|
140 |
|
|
constant CFG_DSU_ETH : integer := 1 + 0;
|
141 |
|
|
constant CFG_ETH_BUF : integer := 2;
|
142 |
|
|
constant CFG_ETH_IPM : integer := 16#C0A8#;
|
143 |
|
|
constant CFG_ETH_IPL : integer := 16#0034#;
|
144 |
|
|
constant CFG_ETH_ENM : integer := 16#00007A#;
|
145 |
|
|
constant CFG_ETH_ENL : integer := 16#CC1023#;
|
146 |
|
|
-- USB DSU
|
147 |
|
|
constant CFG_GRUSB_DCL : integer := 0;
|
148 |
|
|
constant CFG_GRUSB_DCL_UIFACE : integer := 1;
|
149 |
|
|
constant CFG_GRUSB_DCL_DW : integer := 8;
|
150 |
|
|
-- PROM/SRAM controller
|
151 |
|
|
constant CFG_SRCTRL : integer := 0;
|
152 |
|
|
constant CFG_SRCTRL_PROMWS : integer := 0;
|
153 |
|
|
constant CFG_SRCTRL_RAMWS : integer := 0;
|
154 |
|
|
constant CFG_SRCTRL_IOWS : integer := 0;
|
155 |
|
|
constant CFG_SRCTRL_RMW : integer := 0;
|
156 |
|
|
constant CFG_SRCTRL_8BIT : integer := 0;
|
157 |
|
|
constant CFG_SRCTRL_SRBANKS : integer := 1;
|
158 |
|
|
constant CFG_SRCTRL_BANKSZ : integer := 0;
|
159 |
|
|
constant CFG_SRCTRL_ROMASEL : integer := 0;
|
160 |
|
|
-- LEON2 memory controller
|
161 |
|
|
constant CFG_MCTRL_LEON2 : integer := 1;
|
162 |
|
|
constant CFG_MCTRL_RAM8BIT : integer := 0;
|
163 |
|
|
constant CFG_MCTRL_RAM16BIT : integer := 0;
|
164 |
|
|
constant CFG_MCTRL_5CS : integer := 0;
|
165 |
|
|
constant CFG_MCTRL_SDEN : integer := 1;
|
166 |
|
|
constant CFG_MCTRL_SEPBUS : integer := 0;
|
167 |
|
|
constant CFG_MCTRL_INVCLK : integer := 0;
|
168 |
|
|
constant CFG_MCTRL_SD64 : integer := 0;
|
169 |
|
|
constant CFG_MCTRL_PAGE : integer := 1 + 0;
|
170 |
|
|
-- SDRAM controller
|
171 |
|
|
constant CFG_SDCTRL : integer := 0;
|
172 |
|
|
constant CFG_SDCTRL_INVCLK : integer := 0;
|
173 |
|
|
constant CFG_SDCTRL_SD64 : integer := 0;
|
174 |
|
|
constant CFG_SDCTRL_PAGE : integer := 0 + 0;
|
175 |
|
|
-- AHB ROM
|
176 |
|
|
constant CFG_AHBROMEN : integer := 0;
|
177 |
|
|
constant CFG_AHBROPIP : integer := 0;
|
178 |
|
|
constant CFG_AHBRODDR : integer := 16#000#;
|
179 |
|
|
constant CFG_ROMADDR : integer := 16#000#;
|
180 |
|
|
constant CFG_ROMMASK : integer := 16#E00# + 16#000#;
|
181 |
|
|
-- AHB RAM
|
182 |
|
|
constant CFG_AHBRAMEN : integer := 0;
|
183 |
|
|
constant CFG_AHBRSZ : integer := 1;
|
184 |
|
|
constant CFG_AHBRADDR : integer := 16#A00#;
|
185 |
|
|
-- Gaisler Ethernet core
|
186 |
|
|
constant CFG_GRETH : integer := 1;
|
187 |
|
|
constant CFG_GRETH1G : integer := 0;
|
188 |
|
|
constant CFG_ETH_FIFO : integer := 32;
|
189 |
|
|
-- CAN 2.0 interface
|
190 |
|
|
constant CFG_CAN : integer := 0;
|
191 |
|
|
constant CFG_CANIO : integer := 16#0#;
|
192 |
|
|
constant CFG_CANIRQ : integer := 0;
|
193 |
|
|
constant CFG_CANLOOP : integer := 0;
|
194 |
|
|
constant CFG_CAN_SYNCRST : integer := 0;
|
195 |
|
|
constant CFG_CANFT : integer := 0;
|
196 |
|
|
-- SPI controller
|
197 |
|
|
constant CFG_SPICTRL_ENABLE : integer := 0;
|
198 |
|
|
constant CFG_SPICTRL_SLVS : integer := 1;
|
199 |
|
|
constant CFG_SPICTRL_FIFO : integer := 1;
|
200 |
|
|
constant CFG_SPICTRL_SLVREG : integer := 0;
|
201 |
|
|
-- UART 1
|
202 |
|
|
constant CFG_UART1_ENABLE : integer := 1;
|
203 |
|
|
constant CFG_UART1_FIFO : integer := 4;
|
204 |
|
|
-- LEON3 interrupt controller
|
205 |
|
|
constant CFG_IRQ3_ENABLE : integer := 1;
|
206 |
|
|
constant CFG_IRQ3_NSEC : integer := 0;
|
207 |
|
|
-- Modular timer
|
208 |
|
|
constant CFG_GPT_ENABLE : integer := 1;
|
209 |
|
|
constant CFG_GPT_NTIM : integer := (2);
|
210 |
|
|
constant CFG_GPT_SW : integer := (8);
|
211 |
|
|
constant CFG_GPT_TW : integer := (32);
|
212 |
|
|
constant CFG_GPT_IRQ : integer := (8);
|
213 |
|
|
constant CFG_GPT_SEPIRQ : integer := 1;
|
214 |
|
|
constant CFG_GPT_WDOGEN : integer := 0;
|
215 |
|
|
constant CFG_GPT_WDOG : integer := 16#0#;
|
216 |
|
|
-- VGA and PS2/ interface
|
217 |
|
|
constant CFG_KBD_ENABLE : integer := 0;
|
218 |
|
|
constant CFG_VGA_ENABLE : integer := 0;
|
219 |
|
|
constant CFG_SVGA_ENABLE : integer := 0;
|
220 |
|
|
-- AHB2HPI enable
|
221 |
|
|
constant CFG_AHB2HPI : integer := 0;
|
222 |
|
|
-- ADCDAC enable
|
223 |
|
|
constant CFG_ADCDAC : integer := 0;
|
224 |
|
|
-- SPI_OC enable
|
225 |
|
|
constant CFG_SPI_OC : integer := 0;
|
226 |
|
|
-- MultiIO enable
|
227 |
|
|
constant CFG_MULTIIO : integer := 0;
|
228 |
|
|
-- AC97_OC enable
|
229 |
|
|
constant CFG_AC97_OC : integer := 0;
|
230 |
|
|
-- GRLIB debugging
|
231 |
|
|
constant CFG_DUART : integer := 0;
|
232 |
|
|
end;
|