##// END OF EJS Templates
ICI rockets designs added
jeandet -
r168:0b190be76d60 alexis
parent child
Show More
@@ -0,0 +1,11
1 NET "CLK" LOC = "B10";
2 NET "RESET" LOC = "A5" | IOSTANDARD = LVTTL;
3 NET "SCLK" LOC = "V22" | IOSTANDARD = LVTTL;
4 NET "GATE" LOC = "T22" | IOSTANDARD = LVTTL;
5 NET "MINF" LOC = "T21" | IOSTANDARD = LVTTL;
6 NET "MAJF" LOC = "U22" | IOSTANDARD = LVTTL;
7 NET "DATA" LOC = "V21";
8 NET "DC_ADC_SCLK" LOC = "AB17";
9 NET "DC_ADC_IN(0)" LOC = "AB19" | IOSTANDARD = LVTTL;
10 NET "DC_ADC_IN(1)" LOC = "AA18" | IOSTANDARD = LVTTL;
11 NET "DC_ADC_FSynch" LOC = "AB18";
@@ -0,0 +1,13
1 #
2 TECHNOLOGY=Spartan-3A
3 ISETECH="Spartan-3A"
4 PART=xc3s200a
5 PACKAGE=VQ100
6 SPEED=-3
7 SYNFREQ=220
8 PROMGENPAR=
9
10 MANUFACTURER=Xilinx
11 MGCPART=xc3s200a$(PACKAGE)
12 MGCTECHNOLOGY=SPARTAN-3A
13 MGCPACKAGE=$(PACKAGE)
@@ -0,0 +1,24
1 -g DebugBitstream:No
2 -g Binary:no
3 -b
4 -g CRC:Enable
5 -g ConfigRate:26
6 -g ProgPin:PullUp
7 -g DonePin:PullUp
8 -g TckPin:PullUp
9 -g TdiPin:PullUp
10 -g TdoPin:PullUp
11 -g TmsPin:PullUp
12 -g UnusedPin:PullDown
13 -g UserID:0xFFFFFFFF
14 -g SPI_buswidth:4
15 -g StartUpClk:CCLK
16 -g DONE_cycle:4
17 -g GTS_cycle:5
18 -g GWE_cycle:6
19 -g LCK_cycle:NoWait
20 -g Security:None
21 -g Persist:No
22 -g ReadBack
23 -g DonePipe:No
24 -g DriveDone:Yes
@@ -0,0 +1,7
1 setMode -bscan
2 setCable -p usb21
3 identify
4 assignfile -p 1 -file xilinx-sp605-xc6slx45t.bit
5 program -p 1
6 quit
7
@@ -0,0 +1,7
1 setMode -bs
2 setCable -port auto
3 Identify
4 identifyMPM
5 assignFile -p 2 -file "xilinx-sp605-xc6slx45t.bit"
6 Program -p 2 -defaultVersion 0
7 quit
@@ -0,0 +1,66
1 -- Convertisseur_config.vhd
2 library IEEE;
3 use IEEE.std_logic_1164.all;
4 use IEEE.numeric_std.all;
5
6
7 Package Convertisseur_config is
8
9 --===========================================================|
10 --================== Variables Utiles =======================|
11 --===========================================================|
12
13 constant FrοΏ½q_clk_Hz : integer := 27000000;
14 constant DοΏ½bit_Hz : integer := 1000000;
15 constant nb_compteur_sclk : integer := FrοΏ½q_clk_Hz/DοΏ½bit_Hz;
16 constant N_chanel : integer := 3;
17 constant nb_mots : integer := 144;
18 constant Vector_Dummy : std_logic_vector(23 downto 0) := X"FD1869";
19
20
21 --===========================================================|
22 --================= Configuration ADS =======================|
23 --===========================================================|
24
25 Type ADS_FORMAT_Type is array(2 downto 0) of std_logic;
26 constant SPI_FORMAT : ADS_FORMAT_Type := "010";
27 constant FSYNC_FORMAT : ADS_FORMAT_Type := "101";
28
29 Type ADS_MODE_Type is array(1 downto 0) of std_logic;
30 constant MODE_low_power : ADS_MODE_Type := "10";
31 constant MODE_low_speed : ADS_MODE_Type := "11";
32 constant MODE_high_resolution : ADS_MODE_Type := "01";
33
34 Type ADS_config is
35 record
36 SYNC : std_logic;
37 CLKDIV : std_logic;
38 FORMAT : ADS_FORMAT_Type;
39 MODE : ADS_MODE_Type;
40 end record;
41
42
43 --===========================================================|
44 --================ EntrοΏ½es/Sorties ADS ======================|
45 --=============== + init entrοΏ½es (simu) =====================|
46 --===========================================================|
47
48 Type Tbl_In is array(natural range <>) of std_logic;
49 Type Tbl_Out is array(natural range <>) of std_logic_vector(23 downto 0);
50
51 Type IN_ADS is
52 record
53 RDY : std_logic;
54 Data_in : Tbl_In(1 to N_chanel);
55 end record;
56
57 Type OUT_ADS is
58 record
59 Vector_out : Tbl_Out(1 to N_chanel);
60 end record;
61
62 constant Data_inINIT : Tbl_In(1 to N_chanel) := (others => '0');
63 constant IN_ADSINIT : IN_ADS := ('1',Data_inINIT);
64
65
66 end; No newline at end of file
@@ -0,0 +1,141
1 ----------------------------------------------------------------------------------
2 -- Company:
3 -- Engineer:
4 --
5 -- Create Date: 10:39:51 04/25/2013
6 -- Design Name:
7 -- Module Name: ICI4_3DCAM_FRAM_PLACER - Behavioral
8 -- Project Name:
9 -- Target Devices:
10 -- Tool versions:
11 -- Description:
12 --
13 -- Dependencies:
14 --
15 -- Revision:
16 -- Revision 0.01 - File Created
17 -- Additional Comments:
18 --
19 ----------------------------------------------------------------------------------
20 library IEEE;
21 use IEEE.std_logic_1164.all;
22 use IEEE.numeric_std.all;
23
24 -- Uncomment the following library declaration if using
25 -- arithmetic functions with Signed or Unsigned values
26 --use IEEE.NUMERIC_STD.ALL;
27
28 -- Uncomment the following library declaration if instantiating
29 -- any Xilinx primitives in this code.
30 --library UNISIM;
31 --use UNISIM.VComponents.all;
32
33 entity ICI4_3DCAM_FRAM_PLACER is
34 generic(WordSize :integer := 8;WordCnt : integer := 144;MinFCount : integer := 64);
35 port(
36 clk : in std_logic;
37 Wcount : in integer range 0 to WordCnt-1;
38 Flag : out std_logic;
39 WORD0 : in std_logic_vector(15 downto 0);
40 WORD1 : in std_logic_vector(15 downto 0);
41 WORD2 : in std_logic_vector(15 downto 0);
42 WORD3 : in std_logic_vector(15 downto 0);
43 WORD4 : in std_logic_vector(15 downto 0);
44 WORD5 : in std_logic_vector(15 downto 0);
45 WORD6 : in std_logic_vector(15 downto 0);
46 WORD7 : in std_logic_vector(15 downto 0);
47 WORD8 : in std_logic_vector(15 downto 0);
48 WORD9 : in std_logic_vector(15 downto 0);
49 WORD10 : in std_logic_vector(15 downto 0);
50 WORD11 : in std_logic_vector(15 downto 0);
51 WORD12 : in std_logic_vector(15 downto 0);
52 WordOut : out std_logic_vector(WordSize-1 downto 0)
53
54 );
55 end ICI4_3DCAM_FRAM_PLACER;
56
57 architecture Behavioral of ICI4_3DCAM_FRAM_PLACER is
58
59 begin
60
61
62 process(clk)
63 begin
64 if clk'event and clk ='1' then
65 case Wcount is
66
67
68 when 29 =>
69 WordOut <= WORD3(15 downto 8);
70 Flag <= '1';
71 when 30 =>
72 WordOut <= WORD3(7 downto 0);
73 Flag <= '1';
74 when 31 =>
75 WordOut <= WORD4(15 downto 8);
76 Flag <= '1';
77 when 32 =>
78 WordOut <= WORD4(7 downto 0);
79 Flag <= '1';
80 when 33 =>
81 WordOut <= WORD5(15 downto 8);
82 Flag <= '1';
83 when 34 =>
84 WordOut <= WORD5(7 downto 0);
85 Flag <= '1';
86
87 when 35 =>
88 WordOut <= WORD6(15 downto 8);
89 Flag <= '1';
90 when 36 =>
91 WordOut <= WORD6(7 downto 0);
92 Flag <= '1';
93 when 37 =>
94 WordOut <= WORD7(15 downto 8);
95 Flag <= '1';
96 when 38 =>
97 WordOut <= WORD7(7 downto 0);
98 Flag <= '1';
99 when 39 =>
100 WordOut <= WORD8(15 downto 8);
101 Flag <= '1';
102 when 40 =>
103 WordOut <= WORD8(7 downto 0);
104 Flag <= '1';
105
106 when 41 =>
107 WordOut <= WORD9(15 downto 8);
108 Flag <= '1';
109 when 42 =>
110 WordOut <= WORD9(7 downto 0);
111 Flag <= '1';
112 when 43 =>
113 WordOut <= WORD10(15 downto 8);
114 Flag <= '1';
115 when 44 =>
116 WordOut <= WORD10(7 downto 0);
117 Flag <= '1';
118 when 45 =>
119 WordOut <= WORD11(15 downto 8);
120 Flag <= '1';
121 when 46 =>
122 WordOut <= WORD11(7 downto 0);
123 Flag <= '1';
124
125 when 47 =>
126 WordOut <= WORD12(15 downto 8);
127 Flag <= '1';
128 when 48 =>
129 WordOut <= WORD12(7 downto 0);
130 Flag <= '1';
131
132
133 when others =>
134 WordOut <= X"A5";
135 Flag <= '0';
136 end case;
137 end if;
138 end process;
139
140 end Behavioral;
141
@@ -0,0 +1,63
1 -- LF_FRAME_PLACER.vhd
2 library IEEE;
3 use IEEE.std_logic_1164.all;
4 use IEEE.numeric_std.all;
5
6
7
8 entity LF_FRAME_PLACER is
9 generic(WordSize :integer := 8;WordCnt : integer := 144;MinFCount : integer := 64);
10 port(
11 clk : in std_logic;
12 Wcount : in integer range 0 to WordCnt-1;
13 Flag : out std_logic;
14 LF1 : in std_logic_vector(15 downto 0);
15 LF2 : in std_logic_vector(15 downto 0);
16 LF3 : in std_logic_vector(15 downto 0);
17 WordOut : out std_logic_vector(WordSize-1 downto 0)
18
19 );
20 end entity;
21
22
23
24
25
26 architecture ar_LF_FRAME_PLACER of LF_FRAME_PLACER is
27
28
29 begin
30
31 process(clk)
32 begin
33 if clk'event and clk ='1' then
34 case Wcount is
35 when 23 =>
36 WordOut <= LF1(15 downto 8);
37 Flag <= '1';
38 when 24 =>
39 WordOut <= LF1(7 downto 0);
40 Flag <= '1';
41 when 25 =>
42 WordOut <= LF2(15 downto 8);
43 Flag <= '1';
44 when 26 =>
45 WordOut <= LF2(7 downto 0);
46 Flag <= '1';
47 when 27 =>
48 WordOut <= LF3(15 downto 8);
49 Flag <= '1';
50 when 28 =>
51 WordOut <= LF3(7 downto 0);
52 Flag <= '1';
53
54 when others =>
55 WordOut <= X"A5";
56 Flag <= '0';
57 end case;
58 end if;
59 end process;
60
61
62
63 end ar_LF_FRAME_PLACER; No newline at end of file
@@ -0,0 +1,47
1 include .config
2
3 #GRLIB=$(GRLIB)
4 TOP=ici4
5 BOARD=ICI4-3DCAM
6 #BOARD=SP601
7 include $(GRLIB)/boards/$(BOARD)/Makefile.inc
8 DEVICE=$(PART)-$(PACKAGE)$(SPEED)
9 #UCF=$(GRLIB)/boards/$(BOARD)/ICI3.ucf
10 UCF=$(GRLIB)/boards/$(BOARD)/ICI4-Main-BD.ucf
11 QSF=$(GRLIB)/boards/$(BOARD)/$(TOP).qsf
12 EFFORT=high
13 ISEMAPOPT="-timing"
14 XSTOPT=""
15 SYNPOPT="set_option -maxfan 100; set_option -pipe 1; set_option -retiming 1; set_option -write_apr_constraint 0"
16 VHDLOPTSYNFILES= \
17 ICI4HDL/Convertisseur_config.vhd \
18 ICI4HDL/ICI4_3DCAM_FRAM_PLACER.vhd \
19 ICI4HDL/LF_FRAME_PLACER.vhd
20
21 VHDLSYNFILES= \
22 config.vhd ici4.vhd
23 VHDLSIMFILES=testbench.vhd
24 SIMTOP=testbench
25 #SDCFILE=$(GRLIB)/boards/$(BOARD)/default.sdc
26 SDCFILE=default.sdc
27 BITGEN=$(GRLIB)/boards/$(BOARD)/default.ut
28 CLEAN=soft-clean
29 VCOMOPT=-explicit
30 TECHLIBS = secureip unisim
31
32 LIBSKIP = core1553bbc core1553brm core1553brt gr1553 corePCIF \
33 tmtc openchip cypress ihp gleichmann gsi fmf spansion
34 DIRSKIP = b1553 pcif leon2 leon2ft crypto satcan pci leon3ft ambatest \
35 leon4 leon4b64 l2cache gr1553b iommu haps ascs slink coremp7 pwm \
36 ac97 hcan usb
37 DIRADD =
38 FILEADD =
39 FILESKIP = grcan.vhd ddr2.v mobile_ddr.v
40
41 include $(GRLIB)/bin/Makefile
42 include $(GRLIB)/software/leon3/Makefile
43
44
45 ################## project specific targets ##########################
46
47
@@ -0,0 +1,209
1 This leon3 design is tailored to the Xilinx SP605 Spartan6 board
2
3 Simulation and synthesis
4 ------------------------
5
6 The design uses the Xilinx MIG memory interface with an AHB-2.0
7 interface. The MIG source code cannot be distributed due to the
8 prohibitive Xilinx license, so the MIG must be re-generated with
9 coregen before simulation and synthesis can be done.
10
11 To generate the MIG and install tne Xilinx unisim simulation
12 library, do as follows:
13
14 make mig
15 make install-secureip
16
17 This will ONLY work with ISE-13.2 installed, and the XILINX variable
18 properly set in the shell. To synthesize the design, do
19
20 make ise
21
22 and then
23
24 make ise-prog-fpga
25
26 to program the FPGA.
27
28 Design specifics
29 ----------------
30
31 * System reset is mapped to the CPU RESET button
32
33 * The AHB and processor is clocked by a 60 MHz clock, generated
34 from the 33 MHz SYSACE clock using a DCM. You can change the frequency
35 generation in the clocks menu of xconfig. The DDR3 (MIG) controller
36 runs at 667 MHz.
37
38 * The GRETH core is enabled and runs without problems at 100 Mbit.
39 Ethernet debug link is enabled and has IP 192.168.0.51.
40 1 Gbit operation is also possible (requires grlib com release),
41 uncomment related timing constraints in the leon3mp.ucf first.
42
43 * 16-bit flash prom can be read at address 0. It can be programmed
44 with GRMON version 1.1.16 or later.
45
46 * DDR3 is working with the provided Xilinx MIG DDR3 controller.
47 If you want to simulate this design, first install the secure
48 IP models with:
49
50 make install-secureip
51
52 Then rebuild the scripts and simulation model:
53
54 make distclean vsim
55
56 Modelsim v6.6e or newer is required to build the secure IP models.
57 Note that the regular leon3 test bench cannot be run in simulation
58 as the DDR3 model lacks data pre-load.
59
60 * The application UART1 is connected to the USB/UART connector
61
62 * The SVGA frame buffer uses a separate port on the DDR3 controller,
63 and therefore does not noticeably affect the performance of the processor.
64 Default output is analog VGA, to switch to DVI mode execute this
65 command in grmon:
66
67 i2c dvi init_l4itx_vga
68
69 * The JTAG DSU interface is enabled and accesible via the USB/JTAG port.
70 Start grmon with -xilusb to connect.
71
72 * Output from GRMON is:
73
74 $ grmon -xilusb -u
75
76 GRMON LEON debug monitor v1.1.51 professional version (debug)
77
78 Copyright (C) 2004-2011 Aeroflex Gaisler - all rights reserved.
79 For latest updates, go to http://www.gaisler.com/
80 Comments or bug-reports to support@gaisler.com
81
82 Xilinx cable: Cable type/rev : 0x3
83 JTAG chain: xc6slx45t xccace
84
85 GRLIB build version: 4111
86
87 initialising ...............
88 detected frequency: 50 MHz
89 SRAM waitstates: 1
90
91 Component Vendor
92 LEON3 SPARC V8 Processor Gaisler Research
93 AHB Debug JTAG TAP Gaisler Research
94 GR Ethernet MAC Gaisler Research
95 LEON2 Memory Controller European Space Agency
96 AHB/APB Bridge Gaisler Research
97 LEON3 Debug Support Unit Gaisler Research
98 Xilinx MIG DDR2 controller Gaisler Research
99 AHB/APB Bridge Gaisler Research
100 Generic APB UART Gaisler Research
101 Multi-processor Interrupt Ctrl Gaisler Research
102 Modular Timer Unit Gaisler Research
103 SVGA Controller Gaisler Research
104 AMBA Wrapper for OC I2C-master Gaisler Research
105 General purpose I/O port Gaisler Research
106 AHB status register Gaisler Research
107
108 Use command 'info sys' to print a detailed report of attached cores
109
110 grlib> inf sys
111 00.01:003 Gaisler Research LEON3 SPARC V8 Processor (ver 0x0)
112 ahb master 0
113 01.01:01c Gaisler Research AHB Debug JTAG TAP (ver 0x1)
114 ahb master 1
115 02.01:01d Gaisler Research GR Ethernet MAC (ver 0x0)
116 ahb master 2, irq 12
117 apb: 80000e00 - 80000f00
118 Device index: dev0
119 edcl ip 192.168.1.51, buffer 2 kbyte
120 00.04:00f European Space Agency LEON2 Memory Controller (ver 0x1)
121 ahb: 00000000 - 20000000
122 apb: 80000000 - 80000100
123 16-bit prom @ 0x00000000
124 01.01:006 Gaisler Research AHB/APB Bridge (ver 0x0)
125 ahb: 80000000 - 80100000
126 02.01:004 Gaisler Research LEON3 Debug Support Unit (ver 0x1)
127 ahb: 90000000 - a0000000
128 AHB trace 256 lines, 32-bit bus, stack pointer 0x47fffff0
129 CPU#0 win 8, hwbp 2, itrace 256, V8 mul/div, srmmu, lddel 1
130 icache 2 * 8 kbyte, 32 byte/line rnd
131 dcache 2 * 4 kbyte, 16 byte/line rnd
132 04.01:06b Gaisler Research Xilinx MIG DDR2 controller (ver 0x0)
133 ahb: 40000000 - 48000000
134 apb: 80100000 - 80100100
135 DDR2: 128 Mbyte
136 0d.01:006 Gaisler Research AHB/APB Bridge (ver 0x0)
137 ahb: 80100000 - 80200000
138 01.01:00c Gaisler Research Generic APB UART (ver 0x1)
139 irq 2
140 apb: 80000100 - 80000200
141 baud rate 38343, DSU mode (FIFO debug)
142 02.01:00d Gaisler Research Multi-processor Interrupt Ctrl (ver 0x3)
143 apb: 80000200 - 80000300
144 03.01:011 Gaisler Research Modular Timer Unit (ver 0x0)
145 irq 8
146 apb: 80000300 - 80000400
147 8-bit scaler, 2 * 32-bit timers, divisor 50
148 06.01:063 Gaisler Research SVGA Controller (ver 0x0)
149 apb: 80000600 - 80000700
150 clk0: 50.00 MHz
151 09.01:028 Gaisler Research AMBA Wrapper for OC I2C-master (ver 0x3)
152 irq 14
153 apb: 80000900 - 80000a00
154 0a.01:01a Gaisler Research General purpose I/O port (ver 0x1)
155 apb: 80000a00 - 80000b00
156 0f.01:052 Gaisler Research AHB status register (ver 0x0)
157 irq 7
158 apb: 80000f00 - 80001000
159 grlib> fla
160
161 Intel-style 16-bit flash on D[31:16]
162
163 Manuf. Intel
164 Device Strataflash P30
165
166 Device ID 02e44603e127ffff
167 User ID ffffffffffffffff
168
169
170 1 x 32 Mbyte = 32 Mbyte total @ 0x00000000
171
172
173 CFI info
174 flash family : 1
175 flash size : 256 Mbit
176 erase regions : 2
177 erase blocks : 259
178 write buffer : 1024 bytes
179 lock-down : yes
180 region 0 : 255 blocks of 128 Kbytes
181 region 1 : 4 blocks of 32 Kbytes
182
183 grlib> lo ~/ibm/src/bench/leonbench/coremark.exe
184 section: .text at 0x40000000, size 102544 bytes
185 section: .data at 0x40019090, size 2788 bytes
186 total size: 105332 bytes (1.2 Mbit/s)
187 read 272 symbols
188 entry point: 0x40000000
189 grlib> run
190 2K performance run parameters for coremark.
191 CoreMark Size : 666
192 Total ticks : 19945918
193 Total time (secs): 19.945918
194 Iterations/Sec : 100.271143
195 Iterations : 2000
196 Compiler version : GCC4.4.2
197 Compiler flags : -O3 -mv8 -funroll-loops -fgcse-sm -combine -DPERFORMANCE_RUN=1 -mcpu=v8 -msoft-float
198 Memory location : STACK
199 seedcrc : 0xe9f5
200 [0]crclist : 0xe714
201 [0]crcmatrix : 0x1fd7
202 [0]crcstate : 0x8e3a
203 [0]crcfinal : 0x4983
204 Correct operation validated. See readme.txt for run and reporting rules.
205 CoreMark 1.0 : 100.271143 / GCC4.4.2 -O3 -mv8 -funroll-loops -fgcse-sm -combine -DPERFORMANCE_RUN=1 -mcpu=v8 -msoft-float / Stack
206
207 Program exited normally.
208 grlib>
209
This diff has been collapsed as it changes many lines, (1030 lines changed) Show them Hide them
@@ -0,0 +1,1030
1
2
3 Prompt for target technology
4 CONFIG_SYN_INFERRED
5 Selects the target technology for memory and pads.
6 The following are available:
7
8 - Inferred: Generic FPGA or ASIC targets if your synthesis tool
9 is capable of inferring RAMs and pads automatically.
10
11 - Actel ProAsic/P/3, IGLOO and Axcelerator FPGAs
12 - Aeroflex UT25CRH Rad-Hard 0.25 um CMOS
13 - Altera: Most Altera FPGA families
14 - Altera-Stratix: Altera Stratix FPGA family
15 - Altera-StratixII: Altera Stratix-II FPGA family
16 - ATC18: Atmel-Nantes 0.18 um rad-hard CMOS
17 - IHP25: IHP 0.25 um CMOS
18 - IHP25RH: IHP Rad-Hard 0.25 um CMOS
19 - Lattice : EC/ECP/XP FPGAs
20 - Quicklogic : Eclipse/E/II FPGAs
21 - UMC-0.18 : UMC 0.18 um CMOS with Virtual Silicon libraries
22 - Xilinx-Spartan/2/3: Xilinx Spartan/2/3 libraries
23 - Xilinx-Spartan3E: Xilinx Spartan3E libraries
24 - Xilinx-Virtex/E: Xilinx Virtex/E libraries
25 - Xilinx-Virtex2/4/5: Xilinx Virtex2/4/5 libraries
26
27
28 Ram library
29 CONFIG_MEM_VIRAGE
30 Select RAM generators for ASIC targets.
31
32 Infer ram
33 CONFIG_SYN_INFER_RAM
34 Say Y here if you want the synthesis tool to infer your
35 RAM automatically. Say N to directly instantiate technology-
36 specific RAM cells for the selected target technology package.
37
38 Infer pads
39 CONFIG_SYN_INFER_PADS
40 Say Y here if you want the synthesis tool to infer pads.
41 Say N to directly instantiate technology-specific pads from
42 the selected target technology package.
43
44 No async reset
45 CONFIG_SYN_NO_ASYNC
46 Say Y here if you disable asynchronous reset in some of the IP cores.
47 Might be necessary if the target library does not have cells with
48 asynchronous set/reset.
49
50 Scan support
51 CONFIG_SYN_SCAN
52 Say Y here to enable scan support in some cores. This will enable
53 the scan support generics where available and add logic to make
54 the design testable using full-scan.
55
56 Use Virtex CLKDLL for clock synchronisation
57 CONFIG_CLK_INFERRED
58 Certain target technologies include clock generators to scale or
59 phase-adjust the system and SDRAM clocks. This is currently supported
60 for Xilinx, Altera and Proasic3 FPGAs. Depending on technology, you
61 can select to use the Xilinx CKLDLL macro (Virtex, VirtexE, Spartan1/2),
62 the Xilinx DCM (Virtex-2, Spartan3, Virtex-4), the Altera ALTDLL
63 (Stratix, Cyclone), or the Proasic3 PLL. Choose the 'inferred'
64 option to skip a clock generator.
65
66 Clock multiplier
67 CONFIG_CLK_MUL
68 When using the Xilinx DCM or Altera ALTPLL, the system clock can
69 be multiplied with a factor of 2 - 32, and divided by a factor of
70 1 - 32. This makes it possible to generate almost any desired
71 processor frequency. When using the Xilinx CLKDLL generator,
72 the resulting frequency scale factor (mul/div) must be one of
73 1/2, 1 or 2. On Proasic3, the factor can be 1 - 128.
74
75 WARNING: The resulting clock must be within the limits specified
76 by the target FPGA family.
77
78 Clock divider
79 CONFIG_CLK_DIV
80 When using the Xilinx DCM or Altera ALTPLL, the system clock can
81 be multiplied with a factor of 2 - 32, and divided by a factor of
82 1 - 32. This makes it possible to generate almost any desired
83 processor frequency. When using the Xilinx CLKDLL generator,
84 the resulting frequency scale factor (mul/div) must be one of
85 1/2, 1 or 2. On Proasic3, the factor can be 1 - 128.
86
87 WARNING: The resulting clock must be within the limits specified
88 by the target FPGA family.
89
90 Output clock divider
91 CONFIG_OCLK_DIV
92 When using the Proasic3 PLL, the system clock is generated by three
93 parameters: input clock multiplication, input clock division and
94 output clock division. Only certain values of these parameters
95 are allowed, but unfortunately this is not documented by Actel.
96 To find the correct values, run the Libero Smartgen tool and
97 insert you desired input and output clock frequencies in the
98 Static PLL configurator. The mul/div factors can then be read
99 out from tool.
100
101 Output clock divider, 2nd clock
102 CONFIG_OCLKB_DIV
103 See help for 'Ouput division factor'. Set this to 0 to disable the
104 second clock output.
105
106 Output clock divider, 3rd clock
107 CONFIG_OCLKC_DIV
108 See help for 'Ouput division factor'. Set this to 0 to disable the
109 third clock output.
110
111 System clock multiplier
112 CONFIG_CLKDLL_1_2
113 The Xilinx CLKDLL can scale the input clock with a factor of 0.5, 1.0,
114 or 2.0. Useful when the target board has an oscillator with a too high
115 (or low) frequency for your design. The divided clock will be used as the
116 main clock for the whole processor (except PCI and ethernet clocks).
117
118 System clock multiplier
119 CONFIG_DCM_2_3
120 The Xilinx DCM and Altera ALTDLL can scale the input clock with a large
121 range of factors. Useful when the target board has an oscillator with a
122 too high (or low) frequency for your design. The divided clock will
123 be used as the main clock for the whole processor (except PCI and
124 ethernet clocks). NOTE: the resulting frequency must be at least
125 24 MHz or the DCM and ALTDLL might not work.
126
127 Enable CLKDLL for PCI clock
128 CONFIG_PCI_CLKDLL
129 Say Y here to re-synchronize the PCI clock using a
130 Virtex BUFGDLL macro. Will improve PCI clock-to-output
131 delays on the expense of input-setup requirements.
132
133 Use PCI clock system clock
134 CONFIG_PCI_SYSCLK
135 Say Y here to the PCI clock to generate the system clock.
136 The PCI clock can be scaled using the DCM or CLKDLL to
137 generate a suitable processor clock.
138
139 External SDRAM clock feedback
140 CONFIG_CLK_NOFB
141 Say Y here to disable the external clock feedback to synchronize the
142 SDRAM clock. This option is necessary if your board or design does not
143 have an external clock feedback that is connected to the pllref input
144 of the clock generator.
145
146 Number of processors
147 CONFIG_PROC_NUM
148 The number of processor cores. The LEON3MP design can accomodate
149 up to 4 LEON3 processor cores. Use 1 unless you know what you are
150 doing ...
151
152 Number of SPARC register windows
153 CONFIG_IU_NWINDOWS
154 The SPARC architecture (and LEON) allows 2 - 32 register windows.
155 However, any number except 8 will require that you modify and
156 recompile your run-time system or kernel. Unless you know what
157 you are doing, use 8.
158
159 SPARC V8 multiply and divide instruction
160 CONFIG_IU_V8MULDIV
161 If you say Y here, the SPARC V8 multiply and divide instructions
162 will be implemented. The instructions are: UMUL, UMULCC, SMUL,
163 SMULCC, UDIV, UDIVCC, SDIV, SDIVCC. In code containing frequent
164 integer multiplications and divisions, significant performance
165 increase can be achieved. Emulated floating-point operations will
166 also benefit from this option.
167
168 By default, the gcc compiler does not emit multiply or divide
169 instructions and your code must be compiled with -mv8 to see any
170 performance increase. On the other hand, code compiled with -mv8
171 will generate an illegal instruction trap when executed on processors
172 with this option disabled.
173
174 The divider consumes approximately 2 kgates, the multiplier 6 kgates.
175
176 Multiplier latency
177 CONFIG_IU_MUL_LATENCY_2
178 Implementation options for the integer multiplier.
179
180 Type Implementation issue-rate/latency
181 2-clocks 32x32 pipelined multiplier 1/2
182 4-clocks 16x16 standard multiplier 4/4
183 5-clocks 16x16 pipelined multiplier 4/5
184
185 MAC operation
186 CONFIG_IU_MUL_MAC
187 If you say Y here, the SPARC V8e UMAC/SMAC (multiply-accumulate)
188 instructions will be enabled. The instructions implement a
189 single-cycle 16x16->32 bits multiply with a 40-bits accumulator.
190 The details of these instructions can be found in the LEON manual,
191 This option is only available when 16x16 multiplier is used.
192
193 Multiplier structure
194 CONFIG_IU_MUL_INFERRED
195 Structure options for the integer multiplier. The multiplier
196 can be implemented with the following structures:
197
198 * Inferred by the synthesis tool
199 * Generated using Module Generators from NTNU
200 * Using technology specific netlists (TechSpec)
201 * Using Synopsys Designware (DW02_mult and DW_mult_pipe)
202
203 Branch prediction
204 CONFIG_IU_BP
205 Enabling branch prediction will improve performance with
206 up to 20%, depending on application. The timing and area
207 overhead are minor, so it is recommended to always enable
208 this option.
209
210 Single vector trapping
211 CONFIG_IU_SVT
212 Single-vector trapping is a SPARC V8e option to reduce code-size
213 in small applications. If enabled, the processor will jump to
214 the address of trap 0 (tt = 0x00) for all traps. No trap table
215 is then needed. The trap type is present in %psr.tt and must
216 be decoded by the O/S. Saves 4 Kbyte of code, but increases
217 trap and interrupt overhead. Currently, the only O/S supporting
218 this option is eCos. To enable SVT, the O/S must also set bit 13
219 in %asr17.
220
221 Load latency
222 CONFIG_IU_LDELAY
223 Defines the pipeline load delay (= pipeline cycles before the data
224 from a load instruction is available for the next instruction).
225 One cycle gives best performance, but might create a critical path
226 on targets with slow (data) cache memories. A 2-cycle delay can
227 improve timing but will reduce performance with about 5%.
228
229 Reset address
230 CONFIG_IU_RSTADDR
231 By default, a SPARC processor starts execution at address 0.
232 With this option, any 4-kbyte aligned reset start address can be
233 choosen. Keep at 0 unless you really know what you are doing.
234
235 No tagged arithmetic
236 CONFIG_NOTAG
237 Say Y here to disable tagged arithmetic and the CASA instructions.
238 This will save some area in minimal systems that do not need
239 these features.
240
241 Power-down
242 CONFIG_PWD
243 Say Y here to enable the power-down feature of the processor.
244 Might reduce the maximum frequency slightly on FPGA targets.
245 For details on the power-down operation, see the LEON3 manual.
246
247 Hardware watchpoints
248 CONFIG_IU_WATCHPOINTS
249 The processor can have up to 4 hardware watchpoints, allowing to
250 create both data and instruction breakpoints at any memory location,
251 also in PROM. Each watchpoint will use approximately 500 gates.
252 Use 0 to disable the watchpoint function.
253
254 Floating-point enable
255 CONFIG_FPU_ENABLE
256 Say Y here to enable the floating-point interface for the MEIKO
257 or GRFPU. Note that no FPU's are provided with the GPL version
258 of GRLIB. Both the Gaisler GRFPU and the Meiko FPU are commercial
259 cores and must be obtained separately.
260
261 FPU selection
262 CONFIG_FPU_GRFPU
263 Select between Gaisler Research's GRFPU and GRFPU-lite FPUs or the Sun
264 Meiko FPU core. All cores are fully IEEE-754 compatible and support
265 all SPARC FPU instructions.
266
267 GRFPU Multiplier
268 CONFIG_FPU_GRFPU_INFMUL
269 On FPGA targets choose inferred multiplier. For ASIC implementations
270 choose between Synopsys Design Ware (DW) multiplier or Module
271 Generator (ModGen) multiplier. The DW multiplier gives better results
272 (smaller area and better timing) but requires a DW license.
273 The ModGen multiplier is part of GRLIB and does not require a license.
274 The Technology Specific multiplier option selects a pre-designed
275 multiplier using technology specific macrocells when available, else
276 an inferred multiplier is used.
277
278 Shared GRFPU
279 CONFIG_FPU_GRFPU_SH
280 If enabled multiple CPU cores will share one GRFPU.
281
282 GRFPC Configuration
283 CONFIG_FPU_GRFPC0
284 Configures the GRFPU-LITE controller.
285
286 In simple configuration controller executes FP instructions
287 in parallel with integer instructions. FP operands are fetched
288 in the register file stage and the result is written in the write
289 stage. This option uses least area resources.
290
291 Data forwarding configuration gives ~ 10 % higher FP performance than
292 the simple configuration by adding data forwarding between the pipeline
293 stages.
294
295 Non-blocking controller allows FP load and store instructions to
296 execute in parallel with FP instructions. The performance increase is
297 ~ 20 % for FP applications. This option uses most logic resources and
298 is suitable for ASIC implementations.
299
300 Floating-point netlist
301 CONFIG_FPU_NETLIST
302 Say Y here to use a VHDL netlist of the GRFPU-Lite. This is
303 only available in certain versions of grlib.
304
305 Enable Instruction cache
306 CONFIG_ICACHE_ENABLE
307 The instruction cache should always be enabled to allow
308 maximum performance. Some low-end system might want to
309 save area and disable the cache, but this will reduce
310 the performance with a factor of 2 - 3.
311
312 Enable Data cache
313 CONFIG_DCACHE_ENABLE
314 The data cache should always be enabled to allow
315 maximum performance. Some low-end system might want to
316 save area and disable the cache, but this will reduce
317 the performance with a factor of 2 at least.
318
319 Instruction cache associativity
320 CONFIG_ICACHE_ASSO1
321 The instruction cache can be implemented as a multi-way cache with
322 1 - 4 ways. Higher associativity usually increases the cache hit
323 rate and thereby the performance. The downside is higher power
324 consumption and increased gate-count for tag comparators.
325
326 Note that a 1-way cache is effectively a direct-mapped cache.
327
328 Instruction cache way size
329 CONFIG_ICACHE_SZ1
330 The size of each way in the instuction cache (kbytes). Valid values
331 are 1 - 64 in binary steps. Note that the full range is only supported
332 by the generic and virtex2 targets. Most target packages are limited
333 to 2 - 16 kbyte. Large way size gives higher performance but might
334 affect the maximum frequency (on ASIC targets). The total instruction
335 cache size is the number of way multiplied with the way size.
336
337 Instruction cache line size
338 CONFIG_ICACHE_LZ16
339 The instruction cache line size. Can be set to either 16 or 32
340 bytes per line. Instruction caches typically benefit from larger
341 line sizes, but on small caches it migh be better with 16 bytes/line
342 to limit eviction miss rate.
343
344 Instruction cache replacement algorithm
345 CONFIG_ICACHE_ALGORND
346 Cache replacement algorithm for caches with 2 - 4 ways. The 'random'
347 algorithm selects the way to evict randomly. The least-recently-replaced
348 (LRR) algorithm evicts the way least recently replaced. The least-
349 recently-used (LRU) algorithm evicts the way least recently accessed.
350 The random algorithm uses a simple 1- or 2-bit counter to select
351 the eviction way and has low area overhead. The LRR scheme uses one
352 extra bit in the tag ram and has therefore also low area overhead.
353 However, the LRR scheme can only be used with 2-way caches. The LRU
354 scheme has typically the best performance but also highest area overhead.
355 A 2-way LRU uses 1 flip-flop per line, a 3-way LRU uses 3 flip-flops
356 per line, and a 4-way LRU uses 5 flip-flops per line to store the access
357 history.
358
359 Instruction cache locking
360 CONFIG_ICACHE_LOCK
361 Say Y here to enable cache locking in the instruction cache.
362 Locking can be done on cache-line level, but will increase the
363 width of the tag ram with one bit. If you don't know what
364 locking is good for, it is safe to say N.
365
366 Data cache associativity
367 CONFIG_DCACHE_ASSO1
368 The data cache can be implemented as a multi-way cache with
369 1 - 4 ways. Higher associativity usually increases the cache hit
370 rate and thereby the performance. The downside is higher power
371 consumption and increased gate-count for tag comparators.
372
373 Note that a 1-way cache is effectively a direct-mapped cache.
374
375 Data cache way size
376 CONFIG_DCACHE_SZ1
377 The size of each way in the data cache (kbytes). Valid values are
378 1 - 64 in binary steps. Note that the full range is only supported
379 by the generic and virtex2 targets. Most target packages are limited
380 to 2 - 16 kbyte. A large cache gives higher performance but the
381 data cache is timing critical an a too large setting might affect
382 the maximum frequency (on ASIC targets). The total data cache size
383 is the number of way multiplied with the way size.
384
385 Data cache line size
386 CONFIG_DCACHE_LZ16
387 The data cache line size. Can be set to either 16 or 32 bytes per
388 line. A smaller line size gives better associativity and higher
389 cache hit rate, but requires a larger tag memory.
390
391 Data cache replacement algorithm
392 CONFIG_DCACHE_ALGORND
393 See the explanation for instruction cache replacement algorithm.
394
395 Data cache locking
396 CONFIG_DCACHE_LOCK
397 Say Y here to enable cache locking in the data cache.
398 Locking can be done on cache-line level, but will increase the
399 width of the tag ram with one bit. If you don't know what
400 locking is good for, it is safe to say N.
401
402 Data cache snooping
403 CONFIG_DCACHE_SNOOP
404 Say Y here to enable data cache snooping on the AHB bus. Is only
405 useful if you have additional AHB masters such as the DSU or a
406 target PCI interface. Note that the target technology must support
407 dual-port RAMs for this option to be enabled. Dual-port RAMS are
408 currently supported on Virtex/2, Virage and Actel targets.
409
410 Data cache snooping implementation
411 CONFIG_DCACHE_SNOOP_FAST
412 The default snooping implementation is 'slow', which works if you
413 don't have AHB slaves in cacheable areas capable of zero-waitstates
414 non-sequential write accesses. Otherwise use 'fast' and suffer a
415 few kgates extra area. This option is currently only needed in
416 multi-master systems with the SSRAM or DDR memory controllers.
417
418 Separate snoop tags
419 CONFIG_DCACHE_SNOOP_SEPTAG
420 Enable a separate memory to store the data tags used for snooping.
421 This is necessary when snooping support is wanted in systems
422 with MMU, typically for SMP systems. In this case, the snoop
423 tags will contain the physical tag address while the normal
424 tags contain the virtual tag address. This option can also be
425 together with the 'fast snooping' option to enable snooping
426 support on technologies without dual-port RAMs. In such case,
427 the snoop tag RAM will be implemented using a two-port RAM.
428
429 Fixed cacheability map
430 CONFIG_CACHE_FIXED
431 If this variable is 0, the cacheable memory regions are defined
432 by the AHB plug&play information (default). To overriden the
433 plug&play settings, this variable can be set to indicate which
434 areas should be cached. The value is treated as a 16-bit hex value
435 with each bit defining if a 256 Mbyte segment should be cached or not.
436 The right-most (LSB) bit defines the cacheability of AHB address
437 0 - 256 MByte, while the left-most bit (MSB) defines AHB address
438 3840 - 4096 MByte. If the bit is set, the corresponding area is
439 cacheable. A value of 00F3 defines address 0 - 0x20000000 and
440 0x40000000 - 0x80000000 as cacheable.
441
442 Local data ram
443 CONFIG_DCACHE_LRAM
444 Say Y here to add a local ram to the data cache controller.
445 Accesses to the ram (load/store) will be performed at 0 waitstates
446 and store data will never be written back to the AHB bus.
447
448 Size of local data ram
449 CONFIG_DCACHE_LRAM_SZ1
450 Defines the size of the local data ram in Kbytes. Note that most
451 technology libraries do not support larger rams than 16 Kbyte.
452
453 Start address of local data ram
454 CONFIG_DCACHE_LRSTART
455 Defines the 8 MSB bits of start address of the local data ram.
456 By default set to 8f (start address = 0x8f000000), but any value
457 (except 0) is possible. Note that the local data ram 'shadows'
458 a 16 Mbyte block of the address space.
459
460 MMU enable
461 CONFIG_MMU_ENABLE
462 Say Y here to enable the Memory Management Unit.
463
464 MMU split icache/dcache table lookaside buffer
465 CONFIG_MMU_COMBINED
466 Select "combined" for a combined icache/dcache table lookaside buffer,
467 "split" for a split icache/dcache table lookaside buffer
468
469 MMU tlb replacement scheme
470 CONFIG_MMU_REPARRAY
471 Select "LRU" to use the "least recently used" algorithm for TLB
472 replacement, or "Increment" for a simple incremental replacement
473 scheme.
474
475 Combined i/dcache tlb
476 CONFIG_MMU_I2
477 Select the number of entries for the instruction TLB, or the
478 combined icache/dcache TLB if such is used.
479
480 Split tlb, dcache
481 CONFIG_MMU_D2
482 Select the number of entries for the dcache TLB.
483
484 Fast writebuffer
485 CONFIG_MMU_FASTWB
486 Only selectable if split tlb is enabled. In case fast writebuffer is
487 enabled the tlb hit will be made concurrent to the cache hit. This
488 leads to higher store performance, but increased power and area.
489
490 MMU pagesize
491 CONFIG_MMU_PAGE_4K
492 The deafult SPARC V8 SRMMU page size is 4 Kbyte. This limits the
493 cache way size to 4 Kbyte, and total data cache size to 16 Kbyte,
494 when the MMU is used. To increase the maximum data cache size,
495 the MMU pages size can be increased to up 32 Kbyte. This will
496 give a maximum data cache size of 128 Kbyte.
497
498 Note that an MMU page size different than 4 Kbyte will require
499 a special linux tool-chain if glibc is used. If you don't know
500 what you are doing, stay with 4 Kbyte ...
501
502 DSU enable
503 CONFIG_DSU_ENABLE
504 The debug support unit (DSU) allows non-intrusive debugging and tracing
505 of both executed instructions and AHB transfers. If you want to enable
506 the DSU, say Y here and select the configuration below.
507
508 Trace buffer enable
509 CONFIG_DSU_TRACEBUF
510 Say Y to enable the trace buffer. The buffer is not necessary for
511 debugging, only for tracing instructions and data transfers.
512
513 Enable instruction tracing
514 CONFIG_DSU_ITRACE
515 If you say Y here, an instruction trace buffer will be implemented
516 in each processor. The trace buffer will trace executed instructions
517 and their results, and place them in a circular buffer. The buffer
518 can be read out by any AHB master, and in particular by the debug
519 communication link.
520
521 Size of trace buffer
522 CONFIG_DSU_ITRACESZ1
523 Select the buffer size (in kbytes) for the instruction trace buffer.
524 Each line in the buffer needs 16 bytes. A 128-entry buffer will thus
525 need 2 kbyte.
526
527 Enable AHB tracing
528 CONFIG_DSU_ATRACE
529 If you say Y here, an AHB trace buffer will be implemented in the
530 debug support unit processor. The AHB buffer will trace all transfers
531 on the AHB bus and save them in a circular buffer. The trace buffer
532 can be read out by any AHB master, and in particular by the debug
533 communication link.
534
535 Size of trace buffer
536 CONFIG_DSU_ATRACESZ1
537 Select the buffer size (in kbytes) for the AHB trace buffer.
538 Each line in the buffer needs 16 bytes. A 128-entry buffer will thus
539 need 2 kbyte.
540
541
542 LEON3FT enable
543 CONFIG_LEON3FT_EN
544 Say Y here to use the fault-tolerant LEON3FT core instead of the
545 standard non-FT LEON3.
546
547 IU Register file protection
548 CONFIG_IUFT_NONE
549 Select the FT implementation in the LEON3FT integer unit
550 register file. The options include parity, parity with
551 sparing, 7-bit BCH and TMR.
552
553 FPU Register file protection
554 CONFIG_FPUFT_EN
555 Say Y to enable SEU protection of the FPU register file.
556 The GRFPU will be protected using 8-bit parity without restart, while
557 the GRFPU-Lite will be protected with 4-bit parity with restart. If
558 disabled the FPU register file will be implemented using flip-flops.
559
560 Cache memory error injection
561 CONFIG_RF_ERRINJ
562 Say Y here to enable error injection in to the IU/FPU regfiles.
563 Affects only simulation.
564
565 Cache memory protection
566 CONFIG_CACHE_FT_EN
567 Enable SEU error-correction in the cache memories.
568
569 Cache memory error injection
570 CONFIG_CACHE_ERRINJ
571 Say Y here to enable error injection in to the cache memories.
572 Affects only simulation.
573
574 Leon3ft netlist
575 CONFIG_LEON3_NETLIST
576 Say Y here to use a VHDL netlist of the LEON3FT. This is
577 only available in certain versions of grlib.
578
579 IU assembly printing
580 CONFIG_IU_DISAS
581 Enable printing of executed instructions to the console.
582
583 IU assembly printing in netlist
584 CONFIG_IU_DISAS_NET
585 Enable printing of executed instructions to the console also
586 when simulating a netlist. NOTE: with this option enabled, it
587 will not be possible to pass place&route.
588
589 32-bit program counters
590 CONFIG_DEBUG_PC32
591 Since the LSB 2 bits of the program counters always are zero, they are
592 normally not implemented. If you say Y here, the program counters will
593 be implemented with full 32 bits, making debugging of the VHDL model
594 much easier. Turn of this option for synthesis or you will be wasting
595 area.
596 CONFIG_AHB_DEFMST
597 Sets the default AHB master (see AMBA 2.0 specification for definition).
598 Should not be set to a value larger than the number of AHB masters - 1.
599 For highest processor performance, leave it at 0.
600
601 Default AHB master
602 CONFIG_AHB_RROBIN
603 Say Y here to enable round-robin arbitration of the AHB bus. A N will
604 select fixed priority, with the master with the highest bus index having
605 the highest priority.
606
607 Support AHB split-transactions
608 CONFIG_AHB_SPLIT
609 Say Y here to enable AHB split-transaction support in the AHB arbiter.
610 Unless you actually have an AHB slave that can generate AHB split
611 responses, say N and save some gates.
612
613 Default AHB master
614 CONFIG_AHB_IOADDR
615 Selects the MSB adddress (HADDR[31:20]) of the AHB IO area, as defined
616 in the plug&play extentions of the AMBA bus. Should be kept to FFF
617 unless you really know what you are doing.
618
619 APB bridge address
620 CONFIG_APB_HADDR
621 Selects the MSB adddress (HADDR[31:20]) of the APB bridge. Should be
622 kept at 800 for software compatibility.
623
624 AHB monitor
625 CONFIG_AHB_MON
626 Say Y to enable the AHB bus monitor. The monitor will check for
627 illegal AHB transactions during simulation. It has no impact on
628 synthesis.
629
630 Report AHB errors
631 CONFIG_AHB_MONERR
632 Print out detected AHB violations on console.
633
634 Report AHB warnings
635 CONFIG_AHB_MONWAR
636 Print out detected AHB warnings on console.
637
638 Write trace to console
639 CONFIG_AHB_DTRACE
640 Say yes here to write a trace of all AHB transfers to the
641 simulator console. Has not impact on final netlist.
642
643 JTAG Enable
644 CONFIG_DSU_JTAG
645 Say Y to enable the JTAG debug link (JTAG-to-AHB). Debugging is done
646 with GRMON through the boards JTAG chain at speeds of up to 800 kbits/s.
647
648 The TAP controller can be implemented in custom macros on
649 Altera, Actel Proasic/3 and Xilinx devices. The commercial
650 GRLIB also includes a generic TAP controller in VHDL.
651
652 Supported JTAG cables are Xilinx Parallel Cable III and IV,
653 Xilinx Platform cables (USB), and Altera parallel and USB cables,
654 Amontech JTAG key, various FTDI chip based USB/JTAG devices, and
655 Actel Flash Pro 3/4 cable.
656
657 Ethernet DSU enable
658 CONFIG_DSU_ETH
659 Say Y to enable the Ethernet Debug Communication Link (EDCL). The link
660 provides a DSU gateway between ethernet and the AHB bus. Debugging is
661 done at 10 or 100 Mbit/s, using the GRMON debug monitor. You must
662 enable the GRETH Ethernet MAC for this option to become active.
663
664 Size of EDCL trace buffer
665 CONFIG_DSU_ETHSZ1
666 Select the buffer size (in kbytes) for the EDCL. 1 or 2 kbyte is
667 usually enough, while a larger buffer will increase the transfer rate.
668 When operating at 100 Mbit, use a buffer size of at least 8 kbyte for
669 maximum throughput.
670
671 MSB IP address
672 CONFIG_DSU_IPMSB
673 Set the MSB 16 bits of the IP address of the EDCL.
674
675 LSB IP address
676 CONFIG_DSU_IPLSB
677 Set the LSB 16 bits of the IP address of the EDCL.
678
679 MSB ethernet address
680 CONFIG_DSU_ETHMSB
681 Set the MSB 24 bits of the ethernet address of the EDCL.
682
683 LSB ethernet address
684 CONFIG_DSU_ETHLSB
685 Set the LSB 24 bits of the ethernet address of the EDCL.
686
687 Programmable MAC/IP address
688 CONFIG_DSU_ETH_PROG
689 Say Y to make the LSB 4 bits of the EDCL MAC and IP address
690 configurable using the ethi.edcladdr inputs.
691 Leon2 memory controller
692 CONFIG_MCTRL_LEON2
693 Say Y here to enable the LEON2 memory controller. The controller
694 can access PROM, I/O, SRAM and SDRAM. The bus width for PROM
695 and SRAM is programmable to 8-, 16- or 32-bits.
696
697 8-bit memory support
698 CONFIG_MCTRL_8BIT
699 If you say Y here, the PROM/SRAM memory controller will support
700 8-bit mode, i.e. operate from 8-bit devices as if they were 32-bit.
701 Say N to save a few hundred gates.
702
703 16-bit memory support
704 CONFIG_MCTRL_16BIT
705 If you say Y here, the PROM/SRAM memory controller will support
706 16-bit mode, i.e. operate from 16-bit devices as if they were 32-bit.
707 Say N to save a few hundred gates.
708
709 Write strobe feedback
710 CONFIG_MCTRL_WFB
711 If you say Y here, the PROM/SRAM write strobes (WRITEN, WEN) will
712 be used to enable the data bus drivers during write cycles. This
713 will guarantee that the data is still valid on the rising edge of
714 the write strobe. If you say N, the write strobes and the data bus
715 drivers will be clocked on the rising edge, potentially creating
716 a hold time problem in external memory or I/O. However, in all
717 practical cases, there is enough capacitance in the data bus lines
718 to keep the value stable for a few (many?) nano-seconds after the
719 buffers have been disabled, making it safe to say N and remove a
720 combinational path in the netlist that might be difficult to
721 analyze.
722
723 Write strobe feedback
724 CONFIG_MCTRL_5CS
725 If you say Y here, the 5th (RAMSN[4]) SRAM chip select signal will
726 be enabled. If you don't intend to use it, say N and save some gates.
727
728 SDRAM controller enable
729 CONFIG_MCTRL_SDRAM
730 Say Y here to enabled the PC100/PC133 SDRAM controller. If you don't
731 intend to use SDRAM, say N and save about 1 kgates.
732
733 SDRAM controller inverted clock
734 CONFIG_MCTRL_SDRAM_INVCLK
735 If you say Y here, the SDRAM controller output signals will be delayed
736 with 1/2 clock in respect to the SDRAM clock. This will allow the used
737 of an SDRAM clock which in not strictly in phase with the internal
738 clock. This option will limit the SDRAM frequency to 40 - 50 MHz.
739
740 On FPGA targets without SDRAM clock synchronizations through PLL/DLL,
741 say Y. On ASIC targets, say N and tell your foundry to balance the
742 SDRAM clock output.
743
744 SDRAM separate address buses
745 CONFIG_MCTRL_SDRAM_SEPBUS
746 Say Y here if your SDRAM is connected through separate address
747 and data buses (SA & SD). This is the case on the GR-CPCI-XC2V6000
748 board, but not on the GR-PCI-XC2V3000 or Avnet XCV1500E boards.
749
750 64-bit data bus
751 CONFIG_MCTRL_SDRAM_BUS64
752 Say Y here to enable 64-bit SDRAM data bus.
753
754 Page burst enable
755 CONFIG_MCTRL_PAGE
756 Say Y here to enable SDRAM page burst operation. This will implement
757 read operations using page bursts rather than 8-word bursts and save
758 about 500 gates (100 LUTs). Note that not all SDRAM supports page
759 burst, so use this option with care.
760
761 Programmable page burst enable
762 CONFIG_MCTRL_PROGPAGE
763 Say Y here to enable programmable SDRAM page burst operation. This
764 will allow to dynamically enable/disable page burst by setting
765 bit 17 in MCFG2.
766
767 AHB status register
768 CONFIG_AHBSTAT_ENABLE
769 Say Y here to enable the AHB status register (AHBSTAT IP).
770 The register will latch the AHB address and master index when
771 an error response is returned by any AHB slave.
772
773 SDRAM separate address buses
774 CONFIG_AHBSTAT_NFTSLV
775 The AHB status register can also latch the AHB address on an external
776 input. Select here how many of such inputs are required.
777
778 On-chip rom
779 CONFIG_AHBROM_ENABLE
780 Say Y here to add a block on on-chip rom to the AHB bus. The ram
781 provides 0-waitstates read access, burst support, and 8-, 16-
782 and 32-bit data size. The rom will be syntheised into block rams
783 on Xilinx and Altera FPGA devices, and into gates on ASIC
784 technologies. GRLIB includes a utility to automatically create
785 the rom VHDL model (ahbrom.vhd) from an ELF file. Refer to the GRLIB
786 documentation for details.
787
788 On-chip rom address
789 CONFIG_AHBROM_START
790 Set the start address of AHB ROM (HADDR[31:20]). The ROM will occupy
791 a 1 Mbyte slot at the selected address. Default is 000, corresponding
792 to AHB address 0x00000000. When address 0x0 is selected, the rom area
793 of any other memory controller is set to 0x10000000 to avoid conflicts.
794
795 Enable pipeline register for on-chip rom
796 CONFIG_AHBROM_PIPE
797 Say Y here to add a data pipeline register to the on-chip rom.
798 This should be done when the rom is implemenented in (ASIC) gates,
799 or in logic cells on FPGAs. Do not use this option when the rom is
800 implemented in block rams. If enabled, the rom will operate with
801 one waitstate.
802
803 On-chip ram
804 CONFIG_AHBRAM_ENABLE
805 Say Y here to add a block on on-chip ram to the AHB bus. The ram
806 provides 0-waitstates read access and 0/1 waitstates write access.
807 All AHB burst types are supported, as well as 8-, 16- and 32-bit
808 data size.
809
810 On-chip ram size
811 CONFIG_AHBRAM_SZ1
812 Set the size of the on-chip AHB ram. The ram is infered/instantiated
813 as four byte-wide ram slices to allow byte and half-word write
814 accesses. It is therefore essential that the target package can
815 infer byte-wide rams. This is currently supported on the generic,
816 virtex, virtex2, proasic and axellerator targets.
817
818 On-chip ram address
819 CONFIG_AHBRAM_START
820 Set the start address of AHB RAM (HADDR[31:20]). The RAM will occupy
821 a 1 Mbyte slot at the selected address. Default is A00, corresponding
822 to AHB address 0xA0000000.
823
824 Gaisler Ethernet MAC enable
825 CONFIG_GRETH_ENABLE
826 Say Y here to enable the Gaisler Research Ethernet MAC . The MAC has
827 one AHB master interface to read and write packets to memory, and one
828 APB slave interface for accessing the control registers.
829
830 Gaisler Ethernet 1G MAC enable
831 CONFIG_GRETH_GIGA
832 Say Y here to enable the Gaisler Research 1000 Mbit Ethernet MAC .
833 The 1G MAC is only available in the commercial version of GRLIB,
834 so do NOT enable it if you are using the GPL version.
835
836 CONFIG_GRETH_FIFO4
837 Set the depth of the receive and transmit FIFOs in the MAC core.
838 The MAC core will perform AHB burst read/writes with half the
839 size of the FIFO depth.
840
841
842 UART1 enable
843 CONFIG_UART1_ENABLE
844 Say Y here to enable UART1, or the console UART. This is needed to
845 get any print-out from LEON3 systems regardless of operating system.
846
847 UART1 FIFO
848 CONFIG_UA1_FIFO1
849 The UART has configurable transmitt and receive FIFO's, which can
850 be set to 1 - 32 bytes. Use 1 for minimum area, or 8 - 32 for
851 maximum throughput.
852
853
854 LEON3 interrupt controller
855 CONFIG_IRQ3_ENABLE
856 Say Y here to enable the LEON3 interrupt controller. This is needed
857 if you want to be able to receive interrupts. Operating systems like
858 Linux, RTEMS and eCos needs this option to be enabled. If you intend
859 to use the Bare-C run-time and not use interrupts, you could disable
860 the interrupt controller and save about 500 gates.
861
862 LEON3 interrupt controller broadcast
863 CONFIG_IRQ3_BROADCAST_ENABLE
864 If enabled the broadcast register is used to determine which
865 interrupt should be sent to all cpus instead of just the first
866 one that consumes it.
867
868 Secondary interrupts
869 CONFIG_IRQ3_SEC
870 The interrupt controller handles 15 interrupts by default (1 - 15).
871 These correspond to the 15 SPARC asyncronous traps (0x11 - 0x1F),
872 and AMBA interrupts 1 - 15. This option will enable 16 additional
873 (secondary) interrupts, corresponding to AMBA interrupts 16 - 31.
874 The secondary interrupts will be multiplexed onto one of the first
875 15 interrupts. The total number of handled interrupts can then
876 be up to 30 (14 primary and 16 secondary).
877
878 Number of interrupts
879 CONFIG_IRQ3_NSEC
880 Defines which of the first 15 interrupts should be used for the
881 secondary (16 - 31) interrupts. Interrupt 15 should be avoided
882 since it is not maskable by the processor.
883 Timer module enable
884 CONFIG_GPT_ENABLE
885 Say Y here to enable the Modular Timer Unit. The timer unit consists
886 of one common scaler and up to 7 independent timers. The timer unit
887 is needed for Linux, RTEMS, eCos and the Bare-C run-times.
888
889 Timer module enable
890 CONFIG_GPT_NTIM
891 Set the number of timers in the timer unit (1 - 7).
892
893 Scaler width
894 CONFIG_GPT_SW
895 Set the width if the common pre-scaler (2 - 16 bits). The scaler
896 is used to divide the system clock down to 1 MHz, so 8 bits should
897 be sufficient for most implementations (allows clocks up to 256 MHz).
898
899 Timer width
900 CONFIG_GPT_TW
901 Set the width if the timers (2 - 32 bits). 32 bits is recommended
902 for the Bare-C run-time, lower values (e.g. 16 bits) can work with
903 RTEMS and Linux.
904
905 Timer Interrupt
906 CONFIG_GPT_IRQ
907 Set the interrupt number for the first timer. Remaining timers will
908 have incrementing interrupts, unless the separate-interrupts option
909 below is disabled.
910
911 Watchdog enable
912 CONFIG_GPT_WDOGEN
913 Say Y here to enable the watchdog functionality in the timer unit.
914
915 Watchdog time-out value
916 CONFIG_GPT_WDOG
917 This value will be loaded in the watchdog timer at reset.
918
919 GPIO port
920 CONFIG_GRGPIO_ENABLE
921 Say Y here to enable a general purpose I/O port. The port can be
922 configured from 1 - 32 bits, whith each port signal individually
923 programmable as input or output. The port signals can also serve
924 as interrupt inputs.
925
926 GPIO port witdth
927 CONFIG_GRGPIO_WIDTH
928 Number of bits in the I/O port. Must be in the range of 1 - 32.
929
930 GPIO interrupt mask
931 CONFIG_GRGPIO_IMASK
932 The I/O port interrupt mask defines which bits in the I/O port
933 should be able to create an interrupt.
934
935 Text-mode VGA
936 CONFIG_VGA_ENABLE
937 Say Y here to enable a simple text-mode VGA controller. The controller
938 generate 48x36 characters on a 640x480 pixel screen. The pixel clock
939 is 25 MHz.
940
941 SVGA frame buffer
942 CONFIG_SVGA_ENABLE
943 Say Y here to enable a graphical frame buffer. The frame buffer
944 can be configured up to 1024x768 pixels and 8-, 16- or 32-bit
945 colour depth.
946
947 PS2 KBD interface
948 CONFIG_KBD_ENABLE
949 Say Y here to enable a PS/2 keyboard or mouse interface.
950
951 SPI memory controller
952 CONFIG_SPIMCTRL
953 Say Y here to enable a simple SPI memory controller.
954 The controller maps a SPI memory device into AMBA address space and
955 also has a simple interface that allows sending commands directly
956 to the SPI device.
957
958 SD card support
959 CONFIG_SPIMCTRL_SDCARD
960 Memory device connected to controller is SD card.
961
962 Read command
963 CONFIG_SPIMCTRL_READCMD
964 Read instruction for SPI memory device
965
966 Dummy byte
967 CONFIG_SPIMCTRL_DUMMYBYTE
968 Output dummy byte after address when issuing read instruction.
969
970 Dual output
971 CONFIG_SPIMCTRL_DUALOUTPUT
972 Memory device supports dual output when reading data.
973
974 Clock scaler
975 CONFIG_SPIMCTRL_SCALER
976 Selects the divisor used when dividing the system clock to produce
977 the memory device clock. The divisor used is two to the power of the
978 specified value. This value must be at least 1.
979
980 Alternate clock scaler
981 CONFIG_SPIMCTRL_ASCALER
982 Selects the divisor used when dividing the system clock to produce
983 the alternate memory device clock. If the selected memory device is
984 a SD Card this clock will be used during card initialization. The
985 divisor used is two to the power of the specified value. This
986 value must be at least 1.
987
988 Power-up cnt
989 CONFIG_SPIMCTRL_PWRUPCNT
990 Number of system clock cycles to wait before issuing first command.
991 Gaisler Research SPI controller
992 CONFIG_SPICTRL_ENABLE
993 Say Y here to enable the SPI controller(s)
994
995 CONFIG_SPICTRL_NUM
996 Number of SPI controllers to implement in design. Note that most
997 template designs are limited to one SPI controller.
998 Configuration options made here in xconfig will apply to all
999 implemented SPI controllers.
1000
1001 CONFIG_SPICTRL_MAXWLEN
1002 0: Core will support lengths up to 32 bits
1003 1-2: Illegal values
1004 3-15: Maximum word length will be value+1 (4-16)
1005
1006 CONFIG_SPICTRL_SYNCRAM
1007 Say Y here to use SYNCRAM_2P components for the core's receive
1008 and transmit queues. This is the recommended setting, particularly
1009 if the core is implemented with support for automatic mode.
1010
1011 CONFIG_SPICTRL_FT
1012 Fault-tolerance for internal buffers. Only applicable if core
1013 buffers are implemented with SYNCRAM components.
1014
1015 UART debugging
1016 CONFIG_DEBUG_UART
1017 During simulation, the output from the UARTs is printed on the
1018 simulator console. Since the ratio between the system clock and
1019 UART baud-rate is quite high, simulating UART output will be very
1020 slow. If you say Y here, the UARTs will print a character as soon
1021 as it is stored in the transmitter data register. The transmitter
1022 ready flag will be permanently set, speeding up simulation. However,
1023 the output on the UART tx line will be garbled. Has not impact on
1024 synthesis, but will cause the LEON test bench to fail.
1025
1026 FPU register tracing
1027 CONFIG_DEBUG_FPURF
1028 If you say Y here, all writes to the floating-point unit register file
1029 will be printed on the simulator console.
1030
@@ -0,0 +1,79
1
2 # LEON3 configuration written in linux configuration language
3 #
4 # Written by Jiri Gaisler, Gaisler Research
5 #
6 # Comments and bug reports to jiri@gaisler.com
7 #
8 #
9
10 #define_bool CONFIG_MCTRL_RMW y
11 define_bool CONFIG_LEON3FT_PRESENT y
12 define_bool CONFIG_HAS_SHARED_GRFPU y
13
14 mainmenu_name "LEON3MP Design Configuration"
15
16 mainmenu_option next_comment
17 comment 'Synthesis '
18 source lib/techmap/gencomp/tech.in
19 endmenu
20
21 mainmenu_option next_comment
22 comment 'Clock generation'
23 source lib/techmap/clocks/clkgen.in
24 endmenu
25
26 source lib/gaisler/leon3/leon3.in
27 source lib/grlib/amba/amba.in
28
29 mainmenu_option next_comment
30 comment 'Debug Link '
31 source lib/gaisler/jtag/jtag.in
32 source lib/gaisler/net/edcl.in
33 endmenu
34
35 mainmenu_option next_comment
36 comment 'Peripherals '
37
38 mainmenu_option next_comment
39 comment 'Memory controller '
40 source lib/esa/memoryctrl/mctrl.in
41 source lib/gaisler/ddr/mig.in
42 source lib/gaisler/misc/ahbstat.in
43 endmenu
44
45 mainmenu_option next_comment
46 comment 'On-chip RAM/ROM '
47 source lib/gaisler/misc/ahbrom.in
48 source lib/gaisler/misc/ahbram.in
49 endmenu
50
51 mainmenu_option next_comment
52 comment 'Ethernet '
53 source lib/gaisler/greth/greth.in
54 endmenu
55
56 mainmenu_option next_comment
57 comment 'UART, timer, I/O port and interrupt controller'
58 source lib/gaisler/uart/uart1.in
59 source lib/gaisler/leon3/irqmp.in
60 source lib/gaisler/misc/gptimer.in
61 source lib/gaisler/misc/grgpio.in
62 endmenu
63
64 mainmenu_option next_comment
65 comment 'Keybord and VGA interface'
66 source lib/gaisler/misc/ps2vga.in
67 endmenu
68 mainmenu_option next_comment
69 comment 'SPI'
70 source lib/gaisler/spi/spimctrl.in
71 source lib/gaisler/spi/spictrl.in
72 endmenu
73
74 endmenu
75
76 mainmenu_option next_comment
77 comment 'VHDL Debugging '
78 source lib/grlib/util/debug.in
79 endmenu
@@ -0,0 +1,48
1
2
3
4 -----------------------------------------------------------------------------
5 -- LEON3 Demonstration design test bench configuration
6 -- Copyright (C) 2009 Aeroflex Gaisler
7 ------------------------------------------------------------------------------
8
9
10
11 library techmap;
12 use techmap.gencomp.all;
13
14 library ieee;
15 use ieee.std_logic_1164.all;
16
17 package config is
18 -- Technology and synthesis options
19 constant CFG_FABTECH : integer := spartan6;
20 constant CFG_MEMTECH : integer := spartan6;
21 constant CFG_PADTECH : integer := spartan6;
22 -- Clock generator
23 constant CFG_CLKTECH : integer := spartan6;
24 constant SEND_CONSTANT_DATA : integer := 1;
25 constant SEND_MINF_VALUE : integer := 1;
26
27
28
29 constant WORD0cst : std_logic_vector(15 downto 0) := X"1111";
30 constant WORD1cst : std_logic_vector(15 downto 0) := X"2222";
31 constant WORD2cst : std_logic_vector(15 downto 0) := X"3333";
32 constant WORD3cst : std_logic_vector(15 downto 0) := X"4444";
33 constant WORD4cst : std_logic_vector(15 downto 0) := X"5555";
34 constant WORD5cst : std_logic_vector(15 downto 0) := X"6666";
35 constant WORD6cst : std_logic_vector(15 downto 0) := X"7777";
36 constant WORD7cst : std_logic_vector(15 downto 0) := X"8888";
37 constant WORD8cst : std_logic_vector(15 downto 0) := X"9999";
38 constant WORD9cst : std_logic_vector(15 downto 0) := X"AAAA";
39 constant WORD10cst : std_logic_vector(15 downto 0) := X"BBBB";
40 constant WORD11cst : std_logic_vector(15 downto 0) := X"CCCC";
41 constant WORD12cst : std_logic_vector(15 downto 0) := X"DDDD";
42
43
44 constant LF1cst : std_logic_vector(15 downto 0) := X"1111";
45 constant LF2cst : std_logic_vector(15 downto 0) := X"2222";
46 constant LF3cst : std_logic_vector(15 downto 0) := X"3333";
47
48 end;
@@ -0,0 +1,190
1 -- Technology and synthesis options
2 constant CFG_FABTECH : integer := CONFIG_SYN_TECH;
3 constant CFG_MEMTECH : integer := CFG_RAM_TECH;
4 constant CFG_PADTECH : integer := CFG_PAD_TECH;
5 constant CFG_NOASYNC : integer := CONFIG_SYN_NO_ASYNC;
6 constant CFG_SCAN : integer := CONFIG_SYN_SCAN;
7
8 -- Clock generator
9 constant CFG_CLKTECH : integer := CFG_CLK_TECH;
10 constant CFG_CLKMUL : integer := CONFIG_CLK_MUL;
11 constant CFG_CLKDIV : integer := CONFIG_CLK_DIV;
12 constant CFG_OCLKDIV : integer := CONFIG_OCLK_DIV;
13 constant CFG_OCLKBDIV : integer := CONFIG_OCLKB_DIV;
14 constant CFG_OCLKCDIV : integer := CONFIG_OCLKC_DIV;
15 constant CFG_PCIDLL : integer := CONFIG_PCI_CLKDLL;
16 constant CFG_PCISYSCLK: integer := CONFIG_PCI_SYSCLK;
17 constant CFG_CLK_NOFB : integer := CONFIG_CLK_NOFB;
18
19 -- LEON3 processor core
20 constant CFG_LEON3 : integer := CONFIG_LEON3;
21 constant CFG_NCPU : integer := CONFIG_PROC_NUM;
22 constant CFG_NWIN : integer := CONFIG_IU_NWINDOWS;
23 constant CFG_V8 : integer := CFG_IU_V8 + 4*CFG_IU_MUL_STRUCT;
24 constant CFG_MAC : integer := CONFIG_IU_MUL_MAC;
25 constant CFG_BP : integer := CONFIG_IU_BP;
26 constant CFG_SVT : integer := CONFIG_IU_SVT;
27 constant CFG_RSTADDR : integer := 16#CONFIG_IU_RSTADDR#;
28 constant CFG_LDDEL : integer := CONFIG_IU_LDELAY;
29 constant CFG_NOTAG : integer := CONFIG_NOTAG;
30 constant CFG_NWP : integer := CONFIG_IU_WATCHPOINTS;
31 constant CFG_PWD : integer := CONFIG_PWD*2;
32 constant CFG_FPU : integer := CONFIG_FPU + 16*CONFIG_FPU_NETLIST + 32*CONFIG_FPU_GRFPU_SHARED;
33 constant CFG_GRFPUSH : integer := CONFIG_FPU_GRFPU_SHARED;
34 constant CFG_ICEN : integer := CONFIG_ICACHE_ENABLE;
35 constant CFG_ISETS : integer := CFG_IU_ISETS;
36 constant CFG_ISETSZ : integer := CFG_ICACHE_SZ;
37 constant CFG_ILINE : integer := CFG_ILINE_SZ;
38 constant CFG_IREPL : integer := CFG_ICACHE_ALGORND;
39 constant CFG_ILOCK : integer := CONFIG_ICACHE_LOCK;
40 constant CFG_ILRAMEN : integer := CONFIG_ICACHE_LRAM;
41 constant CFG_ILRAMADDR: integer := 16#CONFIG_ICACHE_LRSTART#;
42 constant CFG_ILRAMSZ : integer := CFG_ILRAM_SIZE;
43 constant CFG_DCEN : integer := CONFIG_DCACHE_ENABLE;
44 constant CFG_DSETS : integer := CFG_IU_DSETS;
45 constant CFG_DSETSZ : integer := CFG_DCACHE_SZ;
46 constant CFG_DLINE : integer := CFG_DLINE_SZ;
47 constant CFG_DREPL : integer := CFG_DCACHE_ALGORND;
48 constant CFG_DLOCK : integer := CONFIG_DCACHE_LOCK;
49 constant CFG_DSNOOP : integer := CONFIG_DCACHE_SNOOP + CONFIG_DCACHE_SNOOP_FAST + 4*CONFIG_DCACHE_SNOOP_SEPTAG;
50 constant CFG_DFIXED : integer := 16#CONFIG_CACHE_FIXED#;
51 constant CFG_DLRAMEN : integer := CONFIG_DCACHE_LRAM;
52 constant CFG_DLRAMADDR: integer := 16#CONFIG_DCACHE_LRSTART#;
53 constant CFG_DLRAMSZ : integer := CFG_DLRAM_SIZE;
54 constant CFG_MMUEN : integer := CONFIG_MMUEN;
55 constant CFG_ITLBNUM : integer := CONFIG_ITLBNUM;
56 constant CFG_DTLBNUM : integer := CONFIG_DTLBNUM;
57 constant CFG_TLB_TYPE : integer := CONFIG_TLB_TYPE + CFG_MMU_FASTWB*2;
58 constant CFG_TLB_REP : integer := CONFIG_TLB_REP;
59 constant CFG_MMU_PAGE : integer := CONFIG_MMU_PAGE;
60 constant CFG_DSU : integer := CONFIG_DSU_ENABLE;
61 constant CFG_ITBSZ : integer := CFG_DSU_ITB;
62 constant CFG_ATBSZ : integer := CFG_DSU_ATB;
63 constant CFG_LEON3FT_EN : integer := CONFIG_LEON3FT_EN;
64 constant CFG_IUFT_EN : integer := CONFIG_IUFT_EN;
65 constant CFG_FPUFT_EN : integer := CONFIG_FPUFT;
66 constant CFG_RF_ERRINJ : integer := CONFIG_RF_ERRINJ;
67 constant CFG_CACHE_FT_EN : integer := CONFIG_CACHE_FT_EN;
68 constant CFG_CACHE_ERRINJ : integer := CONFIG_CACHE_ERRINJ;
69 constant CFG_LEON3_NETLIST: integer := CONFIG_LEON3_NETLIST;
70 constant CFG_DISAS : integer := CONFIG_IU_DISAS + CONFIG_IU_DISAS_NET;
71 constant CFG_PCLOW : integer := CFG_DEBUG_PC32;
72
73 -- AMBA settings
74 constant CFG_DEFMST : integer := CONFIG_AHB_DEFMST;
75 constant CFG_RROBIN : integer := CONFIG_AHB_RROBIN;
76 constant CFG_SPLIT : integer := CONFIG_AHB_SPLIT;
77 constant CFG_AHBIO : integer := 16#CONFIG_AHB_IOADDR#;
78 constant CFG_APBADDR : integer := 16#CONFIG_APB_HADDR#;
79 constant CFG_AHB_MON : integer := CONFIG_AHB_MON;
80 constant CFG_AHB_MONERR : integer := CONFIG_AHB_MONERR;
81 constant CFG_AHB_MONWAR : integer := CONFIG_AHB_MONWAR;
82 constant CFG_AHB_DTRACE : integer := CONFIG_AHB_DTRACE;
83
84 -- JTAG based DSU interface
85 constant CFG_AHB_JTAG : integer := CONFIG_DSU_JTAG;
86
87 -- Ethernet DSU
88 constant CFG_DSU_ETH : integer := CONFIG_DSU_ETH + CONFIG_DSU_ETH_PROG + CONFIG_DSU_ETH_DIS;
89 constant CFG_ETH_BUF : integer := CFG_DSU_ETHB;
90 constant CFG_ETH_IPM : integer := 16#CONFIG_DSU_IPMSB#;
91 constant CFG_ETH_IPL : integer := 16#CONFIG_DSU_IPLSB#;
92 constant CFG_ETH_ENM : integer := 16#CONFIG_DSU_ETHMSB#;
93 constant CFG_ETH_ENL : integer := 16#CONFIG_DSU_ETHLSB#;
94
95 -- LEON2 memory controller
96 constant CFG_MCTRL_LEON2 : integer := CONFIG_MCTRL_LEON2;
97 constant CFG_MCTRL_RAM8BIT : integer := CONFIG_MCTRL_8BIT;
98 constant CFG_MCTRL_RAM16BIT : integer := CONFIG_MCTRL_16BIT;
99 constant CFG_MCTRL_5CS : integer := CONFIG_MCTRL_5CS;
100 constant CFG_MCTRL_SDEN : integer := CONFIG_MCTRL_SDRAM;
101 constant CFG_MCTRL_SEPBUS : integer := CONFIG_MCTRL_SDRAM_SEPBUS;
102 constant CFG_MCTRL_INVCLK : integer := CONFIG_MCTRL_SDRAM_INVCLK;
103 constant CFG_MCTRL_SD64 : integer := CONFIG_MCTRL_SDRAM_BUS64;
104 constant CFG_MCTRL_PAGE : integer := CONFIG_MCTRL_PAGE + CONFIG_MCTRL_PROGPAGE;
105
106 -- Xilinx MIG
107 constant CFG_MIG_DDR2 : integer := CONFIG_MIG_DDR2;
108 constant CFG_MIG_RANKS : integer := CONFIG_MIG_RANKS;
109 constant CFG_MIG_COLBITS : integer := CONFIG_MIG_COLBITS;
110 constant CFG_MIG_ROWBITS : integer := CONFIG_MIG_ROWBITS;
111 constant CFG_MIG_BANKBITS: integer := CONFIG_MIG_BANKBITS;
112 constant CFG_MIG_HMASK : integer := 16#CONFIG_MIG_HMASK#;
113
114
115 -- AHB status register
116 constant CFG_AHBSTAT : integer := CONFIG_AHBSTAT_ENABLE;
117 constant CFG_AHBSTATN : integer := CONFIG_AHBSTAT_NFTSLV;
118
119 -- AHB ROM
120 constant CFG_AHBROMEN : integer := CONFIG_AHBROM_ENABLE;
121 constant CFG_AHBROPIP : integer := CONFIG_AHBROM_PIPE;
122 constant CFG_AHBRODDR : integer := 16#CONFIG_AHBROM_START#;
123 constant CFG_ROMADDR : integer := 16#CONFIG_ROM_START#;
124 constant CFG_ROMMASK : integer := 16#E00# + 16#CONFIG_ROM_START#;
125
126 -- AHB RAM
127 constant CFG_AHBRAMEN : integer := CONFIG_AHBRAM_ENABLE;
128 constant CFG_AHBRSZ : integer := CFG_AHBRAMSZ;
129 constant CFG_AHBRADDR : integer := 16#CONFIG_AHBRAM_START#;
130
131 -- Gaisler Ethernet core
132 constant CFG_GRETH : integer := CONFIG_GRETH_ENABLE;
133 constant CFG_GRETH1G : integer := CONFIG_GRETH_GIGA;
134 constant CFG_ETH_FIFO : integer := CFG_GRETH_FIFO;
135
136 -- UART 1
137 constant CFG_UART1_ENABLE : integer := CONFIG_UART1_ENABLE;
138 constant CFG_UART1_FIFO : integer := CFG_UA1_FIFO;
139
140 -- LEON3 interrupt controller
141 constant CFG_IRQ3_ENABLE : integer := CONFIG_IRQ3_ENABLE;
142 constant CFG_IRQ3_NSEC : integer := CONFIG_IRQ3_NSEC;
143
144 -- Modular timer
145 constant CFG_GPT_ENABLE : integer := CONFIG_GPT_ENABLE;
146 constant CFG_GPT_NTIM : integer := CONFIG_GPT_NTIM;
147 constant CFG_GPT_SW : integer := CONFIG_GPT_SW;
148 constant CFG_GPT_TW : integer := CONFIG_GPT_TW;
149 constant CFG_GPT_IRQ : integer := CONFIG_GPT_IRQ;
150 constant CFG_GPT_SEPIRQ : integer := CONFIG_GPT_SEPIRQ;
151 constant CFG_GPT_WDOGEN : integer := CONFIG_GPT_WDOGEN;
152 constant CFG_GPT_WDOG : integer := 16#CONFIG_GPT_WDOG#;
153
154 -- GPIO port
155 constant CFG_GRGPIO_ENABLE : integer := CONFIG_GRGPIO_ENABLE;
156 constant CFG_GRGPIO_IMASK : integer := 16#CONFIG_GRGPIO_IMASK#;
157 constant CFG_GRGPIO_WIDTH : integer := CONFIG_GRGPIO_WIDTH;
158
159 -- VGA and PS2/ interface
160 constant CFG_KBD_ENABLE : integer := CONFIG_KBD_ENABLE;
161 constant CFG_VGA_ENABLE : integer := CONFIG_VGA_ENABLE;
162 constant CFG_SVGA_ENABLE : integer := CONFIG_SVGA_ENABLE;
163
164 -- SPI memory controller
165 constant CFG_SPIMCTRL : integer := CONFIG_SPIMCTRL;
166 constant CFG_SPIMCTRL_SDCARD : integer := CONFIG_SPIMCTRL_SDCARD;
167 constant CFG_SPIMCTRL_READCMD : integer := 16#CONFIG_SPIMCTRL_READCMD#;
168 constant CFG_SPIMCTRL_DUMMYBYTE : integer := CONFIG_SPIMCTRL_DUMMYBYTE;
169 constant CFG_SPIMCTRL_DUALOUTPUT : integer := CONFIG_SPIMCTRL_DUALOUTPUT;
170 constant CFG_SPIMCTRL_SCALER : integer := CONFIG_SPIMCTRL_SCALER;
171 constant CFG_SPIMCTRL_ASCALER : integer := CONFIG_SPIMCTRL_ASCALER;
172 constant CFG_SPIMCTRL_PWRUPCNT : integer := CONFIG_SPIMCTRL_PWRUPCNT;
173
174 -- SPI controller
175 constant CFG_SPICTRL_ENABLE : integer := CONFIG_SPICTRL_ENABLE;
176 constant CFG_SPICTRL_NUM : integer := CONFIG_SPICTRL_NUM;
177 constant CFG_SPICTRL_SLVS : integer := CONFIG_SPICTRL_SLVS;
178 constant CFG_SPICTRL_FIFO : integer := CONFIG_SPICTRL_FIFO;
179 constant CFG_SPICTRL_SLVREG : integer := CONFIG_SPICTRL_SLVREG;
180 constant CFG_SPICTRL_ODMODE : integer := CONFIG_SPICTRL_ODMODE;
181 constant CFG_SPICTRL_AM : integer := CONFIG_SPICTRL_AM;
182 constant CFG_SPICTRL_ASEL : integer := CONFIG_SPICTRL_ASEL;
183 constant CFG_SPICTRL_TWEN : integer := CONFIG_SPICTRL_TWEN;
184 constant CFG_SPICTRL_MAXWLEN : integer := CONFIG_SPICTRL_MAXWLEN;
185 constant CFG_SPICTRL_SYNCRAM : integer := CONFIG_SPICTRL_SYNCRAM;
186 constant CFG_SPICTRL_FT : integer := CONFIG_SPICTRL_FT;
187
188 -- GRLIB debugging
189 constant CFG_DUART : integer := CONFIG_DEBUG_UART;
190
@@ -0,0 +1,18
1 #include "config.h"
2 #include "tkconfig.h"
3
4 -----------------------------------------------------------------------------
5 -- LEON3 Demonstration design test bench configuration
6 -- Copyright (C) 2009 Aeroflex Gaisler
7 ------------------------------------------------------------------------------
8
9
10 library techmap;
11 use techmap.gencomp.all;
12
13 package config is
14
15 #include "config.vhd.h"
16
17
18 end;
@@ -0,0 +1,50
1 # Synplicity, Inc. constraint file
2 # /home/jiri/ibm/vhdl/grlib/boards/gr-xc3s-1500/default.sdc
3 # Written on Thu May 11 15:07:16 2006
4 # by Synplify Pro, 7.1.1 Scope Editor
5
6 #
7 # Clocks
8 #
9 define_clock -name {n:clkm} -freq 50.000 -route 5.0 -clockgroup ahb_clkgroup
10 define_clock -name {rxclki} -freq 100.000 -route 2.0 -clockgroup rxclki_clkgroup
11 define_clock -name {txclk} -freq 100.000 -route 2.0 -clockgroup txclk_clkgroup
12 define_clock -name {clk125} -freq 125.000 -route 2.0 -clockgroup eth_clkgroup
13 define_clock -name {usb_clkout} -freq 60.000 -route 4.0 -clockgroup usb_clkgroup
14 define_clock -name {n:clk50} -freq 50.000 -route 4.0 -clockgroup vga_clkgroup
15 define_clock -name {clk3} -freq 25.000 -route 2.0 -clockgroup eth_clkgroup
16 define_clock -name {n:video_clk} -freq 50.000 -route 2.0 -clockgroup video_clkgroup
17
18 #
19 # Inputs/Outputs
20 #
21 define_clock_delay -rise {clk3} -rise {vga_clkgen|clkgen65.clk0B_derived_clock} -false
22 define_clock_delay -rise {vga_clkgen|clkgen65.clk0B_derived_clock} -rise {clk3} -false
23 define_clock_delay -rise {leon3mp|clkgen0.xc3s_v.clk0B_derived_clock} -rise {leon3mp|clk50} -false
24 define_clock_delay -rise {leon3mp|clk50} -rise {leon3mp|clkgen0.xc3s_v.clk0B_derived_clock} -false
25
26 define_output_delay -disable -default 10.00 -improve 0.00 -route 0.00 -ref clk:r
27 define_input_delay -disable -default 10.00 -improve 0.00 -route 0.00 -ref clk:r
28 define_output_delay 8.00 -improve 0.00 -route 0.00 -ref {usb_clkout:r}
29 define_input_delay 8.00 -improve 0.00 -route 0.00 -ref {usb_clkout:r}
30
31 #
32 # Registers
33 #
34
35 #
36 # Multicycle Path
37 #
38
39 #
40 # False Path
41 #
42
43 #
44 # Attributes
45 #
46 define_global_attribute syn_useioff {1}
47
48 #
49 # Other Constraints
50 #
@@ -0,0 +1,252
1 #
2 # Automatically generated make config: don't edit
3 #
4
5 #
6 # Synthesis
7 #
8 # CONFIG_SYN_INFERRED is not set
9 # CONFIG_SYN_ALTERA is not set
10 # CONFIG_SYN_AXCEL is not set
11 # CONFIG_SYN_PROASIC is not set
12 # CONFIG_SYN_PROASICPLUS is not set
13 # CONFIG_SYN_PROASIC3 is not set
14 # CONFIG_SYN_ATC18 is not set
15 # CONFIG_SYN_IHP25 is not set
16 # CONFIG_SYN_LATTICE is not set
17 # CONFIG_SYN_RH_LIB18T is not set
18 # CONFIG_SYN_RHUMC is not set
19 # CONFIG_SYN_SPARTAN2 is not set
20 CONFIG_SYN_SPARTAN3=y
21 # CONFIG_SYN_VIRTEX is not set
22 # CONFIG_SYN_VIRTEXE is not set
23 # CONFIG_SYN_VIRTEX2 is not set
24 # CONFIG_SYN_VIRTEX4 is not set
25 # CONFIG_SYN_INFER_RAM is not set
26 # CONFIG_SYN_INFER_PADS is not set
27 # CONFIG_SYN_NO_ASYNC is not set
28
29 #
30 # Clock generation
31 #
32 # CONFIG_CLK_INFERRED is not set
33 # CONFIG_CLK_HCLKBUF is not set
34 # CONFIG_CLK_ALTDLL is not set
35 # CONFIG_CLK_LATDLL is not set
36 # CONFIG_CLK_LIB18T is not set
37 # CONFIG_CLK_CLKDLL is not set
38 CONFIG_CLK_DCM=y
39 CONFIG_CLK_MUL=4
40 CONFIG_CLK_DIV=5
41 # CONFIG_PCI_CLKDLL is not set
42 # CONFIG_CLK_NOFB is not set
43 # CONFIG_PCI_SYSCLK is not set
44 CONFIG_LEON3=y
45 CONFIG_PROC_NUM=1
46
47 #
48 # Processor
49 #
50
51 #
52 # Integer unit
53 #
54 CONFIG_IU_NWINDOWS=8
55 CONFIG_IU_V8MULDIV=y
56 # CONFIG_IU_MUL_LATENCY_4 is not set
57 CONFIG_IU_MUL_LATENCY_5=y
58 CONFIG_IU_MUL_MAC=y
59 CONFIG_IU_SVT=y
60 CONFIG_IU_LDELAY=1
61 CONFIG_IU_WATCHPOINTS=2
62 CONFIG_PWD=y
63 CONFIG_IU_RSTADDR=00000
64
65 #
66 # Floating-point unit
67 #
68 # CONFIG_FPU_ENABLE is not set
69
70 #
71 # Cache system
72 #
73 CONFIG_ICACHE_ENABLE=y
74 CONFIG_ICACHE_ASSO1=y
75 # CONFIG_ICACHE_ASSO2 is not set
76 # CONFIG_ICACHE_ASSO3 is not set
77 # CONFIG_ICACHE_ASSO4 is not set
78 # CONFIG_ICACHE_SZ1 is not set
79 # CONFIG_ICACHE_SZ2 is not set
80 # CONFIG_ICACHE_SZ4 is not set
81 CONFIG_ICACHE_SZ8=y
82 # CONFIG_ICACHE_SZ16 is not set
83 # CONFIG_ICACHE_SZ32 is not set
84 # CONFIG_ICACHE_SZ64 is not set
85 # CONFIG_ICACHE_SZ128 is not set
86 # CONFIG_ICACHE_SZ256 is not set
87 # CONFIG_ICACHE_LZ16 is not set
88 CONFIG_ICACHE_LZ32=y
89 CONFIG_DCACHE_ENABLE=y
90 CONFIG_DCACHE_ASSO1=y
91 # CONFIG_DCACHE_ASSO2 is not set
92 # CONFIG_DCACHE_ASSO3 is not set
93 # CONFIG_DCACHE_ASSO4 is not set
94 # CONFIG_DCACHE_SZ1 is not set
95 # CONFIG_DCACHE_SZ2 is not set
96 CONFIG_DCACHE_SZ4=y
97 # CONFIG_DCACHE_SZ8 is not set
98 # CONFIG_DCACHE_SZ16 is not set
99 # CONFIG_DCACHE_SZ32 is not set
100 # CONFIG_DCACHE_SZ64 is not set
101 # CONFIG_DCACHE_SZ128 is not set
102 # CONFIG_DCACHE_SZ256 is not set
103 # CONFIG_DCACHE_LZ16 is not set
104 CONFIG_DCACHE_LZ32=y
105 CONFIG_DCACHE_SNOOP=y
106 # CONFIG_DCACHE_SNOOP_FAST is not set
107 CONFIG_CACHE_FIXED=00F3
108
109 #
110 # MMU
111 #
112 CONFIG_MMU_ENABLE=y
113 # CONFIG_MMU_COMBINED is not set
114 CONFIG_MMU_SPLIT=y
115 CONFIG_MMU_REPARRAY=y
116 # CONFIG_MMU_REPINCREMENT is not set
117 # CONFIG_MMU_I2 is not set
118 # CONFIG_MMU_I4 is not set
119 CONFIG_MMU_I8=y
120 # CONFIG_MMU_I16 is not set
121 # CONFIG_MMU_I32 is not set
122 # CONFIG_MMU_D2 is not set
123 # CONFIG_MMU_D4 is not set
124 CONFIG_MMU_D8=y
125 # CONFIG_MMU_D16 is not set
126 # CONFIG_MMU_D32 is not set
127
128 #
129 # Debug Support Unit
130 #
131 CONFIG_DSU_ENABLE=y
132 CONFIG_DSU_ITRACE=y
133 # CONFIG_DSU_ITRACESZ1 is not set
134 CONFIG_DSU_ITRACESZ2=y
135 # CONFIG_DSU_ITRACESZ4 is not set
136 # CONFIG_DSU_ITRACESZ8 is not set
137 # CONFIG_DSU_ITRACESZ16 is not set
138 CONFIG_DSU_ATRACE=y
139 # CONFIG_DSU_ATRACESZ1 is not set
140 CONFIG_DSU_ATRACESZ2=y
141 # CONFIG_DSU_ATRACESZ4 is not set
142 # CONFIG_DSU_ATRACESZ8 is not set
143 # CONFIG_DSU_ATRACESZ16 is not set
144
145 #
146 # VHDL debug settings
147 #
148 # CONFIG_IU_DISAS is not set
149 # CONFIG_DEBUG_PC32 is not set
150
151 #
152 # AMBA configuration
153 #
154 CONFIG_AHB_DEFMST=0
155 CONFIG_AHB_RROBIN=y
156 # CONFIG_AHB_SPLIT is not set
157 CONFIG_AHB_IOADDR=FFF
158 CONFIG_APB_HADDR=800
159
160 #
161 # Debug Link
162 #
163 CONFIG_DSU_UART=y
164 CONFIG_DSU_JTAG=y
165 # CONFIG_USBDCL is not set
166 # CONFIG_DSU_ETH is not set
167
168 #
169 # Peripherals
170 #
171
172 #
173 # Memory controller
174 #
175
176 #
177 # Leon2 memory controller
178 #
179 CONFIG_MCTRL_LEON2=y
180 CONFIG_MCTRL_8BIT=y
181 # CONFIG_MCTRL_16BIT is not set
182 # CONFIG_MCTRL_5CS is not set
183 CONFIG_MCTRL_SDRAM=y
184 # CONFIG_MCTRL_SDRAM_SEPBUS is not set
185 CONFIG_AHBSTAT_ENABLE=y
186 CONFIG_AHBSTAT_NFTSLV=1
187
188 #
189 # On-chip RAM/ROM
190 #
191 # CONFIG_AHBROM_ENABLE is not set
192 # CONFIG_AHBRAM_ENABLE is not set
193
194 #
195 # Ethernet
196 #
197 CONFIG_GRETH_ENABLE=y
198 # CONFIG_GRETH_FIFO4 is not set
199 # CONFIG_GRETH_FIFO8 is not set
200 # CONFIG_GRETH_FIFO16 is not set
201 CONFIG_GRETH_FIFO32=y
202 # CONFIG_GRETH_FIFO64 is not set
203
204 #
205 # IDE Disk controller
206 #
207 CONFIG_ATA_ENABLE=y
208 CONFIG_ATAIO=A00
209 CONFIG_ATAIRQ=10
210
211 #
212 # CAN
213 #
214 # CONFIG_CAN_ENABLE is not set
215
216 #
217 # UART, timer, I/O port and interrupt controller
218 #
219 CONFIG_UART1_ENABLE=y
220 # CONFIG_UA1_FIFO1 is not set
221 # CONFIG_UA1_FIFO2 is not set
222 # CONFIG_UA1_FIFO4 is not set
223 CONFIG_UA1_FIFO8=y
224 # CONFIG_UA1_FIFO16 is not set
225 # CONFIG_UA1_FIFO32 is not set
226 CONFIG_IRQ3_ENABLE=y
227 CONFIG_GPT_ENABLE=y
228 CONFIG_GPT_NTIM=2
229 CONFIG_GPT_SW=8
230 CONFIG_GPT_TW=32
231 CONFIG_GPT_IRQ=8
232 CONFIG_GPT_SEPIRQ=y
233 # CONFIG_GPT_WDOGEN is not set
234 CONFIG_GRGPIO_ENABLE=y
235 CONFIG_GRGPIO_WIDTH=18
236 CONFIG_GRGPIO_IMASK=FFF0
237
238 #
239 # Spacewire
240 #
241 # CONFIG_SPW_ENABLE is not set
242
243 #
244 # Keybord and VGA interface
245 #
246 CONFIG_KBD_ENABLE=y
247 CONFIG_VGA_ENABLE=y
248
249 #
250 # VHDL Debugging
251 #
252 # CONFIG_DEBUG_UART is not set
@@ -0,0 +1,32
1 -w
2 -g DebugBitstream:No
3 -d
4 -g Binary:no
5 -g CRC:Enable
6 -g Reset_on_err:No
7 -g ConfigRate:25
8 -g ProgPin:PullUp
9 -g DonePin:PullUp
10 -g TckPin:PullUp
11 -g TdiPin:PullUp
12 -g TdoPin:PullUp
13 -g TmsPin:PullUp
14 -g UnusedPin:PullDown
15 -g UserID:0xFFFFFFFF
16 -g StartUpClk:CClk
17 -g DONE_cycle:4
18 -g GTS_cycle:5
19 -g GWE_cycle:6
20 -g LCK_cycle:NoWait
21 -g Security:None
22 -g Persist:No
23 -m
24 -g ReadBack
25 -g DonePipe:Yes
26 -g DriveDone:Yes
27 -g en_sw_gsr:No
28 -g en_porb:Yes
29 -g drive_awake:No
30 -g sw_clk:Startupclk
31 -g sw_gwe_cycle:5
32 -g sw_gts_cycle:4
@@ -0,0 +1,191
1 library ieee;
2 use ieee.std_logic_1164.all;
3 library grlib, techmap;
4 use techmap.gencomp.all;
5 use techmap.allclkgen.all;
6
7 -- pragma translate_off
8 use gaisler.sim.all;
9 library unisim;
10 use unisim.ODDR2;
11 -- pragma translate_on
12 library lpp;
13 use lpp.lpp_ad_conv.all;
14 use lpp.general_purpose.all;
15 use lpp.Rocket_PCM_Encoder.all;
16
17
18
19 use work.Convertisseur_config.all;
20
21
22 use work.config.all;
23
24 entity ici4 is
25 generic (
26 fabtech : integer := CFG_FABTECH;
27 memtech : integer := CFG_MEMTECH;
28 padtech : integer := CFG_PADTECH;
29 clktech : integer := CFG_CLKTECH;
30 WordSize : integer := 8; WordCnt : integer := 144;MinFCount : integer := 64
31 );
32 port (
33 reset : in std_ulogic;
34 clk : in std_ulogic;
35 sclk : in std_logic;
36 Gate : in std_logic;
37 MinF : in std_logic;
38 MajF : in std_logic;
39 Data : out std_logic
40 );
41 end;
42
43 architecture rtl of ici4 is
44
45 signal clk_buf,reset_buf : std_logic;
46
47 Constant FramePlacerCount : integer := 2;
48
49 signal MinF_Inv : std_logic;
50 signal Gate_Inv : std_logic;
51 signal sclk_Inv : std_logic;
52 signal WordCount : integer range 0 to WordCnt-1;
53 signal WordClk : std_logic;
54
55 signal data_int : std_logic;
56
57 signal MuxOUT : std_logic_vector(WordSize-1 downto 0);
58 signal MuxIN : std_logic_vector((FramePlacerCount*WordSize)-1 downto 0);
59 signal Sel : integer range 0 to 1;
60
61
62 signal WORD0 : std_logic_vector(15 downto 0);
63 signal WORD1 : std_logic_vector(15 downto 0);
64 signal WORD2 : std_logic_vector(15 downto 0);
65 signal WORD3 : std_logic_vector(15 downto 0);
66 signal WORD4 : std_logic_vector(15 downto 0);
67 signal WORD5 : std_logic_vector(15 downto 0);
68 signal WORD6 : std_logic_vector(15 downto 0);
69 signal WORD7 : std_logic_vector(15 downto 0);
70 signal WORD8 : std_logic_vector(15 downto 0);
71 signal WORD9 : std_logic_vector(15 downto 0);
72 signal WORD10 : std_logic_vector(15 downto 0);
73 signal WORD11 : std_logic_vector(15 downto 0);
74 signal WORD12 : std_logic_vector(15 downto 0);
75
76
77 signal LF1 : std_logic_vector(15 downto 0);
78 signal LF2 : std_logic_vector(15 downto 0);
79 signal LF3 : std_logic_vector(15 downto 0);
80
81
82 signal MinFCnt : integer range 0 to MinFCount-1;
83
84 signal FramePlacerFlags : std_logic_vector(FramePlacerCount-1 downto 0);
85
86 begin
87
88
89 clk_buf <= clk;
90 reset_buf <= reset;
91 --
92
93 Gate_Inv <= not Gate;
94 sclk_Inv <= not Sclk;
95 MinF_Inv <= not MinF;
96
97 data <= data_int;
98
99
100 SD0 : Serial_Driver
101 generic map(WordSize)
102 port map(sclk_Inv,MuxOUT,Gate_inv,data_int);
103
104 WC0 : Word_Cntr
105 generic map(WordSize,WordCnt)
106 port map(sclk_Inv,MinF,WordClk,WordCount);
107
108 MFC0 : MinF_Cntr
109 generic map(MinFCount)
110 port map(
111 clk => MinF_Inv,
112 reset => MajF,
113 Cnt_out => MinFCnt
114 );
115
116
117 MUX0 : Serial_Driver_Multiplexor
118 generic map(FramePlacerCount,WordSize)
119 port map(sclk_Inv,Sel,MuxIN,MuxOUT);
120
121 LFP0 : entity work.LF_FRAME_PLACER
122 generic map(WordSize,WordCnt,MinFCount)
123 port map(
124 clk => Sclk,
125 Wcount => WordCount,
126 Flag => FramePlacerFlags(1),
127 LF1 => LF1,
128 LF2 => LF2,
129 LF3 => LF3,
130 WordOut => MuxIN(15 downto 8));
131
132
133 CAMFP0 : entity work.ICI4_3DCAM_FRAM_PLACER
134 generic map(WordSize,WordCnt,MinFCount)
135 port map(
136 clk => Sclk,
137 Wcount => WordCount,
138 Flag => FramePlacerFlags(0),
139 WORD0 => WORD0,
140 WORD1 => WORD1,
141 WORD2 => WORD2,
142 WORD3 => WORD3,
143 WORD4 => WORD4,
144 WORD5 => WORD5,
145 WORD6 => WORD6,
146 WORD7 => WORD7,
147 WORD8 => WORD8,
148 WORD9 => WORD9,
149 WORD10 => WORD10,
150 WORD11 => WORD11,
151 WORD12 => WORD12,
152 WordOut => MuxIN(7 downto 0));
153
154
155 WORD0 <= WORD0cst;
156 WORD1 <= WORD1cst;
157 WORD2 <= WORD2cst;
158 WORD3 <= WORD3cst;
159 WORD4 <= WORD4cst;
160 WORD5 <= WORD5cst;
161 WORD6 <= WORD6cst;
162 WORD7 <= WORD7cst;
163 WORD8 <= WORD8cst;
164 WORD9 <= WORD9cst;
165 WORD10 <= WORD10cst;
166 WORD11 <= WORD11cst;
167 WORD12 <= X"0" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
168
169
170 LF1 <= LF1cst;
171 LF2 <= LF2cst;
172 LF3 <= LF3cst;
173
174 process(clk)
175 variable SelVar : integer range 0 to FramePlacerCount;
176 begin
177 if clk'event and clk ='1' then
178 Decoder: FOR i IN 0 to FramePlacerCount-1 loop
179 if FramePlacerFlags(i) = '1' then
180 SelVar := i;
181 end if;
182 END loop Decoder;
183 Sel <= SelVar;
184 end if;
185 end process;
186
187
188 end rtl;
189
190
191
This diff has been collapsed as it changes many lines, (2370 lines changed) Show them Hide them
@@ -0,0 +1,2370
1 NYTT1
2 0101
3 0101
4 0101
5 0101
6 0101
7 0101
8 0101
9 0101
10 0101
11 0101
12 0101
13 0101
14 0101
15 0101
16 0101
17 1101
18 0000
19 0000
20 0000
21 0000
22 1010
23 0111
24 0000
25 0000
26 0000
27 0000
28 0000
29 0000
30 1111
31 1111
32 1111
33 1111
34 1111
35 1111
36 1111
37 1111
38 1111
39 1111
40 1111
41 1111
42 1000
43 0000
44 0000
45 0000
46 0101
47 1000
48 0000
49 0000
50 0011
51 0000
52 1110
53 1110
54 0000
55 0000
56 0000
57 0000
58 0000
59 0000
60 0000
61 0000
62 0000
63 0100
64 0001
65 0001
66 0000
67 0000
68 0000
69 0000
70 0000
71 1100
72 1000
73 1010
74 0000
75 0000
76 1000
77 0001
78 0000
79 1100
80 1000
81 1010
82 0000
83 0000
84 0010
85 0011
86 0000
87 0000
88 0000
89 0000
90 0111
91 0010
92 0000
93 0001
94 0011
95 0000
96 1010
97 1101
98 0000
99 0000
100 0000
101 0000
102 0000
103 0000
104 0000
105 0000
106 0001
107 0000
108 0010
109 1111
110 0000
111 0000
112 0000
113 0000
114 0000
115 1010
116 0000
117 0000
118 0000
119 0000
120 0000
121 0000
122 0000
123 0000
124 0000
125 0000
126 0000
127 0000
128 0000
129 0000
130 0000
131 0000
132 0000
133 0000
134 0000
135 0000
136 0001
137 0000
138 0000
139 0000
140 0000
141 0000
142 0000
143 0000
144 0010
145 0000
146 0000
147 0000
148 0000
149 0000
150 0000
151 0000
152 0011
153 0000
154 0000
155 0000
156 0000
157 0000
158 0000
159 0000
160 0100
161 0000
162 0000
163 0000
164 0000
165 0000
166 0000
167 0000
168 0101
169 0000
170 0000
171 0000
172 0000
173 0000
174 0000
175 0000
176 0110
177 0000
178 0000
179 0000
180 0000
181 0000
182 0000
183 0000
184 0111
185 0000
186 0000
187 0000
188 0000
189 0000
190 0000
191 0000
192 1000
193 0000
194 0000
195 0000
196 0000
197 0000
198 0000
199 0000
200 1001
201 0000
202 0000
203 0000
204 0000
205 0000
206 0000
207 0000
208 0000
209 0000
210 0000
211 0000
212 0000
213 0000
214 0000
215 0000
216 0001
217 0000
218 0000
219 0000
220 0000
221 0000
222 0000
223 0000
224 0010
225 0000
226 0000
227 0000
228 0000
229 0000
230 0000
231 0000
232 0011
233 0000
234 0000
235 0000
236 0000
237 0000
238 0000
239 0000
240 0100
241 0000
242 0000
243 0000
244 0000
245 0000
246 0000
247 0000
248 0101
249 0000
250 0000
251 0000
252 0000
253 0000
254 0000
255 0000
256 0110
257 0000
258 0000
259 0000
260 0000
261 0000
262 0000
263 0000
264 0111
265 0000
266 0000
267 0000
268 0000
269 0000
270 0000
271 0000
272 1000
273 0000
274 0000
275 0000
276 0000
277 0000
278 0000
279 0000
280 1001
281 0000
282 0000
283 0000
284 0000
285 0000
286 0000
287 0000
288 0000
289 0000
290 0000
291 0000
292 0000
293 0000
294 0000
295 0000
296 0001
297 0000
298 0000
299 0000
300 0000
301 0000
302 0000
303 0000
304 0010
305 0000
306 0000
307 0000
308 0000
309 0000
310 0000
311 0000
312 0011
313 0000
314 0000
315 0000
316 0000
317 0000
318 0000
319 0000
320 0100
321 0000
322 0000
323 0000
324 0000
325 0000
326 0000
327 0000
328 0101
329 0000
330 0000
331 0000
332 0000
333 0000
334 0000
335 0000
336 0110
337 0000
338 0000
339 0000
340 0000
341 0000
342 0000
343 0000
344 0111
345 0000
346 0000
347 0000
348 0000
349 0000
350 0000
351 0000
352 1000
353 0000
354 0000
355 0000
356 0000
357 0000
358 0000
359 0000
360 1001
361 0000
362 0000
363 0000
364 0000
365 0000
366 0000
367 0000
368 0000
369 0000
370 0000
371 0000
372 0000
373 0000
374 0000
375 0000
376 0001
377 0000
378 0000
379 0000
380 0000
381 0000
382 0000
383 0000
384 0010
385 0000
386 0000
387 0000
388 0000
389 0000
390 0000
391 0000
392 0011
393 0000
394 0000
395 0000
396 0000
397 0000
398 0000
399 0000
400 0100
401 0000
402 0000
403 0000
404 0000
405 0000
406 0000
407 0000
408 0101
409 0000
410 0000
411 0000
412 0000
413 0000
414 0000
415 0000
416 0110
417 0000
418 0000
419 0000
420 0000
421 0000
422 0000
423 0000
424 0111
425 0000
426 0000
427 0000
428 0000
429 0000
430 0000
431 0000
432 1000
433 0000
434 0000
435 0000
436 0000
437 0000
438 0000
439 0000
440 1001
441 0000
442 0000
443 0000
444 0000
445 0000
446 0000
447 0000
448 0000
449 0000
450 0000
451 0000
452 0000
453 0000
454 0000
455 0000
456 0001
457 0000
458 0000
459 0000
460 0000
461 0000
462 0000
463 0000
464 0010
465 0000
466 0000
467 0000
468 0000
469 0000
470 0000
471 0000
472 0011
473 0000
474 0000
475 0000
476 0000
477 0000
478 0000
479 0000
480 0100
481 0000
482 0000
483 0000
484 0000
485 0000
486 0000
487 0000
488 0101
489 0000
490 0000
491 0000
492 0000
493 0000
494 0000
495 0000
496 0110
497 0000
498 0000
499 0000
500 0000
501 0000
502 0000
503 0000
504 0111
505 0000
506 0000
507 0000
508 0000
509 0000
510 0000
511 0000
512 1000
513 0000
514 0000
515 0000
516 0000
517 0000
518 0000
519 0000
520 1001
521 0000
522 0000
523 0000
524 0000
525 0000
526 0000
527 0000
528 0000
529 0000
530 0000
531 0000
532 0000
533 0000
534 0000
535 0000
536 0001
537 0000
538 0000
539 0000
540 0000
541 0000
542 0000
543 0000
544 0010
545 0000
546 0000
547 0000
548 0000
549 0000
550 0000
551 0000
552 0011
553 0000
554 0000
555 0000
556 0000
557 0000
558 0000
559 0000
560 0100
561 0000
562 0000
563 0000
564 0000
565 0000
566 0000
567 0000
568 0101
569 0000
570 0000
571 0000
572 0000
573 0000
574 0000
575 0000
576 0110
577 0000
578 0000
579 0000
580 0000
581 0000
582 0000
583 0000
584 0111
585 0000
586 0000
587 0000
588 0000
589 0000
590 0000
591 0000
592 1000
593 0000
594 0000
595 0000
596 0000
597 0000
598 0000
599 0000
600 1001
601 0000
602 0000
603 0000
604 0000
605 0000
606 0000
607 0000
608 0000
609 0000
610 0000
611 0000
612 0000
613 0000
614 0000
615 0000
616 0001
617 0000
618 0000
619 0000
620 0000
621 0000
622 0000
623 0000
624 0010
625 0000
626 0000
627 0000
628 0000
629 0000
630 0000
631 0000
632 0011
633 0000
634 0000
635 0000
636 0000
637 0000
638 0000
639 0000
640 0100
641 0000
642 0000
643 0000
644 0000
645 0000
646 0000
647 0000
648 0101
649 0000
650 0000
651 0000
652 0000
653 0000
654 0000
655 0000
656 0110
657 0000
658 0000
659 0000
660 0000
661 0000
662 0000
663 0000
664 0111
665 0000
666 0000
667 0000
668 0000
669 0000
670 0000
671 0000
672 1000
673 0000
674 0000
675 0000
676 0000
677 0000
678 0000
679 0000
680 1001
681 0000
682 0000
683 0000
684 0000
685 0000
686 0000
687 0000
688 0000
689 0000
690 0000
691 0000
692 0000
693 0000
694 0000
695 0000
696 0001
697 0000
698 0000
699 0000
700 0000
701 0000
702 0000
703 0000
704 0010
705 0000
706 0000
707 0000
708 0000
709 0000
710 0000
711 0000
712 0011
713 0000
714 0000
715 0000
716 0000
717 0000
718 0000
719 0000
720 0100
721 0000
722 0000
723 0000
724 0000
725 0000
726 0000
727 0000
728 0101
729 0000
730 0000
731 0000
732 0000
733 0000
734 0000
735 0000
736 0110
737 0000
738 0000
739 0000
740 0000
741 0000
742 0000
743 0000
744 0111
745 0000
746 0000
747 0000
748 0000
749 0000
750 0000
751 0000
752 1000
753 0000
754 0000
755 0000
756 0000
757 0000
758 0000
759 0000
760 1001
761 0000
762 0000
763 0000
764 0000
765 0000
766 0000
767 0000
768 0000
769 0000
770 0000
771 0000
772 0000
773 0000
774 0000
775 0000
776 0001
777 0000
778 0000
779 0000
780 0000
781 0000
782 0000
783 0000
784 0010
785 0000
786 0000
787 0000
788 0000
789 0000
790 0000
791 0000
792 0011
793 0000
794 0000
795 0000
796 0000
797 0000
798 0000
799 0000
800 0100
801 0000
802 0000
803 0000
804 0000
805 0000
806 0000
807 0000
808 0101
809 0000
810 0000
811 0000
812 0000
813 0000
814 0000
815 0000
816 0110
817 0000
818 0000
819 0000
820 0000
821 0000
822 0000
823 0000
824 0111
825 0000
826 0000
827 0000
828 0000
829 0000
830 0000
831 0000
832 1000
833 0000
834 0000
835 0000
836 0000
837 0000
838 0000
839 0000
840 1001
841 0000
842 0000
843 0000
844 0000
845 0000
846 0000
847 0000
848 0000
849 0000
850 0000
851 0000
852 0000
853 0000
854 0000
855 0000
856 0001
857 0000
858 0000
859 0000
860 0000
861 0000
862 0000
863 0000
864 0010
865 0000
866 0000
867 0000
868 0000
869 0000
870 0000
871 0000
872 0011
873 0000
874 0000
875 0000
876 0000
877 0000
878 0000
879 0000
880 0100
881 0000
882 0000
883 0000
884 0000
885 0000
886 0000
887 0000
888 0101
889 0000
890 0000
891 0000
892 0000
893 0000
894 0000
895 0000
896 0110
897 0000
898 0000
899 0000
900 0000
901 0000
902 0000
903 0000
904 0111
905 0000
906 0000
907 0000
908 0000
909 0000
910 0000
911 0000
912 1000
913 0000
914 0000
915 0000
916 0000
917 0000
918 0000
919 0000
920 1001
921 0000
922 0000
923 0000
924 0000
925 0000
926 0000
927 0000
928 0000
929 0000
930 0000
931 0000
932 0000
933 0000
934 0000
935 0000
936 0001
937 0000
938 0000
939 0000
940 0000
941 0000
942 0000
943 0000
944 0010
945 0000
946 0000
947 0000
948 0000
949 0000
950 0000
951 0000
952 0011
953 0000
954 0000
955 0000
956 0000
957 0000
958 0000
959 0000
960 0100
961 0000
962 0000
963 0000
964 0000
965 0000
966 0000
967 0000
968 0101
969 0000
970 0000
971 0000
972 0000
973 0000
974 0000
975 0000
976 0110
977 0000
978 0000
979 0000
980 0000
981 0000
982 0000
983 0000
984 0111
985 0000
986 0000
987 0000
988 0000
989 0000
990 0000
991 0000
992 1000
993 0000
994 0000
995 0000
996 0000
997 0000
998 0000
999 0000
1000 1001
1001 0000
1002 0000
1003 0000
1004 0000
1005 0000
1006 0000
1007 0000
1008 0000
1009 0000
1010 0000
1011 0000
1012 0000
1013 0000
1014 0000
1015 0000
1016 0001
1017 0000
1018 0000
1019 0000
1020 0000
1021 0000
1022 0000
1023 0000
1024 0010
1025 0000
1026 0000
1027 0000
1028 0000
1029 0000
1030 0000
1031 0000
1032 0011
1033 0000
1034 0000
1035 0000
1036 0000
1037 0000
1038 0000
1039 0000
1040 0100
1041 0000
1042 0000
1043 0000
1044 0000
1045 0000
1046 0000
1047 0000
1048 0101
1049 0000
1050 0000
1051 0000
1052 0000
1053 0000
1054 0000
1055 0000
1056 0110
1057 0000
1058 0000
1059 0000
1060 0000
1061 0000
1062 0000
1063 0000
1064 0111
1065 0000
1066 0000
1067 0000
1068 0000
1069 0000
1070 0000
1071 0000
1072 1000
1073 0000
1074 0000
1075 0000
1076 0000
1077 0000
1078 0000
1079 0000
1080 1001
1081 0000
1082 0000
1083 0000
1084 0000
1085 0000
1086 0000
1087 0000
1088 0000
1089 0000
1090 0000
1091 0000
1092 0000
1093 0000
1094 0000
1095 0000
1096 0001
1097 0000
1098 0000
1099 0000
1100 0000
1101 0000
1102 0000
1103 0000
1104 0010
1105 0000
1106 0000
1107 0000
1108 0000
1109 0000
1110 0000
1111 0000
1112 0011
1113 0000
1114 0000
1115 0000
1116 0000
1117 0000
1118 0000
1119 0000
1120 0100
1121 0000
1122 0000
1123 0000
1124 0000
1125 0000
1126 0000
1127 0000
1128 0101
1129 0000
1130 0000
1131 0000
1132 0000
1133 0000
1134 0000
1135 0000
1136 0110
1137 0000
1138 0000
1139 0000
1140 0000
1141 0000
1142 0000
1143 0000
1144 0111
1145 0000
1146 0000
1147 0000
1148 0000
1149 0000
1150 0000
1151 0000
1152 1000
1153 0000
1154 0000
1155 0000
1156 0000
1157 0000
1158 0000
1159 0000
1160 1001
1161 0000
1162 0000
1163 0000
1164 0000
1165 0000
1166 0000
1167 0000
1168 0000
1169 0000
1170 0000
1171 0000
1172 0000
1173 0000
1174 0000
1175 0000
1176 0001
1177 0000
1178 0000
1179 0000
1180 0000
1181 0000
1182 0000
1183 0000
1184 0010
1185 0000
1186 0000
1187 0000
1188 0000
1189 0000
1190 0000
1191 0000
1192 0011
1193 0000
1194 0000
1195 0000
1196 0000
1197 0000
1198 0000
1199 0000
1200 0100
1201 0000
1202 0000
1203 0000
1204 0000
1205 0000
1206 0000
1207 0000
1208 0101
1209 0000
1210 0000
1211 0000
1212 0000
1213 0000
1214 0000
1215 0000
1216 0110
1217 0000
1218 0000
1219 0000
1220 0000
1221 0000
1222 0000
1223 0000
1224 0111
1225 0000
1226 0000
1227 0000
1228 0000
1229 0000
1230 0000
1231 0000
1232 1000
1233 0000
1234 0000
1235 0000
1236 0000
1237 0000
1238 0000
1239 0000
1240 1001
1241 0000
1242 0000
1243 0000
1244 0000
1245 0000
1246 0000
1247 0000
1248 0000
1249 0000
1250 0000
1251 0000
1252 0000
1253 0000
1254 0000
1255 0000
1256 0001
1257 0000
1258 0000
1259 0000
1260 0000
1261 0000
1262 0000
1263 0000
1264 0010
1265 0000
1266 0000
1267 0000
1268 0000
1269 0000
1270 0000
1271 0000
1272 0011
1273 0000
1274 0000
1275 0000
1276 0000
1277 0000
1278 0000
1279 0000
1280 0100
1281 0000
1282 0000
1283 0000
1284 0000
1285 0000
1286 0000
1287 0000
1288 0101
1289 0000
1290 0000
1291 0000
1292 0000
1293 0000
1294 0000
1295 0000
1296 0110
1297 0000
1298 0000
1299 0000
1300 0000
1301 0000
1302 0000
1303 0000
1304 0111
1305 0000
1306 0000
1307 0000
1308 0000
1309 0000
1310 0000
1311 0000
1312 1000
1313 0000
1314 0000
1315 0000
1316 0000
1317 0000
1318 0000
1319 0000
1320 1001
1321 0000
1322 0000
1323 0000
1324 0000
1325 0000
1326 0000
1327 0000
1328 0000
1329 0000
1330 0000
1331 0000
1332 0000
1333 0000
1334 0000
1335 0000
1336 0001
1337 0000
1338 0000
1339 0000
1340 0000
1341 0000
1342 0000
1343 0000
1344 0010
1345 0000
1346 0000
1347 0000
1348 0000
1349 0000
1350 0000
1351 0000
1352 0011
1353 0000
1354 0000
1355 0000
1356 0000
1357 0000
1358 0000
1359 0000
1360 0100
1361 0000
1362 0000
1363 0000
1364 0000
1365 0000
1366 0000
1367 0000
1368 0101
1369 0000
1370 0000
1371 0000
1372 0000
1373 0000
1374 0000
1375 0000
1376 0110
1377 0000
1378 0000
1379 0000
1380 0000
1381 0000
1382 0000
1383 0000
1384 0111
1385 0000
1386 0000
1387 0000
1388 0000
1389 0000
1390 0000
1391 0000
1392 1000
1393 0000
1394 0000
1395 0000
1396 0000
1397 0000
1398 0000
1399 0000
1400 1001
1401 0000
1402 0000
1403 0000
1404 0000
1405 0000
1406 0000
1407 0000
1408 0000
1409 0000
1410 0000
1411 0000
1412 0000
1413 0000
1414 0000
1415 0000
1416 0001
1417 0000
1418 0000
1419 0000
1420 0000
1421 0000
1422 0000
1423 0000
1424 0010
1425 0000
1426 0000
1427 0000
1428 0000
1429 0000
1430 0000
1431 0000
1432 0011
1433 0000
1434 0000
1435 0000
1436 0000
1437 0000
1438 0000
1439 0000
1440 0100
1441 0000
1442 0000
1443 0000
1444 0000
1445 0000
1446 0000
1447 0000
1448 0101
1449 0000
1450 0000
1451 0000
1452 0000
1453 0000
1454 0000
1455 0000
1456 0110
1457 0000
1458 0000
1459 0000
1460 0000
1461 0000
1462 0000
1463 0000
1464 0111
1465 0000
1466 0000
1467 0000
1468 0000
1469 0000
1470 0000
1471 0000
1472 1000
1473 0000
1474 0000
1475 0000
1476 0000
1477 0000
1478 0000
1479 0000
1480 1001
1481 0000
1482 0000
1483 0000
1484 0000
1485 0000
1486 0000
1487 0000
1488 0000
1489 0000
1490 0000
1491 0000
1492 0000
1493 0000
1494 0000
1495 0000
1496 0001
1497 0000
1498 0000
1499 0000
1500 0000
1501 0000
1502 0000
1503 0000
1504 0010
1505 0000
1506 0000
1507 0000
1508 0000
1509 0000
1510 0000
1511 0000
1512 0011
1513 0000
1514 0000
1515 0000
1516 0000
1517 0000
1518 0000
1519 0000
1520 0100
1521 0000
1522 0000
1523 0000
1524 0000
1525 0000
1526 0000
1527 0000
1528 0101
1529 0000
1530 0000
1531 0000
1532 0000
1533 0000
1534 0000
1535 0000
1536 0110
1537 0000
1538 0000
1539 0000
1540 0000
1541 0000
1542 0000
1543 0000
1544 0111
1545 0000
1546 0000
1547 0000
1548 0000
1549 0000
1550 0000
1551 0000
1552 1000
1553 0000
1554 0000
1555 0000
1556 0000
1557 0000
1558 0000
1559 0000
1560 1001
1561 0000
1562 0000
1563 0000
1564 0000
1565 0000
1566 0000
1567 0000
1568 0000
1569 0000
1570 0000
1571 0000
1572 0000
1573 0000
1574 0000
1575 0000
1576 0001
1577 0000
1578 0000
1579 0000
1580 0000
1581 0000
1582 0000
1583 0000
1584 0010
1585 0000
1586 0000
1587 0000
1588 0000
1589 0000
1590 0000
1591 0000
1592 0011
1593 0000
1594 0000
1595 0000
1596 0000
1597 0000
1598 0000
1599 0000
1600 0100
1601 0000
1602 0000
1603 0000
1604 0000
1605 0000
1606 0000
1607 0000
1608 0101
1609 0000
1610 0000
1611 0000
1612 0000
1613 0000
1614 0000
1615 0000
1616 0110
1617 0000
1618 0000
1619 0000
1620 0000
1621 0000
1622 0000
1623 0000
1624 0111
1625 0000
1626 0000
1627 0000
1628 0000
1629 0000
1630 0000
1631 0000
1632 1000
1633 0000
1634 0000
1635 0000
1636 0000
1637 0000
1638 0000
1639 0000
1640 1001
1641 0000
1642 0000
1643 0000
1644 0000
1645 0000
1646 0000
1647 0000
1648 0000
1649 0000
1650 0000
1651 0000
1652 0000
1653 0000
1654 0000
1655 0000
1656 0001
1657 0000
1658 0000
1659 0000
1660 0000
1661 0000
1662 0000
1663 0000
1664 0010
1665 0000
1666 0000
1667 0000
1668 0000
1669 0000
1670 0000
1671 0000
1672 0011
1673 0000
1674 0000
1675 0000
1676 0000
1677 0000
1678 0000
1679 0000
1680 0100
1681 0000
1682 0000
1683 0000
1684 0000
1685 0000
1686 0000
1687 0000
1688 0101
1689 0000
1690 0000
1691 0000
1692 0000
1693 0000
1694 0000
1695 0000
1696 0110
1697 0000
1698 0000
1699 0000
1700 0000
1701 0000
1702 0000
1703 0000
1704 0111
1705 0000
1706 0000
1707 0000
1708 0000
1709 0000
1710 0000
1711 0000
1712 1000
1713 0000
1714 0000
1715 0000
1716 0000
1717 0000
1718 0000
1719 0000
1720 1001
1721 0000
1722 0000
1723 0000
1724 0000
1725 0000
1726 0000
1727 0000
1728 0000
1729 0000
1730 0000
1731 0000
1732 0000
1733 0000
1734 0000
1735 0000
1736 0001
1737 0000
1738 0000
1739 0000
1740 0000
1741 0000
1742 0000
1743 0000
1744 0010
1745 0000
1746 0000
1747 0000
1748 0000
1749 0000
1750 0000
1751 0000
1752 0011
1753 0000
1754 0000
1755 0000
1756 0000
1757 0000
1758 0000
1759 0000
1760 0100
1761 0000
1762 0000
1763 0000
1764 0000
1765 0000
1766 0000
1767 0000
1768 0101
1769 0000
1770 0000
1771 0000
1772 0000
1773 0000
1774 0000
1775 0000
1776 0110
1777 0000
1778 0000
1779 0000
1780 0000
1781 0000
1782 0000
1783 0000
1784 0111
1785 0000
1786 0000
1787 0000
1788 0000
1789 0000
1790 0000
1791 0000
1792 1000
1793 0000
1794 0000
1795 0000
1796 0000
1797 0000
1798 0000
1799 0000
1800 1001
1801 0000
1802 0000
1803 0000
1804 0000
1805 0000
1806 0000
1807 0000
1808 0000
1809 0000
1810 0000
1811 0000
1812 0000
1813 0000
1814 0000
1815 0000
1816 0001
1817 0000
1818 0000
1819 0000
1820 0000
1821 0000
1822 0000
1823 0000
1824 0010
1825 0000
1826 0000
1827 0000
1828 0000
1829 0000
1830 0000
1831 0000
1832 0011
1833 0000
1834 0000
1835 0000
1836 0000
1837 0000
1838 0000
1839 0000
1840 0100
1841 0000
1842 0000
1843 0000
1844 0000
1845 0000
1846 0000
1847 0000
1848 0101
1849 0000
1850 0000
1851 0000
1852 0000
1853 0000
1854 0000
1855 0000
1856 0110
1857 0000
1858 0000
1859 0000
1860 0000
1861 0000
1862 0000
1863 0000
1864 0111
1865 0000
1866 0000
1867 0000
1868 0000
1869 0000
1870 0000
1871 0000
1872 1000
1873 0000
1874 0000
1875 0000
1876 0000
1877 0000
1878 0000
1879 0000
1880 1001
1881 0000
1882 0000
1883 0000
1884 0000
1885 0000
1886 0000
1887 0000
1888 0000
1889 0000
1890 0000
1891 0000
1892 0000
1893 0000
1894 0000
1895 0000
1896 0001
1897 0000
1898 0000
1899 0000
1900 0000
1901 0000
1902 0000
1903 0000
1904 0010
1905 0000
1906 0000
1907 0000
1908 0000
1909 0000
1910 0000
1911 0000
1912 0011
1913 0000
1914 0000
1915 0000
1916 0000
1917 0000
1918 0000
1919 0000
1920 0100
1921 0000
1922 0000
1923 0000
1924 0000
1925 0000
1926 0000
1927 0000
1928 0101
1929 0000
1930 0000
1931 0000
1932 0000
1933 0000
1934 0000
1935 0000
1936 0110
1937 0000
1938 0000
1939 0000
1940 0000
1941 0000
1942 0000
1943 0000
1944 0111
1945 0000
1946 0000
1947 0000
1948 0000
1949 0000
1950 0000
1951 0000
1952 1000
1953 0000
1954 0000
1955 0000
1956 0000
1957 0000
1958 0000
1959 0000
1960 1001
1961 0000
1962 0000
1963 0000
1964 0000
1965 0000
1966 0000
1967 0000
1968 0000
1969 0000
1970 0000
1971 0000
1972 0000
1973 0000
1974 0000
1975 0000
1976 0001
1977 0000
1978 0000
1979 0000
1980 0000
1981 0000
1982 0000
1983 0000
1984 0010
1985 0000
1986 0000
1987 0000
1988 0000
1989 0000
1990 0000
1991 0000
1992 0011
1993 0000
1994 0000
1995 0000
1996 0000
1997 0000
1998 0000
1999 0000
2000 0100
2001 0000
2002 0000
2003 0000
2004 0000
2005 0000
2006 0000
2007 0000
2008 0101
2009 0000
2010 0000
2011 0000
2012 0000
2013 0000
2014 0000
2015 0000
2016 0110
2017 0000
2018 0000
2019 0000
2020 0000
2021 0000
2022 0000
2023 0000
2024 0111
2025 0000
2026 0000
2027 0000
2028 0000
2029 0000
2030 0000
2031 0000
2032 1000
2033 0000
2034 0000
2035 0000
2036 0000
2037 0000
2038 0000
2039 0000
2040 1001
2041 0000
2042 0000
2043 0000
2044 0000
2045 0000
2046 0000
2047 0000
2048 0000
2049 0000
2050 0000
2051 0000
2052 0000
2053 0000
2054 0000
2055 0000
2056 0001
2057 0000
2058 0000
2059 0000
2060 0000
2061 0000
2062 0000
2063 0000
2064 0000
2065 0000
2066 NYTT2
2067 0101
2068 0101
2069 0101
2070 0101
2071 0101
2072 0101
2073 0101
2074 0101
2075 0101
2076 0101
2077 0101
2078 0101
2079 0101
2080 0101
2081 0101
2082 0101
2083 0101
2084 0101
2085 0101
2086 0101
2087 0101
2088 0101
2089 0101
2090 0101
2091 0101
2092 0101
2093 0101
2094 0101
2095 0101
2096 0101
2097 0101
2098 0101
2099 0101
2100 0101
2101 0101
2102 0101
2103 0101
2104 0101
2105 0101
2106 0101
2107 0101
2108 0101
2109 0101
2110 0101
2111 0101
2112 0101
2113 0101
2114 0101
2115 0101
2116 0101
2117 0101
2118 0101
2119 0101
2120 0101
2121 0101
2122 0101
2123 0101
2124 0101
2125 0101
2126 0101
2127 0101
2128 0101
2129 0101
2130 0101
2131 0101
2132 0101
2133 0101
2134 0101
2135 0101
2136 0101
2137 0101
2138 1101
2139 0000
2140 0000
2141 0000
2142 0000
2143 1010
2144 0111
2145 0000
2146 0000
2147 0000
2148 0000
2149 0000
2150 0000
2151 1111
2152 1111
2153 1111
2154 1111
2155 1111
2156 1111
2157 1111
2158 1111
2159 1111
2160 1111
2161 1111
2162 1111
2163 1000
2164 0000
2165 0000
2166 0000
2167 0101
2168 1000
2169 0000
2170 0000
2171 0000
2172 0000
2173 0010
2174 0110
2175 0000
2176 0000
2177 0001
2178 0000
2179 0000
2180 0000
2181 0000
2182 0000
2183 0000
2184 0100
2185 0001
2186 0001
2187 0000
2188 0000
2189 0000
2190 0000
2191 0000
2192 1100
2193 1000
2194 1010
2195 0000
2196 0000
2197 1000
2198 0001
2199 0000
2200 1100
2201 1000
2202 1010
2203 0000
2204 0000
2205 0010
2206 0011
2207 0000
2208 0000
2209 0000
2210 0000
2211 0111
2212 0010
2213 0000
2214 0001
2215 0000
2216 0000
2217 1110
2218 0100
2219 0000
2220 0000
2221 0000
2222 0000
2223 0000
2224 0000
2225 0000
2226 0000
2227 0011
2228 0000
2229 1111
2230 0000
2231 0000
2232 0000
2233 0000
2234 0000
2235 0000
2236 0010
2237 0000
2238 0000
2239 0011
2240 0000
2241 1000
2242 1100
2243 0000
2244 0000
2245 0000
2246 0000
2247 0000
2248 0000
2249 0000
2250 0000
2251 0000
2252 0000
2253 0000
2254 0000
2255 0000
2256 0000
2257 0001
2258 0000
2259 0000
2260 0000
2261 0000
2262 0000
2263 0000
2264 0000
2265 0010
2266 0000
2267 0000
2268 0000
2269 0000
2270 0000
2271 0000
2272 0000
2273 0011
2274 0000
2275 0000
2276 0000
2277 0000
2278 0000
2279 0000
2280 0000
2281 0100
2282 0000
2283 0000
2284 0000
2285 0000
2286 0000
2287 0000
2288 0000
2289 0101
2290 0000
2291 0000
2292 0000
2293 0000
2294 0000
2295 0000
2296 0000
2297 0110
2298 0000
2299 0000
2300 0000
2301 0000
2302 0000
2303 0000
2304 0000
2305 0111
2306 0000
2307 0000
2308 0000
2309 0000
2310 0000
2311 0000
2312 0000
2313 1000
2314 0000
2315 0000
2316 0000
2317 0000
2318 0000
2319 0000
2320 0000
2321 1001
2322 0000
2323 0000
2324 0000
2325 0000
2326 0000
2327 0000
2328 0000
2329 1010
2330 0000
2331 0000
2332 0000
2333 0000
2334 0000
2335 0000
2336 0000
2337 1011
2338 0000
2339 0000
2340 0000
2341 0000
2342 0000
2343 0000
2344 0000
2345 1100
2346 0000
2347 0000
2348 0000
2349 0000
2350 0000
2351 0000
2352 0000
2353 1101
2354 0000
2355 0000
2356 0000
2357 0000
2358 0000
2359 0000
2360 0000
2361 1110
2362 0000
2363 0000
2364 0000
2365 0000
2366 0000
2367 0000
2368 0000
2369 0000
2370 0000
This diff has been collapsed as it changes many lines, (6296 lines changed) Show them Hide them
@@ -0,0 +1,6296
1 # FILE: header.tk
2 # This file is boilerplate TCL/TK function definitions for 'make xconfig'.
3 #
4 # CHANGES
5 # =======
6 #
7 # 8 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
8 # - Remove unused do_cmd function (part of the 2.0 sound support).
9 # - Arrange buttons in three columns for better screen fitting.
10 # - Add CONSTANT_Y, CONSTANT_M, CONSTANT_N for commands like:
11 # dep_tristate 'foo' CONFIG_FOO m
12 #
13 # 23 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
14 # - Shut vfix the hell up.
15 #
16 # 24 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
17 # - Improve the exit message (Jeff Ronne).
18
19 #
20 # This is a handy replacement for ".widget cget" that requires neither tk4
21 # nor additional source code uglification.
22 #
23 proc cget { w option } {
24 return "[lindex [$w configure $option] 4]"
25 }
26
27 #
28 # Function to compensate for broken config.in scripts like the sound driver,
29 # which make dependencies on variables that are never even conditionally
30 # defined.
31 #
32 proc vfix { var } {
33 global $var
34 if [ catch {eval concat $$var} ] {
35 set $var 4
36 }
37 }
38
39 #
40 # Constant values used by certain dep_tristate commands.
41 #
42 set CONSTANT_Y 1
43 set CONSTANT_M 2
44 set CONSTANT_N 0
45 set CONSTANT_E 4
46
47 #
48 # Create a "reference" object to steal colors from.
49 #
50 button .ref
51
52 #
53 # On monochrome displays, -disabledforeground is blank by default; that's
54 # bad. Fill it with -foreground instead.
55 #
56 if { [cget .ref -disabledforeground] == "" } {
57 .ref configure -disabledforeground [cget .ref -foreground]
58 }
59
60
61 #
62 # Define some macros we will need to parse the config.in file.
63 #
64
65 proc mainmenu_name { text } {
66 wm title . "$text"
67 }
68
69 proc menu_option { w menu_num text } {
70 global menus_per_column
71 global processed_top_level
72 set processed_top_level [expr $processed_top_level + 1]
73 if { $processed_top_level <= $menus_per_column } then {
74 set myframe left
75 } elseif { $processed_top_level <= [expr 2 * $menus_per_column] } then {
76 set myframe middle
77 } else {
78 set myframe right
79 }
80 button .f0.x$menu_num -anchor w -text "$text" \
81 -command "$w .$w \"$text\""
82 pack .f0.x$menu_num -pady 0 -side top -fill x -in .f0.$myframe
83 }
84
85 proc load_configfile { w title func } {
86 catch {destroy $w}
87 toplevel $w -class Dialog
88 global loadfile
89 frame $w.x
90 label $w.bm -bitmap questhead
91 pack $w.bm -pady 10 -side top -padx 10
92 label $w.x.l -text "Enter filename:" -relief raised
93 entry $w.x.x -width 35 -relief sunken -borderwidth 2 \
94 -textvariable loadfile
95 pack $w.x.l $w.x.x -anchor w -side left
96 pack $w.x -side top -pady 10
97 wm title $w "$title"
98
99 set oldFocus [focus]
100 frame $w.f
101 button $w.f.back -text "OK" -width 20 \
102 -command "destroy $w; focus $oldFocus;$func .fileio"
103 button $w.f.canc -text "Cancel" \
104 -width 20 -command "destroy $w; focus $oldFocus"
105 pack $w.f.back $w.f.canc -side left -pady 10 -padx 45
106 pack $w.f -pady 10 -side bottom -padx 10 -anchor w
107 focus $w
108 global winx; global winy
109 set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
110 wm geometry $w +$winx+$winy
111 }
112
113 bind all <Alt-q> {maybe_exit .maybe}
114
115 proc maybe_exit { w } {
116 catch {destroy $w}
117 toplevel $w -class Dialog
118 label $w.bm -bitmap questhead
119 pack $w.bm -pady 10 -side top -padx 10
120 message $w.m -width 400 -aspect 300 \
121 -text "Changes will be lost. Are you sure?" -relief flat
122 pack $w.m -pady 10 -side top -padx 10
123 wm title $w "Are you sure?"
124
125 set oldFocus [focus]
126 frame $w.f
127 button $w.f.back -text "OK" -width 20 \
128 -command "exit 1"
129 button $w.f.canc -text "Cancel" \
130 -width 20 -command "destroy $w; focus $oldFocus"
131 pack $w.f.back $w.f.canc -side left -pady 10 -padx 45
132 pack $w.f -pady 10 -side bottom -padx 10 -anchor w
133 bind $w <Return> "exit 1"
134 bind $w <Escape> "destroy $w; focus $oldFocus"
135 focus $w
136 global winx; global winy
137 set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
138 wm geometry $w +$winx+$winy
139 }
140
141 proc read_config_file { w } {
142 global loadfile
143 if { [string length $loadfile] != 0 && [file readable $loadfile] == 1 } then {
144 read_config $loadfile
145 } else {
146 catch {destroy $w}
147 toplevel $w -class Dialog
148 message $w.m -width 400 -aspect 300 -text \
149 "Unable to read file $loadfile" \
150 -relief raised
151 label $w.bm -bitmap error
152 pack $w.bm $w.m -pady 10 -side top -padx 10
153 wm title $w "Xconfig Internal Error"
154
155 set oldFocus [focus]
156 frame $w.f
157 button $w.f.back -text "Bummer" \
158 -width 10 -command "destroy $w; focus $oldFocus"
159 pack $w.f.back -side bottom -pady 10 -anchor s
160 pack $w.f -pady 10 -side top -padx 10 -anchor s
161 focus $w
162 global winx; global winy
163 set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
164 wm geometry $w +$winx+$winy
165 }
166 }
167
168 proc write_config_file { w } {
169 global loadfile
170 if { [string length $loadfile] != 0
171 && ([file writable $loadfile] == 1 || ([file exists $loadfile] == 0 && [file writable [file dirname $loadfile]] == 1)) } then {
172 writeconfig $loadfile .null
173 } else {
174 catch {destroy $w}
175 toplevel $w -class Dialog
176 message $w.m -width 400 -aspect 300 -text \
177 "Unable to write file $loadfile" \
178 -relief raised
179 label $w.bm -bitmap error
180 pack $w.bm $w.m -pady 10 -side top -padx 10
181 wm title $w "Xconfig Internal Error"
182
183 set oldFocus [focus]
184 frame $w.f
185 button $w.f.back -text "OK" \
186 -width 10 -command "destroy $w; focus $oldFocus"
187 pack $w.f.back -side bottom -pady 10 -anchor s
188 pack $w.f -pady 10 -side top -padx 10 -anchor s
189 focus $w
190 global winx; global winy
191 set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
192 wm geometry $w +$winx+$winy
193 }
194 }
195
196 proc read_config { filename } {
197 set file1 [open $filename r]
198 clear_choices
199 while { [gets $file1 line] >= 0} {
200 if [regexp {([0-9A-Za-z_]+)=([ynm])} $line foo var value] {
201 if { $value == "y" } then { set cmd "global $var; set $var 1" }
202 if { $value == "n" } then { set cmd "global $var; set $var 0" }
203 if { $value == "m" } then { set cmd "global $var; set $var 2" }
204 eval $cmd
205 }
206 if [regexp {# ([0-9A-Za-z_]+) is not set} $line foo var] {
207 set cmd "global $var; set $var 0"
208 eval $cmd
209 }
210 if [regexp {([0-9A-Za-z_]+)=([0-9A-Fa-f]+)} $line foo var value] {
211 set cmd "global $var; set $var $value"
212 eval $cmd
213 }
214 if [regexp {([0-9A-Za-z_]+)="([^"]*)"} $line foo var value] {
215 set cmd "global $var; set $var \"$value\""
216 eval $cmd
217 }
218 }
219 close $file1
220 update_choices
221 update_mainmenu
222 }
223 proc write_comment { file1 file2 text } {
224 puts $file1 ""
225 puts $file1 "#"
226 puts $file1 "# $text"
227 puts $file1 "#"
228 puts $file2 "/*"
229 puts $file2 " * $text"
230 puts $file2 " */"
231 }
232
233 proc effective_dep { deplist } {
234 global CONFIG_MODULES
235 set depend 1
236 foreach i $deplist {
237 if {$i == 0} then {set depend 0}
238 if {$i == 2 && $depend == 1} then {set depend 2}
239 }
240 if {$depend == 2 && $CONFIG_MODULES == 0} then {set depend 0}
241 return $depend
242 }
243
244 proc sync_tristate { var dep } {
245 global CONFIG_MODULES
246 if {$dep == 0 && ($var == 1 || $var == 2)} then {
247 set var 0
248 } elseif {$dep == 2 && $var == 1} then {
249 set var 2
250 } elseif {$var == 2 && $CONFIG_MODULES == 0} then {
251 if {$dep == 1} then {set var 1} else {set var 0}
252 }
253 return $var
254 }
255
256 proc sync_bool { var dep modset } {
257 set var [sync_tristate $var $dep]
258 if {$dep == 2 && $var == 2} then {
259 set var $modset
260 }
261 return $var
262 }
263
264 proc write_tristate { file1 file2 varname variable deplist modset } {
265 set variable [sync_tristate $variable [effective_dep $deplist]]
266 if { $variable == 2 } \
267 then { set variable $modset }
268 if { $variable == 1 } \
269 then { puts $file1 "$varname=y"; \
270 puts $file2 "#define $varname 1" } \
271 elseif { $variable == 2 } \
272 then { puts $file1 "$varname=m"; \
273 puts $file2 "#undef $varname"; \
274 puts $file2 "#define ${varname}_MODULE 1" } \
275 elseif { $variable == 0 } \
276 then { puts $file1 "# $varname is not set"; \
277 puts $file2 "#undef $varname"} \
278 else { \
279 puts stdout "ERROR - Attempting to write value for unconfigured variable ($varname)." \
280 }
281 }
282
283 proc write_int { file1 file2 varname variable dep } {
284 if { $dep == 0 } \
285 then { puts $file1 "# $varname is not set"; \
286 puts $file2 "#undef $varname"} \
287 else {
288 puts $file1 "$varname=$variable"; \
289 puts $file2 "#define $varname ($variable)"; \
290 }
291 }
292
293 proc write_hex { file1 file2 varname variable dep } {
294 if { $dep == 0 } \
295 then { puts $file1 "# $varname is not set"; \
296 puts $file2 "#undef $varname"} \
297 else {
298 puts $file1 "$varname=$variable"; \
299 puts -nonewline $file2 "#define $varname "; \
300 puts $file2 [exec echo $variable | sed s/^0\[xX\]//]; \
301 }
302 }
303
304 proc write_string { file1 file2 varname variable dep } {
305 if { $dep == 0 } \
306 then { puts $file1 "# $varname is not set"; \
307 puts $file2 "#undef $varname"} \
308 else {
309 puts $file1 "$varname=\"$variable\""; \
310 puts $file2 "#define $varname \"$variable\""; \
311 }
312 }
313
314 proc option_name {w mnum line text helpidx} {
315 button $w.x$line.l -text "$text" -relief groove -anchor w
316 $w.x$line.l configure -activefore [cget $w.x$line.l -fg] \
317 -activeback [cget $w.x$line.l -bg]
318 button $w.x$line.help -text "Help" -relief raised \
319 -command "dohelp .dohelp $helpidx .menu$mnum"
320 pack $w.x$line.help -side right -fill y
321 pack $w.x$line.l -side right -fill both -expand on
322 }
323
324 proc toggle_switch2 {w mnum line text variable} {
325 frame $w.x$line -relief sunken
326 radiobutton $w.x$line.y -text "y" -variable $variable -value 1 \
327 -relief groove -width 2 -command "update_active"
328 # radiobutton $w.x$line.m -text "-" -variable $variable -value 2 \
329 # -relief groove -width 2 -command "update_active"
330 radiobutton $w.x$line.n -text "n" -variable $variable -value 0 \
331 -relief groove -width 2 -command "update_active"
332
333 option_name $w $mnum $line $text $variable
334
335 pack $w.x$line.n $w.x$line.y -side right -fill y
336 }
337
338 proc toggle_switch3 {w mnum line text variable} {
339 frame $w.x$line -relief sunken
340 radiobutton $w.x$line.y -text "y" -variable $variable -value 1 \
341 -relief groove -width 2 -command "update_active"
342 radiobutton $w.x$line.m -text "m" -variable $variable -value 2 \
343 -relief groove -width 2 -command "update_active"
344 radiobutton $w.x$line.n -text "n" -variable $variable -value 0 \
345 -relief groove -width 2 -command "update_active"
346
347 option_name $w $mnum $line $text $variable
348
349 global CONFIG_MODULES
350 if {($CONFIG_MODULES == 0)} then {
351 $w.x$line.m configure -state disabled
352 }
353 pack $w.x$line.n $w.x$line.m $w.x$line.y -side right -fill y
354 }
355
356 proc bool {w mnum line text variable} {
357 toggle_switch2 $w $mnum $line $text $variable
358 # $w.x$line.m configure -state disabled
359 pack $w.x$line -anchor w -fill both -expand on
360 }
361
362 proc tristate {w mnum line text variable } {
363 toggle_switch3 $w $mnum $line $text $variable
364 pack $w.x$line -anchor w -fill both -expand on
365 }
366
367 proc dep_tristate {w mnum line text variable } {
368 tristate $w $mnum $line $text $variable
369 }
370
371 proc dep_bool {w mnum line text variable } {
372 bool $w $mnum $line $text $variable
373 }
374
375 proc int { w mnum line text variable } {
376 frame $w.x$line
377 entry $w.x$line.x -width 11 -relief sunken -borderwidth 2 \
378 -textvariable $variable
379 option_name $w $mnum $line $text $variable
380 pack $w.x$line.x -anchor w -side right -fill y
381 pack $w.x$line -anchor w -fill both -expand on
382 }
383
384 proc hex { w mnum line text variable } {
385 int $w $mnum $line $text $variable
386 }
387
388 proc istring { w mnum line text variable } {
389 frame $w.x$line
390 entry $w.x$line.x -width 18 -relief sunken -borderwidth 2 \
391 -textvariable $variable
392 option_name $w $mnum $line $text $variable
393 pack $w.x$line.x -anchor w -side right -fill y
394 pack $w.x$line -anchor w -fill both -expand on
395 }
396
397 proc minimenu { w mnum line text variable helpidx } {
398 frame $w.x$line
399 menubutton $w.x$line.x -textvariable $variable -menu \
400 $w.x$line.x.menu -relief raised \
401 -anchor w
402 option_name $w $mnum $line $text $helpidx
403 pack $w.x$line.x -anchor w -side right -fill y
404 pack $w.x$line -anchor w -fill both -expand on
405 }
406
407 proc menusplit {w m n} {
408 if { $n > 2 } then {
409 update idletasks
410 set menuoptsize [expr [$m yposition 2] - [$m yposition 1]]
411 set maxsize [winfo screenheight $w]
412 set splitpoint [expr $maxsize * 4 / 5 / $menuoptsize - 1]
413 for {set i [expr $splitpoint + 1]} {$i <= $n} {incr i $splitpoint} {
414 $m entryconfigure $i -columnbreak 1
415 }
416 }
417 }
418
419 proc menutitle {text menu w} {
420 wm title $w "$text"
421 }
422
423 proc submenu { w mnum line text subnum } {
424 frame $w.x$line
425 button $w.x$line.l -text "" -width 9 -relief groove
426 $w.x$line.l configure -activefore [cget $w.x$line.l -fg] \
427 -activeback [cget $w.x$line.l -bg] -state disabled
428 button $w.x$line.m -text "$text" -relief raised -anchor w \
429 -command "catch {destroy .menu$subnum}; menu$subnum .menu$subnum \"$text\""
430 pack $w.x$line.l -side left -fill both
431 pack $w.x$line.m -anchor w -side right -fill both -expand on
432 pack $w.x$line -anchor w -fill both -expand on
433 }
434
435 proc comment {w mnum line text } {
436 frame $w.x$line
437 button $w.x$line.l -text "" -width 15 -relief groove
438 $w.x$line.l configure -activefore [cget $w.x$line.l -fg] \
439 -activeback [cget $w.x$line.l -bg] -state disabled
440 button $w.x$line.m -text "$text" -relief groove -anchor w
441 $w.x$line.m configure -activefore [cget $w.x$line.m -fg] \
442 -activeback [cget $w.x$line.m -bg]
443 pack $w.x$line.l -side left -fill both
444 pack $w.x$line.m -anchor w -side right -fill both -expand on
445 pack $w.x$line -anchor w -fill both -expand on
446 }
447
448 proc readhelp {tag fn} {
449 set message ""
450 set b 0
451 if { [file readable $fn] == 1} then {
452 set fhandle [open $fn r]
453 while {[gets $fhandle inline] >= 0} {
454 if { $b == 0 } {
455 if { [regexp $tag $inline ] } {
456 set b 1
457 set message "$inline:\n"
458 }
459 } else {
460 if { [regexp {^[^ \t]} $inline]} {
461 break
462 }
463 set message "$message\n$inline"
464 }
465 }
466 close $fhandle
467 }
468 return $message
469 }
470
471 proc dohelp {w var parent} {
472 catch {destroy $w}
473 toplevel $w -class Dialog
474
475 set filefound 0
476 set found 0
477 set lineno 0
478
479 if { [file readable config.help] == 1} then {
480 set filefound 1
481 # First escape sed regexp special characters in var:
482 set var [exec echo "$var" | sed s/\[\]\[\/.^$*\]/\\\\&/g]
483 # Now pick out right help text:
484 set message [readhelp $var config.help]
485 set found [expr [string length "$message"] > 0]
486 }
487
488 frame $w.f1
489 pack $w.f1 -fill both -expand on
490
491 # Do the OK button
492 #
493 set oldFocus [focus]
494 frame $w.f2
495 button $w.f2.ok -text "OK" \
496 -width 10 -command "destroy $w; catch {focus $oldFocus}"
497 pack $w.f2.ok -side bottom -pady 6 -anchor n
498 pack $w.f2 -side bottom -padx 10 -anchor s
499
500 scrollbar $w.f1.vscroll -command "$w.f1.canvas yview"
501 pack $w.f1.vscroll -side right -fill y
502
503 canvas $w.f1.canvas -relief flat -borderwidth 0 \
504 -yscrollcommand "$w.f1.vscroll set"
505 frame $w.f1.f
506 pack $w.f1.canvas -side right -fill y -expand on
507
508 if { $found == 0 } then {
509 if { $filefound == 0 } then {
510 message $w.f1.f.m -width 750 -aspect 300 -relief flat -text \
511 "No help available - unable to open file config.help."
512 } else {
513 message $w.f1.f.m -width 400 -aspect 300 -relief flat -text \
514 "No help available for $var"
515 }
516 label $w.f1.bm -bitmap error
517 wm title $w "RTFM"
518 } else {
519 text $w.f1.f.m -width 73 -relief flat -wrap word
520 $w.f1.f.m insert 0.0 $message
521 $w.f1.f.m conf -state disabled -height [$w.f1.f.m index end]
522
523 label $w.f1.bm -bitmap info
524 wm title $w "Configuration help"
525 }
526 pack $w.f1.f.m -side left
527 pack $w.f1.bm $w.f1.f -side left -padx 10
528
529 focus $w
530 set winx [expr [winfo x $parent]+20]
531 set winy [expr [winfo y $parent]+20]
532 wm geometry $w +$winx+$winy
533 set sizok [expr [winfo reqheight $w.f2.ok] + 12]
534 set maxy [expr [winfo screenheight .] * 3 / 4]
535 set canvtotal [winfo reqheight $w.f1.f.m]
536 if [expr $sizok + $canvtotal < $maxy] {
537 set sizy $canvtotal
538 } else {
539 set sizy [expr $maxy - $sizok]
540 }
541 $w.f1.canvas configure -height $sizy -width [winfo reqwidth $w.f1.f.m] \
542 -scrollregion "0 0 [winfo reqwidth $w.f1.f.m] \
543 [winfo reqheight $w.f1.f.m]"
544 $w.f1.canvas create window 0 0 -anchor nw -window $w.f1.f
545 update idletasks
546
547 set maxy [winfo screenheight .]
548 if [expr $sizok + $canvtotal < $maxy] {
549 set sizy [expr $sizok + $canvtotal]
550 } else {
551 set sizy $maxy
552 }
553 wm maxsize $w [winfo width $w] $sizy
554 }
555
556 bind all <Alt-s> { catch {exec cp -f .config .config.old}; \
557 writeconfig .config config.h; wrapup .wrap }
558
559 proc wrapup {w } {
560 catch {destroy $w}
561 toplevel $w -class Dialog
562
563 global CONFIG_MODVERSIONS; vfix CONFIG_MODVERSIONS
564 message $w.m -width 460 -aspect 300 -relief raised -text \
565 "End of design configuration. "
566 label $w.bm -bitmap info
567 pack $w.bm $w.m -pady 10 -side top -padx 10
568 wm title $w "LEON build instructions"
569
570 set oldFocus [focus]
571 frame $w.f
572 button $w.f.back -text "OK" \
573 -width 10 -command "exit 2"
574 pack $w.f.back -side bottom -pady 10 -anchor s
575 pack $w.f -pady 10 -side top -padx 10 -anchor s
576 focus $w
577 bind $w <Return> "exit 2"
578 global winx; global winy
579 set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
580 wm geometry $w +$winx+$winy
581
582 }
583
584 proc unregister_active {num} {
585 global active_menus
586 set index [lsearch -exact $active_menus $num]
587 if {$index != -1} then {set active_menus [lreplace $active_menus $index $index]}
588 }
589
590 proc update_active {} {
591 global active_menus total_menus
592 set max 0
593 if {[llength $active_menus] > 0} then {
594 set max [lindex $active_menus end]
595 update_define [toplevel_menu [lindex $active_menus 0]] $max 0
596 }
597 foreach i $active_menus {
598 if {[winfo exists .menu$i] == 0} then {
599 unregister_active $i
600 } else {
601 update_menu$i
602 }
603 }
604 update_define [expr $max + 1] $total_menus 1
605 update_mainmenu
606 }
607
608 proc configure_entry {w option items} {
609 foreach i $items {
610 $w.$i configure -state $option
611 }
612 }
613
614 proc validate_int {name val default} {
615 if {([exec echo $val | sed s/^-//g | tr -d \[:digit:\] ] != "")} then {
616 global $name; set $name $default
617 }
618 }
619
620 proc validate_hex {name val default} {
621 if {([exec echo $val | tr -d \[:xdigit:\] ] != "")} then {
622 global $name; set $name $default
623 }
624 }
625
626 proc update_define {first last allow_update} {
627 for {set i $first} {$i <= $last} {incr i} {
628 update_define_menu$i
629 if {$allow_update == 1} then update
630 }
631 }
632
633 #
634 # Next set up the particulars for the top level menu, and define a few
635 # buttons which we will stick down at the bottom.
636 #
637
638 frame .f0
639 frame .f0.left
640 frame .f0.middle
641 frame .f0.right
642
643 set active_menus [list]
644 set processed_top_level 0
645 set ARCH sparc
646 set menus_per_column 4
647 set total_menus 24
648
649 proc toplevel_menu {num} {
650 if {$num == 4} then {return 3}
651 if {$num == 5} then {return 3}
652 if {$num == 6} then {return 3}
653 if {$num == 7} then {return 3}
654 if {$num == 8} then {return 3}
655 if {$num == 9} then {return 3}
656 if {$num == 10} then {return 3}
657 if {$num == 14} then {return 13}
658 if {$num == 15} then {return 14}
659 if {$num == 16} then {return 14}
660 if {$num == 17} then {return 13}
661 if {$num == 18} then {return 13}
662 if {$num == 19} then {return 13}
663 if {$num == 20} then {return 13}
664 if {$num == 21} then {return 13}
665 if {$num == 22} then {return 21}
666 if {$num == 23} then {return 21}
667 return $num
668 }
669
670 mainmenu_name "LEON3MP Design Configuration"
671 menu_option menu1 1 "Synthesis "
672 proc menu1 {w title} {
673 set oldFocus [focus]
674 catch {destroy $w; unregister_active 1}
675 toplevel $w -class Dialog
676 wm withdraw $w
677 global active_menus
678 set active_menus [lsort -integer [linsert $active_menus end 1]]
679 message $w.m -width 400 -aspect 300 -text \
680 "Synthesis " -relief raised
681 pack $w.m -pady 10 -side top -padx 10
682 wm title $w "Synthesis "
683
684 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 1; break"
685 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 1; menu2 .menu2 \"$title\""
686 frame $w.f
687 button $w.f.back -text "Main Menu" \
688 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 1"
689 button $w.f.next -text "Next" -underline 0\
690 -width 15 -command $nextscript
691 bind all <Alt-n> $nextscript
692 button $w.f.prev -text "Prev" -underline 0\
693 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 1; menu0 .menu0 \"$title\""
694 $w.f.prev configure -state disabled
695 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
696 pack $w.f -pady 10 -side bottom -anchor w -fill x
697 frame $w.topline -relief ridge -borderwidth 2 -height 2
698 pack $w.topline -side top -fill x
699
700 frame $w.botline -relief ridge -borderwidth 2 -height 2
701 pack $w.botline -side bottom -fill x
702
703 frame $w.config
704 pack $w.config -fill y -expand on
705
706 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
707 pack $w.config.vscroll -side right -fill y
708
709 canvas $w.config.canvas -height 1\
710 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
711 -width [expr [winfo screenwidth .] * 1 / 2]
712 frame $w.config.f
713 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
714 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
715 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
716 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
717 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
718 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
719 pack $w.config.canvas -side right -fill y
720
721
722 global tmpvar_0
723 minimenu $w.config.f 1 0 "Target technology " tmpvar_0 CONFIG_SYN_INFERRED
724 menu $w.config.f.x0.x.menu -tearoffcommand "menutitle \"Target technology \""
725 $w.config.f.x0.x.menu add radiobutton -label "Inferred" -variable tmpvar_0 -value "Inferred" -command "update_active"
726 $w.config.f.x0.x.menu add radiobutton -label "Altera-Stratix" -variable tmpvar_0 -value "Altera-Stratix" -command "update_active"
727 $w.config.f.x0.x.menu add radiobutton -label "Altera-StratixII" -variable tmpvar_0 -value "Altera-StratixII" -command "update_active"
728 $w.config.f.x0.x.menu add radiobutton -label "Altera-StratixIII" -variable tmpvar_0 -value "Altera-StratixIII" -command "update_active"
729 $w.config.f.x0.x.menu add radiobutton -label "Altera-CycloneIII" -variable tmpvar_0 -value "Altera-CycloneIII" -command "update_active"
730 $w.config.f.x0.x.menu add radiobutton -label "Altera-Others" -variable tmpvar_0 -value "Altera-Others" -command "update_active"
731 $w.config.f.x0.x.menu add radiobutton -label "Actel-Axcelerator" -variable tmpvar_0 -value "Actel-Axcelerator" -command "update_active"
732 $w.config.f.x0.x.menu add radiobutton -label "Actel-Axcelerator-DSP" -variable tmpvar_0 -value "Actel-Axcelerator-DSP" -command "update_active"
733 $w.config.f.x0.x.menu add radiobutton -label "Actel-Proasic" -variable tmpvar_0 -value "Actel-Proasic" -command "update_active"
734 $w.config.f.x0.x.menu add radiobutton -label "Actel-ProasicPlus" -variable tmpvar_0 -value "Actel-ProasicPlus" -command "update_active"
735 $w.config.f.x0.x.menu add radiobutton -label "Actel-Proasic3" -variable tmpvar_0 -value "Actel-Proasic3" -command "update_active"
736 $w.config.f.x0.x.menu add radiobutton -label "Actel-Proasic3E" -variable tmpvar_0 -value "Actel-Proasic3E" -command "update_active"
737 $w.config.f.x0.x.menu add radiobutton -label "Actel-Proasic3L" -variable tmpvar_0 -value "Actel-Proasic3L" -command "update_active"
738 $w.config.f.x0.x.menu add radiobutton -label "Actel-IGLOO/p/L" -variable tmpvar_0 -value "Actel-IGLOO/p/L" -command "update_active"
739 $w.config.f.x0.x.menu add radiobutton -label "Actel-Fusion" -variable tmpvar_0 -value "Actel-Fusion" -command "update_active"
740 $w.config.f.x0.x.menu add radiobutton -label "Aeroflex-UT025CRH" -variable tmpvar_0 -value "Aeroflex-UT025CRH" -command "update_active"
741 $w.config.f.x0.x.menu add radiobutton -label "Aeroflex-UT130HBD" -variable tmpvar_0 -value "Aeroflex-UT130HBD" -command "update_active"
742 $w.config.f.x0.x.menu add radiobutton -label "Aeroflex-UT90NHBD" -variable tmpvar_0 -value "Aeroflex-UT90NHBD" -command "update_active"
743 $w.config.f.x0.x.menu add radiobutton -label "Atmel-ATC18" -variable tmpvar_0 -value "Atmel-ATC18" -command "update_active"
744 $w.config.f.x0.x.menu add radiobutton -label "Atmel-ATC18RHA" -variable tmpvar_0 -value "Atmel-ATC18RHA" -command "update_active"
745 $w.config.f.x0.x.menu add radiobutton -label "IBM-CMOS9SF" -variable tmpvar_0 -value "IBM-CMOS9SF" -command "update_active"
746 $w.config.f.x0.x.menu add radiobutton -label "Custom1" -variable tmpvar_0 -value "Custom1" -command "update_active"
747 $w.config.f.x0.x.menu add radiobutton -label "eASIC90" -variable tmpvar_0 -value "eASIC90" -command "update_active"
748 $w.config.f.x0.x.menu add radiobutton -label "eASIC45" -variable tmpvar_0 -value "eASIC45" -command "update_active"
749 $w.config.f.x0.x.menu add radiobutton -label "IHP25" -variable tmpvar_0 -value "IHP25" -command "update_active"
750 $w.config.f.x0.x.menu add radiobutton -label "IHP25RH" -variable tmpvar_0 -value "IHP25RH" -command "update_active"
751 $w.config.f.x0.x.menu add radiobutton -label "Lattice-EC/ECP/XP" -variable tmpvar_0 -value "Lattice-EC/ECP/XP" -command "update_active"
752 $w.config.f.x0.x.menu add radiobutton -label "Quicklogic-Eclipse" -variable tmpvar_0 -value "Quicklogic-Eclipse" -command "update_active"
753 $w.config.f.x0.x.menu add radiobutton -label "Peregrine" -variable tmpvar_0 -value "Peregrine" -command "update_active"
754 $w.config.f.x0.x.menu add radiobutton -label "RH-LIB18T" -variable tmpvar_0 -value "RH-LIB18T" -command "update_active"
755 $w.config.f.x0.x.menu add radiobutton -label "RH-UMC" -variable tmpvar_0 -value "RH-UMC" -command "update_active"
756 $w.config.f.x0.x.menu add radiobutton -label "SMIC130" -variable tmpvar_0 -value "SMIC130" -command "update_active"
757 $w.config.f.x0.x.menu add radiobutton -label "TM65Gplus" -variable tmpvar_0 -value "TM65Gplus" -command "update_active"
758 $w.config.f.x0.x.menu add radiobutton -label "TSMC90" -variable tmpvar_0 -value "TSMC90" -command "update_active"
759 $w.config.f.x0.x.menu add radiobutton -label "UMC180" -variable tmpvar_0 -value "UMC180" -command "update_active"
760 $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Spartan2" -variable tmpvar_0 -value "Xilinx-Spartan2" -command "update_active"
761 $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Spartan3" -variable tmpvar_0 -value "Xilinx-Spartan3" -command "update_active"
762 $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Spartan3E" -variable tmpvar_0 -value "Xilinx-Spartan3E" -command "update_active"
763 $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Spartan6" -variable tmpvar_0 -value "Xilinx-Spartan6" -command "update_active"
764 $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Virtex" -variable tmpvar_0 -value "Xilinx-Virtex" -command "update_active"
765 $w.config.f.x0.x.menu add radiobutton -label "Xilinx-VirtexE" -variable tmpvar_0 -value "Xilinx-VirtexE" -command "update_active"
766 $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Virtex2" -variable tmpvar_0 -value "Xilinx-Virtex2" -command "update_active"
767 $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Virtex4" -variable tmpvar_0 -value "Xilinx-Virtex4" -command "update_active"
768 $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Virtex5" -variable tmpvar_0 -value "Xilinx-Virtex5" -command "update_active"
769 $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Virtex6" -variable tmpvar_0 -value "Xilinx-Virtex6" -command "update_active"
770 menusplit $w $w.config.f.x0.x.menu 45
771 global tmpvar_1
772 minimenu $w.config.f 1 1 "Memory Library " tmpvar_1 CONFIG_MEM_INFERRED
773 menu $w.config.f.x1.x.menu -tearoffcommand "menutitle \"Memory Library \""
774 $w.config.f.x1.x.menu add radiobutton -label "Inferred" -variable tmpvar_1 -value "Inferred" -command "update_active"
775 $w.config.f.x1.x.menu add radiobutton -label "UMC18" -variable tmpvar_1 -value "UMC18" -command "update_active"
776 $w.config.f.x1.x.menu add radiobutton -label "RH-UMC" -variable tmpvar_1 -value "RH-UMC" -command "update_active"
777 $w.config.f.x1.x.menu add radiobutton -label "Artisan" -variable tmpvar_1 -value "Artisan" -command "update_active"
778 $w.config.f.x1.x.menu add radiobutton -label "Custom1" -variable tmpvar_1 -value "Custom1" -command "update_active"
779 $w.config.f.x1.x.menu add radiobutton -label "Virage" -variable tmpvar_1 -value "Virage" -command "update_active"
780 $w.config.f.x1.x.menu add radiobutton -label "Virage-TSMC90" -variable tmpvar_1 -value "Virage-TSMC90" -command "update_active"
781 menusplit $w $w.config.f.x1.x.menu 7
782 bool $w.config.f 1 2 "Infer RAM" CONFIG_SYN_INFER_RAM
783 bool $w.config.f 1 3 "Infer pads" CONFIG_SYN_INFER_PADS
784 bool $w.config.f 1 4 "Disable asynchronous reset" CONFIG_SYN_NO_ASYNC
785 bool $w.config.f 1 5 "Enable scan support " CONFIG_SYN_SCAN
786
787
788
789 focus $w
790 update_active
791 global winx; global winy
792 set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
793 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
794 update idletasks
795 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
796
797 $w.config.canvas configure \
798 -width [expr [winfo reqwidth $w.config.f] + 1]\
799 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
800 [expr [winfo reqheight $w.config.f] + 1]"
801
802 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
803 set scry [expr [winfo screenh $w] / 2]
804 set maxy [expr [winfo screenh $w] * 3 / 4]
805 set canvtotal [expr [winfo reqh $w.config.f] + 2]
806 if [expr $winy + $canvtotal < $maxy] {
807 $w.config.canvas configure -height $canvtotal
808 } else {
809 $w.config.canvas configure -height [expr $scry - $winy]
810 }
811 }
812 update idletasks
813 if {[winfo exists $w]} then {
814 wm maxsize $w [winfo width $w] [winfo screenheight $w]
815 wm minsize $w [winfo width $w] 100
816
817 wm deiconify $w
818 }
819 }
820
821 proc update_menu1 {} {
822 global CONFIG_SYN_INFERRED
823 global CONFIG_SYN_CUSTOM1
824 global CONFIG_SYN_ATC18
825 global CONFIG_SYN_TSMC90
826 global CONFIG_SYN_UMC
827 global CONFIG_SYN_RHUMC
828 global CONFIG_SYN_ARTISAN
829 if {($CONFIG_SYN_INFERRED == 1 || $CONFIG_SYN_CUSTOM1 == 1 || $CONFIG_SYN_ATC18 == 1 || $CONFIG_SYN_TSMC90 == 1 || $CONFIG_SYN_UMC == 1 || $CONFIG_SYN_RHUMC == 1 || $CONFIG_SYN_ARTISAN == 1)} then {configure_entry .menu1.config.f.x1 normal {x l}} else {configure_entry .menu1.config.f.x1 disabled {x l}}
830 global CONFIG_SYN_INFER_RAM
831 if {($CONFIG_SYN_INFERRED != 1)} then {
832 configure_entry .menu1.config.f.x2 normal {n l y}} else {configure_entry .menu1.config.f.x2 disabled {y n l}}
833 global CONFIG_SYN_INFER_PADS
834 if {($CONFIG_SYN_INFERRED != 1)} then {
835 configure_entry .menu1.config.f.x3 normal {n l y}} else {configure_entry .menu1.config.f.x3 disabled {y n l}}
836 }
837
838
839 proc update_define_menu1 {} {
840 update_define_mainmenu
841 global CONFIG_MODULES
842 global tmpvar_0
843 global CONFIG_SYN_INFERRED
844 if {$tmpvar_0 == "Inferred"} then {set CONFIG_SYN_INFERRED 1} else {set CONFIG_SYN_INFERRED 0}
845 global CONFIG_SYN_STRATIX
846 if {$tmpvar_0 == "Altera-Stratix"} then {set CONFIG_SYN_STRATIX 1} else {set CONFIG_SYN_STRATIX 0}
847 global CONFIG_SYN_STRATIXII
848 if {$tmpvar_0 == "Altera-StratixII"} then {set CONFIG_SYN_STRATIXII 1} else {set CONFIG_SYN_STRATIXII 0}
849 global CONFIG_SYN_STRATIXIII
850 if {$tmpvar_0 == "Altera-StratixIII"} then {set CONFIG_SYN_STRATIXIII 1} else {set CONFIG_SYN_STRATIXIII 0}
851 global CONFIG_SYN_CYCLONEIII
852 if {$tmpvar_0 == "Altera-CycloneIII"} then {set CONFIG_SYN_CYCLONEIII 1} else {set CONFIG_SYN_CYCLONEIII 0}
853 global CONFIG_SYN_ALTERA
854 if {$tmpvar_0 == "Altera-Others"} then {set CONFIG_SYN_ALTERA 1} else {set CONFIG_SYN_ALTERA 0}
855 global CONFIG_SYN_AXCEL
856 if {$tmpvar_0 == "Actel-Axcelerator"} then {set CONFIG_SYN_AXCEL 1} else {set CONFIG_SYN_AXCEL 0}
857 global CONFIG_SYN_AXDSP
858 if {$tmpvar_0 == "Actel-Axcelerator-DSP"} then {set CONFIG_SYN_AXDSP 1} else {set CONFIG_SYN_AXDSP 0}
859 global CONFIG_SYN_PROASIC
860 if {$tmpvar_0 == "Actel-Proasic"} then {set CONFIG_SYN_PROASIC 1} else {set CONFIG_SYN_PROASIC 0}
861 global CONFIG_SYN_PROASICPLUS
862 if {$tmpvar_0 == "Actel-ProasicPlus"} then {set CONFIG_SYN_PROASICPLUS 1} else {set CONFIG_SYN_PROASICPLUS 0}
863 global CONFIG_SYN_PROASIC3
864 if {$tmpvar_0 == "Actel-Proasic3"} then {set CONFIG_SYN_PROASIC3 1} else {set CONFIG_SYN_PROASIC3 0}
865 global CONFIG_SYN_PROASIC3E
866 if {$tmpvar_0 == "Actel-Proasic3E"} then {set CONFIG_SYN_PROASIC3E 1} else {set CONFIG_SYN_PROASIC3E 0}
867 global CONFIG_SYN_PROASIC3L
868 if {$tmpvar_0 == "Actel-Proasic3L"} then {set CONFIG_SYN_PROASIC3L 1} else {set CONFIG_SYN_PROASIC3L 0}
869 global CONFIG_SYN_IGLOO
870 if {$tmpvar_0 == "Actel-IGLOO/p/L"} then {set CONFIG_SYN_IGLOO 1} else {set CONFIG_SYN_IGLOO 0}
871 global CONFIG_SYN_FUSION
872 if {$tmpvar_0 == "Actel-Fusion"} then {set CONFIG_SYN_FUSION 1} else {set CONFIG_SYN_FUSION 0}
873 global CONFIG_SYN_UT025CRH
874 if {$tmpvar_0 == "Aeroflex-UT025CRH"} then {set CONFIG_SYN_UT025CRH 1} else {set CONFIG_SYN_UT025CRH 0}
875 global CONFIG_SYN_UT130HBD
876 if {$tmpvar_0 == "Aeroflex-UT130HBD"} then {set CONFIG_SYN_UT130HBD 1} else {set CONFIG_SYN_UT130HBD 0}
877 global CONFIG_SYN_UT90NHBD
878 if {$tmpvar_0 == "Aeroflex-UT90NHBD"} then {set CONFIG_SYN_UT90NHBD 1} else {set CONFIG_SYN_UT90NHBD 0}
879 global CONFIG_SYN_ATC18
880 if {$tmpvar_0 == "Atmel-ATC18"} then {set CONFIG_SYN_ATC18 1} else {set CONFIG_SYN_ATC18 0}
881 global CONFIG_SYN_ATC18RHA
882 if {$tmpvar_0 == "Atmel-ATC18RHA"} then {set CONFIG_SYN_ATC18RHA 1} else {set CONFIG_SYN_ATC18RHA 0}
883 global CONFIG_SYN_CMOS9SF
884 if {$tmpvar_0 == "IBM-CMOS9SF"} then {set CONFIG_SYN_CMOS9SF 1} else {set CONFIG_SYN_CMOS9SF 0}
885 global CONFIG_SYN_CUSTOM1
886 if {$tmpvar_0 == "Custom1"} then {set CONFIG_SYN_CUSTOM1 1} else {set CONFIG_SYN_CUSTOM1 0}
887 global CONFIG_SYN_EASIC90
888 if {$tmpvar_0 == "eASIC90"} then {set CONFIG_SYN_EASIC90 1} else {set CONFIG_SYN_EASIC90 0}
889 global CONFIG_SYN_EASIC45
890 if {$tmpvar_0 == "eASIC45"} then {set CONFIG_SYN_EASIC45 1} else {set CONFIG_SYN_EASIC45 0}
891 global CONFIG_SYN_IHP25
892 if {$tmpvar_0 == "IHP25"} then {set CONFIG_SYN_IHP25 1} else {set CONFIG_SYN_IHP25 0}
893 global CONFIG_SYN_IHP25RH
894 if {$tmpvar_0 == "IHP25RH"} then {set CONFIG_SYN_IHP25RH 1} else {set CONFIG_SYN_IHP25RH 0}
895 global CONFIG_SYN_LATTICE
896 if {$tmpvar_0 == "Lattice-EC/ECP/XP"} then {set CONFIG_SYN_LATTICE 1} else {set CONFIG_SYN_LATTICE 0}
897 global CONFIG_SYN_ECLIPSE
898 if {$tmpvar_0 == "Quicklogic-Eclipse"} then {set CONFIG_SYN_ECLIPSE 1} else {set CONFIG_SYN_ECLIPSE 0}
899 global CONFIG_SYN_PEREGRINE
900 if {$tmpvar_0 == "Peregrine"} then {set CONFIG_SYN_PEREGRINE 1} else {set CONFIG_SYN_PEREGRINE 0}
901 global CONFIG_SYN_RH_LIB18T
902 if {$tmpvar_0 == "RH-LIB18T"} then {set CONFIG_SYN_RH_LIB18T 1} else {set CONFIG_SYN_RH_LIB18T 0}
903 global CONFIG_SYN_RHUMC
904 if {$tmpvar_0 == "RH-UMC"} then {set CONFIG_SYN_RHUMC 1} else {set CONFIG_SYN_RHUMC 0}
905 global CONFIG_SYN_SMIC13
906 if {$tmpvar_0 == "SMIC130"} then {set CONFIG_SYN_SMIC13 1} else {set CONFIG_SYN_SMIC13 0}
907 global CONFIG_SYN_TM65GPLUS
908 if {$tmpvar_0 == "TM65Gplus"} then {set CONFIG_SYN_TM65GPLUS 1} else {set CONFIG_SYN_TM65GPLUS 0}
909 global CONFIG_SYN_TSMC90
910 if {$tmpvar_0 == "TSMC90"} then {set CONFIG_SYN_TSMC90 1} else {set CONFIG_SYN_TSMC90 0}
911 global CONFIG_SYN_UMC
912 if {$tmpvar_0 == "UMC180"} then {set CONFIG_SYN_UMC 1} else {set CONFIG_SYN_UMC 0}
913 global CONFIG_SYN_SPARTAN2
914 if {$tmpvar_0 == "Xilinx-Spartan2"} then {set CONFIG_SYN_SPARTAN2 1} else {set CONFIG_SYN_SPARTAN2 0}
915 global CONFIG_SYN_SPARTAN3
916 if {$tmpvar_0 == "Xilinx-Spartan3"} then {set CONFIG_SYN_SPARTAN3 1} else {set CONFIG_SYN_SPARTAN3 0}
917 global CONFIG_SYN_SPARTAN3E
918 if {$tmpvar_0 == "Xilinx-Spartan3E"} then {set CONFIG_SYN_SPARTAN3E 1} else {set CONFIG_SYN_SPARTAN3E 0}
919 global CONFIG_SYN_SPARTAN6
920 if {$tmpvar_0 == "Xilinx-Spartan6"} then {set CONFIG_SYN_SPARTAN6 1} else {set CONFIG_SYN_SPARTAN6 0}
921 global CONFIG_SYN_VIRTEX
922 if {$tmpvar_0 == "Xilinx-Virtex"} then {set CONFIG_SYN_VIRTEX 1} else {set CONFIG_SYN_VIRTEX 0}
923 global CONFIG_SYN_VIRTEXE
924 if {$tmpvar_0 == "Xilinx-VirtexE"} then {set CONFIG_SYN_VIRTEXE 1} else {set CONFIG_SYN_VIRTEXE 0}
925 global CONFIG_SYN_VIRTEX2
926 if {$tmpvar_0 == "Xilinx-Virtex2"} then {set CONFIG_SYN_VIRTEX2 1} else {set CONFIG_SYN_VIRTEX2 0}
927 global CONFIG_SYN_VIRTEX4
928 if {$tmpvar_0 == "Xilinx-Virtex4"} then {set CONFIG_SYN_VIRTEX4 1} else {set CONFIG_SYN_VIRTEX4 0}
929 global CONFIG_SYN_VIRTEX5
930 if {$tmpvar_0 == "Xilinx-Virtex5"} then {set CONFIG_SYN_VIRTEX5 1} else {set CONFIG_SYN_VIRTEX5 0}
931 global CONFIG_SYN_VIRTEX6
932 if {$tmpvar_0 == "Xilinx-Virtex6"} then {set CONFIG_SYN_VIRTEX6 1} else {set CONFIG_SYN_VIRTEX6 0}
933 global tmpvar_1
934 global CONFIG_MEM_INFERRED
935 if {$tmpvar_1 == "Inferred"} then {set CONFIG_MEM_INFERRED 1} else {set CONFIG_MEM_INFERRED 0}
936 global CONFIG_MEM_UMC
937 if {$tmpvar_1 == "UMC18"} then {set CONFIG_MEM_UMC 1} else {set CONFIG_MEM_UMC 0}
938 global CONFIG_MEM_RHUMC
939 if {$tmpvar_1 == "RH-UMC"} then {set CONFIG_MEM_RHUMC 1} else {set CONFIG_MEM_RHUMC 0}
940 global CONFIG_MEM_ARTISAN
941 if {$tmpvar_1 == "Artisan"} then {set CONFIG_MEM_ARTISAN 1} else {set CONFIG_MEM_ARTISAN 0}
942 global CONFIG_MEM_CUSTOM1
943 if {$tmpvar_1 == "Custom1"} then {set CONFIG_MEM_CUSTOM1 1} else {set CONFIG_MEM_CUSTOM1 0}
944 global CONFIG_MEM_VIRAGE
945 if {$tmpvar_1 == "Virage"} then {set CONFIG_MEM_VIRAGE 1} else {set CONFIG_MEM_VIRAGE 0}
946 global CONFIG_MEM_VIRAGE90
947 if {$tmpvar_1 == "Virage-TSMC90"} then {set CONFIG_MEM_VIRAGE90 1} else {set CONFIG_MEM_VIRAGE90 0}
948 global CONFIG_SYN_INFER_RAM
949 if {($CONFIG_SYN_INFERRED != 1)} then {
950 set CONFIG_SYN_INFER_RAM [expr $CONFIG_SYN_INFER_RAM&15]} else {set CONFIG_SYN_INFER_RAM [expr $CONFIG_SYN_INFER_RAM|16]}
951 global CONFIG_SYN_INFER_PADS
952 if {($CONFIG_SYN_INFERRED != 1)} then {
953 set CONFIG_SYN_INFER_PADS [expr $CONFIG_SYN_INFER_PADS&15]} else {set CONFIG_SYN_INFER_PADS [expr $CONFIG_SYN_INFER_PADS|16]}
954 }
955
956
957 menu_option menu2 2 "Clock generation"
958 proc menu2 {w title} {
959 set oldFocus [focus]
960 catch {destroy $w; unregister_active 2}
961 toplevel $w -class Dialog
962 wm withdraw $w
963 global active_menus
964 set active_menus [lsort -integer [linsert $active_menus end 2]]
965 message $w.m -width 400 -aspect 300 -text \
966 "Clock generation" -relief raised
967 pack $w.m -pady 10 -side top -padx 10
968 wm title $w "Clock generation"
969
970 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 2; break"
971 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 2; menu3 .menu3 \"$title\""
972 frame $w.f
973 button $w.f.back -text "Main Menu" \
974 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 2"
975 button $w.f.next -text "Next" -underline 0\
976 -width 15 -command $nextscript
977 bind all <Alt-n> $nextscript
978 button $w.f.prev -text "Prev" -underline 0\
979 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 2; menu1 .menu1 \"$title\""
980 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 2; menu1 .menu1 \"$title\";break"
981 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
982 pack $w.f -pady 10 -side bottom -anchor w -fill x
983 frame $w.topline -relief ridge -borderwidth 2 -height 2
984 pack $w.topline -side top -fill x
985
986 frame $w.botline -relief ridge -borderwidth 2 -height 2
987 pack $w.botline -side bottom -fill x
988
989 frame $w.config
990 pack $w.config -fill y -expand on
991
992 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
993 pack $w.config.vscroll -side right -fill y
994
995 canvas $w.config.canvas -height 1\
996 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
997 -width [expr [winfo screenwidth .] * 1 / 2]
998 frame $w.config.f
999 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
1000 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
1001 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
1002 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
1003 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
1004 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
1005 pack $w.config.canvas -side right -fill y
1006
1007
1008 global tmpvar_2
1009 minimenu $w.config.f 2 0 "Clock generator " tmpvar_2 CONFIG_CLK_INFERRED
1010 menu $w.config.f.x0.x.menu -tearoffcommand "menutitle \"Clock generator \""
1011 $w.config.f.x0.x.menu add radiobutton -label "Inferred" -variable tmpvar_2 -value "Inferred" -command "update_active"
1012 $w.config.f.x0.x.menu add radiobutton -label "Actel-HCLKBUF" -variable tmpvar_2 -value "Actel-HCLKBUF" -command "update_active"
1013 $w.config.f.x0.x.menu add radiobutton -label "Aeroflex-UT130HBD" -variable tmpvar_2 -value "Aeroflex-UT130HBD" -command "update_active"
1014 $w.config.f.x0.x.menu add radiobutton -label "Altera-ALTPLL" -variable tmpvar_2 -value "Altera-ALTPLL" -command "update_active"
1015 $w.config.f.x0.x.menu add radiobutton -label "Lattice-EXPLL" -variable tmpvar_2 -value "Lattice-EXPLL" -command "update_active"
1016 $w.config.f.x0.x.menu add radiobutton -label "Proasic3-PLL" -variable tmpvar_2 -value "Proasic3-PLL" -command "update_active"
1017 $w.config.f.x0.x.menu add radiobutton -label "Proasic3E-PLL" -variable tmpvar_2 -value "Proasic3E-PLL" -command "update_active"
1018 $w.config.f.x0.x.menu add radiobutton -label "Proasic3L-PLL" -variable tmpvar_2 -value "Proasic3L-PLL" -command "update_active"
1019 $w.config.f.x0.x.menu add radiobutton -label "Fusion-PLL" -variable tmpvar_2 -value "Fusion-PLL" -command "update_active"
1020 $w.config.f.x0.x.menu add radiobutton -label "RH-LIB18T-PLL" -variable tmpvar_2 -value "RH-LIB18T-PLL" -command "update_active"
1021 $w.config.f.x0.x.menu add radiobutton -label "DARE-PLL" -variable tmpvar_2 -value "DARE-PLL" -command "update_active"
1022 $w.config.f.x0.x.menu add radiobutton -label "Xilinx-CLKDLL" -variable tmpvar_2 -value "Xilinx-CLKDLL" -command "update_active"
1023 $w.config.f.x0.x.menu add radiobutton -label "Xilinx-DCM" -variable tmpvar_2 -value "Xilinx-DCM" -command "update_active"
1024 menusplit $w $w.config.f.x0.x.menu 13
1025 int $w.config.f 2 1 "Clock multiplication factor (allowed values are tech dependent)" CONFIG_CLK_MUL
1026 int $w.config.f 2 2 "Clock division factor (allowed values are tech dependent)" CONFIG_CLK_DIV
1027 int $w.config.f 2 3 "Outout division factor (1 - 32)" CONFIG_OCLK_DIV
1028 int $w.config.f 2 4 "Outout division factor, 2nd clk (0 - 32, see help)" CONFIG_OCLKB_DIV
1029 int $w.config.f 2 5 "Outout division factor, 3rd clk (0 - 32, see help)" CONFIG_OCLKC_DIV
1030 bool $w.config.f 2 6 "Enable Xilinx CLKDLL for PCI clock" CONFIG_PCI_CLKDLL
1031 bool $w.config.f 2 7 "Disable external feedback for SDRAM clock" CONFIG_CLK_NOFB
1032 bool $w.config.f 2 8 "Use PCI clock as system clock" CONFIG_PCI_SYSCLK
1033
1034
1035
1036 focus $w
1037 update_active
1038 global winx; global winy
1039 set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
1040 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
1041 update idletasks
1042 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
1043
1044 $w.config.canvas configure \
1045 -width [expr [winfo reqwidth $w.config.f] + 1]\
1046 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
1047 [expr [winfo reqheight $w.config.f] + 1]"
1048
1049 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
1050 set scry [expr [winfo screenh $w] / 2]
1051 set maxy [expr [winfo screenh $w] * 3 / 4]
1052 set canvtotal [expr [winfo reqh $w.config.f] + 2]
1053 if [expr $winy + $canvtotal < $maxy] {
1054 $w.config.canvas configure -height $canvtotal
1055 } else {
1056 $w.config.canvas configure -height [expr $scry - $winy]
1057 }
1058 }
1059 update idletasks
1060 if {[winfo exists $w]} then {
1061 wm maxsize $w [winfo width $w] [winfo screenheight $w]
1062 wm minsize $w [winfo width $w] 100
1063
1064 wm deiconify $w
1065 }
1066 }
1067
1068 proc update_menu2 {} {
1069 global CONFIG_CLK_DCM
1070 global CONFIG_CLK_ALTDLL
1071 global CONFIG_CLK_LATDLL
1072 global CONFIG_CLK_PRO3PLL
1073 global CONFIG_CLK_PRO3EPLL
1074 global CONFIG_CLK_PRO3LPLL
1075 global CONFIG_CLK_CLKDLL
1076 global CONFIG_CLK_LIB18T
1077 global CONFIG_CLK_FUSPLL
1078 global CONFIG_CLK_MUL
1079 if {($CONFIG_CLK_DCM == 1 || $CONFIG_CLK_ALTDLL == 1 || $CONFIG_CLK_LATDLL == 1 || $CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_CLKDLL == 1 || $CONFIG_CLK_LIB18T == 1 || $CONFIG_CLK_FUSPLL == 1)} then {.menu2.config.f.x1.x configure -state normal -foreground [ cget .ref -foreground ]; .menu2.config.f.x1.l configure -state normal; } else {.menu2.config.f.x1.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu2.config.f.x1.l configure -state disabled}
1080 global CONFIG_CLK_DIV
1081 if {($CONFIG_CLK_DCM == 1 || $CONFIG_CLK_ALTDLL == 1 || $CONFIG_CLK_LATDLL == 1 || $CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_CLKDLL == 1 || $CONFIG_CLK_LIB18T == 1 || $CONFIG_CLK_FUSPLL == 1)} then {.menu2.config.f.x2.x configure -state normal -foreground [ cget .ref -foreground ]; .menu2.config.f.x2.l configure -state normal; } else {.menu2.config.f.x2.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu2.config.f.x2.l configure -state disabled}
1082 global CONFIG_OCLK_DIV
1083 if {($CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_FUSPLL == 1)} then {.menu2.config.f.x3.x configure -state normal -foreground [ cget .ref -foreground ]; .menu2.config.f.x3.l configure -state normal; } else {.menu2.config.f.x3.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu2.config.f.x3.l configure -state disabled}
1084 global CONFIG_OCLKB_DIV
1085 if {($CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_FUSPLL == 1)} then {.menu2.config.f.x4.x configure -state normal -foreground [ cget .ref -foreground ]; .menu2.config.f.x4.l configure -state normal; } else {.menu2.config.f.x4.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu2.config.f.x4.l configure -state disabled}
1086 global CONFIG_OCLKC_DIV
1087 if {($CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_FUSPLL == 1)} then {.menu2.config.f.x5.x configure -state normal -foreground [ cget .ref -foreground ]; .menu2.config.f.x5.l configure -state normal; } else {.menu2.config.f.x5.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu2.config.f.x5.l configure -state disabled}
1088 global CONFIG_PCI_CLKDLL
1089 if {($CONFIG_CLK_CLKDLL == 1 || $CONFIG_CLK_DCM == 1)} then {
1090 configure_entry .menu2.config.f.x6 normal {n l y}} else {configure_entry .menu2.config.f.x6 disabled {y n l}}
1091 global CONFIG_CLK_NOFB
1092 if {($CONFIG_CLK_DCM == 1)} then {
1093 configure_entry .menu2.config.f.x7 normal {n l y}} else {configure_entry .menu2.config.f.x7 disabled {y n l}}
1094 global CONFIG_PCI_ENABLE
1095 global CONFIG_PCI_SYSCLK
1096 if {($CONFIG_PCI_ENABLE != 1)} then {
1097 configure_entry .menu2.config.f.x8 normal {n l y}} else {configure_entry .menu2.config.f.x8 disabled {y n l}}
1098 }
1099
1100
1101 proc update_define_menu2 {} {
1102 update_define_mainmenu
1103 global CONFIG_MODULES
1104 global tmpvar_2
1105 global CONFIG_CLK_INFERRED
1106 if {$tmpvar_2 == "Inferred"} then {set CONFIG_CLK_INFERRED 1} else {set CONFIG_CLK_INFERRED 0}
1107 global CONFIG_CLK_HCLKBUF
1108 if {$tmpvar_2 == "Actel-HCLKBUF"} then {set CONFIG_CLK_HCLKBUF 1} else {set CONFIG_CLK_HCLKBUF 0}
1109 global CONFIG_CLK_UT130HBD
1110 if {$tmpvar_2 == "Aeroflex-UT130HBD"} then {set CONFIG_CLK_UT130HBD 1} else {set CONFIG_CLK_UT130HBD 0}
1111 global CONFIG_CLK_ALTDLL
1112 if {$tmpvar_2 == "Altera-ALTPLL"} then {set CONFIG_CLK_ALTDLL 1} else {set CONFIG_CLK_ALTDLL 0}
1113 global CONFIG_CLK_LATDLL
1114 if {$tmpvar_2 == "Lattice-EXPLL"} then {set CONFIG_CLK_LATDLL 1} else {set CONFIG_CLK_LATDLL 0}
1115 global CONFIG_CLK_PRO3PLL
1116 if {$tmpvar_2 == "Proasic3-PLL"} then {set CONFIG_CLK_PRO3PLL 1} else {set CONFIG_CLK_PRO3PLL 0}
1117 global CONFIG_CLK_PRO3EPLL
1118 if {$tmpvar_2 == "Proasic3E-PLL"} then {set CONFIG_CLK_PRO3EPLL 1} else {set CONFIG_CLK_PRO3EPLL 0}
1119 global CONFIG_CLK_PRO3LPLL
1120 if {$tmpvar_2 == "Proasic3L-PLL"} then {set CONFIG_CLK_PRO3LPLL 1} else {set CONFIG_CLK_PRO3LPLL 0}
1121 global CONFIG_CLK_FUSPLL
1122 if {$tmpvar_2 == "Fusion-PLL"} then {set CONFIG_CLK_FUSPLL 1} else {set CONFIG_CLK_FUSPLL 0}
1123 global CONFIG_CLK_LIB18T
1124 if {$tmpvar_2 == "RH-LIB18T-PLL"} then {set CONFIG_CLK_LIB18T 1} else {set CONFIG_CLK_LIB18T 0}
1125 global CONFIG_CLK_RHUMC
1126 if {$tmpvar_2 == "DARE-PLL"} then {set CONFIG_CLK_RHUMC 1} else {set CONFIG_CLK_RHUMC 0}
1127 global CONFIG_CLK_CLKDLL
1128 if {$tmpvar_2 == "Xilinx-CLKDLL"} then {set CONFIG_CLK_CLKDLL 1} else {set CONFIG_CLK_CLKDLL 0}
1129 global CONFIG_CLK_DCM
1130 if {$tmpvar_2 == "Xilinx-DCM"} then {set CONFIG_CLK_DCM 1} else {set CONFIG_CLK_DCM 0}
1131 global CONFIG_CLK_MUL
1132 if {($CONFIG_CLK_DCM == 1 || $CONFIG_CLK_ALTDLL == 1 || $CONFIG_CLK_LATDLL == 1 || $CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_CLKDLL == 1 || $CONFIG_CLK_LIB18T == 1 || $CONFIG_CLK_FUSPLL == 1)} then {validate_int CONFIG_CLK_MUL "$CONFIG_CLK_MUL" 2}
1133 global CONFIG_CLK_DIV
1134 if {($CONFIG_CLK_DCM == 1 || $CONFIG_CLK_ALTDLL == 1 || $CONFIG_CLK_LATDLL == 1 || $CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_CLKDLL == 1 || $CONFIG_CLK_LIB18T == 1 || $CONFIG_CLK_FUSPLL == 1)} then {validate_int CONFIG_CLK_DIV "$CONFIG_CLK_DIV" 2}
1135 global CONFIG_OCLK_DIV
1136 if {($CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_FUSPLL == 1)} then {validate_int CONFIG_OCLK_DIV "$CONFIG_OCLK_DIV" 1}
1137 global CONFIG_OCLKB_DIV
1138 if {($CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_FUSPLL == 1)} then {validate_int CONFIG_OCLKB_DIV "$CONFIG_OCLKB_DIV" 0}
1139 global CONFIG_OCLKC_DIV
1140 if {($CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_FUSPLL == 1)} then {validate_int CONFIG_OCLKC_DIV "$CONFIG_OCLKC_DIV" 0}
1141 global CONFIG_PCI_CLKDLL
1142 if {($CONFIG_CLK_CLKDLL == 1 || $CONFIG_CLK_DCM == 1)} then {
1143 set CONFIG_PCI_CLKDLL [expr $CONFIG_PCI_CLKDLL&15]} else {set CONFIG_PCI_CLKDLL [expr $CONFIG_PCI_CLKDLL|16]}
1144 global CONFIG_CLK_NOFB
1145 if {($CONFIG_CLK_DCM == 1)} then {
1146 set CONFIG_CLK_NOFB [expr $CONFIG_CLK_NOFB&15]} else {set CONFIG_CLK_NOFB [expr $CONFIG_CLK_NOFB|16]}
1147 global CONFIG_PCI_ENABLE
1148 global CONFIG_PCI_SYSCLK
1149 if {($CONFIG_PCI_ENABLE != 1)} then {
1150 set CONFIG_PCI_SYSCLK [expr $CONFIG_PCI_SYSCLK&15]} else {set CONFIG_PCI_SYSCLK [expr $CONFIG_PCI_SYSCLK|16]}
1151 }
1152
1153
1154 menu_option menu3 3 "Processor "
1155 proc menu3 {w title} {
1156 set oldFocus [focus]
1157 catch {destroy $w; unregister_active 3}
1158 toplevel $w -class Dialog
1159 wm withdraw $w
1160 global active_menus
1161 set active_menus [lsort -integer [linsert $active_menus end 3]]
1162 message $w.m -width 400 -aspect 300 -text \
1163 "Processor " -relief raised
1164 pack $w.m -pady 10 -side top -padx 10
1165 wm title $w "Processor "
1166
1167 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 3; break"
1168 set nextscript "catch {focus $oldFocus}; menu4 .menu4 \"$title\""
1169 frame $w.f
1170 button $w.f.back -text "Main Menu" \
1171 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 3"
1172 button $w.f.next -text "Next" -underline 0\
1173 -width 15 -command $nextscript
1174 bind all <Alt-n> $nextscript
1175 button $w.f.prev -text "Prev" -underline 0\
1176 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 3; menu2 .menu2 \"$title\""
1177 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 3; menu2 .menu2 \"$title\";break"
1178 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
1179 pack $w.f -pady 10 -side bottom -anchor w -fill x
1180 frame $w.topline -relief ridge -borderwidth 2 -height 2
1181 pack $w.topline -side top -fill x
1182
1183 frame $w.botline -relief ridge -borderwidth 2 -height 2
1184 pack $w.botline -side bottom -fill x
1185
1186 frame $w.config
1187 pack $w.config -fill y -expand on
1188
1189 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
1190 pack $w.config.vscroll -side right -fill y
1191
1192 canvas $w.config.canvas -height 1\
1193 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
1194 -width [expr [winfo screenwidth .] * 1 / 2]
1195 frame $w.config.f
1196 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
1197 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
1198 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
1199 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
1200 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
1201 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
1202 pack $w.config.canvas -side right -fill y
1203
1204
1205 bool $w.config.f 3 0 "Enable LEON3 SPARC V8 Processor" CONFIG_LEON3
1206 int $w.config.f 3 1 "Number of processors" CONFIG_PROC_NUM
1207 submenu $w.config.f 3 2 "Integer unit " 4
1208 submenu $w.config.f 3 3 "Floating-point unit" 5
1209 submenu $w.config.f 3 4 "Cache system" 6
1210 submenu $w.config.f 3 5 "MMU" 7
1211 submenu $w.config.f 3 6 "Debug Support Unit " 8
1212 submenu $w.config.f 3 7 "Fault-tolerance " 9
1213 submenu $w.config.f 3 8 "VHDL debug settings " 10
1214
1215
1216
1217 focus $w
1218 update_active
1219 global winx; global winy
1220 set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
1221 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
1222 update idletasks
1223 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
1224
1225 $w.config.canvas configure \
1226 -width [expr [winfo reqwidth $w.config.f] + 1]\
1227 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
1228 [expr [winfo reqheight $w.config.f] + 1]"
1229
1230 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
1231 set scry [expr [winfo screenh $w] / 2]
1232 set maxy [expr [winfo screenh $w] * 3 / 4]
1233 set canvtotal [expr [winfo reqh $w.config.f] + 2]
1234 if [expr $winy + $canvtotal < $maxy] {
1235 $w.config.canvas configure -height $canvtotal
1236 } else {
1237 $w.config.canvas configure -height [expr $scry - $winy]
1238 }
1239 }
1240 update idletasks
1241 if {[winfo exists $w]} then {
1242 wm maxsize $w [winfo width $w] [winfo screenheight $w]
1243 wm minsize $w [winfo width $w] 100
1244
1245 wm deiconify $w
1246 }
1247 }
1248
1249 proc update_menu3 {} {
1250 global CONFIG_LEON3
1251 global CONFIG_PROC_NUM
1252 if {($CONFIG_LEON3 == 1)} then {.menu3.config.f.x1.x configure -state normal -foreground [ cget .ref -foreground ]; .menu3.config.f.x1.l configure -state normal; } else {.menu3.config.f.x1.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu3.config.f.x1.l configure -state disabled}
1253 if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x2 normal {m}} else {configure_entry .menu3.config.f.x2 disabled {m}}
1254 if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x3 normal {m}} else {configure_entry .menu3.config.f.x3 disabled {m}}
1255 if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x4 normal {m}} else {configure_entry .menu3.config.f.x4 disabled {m}}
1256 if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x5 normal {m}} else {configure_entry .menu3.config.f.x5 disabled {m}}
1257 if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x6 normal {m}} else {configure_entry .menu3.config.f.x6 disabled {m}}
1258 if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x7 normal {m}} else {configure_entry .menu3.config.f.x7 disabled {m}}
1259 if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x8 normal {m}} else {configure_entry .menu3.config.f.x8 disabled {m}}
1260 }
1261
1262
1263 proc update_define_menu3 {} {
1264 update_define_mainmenu
1265 global CONFIG_MODULES
1266 global CONFIG_LEON3
1267 global CONFIG_PROC_NUM
1268 if {($CONFIG_LEON3 == 1)} then {validate_int CONFIG_PROC_NUM "$CONFIG_PROC_NUM" 1}
1269 }
1270
1271
1272 proc menu4 {w title} {
1273 set oldFocus [focus]
1274 catch {focus .menu3}
1275 catch {destroy $w; unregister_active 4}
1276 toplevel $w -class Dialog
1277 wm withdraw $w
1278 global active_menus
1279 set active_menus [lsort -integer [linsert $active_menus end 4]]
1280 message $w.m -width 400 -aspect 300 -text \
1281 "Integer unit " -relief raised
1282 pack $w.m -pady 10 -side top -padx 10
1283 wm title $w "Integer unit "
1284
1285 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 4; break"
1286 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 4; menu5 .menu5 \"$title\""
1287 frame $w.f
1288 button $w.f.back -text "OK" \
1289 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 4"
1290 button $w.f.next -text "Next" -underline 0\
1291 -width 15 -command $nextscript
1292 bind all <Alt-n> $nextscript
1293 button $w.f.prev -text "Prev" -underline 0\
1294 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 4; menu3 .menu3 \"$title\""
1295 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 4; menu3 .menu3 \"$title\";break"
1296 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
1297 pack $w.f -pady 10 -side bottom -anchor w -fill x
1298 frame $w.topline -relief ridge -borderwidth 2 -height 2
1299 pack $w.topline -side top -fill x
1300
1301 frame $w.botline -relief ridge -borderwidth 2 -height 2
1302 pack $w.botline -side bottom -fill x
1303
1304 frame $w.config
1305 pack $w.config -fill y -expand on
1306
1307 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
1308 pack $w.config.vscroll -side right -fill y
1309
1310 canvas $w.config.canvas -height 1\
1311 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
1312 -width [expr [winfo screenwidth .] * 1 / 2]
1313 frame $w.config.f
1314 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
1315 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
1316 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
1317 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
1318 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
1319 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
1320 pack $w.config.canvas -side right -fill y
1321
1322
1323 int $w.config.f 4 0 "SPARC register windows" CONFIG_IU_NWINDOWS
1324 bool $w.config.f 4 1 "SPARC V8 MUL/DIV instructions" CONFIG_IU_V8MULDIV
1325 global tmpvar_3
1326 minimenu $w.config.f 4 2 "Hardware multiplier latency" tmpvar_3 CONFIG_IU_MUL_LATENCY_2
1327 menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"Hardware multiplier latency\""
1328 $w.config.f.x2.x.menu add radiobutton -label "2-cycles" -variable tmpvar_3 -value "2-cycles" -command "update_active"
1329 $w.config.f.x2.x.menu add radiobutton -label "4-cycles" -variable tmpvar_3 -value "4-cycles" -command "update_active"
1330 $w.config.f.x2.x.menu add radiobutton -label "5-cycles" -variable tmpvar_3 -value "5-cycles" -command "update_active"
1331 menusplit $w $w.config.f.x2.x.menu 3
1332 bool $w.config.f 4 3 "SPARC V8e SMAC/UMAC instructions " CONFIG_IU_MUL_MAC
1333 global tmpvar_4
1334 minimenu $w.config.f 4 4 "Multipler structure " tmpvar_4 CONFIG_IU_MUL_INFERRED
1335 menu $w.config.f.x4.x.menu -tearoffcommand "menutitle \"Multipler structure \""
1336 $w.config.f.x4.x.menu add radiobutton -label "Inferred" -variable tmpvar_4 -value "Inferred" -command "update_active"
1337 $w.config.f.x4.x.menu add radiobutton -label "NTNU_Modgen" -variable tmpvar_4 -value "NTNU_Modgen" -command "update_active"
1338 $w.config.f.x4.x.menu add radiobutton -label "TechSpec" -variable tmpvar_4 -value "TechSpec" -command "update_active"
1339 $w.config.f.x4.x.menu add radiobutton -label "Designware" -variable tmpvar_4 -value "Designware" -command "update_active"
1340 menusplit $w $w.config.f.x4.x.menu 4
1341 bool $w.config.f 4 5 "Branch prediction " CONFIG_IU_BP
1342 bool $w.config.f 4 6 "Single-vector trapping" CONFIG_IU_SVT
1343 bool $w.config.f 4 7 "Disable tagged ADD/SUB and CASA" CONFIG_NOTAG
1344 int $w.config.f 4 8 "Load delay" CONFIG_IU_LDELAY
1345 int $w.config.f 4 9 "Hardware watchpoints" CONFIG_IU_WATCHPOINTS
1346 bool $w.config.f 4 10 "Enable power-down mode " CONFIG_PWD
1347 hex $w.config.f 4 11 " Reset start address (addr\[31:12\]) " CONFIG_IU_RSTADDR
1348
1349
1350
1351 focus $w
1352 update_active
1353 global winx; global winy
1354 if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "}
1355 set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30]
1356 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
1357 update idletasks
1358 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
1359
1360 $w.config.canvas configure \
1361 -width [expr [winfo reqwidth $w.config.f] + 1]\
1362 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
1363 [expr [winfo reqheight $w.config.f] + 1]"
1364
1365 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
1366 set scry [expr [winfo screenh $w] / 2]
1367 set maxy [expr [winfo screenh $w] * 3 / 4]
1368 set canvtotal [expr [winfo reqh $w.config.f] + 2]
1369 if [expr $winy + $canvtotal < $maxy] {
1370 $w.config.canvas configure -height $canvtotal
1371 } else {
1372 $w.config.canvas configure -height [expr $scry - $winy]
1373 }
1374 }
1375 update idletasks
1376 if {[winfo exists $w]} then {
1377 wm maxsize $w [winfo width $w] [winfo screenheight $w]
1378 wm minsize $w [winfo width $w] 100
1379
1380 wm deiconify $w
1381 }
1382 }
1383
1384 proc update_menu4 {} {
1385 global CONFIG_LEON3
1386 global CONFIG_IU_NWINDOWS
1387 if {($CONFIG_LEON3 == 1)} then {.menu4.config.f.x0.x configure -state normal -foreground [ cget .ref -foreground ]; .menu4.config.f.x0.l configure -state normal; } else {.menu4.config.f.x0.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu4.config.f.x0.l configure -state disabled}
1388 global CONFIG_IU_V8MULDIV
1389 if {($CONFIG_LEON3 == 1)} then {
1390 configure_entry .menu4.config.f.x1 normal {n l y}} else {configure_entry .menu4.config.f.x1 disabled {y n l}}
1391 if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_V8MULDIV == 1)} then {configure_entry .menu4.config.f.x2 normal {x l}} else {configure_entry .menu4.config.f.x2 disabled {x l}}
1392 global CONFIG_IU_MUL_LATENCY_4
1393 global CONFIG_IU_MUL_LATENCY_5
1394 global CONFIG_IU_MUL_MAC
1395 if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_V8MULDIV == 1) && ($CONFIG_IU_MUL_LATENCY_4 == 1 || $CONFIG_IU_MUL_LATENCY_5 == 1)} then {
1396 configure_entry .menu4.config.f.x3 normal {n l y}} else {configure_entry .menu4.config.f.x3 disabled {y n l}}
1397 if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_V8MULDIV == 1)} then {configure_entry .menu4.config.f.x4 normal {x l}} else {configure_entry .menu4.config.f.x4 disabled {x l}}
1398 global CONFIG_IU_BP
1399 if {($CONFIG_LEON3 == 1)} then {
1400 configure_entry .menu4.config.f.x5 normal {n l y}} else {configure_entry .menu4.config.f.x5 disabled {y n l}}
1401 global CONFIG_IU_SVT
1402 if {($CONFIG_LEON3 == 1)} then {
1403 configure_entry .menu4.config.f.x6 normal {n l y}} else {configure_entry .menu4.config.f.x6 disabled {y n l}}
1404 global CONFIG_NOTAG
1405 if {($CONFIG_LEON3 == 1)} then {
1406 configure_entry .menu4.config.f.x7 normal {n l y}} else {configure_entry .menu4.config.f.x7 disabled {y n l}}
1407 global CONFIG_IU_LDELAY
1408 if {($CONFIG_LEON3 == 1)} then {.menu4.config.f.x8.x configure -state normal -foreground [ cget .ref -foreground ]; .menu4.config.f.x8.l configure -state normal; } else {.menu4.config.f.x8.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu4.config.f.x8.l configure -state disabled}
1409 global CONFIG_IU_WATCHPOINTS
1410 if {($CONFIG_LEON3 == 1)} then {.menu4.config.f.x9.x configure -state normal -foreground [ cget .ref -foreground ]; .menu4.config.f.x9.l configure -state normal; } else {.menu4.config.f.x9.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu4.config.f.x9.l configure -state disabled}
1411 global CONFIG_PWD
1412 if {($CONFIG_LEON3 == 1)} then {
1413 configure_entry .menu4.config.f.x10 normal {n l y}} else {configure_entry .menu4.config.f.x10 disabled {y n l}}
1414 global CONFIG_IU_RSTADDR
1415 if {($CONFIG_LEON3 == 1)} then {.menu4.config.f.x11.x configure -state normal -foreground [ cget .ref -foreground ]; .menu4.config.f.x11.l configure -state normal; } else {.menu4.config.f.x11.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu4.config.f.x11.l configure -state disabled}
1416 }
1417
1418
1419 proc update_define_menu4 {} {
1420 update_define_mainmenu
1421 global CONFIG_MODULES
1422 global CONFIG_LEON3
1423 global CONFIG_IU_NWINDOWS
1424 if {($CONFIG_LEON3 == 1)} then {validate_int CONFIG_IU_NWINDOWS "$CONFIG_IU_NWINDOWS" 8}
1425 global CONFIG_IU_V8MULDIV
1426 if {($CONFIG_LEON3 == 1)} then {
1427 set CONFIG_IU_V8MULDIV [expr $CONFIG_IU_V8MULDIV&15]} else {set CONFIG_IU_V8MULDIV [expr $CONFIG_IU_V8MULDIV|16]}
1428 global tmpvar_3
1429 global CONFIG_IU_MUL_LATENCY_2
1430 if {$tmpvar_3 == "2-cycles"} then {set CONFIG_IU_MUL_LATENCY_2 1} else {set CONFIG_IU_MUL_LATENCY_2 0}
1431 global CONFIG_IU_MUL_LATENCY_4
1432 if {$tmpvar_3 == "4-cycles"} then {set CONFIG_IU_MUL_LATENCY_4 1} else {set CONFIG_IU_MUL_LATENCY_4 0}
1433 global CONFIG_IU_MUL_LATENCY_5
1434 if {$tmpvar_3 == "5-cycles"} then {set CONFIG_IU_MUL_LATENCY_5 1} else {set CONFIG_IU_MUL_LATENCY_5 0}
1435 global CONFIG_IU_MUL_MAC
1436 if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_V8MULDIV == 1) && ($CONFIG_IU_MUL_LATENCY_4 == 1 || $CONFIG_IU_MUL_LATENCY_5 == 1)} then {
1437 set CONFIG_IU_MUL_MAC [expr $CONFIG_IU_MUL_MAC&15]} else {set CONFIG_IU_MUL_MAC [expr $CONFIG_IU_MUL_MAC|16]}
1438 global tmpvar_4
1439 global CONFIG_IU_MUL_INFERRED
1440 if {$tmpvar_4 == "Inferred"} then {set CONFIG_IU_MUL_INFERRED 1} else {set CONFIG_IU_MUL_INFERRED 0}
1441 global CONFIG_IU_MUL_MODGEN
1442 if {$tmpvar_4 == "NTNU_Modgen"} then {set CONFIG_IU_MUL_MODGEN 1} else {set CONFIG_IU_MUL_MODGEN 0}
1443 global CONFIG_IU_MUL_TECHSPEC
1444 if {$tmpvar_4 == "TechSpec"} then {set CONFIG_IU_MUL_TECHSPEC 1} else {set CONFIG_IU_MUL_TECHSPEC 0}
1445 global CONFIG_IU_MUL_DW
1446 if {$tmpvar_4 == "Designware"} then {set CONFIG_IU_MUL_DW 1} else {set CONFIG_IU_MUL_DW 0}
1447 global CONFIG_IU_BP
1448 if {($CONFIG_LEON3 == 1)} then {
1449 set CONFIG_IU_BP [expr $CONFIG_IU_BP&15]} else {set CONFIG_IU_BP [expr $CONFIG_IU_BP|16]}
1450 global CONFIG_IU_SVT
1451 if {($CONFIG_LEON3 == 1)} then {
1452 set CONFIG_IU_SVT [expr $CONFIG_IU_SVT&15]} else {set CONFIG_IU_SVT [expr $CONFIG_IU_SVT|16]}
1453 global CONFIG_NOTAG
1454 if {($CONFIG_LEON3 == 1)} then {
1455 set CONFIG_NOTAG [expr $CONFIG_NOTAG&15]} else {set CONFIG_NOTAG [expr $CONFIG_NOTAG|16]}
1456 global CONFIG_IU_LDELAY
1457 if {($CONFIG_LEON3 == 1)} then {validate_int CONFIG_IU_LDELAY "$CONFIG_IU_LDELAY" 1}
1458 global CONFIG_IU_WATCHPOINTS
1459 if {($CONFIG_LEON3 == 1)} then {validate_int CONFIG_IU_WATCHPOINTS "$CONFIG_IU_WATCHPOINTS" 0}
1460 global CONFIG_PWD
1461 if {($CONFIG_LEON3 == 1)} then {
1462 set CONFIG_PWD [expr $CONFIG_PWD&15]} else {set CONFIG_PWD [expr $CONFIG_PWD|16]}
1463 global CONFIG_IU_RSTADDR
1464 if {($CONFIG_LEON3 == 1)} then {validate_hex CONFIG_IU_RSTADDR "$CONFIG_IU_RSTADDR" 00000}
1465 }
1466
1467
1468 proc menu5 {w title} {
1469 set oldFocus [focus]
1470 catch {focus .menu3}
1471 catch {destroy $w; unregister_active 5}
1472 toplevel $w -class Dialog
1473 wm withdraw $w
1474 global active_menus
1475 set active_menus [lsort -integer [linsert $active_menus end 5]]
1476 message $w.m -width 400 -aspect 300 -text \
1477 "Floating-point unit" -relief raised
1478 pack $w.m -pady 10 -side top -padx 10
1479 wm title $w "Floating-point unit"
1480
1481 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 5; break"
1482 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 5; menu6 .menu6 \"$title\""
1483 frame $w.f
1484 button $w.f.back -text "OK" \
1485 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 5"
1486 button $w.f.next -text "Next" -underline 0\
1487 -width 15 -command $nextscript
1488 bind all <Alt-n> $nextscript
1489 button $w.f.prev -text "Prev" -underline 0\
1490 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 5; menu4 .menu4 \"$title\""
1491 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 5; menu4 .menu4 \"$title\";break"
1492 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
1493 pack $w.f -pady 10 -side bottom -anchor w -fill x
1494 frame $w.topline -relief ridge -borderwidth 2 -height 2
1495 pack $w.topline -side top -fill x
1496
1497 frame $w.botline -relief ridge -borderwidth 2 -height 2
1498 pack $w.botline -side bottom -fill x
1499
1500 frame $w.config
1501 pack $w.config -fill y -expand on
1502
1503 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
1504 pack $w.config.vscroll -side right -fill y
1505
1506 canvas $w.config.canvas -height 1\
1507 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
1508 -width [expr [winfo screenwidth .] * 1 / 2]
1509 frame $w.config.f
1510 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
1511 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
1512 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
1513 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
1514 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
1515 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
1516 pack $w.config.canvas -side right -fill y
1517
1518
1519 bool $w.config.f 5 0 "Enable FPU " CONFIG_FPU_ENABLE
1520 global tmpvar_5
1521 minimenu $w.config.f 5 1 "FPU core" tmpvar_5 CONFIG_FPU_GRFPU
1522 menu $w.config.f.x1.x.menu -tearoffcommand "menutitle \"FPU core\""
1523 $w.config.f.x1.x.menu add radiobutton -label "GRFPU" -variable tmpvar_5 -value "GRFPU" -command "update_active"
1524 $w.config.f.x1.x.menu add radiobutton -label "GRFPU-LITE" -variable tmpvar_5 -value "GRFPU-LITE" -command "update_active"
1525 $w.config.f.x1.x.menu add radiobutton -label "Meiko" -variable tmpvar_5 -value "Meiko" -command "update_active"
1526 menusplit $w $w.config.f.x1.x.menu 3
1527 global tmpvar_6
1528 minimenu $w.config.f 5 2 "GRFPU multiplier" tmpvar_6 CONFIG_FPU_GRFPU_INFMUL
1529 menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"GRFPU multiplier\""
1530 $w.config.f.x2.x.menu add radiobutton -label "Inferred" -variable tmpvar_6 -value "Inferred" -command "update_active"
1531 $w.config.f.x2.x.menu add radiobutton -label "DW" -variable tmpvar_6 -value "DW" -command "update_active"
1532 $w.config.f.x2.x.menu add radiobutton -label "ModGen" -variable tmpvar_6 -value "ModGen" -command "update_active"
1533 $w.config.f.x2.x.menu add radiobutton -label "TechSpec" -variable tmpvar_6 -value "TechSpec" -command "update_active"
1534 menusplit $w $w.config.f.x2.x.menu 4
1535 bool $w.config.f 5 3 "Shared GRFPU " CONFIG_FPU_GRFPU_SH
1536 global tmpvar_7
1537 minimenu $w.config.f 5 4 "GRFPU-LITE controller" tmpvar_7 CONFIG_FPU_GRFPC0
1538 menu $w.config.f.x4.x.menu -tearoffcommand "menutitle \"GRFPU-LITE controller\""
1539 $w.config.f.x4.x.menu add radiobutton -label "Simple" -variable tmpvar_7 -value "Simple" -command "update_active"
1540 $w.config.f.x4.x.menu add radiobutton -label "Data-forwarding" -variable tmpvar_7 -value "Data-forwarding" -command "update_active"
1541 $w.config.f.x4.x.menu add radiobutton -label "Non-blocking" -variable tmpvar_7 -value "Non-blocking" -command "update_active"
1542 menusplit $w $w.config.f.x4.x.menu 3
1543 bool $w.config.f 5 5 "Use VHDL netlist " CONFIG_FPU_NETLIST
1544
1545
1546
1547 focus $w
1548 update_active
1549 global winx; global winy
1550 if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "}
1551 set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30]
1552 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
1553 update idletasks
1554 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
1555
1556 $w.config.canvas configure \
1557 -width [expr [winfo reqwidth $w.config.f] + 1]\
1558 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
1559 [expr [winfo reqheight $w.config.f] + 1]"
1560
1561 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
1562 set scry [expr [winfo screenh $w] / 2]
1563 set maxy [expr [winfo screenh $w] * 3 / 4]
1564 set canvtotal [expr [winfo reqh $w.config.f] + 2]
1565 if [expr $winy + $canvtotal < $maxy] {
1566 $w.config.canvas configure -height $canvtotal
1567 } else {
1568 $w.config.canvas configure -height [expr $scry - $winy]
1569 }
1570 }
1571 update idletasks
1572 if {[winfo exists $w]} then {
1573 wm maxsize $w [winfo width $w] [winfo screenheight $w]
1574 wm minsize $w [winfo width $w] 100
1575
1576 wm deiconify $w
1577 }
1578 }
1579
1580 proc update_menu5 {} {
1581 global CONFIG_LEON3
1582 global CONFIG_FPU_ENABLE
1583 if {($CONFIG_LEON3 == 1)} then {
1584 configure_entry .menu5.config.f.x0 normal {n l y}} else {configure_entry .menu5.config.f.x0 disabled {y n l}}
1585 if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1)} then {configure_entry .menu5.config.f.x1 normal {x l}} else {configure_entry .menu5.config.f.x1 disabled {x l}}
1586 global CONFIG_FPU_GRFPU
1587 if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1) && ($CONFIG_FPU_GRFPU == 1)} then {configure_entry .menu5.config.f.x2 normal {x l}} else {configure_entry .menu5.config.f.x2 disabled {x l}}
1588 global CONFIG_HAS_SHARED_GRFPU
1589 global CONFIG_FPU_GRFPU_SH
1590 if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1) && ($CONFIG_HAS_SHARED_GRFPU == 1 && $CONFIG_FPU_GRFPU == 1)} then {
1591 configure_entry .menu5.config.f.x3 normal {n l y}} else {configure_entry .menu5.config.f.x3 disabled {y n l}}
1592 global CONFIG_FPU_GRFPULITE
1593 if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1) && ($CONFIG_FPU_GRFPULITE == 1)} then {configure_entry .menu5.config.f.x4 normal {x l}} else {configure_entry .menu5.config.f.x4 disabled {x l}}
1594 global CONFIG_FPU_NETLIST
1595 if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1)} then {
1596 configure_entry .menu5.config.f.x5 normal {n l y}} else {configure_entry .menu5.config.f.x5 disabled {y n l}}
1597 }
1598
1599
1600 proc update_define_menu5 {} {
1601 update_define_mainmenu
1602 global CONFIG_MODULES
1603 global CONFIG_LEON3
1604 global CONFIG_FPU_ENABLE
1605 if {($CONFIG_LEON3 == 1)} then {
1606 set CONFIG_FPU_ENABLE [expr $CONFIG_FPU_ENABLE&15]} else {set CONFIG_FPU_ENABLE [expr $CONFIG_FPU_ENABLE|16]}
1607 global tmpvar_5
1608 global CONFIG_FPU_GRFPU
1609 if {$tmpvar_5 == "GRFPU"} then {set CONFIG_FPU_GRFPU 1} else {set CONFIG_FPU_GRFPU 0}
1610 global CONFIG_FPU_GRFPULITE
1611 if {$tmpvar_5 == "GRFPU-LITE"} then {set CONFIG_FPU_GRFPULITE 1} else {set CONFIG_FPU_GRFPULITE 0}
1612 global CONFIG_FPU_MEIKO
1613 if {$tmpvar_5 == "Meiko"} then {set CONFIG_FPU_MEIKO 1} else {set CONFIG_FPU_MEIKO 0}
1614 global tmpvar_6
1615 global CONFIG_FPU_GRFPU_INFMUL
1616 if {$tmpvar_6 == "Inferred"} then {set CONFIG_FPU_GRFPU_INFMUL 1} else {set CONFIG_FPU_GRFPU_INFMUL 0}
1617 global CONFIG_FPU_GRFPU_DWMUL
1618 if {$tmpvar_6 == "DW"} then {set CONFIG_FPU_GRFPU_DWMUL 1} else {set CONFIG_FPU_GRFPU_DWMUL 0}
1619 global CONFIG_FPU_GRFPU_MODGEN
1620 if {$tmpvar_6 == "ModGen"} then {set CONFIG_FPU_GRFPU_MODGEN 1} else {set CONFIG_FPU_GRFPU_MODGEN 0}
1621 global CONFIG_FPU_GRFPU_TECHSPEC
1622 if {$tmpvar_6 == "TechSpec"} then {set CONFIG_FPU_GRFPU_TECHSPEC 1} else {set CONFIG_FPU_GRFPU_TECHSPEC 0}
1623 global CONFIG_HAS_SHARED_GRFPU
1624 global CONFIG_FPU_GRFPU_SH
1625 if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1) && ($CONFIG_HAS_SHARED_GRFPU == 1 && $CONFIG_FPU_GRFPU == 1)} then {
1626 set CONFIG_FPU_GRFPU_SH [expr $CONFIG_FPU_GRFPU_SH&15]} else {set CONFIG_FPU_GRFPU_SH [expr $CONFIG_FPU_GRFPU_SH|16]}
1627 global tmpvar_7
1628 global CONFIG_FPU_GRFPC0
1629 if {$tmpvar_7 == "Simple"} then {set CONFIG_FPU_GRFPC0 1} else {set CONFIG_FPU_GRFPC0 0}
1630 global CONFIG_FPU_GRFPC1
1631 if {$tmpvar_7 == "Data-forwarding"} then {set CONFIG_FPU_GRFPC1 1} else {set CONFIG_FPU_GRFPC1 0}
1632 global CONFIG_FPU_GRFPC2
1633 if {$tmpvar_7 == "Non-blocking"} then {set CONFIG_FPU_GRFPC2 1} else {set CONFIG_FPU_GRFPC2 0}
1634 global CONFIG_FPU_NETLIST
1635 if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1)} then {
1636 set CONFIG_FPU_NETLIST [expr $CONFIG_FPU_NETLIST&15]} else {set CONFIG_FPU_NETLIST [expr $CONFIG_FPU_NETLIST|16]}
1637 }
1638
1639
1640 proc menu6 {w title} {
1641 set oldFocus [focus]
1642 catch {focus .menu3}
1643 catch {destroy $w; unregister_active 6}
1644 toplevel $w -class Dialog
1645 wm withdraw $w
1646 global active_menus
1647 set active_menus [lsort -integer [linsert $active_menus end 6]]
1648 message $w.m -width 400 -aspect 300 -text \
1649 "Cache system" -relief raised
1650 pack $w.m -pady 10 -side top -padx 10
1651 wm title $w "Cache system"
1652
1653 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 6; break"
1654 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 6; menu7 .menu7 \"$title\""
1655 frame $w.f
1656 button $w.f.back -text "OK" \
1657 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 6"
1658 button $w.f.next -text "Next" -underline 0\
1659 -width 15 -command $nextscript
1660 bind all <Alt-n> $nextscript
1661 button $w.f.prev -text "Prev" -underline 0\
1662 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 6; menu5 .menu5 \"$title\""
1663 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 6; menu5 .menu5 \"$title\";break"
1664 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
1665 pack $w.f -pady 10 -side bottom -anchor w -fill x
1666 frame $w.topline -relief ridge -borderwidth 2 -height 2
1667 pack $w.topline -side top -fill x
1668
1669 frame $w.botline -relief ridge -borderwidth 2 -height 2
1670 pack $w.botline -side bottom -fill x
1671
1672 frame $w.config
1673 pack $w.config -fill y -expand on
1674
1675 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
1676 pack $w.config.vscroll -side right -fill y
1677
1678 canvas $w.config.canvas -height 1\
1679 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
1680 -width [expr [winfo screenwidth .] * 1 / 2]
1681 frame $w.config.f
1682 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
1683 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
1684 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
1685 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
1686 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
1687 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
1688 pack $w.config.canvas -side right -fill y
1689
1690
1691 bool $w.config.f 6 0 "Enable instruction cache " CONFIG_ICACHE_ENABLE
1692 global tmpvar_8
1693 minimenu $w.config.f 6 1 "Associativity (sets) " tmpvar_8 CONFIG_ICACHE_ASSO1
1694 menu $w.config.f.x1.x.menu -tearoffcommand "menutitle \"Associativity (sets) \""
1695 $w.config.f.x1.x.menu add radiobutton -label "1" -variable tmpvar_8 -value "1" -command "update_active"
1696 $w.config.f.x1.x.menu add radiobutton -label "2" -variable tmpvar_8 -value "2" -command "update_active"
1697 $w.config.f.x1.x.menu add radiobutton -label "3" -variable tmpvar_8 -value "3" -command "update_active"
1698 $w.config.f.x1.x.menu add radiobutton -label "4" -variable tmpvar_8 -value "4" -command "update_active"
1699 menusplit $w $w.config.f.x1.x.menu 4
1700 global tmpvar_9
1701 minimenu $w.config.f 6 2 "Way size (kbytes/way)" tmpvar_9 CONFIG_ICACHE_SZ1
1702 menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"Way size (kbytes/way)\""
1703 $w.config.f.x2.x.menu add radiobutton -label "1" -variable tmpvar_9 -value "1" -command "update_active"
1704 $w.config.f.x2.x.menu add radiobutton -label "2" -variable tmpvar_9 -value "2" -command "update_active"
1705 $w.config.f.x2.x.menu add radiobutton -label "4" -variable tmpvar_9 -value "4" -command "update_active"
1706 $w.config.f.x2.x.menu add radiobutton -label "8" -variable tmpvar_9 -value "8" -command "update_active"
1707 $w.config.f.x2.x.menu add radiobutton -label "16" -variable tmpvar_9 -value "16" -command "update_active"
1708 $w.config.f.x2.x.menu add radiobutton -label "32" -variable tmpvar_9 -value "32" -command "update_active"
1709 $w.config.f.x2.x.menu add radiobutton -label "64" -variable tmpvar_9 -value "64" -command "update_active"
1710 $w.config.f.x2.x.menu add radiobutton -label "128" -variable tmpvar_9 -value "128" -command "update_active"
1711 $w.config.f.x2.x.menu add radiobutton -label "256" -variable tmpvar_9 -value "256" -command "update_active"
1712 menusplit $w $w.config.f.x2.x.menu 9
1713 global tmpvar_10
1714 minimenu $w.config.f 6 3 "Line size (bytes/line)" tmpvar_10 CONFIG_ICACHE_LZ16
1715 menu $w.config.f.x3.x.menu -tearoffcommand "menutitle \"Line size (bytes/line)\""
1716 $w.config.f.x3.x.menu add radiobutton -label "16" -variable tmpvar_10 -value "16" -command "update_active"
1717 $w.config.f.x3.x.menu add radiobutton -label "32" -variable tmpvar_10 -value "32" -command "update_active"
1718 menusplit $w $w.config.f.x3.x.menu 2
1719 global tmpvar_11
1720 minimenu $w.config.f 6 4 "Replacement alorithm" tmpvar_11 CONFIG_ICACHE_ALGORND
1721 menu $w.config.f.x4.x.menu -tearoffcommand "menutitle \"Replacement alorithm\""
1722 $w.config.f.x4.x.menu add radiobutton -label "Random" -variable tmpvar_11 -value "Random" -command "update_active"
1723 $w.config.f.x4.x.menu add radiobutton -label "Direct" -variable tmpvar_11 -value "Direct" -command "update_active"
1724 $w.config.f.x4.x.menu add radiobutton -label "LRR" -variable tmpvar_11 -value "LRR" -command "update_active"
1725 $w.config.f.x4.x.menu add radiobutton -label "LRU" -variable tmpvar_11 -value "LRU" -command "update_active"
1726 menusplit $w $w.config.f.x4.x.menu 4
1727 bool $w.config.f 6 5 "Cache locking " CONFIG_ICACHE_LOCK
1728 bool $w.config.f 6 6 "Enable local instruction RAM " CONFIG_ICACHE_LRAM
1729 global tmpvar_12
1730 minimenu $w.config.f 6 7 "Local data RAM size (kbytes)" tmpvar_12 CONFIG_ICACHE_LRAM_SZ1
1731 menu $w.config.f.x7.x.menu -tearoffcommand "menutitle \"Local data RAM size (kbytes)\""
1732 $w.config.f.x7.x.menu add radiobutton -label "1" -variable tmpvar_12 -value "1" -command "update_active"
1733 $w.config.f.x7.x.menu add radiobutton -label "2" -variable tmpvar_12 -value "2" -command "update_active"
1734 $w.config.f.x7.x.menu add radiobutton -label "4" -variable tmpvar_12 -value "4" -command "update_active"
1735 $w.config.f.x7.x.menu add radiobutton -label "8" -variable tmpvar_12 -value "8" -command "update_active"
1736 $w.config.f.x7.x.menu add radiobutton -label "16" -variable tmpvar_12 -value "16" -command "update_active"
1737 $w.config.f.x7.x.menu add radiobutton -label "32" -variable tmpvar_12 -value "32" -command "update_active"
1738 $w.config.f.x7.x.menu add radiobutton -label "64" -variable tmpvar_12 -value "64" -command "update_active"
1739 $w.config.f.x7.x.menu add radiobutton -label "128" -variable tmpvar_12 -value "128" -command "update_active"
1740 $w.config.f.x7.x.menu add radiobutton -label "256" -variable tmpvar_12 -value "256" -command "update_active"
1741 menusplit $w $w.config.f.x7.x.menu 9
1742 hex $w.config.f 6 8 " Local instruction RAM start address (8 MSB) " CONFIG_ICACHE_LRSTART
1743 bool $w.config.f 6 9 "Enable data cache " CONFIG_DCACHE_ENABLE
1744 global tmpvar_13
1745 minimenu $w.config.f 6 10 "Associativity (sets)" tmpvar_13 CONFIG_DCACHE_ASSO1
1746 menu $w.config.f.x10.x.menu -tearoffcommand "menutitle \"Associativity (sets)\""
1747 $w.config.f.x10.x.menu add radiobutton -label "1" -variable tmpvar_13 -value "1" -command "update_active"
1748 $w.config.f.x10.x.menu add radiobutton -label "2" -variable tmpvar_13 -value "2" -command "update_active"
1749 $w.config.f.x10.x.menu add radiobutton -label "3" -variable tmpvar_13 -value "3" -command "update_active"
1750 $w.config.f.x10.x.menu add radiobutton -label "4" -variable tmpvar_13 -value "4" -command "update_active"
1751 menusplit $w $w.config.f.x10.x.menu 4
1752 global tmpvar_14
1753 minimenu $w.config.f 6 11 "Set size (kbytes/set)" tmpvar_14 CONFIG_DCACHE_SZ1
1754 menu $w.config.f.x11.x.menu -tearoffcommand "menutitle \"Set size (kbytes/set)\""
1755 $w.config.f.x11.x.menu add radiobutton -label "1" -variable tmpvar_14 -value "1" -command "update_active"
1756 $w.config.f.x11.x.menu add radiobutton -label "2" -variable tmpvar_14 -value "2" -command "update_active"
1757 $w.config.f.x11.x.menu add radiobutton -label "4" -variable tmpvar_14 -value "4" -command "update_active"
1758 $w.config.f.x11.x.menu add radiobutton -label "8" -variable tmpvar_14 -value "8" -command "update_active"
1759 $w.config.f.x11.x.menu add radiobutton -label "16" -variable tmpvar_14 -value "16" -command "update_active"
1760 $w.config.f.x11.x.menu add radiobutton -label "32" -variable tmpvar_14 -value "32" -command "update_active"
1761 $w.config.f.x11.x.menu add radiobutton -label "64" -variable tmpvar_14 -value "64" -command "update_active"
1762 $w.config.f.x11.x.menu add radiobutton -label "128" -variable tmpvar_14 -value "128" -command "update_active"
1763 $w.config.f.x11.x.menu add radiobutton -label "256" -variable tmpvar_14 -value "256" -command "update_active"
1764 menusplit $w $w.config.f.x11.x.menu 9
1765 global tmpvar_15
1766 minimenu $w.config.f 6 12 "Line size (bytes/line)" tmpvar_15 CONFIG_DCACHE_LZ16
1767 menu $w.config.f.x12.x.menu -tearoffcommand "menutitle \"Line size (bytes/line)\""
1768 $w.config.f.x12.x.menu add radiobutton -label "16" -variable tmpvar_15 -value "16" -command "update_active"
1769 $w.config.f.x12.x.menu add radiobutton -label "32" -variable tmpvar_15 -value "32" -command "update_active"
1770 menusplit $w $w.config.f.x12.x.menu 2
1771 global tmpvar_16
1772 minimenu $w.config.f 6 13 "Replacement alorithm" tmpvar_16 CONFIG_DCACHE_ALGORND
1773 menu $w.config.f.x13.x.menu -tearoffcommand "menutitle \"Replacement alorithm\""
1774 $w.config.f.x13.x.menu add radiobutton -label "Random" -variable tmpvar_16 -value "Random" -command "update_active"
1775 $w.config.f.x13.x.menu add radiobutton -label "Direct" -variable tmpvar_16 -value "Direct" -command "update_active"
1776 $w.config.f.x13.x.menu add radiobutton -label "LRR" -variable tmpvar_16 -value "LRR" -command "update_active"
1777 $w.config.f.x13.x.menu add radiobutton -label "LRU" -variable tmpvar_16 -value "LRU" -command "update_active"
1778 menusplit $w $w.config.f.x13.x.menu 4
1779 bool $w.config.f 6 14 "Cache locking " CONFIG_DCACHE_LOCK
1780 bool $w.config.f 6 15 "AHB snooping " CONFIG_DCACHE_SNOOP
1781 bool $w.config.f 6 16 "Fast snooping " CONFIG_DCACHE_SNOOP_FAST
1782 bool $w.config.f 6 17 "Separate snoop tags " CONFIG_DCACHE_SNOOP_SEPTAG
1783 hex $w.config.f 6 18 "Fixed cacheability map " CONFIG_CACHE_FIXED
1784 bool $w.config.f 6 19 "Enable local data RAM " CONFIG_DCACHE_LRAM
1785 global tmpvar_17
1786 minimenu $w.config.f 6 20 "Local data RAM size (kbytes)" tmpvar_17 CONFIG_DCACHE_LRAM_SZ1
1787 menu $w.config.f.x20.x.menu -tearoffcommand "menutitle \"Local data RAM size (kbytes)\""
1788 $w.config.f.x20.x.menu add radiobutton -label "1" -variable tmpvar_17 -value "1" -command "update_active"
1789 $w.config.f.x20.x.menu add radiobutton -label "2" -variable tmpvar_17 -value "2" -command "update_active"
1790 $w.config.f.x20.x.menu add radiobutton -label "4" -variable tmpvar_17 -value "4" -command "update_active"
1791 $w.config.f.x20.x.menu add radiobutton -label "8" -variable tmpvar_17 -value "8" -command "update_active"
1792 $w.config.f.x20.x.menu add radiobutton -label "16" -variable tmpvar_17 -value "16" -command "update_active"
1793 $w.config.f.x20.x.menu add radiobutton -label "32" -variable tmpvar_17 -value "32" -command "update_active"
1794 $w.config.f.x20.x.menu add radiobutton -label "64" -variable tmpvar_17 -value "64" -command "update_active"
1795 $w.config.f.x20.x.menu add radiobutton -label "128" -variable tmpvar_17 -value "128" -command "update_active"
1796 $w.config.f.x20.x.menu add radiobutton -label "256" -variable tmpvar_17 -value "256" -command "update_active"
1797 menusplit $w $w.config.f.x20.x.menu 9
1798 hex $w.config.f 6 21 " Local data RAM start address (8 MSB) " CONFIG_DCACHE_LRSTART
1799
1800
1801
1802 focus $w
1803 update_active
1804 global winx; global winy
1805 if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "}
1806 set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30]
1807 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
1808 update idletasks
1809 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
1810
1811 $w.config.canvas configure \
1812 -width [expr [winfo reqwidth $w.config.f] + 1]\
1813 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
1814 [expr [winfo reqheight $w.config.f] + 1]"
1815
1816 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
1817 set scry [expr [winfo screenh $w] / 2]
1818 set maxy [expr [winfo screenh $w] * 3 / 4]
1819 set canvtotal [expr [winfo reqh $w.config.f] + 2]
1820 if [expr $winy + $canvtotal < $maxy] {
1821 $w.config.canvas configure -height $canvtotal
1822 } else {
1823 $w.config.canvas configure -height [expr $scry - $winy]
1824 }
1825 }
1826 update idletasks
1827 if {[winfo exists $w]} then {
1828 wm maxsize $w [winfo width $w] [winfo screenheight $w]
1829 wm minsize $w [winfo width $w] 100
1830
1831 wm deiconify $w
1832 }
1833 }
1834
1835 proc update_menu6 {} {
1836 global CONFIG_LEON3
1837 global CONFIG_ICACHE_ENABLE
1838 if {($CONFIG_LEON3 == 1)} then {
1839 configure_entry .menu6.config.f.x0 normal {n l y}} else {configure_entry .menu6.config.f.x0 disabled {y n l}}
1840 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1)} then {configure_entry .menu6.config.f.x1 normal {x l}} else {configure_entry .menu6.config.f.x1 disabled {x l}}
1841 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1)} then {configure_entry .menu6.config.f.x2 normal {x l}} else {configure_entry .menu6.config.f.x2 disabled {x l}}
1842 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1)} then {configure_entry .menu6.config.f.x3 normal {x l}} else {configure_entry .menu6.config.f.x3 disabled {x l}}
1843 global CONFIG_ICACHE_ASSO1
1844 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1) && ($CONFIG_ICACHE_ASSO1 != 1)} then {configure_entry .menu6.config.f.x4 normal {x l}} else {configure_entry .menu6.config.f.x4 disabled {x l}}
1845 global CONFIG_ICACHE_LOCK
1846 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1) && ($CONFIG_ICACHE_ASSO1 != 1)} then {
1847 configure_entry .menu6.config.f.x5 normal {n l y}} else {configure_entry .menu6.config.f.x5 disabled {y n l}}
1848 global CONFIG_MMU_ENABLE
1849 global CONFIG_ICACHE_LRAM
1850 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE != 1)} then {
1851 configure_entry .menu6.config.f.x6 normal {n l y}} else {configure_entry .menu6.config.f.x6 disabled {y n l}}
1852 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_LRAM == 1)} then {configure_entry .menu6.config.f.x7 normal {x l}} else {configure_entry .menu6.config.f.x7 disabled {x l}}
1853 global CONFIG_ICACHE_LRSTART
1854 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_LRAM == 1)} then {.menu6.config.f.x8.x configure -state normal -foreground [ cget .ref -foreground ]; .menu6.config.f.x8.l configure -state normal; } else {.menu6.config.f.x8.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu6.config.f.x8.l configure -state disabled}
1855 global CONFIG_DCACHE_ENABLE
1856 if {($CONFIG_LEON3 == 1)} then {
1857 configure_entry .menu6.config.f.x9 normal {n l y}} else {configure_entry .menu6.config.f.x9 disabled {y n l}}
1858 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then {configure_entry .menu6.config.f.x10 normal {x l}} else {configure_entry .menu6.config.f.x10 disabled {x l}}
1859 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then {configure_entry .menu6.config.f.x11 normal {x l}} else {configure_entry .menu6.config.f.x11 disabled {x l}}
1860 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then {configure_entry .menu6.config.f.x12 normal {x l}} else {configure_entry .menu6.config.f.x12 disabled {x l}}
1861 global CONFIG_DCACHE_ASSO1
1862 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_ASSO1 != 1)} then {configure_entry .menu6.config.f.x13 normal {x l}} else {configure_entry .menu6.config.f.x13 disabled {x l}}
1863 global CONFIG_DCACHE_LOCK
1864 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_ASSO1 != 1)} then {
1865 configure_entry .menu6.config.f.x14 normal {n l y}} else {configure_entry .menu6.config.f.x14 disabled {y n l}}
1866 global CONFIG_DCACHE_SNOOP
1867 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then {
1868 configure_entry .menu6.config.f.x15 normal {n l y}} else {configure_entry .menu6.config.f.x15 disabled {y n l}}
1869 global CONFIG_DCACHE_SNOOP_FAST
1870 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_SNOOP == 1)} then {
1871 configure_entry .menu6.config.f.x16 normal {n l y}} else {configure_entry .menu6.config.f.x16 disabled {y n l}}
1872 global CONFIG_DCACHE_SNOOP_SEPTAG
1873 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_SNOOP == 1)} then {
1874 configure_entry .menu6.config.f.x17 normal {n l y}} else {configure_entry .menu6.config.f.x17 disabled {y n l}}
1875 global CONFIG_CACHE_FIXED
1876 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1 || $CONFIG_DCACHE_ENABLE == 1)} then {.menu6.config.f.x18.x configure -state normal -foreground [ cget .ref -foreground ]; .menu6.config.f.x18.l configure -state normal; } else {.menu6.config.f.x18.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu6.config.f.x18.l configure -state disabled}
1877 global CONFIG_DCACHE_LRAM
1878 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE != 1)} then {
1879 configure_entry .menu6.config.f.x19 normal {n l y}} else {configure_entry .menu6.config.f.x19 disabled {y n l}}
1880 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_LRAM == 1)} then {configure_entry .menu6.config.f.x20 normal {x l}} else {configure_entry .menu6.config.f.x20 disabled {x l}}
1881 global CONFIG_DCACHE_LRSTART
1882 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_LRAM == 1)} then {.menu6.config.f.x21.x configure -state normal -foreground [ cget .ref -foreground ]; .menu6.config.f.x21.l configure -state normal; } else {.menu6.config.f.x21.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu6.config.f.x21.l configure -state disabled}
1883 }
1884
1885
1886 proc update_define_menu6 {} {
1887 update_define_mainmenu
1888 global CONFIG_MODULES
1889 global CONFIG_LEON3
1890 global CONFIG_ICACHE_ENABLE
1891 if {($CONFIG_LEON3 == 1)} then {
1892 set CONFIG_ICACHE_ENABLE [expr $CONFIG_ICACHE_ENABLE&15]} else {set CONFIG_ICACHE_ENABLE [expr $CONFIG_ICACHE_ENABLE|16]}
1893 global tmpvar_8
1894 global CONFIG_ICACHE_ASSO1
1895 if {$tmpvar_8 == "1"} then {set CONFIG_ICACHE_ASSO1 1} else {set CONFIG_ICACHE_ASSO1 0}
1896 global CONFIG_ICACHE_ASSO2
1897 if {$tmpvar_8 == "2"} then {set CONFIG_ICACHE_ASSO2 1} else {set CONFIG_ICACHE_ASSO2 0}
1898 global CONFIG_ICACHE_ASSO3
1899 if {$tmpvar_8 == "3"} then {set CONFIG_ICACHE_ASSO3 1} else {set CONFIG_ICACHE_ASSO3 0}
1900 global CONFIG_ICACHE_ASSO4
1901 if {$tmpvar_8 == "4"} then {set CONFIG_ICACHE_ASSO4 1} else {set CONFIG_ICACHE_ASSO4 0}
1902 global tmpvar_9
1903 global CONFIG_ICACHE_SZ1
1904 if {$tmpvar_9 == "1"} then {set CONFIG_ICACHE_SZ1 1} else {set CONFIG_ICACHE_SZ1 0}
1905 global CONFIG_ICACHE_SZ2
1906 if {$tmpvar_9 == "2"} then {set CONFIG_ICACHE_SZ2 1} else {set CONFIG_ICACHE_SZ2 0}
1907 global CONFIG_ICACHE_SZ4
1908 if {$tmpvar_9 == "4"} then {set CONFIG_ICACHE_SZ4 1} else {set CONFIG_ICACHE_SZ4 0}
1909 global CONFIG_ICACHE_SZ8
1910 if {$tmpvar_9 == "8"} then {set CONFIG_ICACHE_SZ8 1} else {set CONFIG_ICACHE_SZ8 0}
1911 global CONFIG_ICACHE_SZ16
1912 if {$tmpvar_9 == "16"} then {set CONFIG_ICACHE_SZ16 1} else {set CONFIG_ICACHE_SZ16 0}
1913 global CONFIG_ICACHE_SZ32
1914 if {$tmpvar_9 == "32"} then {set CONFIG_ICACHE_SZ32 1} else {set CONFIG_ICACHE_SZ32 0}
1915 global CONFIG_ICACHE_SZ64
1916 if {$tmpvar_9 == "64"} then {set CONFIG_ICACHE_SZ64 1} else {set CONFIG_ICACHE_SZ64 0}
1917 global CONFIG_ICACHE_SZ128
1918 if {$tmpvar_9 == "128"} then {set CONFIG_ICACHE_SZ128 1} else {set CONFIG_ICACHE_SZ128 0}
1919 global CONFIG_ICACHE_SZ256
1920 if {$tmpvar_9 == "256"} then {set CONFIG_ICACHE_SZ256 1} else {set CONFIG_ICACHE_SZ256 0}
1921 global tmpvar_10
1922 global CONFIG_ICACHE_LZ16
1923 if {$tmpvar_10 == "16"} then {set CONFIG_ICACHE_LZ16 1} else {set CONFIG_ICACHE_LZ16 0}
1924 global CONFIG_ICACHE_LZ32
1925 if {$tmpvar_10 == "32"} then {set CONFIG_ICACHE_LZ32 1} else {set CONFIG_ICACHE_LZ32 0}
1926 global tmpvar_11
1927 global CONFIG_ICACHE_ALGORND
1928 if {$tmpvar_11 == "Random"} then {set CONFIG_ICACHE_ALGORND 1} else {set CONFIG_ICACHE_ALGORND 0}
1929 global CONFIG_ICACHE_ALGODIR
1930 if {$tmpvar_11 == "Direct"} then {set CONFIG_ICACHE_ALGODIR 1} else {set CONFIG_ICACHE_ALGODIR 0}
1931 global CONFIG_ICACHE_ALGOLRR
1932 if {$tmpvar_11 == "LRR"} then {set CONFIG_ICACHE_ALGOLRR 1} else {set CONFIG_ICACHE_ALGOLRR 0}
1933 global CONFIG_ICACHE_ALGOLRU
1934 if {$tmpvar_11 == "LRU"} then {set CONFIG_ICACHE_ALGOLRU 1} else {set CONFIG_ICACHE_ALGOLRU 0}
1935 global CONFIG_ICACHE_LOCK
1936 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1) && ($CONFIG_ICACHE_ASSO1 != 1)} then {
1937 set CONFIG_ICACHE_LOCK [expr $CONFIG_ICACHE_LOCK&15]} else {set CONFIG_ICACHE_LOCK [expr $CONFIG_ICACHE_LOCK|16]}
1938 global CONFIG_MMU_ENABLE
1939 global CONFIG_ICACHE_LRAM
1940 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE != 1)} then {
1941 set CONFIG_ICACHE_LRAM [expr $CONFIG_ICACHE_LRAM&15]} else {set CONFIG_ICACHE_LRAM [expr $CONFIG_ICACHE_LRAM|16]}
1942 global tmpvar_12
1943 global CONFIG_ICACHE_LRAM_SZ1
1944 if {$tmpvar_12 == "1"} then {set CONFIG_ICACHE_LRAM_SZ1 1} else {set CONFIG_ICACHE_LRAM_SZ1 0}
1945 global CONFIG_ICACHE_LRAM_SZ2
1946 if {$tmpvar_12 == "2"} then {set CONFIG_ICACHE_LRAM_SZ2 1} else {set CONFIG_ICACHE_LRAM_SZ2 0}
1947 global CONFIG_ICACHE_LRAM_SZ4
1948 if {$tmpvar_12 == "4"} then {set CONFIG_ICACHE_LRAM_SZ4 1} else {set CONFIG_ICACHE_LRAM_SZ4 0}
1949 global CONFIG_ICACHE_LRAM_SZ8
1950 if {$tmpvar_12 == "8"} then {set CONFIG_ICACHE_LRAM_SZ8 1} else {set CONFIG_ICACHE_LRAM_SZ8 0}
1951 global CONFIG_ICACHE_LRAM_SZ16
1952 if {$tmpvar_12 == "16"} then {set CONFIG_ICACHE_LRAM_SZ16 1} else {set CONFIG_ICACHE_LRAM_SZ16 0}
1953 global CONFIG_ICACHE_LRAM_SZ32
1954 if {$tmpvar_12 == "32"} then {set CONFIG_ICACHE_LRAM_SZ32 1} else {set CONFIG_ICACHE_LRAM_SZ32 0}
1955 global CONFIG_ICACHE_LRAM_SZ64
1956 if {$tmpvar_12 == "64"} then {set CONFIG_ICACHE_LRAM_SZ64 1} else {set CONFIG_ICACHE_LRAM_SZ64 0}
1957 global CONFIG_ICACHE_LRAM_SZ128
1958 if {$tmpvar_12 == "128"} then {set CONFIG_ICACHE_LRAM_SZ128 1} else {set CONFIG_ICACHE_LRAM_SZ128 0}
1959 global CONFIG_ICACHE_LRAM_SZ256
1960 if {$tmpvar_12 == "256"} then {set CONFIG_ICACHE_LRAM_SZ256 1} else {set CONFIG_ICACHE_LRAM_SZ256 0}
1961 global CONFIG_ICACHE_LRSTART
1962 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_LRAM == 1)} then {validate_hex CONFIG_ICACHE_LRSTART "$CONFIG_ICACHE_LRSTART" 8e}
1963 global CONFIG_DCACHE_ENABLE
1964 if {($CONFIG_LEON3 == 1)} then {
1965 set CONFIG_DCACHE_ENABLE [expr $CONFIG_DCACHE_ENABLE&15]} else {set CONFIG_DCACHE_ENABLE [expr $CONFIG_DCACHE_ENABLE|16]}
1966 global tmpvar_13
1967 global CONFIG_DCACHE_ASSO1
1968 if {$tmpvar_13 == "1"} then {set CONFIG_DCACHE_ASSO1 1} else {set CONFIG_DCACHE_ASSO1 0}
1969 global CONFIG_DCACHE_ASSO2
1970 if {$tmpvar_13 == "2"} then {set CONFIG_DCACHE_ASSO2 1} else {set CONFIG_DCACHE_ASSO2 0}
1971 global CONFIG_DCACHE_ASSO3
1972 if {$tmpvar_13 == "3"} then {set CONFIG_DCACHE_ASSO3 1} else {set CONFIG_DCACHE_ASSO3 0}
1973 global CONFIG_DCACHE_ASSO4
1974 if {$tmpvar_13 == "4"} then {set CONFIG_DCACHE_ASSO4 1} else {set CONFIG_DCACHE_ASSO4 0}
1975 global tmpvar_14
1976 global CONFIG_DCACHE_SZ1
1977 if {$tmpvar_14 == "1"} then {set CONFIG_DCACHE_SZ1 1} else {set CONFIG_DCACHE_SZ1 0}
1978 global CONFIG_DCACHE_SZ2
1979 if {$tmpvar_14 == "2"} then {set CONFIG_DCACHE_SZ2 1} else {set CONFIG_DCACHE_SZ2 0}
1980 global CONFIG_DCACHE_SZ4
1981 if {$tmpvar_14 == "4"} then {set CONFIG_DCACHE_SZ4 1} else {set CONFIG_DCACHE_SZ4 0}
1982 global CONFIG_DCACHE_SZ8
1983 if {$tmpvar_14 == "8"} then {set CONFIG_DCACHE_SZ8 1} else {set CONFIG_DCACHE_SZ8 0}
1984 global CONFIG_DCACHE_SZ16
1985 if {$tmpvar_14 == "16"} then {set CONFIG_DCACHE_SZ16 1} else {set CONFIG_DCACHE_SZ16 0}
1986 global CONFIG_DCACHE_SZ32
1987 if {$tmpvar_14 == "32"} then {set CONFIG_DCACHE_SZ32 1} else {set CONFIG_DCACHE_SZ32 0}
1988 global CONFIG_DCACHE_SZ64
1989 if {$tmpvar_14 == "64"} then {set CONFIG_DCACHE_SZ64 1} else {set CONFIG_DCACHE_SZ64 0}
1990 global CONFIG_DCACHE_SZ128
1991 if {$tmpvar_14 == "128"} then {set CONFIG_DCACHE_SZ128 1} else {set CONFIG_DCACHE_SZ128 0}
1992 global CONFIG_DCACHE_SZ256
1993 if {$tmpvar_14 == "256"} then {set CONFIG_DCACHE_SZ256 1} else {set CONFIG_DCACHE_SZ256 0}
1994 global tmpvar_15
1995 global CONFIG_DCACHE_LZ16
1996 if {$tmpvar_15 == "16"} then {set CONFIG_DCACHE_LZ16 1} else {set CONFIG_DCACHE_LZ16 0}
1997 global CONFIG_DCACHE_LZ32
1998 if {$tmpvar_15 == "32"} then {set CONFIG_DCACHE_LZ32 1} else {set CONFIG_DCACHE_LZ32 0}
1999 global tmpvar_16
2000 global CONFIG_DCACHE_ALGORND
2001 if {$tmpvar_16 == "Random"} then {set CONFIG_DCACHE_ALGORND 1} else {set CONFIG_DCACHE_ALGORND 0}
2002 global CONFIG_DCACHE_ALGODIR
2003 if {$tmpvar_16 == "Direct"} then {set CONFIG_DCACHE_ALGODIR 1} else {set CONFIG_DCACHE_ALGODIR 0}
2004 global CONFIG_DCACHE_ALGOLRR
2005 if {$tmpvar_16 == "LRR"} then {set CONFIG_DCACHE_ALGOLRR 1} else {set CONFIG_DCACHE_ALGOLRR 0}
2006 global CONFIG_DCACHE_ALGOLRU
2007 if {$tmpvar_16 == "LRU"} then {set CONFIG_DCACHE_ALGOLRU 1} else {set CONFIG_DCACHE_ALGOLRU 0}
2008 global CONFIG_DCACHE_LOCK
2009 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_ASSO1 != 1)} then {
2010 set CONFIG_DCACHE_LOCK [expr $CONFIG_DCACHE_LOCK&15]} else {set CONFIG_DCACHE_LOCK [expr $CONFIG_DCACHE_LOCK|16]}
2011 global CONFIG_DCACHE_SNOOP
2012 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then {
2013 set CONFIG_DCACHE_SNOOP [expr $CONFIG_DCACHE_SNOOP&15]} else {set CONFIG_DCACHE_SNOOP [expr $CONFIG_DCACHE_SNOOP|16]}
2014 global CONFIG_DCACHE_SNOOP_FAST
2015 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_SNOOP == 1)} then {
2016 set CONFIG_DCACHE_SNOOP_FAST [expr $CONFIG_DCACHE_SNOOP_FAST&15]} else {set CONFIG_DCACHE_SNOOP_FAST [expr $CONFIG_DCACHE_SNOOP_FAST|16]}
2017 global CONFIG_DCACHE_SNOOP_SEPTAG
2018 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_SNOOP == 1)} then {
2019 set CONFIG_DCACHE_SNOOP_SEPTAG [expr $CONFIG_DCACHE_SNOOP_SEPTAG&15]} else {set CONFIG_DCACHE_SNOOP_SEPTAG [expr $CONFIG_DCACHE_SNOOP_SEPTAG|16]}
2020 global CONFIG_CACHE_FIXED
2021 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1 || $CONFIG_DCACHE_ENABLE == 1)} then {validate_hex CONFIG_CACHE_FIXED "$CONFIG_CACHE_FIXED" 0}
2022 global CONFIG_DCACHE_LRAM
2023 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE != 1)} then {
2024 set CONFIG_DCACHE_LRAM [expr $CONFIG_DCACHE_LRAM&15]} else {set CONFIG_DCACHE_LRAM [expr $CONFIG_DCACHE_LRAM|16]}
2025 global tmpvar_17
2026 global CONFIG_DCACHE_LRAM_SZ1
2027 if {$tmpvar_17 == "1"} then {set CONFIG_DCACHE_LRAM_SZ1 1} else {set CONFIG_DCACHE_LRAM_SZ1 0}
2028 global CONFIG_DCACHE_LRAM_SZ2
2029 if {$tmpvar_17 == "2"} then {set CONFIG_DCACHE_LRAM_SZ2 1} else {set CONFIG_DCACHE_LRAM_SZ2 0}
2030 global CONFIG_DCACHE_LRAM_SZ4
2031 if {$tmpvar_17 == "4"} then {set CONFIG_DCACHE_LRAM_SZ4 1} else {set CONFIG_DCACHE_LRAM_SZ4 0}
2032 global CONFIG_DCACHE_LRAM_SZ8
2033 if {$tmpvar_17 == "8"} then {set CONFIG_DCACHE_LRAM_SZ8 1} else {set CONFIG_DCACHE_LRAM_SZ8 0}
2034 global CONFIG_DCACHE_LRAM_SZ16
2035 if {$tmpvar_17 == "16"} then {set CONFIG_DCACHE_LRAM_SZ16 1} else {set CONFIG_DCACHE_LRAM_SZ16 0}
2036 global CONFIG_DCACHE_LRAM_SZ32
2037 if {$tmpvar_17 == "32"} then {set CONFIG_DCACHE_LRAM_SZ32 1} else {set CONFIG_DCACHE_LRAM_SZ32 0}
2038 global CONFIG_DCACHE_LRAM_SZ64
2039 if {$tmpvar_17 == "64"} then {set CONFIG_DCACHE_LRAM_SZ64 1} else {set CONFIG_DCACHE_LRAM_SZ64 0}
2040 global CONFIG_DCACHE_LRAM_SZ128
2041 if {$tmpvar_17 == "128"} then {set CONFIG_DCACHE_LRAM_SZ128 1} else {set CONFIG_DCACHE_LRAM_SZ128 0}
2042 global CONFIG_DCACHE_LRAM_SZ256
2043 if {$tmpvar_17 == "256"} then {set CONFIG_DCACHE_LRAM_SZ256 1} else {set CONFIG_DCACHE_LRAM_SZ256 0}
2044 global CONFIG_DCACHE_LRSTART
2045 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_LRAM == 1)} then {validate_hex CONFIG_DCACHE_LRSTART "$CONFIG_DCACHE_LRSTART" 8f}
2046 }
2047
2048
2049 proc menu7 {w title} {
2050 set oldFocus [focus]
2051 catch {focus .menu3}
2052 catch {destroy $w; unregister_active 7}
2053 toplevel $w -class Dialog
2054 wm withdraw $w
2055 global active_menus
2056 set active_menus [lsort -integer [linsert $active_menus end 7]]
2057 message $w.m -width 400 -aspect 300 -text \
2058 "MMU" -relief raised
2059 pack $w.m -pady 10 -side top -padx 10
2060 wm title $w "MMU"
2061
2062 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 7; break"
2063 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 7; menu8 .menu8 \"$title\""
2064 frame $w.f
2065 button $w.f.back -text "OK" \
2066 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 7"
2067 button $w.f.next -text "Next" -underline 0\
2068 -width 15 -command $nextscript
2069 bind all <Alt-n> $nextscript
2070 button $w.f.prev -text "Prev" -underline 0\
2071 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 7; menu6 .menu6 \"$title\""
2072 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 7; menu6 .menu6 \"$title\";break"
2073 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
2074 pack $w.f -pady 10 -side bottom -anchor w -fill x
2075 frame $w.topline -relief ridge -borderwidth 2 -height 2
2076 pack $w.topline -side top -fill x
2077
2078 frame $w.botline -relief ridge -borderwidth 2 -height 2
2079 pack $w.botline -side bottom -fill x
2080
2081 frame $w.config
2082 pack $w.config -fill y -expand on
2083
2084 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
2085 pack $w.config.vscroll -side right -fill y
2086
2087 canvas $w.config.canvas -height 1\
2088 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
2089 -width [expr [winfo screenwidth .] * 1 / 2]
2090 frame $w.config.f
2091 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
2092 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
2093 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
2094 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
2095 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
2096 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
2097 pack $w.config.canvas -side right -fill y
2098
2099
2100 bool $w.config.f 7 0 "Enable MMU " CONFIG_MMU_ENABLE
2101 global tmpvar_18
2102 minimenu $w.config.f 7 1 "MMU type " tmpvar_18 CONFIG_MMU_COMBINED
2103 menu $w.config.f.x1.x.menu -tearoffcommand "menutitle \"MMU type \""
2104 $w.config.f.x1.x.menu add radiobutton -label "combined" -variable tmpvar_18 -value "combined" -command "update_active"
2105 $w.config.f.x1.x.menu add radiobutton -label "split" -variable tmpvar_18 -value "split" -command "update_active"
2106 menusplit $w $w.config.f.x1.x.menu 2
2107 global tmpvar_19
2108 minimenu $w.config.f 7 2 "TLB replacement sheme " tmpvar_19 CONFIG_MMU_REPARRAY
2109 menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"TLB replacement sheme \""
2110 $w.config.f.x2.x.menu add radiobutton -label "LRU" -variable tmpvar_19 -value "LRU" -command "update_active"
2111 $w.config.f.x2.x.menu add radiobutton -label "Increment" -variable tmpvar_19 -value "Increment" -command "update_active"
2112 menusplit $w $w.config.f.x2.x.menu 2
2113 global tmpvar_20
2114 minimenu $w.config.f 7 3 "Instruction (or combined) TLB entries" tmpvar_20 CONFIG_MMU_I2
2115 menu $w.config.f.x3.x.menu -tearoffcommand "menutitle \"Instruction (or combined) TLB entries\""
2116 $w.config.f.x3.x.menu add radiobutton -label "2" -variable tmpvar_20 -value "2" -command "update_active"
2117 $w.config.f.x3.x.menu add radiobutton -label "4" -variable tmpvar_20 -value "4" -command "update_active"
2118 $w.config.f.x3.x.menu add radiobutton -label "8" -variable tmpvar_20 -value "8" -command "update_active"
2119 $w.config.f.x3.x.menu add radiobutton -label "16" -variable tmpvar_20 -value "16" -command "update_active"
2120 $w.config.f.x3.x.menu add radiobutton -label "32" -variable tmpvar_20 -value "32" -command "update_active"
2121 menusplit $w $w.config.f.x3.x.menu 5
2122 global tmpvar_21
2123 minimenu $w.config.f 7 4 "Data TLB entries" tmpvar_21 CONFIG_MMU_D2
2124 menu $w.config.f.x4.x.menu -tearoffcommand "menutitle \"Data TLB entries\""
2125 $w.config.f.x4.x.menu add radiobutton -label "2" -variable tmpvar_21 -value "2" -command "update_active"
2126 $w.config.f.x4.x.menu add radiobutton -label "4" -variable tmpvar_21 -value "4" -command "update_active"
2127 $w.config.f.x4.x.menu add radiobutton -label "8" -variable tmpvar_21 -value "8" -command "update_active"
2128 $w.config.f.x4.x.menu add radiobutton -label "16" -variable tmpvar_21 -value "16" -command "update_active"
2129 $w.config.f.x4.x.menu add radiobutton -label "32" -variable tmpvar_21 -value "32" -command "update_active"
2130 menusplit $w $w.config.f.x4.x.menu 5
2131 bool $w.config.f 7 5 "Fast writebuffer " CONFIG_MMU_FASTWB
2132 global tmpvar_22
2133 minimenu $w.config.f 7 6 "MMU page size" tmpvar_22 CONFIG_MMU_PAGE_4K
2134 menu $w.config.f.x6.x.menu -tearoffcommand "menutitle \"MMU page size\""
2135 $w.config.f.x6.x.menu add radiobutton -label "4K" -variable tmpvar_22 -value "4K" -command "update_active"
2136 $w.config.f.x6.x.menu add radiobutton -label "8K" -variable tmpvar_22 -value "8K" -command "update_active"
2137 $w.config.f.x6.x.menu add radiobutton -label "16K" -variable tmpvar_22 -value "16K" -command "update_active"
2138 $w.config.f.x6.x.menu add radiobutton -label "32K" -variable tmpvar_22 -value "32K" -command "update_active"
2139 $w.config.f.x6.x.menu add radiobutton -label "Programmable" -variable tmpvar_22 -value "Programmable" -command "update_active"
2140 menusplit $w $w.config.f.x6.x.menu 5
2141
2142
2143
2144 focus $w
2145 update_active
2146 global winx; global winy
2147 if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "}
2148 set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30]
2149 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
2150 update idletasks
2151 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
2152
2153 $w.config.canvas configure \
2154 -width [expr [winfo reqwidth $w.config.f] + 1]\
2155 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
2156 [expr [winfo reqheight $w.config.f] + 1]"
2157
2158 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
2159 set scry [expr [winfo screenh $w] / 2]
2160 set maxy [expr [winfo screenh $w] * 3 / 4]
2161 set canvtotal [expr [winfo reqh $w.config.f] + 2]
2162 if [expr $winy + $canvtotal < $maxy] {
2163 $w.config.canvas configure -height $canvtotal
2164 } else {
2165 $w.config.canvas configure -height [expr $scry - $winy]
2166 }
2167 }
2168 update idletasks
2169 if {[winfo exists $w]} then {
2170 wm maxsize $w [winfo width $w] [winfo screenheight $w]
2171 wm minsize $w [winfo width $w] 100
2172
2173 wm deiconify $w
2174 }
2175 }
2176
2177 proc update_menu7 {} {
2178 global CONFIG_LEON3
2179 global CONFIG_MMU_ENABLE
2180 if {($CONFIG_LEON3 == 1)} then {
2181 configure_entry .menu7.config.f.x0 normal {n l y}} else {configure_entry .menu7.config.f.x0 disabled {y n l}}
2182 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1)} then {configure_entry .menu7.config.f.x1 normal {x l}} else {configure_entry .menu7.config.f.x1 disabled {x l}}
2183 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1)} then {configure_entry .menu7.config.f.x2 normal {x l}} else {configure_entry .menu7.config.f.x2 disabled {x l}}
2184 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1)} then {configure_entry .menu7.config.f.x3 normal {x l}} else {configure_entry .menu7.config.f.x3 disabled {x l}}
2185 global CONFIG_MMU_SPLIT
2186 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1) && ($CONFIG_MMU_SPLIT == 1)} then {configure_entry .menu7.config.f.x4 normal {x l}} else {configure_entry .menu7.config.f.x4 disabled {x l}}
2187 global CONFIG_MMU_FASTWB
2188 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1) && ($CONFIG_MMU_SPLIT == 1)} then {
2189 configure_entry .menu7.config.f.x5 normal {n l y}} else {configure_entry .menu7.config.f.x5 disabled {y n l}}
2190 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1)} then {configure_entry .menu7.config.f.x6 normal {x l}} else {configure_entry .menu7.config.f.x6 disabled {x l}}
2191 }
2192
2193
2194 proc update_define_menu7 {} {
2195 update_define_mainmenu
2196 global CONFIG_MODULES
2197 global CONFIG_LEON3
2198 global CONFIG_MMU_ENABLE
2199 if {($CONFIG_LEON3 == 1)} then {
2200 set CONFIG_MMU_ENABLE [expr $CONFIG_MMU_ENABLE&15]} else {set CONFIG_MMU_ENABLE [expr $CONFIG_MMU_ENABLE|16]}
2201 global tmpvar_18
2202 global CONFIG_MMU_COMBINED
2203 if {$tmpvar_18 == "combined"} then {set CONFIG_MMU_COMBINED 1} else {set CONFIG_MMU_COMBINED 0}
2204 global CONFIG_MMU_SPLIT
2205 if {$tmpvar_18 == "split"} then {set CONFIG_MMU_SPLIT 1} else {set CONFIG_MMU_SPLIT 0}
2206 global tmpvar_19
2207 global CONFIG_MMU_REPARRAY
2208 if {$tmpvar_19 == "LRU"} then {set CONFIG_MMU_REPARRAY 1} else {set CONFIG_MMU_REPARRAY 0}
2209 global CONFIG_MMU_REPINCREMENT
2210 if {$tmpvar_19 == "Increment"} then {set CONFIG_MMU_REPINCREMENT 1} else {set CONFIG_MMU_REPINCREMENT 0}
2211 global tmpvar_20
2212 global CONFIG_MMU_I2
2213 if {$tmpvar_20 == "2"} then {set CONFIG_MMU_I2 1} else {set CONFIG_MMU_I2 0}
2214 global CONFIG_MMU_I4
2215 if {$tmpvar_20 == "4"} then {set CONFIG_MMU_I4 1} else {set CONFIG_MMU_I4 0}
2216 global CONFIG_MMU_I8
2217 if {$tmpvar_20 == "8"} then {set CONFIG_MMU_I8 1} else {set CONFIG_MMU_I8 0}
2218 global CONFIG_MMU_I16
2219 if {$tmpvar_20 == "16"} then {set CONFIG_MMU_I16 1} else {set CONFIG_MMU_I16 0}
2220 global CONFIG_MMU_I32
2221 if {$tmpvar_20 == "32"} then {set CONFIG_MMU_I32 1} else {set CONFIG_MMU_I32 0}
2222 global tmpvar_21
2223 global CONFIG_MMU_D2
2224 if {$tmpvar_21 == "2"} then {set CONFIG_MMU_D2 1} else {set CONFIG_MMU_D2 0}
2225 global CONFIG_MMU_D4
2226 if {$tmpvar_21 == "4"} then {set CONFIG_MMU_D4 1} else {set CONFIG_MMU_D4 0}
2227 global CONFIG_MMU_D8
2228 if {$tmpvar_21 == "8"} then {set CONFIG_MMU_D8 1} else {set CONFIG_MMU_D8 0}
2229 global CONFIG_MMU_D16
2230 if {$tmpvar_21 == "16"} then {set CONFIG_MMU_D16 1} else {set CONFIG_MMU_D16 0}
2231 global CONFIG_MMU_D32
2232 if {$tmpvar_21 == "32"} then {set CONFIG_MMU_D32 1} else {set CONFIG_MMU_D32 0}
2233 global CONFIG_MMU_FASTWB
2234 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1) && ($CONFIG_MMU_SPLIT == 1)} then {
2235 set CONFIG_MMU_FASTWB [expr $CONFIG_MMU_FASTWB&15]} else {set CONFIG_MMU_FASTWB [expr $CONFIG_MMU_FASTWB|16]}
2236 global tmpvar_22
2237 global CONFIG_MMU_PAGE_4K
2238 if {$tmpvar_22 == "4K"} then {set CONFIG_MMU_PAGE_4K 1} else {set CONFIG_MMU_PAGE_4K 0}
2239 global CONFIG_MMU_PAGE_8K
2240 if {$tmpvar_22 == "8K"} then {set CONFIG_MMU_PAGE_8K 1} else {set CONFIG_MMU_PAGE_8K 0}
2241 global CONFIG_MMU_PAGE_16K
2242 if {$tmpvar_22 == "16K"} then {set CONFIG_MMU_PAGE_16K 1} else {set CONFIG_MMU_PAGE_16K 0}
2243 global CONFIG_MMU_PAGE_32K
2244 if {$tmpvar_22 == "32K"} then {set CONFIG_MMU_PAGE_32K 1} else {set CONFIG_MMU_PAGE_32K 0}
2245 global CONFIG_MMU_PAGE_PROG
2246 if {$tmpvar_22 == "Programmable"} then {set CONFIG_MMU_PAGE_PROG 1} else {set CONFIG_MMU_PAGE_PROG 0}
2247 }
2248
2249
2250 proc menu8 {w title} {
2251 set oldFocus [focus]
2252 catch {focus .menu3}
2253 catch {destroy $w; unregister_active 8}
2254 toplevel $w -class Dialog
2255 wm withdraw $w
2256 global active_menus
2257 set active_menus [lsort -integer [linsert $active_menus end 8]]
2258 message $w.m -width 400 -aspect 300 -text \
2259 "Debug Support Unit " -relief raised
2260 pack $w.m -pady 10 -side top -padx 10
2261 wm title $w "Debug Support Unit "
2262
2263 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 8; break"
2264 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 8; menu9 .menu9 \"$title\""
2265 frame $w.f
2266 button $w.f.back -text "OK" \
2267 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 8"
2268 button $w.f.next -text "Next" -underline 0\
2269 -width 15 -command $nextscript
2270 bind all <Alt-n> $nextscript
2271 button $w.f.prev -text "Prev" -underline 0\
2272 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 8; menu7 .menu7 \"$title\""
2273 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 8; menu7 .menu7 \"$title\";break"
2274 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
2275 pack $w.f -pady 10 -side bottom -anchor w -fill x
2276 frame $w.topline -relief ridge -borderwidth 2 -height 2
2277 pack $w.topline -side top -fill x
2278
2279 frame $w.botline -relief ridge -borderwidth 2 -height 2
2280 pack $w.botline -side bottom -fill x
2281
2282 frame $w.config
2283 pack $w.config -fill y -expand on
2284
2285 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
2286 pack $w.config.vscroll -side right -fill y
2287
2288 canvas $w.config.canvas -height 1\
2289 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
2290 -width [expr [winfo screenwidth .] * 1 / 2]
2291 frame $w.config.f
2292 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
2293 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
2294 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
2295 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
2296 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
2297 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
2298 pack $w.config.canvas -side right -fill y
2299
2300
2301 bool $w.config.f 8 0 "Enable LEON3 Debug support unit " CONFIG_DSU_ENABLE
2302 bool $w.config.f 8 1 "Instruction trace buffer" CONFIG_DSU_ITRACE
2303 global tmpvar_23
2304 minimenu $w.config.f 8 2 "Instruction trace buffer size (kbytes)" tmpvar_23 CONFIG_DSU_ITRACESZ1
2305 menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"Instruction trace buffer size (kbytes)\""
2306 $w.config.f.x2.x.menu add radiobutton -label "1" -variable tmpvar_23 -value "1" -command "update_active"
2307 $w.config.f.x2.x.menu add radiobutton -label "2" -variable tmpvar_23 -value "2" -command "update_active"
2308 $w.config.f.x2.x.menu add radiobutton -label "4" -variable tmpvar_23 -value "4" -command "update_active"
2309 $w.config.f.x2.x.menu add radiobutton -label "8" -variable tmpvar_23 -value "8" -command "update_active"
2310 $w.config.f.x2.x.menu add radiobutton -label "16" -variable tmpvar_23 -value "16" -command "update_active"
2311 menusplit $w $w.config.f.x2.x.menu 5
2312 bool $w.config.f 8 3 "AHB trace buffer" CONFIG_DSU_ATRACE
2313 global tmpvar_24
2314 minimenu $w.config.f 8 4 "AHB trace buffer size (kbytes)" tmpvar_24 CONFIG_DSU_ATRACESZ1
2315 menu $w.config.f.x4.x.menu -tearoffcommand "menutitle \"AHB trace buffer size (kbytes)\""
2316 $w.config.f.x4.x.menu add radiobutton -label "1" -variable tmpvar_24 -value "1" -command "update_active"
2317 $w.config.f.x4.x.menu add radiobutton -label "2" -variable tmpvar_24 -value "2" -command "update_active"
2318 $w.config.f.x4.x.menu add radiobutton -label "4" -variable tmpvar_24 -value "4" -command "update_active"
2319 $w.config.f.x4.x.menu add radiobutton -label "8" -variable tmpvar_24 -value "8" -command "update_active"
2320 $w.config.f.x4.x.menu add radiobutton -label "16" -variable tmpvar_24 -value "16" -command "update_active"
2321 menusplit $w $w.config.f.x4.x.menu 5
2322
2323
2324
2325 focus $w
2326 update_active
2327 global winx; global winy
2328 if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "}
2329 set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30]
2330 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
2331 update idletasks
2332 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
2333
2334 $w.config.canvas configure \
2335 -width [expr [winfo reqwidth $w.config.f] + 1]\
2336 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
2337 [expr [winfo reqheight $w.config.f] + 1]"
2338
2339 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
2340 set scry [expr [winfo screenh $w] / 2]
2341 set maxy [expr [winfo screenh $w] * 3 / 4]
2342 set canvtotal [expr [winfo reqh $w.config.f] + 2]
2343 if [expr $winy + $canvtotal < $maxy] {
2344 $w.config.canvas configure -height $canvtotal
2345 } else {
2346 $w.config.canvas configure -height [expr $scry - $winy]
2347 }
2348 }
2349 update idletasks
2350 if {[winfo exists $w]} then {
2351 wm maxsize $w [winfo width $w] [winfo screenheight $w]
2352 wm minsize $w [winfo width $w] 100
2353
2354 wm deiconify $w
2355 }
2356 }
2357
2358 proc update_menu8 {} {
2359 global CONFIG_LEON3
2360 global CONFIG_DSU_ENABLE
2361 if {($CONFIG_LEON3 == 1)} then {
2362 configure_entry .menu8.config.f.x0 normal {n l y}} else {configure_entry .menu8.config.f.x0 disabled {y n l}}
2363 global CONFIG_DSU_ITRACE
2364 if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1)} then {
2365 configure_entry .menu8.config.f.x1 normal {n l y}} else {configure_entry .menu8.config.f.x1 disabled {y n l}}
2366 if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1) && ($CONFIG_DSU_ITRACE == 1)} then {configure_entry .menu8.config.f.x2 normal {x l}} else {configure_entry .menu8.config.f.x2 disabled {x l}}
2367 global CONFIG_DSU_ATRACE
2368 if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1)} then {
2369 configure_entry .menu8.config.f.x3 normal {n l y}} else {configure_entry .menu8.config.f.x3 disabled {y n l}}
2370 if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1) && ($CONFIG_DSU_ATRACE == 1)} then {configure_entry .menu8.config.f.x4 normal {x l}} else {configure_entry .menu8.config.f.x4 disabled {x l}}
2371 }
2372
2373
2374 proc update_define_menu8 {} {
2375 update_define_mainmenu
2376 global CONFIG_MODULES
2377 global CONFIG_LEON3
2378 global CONFIG_DSU_ENABLE
2379 if {($CONFIG_LEON3 == 1)} then {
2380 set CONFIG_DSU_ENABLE [expr $CONFIG_DSU_ENABLE&15]} else {set CONFIG_DSU_ENABLE [expr $CONFIG_DSU_ENABLE|16]}
2381 global CONFIG_DSU_ITRACE
2382 if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1)} then {
2383 set CONFIG_DSU_ITRACE [expr $CONFIG_DSU_ITRACE&15]} else {set CONFIG_DSU_ITRACE [expr $CONFIG_DSU_ITRACE|16]}
2384 global tmpvar_23
2385 global CONFIG_DSU_ITRACESZ1
2386 if {$tmpvar_23 == "1"} then {set CONFIG_DSU_ITRACESZ1 1} else {set CONFIG_DSU_ITRACESZ1 0}
2387 global CONFIG_DSU_ITRACESZ2
2388 if {$tmpvar_23 == "2"} then {set CONFIG_DSU_ITRACESZ2 1} else {set CONFIG_DSU_ITRACESZ2 0}
2389 global CONFIG_DSU_ITRACESZ4
2390 if {$tmpvar_23 == "4"} then {set CONFIG_DSU_ITRACESZ4 1} else {set CONFIG_DSU_ITRACESZ4 0}
2391 global CONFIG_DSU_ITRACESZ8
2392 if {$tmpvar_23 == "8"} then {set CONFIG_DSU_ITRACESZ8 1} else {set CONFIG_DSU_ITRACESZ8 0}
2393 global CONFIG_DSU_ITRACESZ16
2394 if {$tmpvar_23 == "16"} then {set CONFIG_DSU_ITRACESZ16 1} else {set CONFIG_DSU_ITRACESZ16 0}
2395 global CONFIG_DSU_ATRACE
2396 if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1)} then {
2397 set CONFIG_DSU_ATRACE [expr $CONFIG_DSU_ATRACE&15]} else {set CONFIG_DSU_ATRACE [expr $CONFIG_DSU_ATRACE|16]}
2398 global tmpvar_24
2399 global CONFIG_DSU_ATRACESZ1
2400 if {$tmpvar_24 == "1"} then {set CONFIG_DSU_ATRACESZ1 1} else {set CONFIG_DSU_ATRACESZ1 0}
2401 global CONFIG_DSU_ATRACESZ2
2402 if {$tmpvar_24 == "2"} then {set CONFIG_DSU_ATRACESZ2 1} else {set CONFIG_DSU_ATRACESZ2 0}
2403 global CONFIG_DSU_ATRACESZ4
2404 if {$tmpvar_24 == "4"} then {set CONFIG_DSU_ATRACESZ4 1} else {set CONFIG_DSU_ATRACESZ4 0}
2405 global CONFIG_DSU_ATRACESZ8
2406 if {$tmpvar_24 == "8"} then {set CONFIG_DSU_ATRACESZ8 1} else {set CONFIG_DSU_ATRACESZ8 0}
2407 global CONFIG_DSU_ATRACESZ16
2408 if {$tmpvar_24 == "16"} then {set CONFIG_DSU_ATRACESZ16 1} else {set CONFIG_DSU_ATRACESZ16 0}
2409 }
2410
2411
2412 proc menu9 {w title} {
2413 set oldFocus [focus]
2414 catch {focus .menu3}
2415 catch {destroy $w; unregister_active 9}
2416 toplevel $w -class Dialog
2417 wm withdraw $w
2418 global active_menus
2419 set active_menus [lsort -integer [linsert $active_menus end 9]]
2420 message $w.m -width 400 -aspect 300 -text \
2421 "Fault-tolerance " -relief raised
2422 pack $w.m -pady 10 -side top -padx 10
2423 wm title $w "Fault-tolerance "
2424
2425 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 9; break"
2426 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 9; menu10 .menu10 \"$title\""
2427 frame $w.f
2428 button $w.f.back -text "OK" \
2429 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 9"
2430 button $w.f.next -text "Next" -underline 0\
2431 -width 15 -command $nextscript
2432 bind all <Alt-n> $nextscript
2433 button $w.f.prev -text "Prev" -underline 0\
2434 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 9; menu8 .menu8 \"$title\""
2435 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 9; menu8 .menu8 \"$title\";break"
2436 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
2437 pack $w.f -pady 10 -side bottom -anchor w -fill x
2438 frame $w.topline -relief ridge -borderwidth 2 -height 2
2439 pack $w.topline -side top -fill x
2440
2441 frame $w.botline -relief ridge -borderwidth 2 -height 2
2442 pack $w.botline -side bottom -fill x
2443
2444 frame $w.config
2445 pack $w.config -fill y -expand on
2446
2447 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
2448 pack $w.config.vscroll -side right -fill y
2449
2450 canvas $w.config.canvas -height 1\
2451 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
2452 -width [expr [winfo screenwidth .] * 1 / 2]
2453 frame $w.config.f
2454 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
2455 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
2456 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
2457 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
2458 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
2459 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
2460 pack $w.config.canvas -side right -fill y
2461
2462
2463 bool $w.config.f 9 0 "Use LEON3-FT processor core " CONFIG_LEON3FT_EN
2464 global tmpvar_25
2465 minimenu $w.config.f 9 1 "IU Register file protection " tmpvar_25 CONFIG_IUFT_NONE
2466 menu $w.config.f.x1.x.menu -tearoffcommand "menutitle \"IU Register file protection \""
2467 $w.config.f.x1.x.menu add radiobutton -label "None" -variable tmpvar_25 -value "None" -command "update_active"
2468 $w.config.f.x1.x.menu add radiobutton -label "Parity" -variable tmpvar_25 -value "Parity" -command "update_active"
2469 $w.config.f.x1.x.menu add radiobutton -label "PDMR" -variable tmpvar_25 -value "PDMR" -command "update_active"
2470 $w.config.f.x1.x.menu add radiobutton -label "BCH" -variable tmpvar_25 -value "BCH" -command "update_active"
2471 $w.config.f.x1.x.menu add radiobutton -label "TMR" -variable tmpvar_25 -value "TMR" -command "update_active"
2472 menusplit $w $w.config.f.x1.x.menu 5
2473 bool $w.config.f 9 2 "FPU Register file protection " CONFIG_FPUFT_EN
2474 bool $w.config.f 9 3 "Register file error injection" CONFIG_RF_ERRINJ
2475 bool $w.config.f 9 4 "Cache memory protection " CONFIG_CACHE_FT_EN
2476 int $w.config.f 9 5 "Cache memory error injection" CONFIG_CACHE_ERRINJ
2477 bool $w.config.f 9 6 "Use LEON3FT netlist " CONFIG_LEON3_NETLIST
2478
2479
2480
2481 focus $w
2482 update_active
2483 global winx; global winy
2484 if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "}
2485 set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30]
2486 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
2487 update idletasks
2488 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
2489
2490 $w.config.canvas configure \
2491 -width [expr [winfo reqwidth $w.config.f] + 1]\
2492 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
2493 [expr [winfo reqheight $w.config.f] + 1]"
2494
2495 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
2496 set scry [expr [winfo screenh $w] / 2]
2497 set maxy [expr [winfo screenh $w] * 3 / 4]
2498 set canvtotal [expr [winfo reqh $w.config.f] + 2]
2499 if [expr $winy + $canvtotal < $maxy] {
2500 $w.config.canvas configure -height $canvtotal
2501 } else {
2502 $w.config.canvas configure -height [expr $scry - $winy]
2503 }
2504 }
2505 update idletasks
2506 if {[winfo exists $w]} then {
2507 wm maxsize $w [winfo width $w] [winfo screenheight $w]
2508 wm minsize $w [winfo width $w] 100
2509
2510 wm deiconify $w
2511 }
2512 }
2513
2514 proc update_menu9 {} {
2515 global CONFIG_LEON3
2516 global CONFIG_LEON3FT_EN
2517 if {($CONFIG_LEON3 == 1)} then {
2518 configure_entry .menu9.config.f.x0 normal {n l y}} else {configure_entry .menu9.config.f.x0 disabled {y n l}}
2519 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {configure_entry .menu9.config.f.x1 normal {x l}} else {configure_entry .menu9.config.f.x1 disabled {x l}}
2520 global CONFIG_FPU_ENABLE
2521 global CONFIG_FPUFT_EN
2522 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1) && ($CONFIG_FPU_ENABLE == 1)} then {
2523 configure_entry .menu9.config.f.x2 normal {n l y}} else {configure_entry .menu9.config.f.x2 disabled {y n l}}
2524 global CONFIG_RF_ERRINJ
2525 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {
2526 configure_entry .menu9.config.f.x3 normal {n l y}} else {configure_entry .menu9.config.f.x3 disabled {y n l}}
2527 global CONFIG_CACHE_FT_EN
2528 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {
2529 configure_entry .menu9.config.f.x4 normal {n l y}} else {configure_entry .menu9.config.f.x4 disabled {y n l}}
2530 global CONFIG_CACHE_ERRINJ
2531 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {.menu9.config.f.x5.x configure -state normal -foreground [ cget .ref -foreground ]; .menu9.config.f.x5.l configure -state normal; } else {.menu9.config.f.x5.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu9.config.f.x5.l configure -state disabled}
2532 global CONFIG_LEON3_NETLIST
2533 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {
2534 configure_entry .menu9.config.f.x6 normal {n l y}} else {configure_entry .menu9.config.f.x6 disabled {y n l}}
2535 }
2536
2537
2538 proc update_define_menu9 {} {
2539 update_define_mainmenu
2540 global CONFIG_MODULES
2541 global CONFIG_LEON3
2542 global CONFIG_LEON3FT_EN
2543 if {($CONFIG_LEON3 == 1)} then {
2544 set CONFIG_LEON3FT_EN [expr $CONFIG_LEON3FT_EN&15]} else {set CONFIG_LEON3FT_EN [expr $CONFIG_LEON3FT_EN|16]}
2545 global tmpvar_25
2546 global CONFIG_IUFT_NONE
2547 if {$tmpvar_25 == "None"} then {set CONFIG_IUFT_NONE 1} else {set CONFIG_IUFT_NONE 0}
2548 global CONFIG_IUFT_PAR
2549 if {$tmpvar_25 == "Parity"} then {set CONFIG_IUFT_PAR 1} else {set CONFIG_IUFT_PAR 0}
2550 global CONFIG_IUFT_DMR
2551 if {$tmpvar_25 == "PDMR"} then {set CONFIG_IUFT_DMR 1} else {set CONFIG_IUFT_DMR 0}
2552 global CONFIG_IUFT_BCH
2553 if {$tmpvar_25 == "BCH"} then {set CONFIG_IUFT_BCH 1} else {set CONFIG_IUFT_BCH 0}
2554 global CONFIG_IUFT_TMR
2555 if {$tmpvar_25 == "TMR"} then {set CONFIG_IUFT_TMR 1} else {set CONFIG_IUFT_TMR 0}
2556 global CONFIG_FPU_ENABLE
2557 global CONFIG_FPUFT_EN
2558 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1) && ($CONFIG_FPU_ENABLE == 1)} then {
2559 set CONFIG_FPUFT_EN [expr $CONFIG_FPUFT_EN&15]} else {set CONFIG_FPUFT_EN [expr $CONFIG_FPUFT_EN|16]}
2560 global CONFIG_RF_ERRINJ
2561 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {
2562 set CONFIG_RF_ERRINJ [expr $CONFIG_RF_ERRINJ&15]} else {set CONFIG_RF_ERRINJ [expr $CONFIG_RF_ERRINJ|16]}
2563 global CONFIG_CACHE_FT_EN
2564 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {
2565 set CONFIG_CACHE_FT_EN [expr $CONFIG_CACHE_FT_EN&15]} else {set CONFIG_CACHE_FT_EN [expr $CONFIG_CACHE_FT_EN|16]}
2566 global CONFIG_CACHE_ERRINJ
2567 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {validate_int CONFIG_CACHE_ERRINJ "$CONFIG_CACHE_ERRINJ" 0}
2568 global CONFIG_LEON3_NETLIST
2569 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {
2570 set CONFIG_LEON3_NETLIST [expr $CONFIG_LEON3_NETLIST&15]} else {set CONFIG_LEON3_NETLIST [expr $CONFIG_LEON3_NETLIST|16]}
2571 }
2572
2573
2574 proc menu10 {w title} {
2575 set oldFocus [focus]
2576 catch {focus .menu3}
2577 catch {destroy $w; unregister_active 10}
2578 toplevel $w -class Dialog
2579 wm withdraw $w
2580 global active_menus
2581 set active_menus [lsort -integer [linsert $active_menus end 10]]
2582 message $w.m -width 400 -aspect 300 -text \
2583 "VHDL debug settings " -relief raised
2584 pack $w.m -pady 10 -side top -padx 10
2585 wm title $w "VHDL debug settings "
2586
2587 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 10; break"
2588 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 10; catch {destroy .menu3}; unregister_active 3; menu11 .menu11 \"$title\""
2589 frame $w.f
2590 button $w.f.back -text "OK" \
2591 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 10"
2592 button $w.f.next -text "Next" -underline 0\
2593 -width 15 -command $nextscript
2594 bind all <Alt-n> $nextscript
2595 button $w.f.prev -text "Prev" -underline 0\
2596 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 10; menu9 .menu9 \"$title\""
2597 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 10; menu9 .menu9 \"$title\";break"
2598 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
2599 pack $w.f -pady 10 -side bottom -anchor w -fill x
2600 frame $w.topline -relief ridge -borderwidth 2 -height 2
2601 pack $w.topline -side top -fill x
2602
2603 frame $w.botline -relief ridge -borderwidth 2 -height 2
2604 pack $w.botline -side bottom -fill x
2605
2606 frame $w.config
2607 pack $w.config -fill y -expand on
2608
2609 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
2610 pack $w.config.vscroll -side right -fill y
2611
2612 canvas $w.config.canvas -height 1\
2613 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
2614 -width [expr [winfo screenwidth .] * 1 / 2]
2615 frame $w.config.f
2616 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
2617 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
2618 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
2619 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
2620 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
2621 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
2622 pack $w.config.canvas -side right -fill y
2623
2624
2625 bool $w.config.f 10 0 "Processor disassembly to console " CONFIG_IU_DISAS
2626 bool $w.config.f 10 1 "Processor disassembly in netlist " CONFIG_IU_DISAS_NET
2627 bool $w.config.f 10 2 "32-bit program counters " CONFIG_DEBUG_PC32
2628
2629
2630
2631 focus $w
2632 update_active
2633 global winx; global winy
2634 if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "}
2635 set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30]
2636 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
2637 update idletasks
2638 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
2639
2640 $w.config.canvas configure \
2641 -width [expr [winfo reqwidth $w.config.f] + 1]\
2642 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
2643 [expr [winfo reqheight $w.config.f] + 1]"
2644
2645 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
2646 set scry [expr [winfo screenh $w] / 2]
2647 set maxy [expr [winfo screenh $w] * 3 / 4]
2648 set canvtotal [expr [winfo reqh $w.config.f] + 2]
2649 if [expr $winy + $canvtotal < $maxy] {
2650 $w.config.canvas configure -height $canvtotal
2651 } else {
2652 $w.config.canvas configure -height [expr $scry - $winy]
2653 }
2654 }
2655 update idletasks
2656 if {[winfo exists $w]} then {
2657 wm maxsize $w [winfo width $w] [winfo screenheight $w]
2658 wm minsize $w [winfo width $w] 100
2659
2660 wm deiconify $w
2661 }
2662 }
2663
2664 proc update_menu10 {} {
2665 global CONFIG_LEON3
2666 global CONFIG_IU_DISAS
2667 if {($CONFIG_LEON3 == 1)} then {
2668 configure_entry .menu10.config.f.x0 normal {n l y}} else {configure_entry .menu10.config.f.x0 disabled {y n l}}
2669 global CONFIG_IU_DISAS_NET
2670 if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_DISAS == 1)} then {
2671 configure_entry .menu10.config.f.x1 normal {n l y}} else {configure_entry .menu10.config.f.x1 disabled {y n l}}
2672 global CONFIG_DEBUG_PC32
2673 if {($CONFIG_LEON3 == 1)} then {
2674 configure_entry .menu10.config.f.x2 normal {n l y}} else {configure_entry .menu10.config.f.x2 disabled {y n l}}
2675 }
2676
2677
2678 proc update_define_menu10 {} {
2679 update_define_mainmenu
2680 global CONFIG_MODULES
2681 global CONFIG_LEON3
2682 global CONFIG_IU_DISAS
2683 if {($CONFIG_LEON3 == 1)} then {
2684 set CONFIG_IU_DISAS [expr $CONFIG_IU_DISAS&15]} else {set CONFIG_IU_DISAS [expr $CONFIG_IU_DISAS|16]}
2685 global CONFIG_IU_DISAS_NET
2686 if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_DISAS == 1)} then {
2687 set CONFIG_IU_DISAS_NET [expr $CONFIG_IU_DISAS_NET&15]} else {set CONFIG_IU_DISAS_NET [expr $CONFIG_IU_DISAS_NET|16]}
2688 global CONFIG_DEBUG_PC32
2689 if {($CONFIG_LEON3 == 1)} then {
2690 set CONFIG_DEBUG_PC32 [expr $CONFIG_DEBUG_PC32&15]} else {set CONFIG_DEBUG_PC32 [expr $CONFIG_DEBUG_PC32|16]}
2691 }
2692
2693
2694 menu_option menu11 11 "AMBA configuration"
2695 proc menu11 {w title} {
2696 set oldFocus [focus]
2697 catch {destroy $w; unregister_active 11}
2698 toplevel $w -class Dialog
2699 wm withdraw $w
2700 global active_menus
2701 set active_menus [lsort -integer [linsert $active_menus end 11]]
2702 message $w.m -width 400 -aspect 300 -text \
2703 "AMBA configuration" -relief raised
2704 pack $w.m -pady 10 -side top -padx 10
2705 wm title $w "AMBA configuration"
2706
2707 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 11; break"
2708 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 11; menu12 .menu12 \"$title\""
2709 frame $w.f
2710 button $w.f.back -text "Main Menu" \
2711 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 11"
2712 button $w.f.next -text "Next" -underline 0\
2713 -width 15 -command $nextscript
2714 bind all <Alt-n> $nextscript
2715 button $w.f.prev -text "Prev" -underline 0\
2716 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 11; menu10 .menu10 \"$title\""
2717 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 11; menu10 .menu10 \"$title\";break"
2718 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
2719 pack $w.f -pady 10 -side bottom -anchor w -fill x
2720 frame $w.topline -relief ridge -borderwidth 2 -height 2
2721 pack $w.topline -side top -fill x
2722
2723 frame $w.botline -relief ridge -borderwidth 2 -height 2
2724 pack $w.botline -side bottom -fill x
2725
2726 frame $w.config
2727 pack $w.config -fill y -expand on
2728
2729 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
2730 pack $w.config.vscroll -side right -fill y
2731
2732 canvas $w.config.canvas -height 1\
2733 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
2734 -width [expr [winfo screenwidth .] * 1 / 2]
2735 frame $w.config.f
2736 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
2737 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
2738 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
2739 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
2740 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
2741 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
2742 pack $w.config.canvas -side right -fill y
2743
2744
2745 int $w.config.f 11 0 "Default AHB master" CONFIG_AHB_DEFMST
2746 bool $w.config.f 11 1 "Round-robin arbiter " CONFIG_AHB_RROBIN
2747 bool $w.config.f 11 2 "AHB split-transaction support " CONFIG_AHB_SPLIT
2748 hex $w.config.f 11 3 "I/O area start address (haddr\[31:20\]) " CONFIG_AHB_IOADDR
2749 hex $w.config.f 11 4 "AHB/APB bridge address (haddr\[31:20\]) " CONFIG_APB_HADDR
2750 bool $w.config.f 11 5 "Enable AMBA AHB monitor " CONFIG_AHB_MON
2751 bool $w.config.f 11 6 "Report AHB errors " CONFIG_AHB_MONERR
2752 bool $w.config.f 11 7 "Report AHB warings " CONFIG_AHB_MONWAR
2753 bool $w.config.f 11 8 "Write trace to simulation console " CONFIG_AHB_DTRACE
2754
2755
2756
2757 focus $w
2758 update_active
2759 global winx; global winy
2760 set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
2761 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
2762 update idletasks
2763 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
2764
2765 $w.config.canvas configure \
2766 -width [expr [winfo reqwidth $w.config.f] + 1]\
2767 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
2768 [expr [winfo reqheight $w.config.f] + 1]"
2769
2770 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
2771 set scry [expr [winfo screenh $w] / 2]
2772 set maxy [expr [winfo screenh $w] * 3 / 4]
2773 set canvtotal [expr [winfo reqh $w.config.f] + 2]
2774 if [expr $winy + $canvtotal < $maxy] {
2775 $w.config.canvas configure -height $canvtotal
2776 } else {
2777 $w.config.canvas configure -height [expr $scry - $winy]
2778 }
2779 }
2780 update idletasks
2781 if {[winfo exists $w]} then {
2782 wm maxsize $w [winfo width $w] [winfo screenheight $w]
2783 wm minsize $w [winfo width $w] 100
2784
2785 wm deiconify $w
2786 }
2787 }
2788
2789 proc update_menu11 {} {
2790 global CONFIG_AHB_MON
2791 global CONFIG_AHB_MONERR
2792 if {($CONFIG_AHB_MON == 1)} then {
2793 configure_entry .menu11.config.f.x6 normal {n l y}} else {configure_entry .menu11.config.f.x6 disabled {y n l}}
2794 global CONFIG_AHB_MONWAR
2795 if {($CONFIG_AHB_MON == 1)} then {
2796 configure_entry .menu11.config.f.x7 normal {n l y}} else {configure_entry .menu11.config.f.x7 disabled {y n l}}
2797 }
2798
2799
2800 proc update_define_menu11 {} {
2801 update_define_mainmenu
2802 global CONFIG_MODULES
2803 global CONFIG_AHB_MON
2804 global CONFIG_AHB_MONERR
2805 if {($CONFIG_AHB_MON == 1)} then {
2806 set CONFIG_AHB_MONERR [expr $CONFIG_AHB_MONERR&15]} else {set CONFIG_AHB_MONERR [expr $CONFIG_AHB_MONERR|16]}
2807 global CONFIG_AHB_MONWAR
2808 if {($CONFIG_AHB_MON == 1)} then {
2809 set CONFIG_AHB_MONWAR [expr $CONFIG_AHB_MONWAR&15]} else {set CONFIG_AHB_MONWAR [expr $CONFIG_AHB_MONWAR|16]}
2810 }
2811
2812
2813 menu_option menu12 12 "Debug Link "
2814 proc menu12 {w title} {
2815 set oldFocus [focus]
2816 catch {destroy $w; unregister_active 12}
2817 toplevel $w -class Dialog
2818 wm withdraw $w
2819 global active_menus
2820 set active_menus [lsort -integer [linsert $active_menus end 12]]
2821 message $w.m -width 400 -aspect 300 -text \
2822 "Debug Link " -relief raised
2823 pack $w.m -pady 10 -side top -padx 10
2824 wm title $w "Debug Link "
2825
2826 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 12; break"
2827 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 12; menu13 .menu13 \"$title\""
2828 frame $w.f
2829 button $w.f.back -text "Main Menu" \
2830 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 12"
2831 button $w.f.next -text "Next" -underline 0\
2832 -width 15 -command $nextscript
2833 bind all <Alt-n> $nextscript
2834 button $w.f.prev -text "Prev" -underline 0\
2835 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 12; menu11 .menu11 \"$title\""
2836 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 12; menu11 .menu11 \"$title\";break"
2837 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
2838 pack $w.f -pady 10 -side bottom -anchor w -fill x
2839 frame $w.topline -relief ridge -borderwidth 2 -height 2
2840 pack $w.topline -side top -fill x
2841
2842 frame $w.botline -relief ridge -borderwidth 2 -height 2
2843 pack $w.botline -side bottom -fill x
2844
2845 frame $w.config
2846 pack $w.config -fill y -expand on
2847
2848 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
2849 pack $w.config.vscroll -side right -fill y
2850
2851 canvas $w.config.canvas -height 1\
2852 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
2853 -width [expr [winfo screenwidth .] * 1 / 2]
2854 frame $w.config.f
2855 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
2856 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
2857 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
2858 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
2859 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
2860 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
2861 pack $w.config.canvas -side right -fill y
2862
2863
2864 bool $w.config.f 12 0 "JTAG Debug Link" CONFIG_DSU_JTAG
2865 bool $w.config.f 12 1 "Ethernet Debug Communication Link (EDCL)" CONFIG_DSU_ETH
2866 global tmpvar_26
2867 minimenu $w.config.f 12 2 "Ethernet/AHB bridge buffer size (kbytes)" tmpvar_26 CONFIG_DSU_ETHSZ1
2868 menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"Ethernet/AHB bridge buffer size (kbytes)\""
2869 $w.config.f.x2.x.menu add radiobutton -label "1" -variable tmpvar_26 -value "1" -command "update_active"
2870 $w.config.f.x2.x.menu add radiobutton -label "2" -variable tmpvar_26 -value "2" -command "update_active"
2871 $w.config.f.x2.x.menu add radiobutton -label "4" -variable tmpvar_26 -value "4" -command "update_active"
2872 $w.config.f.x2.x.menu add radiobutton -label "8" -variable tmpvar_26 -value "8" -command "update_active"
2873 $w.config.f.x2.x.menu add radiobutton -label "16" -variable tmpvar_26 -value "16" -command "update_active"
2874 menusplit $w $w.config.f.x2.x.menu 5
2875 hex $w.config.f 12 3 "MSB 16 bits of IP address (hex) " CONFIG_DSU_IPMSB
2876 hex $w.config.f 12 4 "LSB 16 bits of IP address (hex) " CONFIG_DSU_IPLSB
2877 hex $w.config.f 12 5 "MSB 24 bits of ethern number (hex) " CONFIG_DSU_ETHMSB
2878 hex $w.config.f 12 6 "LSB 24 bits of ethern number (hex) " CONFIG_DSU_ETHLSB
2879 bool $w.config.f 12 7 "Programmable 4-bit LSB of MAC/IP address" CONFIG_DSU_ETH_PROG
2880 bool $w.config.f 12 8 "EDCL disable pin " CONFIG_DSU_ETH_DIS
2881
2882
2883
2884 focus $w
2885 update_active
2886 global winx; global winy
2887 set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
2888 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
2889 update idletasks
2890 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
2891
2892 $w.config.canvas configure \
2893 -width [expr [winfo reqwidth $w.config.f] + 1]\
2894 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
2895 [expr [winfo reqheight $w.config.f] + 1]"
2896
2897 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
2898 set scry [expr [winfo screenh $w] / 2]
2899 set maxy [expr [winfo screenh $w] * 3 / 4]
2900 set canvtotal [expr [winfo reqh $w.config.f] + 2]
2901 if [expr $winy + $canvtotal < $maxy] {
2902 $w.config.canvas configure -height $canvtotal
2903 } else {
2904 $w.config.canvas configure -height [expr $scry - $winy]
2905 }
2906 }
2907 update idletasks
2908 if {[winfo exists $w]} then {
2909 wm maxsize $w [winfo width $w] [winfo screenheight $w]
2910 wm minsize $w [winfo width $w] 100
2911
2912 wm deiconify $w
2913 }
2914 }
2915
2916 proc update_menu12 {} {
2917 global CONFIG_GRETH_ENABLE
2918 global CONFIG_DSU_ETH
2919 if {($CONFIG_GRETH_ENABLE == 1)} then {
2920 configure_entry .menu12.config.f.x1 normal {n l y}} else {configure_entry .menu12.config.f.x1 disabled {y n l}}
2921 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {configure_entry .menu12.config.f.x2 normal {x l}} else {configure_entry .menu12.config.f.x2 disabled {x l}}
2922 global CONFIG_DSU_IPMSB
2923 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {.menu12.config.f.x3.x configure -state normal -foreground [ cget .ref -foreground ]; .menu12.config.f.x3.l configure -state normal; } else {.menu12.config.f.x3.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu12.config.f.x3.l configure -state disabled}
2924 global CONFIG_DSU_IPLSB
2925 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {.menu12.config.f.x4.x configure -state normal -foreground [ cget .ref -foreground ]; .menu12.config.f.x4.l configure -state normal; } else {.menu12.config.f.x4.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu12.config.f.x4.l configure -state disabled}
2926 global CONFIG_DSU_ETHMSB
2927 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {.menu12.config.f.x5.x configure -state normal -foreground [ cget .ref -foreground ]; .menu12.config.f.x5.l configure -state normal; } else {.menu12.config.f.x5.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu12.config.f.x5.l configure -state disabled}
2928 global CONFIG_DSU_ETHLSB
2929 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {.menu12.config.f.x6.x configure -state normal -foreground [ cget .ref -foreground ]; .menu12.config.f.x6.l configure -state normal; } else {.menu12.config.f.x6.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu12.config.f.x6.l configure -state disabled}
2930 global CONFIG_GRETH_GIGA
2931 global CONFIG_DSU_ETH_PROG
2932 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1) && ($CONFIG_GRETH_GIGA == 0)} then {
2933 configure_entry .menu12.config.f.x7 normal {n l y}} else {configure_entry .menu12.config.f.x7 disabled {y n l}}
2934 global CONFIG_DSU_ETH_DIS
2935 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1) && ($CONFIG_GRETH_GIGA == 0)} then {
2936 configure_entry .menu12.config.f.x8 normal {n l y}} else {configure_entry .menu12.config.f.x8 disabled {y n l}}
2937 }
2938
2939
2940 proc update_define_menu12 {} {
2941 update_define_mainmenu
2942 global CONFIG_MODULES
2943 global CONFIG_GRETH_ENABLE
2944 global CONFIG_DSU_ETH
2945 if {($CONFIG_GRETH_ENABLE == 1)} then {
2946 set CONFIG_DSU_ETH [expr $CONFIG_DSU_ETH&15]} else {set CONFIG_DSU_ETH [expr $CONFIG_DSU_ETH|16]}
2947 global tmpvar_26
2948 global CONFIG_DSU_ETHSZ1
2949 if {$tmpvar_26 == "1"} then {set CONFIG_DSU_ETHSZ1 1} else {set CONFIG_DSU_ETHSZ1 0}
2950 global CONFIG_DSU_ETHSZ2
2951 if {$tmpvar_26 == "2"} then {set CONFIG_DSU_ETHSZ2 1} else {set CONFIG_DSU_ETHSZ2 0}
2952 global CONFIG_DSU_ETHSZ4
2953 if {$tmpvar_26 == "4"} then {set CONFIG_DSU_ETHSZ4 1} else {set CONFIG_DSU_ETHSZ4 0}
2954 global CONFIG_DSU_ETHSZ8
2955 if {$tmpvar_26 == "8"} then {set CONFIG_DSU_ETHSZ8 1} else {set CONFIG_DSU_ETHSZ8 0}
2956 global CONFIG_DSU_ETHSZ16
2957 if {$tmpvar_26 == "16"} then {set CONFIG_DSU_ETHSZ16 1} else {set CONFIG_DSU_ETHSZ16 0}
2958 global CONFIG_DSU_IPMSB
2959 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {validate_hex CONFIG_DSU_IPMSB "$CONFIG_DSU_IPMSB" C0A8}
2960 global CONFIG_DSU_IPLSB
2961 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {validate_hex CONFIG_DSU_IPLSB "$CONFIG_DSU_IPLSB" 0033}
2962 global CONFIG_DSU_ETHMSB
2963 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {validate_hex CONFIG_DSU_ETHMSB "$CONFIG_DSU_ETHMSB" 020000}
2964 global CONFIG_DSU_ETHLSB
2965 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {validate_hex CONFIG_DSU_ETHLSB "$CONFIG_DSU_ETHLSB" 000000}
2966 global CONFIG_GRETH_GIGA
2967 global CONFIG_DSU_ETH_PROG
2968 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1) && ($CONFIG_GRETH_GIGA == 0)} then {
2969 set CONFIG_DSU_ETH_PROG [expr $CONFIG_DSU_ETH_PROG&15]} else {set CONFIG_DSU_ETH_PROG [expr $CONFIG_DSU_ETH_PROG|16]}
2970 global CONFIG_DSU_ETH_DIS
2971 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1) && ($CONFIG_GRETH_GIGA == 0)} then {
2972 set CONFIG_DSU_ETH_DIS [expr $CONFIG_DSU_ETH_DIS&15]} else {set CONFIG_DSU_ETH_DIS [expr $CONFIG_DSU_ETH_DIS|16]}
2973 }
2974
2975
2976 menu_option menu13 13 "Peripherals "
2977 proc menu13 {w title} {
2978 set oldFocus [focus]
2979 catch {destroy $w; unregister_active 13}
2980 toplevel $w -class Dialog
2981 wm withdraw $w
2982 global active_menus
2983 set active_menus [lsort -integer [linsert $active_menus end 13]]
2984 message $w.m -width 400 -aspect 300 -text \
2985 "Peripherals " -relief raised
2986 pack $w.m -pady 10 -side top -padx 10
2987 wm title $w "Peripherals "
2988
2989 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 13; break"
2990 set nextscript "catch {focus $oldFocus}; menu14 .menu14 \"$title\""
2991 frame $w.f
2992 button $w.f.back -text "Main Menu" \
2993 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 13"
2994 button $w.f.next -text "Next" -underline 0\
2995 -width 15 -command $nextscript
2996 bind all <Alt-n> $nextscript
2997 button $w.f.prev -text "Prev" -underline 0\
2998 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 13; menu12 .menu12 \"$title\""
2999 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 13; menu12 .menu12 \"$title\";break"
3000 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
3001 pack $w.f -pady 10 -side bottom -anchor w -fill x
3002 frame $w.topline -relief ridge -borderwidth 2 -height 2
3003 pack $w.topline -side top -fill x
3004
3005 frame $w.botline -relief ridge -borderwidth 2 -height 2
3006 pack $w.botline -side bottom -fill x
3007
3008 frame $w.config
3009 pack $w.config -fill y -expand on
3010
3011 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
3012 pack $w.config.vscroll -side right -fill y
3013
3014 canvas $w.config.canvas -height 1\
3015 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
3016 -width [expr [winfo screenwidth .] * 1 / 2]
3017 frame $w.config.f
3018 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
3019 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
3020 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
3021 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
3022 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
3023 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
3024 pack $w.config.canvas -side right -fill y
3025
3026
3027 submenu $w.config.f 13 0 "Memory controller " 14
3028 submenu $w.config.f 13 1 "On-chip RAM/ROM " 17
3029 submenu $w.config.f 13 2 "Ethernet " 18
3030 submenu $w.config.f 13 3 "UART, timer, I/O port and interrupt controller" 19
3031 submenu $w.config.f 13 4 "Keybord and VGA interface" 20
3032 submenu $w.config.f 13 5 "SPI" 21
3033
3034
3035
3036 focus $w
3037 update_active
3038 global winx; global winy
3039 set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
3040 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
3041 update idletasks
3042 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
3043
3044 $w.config.canvas configure \
3045 -width [expr [winfo reqwidth $w.config.f] + 1]\
3046 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
3047 [expr [winfo reqheight $w.config.f] + 1]"
3048
3049 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
3050 set scry [expr [winfo screenh $w] / 2]
3051 set maxy [expr [winfo screenh $w] * 3 / 4]
3052 set canvtotal [expr [winfo reqh $w.config.f] + 2]
3053 if [expr $winy + $canvtotal < $maxy] {
3054 $w.config.canvas configure -height $canvtotal
3055 } else {
3056 $w.config.canvas configure -height [expr $scry - $winy]
3057 }
3058 }
3059 update idletasks
3060 if {[winfo exists $w]} then {
3061 wm maxsize $w [winfo width $w] [winfo screenheight $w]
3062 wm minsize $w [winfo width $w] 100
3063
3064 wm deiconify $w
3065 }
3066 }
3067
3068 proc update_menu13 {} {
3069 }
3070
3071
3072 proc update_define_menu13 {} {
3073 update_define_mainmenu
3074 global CONFIG_MODULES
3075 }
3076
3077
3078 proc menu14 {w title} {
3079 set oldFocus [focus]
3080 catch {focus .menu13}
3081 catch {destroy $w; unregister_active 14}
3082 toplevel $w -class Dialog
3083 wm withdraw $w
3084 global active_menus
3085 set active_menus [lsort -integer [linsert $active_menus end 14]]
3086 message $w.m -width 400 -aspect 300 -text \
3087 "Memory controller " -relief raised
3088 pack $w.m -pady 10 -side top -padx 10
3089 wm title $w "Memory controller "
3090
3091 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 14; break"
3092 set nextscript "catch {focus $oldFocus}; menu15 .menu15 \"$title\""
3093 frame $w.f
3094 button $w.f.back -text "OK" \
3095 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 14"
3096 button $w.f.next -text "Next" -underline 0\
3097 -width 15 -command $nextscript
3098 bind all <Alt-n> $nextscript
3099 button $w.f.prev -text "Prev" -underline 0\
3100 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 14; menu13 .menu13 \"$title\""
3101 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 14; menu13 .menu13 \"$title\";break"
3102 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
3103 pack $w.f -pady 10 -side bottom -anchor w -fill x
3104 frame $w.topline -relief ridge -borderwidth 2 -height 2
3105 pack $w.topline -side top -fill x
3106
3107 frame $w.botline -relief ridge -borderwidth 2 -height 2
3108 pack $w.botline -side bottom -fill x
3109
3110 frame $w.config
3111 pack $w.config -fill y -expand on
3112
3113 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
3114 pack $w.config.vscroll -side right -fill y
3115
3116 canvas $w.config.canvas -height 1\
3117 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
3118 -width [expr [winfo screenwidth .] * 1 / 2]
3119 frame $w.config.f
3120 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
3121 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
3122 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
3123 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
3124 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
3125 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
3126 pack $w.config.canvas -side right -fill y
3127
3128
3129 submenu $w.config.f 14 0 "Leon2 memory controller " 15
3130 submenu $w.config.f 14 1 "MIG memory controller " 16
3131 bool $w.config.f 14 2 "Enable AHB Status Register " CONFIG_AHBSTAT_ENABLE
3132 int $w.config.f 14 3 "Number of correctable-error slaves " CONFIG_AHBSTAT_NFTSLV
3133
3134
3135
3136 focus $w
3137 update_active
3138 global winx; global winy
3139 if {[winfo exists .menu13] == 0} then {menu13 .menu13 "Peripherals "}
3140 set winx [expr [winfo x .menu13]+30]; set winy [expr [winfo y .menu13]+30]
3141 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
3142 update idletasks
3143 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
3144
3145 $w.config.canvas configure \
3146 -width [expr [winfo reqwidth $w.config.f] + 1]\
3147 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
3148 [expr [winfo reqheight $w.config.f] + 1]"
3149
3150 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
3151 set scry [expr [winfo screenh $w] / 2]
3152 set maxy [expr [winfo screenh $w] * 3 / 4]
3153 set canvtotal [expr [winfo reqh $w.config.f] + 2]
3154 if [expr $winy + $canvtotal < $maxy] {
3155 $w.config.canvas configure -height $canvtotal
3156 } else {
3157 $w.config.canvas configure -height [expr $scry - $winy]
3158 }
3159 }
3160 update idletasks
3161 if {[winfo exists $w]} then {
3162 wm maxsize $w [winfo width $w] [winfo screenheight $w]
3163 wm minsize $w [winfo width $w] 100
3164
3165 wm deiconify $w
3166 }
3167 }
3168
3169 proc update_menu14 {} {
3170 global CONFIG_AHBSTAT_ENABLE
3171 global CONFIG_AHBSTAT_NFTSLV
3172 if {($CONFIG_AHBSTAT_ENABLE == 1)} then {.menu14.config.f.x3.x configure -state normal -foreground [ cget .ref -foreground ]; .menu14.config.f.x3.l configure -state normal; } else {.menu14.config.f.x3.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu14.config.f.x3.l configure -state disabled}
3173 }
3174
3175
3176 proc update_define_menu14 {} {
3177 update_define_mainmenu
3178 global CONFIG_MODULES
3179 global CONFIG_AHBSTAT_ENABLE
3180 global CONFIG_AHBSTAT_NFTSLV
3181 if {($CONFIG_AHBSTAT_ENABLE == 1)} then {validate_int CONFIG_AHBSTAT_NFTSLV "$CONFIG_AHBSTAT_NFTSLV" 1}
3182 }
3183
3184
3185 proc menu15 {w title} {
3186 set oldFocus [focus]
3187 catch {focus .menu14}
3188 catch {destroy $w; unregister_active 15}
3189 toplevel $w -class Dialog
3190 wm withdraw $w
3191 global active_menus
3192 set active_menus [lsort -integer [linsert $active_menus end 15]]
3193 message $w.m -width 400 -aspect 300 -text \
3194 "Leon2 memory controller " -relief raised
3195 pack $w.m -pady 10 -side top -padx 10
3196 wm title $w "Leon2 memory controller "
3197
3198 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 15; break"
3199 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 15; menu16 .menu16 \"$title\""
3200 frame $w.f
3201 button $w.f.back -text "OK" \
3202 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 15"
3203 button $w.f.next -text "Next" -underline 0\
3204 -width 15 -command $nextscript
3205 bind all <Alt-n> $nextscript
3206 button $w.f.prev -text "Prev" -underline 0\
3207 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 15; menu14 .menu14 \"$title\""
3208 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 15; menu14 .menu14 \"$title\";break"
3209 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
3210 pack $w.f -pady 10 -side bottom -anchor w -fill x
3211 frame $w.topline -relief ridge -borderwidth 2 -height 2
3212 pack $w.topline -side top -fill x
3213
3214 frame $w.botline -relief ridge -borderwidth 2 -height 2
3215 pack $w.botline -side bottom -fill x
3216
3217 frame $w.config
3218 pack $w.config -fill y -expand on
3219
3220 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
3221 pack $w.config.vscroll -side right -fill y
3222
3223 canvas $w.config.canvas -height 1\
3224 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
3225 -width [expr [winfo screenwidth .] * 1 / 2]
3226 frame $w.config.f
3227 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
3228 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
3229 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
3230 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
3231 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
3232 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
3233 pack $w.config.canvas -side right -fill y
3234
3235
3236 bool $w.config.f 15 0 "Enable Leon2 memory controller " CONFIG_MCTRL_LEON2
3237 bool $w.config.f 15 1 "8-bit PROM/SRAM bus support " CONFIG_MCTRL_8BIT
3238 bool $w.config.f 15 2 "16-bit PROM/SRAM bus support " CONFIG_MCTRL_16BIT
3239 bool $w.config.f 15 3 "5th SRAM chip-select " CONFIG_MCTRL_5CS
3240 bool $w.config.f 15 4 "SDRAM controller " CONFIG_MCTRL_SDRAM
3241 bool $w.config.f 15 5 "Separate address and data buses" CONFIG_MCTRL_SDRAM_SEPBUS
3242 bool $w.config.f 15 6 "64-bit SDRAM data bus" CONFIG_MCTRL_SDRAM_BUS64
3243 bool $w.config.f 15 7 "Unsynchronized sdclock" CONFIG_MCTRL_SDRAM_INVCLK
3244 bool $w.config.f 15 8 "Enable page burst operation " CONFIG_MCTRL_PAGE
3245 bool $w.config.f 15 9 "Enable programmable page burst " CONFIG_MCTRL_PROGPAGE
3246
3247
3248
3249 focus $w
3250 update_active
3251 global winx; global winy
3252 if {[winfo exists .menu14] == 0} then {menu14 .menu14 "Memory controller "}
3253 set winx [expr [winfo x .menu14]+30]; set winy [expr [winfo y .menu14]+30]
3254 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
3255 update idletasks
3256 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
3257
3258 $w.config.canvas configure \
3259 -width [expr [winfo reqwidth $w.config.f] + 1]\
3260 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
3261 [expr [winfo reqheight $w.config.f] + 1]"
3262
3263 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
3264 set scry [expr [winfo screenh $w] / 2]
3265 set maxy [expr [winfo screenh $w] * 3 / 4]
3266 set canvtotal [expr [winfo reqh $w.config.f] + 2]
3267 if [expr $winy + $canvtotal < $maxy] {
3268 $w.config.canvas configure -height $canvtotal
3269 } else {
3270 $w.config.canvas configure -height [expr $scry - $winy]
3271 }
3272 }
3273 update idletasks
3274 if {[winfo exists $w]} then {
3275 wm maxsize $w [winfo width $w] [winfo screenheight $w]
3276 wm minsize $w [winfo width $w] 100
3277
3278 wm deiconify $w
3279 }
3280 }
3281
3282 proc update_menu15 {} {
3283 global CONFIG_MCTRL_LEON2
3284 global CONFIG_MCTRL_8BIT
3285 if {($CONFIG_MCTRL_LEON2 == 1)} then {
3286 configure_entry .menu15.config.f.x1 normal {n l y}} else {configure_entry .menu15.config.f.x1 disabled {y n l}}
3287 global CONFIG_MCTRL_16BIT
3288 if {($CONFIG_MCTRL_LEON2 == 1)} then {
3289 configure_entry .menu15.config.f.x2 normal {n l y}} else {configure_entry .menu15.config.f.x2 disabled {y n l}}
3290 global CONFIG_MCTRL_5CS
3291 if {($CONFIG_MCTRL_LEON2 == 1)} then {
3292 configure_entry .menu15.config.f.x3 normal {n l y}} else {configure_entry .menu15.config.f.x3 disabled {y n l}}
3293 global CONFIG_MCTRL_SDRAM
3294 if {($CONFIG_MCTRL_LEON2 == 1)} then {
3295 configure_entry .menu15.config.f.x4 normal {n l y}} else {configure_entry .menu15.config.f.x4 disabled {y n l}}
3296 global CONFIG_MCTRL_SDRAM_SEPBUS
3297 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1)} then {
3298 configure_entry .menu15.config.f.x5 normal {n l y}} else {configure_entry .menu15.config.f.x5 disabled {y n l}}
3299 global CONFIG_MCTRL_SDRAM_BUS64
3300 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_SDRAM_SEPBUS == 1)} then {
3301 configure_entry .menu15.config.f.x6 normal {n l y}} else {configure_entry .menu15.config.f.x6 disabled {y n l}}
3302 global CONFIG_MCTRL_SDRAM_INVCLK
3303 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_SDRAM_SEPBUS == 1)} then {
3304 configure_entry .menu15.config.f.x7 normal {n l y}} else {configure_entry .menu15.config.f.x7 disabled {y n l}}
3305 global CONFIG_MCTRL_PAGE
3306 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1)} then {
3307 configure_entry .menu15.config.f.x8 normal {n l y}} else {configure_entry .menu15.config.f.x8 disabled {y n l}}
3308 global CONFIG_MCTRL_PROGPAGE
3309 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_PAGE == 1)} then {
3310 configure_entry .menu15.config.f.x9 normal {n l y}} else {configure_entry .menu15.config.f.x9 disabled {y n l}}
3311 }
3312
3313
3314 proc update_define_menu15 {} {
3315 update_define_mainmenu
3316 global CONFIG_MODULES
3317 global CONFIG_MCTRL_LEON2
3318 global CONFIG_MCTRL_8BIT
3319 if {($CONFIG_MCTRL_LEON2 == 1)} then {
3320 set CONFIG_MCTRL_8BIT [expr $CONFIG_MCTRL_8BIT&15]} else {set CONFIG_MCTRL_8BIT [expr $CONFIG_MCTRL_8BIT|16]}
3321 global CONFIG_MCTRL_16BIT
3322 if {($CONFIG_MCTRL_LEON2 == 1)} then {
3323 set CONFIG_MCTRL_16BIT [expr $CONFIG_MCTRL_16BIT&15]} else {set CONFIG_MCTRL_16BIT [expr $CONFIG_MCTRL_16BIT|16]}
3324 global CONFIG_MCTRL_5CS
3325 if {($CONFIG_MCTRL_LEON2 == 1)} then {
3326 set CONFIG_MCTRL_5CS [expr $CONFIG_MCTRL_5CS&15]} else {set CONFIG_MCTRL_5CS [expr $CONFIG_MCTRL_5CS|16]}
3327 global CONFIG_MCTRL_SDRAM
3328 if {($CONFIG_MCTRL_LEON2 == 1)} then {
3329 set CONFIG_MCTRL_SDRAM [expr $CONFIG_MCTRL_SDRAM&15]} else {set CONFIG_MCTRL_SDRAM [expr $CONFIG_MCTRL_SDRAM|16]}
3330 global CONFIG_MCTRL_SDRAM_SEPBUS
3331 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1)} then {
3332 set CONFIG_MCTRL_SDRAM_SEPBUS [expr $CONFIG_MCTRL_SDRAM_SEPBUS&15]} else {set CONFIG_MCTRL_SDRAM_SEPBUS [expr $CONFIG_MCTRL_SDRAM_SEPBUS|16]}
3333 global CONFIG_MCTRL_SDRAM_BUS64
3334 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_SDRAM_SEPBUS == 1)} then {
3335 set CONFIG_MCTRL_SDRAM_BUS64 [expr $CONFIG_MCTRL_SDRAM_BUS64&15]} else {set CONFIG_MCTRL_SDRAM_BUS64 [expr $CONFIG_MCTRL_SDRAM_BUS64|16]}
3336 global CONFIG_MCTRL_SDRAM_INVCLK
3337 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_SDRAM_SEPBUS == 1)} then {
3338 set CONFIG_MCTRL_SDRAM_INVCLK [expr $CONFIG_MCTRL_SDRAM_INVCLK&15]} else {set CONFIG_MCTRL_SDRAM_INVCLK [expr $CONFIG_MCTRL_SDRAM_INVCLK|16]}
3339 global CONFIG_MCTRL_PAGE
3340 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1)} then {
3341 set CONFIG_MCTRL_PAGE [expr $CONFIG_MCTRL_PAGE&15]} else {set CONFIG_MCTRL_PAGE [expr $CONFIG_MCTRL_PAGE|16]}
3342 global CONFIG_MCTRL_PROGPAGE
3343 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_PAGE == 1)} then {
3344 set CONFIG_MCTRL_PROGPAGE [expr $CONFIG_MCTRL_PROGPAGE&15]} else {set CONFIG_MCTRL_PROGPAGE [expr $CONFIG_MCTRL_PROGPAGE|16]}
3345 }
3346
3347
3348 proc menu16 {w title} {
3349 set oldFocus [focus]
3350 catch {focus .menu14}
3351 catch {destroy $w; unregister_active 16}
3352 toplevel $w -class Dialog
3353 wm withdraw $w
3354 global active_menus
3355 set active_menus [lsort -integer [linsert $active_menus end 16]]
3356 message $w.m -width 400 -aspect 300 -text \
3357 "MIG memory controller " -relief raised
3358 pack $w.m -pady 10 -side top -padx 10
3359 wm title $w "MIG memory controller "
3360
3361 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 16; break"
3362 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 16; catch {destroy .menu14}; unregister_active 14; menu17 .menu17 \"$title\""
3363 frame $w.f
3364 button $w.f.back -text "OK" \
3365 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 16"
3366 button $w.f.next -text "Next" -underline 0\
3367 -width 15 -command $nextscript
3368 bind all <Alt-n> $nextscript
3369 button $w.f.prev -text "Prev" -underline 0\
3370 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 16; menu15 .menu15 \"$title\""
3371 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 16; menu15 .menu15 \"$title\";break"
3372 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
3373 pack $w.f -pady 10 -side bottom -anchor w -fill x
3374 frame $w.topline -relief ridge -borderwidth 2 -height 2
3375 pack $w.topline -side top -fill x
3376
3377 frame $w.botline -relief ridge -borderwidth 2 -height 2
3378 pack $w.botline -side bottom -fill x
3379
3380 frame $w.config
3381 pack $w.config -fill y -expand on
3382
3383 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
3384 pack $w.config.vscroll -side right -fill y
3385
3386 canvas $w.config.canvas -height 1\
3387 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
3388 -width [expr [winfo screenwidth .] * 1 / 2]
3389 frame $w.config.f
3390 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
3391 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
3392 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
3393 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
3394 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
3395 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
3396 pack $w.config.canvas -side right -fill y
3397
3398
3399 bool $w.config.f 16 0 "Enable Xilinx MIG memory controller" CONFIG_MIG_DDR2
3400 int $w.config.f 16 1 "Chip selects (ranks) " CONFIG_MIG_RANKS
3401 int $w.config.f 16 2 "Column bits " CONFIG_MIG_COLBITS
3402 int $w.config.f 16 3 "Row bits " CONFIG_MIG_ROWBITS
3403 int $w.config.f 16 4 "Bank bits " CONFIG_MIG_BANKBITS
3404 hex $w.config.f 16 5 "AHB HMASK " CONFIG_MIG_HMASK
3405
3406
3407
3408 focus $w
3409 update_active
3410 global winx; global winy
3411 if {[winfo exists .menu14] == 0} then {menu14 .menu14 "Memory controller "}
3412 set winx [expr [winfo x .menu14]+30]; set winy [expr [winfo y .menu14]+30]
3413 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
3414 update idletasks
3415 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
3416
3417 $w.config.canvas configure \
3418 -width [expr [winfo reqwidth $w.config.f] + 1]\
3419 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
3420 [expr [winfo reqheight $w.config.f] + 1]"
3421
3422 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
3423 set scry [expr [winfo screenh $w] / 2]
3424 set maxy [expr [winfo screenh $w] * 3 / 4]
3425 set canvtotal [expr [winfo reqh $w.config.f] + 2]
3426 if [expr $winy + $canvtotal < $maxy] {
3427 $w.config.canvas configure -height $canvtotal
3428 } else {
3429 $w.config.canvas configure -height [expr $scry - $winy]
3430 }
3431 }
3432 update idletasks
3433 if {[winfo exists $w]} then {
3434 wm maxsize $w [winfo width $w] [winfo screenheight $w]
3435 wm minsize $w [winfo width $w] 100
3436
3437 wm deiconify $w
3438 }
3439 }
3440
3441 proc update_menu16 {} {
3442 global CONFIG_MIG_DDR2
3443 global CONFIG_MIG_RANKS
3444 if {($CONFIG_MIG_DDR2 == 1)} then {.menu16.config.f.x1.x configure -state normal -foreground [ cget .ref -foreground ]; .menu16.config.f.x1.l configure -state normal; } else {.menu16.config.f.x1.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu16.config.f.x1.l configure -state disabled}
3445 global CONFIG_MIG_COLBITS
3446 if {($CONFIG_MIG_DDR2 == 1)} then {.menu16.config.f.x2.x configure -state normal -foreground [ cget .ref -foreground ]; .menu16.config.f.x2.l configure -state normal; } else {.menu16.config.f.x2.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu16.config.f.x2.l configure -state disabled}
3447 global CONFIG_MIG_ROWBITS
3448 if {($CONFIG_MIG_DDR2 == 1)} then {.menu16.config.f.x3.x configure -state normal -foreground [ cget .ref -foreground ]; .menu16.config.f.x3.l configure -state normal; } else {.menu16.config.f.x3.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu16.config.f.x3.l configure -state disabled}
3449 global CONFIG_MIG_BANKBITS
3450 if {($CONFIG_MIG_DDR2 == 1)} then {.menu16.config.f.x4.x configure -state normal -foreground [ cget .ref -foreground ]; .menu16.config.f.x4.l configure -state normal; } else {.menu16.config.f.x4.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu16.config.f.x4.l configure -state disabled}
3451 global CONFIG_MIG_HMASK
3452 if {($CONFIG_MIG_DDR2 == 1)} then {.menu16.config.f.x5.x configure -state normal -foreground [ cget .ref -foreground ]; .menu16.config.f.x5.l configure -state normal; } else {.menu16.config.f.x5.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu16.config.f.x5.l configure -state disabled}
3453 }
3454
3455
3456 proc update_define_menu16 {} {
3457 update_define_mainmenu
3458 global CONFIG_MODULES
3459 global CONFIG_MIG_DDR2
3460 global CONFIG_MIG_RANKS
3461 if {($CONFIG_MIG_DDR2 == 1)} then {validate_int CONFIG_MIG_RANKS "$CONFIG_MIG_RANKS" 1}
3462 global CONFIG_MIG_COLBITS
3463 if {($CONFIG_MIG_DDR2 == 1)} then {validate_int CONFIG_MIG_COLBITS "$CONFIG_MIG_COLBITS" 10}
3464 global CONFIG_MIG_ROWBITS
3465 if {($CONFIG_MIG_DDR2 == 1)} then {validate_int CONFIG_MIG_ROWBITS "$CONFIG_MIG_ROWBITS" 13}
3466 global CONFIG_MIG_BANKBITS
3467 if {($CONFIG_MIG_DDR2 == 1)} then {validate_int CONFIG_MIG_BANKBITS "$CONFIG_MIG_BANKBITS" 2}
3468 global CONFIG_MIG_HMASK
3469 if {($CONFIG_MIG_DDR2 == 1)} then {validate_hex CONFIG_MIG_HMASK "$CONFIG_MIG_HMASK" F00}
3470 }
3471
3472
3473 proc menu17 {w title} {
3474 set oldFocus [focus]
3475 catch {focus .menu13}
3476 catch {destroy $w; unregister_active 17}
3477 toplevel $w -class Dialog
3478 wm withdraw $w
3479 global active_menus
3480 set active_menus [lsort -integer [linsert $active_menus end 17]]
3481 message $w.m -width 400 -aspect 300 -text \
3482 "On-chip RAM/ROM " -relief raised
3483 pack $w.m -pady 10 -side top -padx 10
3484 wm title $w "On-chip RAM/ROM "
3485
3486 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 17; break"
3487 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 17; menu18 .menu18 \"$title\""
3488 frame $w.f
3489 button $w.f.back -text "OK" \
3490 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 17"
3491 button $w.f.next -text "Next" -underline 0\
3492 -width 15 -command $nextscript
3493 bind all <Alt-n> $nextscript
3494 button $w.f.prev -text "Prev" -underline 0\
3495 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 17; menu16 .menu16 \"$title\""
3496 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 17; menu16 .menu16 \"$title\";break"
3497 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
3498 pack $w.f -pady 10 -side bottom -anchor w -fill x
3499 frame $w.topline -relief ridge -borderwidth 2 -height 2
3500 pack $w.topline -side top -fill x
3501
3502 frame $w.botline -relief ridge -borderwidth 2 -height 2
3503 pack $w.botline -side bottom -fill x
3504
3505 frame $w.config
3506 pack $w.config -fill y -expand on
3507
3508 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
3509 pack $w.config.vscroll -side right -fill y
3510
3511 canvas $w.config.canvas -height 1\
3512 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
3513 -width [expr [winfo screenwidth .] * 1 / 2]
3514 frame $w.config.f
3515 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
3516 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
3517 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
3518 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
3519 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
3520 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
3521 pack $w.config.canvas -side right -fill y
3522
3523
3524 bool $w.config.f 17 0 "On-chip AHB ROM " CONFIG_AHBROM_ENABLE
3525 hex $w.config.f 17 1 "ROM start address (haddr\[31:20\]) " CONFIG_AHBROM_START
3526 bool $w.config.f 17 2 "Pipelined ROM access " CONFIG_AHBROM_PIPE
3527 bool $w.config.f 17 3 "On-chip AHB RAM " CONFIG_AHBRAM_ENABLE
3528 global tmpvar_27
3529 minimenu $w.config.f 17 4 "AHB RAM size (Kbyte)" tmpvar_27 CONFIG_AHBRAM_SZ1
3530 menu $w.config.f.x4.x.menu -tearoffcommand "menutitle \"AHB RAM size (Kbyte)\""
3531 $w.config.f.x4.x.menu add radiobutton -label "1" -variable tmpvar_27 -value "1" -command "update_active"
3532 $w.config.f.x4.x.menu add radiobutton -label "2" -variable tmpvar_27 -value "2" -command "update_active"
3533 $w.config.f.x4.x.menu add radiobutton -label "4" -variable tmpvar_27 -value "4" -command "update_active"
3534 $w.config.f.x4.x.menu add radiobutton -label "8" -variable tmpvar_27 -value "8" -command "update_active"
3535 $w.config.f.x4.x.menu add radiobutton -label "16" -variable tmpvar_27 -value "16" -command "update_active"
3536 $w.config.f.x4.x.menu add radiobutton -label "32" -variable tmpvar_27 -value "32" -command "update_active"
3537 $w.config.f.x4.x.menu add radiobutton -label "64" -variable tmpvar_27 -value "64" -command "update_active"
3538 menusplit $w $w.config.f.x4.x.menu 7
3539 hex $w.config.f 17 5 "RAM start address (haddr\[31:20\]) " CONFIG_AHBRAM_START
3540
3541
3542
3543 focus $w
3544 update_active
3545 global winx; global winy
3546 if {[winfo exists .menu13] == 0} then {menu13 .menu13 "Peripherals "}
3547 set winx [expr [winfo x .menu13]+30]; set winy [expr [winfo y .menu13]+30]
3548 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
3549 update idletasks
3550 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
3551
3552 $w.config.canvas configure \
3553 -width [expr [winfo reqwidth $w.config.f] + 1]\
3554 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
3555 [expr [winfo reqheight $w.config.f] + 1]"
3556
3557 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
3558 set scry [expr [winfo screenh $w] / 2]
3559 set maxy [expr [winfo screenh $w] * 3 / 4]
3560 set canvtotal [expr [winfo reqh $w.config.f] + 2]
3561 if [expr $winy + $canvtotal < $maxy] {
3562 $w.config.canvas configure -height $canvtotal
3563 } else {
3564 $w.config.canvas configure -height [expr $scry - $winy]
3565 }
3566 }
3567 update idletasks
3568 if {[winfo exists $w]} then {
3569 wm maxsize $w [winfo width $w] [winfo screenheight $w]
3570 wm minsize $w [winfo width $w] 100
3571
3572 wm deiconify $w
3573 }
3574 }
3575
3576 proc update_menu17 {} {
3577 global CONFIG_AHBROM_ENABLE
3578 global CONFIG_AHBROM_START
3579 if {($CONFIG_AHBROM_ENABLE == 1)} then {.menu17.config.f.x1.x configure -state normal -foreground [ cget .ref -foreground ]; .menu17.config.f.x1.l configure -state normal; } else {.menu17.config.f.x1.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu17.config.f.x1.l configure -state disabled}
3580 global CONFIG_AHBROM_PIPE
3581 if {($CONFIG_AHBROM_ENABLE == 1)} then {
3582 configure_entry .menu17.config.f.x2 normal {n l y}} else {configure_entry .menu17.config.f.x2 disabled {y n l}}
3583 global CONFIG_AHBRAM_ENABLE
3584 if {($CONFIG_AHBRAM_ENABLE == 1)} then {configure_entry .menu17.config.f.x4 normal {x l}} else {configure_entry .menu17.config.f.x4 disabled {x l}}
3585 global CONFIG_AHBRAM_START
3586 if {($CONFIG_AHBRAM_ENABLE == 1)} then {.menu17.config.f.x5.x configure -state normal -foreground [ cget .ref -foreground ]; .menu17.config.f.x5.l configure -state normal; } else {.menu17.config.f.x5.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu17.config.f.x5.l configure -state disabled}
3587 }
3588
3589
3590 proc update_define_menu17 {} {
3591 update_define_mainmenu
3592 global CONFIG_MODULES
3593 global CONFIG_AHBROM_ENABLE
3594 global CONFIG_AHBROM_START
3595 if {($CONFIG_AHBROM_ENABLE == 1)} then {validate_hex CONFIG_AHBROM_START "$CONFIG_AHBROM_START" 000}
3596 global CONFIG_AHBROM_PIPE
3597 if {($CONFIG_AHBROM_ENABLE == 1)} then {
3598 set CONFIG_AHBROM_PIPE [expr $CONFIG_AHBROM_PIPE&15]} else {set CONFIG_AHBROM_PIPE [expr $CONFIG_AHBROM_PIPE|16]}
3599 global tmpvar_27
3600 global CONFIG_AHBRAM_SZ1
3601 if {$tmpvar_27 == "1"} then {set CONFIG_AHBRAM_SZ1 1} else {set CONFIG_AHBRAM_SZ1 0}
3602 global CONFIG_AHBRAM_SZ2
3603 if {$tmpvar_27 == "2"} then {set CONFIG_AHBRAM_SZ2 1} else {set CONFIG_AHBRAM_SZ2 0}
3604 global CONFIG_AHBRAM_SZ4
3605 if {$tmpvar_27 == "4"} then {set CONFIG_AHBRAM_SZ4 1} else {set CONFIG_AHBRAM_SZ4 0}
3606 global CONFIG_AHBRAM_SZ8
3607 if {$tmpvar_27 == "8"} then {set CONFIG_AHBRAM_SZ8 1} else {set CONFIG_AHBRAM_SZ8 0}
3608 global CONFIG_AHBRAM_SZ16
3609 if {$tmpvar_27 == "16"} then {set CONFIG_AHBRAM_SZ16 1} else {set CONFIG_AHBRAM_SZ16 0}
3610 global CONFIG_AHBRAM_SZ32
3611 if {$tmpvar_27 == "32"} then {set CONFIG_AHBRAM_SZ32 1} else {set CONFIG_AHBRAM_SZ32 0}
3612 global CONFIG_AHBRAM_SZ64
3613 if {$tmpvar_27 == "64"} then {set CONFIG_AHBRAM_SZ64 1} else {set CONFIG_AHBRAM_SZ64 0}
3614 global CONFIG_AHBRAM_ENABLE
3615 global CONFIG_AHBRAM_START
3616 if {($CONFIG_AHBRAM_ENABLE == 1)} then {validate_hex CONFIG_AHBRAM_START "$CONFIG_AHBRAM_START" A00}
3617 }
3618
3619
3620 proc menu18 {w title} {
3621 set oldFocus [focus]
3622 catch {focus .menu13}
3623 catch {destroy $w; unregister_active 18}
3624 toplevel $w -class Dialog
3625 wm withdraw $w
3626 global active_menus
3627 set active_menus [lsort -integer [linsert $active_menus end 18]]
3628 message $w.m -width 400 -aspect 300 -text \
3629 "Ethernet " -relief raised
3630 pack $w.m -pady 10 -side top -padx 10
3631 wm title $w "Ethernet "
3632
3633 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 18; break"
3634 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 18; menu19 .menu19 \"$title\""
3635 frame $w.f
3636 button $w.f.back -text "OK" \
3637 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 18"
3638 button $w.f.next -text "Next" -underline 0\
3639 -width 15 -command $nextscript
3640 bind all <Alt-n> $nextscript
3641 button $w.f.prev -text "Prev" -underline 0\
3642 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 18; menu17 .menu17 \"$title\""
3643 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 18; menu17 .menu17 \"$title\";break"
3644 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
3645 pack $w.f -pady 10 -side bottom -anchor w -fill x
3646 frame $w.topline -relief ridge -borderwidth 2 -height 2
3647 pack $w.topline -side top -fill x
3648
3649 frame $w.botline -relief ridge -borderwidth 2 -height 2
3650 pack $w.botline -side bottom -fill x
3651
3652 frame $w.config
3653 pack $w.config -fill y -expand on
3654
3655 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
3656 pack $w.config.vscroll -side right -fill y
3657
3658 canvas $w.config.canvas -height 1\
3659 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
3660 -width [expr [winfo screenwidth .] * 1 / 2]
3661 frame $w.config.f
3662 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
3663 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
3664 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
3665 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
3666 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
3667 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
3668 pack $w.config.canvas -side right -fill y
3669
3670
3671 bool $w.config.f 18 0 "Gaisler Research 10/100/1000 Mbit Ethernet MAC " CONFIG_GRETH_ENABLE
3672 bool $w.config.f 18 1 "Enable 1000 Mbit support " CONFIG_GRETH_GIGA
3673 global tmpvar_28
3674 minimenu $w.config.f 18 2 "AHB FIFO size (words) " tmpvar_28 CONFIG_GRETH_FIFO4
3675 menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"AHB FIFO size (words) \""
3676 $w.config.f.x2.x.menu add radiobutton -label "4" -variable tmpvar_28 -value "4" -command "update_active"
3677 $w.config.f.x2.x.menu add radiobutton -label "8" -variable tmpvar_28 -value "8" -command "update_active"
3678 $w.config.f.x2.x.menu add radiobutton -label "16" -variable tmpvar_28 -value "16" -command "update_active"
3679 $w.config.f.x2.x.menu add radiobutton -label "32" -variable tmpvar_28 -value "32" -command "update_active"
3680 $w.config.f.x2.x.menu add radiobutton -label "64" -variable tmpvar_28 -value "64" -command "update_active"
3681 menusplit $w $w.config.f.x2.x.menu 5
3682
3683
3684
3685 focus $w
3686 update_active
3687 global winx; global winy
3688 if {[winfo exists .menu13] == 0} then {menu13 .menu13 "Peripherals "}
3689 set winx [expr [winfo x .menu13]+30]; set winy [expr [winfo y .menu13]+30]
3690 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
3691 update idletasks
3692 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
3693
3694 $w.config.canvas configure \
3695 -width [expr [winfo reqwidth $w.config.f] + 1]\
3696 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
3697 [expr [winfo reqheight $w.config.f] + 1]"
3698
3699 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
3700 set scry [expr [winfo screenh $w] / 2]
3701 set maxy [expr [winfo screenh $w] * 3 / 4]
3702 set canvtotal [expr [winfo reqh $w.config.f] + 2]
3703 if [expr $winy + $canvtotal < $maxy] {
3704 $w.config.canvas configure -height $canvtotal
3705 } else {
3706 $w.config.canvas configure -height [expr $scry - $winy]
3707 }
3708 }
3709 update idletasks
3710 if {[winfo exists $w]} then {
3711 wm maxsize $w [winfo width $w] [winfo screenheight $w]
3712 wm minsize $w [winfo width $w] 100
3713
3714 wm deiconify $w
3715 }
3716 }
3717
3718 proc update_menu18 {} {
3719 global CONFIG_GRETH_ENABLE
3720 global CONFIG_GRETH_GIGA
3721 if {($CONFIG_GRETH_ENABLE == 1)} then {
3722 configure_entry .menu18.config.f.x1 normal {n l y}} else {configure_entry .menu18.config.f.x1 disabled {y n l}}
3723 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_GRETH_GIGA == 0)} then {configure_entry .menu18.config.f.x2 normal {x l}} else {configure_entry .menu18.config.f.x2 disabled {x l}}
3724 }
3725
3726
3727 proc update_define_menu18 {} {
3728 update_define_mainmenu
3729 global CONFIG_MODULES
3730 global CONFIG_GRETH_ENABLE
3731 global CONFIG_GRETH_GIGA
3732 if {($CONFIG_GRETH_ENABLE == 1)} then {
3733 set CONFIG_GRETH_GIGA [expr $CONFIG_GRETH_GIGA&15]} else {set CONFIG_GRETH_GIGA [expr $CONFIG_GRETH_GIGA|16]}
3734 global tmpvar_28
3735 global CONFIG_GRETH_FIFO4
3736 if {$tmpvar_28 == "4"} then {set CONFIG_GRETH_FIFO4 1} else {set CONFIG_GRETH_FIFO4 0}
3737 global CONFIG_GRETH_FIFO8
3738 if {$tmpvar_28 == "8"} then {set CONFIG_GRETH_FIFO8 1} else {set CONFIG_GRETH_FIFO8 0}
3739 global CONFIG_GRETH_FIFO16
3740 if {$tmpvar_28 == "16"} then {set CONFIG_GRETH_FIFO16 1} else {set CONFIG_GRETH_FIFO16 0}
3741 global CONFIG_GRETH_FIFO32
3742 if {$tmpvar_28 == "32"} then {set CONFIG_GRETH_FIFO32 1} else {set CONFIG_GRETH_FIFO32 0}
3743 global CONFIG_GRETH_FIFO64
3744 if {$tmpvar_28 == "64"} then {set CONFIG_GRETH_FIFO64 1} else {set CONFIG_GRETH_FIFO64 0}
3745 }
3746
3747
3748 proc menu19 {w title} {
3749 set oldFocus [focus]
3750 catch {focus .menu13}
3751 catch {destroy $w; unregister_active 19}
3752 toplevel $w -class Dialog
3753 wm withdraw $w
3754 global active_menus
3755 set active_menus [lsort -integer [linsert $active_menus end 19]]
3756 message $w.m -width 400 -aspect 300 -text \
3757 "UART, timer, I/O port and interrupt controller" -relief raised
3758 pack $w.m -pady 10 -side top -padx 10
3759 wm title $w "UART, timer, I/O port and interrupt controller"
3760
3761 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 19; break"
3762 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 19; menu20 .menu20 \"$title\""
3763 frame $w.f
3764 button $w.f.back -text "OK" \
3765 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 19"
3766 button $w.f.next -text "Next" -underline 0\
3767 -width 15 -command $nextscript
3768 bind all <Alt-n> $nextscript
3769 button $w.f.prev -text "Prev" -underline 0\
3770 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 19; menu18 .menu18 \"$title\""
3771 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 19; menu18 .menu18 \"$title\";break"
3772 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
3773 pack $w.f -pady 10 -side bottom -anchor w -fill x
3774 frame $w.topline -relief ridge -borderwidth 2 -height 2
3775 pack $w.topline -side top -fill x
3776
3777 frame $w.botline -relief ridge -borderwidth 2 -height 2
3778 pack $w.botline -side bottom -fill x
3779
3780 frame $w.config
3781 pack $w.config -fill y -expand on
3782
3783 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
3784 pack $w.config.vscroll -side right -fill y
3785
3786 canvas $w.config.canvas -height 1\
3787 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
3788 -width [expr [winfo screenwidth .] * 1 / 2]
3789 frame $w.config.f
3790 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
3791 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
3792 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
3793 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
3794 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
3795 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
3796 pack $w.config.canvas -side right -fill y
3797
3798
3799 bool $w.config.f 19 0 "Enable console UART " CONFIG_UART1_ENABLE
3800 global tmpvar_29
3801 minimenu $w.config.f 19 1 "UART1 FIFO depth" tmpvar_29 CONFIG_UA1_FIFO1
3802 menu $w.config.f.x1.x.menu -tearoffcommand "menutitle \"UART1 FIFO depth\""
3803 $w.config.f.x1.x.menu add radiobutton -label "1" -variable tmpvar_29 -value "1" -command "update_active"
3804 $w.config.f.x1.x.menu add radiobutton -label "2" -variable tmpvar_29 -value "2" -command "update_active"
3805 $w.config.f.x1.x.menu add radiobutton -label "4" -variable tmpvar_29 -value "4" -command "update_active"
3806 $w.config.f.x1.x.menu add radiobutton -label "8" -variable tmpvar_29 -value "8" -command "update_active"
3807 $w.config.f.x1.x.menu add radiobutton -label "16" -variable tmpvar_29 -value "16" -command "update_active"
3808 $w.config.f.x1.x.menu add radiobutton -label "32" -variable tmpvar_29 -value "32" -command "update_active"
3809 menusplit $w $w.config.f.x1.x.menu 6
3810 bool $w.config.f 19 2 "Enable LEON3 interrupt controller " CONFIG_IRQ3_ENABLE
3811 bool $w.config.f 19 3 "Enable secondary interrupts " CONFIG_IRQ3_SEC
3812 int $w.config.f 19 4 "Secondary interrupt number (1 - 15) " CONFIG_IRQ3_NSEC
3813 bool $w.config.f 19 5 "Enable Timer Unit " CONFIG_GPT_ENABLE
3814 int $w.config.f 19 6 "Number of timers (1 - 7) " CONFIG_GPT_NTIM
3815 int $w.config.f 19 7 "Scaler width (2 - 16) " CONFIG_GPT_SW
3816 int $w.config.f 19 8 "Timer width (2 - 32) " CONFIG_GPT_TW
3817 int $w.config.f 19 9 "Timer unit interrupt " CONFIG_GPT_IRQ
3818 bool $w.config.f 19 10 "Separate interrupts " CONFIG_GPT_SEPIRQ
3819 bool $w.config.f 19 11 "Watchdog enable " CONFIG_GPT_WDOGEN
3820 hex $w.config.f 19 12 "Initial watchdog time-out value " CONFIG_GPT_WDOG
3821 bool $w.config.f 19 13 "Enable generic GPIO port " CONFIG_GRGPIO_ENABLE
3822 int $w.config.f 19 14 "GPIO width " CONFIG_GRGPIO_WIDTH
3823 hex $w.config.f 19 15 "GPIO interrupt mask " CONFIG_GRGPIO_IMASK
3824
3825
3826
3827 focus $w
3828 update_active
3829 global winx; global winy
3830 if {[winfo exists .menu13] == 0} then {menu13 .menu13 "Peripherals "}
3831 set winx [expr [winfo x .menu13]+30]; set winy [expr [winfo y .menu13]+30]
3832 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
3833 update idletasks
3834 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
3835
3836 $w.config.canvas configure \
3837 -width [expr [winfo reqwidth $w.config.f] + 1]\
3838 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
3839 [expr [winfo reqheight $w.config.f] + 1]"
3840
3841 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
3842 set scry [expr [winfo screenh $w] / 2]
3843 set maxy [expr [winfo screenh $w] * 3 / 4]
3844 set canvtotal [expr [winfo reqh $w.config.f] + 2]
3845 if [expr $winy + $canvtotal < $maxy] {
3846 $w.config.canvas configure -height $canvtotal
3847 } else {
3848 $w.config.canvas configure -height [expr $scry - $winy]
3849 }
3850 }
3851 update idletasks
3852 if {[winfo exists $w]} then {
3853 wm maxsize $w [winfo width $w] [winfo screenheight $w]
3854 wm minsize $w [winfo width $w] 100
3855
3856 wm deiconify $w
3857 }
3858 }
3859
3860 proc update_menu19 {} {
3861 global CONFIG_UART1_ENABLE
3862 if {($CONFIG_UART1_ENABLE == 1)} then {configure_entry .menu19.config.f.x1 normal {x l}} else {configure_entry .menu19.config.f.x1 disabled {x l}}
3863 global CONFIG_IRQ3_ENABLE
3864 global CONFIG_IRQ3_SEC
3865 if {($CONFIG_IRQ3_ENABLE == 1)} then {
3866 configure_entry .menu19.config.f.x3 normal {n l y}} else {configure_entry .menu19.config.f.x3 disabled {y n l}}
3867 global CONFIG_IRQ3_NSEC
3868 if {($CONFIG_IRQ3_ENABLE == 1) && ($CONFIG_IRQ3_SEC == 1)} then {.menu19.config.f.x4.x configure -state normal -foreground [ cget .ref -foreground ]; .menu19.config.f.x4.l configure -state normal; } else {.menu19.config.f.x4.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu19.config.f.x4.l configure -state disabled}
3869 global CONFIG_GPT_ENABLE
3870 global CONFIG_GPT_NTIM
3871 if {($CONFIG_GPT_ENABLE == 1)} then {.menu19.config.f.x6.x configure -state normal -foreground [ cget .ref -foreground ]; .menu19.config.f.x6.l configure -state normal; } else {.menu19.config.f.x6.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu19.config.f.x6.l configure -state disabled}
3872 global CONFIG_GPT_SW
3873 if {($CONFIG_GPT_ENABLE == 1)} then {.menu19.config.f.x7.x configure -state normal -foreground [ cget .ref -foreground ]; .menu19.config.f.x7.l configure -state normal; } else {.menu19.config.f.x7.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu19.config.f.x7.l configure -state disabled}
3874 global CONFIG_GPT_TW
3875 if {($CONFIG_GPT_ENABLE == 1)} then {.menu19.config.f.x8.x configure -state normal -foreground [ cget .ref -foreground ]; .menu19.config.f.x8.l configure -state normal; } else {.menu19.config.f.x8.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu19.config.f.x8.l configure -state disabled}
3876 global CONFIG_GPT_IRQ
3877 if {($CONFIG_GPT_ENABLE == 1)} then {.menu19.config.f.x9.x configure -state normal -foreground [ cget .ref -foreground ]; .menu19.config.f.x9.l configure -state normal; } else {.menu19.config.f.x9.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu19.config.f.x9.l configure -state disabled}
3878 global CONFIG_GPT_SEPIRQ
3879 if {($CONFIG_GPT_ENABLE == 1)} then {
3880 configure_entry .menu19.config.f.x10 normal {n l y}} else {configure_entry .menu19.config.f.x10 disabled {y n l}}
3881 global CONFIG_GPT_WDOGEN
3882 if {($CONFIG_GPT_ENABLE == 1)} then {
3883 configure_entry .menu19.config.f.x11 normal {n l y}} else {configure_entry .menu19.config.f.x11 disabled {y n l}}
3884 global CONFIG_GPT_WDOG
3885 if {($CONFIG_GPT_ENABLE == 1) && ($CONFIG_GPT_WDOGEN == 1)} then {.menu19.config.f.x12.x configure -state normal -foreground [ cget .ref -foreground ]; .menu19.config.f.x12.l configure -state normal; } else {.menu19.config.f.x12.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu19.config.f.x12.l configure -state disabled}
3886 global CONFIG_GRGPIO_ENABLE
3887 global CONFIG_GRGPIO_WIDTH
3888 if {($CONFIG_GRGPIO_ENABLE == 1)} then {.menu19.config.f.x14.x configure -state normal -foreground [ cget .ref -foreground ]; .menu19.config.f.x14.l configure -state normal; } else {.menu19.config.f.x14.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu19.config.f.x14.l configure -state disabled}
3889 global CONFIG_GRGPIO_IMASK
3890 if {($CONFIG_GRGPIO_ENABLE == 1)} then {.menu19.config.f.x15.x configure -state normal -foreground [ cget .ref -foreground ]; .menu19.config.f.x15.l configure -state normal; } else {.menu19.config.f.x15.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu19.config.f.x15.l configure -state disabled}
3891 }
3892
3893
3894 proc update_define_menu19 {} {
3895 update_define_mainmenu
3896 global CONFIG_MODULES
3897 global tmpvar_29
3898 global CONFIG_UA1_FIFO1
3899 if {$tmpvar_29 == "1"} then {set CONFIG_UA1_FIFO1 1} else {set CONFIG_UA1_FIFO1 0}
3900 global CONFIG_UA1_FIFO2
3901 if {$tmpvar_29 == "2"} then {set CONFIG_UA1_FIFO2 1} else {set CONFIG_UA1_FIFO2 0}
3902 global CONFIG_UA1_FIFO4
3903 if {$tmpvar_29 == "4"} then {set CONFIG_UA1_FIFO4 1} else {set CONFIG_UA1_FIFO4 0}
3904 global CONFIG_UA1_FIFO8
3905 if {$tmpvar_29 == "8"} then {set CONFIG_UA1_FIFO8 1} else {set CONFIG_UA1_FIFO8 0}
3906 global CONFIG_UA1_FIFO16
3907 if {$tmpvar_29 == "16"} then {set CONFIG_UA1_FIFO16 1} else {set CONFIG_UA1_FIFO16 0}
3908 global CONFIG_UA1_FIFO32
3909 if {$tmpvar_29 == "32"} then {set CONFIG_UA1_FIFO32 1} else {set CONFIG_UA1_FIFO32 0}
3910 global CONFIG_IRQ3_ENABLE
3911 global CONFIG_IRQ3_SEC
3912 if {($CONFIG_IRQ3_ENABLE == 1)} then {
3913 set CONFIG_IRQ3_SEC [expr $CONFIG_IRQ3_SEC&15]} else {set CONFIG_IRQ3_SEC [expr $CONFIG_IRQ3_SEC|16]}
3914 global CONFIG_IRQ3_NSEC
3915 if {($CONFIG_IRQ3_ENABLE == 1) && ($CONFIG_IRQ3_SEC == 1)} then {validate_int CONFIG_IRQ3_NSEC "$CONFIG_IRQ3_NSEC" 12}
3916 global CONFIG_GPT_ENABLE
3917 global CONFIG_GPT_NTIM
3918 if {($CONFIG_GPT_ENABLE == 1)} then {validate_int CONFIG_GPT_NTIM "$CONFIG_GPT_NTIM" 2}
3919 global CONFIG_GPT_SW
3920 if {($CONFIG_GPT_ENABLE == 1)} then {validate_int CONFIG_GPT_SW "$CONFIG_GPT_SW" 8}
3921 global CONFIG_GPT_TW
3922 if {($CONFIG_GPT_ENABLE == 1)} then {validate_int CONFIG_GPT_TW "$CONFIG_GPT_TW" 32}
3923 global CONFIG_GPT_IRQ
3924 if {($CONFIG_GPT_ENABLE == 1)} then {validate_int CONFIG_GPT_IRQ "$CONFIG_GPT_IRQ" 8}
3925 global CONFIG_GPT_SEPIRQ
3926 if {($CONFIG_GPT_ENABLE == 1)} then {
3927 set CONFIG_GPT_SEPIRQ [expr $CONFIG_GPT_SEPIRQ&15]} else {set CONFIG_GPT_SEPIRQ [expr $CONFIG_GPT_SEPIRQ|16]}
3928 global CONFIG_GPT_WDOGEN
3929 if {($CONFIG_GPT_ENABLE == 1)} then {
3930 set CONFIG_GPT_WDOGEN [expr $CONFIG_GPT_WDOGEN&15]} else {set CONFIG_GPT_WDOGEN [expr $CONFIG_GPT_WDOGEN|16]}
3931 global CONFIG_GPT_WDOG
3932 if {($CONFIG_GPT_ENABLE == 1) && ($CONFIG_GPT_WDOGEN == 1)} then {validate_hex CONFIG_GPT_WDOG "$CONFIG_GPT_WDOG" FFFF}
3933 global CONFIG_GRGPIO_ENABLE
3934 global CONFIG_GRGPIO_WIDTH
3935 if {($CONFIG_GRGPIO_ENABLE == 1)} then {validate_int CONFIG_GRGPIO_WIDTH "$CONFIG_GRGPIO_WIDTH" 8}
3936 global CONFIG_GRGPIO_IMASK
3937 if {($CONFIG_GRGPIO_ENABLE == 1)} then {validate_hex CONFIG_GRGPIO_IMASK "$CONFIG_GRGPIO_IMASK" 0000}
3938 }
3939
3940
3941 proc menu20 {w title} {
3942 set oldFocus [focus]
3943 catch {focus .menu13}
3944 catch {destroy $w; unregister_active 20}
3945 toplevel $w -class Dialog
3946 wm withdraw $w
3947 global active_menus
3948 set active_menus [lsort -integer [linsert $active_menus end 20]]
3949 message $w.m -width 400 -aspect 300 -text \
3950 "Keybord and VGA interface" -relief raised
3951 pack $w.m -pady 10 -side top -padx 10
3952 wm title $w "Keybord and VGA interface"
3953
3954 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 20; break"
3955 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 20; menu21 .menu21 \"$title\""
3956 frame $w.f
3957 button $w.f.back -text "OK" \
3958 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 20"
3959 button $w.f.next -text "Next" -underline 0\
3960 -width 15 -command $nextscript
3961 bind all <Alt-n> $nextscript
3962 button $w.f.prev -text "Prev" -underline 0\
3963 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 20; menu19 .menu19 \"$title\""
3964 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 20; menu19 .menu19 \"$title\";break"
3965 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
3966 pack $w.f -pady 10 -side bottom -anchor w -fill x
3967 frame $w.topline -relief ridge -borderwidth 2 -height 2
3968 pack $w.topline -side top -fill x
3969
3970 frame $w.botline -relief ridge -borderwidth 2 -height 2
3971 pack $w.botline -side bottom -fill x
3972
3973 frame $w.config
3974 pack $w.config -fill y -expand on
3975
3976 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
3977 pack $w.config.vscroll -side right -fill y
3978
3979 canvas $w.config.canvas -height 1\
3980 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
3981 -width [expr [winfo screenwidth .] * 1 / 2]
3982 frame $w.config.f
3983 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
3984 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
3985 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
3986 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
3987 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
3988 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
3989 pack $w.config.canvas -side right -fill y
3990
3991
3992 bool $w.config.f 20 0 "Keyboard/mouse (PS2) interface " CONFIG_KBD_ENABLE
3993 bool $w.config.f 20 1 "Text-based VGA interface " CONFIG_VGA_ENABLE
3994 bool $w.config.f 20 2 "SVGA graphical frame buffer " CONFIG_SVGA_ENABLE
3995
3996
3997
3998 focus $w
3999 update_active
4000 global winx; global winy
4001 if {[winfo exists .menu13] == 0} then {menu13 .menu13 "Peripherals "}
4002 set winx [expr [winfo x .menu13]+30]; set winy [expr [winfo y .menu13]+30]
4003 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
4004 update idletasks
4005 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
4006
4007 $w.config.canvas configure \
4008 -width [expr [winfo reqwidth $w.config.f] + 1]\
4009 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
4010 [expr [winfo reqheight $w.config.f] + 1]"
4011
4012 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
4013 set scry [expr [winfo screenh $w] / 2]
4014 set maxy [expr [winfo screenh $w] * 3 / 4]
4015 set canvtotal [expr [winfo reqh $w.config.f] + 2]
4016 if [expr $winy + $canvtotal < $maxy] {
4017 $w.config.canvas configure -height $canvtotal
4018 } else {
4019 $w.config.canvas configure -height [expr $scry - $winy]
4020 }
4021 }
4022 update idletasks
4023 if {[winfo exists $w]} then {
4024 wm maxsize $w [winfo width $w] [winfo screenheight $w]
4025 wm minsize $w [winfo width $w] 100
4026
4027 wm deiconify $w
4028 }
4029 }
4030
4031 proc update_menu20 {} {
4032 global CONFIG_VGA_ENABLE
4033 global CONFIG_SVGA_ENABLE
4034 if {($CONFIG_VGA_ENABLE == 0)} then {
4035 configure_entry .menu20.config.f.x2 normal {n l y}} else {configure_entry .menu20.config.f.x2 disabled {y n l}}
4036 }
4037
4038
4039 proc update_define_menu20 {} {
4040 update_define_mainmenu
4041 global CONFIG_MODULES
4042 global CONFIG_VGA_ENABLE
4043 global CONFIG_SVGA_ENABLE
4044 if {($CONFIG_VGA_ENABLE == 0)} then {
4045 set CONFIG_SVGA_ENABLE [expr $CONFIG_SVGA_ENABLE&15]} else {set CONFIG_SVGA_ENABLE [expr $CONFIG_SVGA_ENABLE|16]}
4046 }
4047
4048
4049 proc menu21 {w title} {
4050 set oldFocus [focus]
4051 catch {focus .menu13}
4052 catch {destroy $w; unregister_active 21}
4053 toplevel $w -class Dialog
4054 wm withdraw $w
4055 global active_menus
4056 set active_menus [lsort -integer [linsert $active_menus end 21]]
4057 message $w.m -width 400 -aspect 300 -text \
4058 "SPI" -relief raised
4059 pack $w.m -pady 10 -side top -padx 10
4060 wm title $w "SPI"
4061
4062 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 21; break"
4063 set nextscript "catch {focus $oldFocus}; menu22 .menu22 \"$title\""
4064 frame $w.f
4065 button $w.f.back -text "OK" \
4066 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 21"
4067 button $w.f.next -text "Next" -underline 0\
4068 -width 15 -command $nextscript
4069 bind all <Alt-n> $nextscript
4070 button $w.f.prev -text "Prev" -underline 0\
4071 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 21; menu20 .menu20 \"$title\""
4072 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 21; menu20 .menu20 \"$title\";break"
4073 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
4074 pack $w.f -pady 10 -side bottom -anchor w -fill x
4075 frame $w.topline -relief ridge -borderwidth 2 -height 2
4076 pack $w.topline -side top -fill x
4077
4078 frame $w.botline -relief ridge -borderwidth 2 -height 2
4079 pack $w.botline -side bottom -fill x
4080
4081 frame $w.config
4082 pack $w.config -fill y -expand on
4083
4084 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
4085 pack $w.config.vscroll -side right -fill y
4086
4087 canvas $w.config.canvas -height 1\
4088 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
4089 -width [expr [winfo screenwidth .] * 1 / 2]
4090 frame $w.config.f
4091 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
4092 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
4093 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
4094 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
4095 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
4096 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
4097 pack $w.config.canvas -side right -fill y
4098
4099
4100 submenu $w.config.f 21 0 "SPI memory controller " 22
4101 submenu $w.config.f 21 1 "SPI controller(s) " 23
4102
4103
4104
4105 focus $w
4106 update_active
4107 global winx; global winy
4108 if {[winfo exists .menu13] == 0} then {menu13 .menu13 "Peripherals "}
4109 set winx [expr [winfo x .menu13]+30]; set winy [expr [winfo y .menu13]+30]
4110 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
4111 update idletasks
4112 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
4113
4114 $w.config.canvas configure \
4115 -width [expr [winfo reqwidth $w.config.f] + 1]\
4116 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
4117 [expr [winfo reqheight $w.config.f] + 1]"
4118
4119 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
4120 set scry [expr [winfo screenh $w] / 2]
4121 set maxy [expr [winfo screenh $w] * 3 / 4]
4122 set canvtotal [expr [winfo reqh $w.config.f] + 2]
4123 if [expr $winy + $canvtotal < $maxy] {
4124 $w.config.canvas configure -height $canvtotal
4125 } else {
4126 $w.config.canvas configure -height [expr $scry - $winy]
4127 }
4128 }
4129 update idletasks
4130 if {[winfo exists $w]} then {
4131 wm maxsize $w [winfo width $w] [winfo screenheight $w]
4132 wm minsize $w [winfo width $w] 100
4133
4134 wm deiconify $w
4135 }
4136 }
4137
4138 proc update_menu21 {} {
4139 }
4140
4141
4142 proc update_define_menu21 {} {
4143 update_define_mainmenu
4144 global CONFIG_MODULES
4145 }
4146
4147
4148 proc menu22 {w title} {
4149 set oldFocus [focus]
4150 catch {focus .menu21}
4151 catch {destroy $w; unregister_active 22}
4152 toplevel $w -class Dialog
4153 wm withdraw $w
4154 global active_menus
4155 set active_menus [lsort -integer [linsert $active_menus end 22]]
4156 message $w.m -width 400 -aspect 300 -text \
4157 "SPI memory controller " -relief raised
4158 pack $w.m -pady 10 -side top -padx 10
4159 wm title $w "SPI memory controller "
4160
4161 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 22; break"
4162 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 22; menu23 .menu23 \"$title\""
4163 frame $w.f
4164 button $w.f.back -text "OK" \
4165 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 22"
4166 button $w.f.next -text "Next" -underline 0\
4167 -width 15 -command $nextscript
4168 bind all <Alt-n> $nextscript
4169 button $w.f.prev -text "Prev" -underline 0\
4170 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 22; menu21 .menu21 \"$title\""
4171 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 22; menu21 .menu21 \"$title\";break"
4172 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
4173 pack $w.f -pady 10 -side bottom -anchor w -fill x
4174 frame $w.topline -relief ridge -borderwidth 2 -height 2
4175 pack $w.topline -side top -fill x
4176
4177 frame $w.botline -relief ridge -borderwidth 2 -height 2
4178 pack $w.botline -side bottom -fill x
4179
4180 frame $w.config
4181 pack $w.config -fill y -expand on
4182
4183 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
4184 pack $w.config.vscroll -side right -fill y
4185
4186 canvas $w.config.canvas -height 1\
4187 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
4188 -width [expr [winfo screenwidth .] * 1 / 2]
4189 frame $w.config.f
4190 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
4191 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
4192 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
4193 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
4194 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
4195 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
4196 pack $w.config.canvas -side right -fill y
4197
4198
4199 bool $w.config.f 22 0 "Enable SPI memory controller " CONFIG_SPIMCTRL
4200 bool $w.config.f 22 1 "Enable SD card support " CONFIG_SPIMCTRL_SDCARD
4201 hex $w.config.f 22 2 "Read instruction " CONFIG_SPIMCTRL_READCMD
4202 bool $w.config.f 22 3 "Read instruction requires dummy byte " CONFIG_SPIMCTRL_DUMMYBYTE
4203 bool $w.config.f 22 4 "Enable dual output for reads " CONFIG_SPIMCTRL_DUALOUTPUT
4204 int $w.config.f 22 5 "Clock divisor for device clock" CONFIG_SPIMCTRL_SCALER
4205 int $w.config.f 22 6 "Clock divisor for alt. device clock" CONFIG_SPIMCTRL_ASCALER
4206 int $w.config.f 22 7 "Number of clock cycles to idle after power up " CONFIG_SPIMCTRL_PWRUPCNT
4207
4208
4209
4210 focus $w
4211 update_active
4212 global winx; global winy
4213 if {[winfo exists .menu21] == 0} then {menu21 .menu21 "SPI"}
4214 set winx [expr [winfo x .menu21]+30]; set winy [expr [winfo y .menu21]+30]
4215 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
4216 update idletasks
4217 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
4218
4219 $w.config.canvas configure \
4220 -width [expr [winfo reqwidth $w.config.f] + 1]\
4221 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
4222 [expr [winfo reqheight $w.config.f] + 1]"
4223
4224 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
4225 set scry [expr [winfo screenh $w] / 2]
4226 set maxy [expr [winfo screenh $w] * 3 / 4]
4227 set canvtotal [expr [winfo reqh $w.config.f] + 2]
4228 if [expr $winy + $canvtotal < $maxy] {
4229 $w.config.canvas configure -height $canvtotal
4230 } else {
4231 $w.config.canvas configure -height [expr $scry - $winy]
4232 }
4233 }
4234 update idletasks
4235 if {[winfo exists $w]} then {
4236 wm maxsize $w [winfo width $w] [winfo screenheight $w]
4237 wm minsize $w [winfo width $w] 100
4238
4239 wm deiconify $w
4240 }
4241 }
4242
4243 proc update_menu22 {} {
4244 global CONFIG_SPIMCTRL
4245 global CONFIG_SPIMCTRL_SDCARD
4246 if {($CONFIG_SPIMCTRL == 1)} then {
4247 configure_entry .menu22.config.f.x1 normal {n l y}} else {configure_entry .menu22.config.f.x1 disabled {y n l}}
4248 global CONFIG_SPIMCTRL_READCMD
4249 if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then {.menu22.config.f.x2.x configure -state normal -foreground [ cget .ref -foreground ]; .menu22.config.f.x2.l configure -state normal; } else {.menu22.config.f.x2.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu22.config.f.x2.l configure -state disabled}
4250 global CONFIG_SPIMCTRL_DUMMYBYTE
4251 if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then {
4252 configure_entry .menu22.config.f.x3 normal {n l y}} else {configure_entry .menu22.config.f.x3 disabled {y n l}}
4253 global CONFIG_SPIMCTRL_DUALOUTPUT
4254 if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then {
4255 configure_entry .menu22.config.f.x4 normal {n l y}} else {configure_entry .menu22.config.f.x4 disabled {y n l}}
4256 global CONFIG_SPIMCTRL_SCALER
4257 if {($CONFIG_SPIMCTRL == 1)} then {.menu22.config.f.x5.x configure -state normal -foreground [ cget .ref -foreground ]; .menu22.config.f.x5.l configure -state normal; } else {.menu22.config.f.x5.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu22.config.f.x5.l configure -state disabled}
4258 global CONFIG_SPIMCTRL_ASCALER
4259 if {($CONFIG_SPIMCTRL == 1)} then {.menu22.config.f.x6.x configure -state normal -foreground [ cget .ref -foreground ]; .menu22.config.f.x6.l configure -state normal; } else {.menu22.config.f.x6.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu22.config.f.x6.l configure -state disabled}
4260 global CONFIG_SPIMCTRL_PWRUPCNT
4261 if {($CONFIG_SPIMCTRL == 1)} then {.menu22.config.f.x7.x configure -state normal -foreground [ cget .ref -foreground ]; .menu22.config.f.x7.l configure -state normal; } else {.menu22.config.f.x7.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu22.config.f.x7.l configure -state disabled}
4262 }
4263
4264
4265 proc update_define_menu22 {} {
4266 update_define_mainmenu
4267 global CONFIG_MODULES
4268 global CONFIG_SPIMCTRL
4269 global CONFIG_SPIMCTRL_SDCARD
4270 if {($CONFIG_SPIMCTRL == 1)} then {
4271 set CONFIG_SPIMCTRL_SDCARD [expr $CONFIG_SPIMCTRL_SDCARD&15]} else {set CONFIG_SPIMCTRL_SDCARD [expr $CONFIG_SPIMCTRL_SDCARD|16]}
4272 global CONFIG_SPIMCTRL_READCMD
4273 if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then {validate_hex CONFIG_SPIMCTRL_READCMD "$CONFIG_SPIMCTRL_READCMD" 0B}
4274 global CONFIG_SPIMCTRL_DUMMYBYTE
4275 if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then {
4276 set CONFIG_SPIMCTRL_DUMMYBYTE [expr $CONFIG_SPIMCTRL_DUMMYBYTE&15]} else {set CONFIG_SPIMCTRL_DUMMYBYTE [expr $CONFIG_SPIMCTRL_DUMMYBYTE|16]}
4277 global CONFIG_SPIMCTRL_DUALOUTPUT
4278 if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then {
4279 set CONFIG_SPIMCTRL_DUALOUTPUT [expr $CONFIG_SPIMCTRL_DUALOUTPUT&15]} else {set CONFIG_SPIMCTRL_DUALOUTPUT [expr $CONFIG_SPIMCTRL_DUALOUTPUT|16]}
4280 global CONFIG_SPIMCTRL_SCALER
4281 if {($CONFIG_SPIMCTRL == 1)} then {validate_int CONFIG_SPIMCTRL_SCALER "$CONFIG_SPIMCTRL_SCALER" 1}
4282 global CONFIG_SPIMCTRL_ASCALER
4283 if {($CONFIG_SPIMCTRL == 1)} then {validate_int CONFIG_SPIMCTRL_ASCALER "$CONFIG_SPIMCTRL_ASCALER" 8}
4284 global CONFIG_SPIMCTRL_PWRUPCNT
4285 if {($CONFIG_SPIMCTRL == 1)} then {validate_int CONFIG_SPIMCTRL_PWRUPCNT "$CONFIG_SPIMCTRL_PWRUPCNT" 0}
4286 }
4287
4288
4289 proc menu23 {w title} {
4290 set oldFocus [focus]
4291 catch {focus .menu21}
4292 catch {destroy $w; unregister_active 23}
4293 toplevel $w -class Dialog
4294 wm withdraw $w
4295 global active_menus
4296 set active_menus [lsort -integer [linsert $active_menus end 23]]
4297 message $w.m -width 400 -aspect 300 -text \
4298 "SPI controller(s) " -relief raised
4299 pack $w.m -pady 10 -side top -padx 10
4300 wm title $w "SPI controller(s) "
4301
4302 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 23; break"
4303 set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 23; catch {destroy .menu21}; unregister_active 21; catch {destroy .menu13}; unregister_active 13; menu24 .menu24 \"$title\""
4304 frame $w.f
4305 button $w.f.back -text "OK" \
4306 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 23"
4307 button $w.f.next -text "Next" -underline 0\
4308 -width 15 -command $nextscript
4309 bind all <Alt-n> $nextscript
4310 button $w.f.prev -text "Prev" -underline 0\
4311 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 23; menu22 .menu22 \"$title\""
4312 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 23; menu22 .menu22 \"$title\";break"
4313 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
4314 pack $w.f -pady 10 -side bottom -anchor w -fill x
4315 frame $w.topline -relief ridge -borderwidth 2 -height 2
4316 pack $w.topline -side top -fill x
4317
4318 frame $w.botline -relief ridge -borderwidth 2 -height 2
4319 pack $w.botline -side bottom -fill x
4320
4321 frame $w.config
4322 pack $w.config -fill y -expand on
4323
4324 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
4325 pack $w.config.vscroll -side right -fill y
4326
4327 canvas $w.config.canvas -height 1\
4328 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
4329 -width [expr [winfo screenwidth .] * 1 / 2]
4330 frame $w.config.f
4331 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
4332 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
4333 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
4334 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
4335 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
4336 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
4337 pack $w.config.canvas -side right -fill y
4338
4339
4340 bool $w.config.f 23 0 "Enable SPI controller(s) " CONFIG_SPICTRL_ENABLE
4341 int $w.config.f 23 1 "Number of SPI controllers " CONFIG_SPICTRL_NUM
4342 int $w.config.f 23 2 "Slave select lines " CONFIG_SPICTRL_SLVS
4343 int $w.config.f 23 3 "FIFO depth (2^N) " CONFIG_SPICTRL_FIFO
4344 bool $w.config.f 23 4 "Enable slave select registers" CONFIG_SPICTRL_SLVREG
4345 bool $w.config.f 23 5 "Enable automatic slave select" CONFIG_SPICTRL_ASEL
4346 bool $w.config.f 23 6 "Support automated transfers " CONFIG_SPICTRL_AM
4347 bool $w.config.f 23 7 "Support open drain mode " CONFIG_SPICTRL_ODMODE
4348 bool $w.config.f 23 8 "Support three-wire mode " CONFIG_SPICTRL_TWEN
4349 int $w.config.f 23 9 "Maximum supported word length (see help!) " CONFIG_SPICTRL_MAXWLEN
4350 bool $w.config.f 23 10 "Use SYNCRAM for rx and tx queues " CONFIG_SPICTRL_SYNCRAM
4351 global tmpvar_30
4352 minimenu $w.config.f 23 11 "Fault-tolerance" tmpvar_30 CONFIG_SPICTRL_NOFT
4353 menu $w.config.f.x11.x.menu -tearoffcommand "menutitle \"Fault-tolerance\""
4354 $w.config.f.x11.x.menu add radiobutton -label "None" -variable tmpvar_30 -value "None" -command "update_active"
4355 $w.config.f.x11.x.menu add radiobutton -label "Parity-DMR" -variable tmpvar_30 -value "Parity-DMR" -command "update_active"
4356 $w.config.f.x11.x.menu add radiobutton -label "TMR" -variable tmpvar_30 -value "TMR" -command "update_active"
4357 menusplit $w $w.config.f.x11.x.menu 3
4358
4359
4360
4361 focus $w
4362 update_active
4363 global winx; global winy
4364 if {[winfo exists .menu21] == 0} then {menu21 .menu21 "SPI"}
4365 set winx [expr [winfo x .menu21]+30]; set winy [expr [winfo y .menu21]+30]
4366 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
4367 update idletasks
4368 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
4369
4370 $w.config.canvas configure \
4371 -width [expr [winfo reqwidth $w.config.f] + 1]\
4372 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
4373 [expr [winfo reqheight $w.config.f] + 1]"
4374
4375 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
4376 set scry [expr [winfo screenh $w] / 2]
4377 set maxy [expr [winfo screenh $w] * 3 / 4]
4378 set canvtotal [expr [winfo reqh $w.config.f] + 2]
4379 if [expr $winy + $canvtotal < $maxy] {
4380 $w.config.canvas configure -height $canvtotal
4381 } else {
4382 $w.config.canvas configure -height [expr $scry - $winy]
4383 }
4384 }
4385 update idletasks
4386 if {[winfo exists $w]} then {
4387 wm maxsize $w [winfo width $w] [winfo screenheight $w]
4388 wm minsize $w [winfo width $w] 100
4389
4390 wm deiconify $w
4391 }
4392 }
4393
4394 proc update_menu23 {} {
4395 global CONFIG_SPICTRL_ENABLE
4396 global CONFIG_SPICTRL_NUM
4397 if {($CONFIG_SPICTRL_ENABLE == 1)} then {.menu23.config.f.x1.x configure -state normal -foreground [ cget .ref -foreground ]; .menu23.config.f.x1.l configure -state normal; } else {.menu23.config.f.x1.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu23.config.f.x1.l configure -state disabled}
4398 global CONFIG_SPICTRL_SLVS
4399 if {($CONFIG_SPICTRL_ENABLE == 1)} then {.menu23.config.f.x2.x configure -state normal -foreground [ cget .ref -foreground ]; .menu23.config.f.x2.l configure -state normal; } else {.menu23.config.f.x2.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu23.config.f.x2.l configure -state disabled}
4400 global CONFIG_SPICTRL_FIFO
4401 if {($CONFIG_SPICTRL_ENABLE == 1)} then {.menu23.config.f.x3.x configure -state normal -foreground [ cget .ref -foreground ]; .menu23.config.f.x3.l configure -state normal; } else {.menu23.config.f.x3.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu23.config.f.x3.l configure -state disabled}
4402 global CONFIG_SPICTRL_SLVREG
4403 if {($CONFIG_SPICTRL_ENABLE == 1)} then {
4404 configure_entry .menu23.config.f.x4 normal {n l y}} else {configure_entry .menu23.config.f.x4 disabled {y n l}}
4405 global CONFIG_SPICTRL_ASEL
4406 if {($CONFIG_SPICTRL_ENABLE == 1)} then {
4407 configure_entry .menu23.config.f.x5 normal {n l y}} else {configure_entry .menu23.config.f.x5 disabled {y n l}}
4408 global CONFIG_SPICTRL_AM
4409 if {($CONFIG_SPICTRL_ENABLE == 1)} then {
4410 configure_entry .menu23.config.f.x6 normal {n l y}} else {configure_entry .menu23.config.f.x6 disabled {y n l}}
4411 global CONFIG_SPICTRL_ODMODE
4412 if {($CONFIG_SPICTRL_ENABLE == 1)} then {
4413 configure_entry .menu23.config.f.x7 normal {n l y}} else {configure_entry .menu23.config.f.x7 disabled {y n l}}
4414 global CONFIG_SPICTRL_TWEN
4415 if {($CONFIG_SPICTRL_ENABLE == 1)} then {
4416 configure_entry .menu23.config.f.x8 normal {n l y}} else {configure_entry .menu23.config.f.x8 disabled {y n l}}
4417 global CONFIG_SPICTRL_MAXWLEN
4418 if {($CONFIG_SPICTRL_ENABLE == 1)} then {.menu23.config.f.x9.x configure -state normal -foreground [ cget .ref -foreground ]; .menu23.config.f.x9.l configure -state normal; } else {.menu23.config.f.x9.x configure -state disabled -foreground [ cget .ref -disabledforeground ]; .menu23.config.f.x9.l configure -state disabled}
4419 global CONFIG_SPICTRL_SYNCRAM
4420 if {($CONFIG_SPICTRL_ENABLE == 1)} then {
4421 configure_entry .menu23.config.f.x10 normal {n l y}} else {configure_entry .menu23.config.f.x10 disabled {y n l}}
4422 if {($CONFIG_SPICTRL_ENABLE == 1) && ($CONFIG_SPICTRL_SYNCRAM == 1)} then {configure_entry .menu23.config.f.x11 normal {x l}} else {configure_entry .menu23.config.f.x11 disabled {x l}}
4423 }
4424
4425
4426 proc update_define_menu23 {} {
4427 update_define_mainmenu
4428 global CONFIG_MODULES
4429 global CONFIG_SPICTRL_ENABLE
4430 global CONFIG_SPICTRL_NUM
4431 if {($CONFIG_SPICTRL_ENABLE == 1)} then {validate_int CONFIG_SPICTRL_NUM "$CONFIG_SPICTRL_NUM" 1}
4432 global CONFIG_SPICTRL_SLVS
4433 if {($CONFIG_SPICTRL_ENABLE == 1)} then {validate_int CONFIG_SPICTRL_SLVS "$CONFIG_SPICTRL_SLVS" 1}
4434 global CONFIG_SPICTRL_FIFO
4435 if {($CONFIG_SPICTRL_ENABLE == 1)} then {validate_int CONFIG_SPICTRL_FIFO "$CONFIG_SPICTRL_FIFO" 1}
4436 global CONFIG_SPICTRL_SLVREG
4437 if {($CONFIG_SPICTRL_ENABLE == 1)} then {
4438 set CONFIG_SPICTRL_SLVREG [expr $CONFIG_SPICTRL_SLVREG&15]} else {set CONFIG_SPICTRL_SLVREG [expr $CONFIG_SPICTRL_SLVREG|16]}
4439 global CONFIG_SPICTRL_ASEL
4440 if {($CONFIG_SPICTRL_ENABLE == 1)} then {
4441 set CONFIG_SPICTRL_ASEL [expr $CONFIG_SPICTRL_ASEL&15]} else {set CONFIG_SPICTRL_ASEL [expr $CONFIG_SPICTRL_ASEL|16]}
4442 global CONFIG_SPICTRL_AM
4443 if {($CONFIG_SPICTRL_ENABLE == 1)} then {
4444 set CONFIG_SPICTRL_AM [expr $CONFIG_SPICTRL_AM&15]} else {set CONFIG_SPICTRL_AM [expr $CONFIG_SPICTRL_AM|16]}
4445 global CONFIG_SPICTRL_ODMODE
4446 if {($CONFIG_SPICTRL_ENABLE == 1)} then {
4447 set CONFIG_SPICTRL_ODMODE [expr $CONFIG_SPICTRL_ODMODE&15]} else {set CONFIG_SPICTRL_ODMODE [expr $CONFIG_SPICTRL_ODMODE|16]}
4448 global CONFIG_SPICTRL_TWEN
4449 if {($CONFIG_SPICTRL_ENABLE == 1)} then {
4450 set CONFIG_SPICTRL_TWEN [expr $CONFIG_SPICTRL_TWEN&15]} else {set CONFIG_SPICTRL_TWEN [expr $CONFIG_SPICTRL_TWEN|16]}
4451 global CONFIG_SPICTRL_MAXWLEN
4452 if {($CONFIG_SPICTRL_ENABLE == 1)} then {validate_int CONFIG_SPICTRL_MAXWLEN "$CONFIG_SPICTRL_MAXWLEN" 0}
4453 global CONFIG_SPICTRL_SYNCRAM
4454 if {($CONFIG_SPICTRL_ENABLE == 1)} then {
4455 set CONFIG_SPICTRL_SYNCRAM [expr $CONFIG_SPICTRL_SYNCRAM&15]} else {set CONFIG_SPICTRL_SYNCRAM [expr $CONFIG_SPICTRL_SYNCRAM|16]}
4456 global tmpvar_30
4457 global CONFIG_SPICTRL_NOFT
4458 if {$tmpvar_30 == "None"} then {set CONFIG_SPICTRL_NOFT 1} else {set CONFIG_SPICTRL_NOFT 0}
4459 global CONFIG_SPICTRL_DMRFT
4460 if {$tmpvar_30 == "Parity-DMR"} then {set CONFIG_SPICTRL_DMRFT 1} else {set CONFIG_SPICTRL_DMRFT 0}
4461 global CONFIG_SPICTRL_TMRFT
4462 if {$tmpvar_30 == "TMR"} then {set CONFIG_SPICTRL_TMRFT 1} else {set CONFIG_SPICTRL_TMRFT 0}
4463 }
4464
4465
4466 menu_option menu24 24 "VHDL Debugging "
4467 proc menu24 {w title} {
4468 set oldFocus [focus]
4469 catch {destroy $w; unregister_active 24}
4470 toplevel $w -class Dialog
4471 wm withdraw $w
4472 global active_menus
4473 set active_menus [lsort -integer [linsert $active_menus end 24]]
4474 message $w.m -width 400 -aspect 300 -text \
4475 "VHDL Debugging " -relief raised
4476 pack $w.m -pady 10 -side top -padx 10
4477 wm title $w "VHDL Debugging "
4478
4479 bind $w <Escape> "catch {focus $oldFocus}; destroy $w; unregister_active 24; break"
4480 set nextscript "catch {focus $oldFocus}; menu25 .menu25 \"$title\""
4481 frame $w.f
4482 button $w.f.back -text "Main Menu" \
4483 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 24"
4484 button $w.f.next -text "Next" -underline 0\
4485 -width 15 -command $nextscript
4486 $w.f.next configure -state disabled
4487 bind all <Alt-n> "puts \"no more menus\" "
4488 button $w.f.prev -text "Prev" -underline 0\
4489 -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 24; menu23 .menu23 \"$title\""
4490 bind $w <Alt-p> "catch {focus $oldFocus}; destroy $w; unregister_active 24; menu23 .menu23 \"$title\";break"
4491 pack $w.f.back $w.f.next $w.f.prev -side left -expand on
4492 pack $w.f -pady 10 -side bottom -anchor w -fill x
4493 frame $w.topline -relief ridge -borderwidth 2 -height 2
4494 pack $w.topline -side top -fill x
4495
4496 frame $w.botline -relief ridge -borderwidth 2 -height 2
4497 pack $w.botline -side bottom -fill x
4498
4499 frame $w.config
4500 pack $w.config -fill y -expand on
4501
4502 scrollbar $w.config.vscroll -command "$w.config.canvas yview"
4503 pack $w.config.vscroll -side right -fill y
4504
4505 canvas $w.config.canvas -height 1\
4506 -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
4507 -width [expr [winfo screenwidth .] * 1 / 2]
4508 frame $w.config.f
4509 bind $w <Key-Down> "$w.config.canvas yview scroll 1 unit;break;"
4510 bind $w <Key-Up> "$w.config.canvas yview scroll -1 unit;break;"
4511 bind $w <Key-Next> "$w.config.canvas yview scroll 1 page;break;"
4512 bind $w <Key-Prior> "$w.config.canvas yview scroll -1 page;break;"
4513 bind $w <Key-Home> "$w.config.canvas yview moveto 0;break;"
4514 bind $w <Key-End> "$w.config.canvas yview moveto 1 ;break;"
4515 pack $w.config.canvas -side right -fill y
4516
4517
4518 bool $w.config.f 24 0 "Accelerated UART tracing " CONFIG_DEBUG_UART
4519
4520
4521
4522 focus $w
4523 update_active
4524 global winx; global winy
4525 set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
4526 if {[winfo exists $w]} then {wm geometry $w +$winx+$winy}
4527 update idletasks
4528 if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f
4529
4530 $w.config.canvas configure \
4531 -width [expr [winfo reqwidth $w.config.f] + 1]\
4532 -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
4533 [expr [winfo reqheight $w.config.f] + 1]"
4534
4535 set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
4536 set scry [expr [winfo screenh $w] / 2]
4537 set maxy [expr [winfo screenh $w] * 3 / 4]
4538 set canvtotal [expr [winfo reqh $w.config.f] + 2]
4539 if [expr $winy + $canvtotal < $maxy] {
4540 $w.config.canvas configure -height $canvtotal
4541 } else {
4542 $w.config.canvas configure -height [expr $scry - $winy]
4543 }
4544 }
4545 update idletasks
4546 if {[winfo exists $w]} then {
4547 wm maxsize $w [winfo width $w] [winfo screenheight $w]
4548 wm minsize $w [winfo width $w] 100
4549
4550 wm deiconify $w
4551 }
4552 }
4553
4554 proc update_menu24 {} {
4555 }
4556
4557
4558 proc update_define_menu24 {} {
4559 update_define_mainmenu
4560 global CONFIG_MODULES
4561 }
4562
4563
4564 proc update_mainmenu {} {
4565 }
4566
4567
4568 set tmpvar_0 "(not set)"
4569 set CONFIG_SYN_INFERRED 0
4570 set CONFIG_SYN_STRATIX 0
4571 set CONFIG_SYN_STRATIXII 0
4572 set CONFIG_SYN_STRATIXIII 0
4573 set CONFIG_SYN_CYCLONEIII 0
4574 set CONFIG_SYN_ALTERA 0
4575 set CONFIG_SYN_AXCEL 0
4576 set CONFIG_SYN_AXDSP 0
4577 set CONFIG_SYN_PROASIC 0
4578 set CONFIG_SYN_PROASICPLUS 0
4579 set CONFIG_SYN_PROASIC3 0
4580 set CONFIG_SYN_PROASIC3E 0
4581 set CONFIG_SYN_PROASIC3L 0
4582 set CONFIG_SYN_IGLOO 0
4583 set CONFIG_SYN_FUSION 0
4584 set CONFIG_SYN_UT025CRH 0
4585 set CONFIG_SYN_UT130HBD 0
4586 set CONFIG_SYN_UT90NHBD 0
4587 set CONFIG_SYN_ATC18 0
4588 set CONFIG_SYN_ATC18RHA 0
4589 set CONFIG_SYN_CMOS9SF 0
4590 set CONFIG_SYN_CUSTOM1 0
4591 set CONFIG_SYN_EASIC90 0
4592 set CONFIG_SYN_EASIC45 0
4593 set CONFIG_SYN_IHP25 0
4594 set CONFIG_SYN_IHP25RH 0
4595 set CONFIG_SYN_LATTICE 0
4596 set CONFIG_SYN_ECLIPSE 0
4597 set CONFIG_SYN_PEREGRINE 0
4598 set CONFIG_SYN_RH_LIB18T 0
4599 set CONFIG_SYN_RHUMC 0
4600 set CONFIG_SYN_SMIC13 0
4601 set CONFIG_SYN_TM65GPLUS 0
4602 set CONFIG_SYN_TSMC90 0
4603 set CONFIG_SYN_UMC 0
4604 set CONFIG_SYN_SPARTAN2 0
4605 set CONFIG_SYN_SPARTAN3 0
4606 set CONFIG_SYN_SPARTAN3E 0
4607 set CONFIG_SYN_SPARTAN6 0
4608 set CONFIG_SYN_VIRTEX 0
4609 set CONFIG_SYN_VIRTEXE 0
4610 set CONFIG_SYN_VIRTEX2 0
4611 set CONFIG_SYN_VIRTEX4 0
4612 set CONFIG_SYN_VIRTEX5 0
4613 set CONFIG_SYN_VIRTEX6 0
4614 set tmpvar_1 "(not set)"
4615 set CONFIG_MEM_INFERRED 0
4616 set CONFIG_MEM_UMC 0
4617 set CONFIG_MEM_RHUMC 0
4618 set CONFIG_MEM_ARTISAN 0
4619 set CONFIG_MEM_CUSTOM1 0
4620 set CONFIG_MEM_VIRAGE 0
4621 set CONFIG_MEM_VIRAGE90 0
4622 set CONFIG_SYN_INFER_RAM 0
4623 set CONFIG_SYN_INFER_PADS 0
4624 set CONFIG_SYN_NO_ASYNC 0
4625 set CONFIG_SYN_SCAN 0
4626 set tmpvar_2 "(not set)"
4627 set CONFIG_CLK_INFERRED 0
4628 set CONFIG_CLK_HCLKBUF 0
4629 set CONFIG_CLK_UT130HBD 0
4630 set CONFIG_CLK_ALTDLL 0
4631 set CONFIG_CLK_LATDLL 0
4632 set CONFIG_CLK_PRO3PLL 0
4633 set CONFIG_CLK_PRO3EPLL 0
4634 set CONFIG_CLK_PRO3LPLL 0
4635 set CONFIG_CLK_FUSPLL 0
4636 set CONFIG_CLK_LIB18T 0
4637 set CONFIG_CLK_RHUMC 0
4638 set CONFIG_CLK_CLKDLL 0
4639 set CONFIG_CLK_DCM 0
4640 set CONFIG_CLK_MUL 2
4641 set CONFIG_CLK_DIV 2
4642 set CONFIG_OCLK_DIV 1
4643 set CONFIG_OCLKB_DIV 0
4644 set CONFIG_OCLKC_DIV 0
4645 set CONFIG_PCI_CLKDLL 0
4646 set CONFIG_CLK_NOFB 0
4647 set CONFIG_PCI_SYSCLK 0
4648 set CONFIG_LEON3 0
4649 set CONFIG_PROC_NUM 1
4650 set CONFIG_IU_NWINDOWS 8
4651 set CONFIG_IU_V8MULDIV 0
4652 set tmpvar_3 "(not set)"
4653 set CONFIG_IU_MUL_LATENCY_2 0
4654 set CONFIG_IU_MUL_LATENCY_4 0
4655 set CONFIG_IU_MUL_LATENCY_5 0
4656 set CONFIG_IU_MUL_MAC 0
4657 set tmpvar_4 "(not set)"
4658 set CONFIG_IU_MUL_INFERRED 0
4659 set CONFIG_IU_MUL_MODGEN 0
4660 set CONFIG_IU_MUL_TECHSPEC 0
4661 set CONFIG_IU_MUL_DW 0
4662 set CONFIG_IU_BP 0
4663 set CONFIG_IU_SVT 0
4664 set CONFIG_NOTAG 0
4665 set CONFIG_IU_LDELAY 1
4666 set CONFIG_IU_WATCHPOINTS 0
4667 set CONFIG_PWD 0
4668 set CONFIG_IU_RSTADDR 00000
4669 set CONFIG_FPU_ENABLE 0
4670 set tmpvar_5 "(not set)"
4671 set CONFIG_FPU_GRFPU 0
4672 set CONFIG_FPU_GRFPULITE 0
4673 set CONFIG_FPU_MEIKO 0
4674 set tmpvar_6 "(not set)"
4675 set CONFIG_FPU_GRFPU_INFMUL 0
4676 set CONFIG_FPU_GRFPU_DWMUL 0
4677 set CONFIG_FPU_GRFPU_MODGEN 0
4678 set CONFIG_FPU_GRFPU_TECHSPEC 0
4679 set CONFIG_FPU_GRFPU_SH 0
4680 set tmpvar_7 "(not set)"
4681 set CONFIG_FPU_GRFPC0 0
4682 set CONFIG_FPU_GRFPC1 0
4683 set CONFIG_FPU_GRFPC2 0
4684 set CONFIG_FPU_NETLIST 0
4685 set CONFIG_ICACHE_ENABLE 0
4686 set tmpvar_8 "(not set)"
4687 set CONFIG_ICACHE_ASSO1 0
4688 set CONFIG_ICACHE_ASSO2 0
4689 set CONFIG_ICACHE_ASSO3 0
4690 set CONFIG_ICACHE_ASSO4 0
4691 set tmpvar_9 "(not set)"
4692 set CONFIG_ICACHE_SZ1 0
4693 set CONFIG_ICACHE_SZ2 0
4694 set CONFIG_ICACHE_SZ4 0
4695 set CONFIG_ICACHE_SZ8 0
4696 set CONFIG_ICACHE_SZ16 0
4697 set CONFIG_ICACHE_SZ32 0
4698 set CONFIG_ICACHE_SZ64 0
4699 set CONFIG_ICACHE_SZ128 0
4700 set CONFIG_ICACHE_SZ256 0
4701 set tmpvar_10 "(not set)"
4702 set CONFIG_ICACHE_LZ16 0
4703 set CONFIG_ICACHE_LZ32 0
4704 set tmpvar_11 "(not set)"
4705 set CONFIG_ICACHE_ALGORND 0
4706 set CONFIG_ICACHE_ALGODIR 0
4707 set CONFIG_ICACHE_ALGOLRR 0
4708 set CONFIG_ICACHE_ALGOLRU 0
4709 set CONFIG_ICACHE_LOCK 0
4710 set CONFIG_ICACHE_LRAM 0
4711 set tmpvar_12 "(not set)"
4712 set CONFIG_ICACHE_LRAM_SZ1 0
4713 set CONFIG_ICACHE_LRAM_SZ2 0
4714 set CONFIG_ICACHE_LRAM_SZ4 0
4715 set CONFIG_ICACHE_LRAM_SZ8 0
4716 set CONFIG_ICACHE_LRAM_SZ16 0
4717 set CONFIG_ICACHE_LRAM_SZ32 0
4718 set CONFIG_ICACHE_LRAM_SZ64 0
4719 set CONFIG_ICACHE_LRAM_SZ128 0
4720 set CONFIG_ICACHE_LRAM_SZ256 0
4721 set CONFIG_ICACHE_LRSTART 8e
4722 set CONFIG_DCACHE_ENABLE 0
4723 set tmpvar_13 "(not set)"
4724 set CONFIG_DCACHE_ASSO1 0
4725 set CONFIG_DCACHE_ASSO2 0
4726 set CONFIG_DCACHE_ASSO3 0
4727 set CONFIG_DCACHE_ASSO4 0
4728 set tmpvar_14 "(not set)"
4729 set CONFIG_DCACHE_SZ1 0
4730 set CONFIG_DCACHE_SZ2 0
4731 set CONFIG_DCACHE_SZ4 0
4732 set CONFIG_DCACHE_SZ8 0
4733 set CONFIG_DCACHE_SZ16 0
4734 set CONFIG_DCACHE_SZ32 0
4735 set CONFIG_DCACHE_SZ64 0
4736 set CONFIG_DCACHE_SZ128 0
4737 set CONFIG_DCACHE_SZ256 0
4738 set tmpvar_15 "(not set)"
4739 set CONFIG_DCACHE_LZ16 0
4740 set CONFIG_DCACHE_LZ32 0
4741 set tmpvar_16 "(not set)"
4742 set CONFIG_DCACHE_ALGORND 0
4743 set CONFIG_DCACHE_ALGODIR 0
4744 set CONFIG_DCACHE_ALGOLRR 0
4745 set CONFIG_DCACHE_ALGOLRU 0
4746 set CONFIG_DCACHE_LOCK 0
4747 set CONFIG_DCACHE_SNOOP 0
4748 set CONFIG_DCACHE_SNOOP_FAST 0
4749 set CONFIG_DCACHE_SNOOP_SEPTAG 0
4750 set CONFIG_CACHE_FIXED 0
4751 set CONFIG_DCACHE_LRAM 0
4752 set tmpvar_17 "(not set)"
4753 set CONFIG_DCACHE_LRAM_SZ1 0
4754 set CONFIG_DCACHE_LRAM_SZ2 0
4755 set CONFIG_DCACHE_LRAM_SZ4 0
4756 set CONFIG_DCACHE_LRAM_SZ8 0
4757 set CONFIG_DCACHE_LRAM_SZ16 0
4758 set CONFIG_DCACHE_LRAM_SZ32 0
4759 set CONFIG_DCACHE_LRAM_SZ64 0
4760 set CONFIG_DCACHE_LRAM_SZ128 0
4761 set CONFIG_DCACHE_LRAM_SZ256 0
4762 set CONFIG_DCACHE_LRSTART 8f
4763 set CONFIG_MMU_ENABLE 0
4764 set tmpvar_18 "(not set)"
4765 set CONFIG_MMU_COMBINED 0
4766 set CONFIG_MMU_SPLIT 0
4767 set tmpvar_19 "(not set)"
4768 set CONFIG_MMU_REPARRAY 0
4769 set CONFIG_MMU_REPINCREMENT 0
4770 set tmpvar_20 "(not set)"
4771 set CONFIG_MMU_I2 0
4772 set CONFIG_MMU_I4 0
4773 set CONFIG_MMU_I8 0
4774 set CONFIG_MMU_I16 0
4775 set CONFIG_MMU_I32 0
4776 set tmpvar_21 "(not set)"
4777 set CONFIG_MMU_D2 0
4778 set CONFIG_MMU_D4 0
4779 set CONFIG_MMU_D8 0
4780 set CONFIG_MMU_D16 0
4781 set CONFIG_MMU_D32 0
4782 set CONFIG_MMU_FASTWB 0
4783 set tmpvar_22 "(not set)"
4784 set CONFIG_MMU_PAGE_4K 0
4785 set CONFIG_MMU_PAGE_8K 0
4786 set CONFIG_MMU_PAGE_16K 0
4787 set CONFIG_MMU_PAGE_32K 0
4788 set CONFIG_MMU_PAGE_PROG 0
4789 set CONFIG_DSU_ENABLE 0
4790 set CONFIG_DSU_ITRACE 0
4791 set tmpvar_23 "(not set)"
4792 set CONFIG_DSU_ITRACESZ1 0
4793 set CONFIG_DSU_ITRACESZ2 0
4794 set CONFIG_DSU_ITRACESZ4 0
4795 set CONFIG_DSU_ITRACESZ8 0
4796 set CONFIG_DSU_ITRACESZ16 0
4797 set CONFIG_DSU_ATRACE 0
4798 set tmpvar_24 "(not set)"
4799 set CONFIG_DSU_ATRACESZ1 0
4800 set CONFIG_DSU_ATRACESZ2 0
4801 set CONFIG_DSU_ATRACESZ4 0
4802 set CONFIG_DSU_ATRACESZ8 0
4803 set CONFIG_DSU_ATRACESZ16 0
4804 set CONFIG_LEON3FT_EN 0
4805 set tmpvar_25 "(not set)"
4806 set CONFIG_IUFT_NONE 0
4807 set CONFIG_IUFT_PAR 0
4808 set CONFIG_IUFT_DMR 0
4809 set CONFIG_IUFT_BCH 0
4810 set CONFIG_IUFT_TMR 0
4811 set CONFIG_FPUFT_EN 0
4812 set CONFIG_RF_ERRINJ 0
4813 set CONFIG_CACHE_FT_EN 0
4814 set CONFIG_CACHE_ERRINJ 0
4815 set CONFIG_LEON3_NETLIST 0
4816 set CONFIG_IU_DISAS 0
4817 set CONFIG_IU_DISAS_NET 0
4818 set CONFIG_DEBUG_PC32 0
4819 set CONFIG_AHB_DEFMST 0
4820 set CONFIG_AHB_RROBIN 0
4821 set CONFIG_AHB_SPLIT 0
4822 set CONFIG_AHB_IOADDR FFF
4823 set CONFIG_APB_HADDR 800
4824 set CONFIG_AHB_MON 0
4825 set CONFIG_AHB_MONERR 0
4826 set CONFIG_AHB_MONWAR 0
4827 set CONFIG_AHB_DTRACE 0
4828 set CONFIG_DSU_JTAG 0
4829 set CONFIG_DSU_ETH 0
4830 set tmpvar_26 "(not set)"
4831 set CONFIG_DSU_ETHSZ1 0
4832 set CONFIG_DSU_ETHSZ2 0
4833 set CONFIG_DSU_ETHSZ4 0
4834 set CONFIG_DSU_ETHSZ8 0
4835 set CONFIG_DSU_ETHSZ16 0
4836 set CONFIG_DSU_IPMSB C0A8
4837 set CONFIG_DSU_IPLSB 0033
4838 set CONFIG_DSU_ETHMSB 020000
4839 set CONFIG_DSU_ETHLSB 000000
4840 set CONFIG_DSU_ETH_PROG 0
4841 set CONFIG_DSU_ETH_DIS 0
4842 set CONFIG_MCTRL_LEON2 0
4843 set CONFIG_MCTRL_8BIT 0
4844 set CONFIG_MCTRL_16BIT 0
4845 set CONFIG_MCTRL_5CS 0
4846 set CONFIG_MCTRL_SDRAM 0
4847 set CONFIG_MCTRL_SDRAM_SEPBUS 0
4848 set CONFIG_MCTRL_SDRAM_BUS64 0
4849 set CONFIG_MCTRL_SDRAM_INVCLK 0
4850 set CONFIG_MCTRL_PAGE 0
4851 set CONFIG_MCTRL_PROGPAGE 0
4852 set CONFIG_MIG_DDR2 0
4853 set CONFIG_MIG_RANKS 1
4854 set CONFIG_MIG_COLBITS 10
4855 set CONFIG_MIG_ROWBITS 13
4856 set CONFIG_MIG_BANKBITS 2
4857 set CONFIG_MIG_HMASK F00
4858 set CONFIG_AHBSTAT_ENABLE 0
4859 set CONFIG_AHBSTAT_NFTSLV 1
4860 set CONFIG_AHBROM_ENABLE 0
4861 set CONFIG_AHBROM_START 000
4862 set CONFIG_AHBROM_PIPE 0
4863 set CONFIG_AHBRAM_ENABLE 0
4864 set tmpvar_27 "(not set)"
4865 set CONFIG_AHBRAM_SZ1 0
4866 set CONFIG_AHBRAM_SZ2 0
4867 set CONFIG_AHBRAM_SZ4 0
4868 set CONFIG_AHBRAM_SZ8 0
4869 set CONFIG_AHBRAM_SZ16 0
4870 set CONFIG_AHBRAM_SZ32 0
4871 set CONFIG_AHBRAM_SZ64 0
4872 set CONFIG_AHBRAM_START A00
4873 set CONFIG_GRETH_ENABLE 0
4874 set CONFIG_GRETH_GIGA 0
4875 set tmpvar_28 "(not set)"
4876 set CONFIG_GRETH_FIFO4 0
4877 set CONFIG_GRETH_FIFO8 0
4878 set CONFIG_GRETH_FIFO16 0
4879 set CONFIG_GRETH_FIFO32 0
4880 set CONFIG_GRETH_FIFO64 0
4881 set CONFIG_UART1_ENABLE 0
4882 set tmpvar_29 "(not set)"
4883 set CONFIG_UA1_FIFO1 0
4884 set CONFIG_UA1_FIFO2 0
4885 set CONFIG_UA1_FIFO4 0
4886 set CONFIG_UA1_FIFO8 0
4887 set CONFIG_UA1_FIFO16 0
4888 set CONFIG_UA1_FIFO32 0
4889 set CONFIG_IRQ3_ENABLE 0
4890 set CONFIG_IRQ3_SEC 0
4891 set CONFIG_IRQ3_NSEC 12
4892 set CONFIG_GPT_ENABLE 0
4893 set CONFIG_GPT_NTIM 2
4894 set CONFIG_GPT_SW 8
4895 set CONFIG_GPT_TW 32
4896 set CONFIG_GPT_IRQ 8
4897 set CONFIG_GPT_SEPIRQ 0
4898 set CONFIG_GPT_WDOGEN 0
4899 set CONFIG_GPT_WDOG FFFF
4900 set CONFIG_GRGPIO_ENABLE 0
4901 set CONFIG_GRGPIO_WIDTH 8
4902 set CONFIG_GRGPIO_IMASK 0000
4903 set CONFIG_KBD_ENABLE 0
4904 set CONFIG_VGA_ENABLE 0
4905 set CONFIG_SVGA_ENABLE 0
4906 set CONFIG_SPIMCTRL 0
4907 set CONFIG_SPIMCTRL_SDCARD 0
4908 set CONFIG_SPIMCTRL_READCMD 0B
4909 set CONFIG_SPIMCTRL_DUMMYBYTE 0
4910 set CONFIG_SPIMCTRL_DUALOUTPUT 0
4911 set CONFIG_SPIMCTRL_SCALER 1
4912 set CONFIG_SPIMCTRL_ASCALER 8
4913 set CONFIG_SPIMCTRL_PWRUPCNT 0
4914 set CONFIG_SPICTRL_ENABLE 0
4915 set CONFIG_SPICTRL_NUM 1
4916 set CONFIG_SPICTRL_SLVS 1
4917 set CONFIG_SPICTRL_FIFO 1
4918 set CONFIG_SPICTRL_SLVREG 0
4919 set CONFIG_SPICTRL_ASEL 0
4920 set CONFIG_SPICTRL_AM 0
4921 set CONFIG_SPICTRL_ODMODE 0
4922 set CONFIG_SPICTRL_TWEN 0
4923 set CONFIG_SPICTRL_MAXWLEN 0
4924 set CONFIG_SPICTRL_SYNCRAM 0
4925 set tmpvar_30 "(not set)"
4926 set CONFIG_SPICTRL_NOFT 0
4927 set CONFIG_SPICTRL_DMRFT 0
4928 set CONFIG_SPICTRL_TMRFT 0
4929 set CONFIG_DEBUG_UART 0
4930 set CONFIG_LEON3FT_PRESENT 4
4931 set CONFIG_HAS_SHARED_GRFPU 4
4932 set CONFIG_SYN_ARTISAN 4
4933 set CONFIG_PCI_ENABLE 4
4934 set CONFIG_MODULES 4
4935 proc writeconfig {file1 file2} {
4936 set cfg [open $file1 w]
4937 set autocfg [open $file2 w]
4938 set notmod 1
4939 set notset 0
4940 puts $cfg "#"
4941 puts $cfg "# Automatically generated make config: don't edit"
4942 puts $cfg "#"
4943 puts $autocfg "/*"
4944 puts $autocfg " * Automatically generated C config: don't edit"
4945 puts $autocfg " */"
4946 puts $autocfg "#define AUTOCONF_INCLUDED"
4947 global CONFIG_LEON3FT_PRESENT
4948 global CONSTANT_Y
4949 write_tristate $cfg $autocfg CONFIG_LEON3FT_PRESENT $CONFIG_LEON3FT_PRESENT [list $notmod] 2
4950 global CONFIG_HAS_SHARED_GRFPU
4951 write_tristate $cfg $autocfg CONFIG_HAS_SHARED_GRFPU $CONFIG_HAS_SHARED_GRFPU [list $notmod] 2
4952 write_comment $cfg $autocfg "Synthesis "
4953 global tmpvar_0
4954
4955 if { $tmpvar_0 == "Inferred" } then { write_tristate $cfg $autocfg CONFIG_SYN_INFERRED 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_INFERRED 0 [list $notmod] 2 }
4956 if { $tmpvar_0 == "Altera-Stratix" } then { write_tristate $cfg $autocfg CONFIG_SYN_STRATIX 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_STRATIX 0 [list $notmod] 2 }
4957 if { $tmpvar_0 == "Altera-StratixII" } then { write_tristate $cfg $autocfg CONFIG_SYN_STRATIXII 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_STRATIXII 0 [list $notmod] 2 }
4958 if { $tmpvar_0 == "Altera-StratixIII" } then { write_tristate $cfg $autocfg CONFIG_SYN_STRATIXIII 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_STRATIXIII 0 [list $notmod] 2 }
4959 if { $tmpvar_0 == "Altera-CycloneIII" } then { write_tristate $cfg $autocfg CONFIG_SYN_CYCLONEIII 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_CYCLONEIII 0 [list $notmod] 2 }
4960 if { $tmpvar_0 == "Altera-Others" } then { write_tristate $cfg $autocfg CONFIG_SYN_ALTERA 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_ALTERA 0 [list $notmod] 2 }
4961 if { $tmpvar_0 == "Actel-Axcelerator" } then { write_tristate $cfg $autocfg CONFIG_SYN_AXCEL 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_AXCEL 0 [list $notmod] 2 }
4962 if { $tmpvar_0 == "Actel-Axcelerator-DSP" } then { write_tristate $cfg $autocfg CONFIG_SYN_AXDSP 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_AXDSP 0 [list $notmod] 2 }
4963 if { $tmpvar_0 == "Actel-Proasic" } then { write_tristate $cfg $autocfg CONFIG_SYN_PROASIC 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_PROASIC 0 [list $notmod] 2 }
4964 if { $tmpvar_0 == "Actel-ProasicPlus" } then { write_tristate $cfg $autocfg CONFIG_SYN_PROASICPLUS 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_PROASICPLUS 0 [list $notmod] 2 }
4965 if { $tmpvar_0 == "Actel-Proasic3" } then { write_tristate $cfg $autocfg CONFIG_SYN_PROASIC3 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_PROASIC3 0 [list $notmod] 2 }
4966 if { $tmpvar_0 == "Actel-Proasic3E" } then { write_tristate $cfg $autocfg CONFIG_SYN_PROASIC3E 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_PROASIC3E 0 [list $notmod] 2 }
4967 if { $tmpvar_0 == "Actel-Proasic3L" } then { write_tristate $cfg $autocfg CONFIG_SYN_PROASIC3L 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_PROASIC3L 0 [list $notmod] 2 }
4968 if { $tmpvar_0 == "Actel-IGLOO/p/L" } then { write_tristate $cfg $autocfg CONFIG_SYN_IGLOO 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_IGLOO 0 [list $notmod] 2 }
4969 if { $tmpvar_0 == "Actel-Fusion" } then { write_tristate $cfg $autocfg CONFIG_SYN_FUSION 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_FUSION 0 [list $notmod] 2 }
4970 if { $tmpvar_0 == "Aeroflex-UT025CRH" } then { write_tristate $cfg $autocfg CONFIG_SYN_UT025CRH 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_UT025CRH 0 [list $notmod] 2 }
4971 if { $tmpvar_0 == "Aeroflex-UT130HBD" } then { write_tristate $cfg $autocfg CONFIG_SYN_UT130HBD 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_UT130HBD 0 [list $notmod] 2 }
4972 if { $tmpvar_0 == "Aeroflex-UT90NHBD" } then { write_tristate $cfg $autocfg CONFIG_SYN_UT90NHBD 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_UT90NHBD 0 [list $notmod] 2 }
4973 if { $tmpvar_0 == "Atmel-ATC18" } then { write_tristate $cfg $autocfg CONFIG_SYN_ATC18 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_ATC18 0 [list $notmod] 2 }
4974 if { $tmpvar_0 == "Atmel-ATC18RHA" } then { write_tristate $cfg $autocfg CONFIG_SYN_ATC18RHA 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_ATC18RHA 0 [list $notmod] 2 }
4975 if { $tmpvar_0 == "IBM-CMOS9SF" } then { write_tristate $cfg $autocfg CONFIG_SYN_CMOS9SF 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_CMOS9SF 0 [list $notmod] 2 }
4976 if { $tmpvar_0 == "Custom1" } then { write_tristate $cfg $autocfg CONFIG_SYN_CUSTOM1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_CUSTOM1 0 [list $notmod] 2 }
4977 if { $tmpvar_0 == "eASIC90" } then { write_tristate $cfg $autocfg CONFIG_SYN_EASIC90 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_EASIC90 0 [list $notmod] 2 }
4978 if { $tmpvar_0 == "eASIC45" } then { write_tristate $cfg $autocfg CONFIG_SYN_EASIC45 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_EASIC45 0 [list $notmod] 2 }
4979 if { $tmpvar_0 == "IHP25" } then { write_tristate $cfg $autocfg CONFIG_SYN_IHP25 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_IHP25 0 [list $notmod] 2 }
4980 if { $tmpvar_0 == "IHP25RH" } then { write_tristate $cfg $autocfg CONFIG_SYN_IHP25RH 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_IHP25RH 0 [list $notmod] 2 }
4981 if { $tmpvar_0 == "Lattice-EC/ECP/XP" } then { write_tristate $cfg $autocfg CONFIG_SYN_LATTICE 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_LATTICE 0 [list $notmod] 2 }
4982 if { $tmpvar_0 == "Quicklogic-Eclipse" } then { write_tristate $cfg $autocfg CONFIG_SYN_ECLIPSE 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_ECLIPSE 0 [list $notmod] 2 }
4983 if { $tmpvar_0 == "Peregrine" } then { write_tristate $cfg $autocfg CONFIG_SYN_PEREGRINE 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_PEREGRINE 0 [list $notmod] 2 }
4984 if { $tmpvar_0 == "RH-LIB18T" } then { write_tristate $cfg $autocfg CONFIG_SYN_RH_LIB18T 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_RH_LIB18T 0 [list $notmod] 2 }
4985 if { $tmpvar_0 == "RH-UMC" } then { write_tristate $cfg $autocfg CONFIG_SYN_RHUMC 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_RHUMC 0 [list $notmod] 2 }
4986 if { $tmpvar_0 == "SMIC130" } then { write_tristate $cfg $autocfg CONFIG_SYN_SMIC13 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_SMIC13 0 [list $notmod] 2 }
4987 if { $tmpvar_0 == "TM65Gplus" } then { write_tristate $cfg $autocfg CONFIG_SYN_TM65GPLUS 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_TM65GPLUS 0 [list $notmod] 2 }
4988 if { $tmpvar_0 == "TSMC90" } then { write_tristate $cfg $autocfg CONFIG_SYN_TSMC90 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_TSMC90 0 [list $notmod] 2 }
4989 if { $tmpvar_0 == "UMC180" } then { write_tristate $cfg $autocfg CONFIG_SYN_UMC 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_UMC 0 [list $notmod] 2 }
4990 if { $tmpvar_0 == "Xilinx-Spartan2" } then { write_tristate $cfg $autocfg CONFIG_SYN_SPARTAN2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_SPARTAN2 0 [list $notmod] 2 }
4991 if { $tmpvar_0 == "Xilinx-Spartan3" } then { write_tristate $cfg $autocfg CONFIG_SYN_SPARTAN3 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_SPARTAN3 0 [list $notmod] 2 }
4992 if { $tmpvar_0 == "Xilinx-Spartan3E" } then { write_tristate $cfg $autocfg CONFIG_SYN_SPARTAN3E 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_SPARTAN3E 0 [list $notmod] 2 }
4993 if { $tmpvar_0 == "Xilinx-Spartan6" } then { write_tristate $cfg $autocfg CONFIG_SYN_SPARTAN6 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_SPARTAN6 0 [list $notmod] 2 }
4994 if { $tmpvar_0 == "Xilinx-Virtex" } then { write_tristate $cfg $autocfg CONFIG_SYN_VIRTEX 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_VIRTEX 0 [list $notmod] 2 }
4995 if { $tmpvar_0 == "Xilinx-VirtexE" } then { write_tristate $cfg $autocfg CONFIG_SYN_VIRTEXE 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_VIRTEXE 0 [list $notmod] 2 }
4996 if { $tmpvar_0 == "Xilinx-Virtex2" } then { write_tristate $cfg $autocfg CONFIG_SYN_VIRTEX2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_VIRTEX2 0 [list $notmod] 2 }
4997 if { $tmpvar_0 == "Xilinx-Virtex4" } then { write_tristate $cfg $autocfg CONFIG_SYN_VIRTEX4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_VIRTEX4 0 [list $notmod] 2 }
4998 if { $tmpvar_0 == "Xilinx-Virtex5" } then { write_tristate $cfg $autocfg CONFIG_SYN_VIRTEX5 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_VIRTEX5 0 [list $notmod] 2 }
4999 if { $tmpvar_0 == "Xilinx-Virtex6" } then { write_tristate $cfg $autocfg CONFIG_SYN_VIRTEX6 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SYN_VIRTEX6 0 [list $notmod] 2 }
5000 global tmpvar_1
5001 global CONFIG_SYN_INFERRED
5002 global CONFIG_SYN_CUSTOM1
5003 global CONFIG_SYN_ATC18
5004 global CONFIG_SYN_TSMC90
5005 global CONFIG_SYN_UMC
5006 global CONFIG_SYN_RHUMC
5007 global CONFIG_SYN_ARTISAN
5008 if {($CONFIG_SYN_INFERRED == 1 || $CONFIG_SYN_CUSTOM1 == 1 || $CONFIG_SYN_ATC18 == 1 || $CONFIG_SYN_TSMC90 == 1 || $CONFIG_SYN_UMC == 1 || $CONFIG_SYN_RHUMC == 1 || $CONFIG_SYN_ARTISAN == 1)} then {
5009 if { $tmpvar_1 == "Inferred" } then { write_tristate $cfg $autocfg CONFIG_MEM_INFERRED 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MEM_INFERRED 0 [list $notmod] 2 }
5010 if { $tmpvar_1 == "UMC18" } then { write_tristate $cfg $autocfg CONFIG_MEM_UMC 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MEM_UMC 0 [list $notmod] 2 }
5011 if { $tmpvar_1 == "RH-UMC" } then { write_tristate $cfg $autocfg CONFIG_MEM_RHUMC 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MEM_RHUMC 0 [list $notmod] 2 }
5012 if { $tmpvar_1 == "Artisan" } then { write_tristate $cfg $autocfg CONFIG_MEM_ARTISAN 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MEM_ARTISAN 0 [list $notmod] 2 }
5013 if { $tmpvar_1 == "Custom1" } then { write_tristate $cfg $autocfg CONFIG_MEM_CUSTOM1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MEM_CUSTOM1 0 [list $notmod] 2 }
5014 if { $tmpvar_1 == "Virage" } then { write_tristate $cfg $autocfg CONFIG_MEM_VIRAGE 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MEM_VIRAGE 0 [list $notmod] 2 }
5015 if { $tmpvar_1 == "Virage-TSMC90" } then { write_tristate $cfg $autocfg CONFIG_MEM_VIRAGE90 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MEM_VIRAGE90 0 [list $notmod] 2 }}
5016 global CONFIG_SYN_INFER_RAM
5017 if {($CONFIG_SYN_INFERRED != 1)} then {write_tristate $cfg $autocfg CONFIG_SYN_INFER_RAM $CONFIG_SYN_INFER_RAM [list $notmod] 2 }
5018 global CONFIG_SYN_INFER_PADS
5019 if {($CONFIG_SYN_INFERRED != 1)} then {write_tristate $cfg $autocfg CONFIG_SYN_INFER_PADS $CONFIG_SYN_INFER_PADS [list $notmod] 2 }
5020 global CONFIG_SYN_NO_ASYNC
5021 write_tristate $cfg $autocfg CONFIG_SYN_NO_ASYNC $CONFIG_SYN_NO_ASYNC [list $notmod] 2
5022 global CONFIG_SYN_SCAN
5023 write_tristate $cfg $autocfg CONFIG_SYN_SCAN $CONFIG_SYN_SCAN [list $notmod] 2
5024 write_comment $cfg $autocfg "Clock generation"
5025 global tmpvar_2
5026
5027 if { $tmpvar_2 == "Inferred" } then { write_tristate $cfg $autocfg CONFIG_CLK_INFERRED 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_CLK_INFERRED 0 [list $notmod] 2 }
5028 if { $tmpvar_2 == "Actel-HCLKBUF" } then { write_tristate $cfg $autocfg CONFIG_CLK_HCLKBUF 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_CLK_HCLKBUF 0 [list $notmod] 2 }
5029 if { $tmpvar_2 == "Aeroflex-UT130HBD" } then { write_tristate $cfg $autocfg CONFIG_CLK_UT130HBD 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_CLK_UT130HBD 0 [list $notmod] 2 }
5030 if { $tmpvar_2 == "Altera-ALTPLL" } then { write_tristate $cfg $autocfg CONFIG_CLK_ALTDLL 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_CLK_ALTDLL 0 [list $notmod] 2 }
5031 if { $tmpvar_2 == "Lattice-EXPLL" } then { write_tristate $cfg $autocfg CONFIG_CLK_LATDLL 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_CLK_LATDLL 0 [list $notmod] 2 }
5032 if { $tmpvar_2 == "Proasic3-PLL" } then { write_tristate $cfg $autocfg CONFIG_CLK_PRO3PLL 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_CLK_PRO3PLL 0 [list $notmod] 2 }
5033 if { $tmpvar_2 == "Proasic3E-PLL" } then { write_tristate $cfg $autocfg CONFIG_CLK_PRO3EPLL 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_CLK_PRO3EPLL 0 [list $notmod] 2 }
5034 if { $tmpvar_2 == "Proasic3L-PLL" } then { write_tristate $cfg $autocfg CONFIG_CLK_PRO3LPLL 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_CLK_PRO3LPLL 0 [list $notmod] 2 }
5035 if { $tmpvar_2 == "Fusion-PLL" } then { write_tristate $cfg $autocfg CONFIG_CLK_FUSPLL 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_CLK_FUSPLL 0 [list $notmod] 2 }
5036 if { $tmpvar_2 == "RH-LIB18T-PLL" } then { write_tristate $cfg $autocfg CONFIG_CLK_LIB18T 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_CLK_LIB18T 0 [list $notmod] 2 }
5037 if { $tmpvar_2 == "DARE-PLL" } then { write_tristate $cfg $autocfg CONFIG_CLK_RHUMC 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_CLK_RHUMC 0 [list $notmod] 2 }
5038 if { $tmpvar_2 == "Xilinx-CLKDLL" } then { write_tristate $cfg $autocfg CONFIG_CLK_CLKDLL 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_CLK_CLKDLL 0 [list $notmod] 2 }
5039 if { $tmpvar_2 == "Xilinx-DCM" } then { write_tristate $cfg $autocfg CONFIG_CLK_DCM 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_CLK_DCM 0 [list $notmod] 2 }
5040 global CONFIG_CLK_MUL
5041 global CONFIG_CLK_DCM
5042 global CONFIG_CLK_ALTDLL
5043 global CONFIG_CLK_LATDLL
5044 global CONFIG_CLK_PRO3PLL
5045 global CONFIG_CLK_PRO3EPLL
5046 global CONFIG_CLK_PRO3LPLL
5047 global CONFIG_CLK_CLKDLL
5048 global CONFIG_CLK_LIB18T
5049 global CONFIG_CLK_FUSPLL
5050 if {($CONFIG_CLK_DCM == 1 || $CONFIG_CLK_ALTDLL == 1 || $CONFIG_CLK_LATDLL == 1 || $CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_CLKDLL == 1 || $CONFIG_CLK_LIB18T == 1 || $CONFIG_CLK_FUSPLL == 1)} then {write_int $cfg $autocfg CONFIG_CLK_MUL $CONFIG_CLK_MUL $notmod }
5051 global CONFIG_CLK_DIV
5052 if {($CONFIG_CLK_DCM == 1 || $CONFIG_CLK_ALTDLL == 1 || $CONFIG_CLK_LATDLL == 1 || $CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_CLKDLL == 1 || $CONFIG_CLK_LIB18T == 1 || $CONFIG_CLK_FUSPLL == 1)} then {write_int $cfg $autocfg CONFIG_CLK_DIV $CONFIG_CLK_DIV $notmod }
5053 global CONFIG_OCLK_DIV
5054 if {($CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_FUSPLL == 1)} then {write_int $cfg $autocfg CONFIG_OCLK_DIV $CONFIG_OCLK_DIV $notmod }
5055 global CONFIG_OCLKB_DIV
5056 if {($CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_FUSPLL == 1)} then {write_int $cfg $autocfg CONFIG_OCLKB_DIV $CONFIG_OCLKB_DIV $notmod }
5057 global CONFIG_OCLKC_DIV
5058 if {($CONFIG_CLK_PRO3PLL == 1 || $CONFIG_CLK_PRO3EPLL == 1 || $CONFIG_CLK_PRO3LPLL == 1 || $CONFIG_CLK_FUSPLL == 1)} then {write_int $cfg $autocfg CONFIG_OCLKC_DIV $CONFIG_OCLKC_DIV $notmod }
5059 global CONFIG_PCI_CLKDLL
5060 if {($CONFIG_CLK_CLKDLL == 1 || $CONFIG_CLK_DCM == 1)} then {write_tristate $cfg $autocfg CONFIG_PCI_CLKDLL $CONFIG_PCI_CLKDLL [list $notmod] 2 }
5061 global CONFIG_CLK_NOFB
5062 if {($CONFIG_CLK_DCM == 1)} then {write_tristate $cfg $autocfg CONFIG_CLK_NOFB $CONFIG_CLK_NOFB [list $notmod] 2 }
5063 global CONFIG_PCI_SYSCLK
5064 global CONFIG_PCI_ENABLE
5065 if {($CONFIG_PCI_ENABLE != 1)} then {write_tristate $cfg $autocfg CONFIG_PCI_SYSCLK $CONFIG_PCI_SYSCLK [list $notmod] 2 }
5066 global CONFIG_LEON3
5067 write_tristate $cfg $autocfg CONFIG_LEON3 $CONFIG_LEON3 [list $notmod] 2
5068 global CONFIG_PROC_NUM
5069 if {($CONFIG_LEON3 == 1)} then {write_int $cfg $autocfg CONFIG_PROC_NUM $CONFIG_PROC_NUM $notmod }
5070 if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "Processor "}
5071 if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "Integer unit "}
5072 global CONFIG_IU_NWINDOWS
5073 if {($CONFIG_LEON3 == 1)} then {write_int $cfg $autocfg CONFIG_IU_NWINDOWS $CONFIG_IU_NWINDOWS $notmod }
5074 global CONFIG_IU_V8MULDIV
5075 if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_IU_V8MULDIV $CONFIG_IU_V8MULDIV [list $notmod] 2 }
5076 global tmpvar_3
5077 if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_V8MULDIV == 1)} then {
5078 if { $tmpvar_3 == "2-cycles" } then { write_tristate $cfg $autocfg CONFIG_IU_MUL_LATENCY_2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_IU_MUL_LATENCY_2 0 [list $notmod] 2 }
5079 if { $tmpvar_3 == "4-cycles" } then { write_tristate $cfg $autocfg CONFIG_IU_MUL_LATENCY_4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_IU_MUL_LATENCY_4 0 [list $notmod] 2 }
5080 if { $tmpvar_3 == "5-cycles" } then { write_tristate $cfg $autocfg CONFIG_IU_MUL_LATENCY_5 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_IU_MUL_LATENCY_5 0 [list $notmod] 2 }}
5081 global CONFIG_IU_MUL_MAC
5082 global CONFIG_IU_MUL_LATENCY_4
5083 global CONFIG_IU_MUL_LATENCY_5
5084 if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_V8MULDIV == 1) && ($CONFIG_IU_MUL_LATENCY_4 == 1 || $CONFIG_IU_MUL_LATENCY_5 == 1)} then {write_tristate $cfg $autocfg CONFIG_IU_MUL_MAC $CONFIG_IU_MUL_MAC [list $notmod] 2 }
5085 global tmpvar_4
5086 if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_V8MULDIV == 1)} then {
5087 if { $tmpvar_4 == "Inferred" } then { write_tristate $cfg $autocfg CONFIG_IU_MUL_INFERRED 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_IU_MUL_INFERRED 0 [list $notmod] 2 }
5088 if { $tmpvar_4 == "NTNU_Modgen" } then { write_tristate $cfg $autocfg CONFIG_IU_MUL_MODGEN 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_IU_MUL_MODGEN 0 [list $notmod] 2 }
5089 if { $tmpvar_4 == "TechSpec" } then { write_tristate $cfg $autocfg CONFIG_IU_MUL_TECHSPEC 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_IU_MUL_TECHSPEC 0 [list $notmod] 2 }
5090 if { $tmpvar_4 == "Designware" } then { write_tristate $cfg $autocfg CONFIG_IU_MUL_DW 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_IU_MUL_DW 0 [list $notmod] 2 }}
5091 global CONFIG_IU_BP
5092 if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_IU_BP $CONFIG_IU_BP [list $notmod] 2 }
5093 global CONFIG_IU_SVT
5094 if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_IU_SVT $CONFIG_IU_SVT [list $notmod] 2 }
5095 global CONFIG_NOTAG
5096 if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_NOTAG $CONFIG_NOTAG [list $notmod] 2 }
5097 global CONFIG_IU_LDELAY
5098 if {($CONFIG_LEON3 == 1)} then {write_int $cfg $autocfg CONFIG_IU_LDELAY $CONFIG_IU_LDELAY $notmod }
5099 global CONFIG_IU_WATCHPOINTS
5100 if {($CONFIG_LEON3 == 1)} then {write_int $cfg $autocfg CONFIG_IU_WATCHPOINTS $CONFIG_IU_WATCHPOINTS $notmod }
5101 global CONFIG_PWD
5102 if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_PWD $CONFIG_PWD [list $notmod] 2 }
5103 global CONFIG_IU_RSTADDR
5104 if {($CONFIG_LEON3 == 1)} then {write_hex $cfg $autocfg CONFIG_IU_RSTADDR $CONFIG_IU_RSTADDR $notmod }
5105 if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "Floating-point unit"}
5106 global CONFIG_FPU_ENABLE
5107 if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_FPU_ENABLE $CONFIG_FPU_ENABLE [list $notmod] 2 }
5108 global tmpvar_5
5109 if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1)} then {
5110 if { $tmpvar_5 == "GRFPU" } then { write_tristate $cfg $autocfg CONFIG_FPU_GRFPU 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_FPU_GRFPU 0 [list $notmod] 2 }
5111 if { $tmpvar_5 == "GRFPU-LITE" } then { write_tristate $cfg $autocfg CONFIG_FPU_GRFPULITE 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_FPU_GRFPULITE 0 [list $notmod] 2 }
5112 if { $tmpvar_5 == "Meiko" } then { write_tristate $cfg $autocfg CONFIG_FPU_MEIKO 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_FPU_MEIKO 0 [list $notmod] 2 }}
5113 global tmpvar_6
5114 global CONFIG_FPU_GRFPU
5115 if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1) && ($CONFIG_FPU_GRFPU == 1)} then {
5116 if { $tmpvar_6 == "Inferred" } then { write_tristate $cfg $autocfg CONFIG_FPU_GRFPU_INFMUL 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_FPU_GRFPU_INFMUL 0 [list $notmod] 2 }
5117 if { $tmpvar_6 == "DW" } then { write_tristate $cfg $autocfg CONFIG_FPU_GRFPU_DWMUL 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_FPU_GRFPU_DWMUL 0 [list $notmod] 2 }
5118 if { $tmpvar_6 == "ModGen" } then { write_tristate $cfg $autocfg CONFIG_FPU_GRFPU_MODGEN 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_FPU_GRFPU_MODGEN 0 [list $notmod] 2 }
5119 if { $tmpvar_6 == "TechSpec" } then { write_tristate $cfg $autocfg CONFIG_FPU_GRFPU_TECHSPEC 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_FPU_GRFPU_TECHSPEC 0 [list $notmod] 2 }}
5120 global CONFIG_FPU_GRFPU_SH
5121 if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1) && ($CONFIG_HAS_SHARED_GRFPU == 1 && $CONFIG_FPU_GRFPU == 1)} then {write_tristate $cfg $autocfg CONFIG_FPU_GRFPU_SH $CONFIG_FPU_GRFPU_SH [list $notmod] 2 }
5122 global tmpvar_7
5123 global CONFIG_FPU_GRFPULITE
5124 if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1) && ($CONFIG_FPU_GRFPULITE == 1)} then {
5125 if { $tmpvar_7 == "Simple" } then { write_tristate $cfg $autocfg CONFIG_FPU_GRFPC0 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_FPU_GRFPC0 0 [list $notmod] 2 }
5126 if { $tmpvar_7 == "Data-forwarding" } then { write_tristate $cfg $autocfg CONFIG_FPU_GRFPC1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_FPU_GRFPC1 0 [list $notmod] 2 }
5127 if { $tmpvar_7 == "Non-blocking" } then { write_tristate $cfg $autocfg CONFIG_FPU_GRFPC2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_FPU_GRFPC2 0 [list $notmod] 2 }}
5128 global CONFIG_FPU_NETLIST
5129 if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_FPU_NETLIST $CONFIG_FPU_NETLIST [list $notmod] 2 }
5130 if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "Cache system"}
5131 global CONFIG_ICACHE_ENABLE
5132 if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_ICACHE_ENABLE $CONFIG_ICACHE_ENABLE [list $notmod] 2 }
5133 global tmpvar_8
5134 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1)} then {
5135 if { $tmpvar_8 == "1" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_ASSO1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_ASSO1 0 [list $notmod] 2 }
5136 if { $tmpvar_8 == "2" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_ASSO2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_ASSO2 0 [list $notmod] 2 }
5137 if { $tmpvar_8 == "3" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_ASSO3 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_ASSO3 0 [list $notmod] 2 }
5138 if { $tmpvar_8 == "4" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_ASSO4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_ASSO4 0 [list $notmod] 2 }}
5139 global tmpvar_9
5140 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1)} then {
5141 if { $tmpvar_9 == "1" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ1 0 [list $notmod] 2 }
5142 if { $tmpvar_9 == "2" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ2 0 [list $notmod] 2 }
5143 if { $tmpvar_9 == "4" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ4 0 [list $notmod] 2 }
5144 if { $tmpvar_9 == "8" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ8 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ8 0 [list $notmod] 2 }
5145 if { $tmpvar_9 == "16" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ16 0 [list $notmod] 2 }
5146 if { $tmpvar_9 == "32" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ32 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ32 0 [list $notmod] 2 }
5147 if { $tmpvar_9 == "64" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ64 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ64 0 [list $notmod] 2 }
5148 if { $tmpvar_9 == "128" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ128 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ128 0 [list $notmod] 2 }
5149 if { $tmpvar_9 == "256" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ256 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_SZ256 0 [list $notmod] 2 }}
5150 global tmpvar_10
5151 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1)} then {
5152 if { $tmpvar_10 == "16" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_LZ16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_LZ16 0 [list $notmod] 2 }
5153 if { $tmpvar_10 == "32" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_LZ32 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_LZ32 0 [list $notmod] 2 }}
5154 global tmpvar_11
5155 global CONFIG_ICACHE_ASSO1
5156 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1) && ($CONFIG_ICACHE_ASSO1 != 1)} then {
5157 if { $tmpvar_11 == "Random" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_ALGORND 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_ALGORND 0 [list $notmod] 2 }
5158 if { $tmpvar_11 == "Direct" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_ALGODIR 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_ALGODIR 0 [list $notmod] 2 }
5159 if { $tmpvar_11 == "LRR" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_ALGOLRR 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_ALGOLRR 0 [list $notmod] 2 }
5160 if { $tmpvar_11 == "LRU" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_ALGOLRU 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_ALGOLRU 0 [list $notmod] 2 }}
5161 global CONFIG_ICACHE_LOCK
5162 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1) && ($CONFIG_ICACHE_ASSO1 != 1)} then {write_tristate $cfg $autocfg CONFIG_ICACHE_LOCK $CONFIG_ICACHE_LOCK [list $notmod] 2 }
5163 global CONFIG_ICACHE_LRAM
5164 global CONFIG_MMU_ENABLE
5165 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE != 1)} then {write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM $CONFIG_ICACHE_LRAM [list $notmod] 2 }
5166 global tmpvar_12
5167 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_LRAM == 1)} then {
5168 if { $tmpvar_12 == "1" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ1 0 [list $notmod] 2 }
5169 if { $tmpvar_12 == "2" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ2 0 [list $notmod] 2 }
5170 if { $tmpvar_12 == "4" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ4 0 [list $notmod] 2 }
5171 if { $tmpvar_12 == "8" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ8 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ8 0 [list $notmod] 2 }
5172 if { $tmpvar_12 == "16" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ16 0 [list $notmod] 2 }
5173 if { $tmpvar_12 == "32" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ32 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ32 0 [list $notmod] 2 }
5174 if { $tmpvar_12 == "64" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ64 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ64 0 [list $notmod] 2 }
5175 if { $tmpvar_12 == "128" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ128 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ128 0 [list $notmod] 2 }
5176 if { $tmpvar_12 == "256" } then { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ256 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM_SZ256 0 [list $notmod] 2 }}
5177 global CONFIG_ICACHE_LRSTART
5178 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_LRAM == 1)} then {write_hex $cfg $autocfg CONFIG_ICACHE_LRSTART $CONFIG_ICACHE_LRSTART $notmod }
5179 global CONFIG_DCACHE_ENABLE
5180 if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_DCACHE_ENABLE $CONFIG_DCACHE_ENABLE [list $notmod] 2 }
5181 global tmpvar_13
5182 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then {
5183 if { $tmpvar_13 == "1" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_ASSO1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_ASSO1 0 [list $notmod] 2 }
5184 if { $tmpvar_13 == "2" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_ASSO2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_ASSO2 0 [list $notmod] 2 }
5185 if { $tmpvar_13 == "3" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_ASSO3 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_ASSO3 0 [list $notmod] 2 }
5186 if { $tmpvar_13 == "4" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_ASSO4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_ASSO4 0 [list $notmod] 2 }}
5187 global tmpvar_14
5188 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then {
5189 if { $tmpvar_14 == "1" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ1 0 [list $notmod] 2 }
5190 if { $tmpvar_14 == "2" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ2 0 [list $notmod] 2 }
5191 if { $tmpvar_14 == "4" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ4 0 [list $notmod] 2 }
5192 if { $tmpvar_14 == "8" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ8 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ8 0 [list $notmod] 2 }
5193 if { $tmpvar_14 == "16" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ16 0 [list $notmod] 2 }
5194 if { $tmpvar_14 == "32" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ32 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ32 0 [list $notmod] 2 }
5195 if { $tmpvar_14 == "64" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ64 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ64 0 [list $notmod] 2 }
5196 if { $tmpvar_14 == "128" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ128 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ128 0 [list $notmod] 2 }
5197 if { $tmpvar_14 == "256" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ256 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_SZ256 0 [list $notmod] 2 }}
5198 global tmpvar_15
5199 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then {
5200 if { $tmpvar_15 == "16" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_LZ16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_LZ16 0 [list $notmod] 2 }
5201 if { $tmpvar_15 == "32" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_LZ32 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_LZ32 0 [list $notmod] 2 }}
5202 global tmpvar_16
5203 global CONFIG_DCACHE_ASSO1
5204 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_ASSO1 != 1)} then {
5205 if { $tmpvar_16 == "Random" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_ALGORND 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_ALGORND 0 [list $notmod] 2 }
5206 if { $tmpvar_16 == "Direct" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_ALGODIR 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_ALGODIR 0 [list $notmod] 2 }
5207 if { $tmpvar_16 == "LRR" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_ALGOLRR 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_ALGOLRR 0 [list $notmod] 2 }
5208 if { $tmpvar_16 == "LRU" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_ALGOLRU 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_ALGOLRU 0 [list $notmod] 2 }}
5209 global CONFIG_DCACHE_LOCK
5210 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_ASSO1 != 1)} then {write_tristate $cfg $autocfg CONFIG_DCACHE_LOCK $CONFIG_DCACHE_LOCK [list $notmod] 2 }
5211 global CONFIG_DCACHE_SNOOP
5212 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_DCACHE_SNOOP $CONFIG_DCACHE_SNOOP [list $notmod] 2 }
5213 global CONFIG_DCACHE_SNOOP_FAST
5214 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_SNOOP == 1)} then {write_tristate $cfg $autocfg CONFIG_DCACHE_SNOOP_FAST $CONFIG_DCACHE_SNOOP_FAST [list $notmod] 2 }
5215 global CONFIG_DCACHE_SNOOP_SEPTAG
5216 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_SNOOP == 1)} then {write_tristate $cfg $autocfg CONFIG_DCACHE_SNOOP_SEPTAG $CONFIG_DCACHE_SNOOP_SEPTAG [list $notmod] 2 }
5217 global CONFIG_CACHE_FIXED
5218 if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1 || $CONFIG_DCACHE_ENABLE == 1)} then {write_hex $cfg $autocfg CONFIG_CACHE_FIXED $CONFIG_CACHE_FIXED $notmod }
5219 global CONFIG_DCACHE_LRAM
5220 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE != 1)} then {write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM $CONFIG_DCACHE_LRAM [list $notmod] 2 }
5221 global tmpvar_17
5222 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_LRAM == 1)} then {
5223 if { $tmpvar_17 == "1" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ1 0 [list $notmod] 2 }
5224 if { $tmpvar_17 == "2" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ2 0 [list $notmod] 2 }
5225 if { $tmpvar_17 == "4" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ4 0 [list $notmod] 2 }
5226 if { $tmpvar_17 == "8" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ8 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ8 0 [list $notmod] 2 }
5227 if { $tmpvar_17 == "16" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ16 0 [list $notmod] 2 }
5228 if { $tmpvar_17 == "32" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ32 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ32 0 [list $notmod] 2 }
5229 if { $tmpvar_17 == "64" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ64 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ64 0 [list $notmod] 2 }
5230 if { $tmpvar_17 == "128" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ128 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ128 0 [list $notmod] 2 }
5231 if { $tmpvar_17 == "256" } then { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ256 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM_SZ256 0 [list $notmod] 2 }}
5232 global CONFIG_DCACHE_LRSTART
5233 if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_LRAM == 1)} then {write_hex $cfg $autocfg CONFIG_DCACHE_LRSTART $CONFIG_DCACHE_LRSTART $notmod }
5234 if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "MMU"}
5235 if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_MMU_ENABLE $CONFIG_MMU_ENABLE [list $notmod] 2 }
5236 global tmpvar_18
5237 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1)} then {
5238 if { $tmpvar_18 == "combined" } then { write_tristate $cfg $autocfg CONFIG_MMU_COMBINED 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_COMBINED 0 [list $notmod] 2 }
5239 if { $tmpvar_18 == "split" } then { write_tristate $cfg $autocfg CONFIG_MMU_SPLIT 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_SPLIT 0 [list $notmod] 2 }}
5240 global tmpvar_19
5241 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1)} then {
5242 if { $tmpvar_19 == "LRU" } then { write_tristate $cfg $autocfg CONFIG_MMU_REPARRAY 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_REPARRAY 0 [list $notmod] 2 }
5243 if { $tmpvar_19 == "Increment" } then { write_tristate $cfg $autocfg CONFIG_MMU_REPINCREMENT 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_REPINCREMENT 0 [list $notmod] 2 }}
5244 global tmpvar_20
5245 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1)} then {
5246 if { $tmpvar_20 == "2" } then { write_tristate $cfg $autocfg CONFIG_MMU_I2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_I2 0 [list $notmod] 2 }
5247 if { $tmpvar_20 == "4" } then { write_tristate $cfg $autocfg CONFIG_MMU_I4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_I4 0 [list $notmod] 2 }
5248 if { $tmpvar_20 == "8" } then { write_tristate $cfg $autocfg CONFIG_MMU_I8 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_I8 0 [list $notmod] 2 }
5249 if { $tmpvar_20 == "16" } then { write_tristate $cfg $autocfg CONFIG_MMU_I16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_I16 0 [list $notmod] 2 }
5250 if { $tmpvar_20 == "32" } then { write_tristate $cfg $autocfg CONFIG_MMU_I32 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_I32 0 [list $notmod] 2 }}
5251 global tmpvar_21
5252 global CONFIG_MMU_SPLIT
5253 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1) && ($CONFIG_MMU_SPLIT == 1)} then {
5254 if { $tmpvar_21 == "2" } then { write_tristate $cfg $autocfg CONFIG_MMU_D2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_D2 0 [list $notmod] 2 }
5255 if { $tmpvar_21 == "4" } then { write_tristate $cfg $autocfg CONFIG_MMU_D4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_D4 0 [list $notmod] 2 }
5256 if { $tmpvar_21 == "8" } then { write_tristate $cfg $autocfg CONFIG_MMU_D8 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_D8 0 [list $notmod] 2 }
5257 if { $tmpvar_21 == "16" } then { write_tristate $cfg $autocfg CONFIG_MMU_D16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_D16 0 [list $notmod] 2 }
5258 if { $tmpvar_21 == "32" } then { write_tristate $cfg $autocfg CONFIG_MMU_D32 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_D32 0 [list $notmod] 2 }}
5259 global CONFIG_MMU_FASTWB
5260 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1) && ($CONFIG_MMU_SPLIT == 1)} then {write_tristate $cfg $autocfg CONFIG_MMU_FASTWB $CONFIG_MMU_FASTWB [list $notmod] 2 }
5261 global tmpvar_22
5262 if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1)} then {
5263 if { $tmpvar_22 == "4K" } then { write_tristate $cfg $autocfg CONFIG_MMU_PAGE_4K 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_PAGE_4K 0 [list $notmod] 2 }
5264 if { $tmpvar_22 == "8K" } then { write_tristate $cfg $autocfg CONFIG_MMU_PAGE_8K 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_PAGE_8K 0 [list $notmod] 2 }
5265 if { $tmpvar_22 == "16K" } then { write_tristate $cfg $autocfg CONFIG_MMU_PAGE_16K 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_PAGE_16K 0 [list $notmod] 2 }
5266 if { $tmpvar_22 == "32K" } then { write_tristate $cfg $autocfg CONFIG_MMU_PAGE_32K 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_PAGE_32K 0 [list $notmod] 2 }
5267 if { $tmpvar_22 == "Programmable" } then { write_tristate $cfg $autocfg CONFIG_MMU_PAGE_PROG 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_MMU_PAGE_PROG 0 [list $notmod] 2 }}
5268 if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "Debug Support Unit "}
5269 global CONFIG_DSU_ENABLE
5270 if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_DSU_ENABLE $CONFIG_DSU_ENABLE [list $notmod] 2 }
5271 global CONFIG_DSU_ITRACE
5272 if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_DSU_ITRACE $CONFIG_DSU_ITRACE [list $notmod] 2 }
5273 global tmpvar_23
5274 if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1) && ($CONFIG_DSU_ITRACE == 1)} then {
5275 if { $tmpvar_23 == "1" } then { write_tristate $cfg $autocfg CONFIG_DSU_ITRACESZ1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ITRACESZ1 0 [list $notmod] 2 }
5276 if { $tmpvar_23 == "2" } then { write_tristate $cfg $autocfg CONFIG_DSU_ITRACESZ2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ITRACESZ2 0 [list $notmod] 2 }
5277 if { $tmpvar_23 == "4" } then { write_tristate $cfg $autocfg CONFIG_DSU_ITRACESZ4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ITRACESZ4 0 [list $notmod] 2 }
5278 if { $tmpvar_23 == "8" } then { write_tristate $cfg $autocfg CONFIG_DSU_ITRACESZ8 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ITRACESZ8 0 [list $notmod] 2 }
5279 if { $tmpvar_23 == "16" } then { write_tristate $cfg $autocfg CONFIG_DSU_ITRACESZ16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ITRACESZ16 0 [list $notmod] 2 }}
5280 global CONFIG_DSU_ATRACE
5281 if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_DSU_ATRACE $CONFIG_DSU_ATRACE [list $notmod] 2 }
5282 global tmpvar_24
5283 if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1) && ($CONFIG_DSU_ATRACE == 1)} then {
5284 if { $tmpvar_24 == "1" } then { write_tristate $cfg $autocfg CONFIG_DSU_ATRACESZ1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ATRACESZ1 0 [list $notmod] 2 }
5285 if { $tmpvar_24 == "2" } then { write_tristate $cfg $autocfg CONFIG_DSU_ATRACESZ2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ATRACESZ2 0 [list $notmod] 2 }
5286 if { $tmpvar_24 == "4" } then { write_tristate $cfg $autocfg CONFIG_DSU_ATRACESZ4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ATRACESZ4 0 [list $notmod] 2 }
5287 if { $tmpvar_24 == "8" } then { write_tristate $cfg $autocfg CONFIG_DSU_ATRACESZ8 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ATRACESZ8 0 [list $notmod] 2 }
5288 if { $tmpvar_24 == "16" } then { write_tristate $cfg $autocfg CONFIG_DSU_ATRACESZ16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ATRACESZ16 0 [list $notmod] 2 }}
5289 if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "Fault-tolerance "}
5290 global CONFIG_LEON3FT_EN
5291 if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_LEON3FT_EN $CONFIG_LEON3FT_EN [list $notmod] 2 }
5292 global tmpvar_25
5293 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {
5294 if { $tmpvar_25 == "None" } then { write_tristate $cfg $autocfg CONFIG_IUFT_NONE 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_IUFT_NONE 0 [list $notmod] 2 }
5295 if { $tmpvar_25 == "Parity" } then { write_tristate $cfg $autocfg CONFIG_IUFT_PAR 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_IUFT_PAR 0 [list $notmod] 2 }
5296 if { $tmpvar_25 == "PDMR" } then { write_tristate $cfg $autocfg CONFIG_IUFT_DMR 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_IUFT_DMR 0 [list $notmod] 2 }
5297 if { $tmpvar_25 == "BCH" } then { write_tristate $cfg $autocfg CONFIG_IUFT_BCH 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_IUFT_BCH 0 [list $notmod] 2 }
5298 if { $tmpvar_25 == "TMR" } then { write_tristate $cfg $autocfg CONFIG_IUFT_TMR 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_IUFT_TMR 0 [list $notmod] 2 }}
5299 global CONFIG_FPUFT_EN
5300 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1) && ($CONFIG_FPU_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_FPUFT_EN $CONFIG_FPUFT_EN [list $notmod] 2 }
5301 global CONFIG_RF_ERRINJ
5302 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {write_tristate $cfg $autocfg CONFIG_RF_ERRINJ $CONFIG_RF_ERRINJ [list $notmod] 2 }
5303 global CONFIG_CACHE_FT_EN
5304 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {write_tristate $cfg $autocfg CONFIG_CACHE_FT_EN $CONFIG_CACHE_FT_EN [list $notmod] 2 }
5305 global CONFIG_CACHE_ERRINJ
5306 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {write_int $cfg $autocfg CONFIG_CACHE_ERRINJ $CONFIG_CACHE_ERRINJ $notmod }
5307 global CONFIG_LEON3_NETLIST
5308 if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {write_tristate $cfg $autocfg CONFIG_LEON3_NETLIST $CONFIG_LEON3_NETLIST [list $notmod] 2 }
5309 if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "VHDL debug settings "}
5310 global CONFIG_IU_DISAS
5311 if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_IU_DISAS $CONFIG_IU_DISAS [list $notmod] 2 }
5312 global CONFIG_IU_DISAS_NET
5313 if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_DISAS == 1)} then {write_tristate $cfg $autocfg CONFIG_IU_DISAS_NET $CONFIG_IU_DISAS_NET [list $notmod] 2 }
5314 global CONFIG_DEBUG_PC32
5315 if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_DEBUG_PC32 $CONFIG_DEBUG_PC32 [list $notmod] 2 }
5316 write_comment $cfg $autocfg "AMBA configuration"
5317 global CONFIG_AHB_DEFMST
5318 write_int $cfg $autocfg CONFIG_AHB_DEFMST $CONFIG_AHB_DEFMST $notmod
5319 global CONFIG_AHB_RROBIN
5320 write_tristate $cfg $autocfg CONFIG_AHB_RROBIN $CONFIG_AHB_RROBIN [list $notmod] 2
5321 global CONFIG_AHB_SPLIT
5322 write_tristate $cfg $autocfg CONFIG_AHB_SPLIT $CONFIG_AHB_SPLIT [list $notmod] 2
5323 global CONFIG_AHB_IOADDR
5324 write_hex $cfg $autocfg CONFIG_AHB_IOADDR $CONFIG_AHB_IOADDR $notmod
5325 global CONFIG_APB_HADDR
5326 write_hex $cfg $autocfg CONFIG_APB_HADDR $CONFIG_APB_HADDR $notmod
5327 global CONFIG_AHB_MON
5328 write_tristate $cfg $autocfg CONFIG_AHB_MON $CONFIG_AHB_MON [list $notmod] 2
5329 global CONFIG_AHB_MONERR
5330 if {($CONFIG_AHB_MON == 1)} then {write_tristate $cfg $autocfg CONFIG_AHB_MONERR $CONFIG_AHB_MONERR [list $notmod] 2 }
5331 global CONFIG_AHB_MONWAR
5332 if {($CONFIG_AHB_MON == 1)} then {write_tristate $cfg $autocfg CONFIG_AHB_MONWAR $CONFIG_AHB_MONWAR [list $notmod] 2 }
5333 global CONFIG_AHB_DTRACE
5334 write_tristate $cfg $autocfg CONFIG_AHB_DTRACE $CONFIG_AHB_DTRACE [list $notmod] 2
5335 write_comment $cfg $autocfg "Debug Link "
5336 global CONFIG_DSU_JTAG
5337 write_tristate $cfg $autocfg CONFIG_DSU_JTAG $CONFIG_DSU_JTAG [list $notmod] 2
5338 global CONFIG_DSU_ETH
5339 global CONFIG_GRETH_ENABLE
5340 if {($CONFIG_GRETH_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_DSU_ETH $CONFIG_DSU_ETH [list $notmod] 2 }
5341 global tmpvar_26
5342 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {
5343 if { $tmpvar_26 == "1" } then { write_tristate $cfg $autocfg CONFIG_DSU_ETHSZ1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ETHSZ1 0 [list $notmod] 2 }
5344 if { $tmpvar_26 == "2" } then { write_tristate $cfg $autocfg CONFIG_DSU_ETHSZ2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ETHSZ2 0 [list $notmod] 2 }
5345 if { $tmpvar_26 == "4" } then { write_tristate $cfg $autocfg CONFIG_DSU_ETHSZ4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ETHSZ4 0 [list $notmod] 2 }
5346 if { $tmpvar_26 == "8" } then { write_tristate $cfg $autocfg CONFIG_DSU_ETHSZ8 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ETHSZ8 0 [list $notmod] 2 }
5347 if { $tmpvar_26 == "16" } then { write_tristate $cfg $autocfg CONFIG_DSU_ETHSZ16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_DSU_ETHSZ16 0 [list $notmod] 2 }}
5348 global CONFIG_DSU_IPMSB
5349 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {write_hex $cfg $autocfg CONFIG_DSU_IPMSB $CONFIG_DSU_IPMSB $notmod }
5350 global CONFIG_DSU_IPLSB
5351 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {write_hex $cfg $autocfg CONFIG_DSU_IPLSB $CONFIG_DSU_IPLSB $notmod }
5352 global CONFIG_DSU_ETHMSB
5353 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {write_hex $cfg $autocfg CONFIG_DSU_ETHMSB $CONFIG_DSU_ETHMSB $notmod }
5354 global CONFIG_DSU_ETHLSB
5355 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {write_hex $cfg $autocfg CONFIG_DSU_ETHLSB $CONFIG_DSU_ETHLSB $notmod }
5356 global CONFIG_DSU_ETH_PROG
5357 global CONFIG_GRETH_GIGA
5358 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1) && ($CONFIG_GRETH_GIGA == 0)} then {write_tristate $cfg $autocfg CONFIG_DSU_ETH_PROG $CONFIG_DSU_ETH_PROG [list $notmod] 2 }
5359 global CONFIG_DSU_ETH_DIS
5360 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1) && ($CONFIG_GRETH_GIGA == 0)} then {write_tristate $cfg $autocfg CONFIG_DSU_ETH_DIS $CONFIG_DSU_ETH_DIS [list $notmod] 2 }
5361 write_comment $cfg $autocfg "Peripherals "
5362 write_comment $cfg $autocfg "Memory controller "
5363 write_comment $cfg $autocfg "Leon2 memory controller "
5364 global CONFIG_MCTRL_LEON2
5365 write_tristate $cfg $autocfg CONFIG_MCTRL_LEON2 $CONFIG_MCTRL_LEON2 [list $notmod] 2
5366 global CONFIG_MCTRL_8BIT
5367 if {($CONFIG_MCTRL_LEON2 == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_8BIT $CONFIG_MCTRL_8BIT [list $notmod] 2 }
5368 global CONFIG_MCTRL_16BIT
5369 if {($CONFIG_MCTRL_LEON2 == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_16BIT $CONFIG_MCTRL_16BIT [list $notmod] 2 }
5370 global CONFIG_MCTRL_5CS
5371 if {($CONFIG_MCTRL_LEON2 == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_5CS $CONFIG_MCTRL_5CS [list $notmod] 2 }
5372 global CONFIG_MCTRL_SDRAM
5373 if {($CONFIG_MCTRL_LEON2 == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_SDRAM $CONFIG_MCTRL_SDRAM [list $notmod] 2 }
5374 global CONFIG_MCTRL_SDRAM_SEPBUS
5375 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_SDRAM_SEPBUS $CONFIG_MCTRL_SDRAM_SEPBUS [list $notmod] 2 }
5376 global CONFIG_MCTRL_SDRAM_BUS64
5377 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_SDRAM_SEPBUS == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_SDRAM_BUS64 $CONFIG_MCTRL_SDRAM_BUS64 [list $notmod] 2 }
5378 global CONFIG_MCTRL_SDRAM_INVCLK
5379 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_SDRAM_SEPBUS == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_SDRAM_INVCLK $CONFIG_MCTRL_SDRAM_INVCLK [list $notmod] 2 }
5380 global CONFIG_MCTRL_PAGE
5381 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_PAGE $CONFIG_MCTRL_PAGE [list $notmod] 2 }
5382 global CONFIG_MCTRL_PROGPAGE
5383 if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_PAGE == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_PROGPAGE $CONFIG_MCTRL_PROGPAGE [list $notmod] 2 }
5384 write_comment $cfg $autocfg "MIG memory controller "
5385 global CONFIG_MIG_DDR2
5386 write_tristate $cfg $autocfg CONFIG_MIG_DDR2 $CONFIG_MIG_DDR2 [list $notmod] 2
5387 global CONFIG_MIG_RANKS
5388 if {($CONFIG_MIG_DDR2 == 1)} then {write_int $cfg $autocfg CONFIG_MIG_RANKS $CONFIG_MIG_RANKS $notmod }
5389 global CONFIG_MIG_COLBITS
5390 if {($CONFIG_MIG_DDR2 == 1)} then {write_int $cfg $autocfg CONFIG_MIG_COLBITS $CONFIG_MIG_COLBITS $notmod }
5391 global CONFIG_MIG_ROWBITS
5392 if {($CONFIG_MIG_DDR2 == 1)} then {write_int $cfg $autocfg CONFIG_MIG_ROWBITS $CONFIG_MIG_ROWBITS $notmod }
5393 global CONFIG_MIG_BANKBITS
5394 if {($CONFIG_MIG_DDR2 == 1)} then {write_int $cfg $autocfg CONFIG_MIG_BANKBITS $CONFIG_MIG_BANKBITS $notmod }
5395 global CONFIG_MIG_HMASK
5396 if {($CONFIG_MIG_DDR2 == 1)} then {write_hex $cfg $autocfg CONFIG_MIG_HMASK $CONFIG_MIG_HMASK $notmod }
5397 global CONFIG_AHBSTAT_ENABLE
5398 write_tristate $cfg $autocfg CONFIG_AHBSTAT_ENABLE $CONFIG_AHBSTAT_ENABLE [list $notmod] 2
5399 global CONFIG_AHBSTAT_NFTSLV
5400 if {($CONFIG_AHBSTAT_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_AHBSTAT_NFTSLV $CONFIG_AHBSTAT_NFTSLV $notmod }
5401 write_comment $cfg $autocfg "On-chip RAM/ROM "
5402 global CONFIG_AHBROM_ENABLE
5403 write_tristate $cfg $autocfg CONFIG_AHBROM_ENABLE $CONFIG_AHBROM_ENABLE [list $notmod] 2
5404 global CONFIG_AHBROM_START
5405 if {($CONFIG_AHBROM_ENABLE == 1)} then {write_hex $cfg $autocfg CONFIG_AHBROM_START $CONFIG_AHBROM_START $notmod }
5406 global CONFIG_AHBROM_PIPE
5407 if {($CONFIG_AHBROM_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_AHBROM_PIPE $CONFIG_AHBROM_PIPE [list $notmod] 2 }
5408 global CONFIG_AHBRAM_ENABLE
5409 write_tristate $cfg $autocfg CONFIG_AHBRAM_ENABLE $CONFIG_AHBRAM_ENABLE [list $notmod] 2
5410 global tmpvar_27
5411 if {($CONFIG_AHBRAM_ENABLE == 1)} then {
5412 if { $tmpvar_27 == "1" } then { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ1 0 [list $notmod] 2 }
5413 if { $tmpvar_27 == "2" } then { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ2 0 [list $notmod] 2 }
5414 if { $tmpvar_27 == "4" } then { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ4 0 [list $notmod] 2 }
5415 if { $tmpvar_27 == "8" } then { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ8 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ8 0 [list $notmod] 2 }
5416 if { $tmpvar_27 == "16" } then { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ16 0 [list $notmod] 2 }
5417 if { $tmpvar_27 == "32" } then { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ32 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ32 0 [list $notmod] 2 }
5418 if { $tmpvar_27 == "64" } then { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ64 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_AHBRAM_SZ64 0 [list $notmod] 2 }}
5419 global CONFIG_AHBRAM_START
5420 if {($CONFIG_AHBRAM_ENABLE == 1)} then {write_hex $cfg $autocfg CONFIG_AHBRAM_START $CONFIG_AHBRAM_START $notmod }
5421 write_comment $cfg $autocfg "Ethernet "
5422 write_tristate $cfg $autocfg CONFIG_GRETH_ENABLE $CONFIG_GRETH_ENABLE [list $notmod] 2
5423 if {($CONFIG_GRETH_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_GRETH_GIGA $CONFIG_GRETH_GIGA [list $notmod] 2 }
5424 global tmpvar_28
5425 if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_GRETH_GIGA == 0)} then {
5426 if { $tmpvar_28 == "4" } then { write_tristate $cfg $autocfg CONFIG_GRETH_FIFO4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_GRETH_FIFO4 0 [list $notmod] 2 }
5427 if { $tmpvar_28 == "8" } then { write_tristate $cfg $autocfg CONFIG_GRETH_FIFO8 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_GRETH_FIFO8 0 [list $notmod] 2 }
5428 if { $tmpvar_28 == "16" } then { write_tristate $cfg $autocfg CONFIG_GRETH_FIFO16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_GRETH_FIFO16 0 [list $notmod] 2 }
5429 if { $tmpvar_28 == "32" } then { write_tristate $cfg $autocfg CONFIG_GRETH_FIFO32 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_GRETH_FIFO32 0 [list $notmod] 2 }
5430 if { $tmpvar_28 == "64" } then { write_tristate $cfg $autocfg CONFIG_GRETH_FIFO64 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_GRETH_FIFO64 0 [list $notmod] 2 }}
5431 write_comment $cfg $autocfg "UART, timer, I/O port and interrupt controller"
5432 global CONFIG_UART1_ENABLE
5433 write_tristate $cfg $autocfg CONFIG_UART1_ENABLE $CONFIG_UART1_ENABLE [list $notmod] 2
5434 global tmpvar_29
5435 if {($CONFIG_UART1_ENABLE == 1)} then {
5436 if { $tmpvar_29 == "1" } then { write_tristate $cfg $autocfg CONFIG_UA1_FIFO1 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_UA1_FIFO1 0 [list $notmod] 2 }
5437 if { $tmpvar_29 == "2" } then { write_tristate $cfg $autocfg CONFIG_UA1_FIFO2 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_UA1_FIFO2 0 [list $notmod] 2 }
5438 if { $tmpvar_29 == "4" } then { write_tristate $cfg $autocfg CONFIG_UA1_FIFO4 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_UA1_FIFO4 0 [list $notmod] 2 }
5439 if { $tmpvar_29 == "8" } then { write_tristate $cfg $autocfg CONFIG_UA1_FIFO8 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_UA1_FIFO8 0 [list $notmod] 2 }
5440 if { $tmpvar_29 == "16" } then { write_tristate $cfg $autocfg CONFIG_UA1_FIFO16 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_UA1_FIFO16 0 [list $notmod] 2 }
5441 if { $tmpvar_29 == "32" } then { write_tristate $cfg $autocfg CONFIG_UA1_FIFO32 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_UA1_FIFO32 0 [list $notmod] 2 }}
5442 global CONFIG_IRQ3_ENABLE
5443 write_tristate $cfg $autocfg CONFIG_IRQ3_ENABLE $CONFIG_IRQ3_ENABLE [list $notmod] 2
5444 global CONFIG_IRQ3_SEC
5445 if {($CONFIG_IRQ3_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_IRQ3_SEC $CONFIG_IRQ3_SEC [list $notmod] 2 }
5446 global CONFIG_IRQ3_NSEC
5447 if {($CONFIG_IRQ3_ENABLE == 1) && ($CONFIG_IRQ3_SEC == 1)} then {write_int $cfg $autocfg CONFIG_IRQ3_NSEC $CONFIG_IRQ3_NSEC $notmod }
5448 global CONFIG_GPT_ENABLE
5449 write_tristate $cfg $autocfg CONFIG_GPT_ENABLE $CONFIG_GPT_ENABLE [list $notmod] 2
5450 global CONFIG_GPT_NTIM
5451 if {($CONFIG_GPT_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_GPT_NTIM $CONFIG_GPT_NTIM $notmod }
5452 global CONFIG_GPT_SW
5453 if {($CONFIG_GPT_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_GPT_SW $CONFIG_GPT_SW $notmod }
5454 global CONFIG_GPT_TW
5455 if {($CONFIG_GPT_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_GPT_TW $CONFIG_GPT_TW $notmod }
5456 global CONFIG_GPT_IRQ
5457 if {($CONFIG_GPT_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_GPT_IRQ $CONFIG_GPT_IRQ $notmod }
5458 global CONFIG_GPT_SEPIRQ
5459 if {($CONFIG_GPT_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_GPT_SEPIRQ $CONFIG_GPT_SEPIRQ [list $notmod] 2 }
5460 global CONFIG_GPT_WDOGEN
5461 if {($CONFIG_GPT_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_GPT_WDOGEN $CONFIG_GPT_WDOGEN [list $notmod] 2 }
5462 global CONFIG_GPT_WDOG
5463 if {($CONFIG_GPT_ENABLE == 1) && ($CONFIG_GPT_WDOGEN == 1)} then {write_hex $cfg $autocfg CONFIG_GPT_WDOG $CONFIG_GPT_WDOG $notmod }
5464 global CONFIG_GRGPIO_ENABLE
5465 write_tristate $cfg $autocfg CONFIG_GRGPIO_ENABLE $CONFIG_GRGPIO_ENABLE [list $notmod] 2
5466 global CONFIG_GRGPIO_WIDTH
5467 if {($CONFIG_GRGPIO_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_GRGPIO_WIDTH $CONFIG_GRGPIO_WIDTH $notmod }
5468 global CONFIG_GRGPIO_IMASK
5469 if {($CONFIG_GRGPIO_ENABLE == 1)} then {write_hex $cfg $autocfg CONFIG_GRGPIO_IMASK $CONFIG_GRGPIO_IMASK $notmod }
5470 write_comment $cfg $autocfg "Keybord and VGA interface"
5471 global CONFIG_KBD_ENABLE
5472 write_tristate $cfg $autocfg CONFIG_KBD_ENABLE $CONFIG_KBD_ENABLE [list $notmod] 2
5473 global CONFIG_VGA_ENABLE
5474 write_tristate $cfg $autocfg CONFIG_VGA_ENABLE $CONFIG_VGA_ENABLE [list $notmod] 2
5475 global CONFIG_SVGA_ENABLE
5476 if {($CONFIG_VGA_ENABLE == 0)} then {write_tristate $cfg $autocfg CONFIG_SVGA_ENABLE $CONFIG_SVGA_ENABLE [list $notmod] 2 }
5477 write_comment $cfg $autocfg "SPI"
5478 write_comment $cfg $autocfg "SPI memory controller "
5479 global CONFIG_SPIMCTRL
5480 write_tristate $cfg $autocfg CONFIG_SPIMCTRL $CONFIG_SPIMCTRL [list $notmod] 2
5481 global CONFIG_SPIMCTRL_SDCARD
5482 if {($CONFIG_SPIMCTRL == 1)} then {write_tristate $cfg $autocfg CONFIG_SPIMCTRL_SDCARD $CONFIG_SPIMCTRL_SDCARD [list $notmod] 2 }
5483 global CONFIG_SPIMCTRL_READCMD
5484 if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then {write_hex $cfg $autocfg CONFIG_SPIMCTRL_READCMD $CONFIG_SPIMCTRL_READCMD $notmod }
5485 global CONFIG_SPIMCTRL_DUMMYBYTE
5486 if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then {write_tristate $cfg $autocfg CONFIG_SPIMCTRL_DUMMYBYTE $CONFIG_SPIMCTRL_DUMMYBYTE [list $notmod] 2 }
5487 global CONFIG_SPIMCTRL_DUALOUTPUT
5488 if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then {write_tristate $cfg $autocfg CONFIG_SPIMCTRL_DUALOUTPUT $CONFIG_SPIMCTRL_DUALOUTPUT [list $notmod] 2 }
5489 global CONFIG_SPIMCTRL_SCALER
5490 if {($CONFIG_SPIMCTRL == 1)} then {write_int $cfg $autocfg CONFIG_SPIMCTRL_SCALER $CONFIG_SPIMCTRL_SCALER $notmod }
5491 global CONFIG_SPIMCTRL_ASCALER
5492 if {($CONFIG_SPIMCTRL == 1)} then {write_int $cfg $autocfg CONFIG_SPIMCTRL_ASCALER $CONFIG_SPIMCTRL_ASCALER $notmod }
5493 global CONFIG_SPIMCTRL_PWRUPCNT
5494 if {($CONFIG_SPIMCTRL == 1)} then {write_int $cfg $autocfg CONFIG_SPIMCTRL_PWRUPCNT $CONFIG_SPIMCTRL_PWRUPCNT $notmod }
5495 write_comment $cfg $autocfg "SPI controller(s) "
5496 global CONFIG_SPICTRL_ENABLE
5497 write_tristate $cfg $autocfg CONFIG_SPICTRL_ENABLE $CONFIG_SPICTRL_ENABLE [list $notmod] 2
5498 global CONFIG_SPICTRL_NUM
5499 if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_SPICTRL_NUM $CONFIG_SPICTRL_NUM $notmod }
5500 global CONFIG_SPICTRL_SLVS
5501 if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_SPICTRL_SLVS $CONFIG_SPICTRL_SLVS $notmod }
5502 global CONFIG_SPICTRL_FIFO
5503 if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_SPICTRL_FIFO $CONFIG_SPICTRL_FIFO $notmod }
5504 global CONFIG_SPICTRL_SLVREG
5505 if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_SPICTRL_SLVREG $CONFIG_SPICTRL_SLVREG [list $notmod] 2 }
5506 global CONFIG_SPICTRL_ASEL
5507 if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_SPICTRL_ASEL $CONFIG_SPICTRL_ASEL [list $notmod] 2 }
5508 global CONFIG_SPICTRL_AM
5509 if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_SPICTRL_AM $CONFIG_SPICTRL_AM [list $notmod] 2 }
5510 global CONFIG_SPICTRL_ODMODE
5511 if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_SPICTRL_ODMODE $CONFIG_SPICTRL_ODMODE [list $notmod] 2 }
5512 global CONFIG_SPICTRL_TWEN
5513 if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_SPICTRL_TWEN $CONFIG_SPICTRL_TWEN [list $notmod] 2 }
5514 global CONFIG_SPICTRL_MAXWLEN
5515 if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_SPICTRL_MAXWLEN $CONFIG_SPICTRL_MAXWLEN $notmod }
5516 global CONFIG_SPICTRL_SYNCRAM
5517 if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_SPICTRL_SYNCRAM $CONFIG_SPICTRL_SYNCRAM [list $notmod] 2 }
5518 global tmpvar_30
5519 if {($CONFIG_SPICTRL_ENABLE == 1) && ($CONFIG_SPICTRL_SYNCRAM == 1)} then {
5520 if { $tmpvar_30 == "None" } then { write_tristate $cfg $autocfg CONFIG_SPICTRL_NOFT 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SPICTRL_NOFT 0 [list $notmod] 2 }
5521 if { $tmpvar_30 == "Parity-DMR" } then { write_tristate $cfg $autocfg CONFIG_SPICTRL_DMRFT 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SPICTRL_DMRFT 0 [list $notmod] 2 }
5522 if { $tmpvar_30 == "TMR" } then { write_tristate $cfg $autocfg CONFIG_SPICTRL_TMRFT 1 [list $notmod] 2 } else { write_tristate $cfg $autocfg CONFIG_SPICTRL_TMRFT 0 [list $notmod] 2 }}
5523 write_comment $cfg $autocfg "VHDL Debugging "
5524 global CONFIG_DEBUG_UART
5525 write_tristate $cfg $autocfg CONFIG_DEBUG_UART $CONFIG_DEBUG_UART [list $notmod] 2
5526 close $cfg
5527 close $autocfg
5528 }
5529
5530
5531 proc clear_choices { } {
5532 global CONFIG_SYN_INFERRED; set CONFIG_SYN_INFERRED 0
5533 global CONFIG_SYN_STRATIX; set CONFIG_SYN_STRATIX 0
5534 global CONFIG_SYN_STRATIXII; set CONFIG_SYN_STRATIXII 0
5535 global CONFIG_SYN_STRATIXIII; set CONFIG_SYN_STRATIXIII 0
5536 global CONFIG_SYN_CYCLONEIII; set CONFIG_SYN_CYCLONEIII 0
5537 global CONFIG_SYN_ALTERA; set CONFIG_SYN_ALTERA 0
5538 global CONFIG_SYN_AXCEL; set CONFIG_SYN_AXCEL 0
5539 global CONFIG_SYN_AXDSP; set CONFIG_SYN_AXDSP 0
5540 global CONFIG_SYN_PROASIC; set CONFIG_SYN_PROASIC 0
5541 global CONFIG_SYN_PROASICPLUS; set CONFIG_SYN_PROASICPLUS 0
5542 global CONFIG_SYN_PROASIC3; set CONFIG_SYN_PROASIC3 0
5543 global CONFIG_SYN_PROASIC3E; set CONFIG_SYN_PROASIC3E 0
5544 global CONFIG_SYN_PROASIC3L; set CONFIG_SYN_PROASIC3L 0
5545 global CONFIG_SYN_IGLOO; set CONFIG_SYN_IGLOO 0
5546 global CONFIG_SYN_FUSION; set CONFIG_SYN_FUSION 0
5547 global CONFIG_SYN_UT025CRH; set CONFIG_SYN_UT025CRH 0
5548 global CONFIG_SYN_UT130HBD; set CONFIG_SYN_UT130HBD 0
5549 global CONFIG_SYN_UT90NHBD; set CONFIG_SYN_UT90NHBD 0
5550 global CONFIG_SYN_ATC18; set CONFIG_SYN_ATC18 0
5551 global CONFIG_SYN_ATC18RHA; set CONFIG_SYN_ATC18RHA 0
5552 global CONFIG_SYN_CMOS9SF; set CONFIG_SYN_CMOS9SF 0
5553 global CONFIG_SYN_CUSTOM1; set CONFIG_SYN_CUSTOM1 0
5554 global CONFIG_SYN_EASIC90; set CONFIG_SYN_EASIC90 0
5555 global CONFIG_SYN_EASIC45; set CONFIG_SYN_EASIC45 0
5556 global CONFIG_SYN_IHP25; set CONFIG_SYN_IHP25 0
5557 global CONFIG_SYN_IHP25RH; set CONFIG_SYN_IHP25RH 0
5558 global CONFIG_SYN_LATTICE; set CONFIG_SYN_LATTICE 0
5559 global CONFIG_SYN_ECLIPSE; set CONFIG_SYN_ECLIPSE 0
5560 global CONFIG_SYN_PEREGRINE; set CONFIG_SYN_PEREGRINE 0
5561 global CONFIG_SYN_RH_LIB18T; set CONFIG_SYN_RH_LIB18T 0
5562 global CONFIG_SYN_RHUMC; set CONFIG_SYN_RHUMC 0
5563 global CONFIG_SYN_SMIC13; set CONFIG_SYN_SMIC13 0
5564 global CONFIG_SYN_TM65GPLUS; set CONFIG_SYN_TM65GPLUS 0
5565 global CONFIG_SYN_TSMC90; set CONFIG_SYN_TSMC90 0
5566 global CONFIG_SYN_UMC; set CONFIG_SYN_UMC 0
5567 global CONFIG_SYN_SPARTAN2; set CONFIG_SYN_SPARTAN2 0
5568 global CONFIG_SYN_SPARTAN3; set CONFIG_SYN_SPARTAN3 0
5569 global CONFIG_SYN_SPARTAN3E; set CONFIG_SYN_SPARTAN3E 0
5570 global CONFIG_SYN_SPARTAN6; set CONFIG_SYN_SPARTAN6 0
5571 global CONFIG_SYN_VIRTEX; set CONFIG_SYN_VIRTEX 0
5572 global CONFIG_SYN_VIRTEXE; set CONFIG_SYN_VIRTEXE 0
5573 global CONFIG_SYN_VIRTEX2; set CONFIG_SYN_VIRTEX2 0
5574 global CONFIG_SYN_VIRTEX4; set CONFIG_SYN_VIRTEX4 0
5575 global CONFIG_SYN_VIRTEX5; set CONFIG_SYN_VIRTEX5 0
5576 global CONFIG_SYN_VIRTEX6; set CONFIG_SYN_VIRTEX6 0
5577 global CONFIG_MEM_INFERRED; set CONFIG_MEM_INFERRED 0
5578 global CONFIG_MEM_UMC; set CONFIG_MEM_UMC 0
5579 global CONFIG_MEM_RHUMC; set CONFIG_MEM_RHUMC 0
5580 global CONFIG_MEM_ARTISAN; set CONFIG_MEM_ARTISAN 0
5581 global CONFIG_MEM_CUSTOM1; set CONFIG_MEM_CUSTOM1 0
5582 global CONFIG_MEM_VIRAGE; set CONFIG_MEM_VIRAGE 0
5583 global CONFIG_MEM_VIRAGE90; set CONFIG_MEM_VIRAGE90 0
5584 global CONFIG_CLK_INFERRED; set CONFIG_CLK_INFERRED 0
5585 global CONFIG_CLK_HCLKBUF; set CONFIG_CLK_HCLKBUF 0
5586 global CONFIG_CLK_UT130HBD; set CONFIG_CLK_UT130HBD 0
5587 global CONFIG_CLK_ALTDLL; set CONFIG_CLK_ALTDLL 0
5588 global CONFIG_CLK_LATDLL; set CONFIG_CLK_LATDLL 0
5589 global CONFIG_CLK_PRO3PLL; set CONFIG_CLK_PRO3PLL 0
5590 global CONFIG_CLK_PRO3EPLL; set CONFIG_CLK_PRO3EPLL 0
5591 global CONFIG_CLK_PRO3LPLL; set CONFIG_CLK_PRO3LPLL 0
5592 global CONFIG_CLK_FUSPLL; set CONFIG_CLK_FUSPLL 0
5593 global CONFIG_CLK_LIB18T; set CONFIG_CLK_LIB18T 0
5594 global CONFIG_CLK_RHUMC; set CONFIG_CLK_RHUMC 0
5595 global CONFIG_CLK_CLKDLL; set CONFIG_CLK_CLKDLL 0
5596 global CONFIG_CLK_DCM; set CONFIG_CLK_DCM 0
5597 global CONFIG_IU_MUL_LATENCY_2; set CONFIG_IU_MUL_LATENCY_2 0
5598 global CONFIG_IU_MUL_LATENCY_4; set CONFIG_IU_MUL_LATENCY_4 0
5599 global CONFIG_IU_MUL_LATENCY_5; set CONFIG_IU_MUL_LATENCY_5 0
5600 global CONFIG_IU_MUL_INFERRED; set CONFIG_IU_MUL_INFERRED 0
5601 global CONFIG_IU_MUL_MODGEN; set CONFIG_IU_MUL_MODGEN 0
5602 global CONFIG_IU_MUL_TECHSPEC; set CONFIG_IU_MUL_TECHSPEC 0
5603 global CONFIG_IU_MUL_DW; set CONFIG_IU_MUL_DW 0
5604 global CONFIG_FPU_GRFPU; set CONFIG_FPU_GRFPU 0
5605 global CONFIG_FPU_GRFPULITE; set CONFIG_FPU_GRFPULITE 0
5606 global CONFIG_FPU_MEIKO; set CONFIG_FPU_MEIKO 0
5607 global CONFIG_FPU_GRFPU_INFMUL; set CONFIG_FPU_GRFPU_INFMUL 0
5608 global CONFIG_FPU_GRFPU_DWMUL; set CONFIG_FPU_GRFPU_DWMUL 0
5609 global CONFIG_FPU_GRFPU_MODGEN; set CONFIG_FPU_GRFPU_MODGEN 0
5610 global CONFIG_FPU_GRFPU_TECHSPEC; set CONFIG_FPU_GRFPU_TECHSPEC 0
5611 global CONFIG_FPU_GRFPC0; set CONFIG_FPU_GRFPC0 0
5612 global CONFIG_FPU_GRFPC1; set CONFIG_FPU_GRFPC1 0
5613 global CONFIG_FPU_GRFPC2; set CONFIG_FPU_GRFPC2 0
5614 global CONFIG_ICACHE_ASSO1; set CONFIG_ICACHE_ASSO1 0
5615 global CONFIG_ICACHE_ASSO2; set CONFIG_ICACHE_ASSO2 0
5616 global CONFIG_ICACHE_ASSO3; set CONFIG_ICACHE_ASSO3 0
5617 global CONFIG_ICACHE_ASSO4; set CONFIG_ICACHE_ASSO4 0
5618 global CONFIG_ICACHE_SZ1; set CONFIG_ICACHE_SZ1 0
5619 global CONFIG_ICACHE_SZ2; set CONFIG_ICACHE_SZ2 0
5620 global CONFIG_ICACHE_SZ4; set CONFIG_ICACHE_SZ4 0
5621 global CONFIG_ICACHE_SZ8; set CONFIG_ICACHE_SZ8 0
5622 global CONFIG_ICACHE_SZ16; set CONFIG_ICACHE_SZ16 0
5623 global CONFIG_ICACHE_SZ32; set CONFIG_ICACHE_SZ32 0
5624 global CONFIG_ICACHE_SZ64; set CONFIG_ICACHE_SZ64 0
5625 global CONFIG_ICACHE_SZ128; set CONFIG_ICACHE_SZ128 0
5626 global CONFIG_ICACHE_SZ256; set CONFIG_ICACHE_SZ256 0
5627 global CONFIG_ICACHE_LZ16; set CONFIG_ICACHE_LZ16 0
5628 global CONFIG_ICACHE_LZ32; set CONFIG_ICACHE_LZ32 0
5629 global CONFIG_ICACHE_ALGORND; set CONFIG_ICACHE_ALGORND 0
5630 global CONFIG_ICACHE_ALGODIR; set CONFIG_ICACHE_ALGODIR 0
5631 global CONFIG_ICACHE_ALGOLRR; set CONFIG_ICACHE_ALGOLRR 0
5632 global CONFIG_ICACHE_ALGOLRU; set CONFIG_ICACHE_ALGOLRU 0
5633 global CONFIG_ICACHE_LRAM_SZ1; set CONFIG_ICACHE_LRAM_SZ1 0
5634 global CONFIG_ICACHE_LRAM_SZ2; set CONFIG_ICACHE_LRAM_SZ2 0
5635 global CONFIG_ICACHE_LRAM_SZ4; set CONFIG_ICACHE_LRAM_SZ4 0
5636 global CONFIG_ICACHE_LRAM_SZ8; set CONFIG_ICACHE_LRAM_SZ8 0
5637 global CONFIG_ICACHE_LRAM_SZ16; set CONFIG_ICACHE_LRAM_SZ16 0
5638 global CONFIG_ICACHE_LRAM_SZ32; set CONFIG_ICACHE_LRAM_SZ32 0
5639 global CONFIG_ICACHE_LRAM_SZ64; set CONFIG_ICACHE_LRAM_SZ64 0
5640 global CONFIG_ICACHE_LRAM_SZ128; set CONFIG_ICACHE_LRAM_SZ128 0
5641 global CONFIG_ICACHE_LRAM_SZ256; set CONFIG_ICACHE_LRAM_SZ256 0
5642 global CONFIG_DCACHE_ASSO1; set CONFIG_DCACHE_ASSO1 0
5643 global CONFIG_DCACHE_ASSO2; set CONFIG_DCACHE_ASSO2 0
5644 global CONFIG_DCACHE_ASSO3; set CONFIG_DCACHE_ASSO3 0
5645 global CONFIG_DCACHE_ASSO4; set CONFIG_DCACHE_ASSO4 0
5646 global CONFIG_DCACHE_SZ1; set CONFIG_DCACHE_SZ1 0
5647 global CONFIG_DCACHE_SZ2; set CONFIG_DCACHE_SZ2 0
5648 global CONFIG_DCACHE_SZ4; set CONFIG_DCACHE_SZ4 0
5649 global CONFIG_DCACHE_SZ8; set CONFIG_DCACHE_SZ8 0
5650 global CONFIG_DCACHE_SZ16; set CONFIG_DCACHE_SZ16 0
5651 global CONFIG_DCACHE_SZ32; set CONFIG_DCACHE_SZ32 0
5652 global CONFIG_DCACHE_SZ64; set CONFIG_DCACHE_SZ64 0
5653 global CONFIG_DCACHE_SZ128; set CONFIG_DCACHE_SZ128 0
5654 global CONFIG_DCACHE_SZ256; set CONFIG_DCACHE_SZ256 0
5655 global CONFIG_DCACHE_LZ16; set CONFIG_DCACHE_LZ16 0
5656 global CONFIG_DCACHE_LZ32; set CONFIG_DCACHE_LZ32 0
5657 global CONFIG_DCACHE_ALGORND; set CONFIG_DCACHE_ALGORND 0
5658 global CONFIG_DCACHE_ALGODIR; set CONFIG_DCACHE_ALGODIR 0
5659 global CONFIG_DCACHE_ALGOLRR; set CONFIG_DCACHE_ALGOLRR 0
5660 global CONFIG_DCACHE_ALGOLRU; set CONFIG_DCACHE_ALGOLRU 0
5661 global CONFIG_DCACHE_LRAM_SZ1; set CONFIG_DCACHE_LRAM_SZ1 0
5662 global CONFIG_DCACHE_LRAM_SZ2; set CONFIG_DCACHE_LRAM_SZ2 0
5663 global CONFIG_DCACHE_LRAM_SZ4; set CONFIG_DCACHE_LRAM_SZ4 0
5664 global CONFIG_DCACHE_LRAM_SZ8; set CONFIG_DCACHE_LRAM_SZ8 0
5665 global CONFIG_DCACHE_LRAM_SZ16; set CONFIG_DCACHE_LRAM_SZ16 0
5666 global CONFIG_DCACHE_LRAM_SZ32; set CONFIG_DCACHE_LRAM_SZ32 0
5667 global CONFIG_DCACHE_LRAM_SZ64; set CONFIG_DCACHE_LRAM_SZ64 0
5668 global CONFIG_DCACHE_LRAM_SZ128; set CONFIG_DCACHE_LRAM_SZ128 0
5669 global CONFIG_DCACHE_LRAM_SZ256; set CONFIG_DCACHE_LRAM_SZ256 0
5670 global CONFIG_MMU_COMBINED; set CONFIG_MMU_COMBINED 0
5671 global CONFIG_MMU_SPLIT; set CONFIG_MMU_SPLIT 0
5672 global CONFIG_MMU_REPARRAY; set CONFIG_MMU_REPARRAY 0
5673 global CONFIG_MMU_REPINCREMENT; set CONFIG_MMU_REPINCREMENT 0
5674 global CONFIG_MMU_I2; set CONFIG_MMU_I2 0
5675 global CONFIG_MMU_I4; set CONFIG_MMU_I4 0
5676 global CONFIG_MMU_I8; set CONFIG_MMU_I8 0
5677 global CONFIG_MMU_I16; set CONFIG_MMU_I16 0
5678 global CONFIG_MMU_I32; set CONFIG_MMU_I32 0
5679 global CONFIG_MMU_D2; set CONFIG_MMU_D2 0
5680 global CONFIG_MMU_D4; set CONFIG_MMU_D4 0
5681 global CONFIG_MMU_D8; set CONFIG_MMU_D8 0
5682 global CONFIG_MMU_D16; set CONFIG_MMU_D16 0
5683 global CONFIG_MMU_D32; set CONFIG_MMU_D32 0
5684 global CONFIG_MMU_PAGE_4K; set CONFIG_MMU_PAGE_4K 0
5685 global CONFIG_MMU_PAGE_8K; set CONFIG_MMU_PAGE_8K 0
5686 global CONFIG_MMU_PAGE_16K; set CONFIG_MMU_PAGE_16K 0
5687 global CONFIG_MMU_PAGE_32K; set CONFIG_MMU_PAGE_32K 0
5688 global CONFIG_MMU_PAGE_PROG; set CONFIG_MMU_PAGE_PROG 0
5689 global CONFIG_DSU_ITRACESZ1; set CONFIG_DSU_ITRACESZ1 0
5690 global CONFIG_DSU_ITRACESZ2; set CONFIG_DSU_ITRACESZ2 0
5691 global CONFIG_DSU_ITRACESZ4; set CONFIG_DSU_ITRACESZ4 0
5692 global CONFIG_DSU_ITRACESZ8; set CONFIG_DSU_ITRACESZ8 0
5693 global CONFIG_DSU_ITRACESZ16; set CONFIG_DSU_ITRACESZ16 0
5694 global CONFIG_DSU_ATRACESZ1; set CONFIG_DSU_ATRACESZ1 0
5695 global CONFIG_DSU_ATRACESZ2; set CONFIG_DSU_ATRACESZ2 0
5696 global CONFIG_DSU_ATRACESZ4; set CONFIG_DSU_ATRACESZ4 0
5697 global CONFIG_DSU_ATRACESZ8; set CONFIG_DSU_ATRACESZ8 0
5698 global CONFIG_DSU_ATRACESZ16; set CONFIG_DSU_ATRACESZ16 0
5699 global CONFIG_IUFT_NONE; set CONFIG_IUFT_NONE 0
5700 global CONFIG_IUFT_PAR; set CONFIG_IUFT_PAR 0
5701 global CONFIG_IUFT_DMR; set CONFIG_IUFT_DMR 0
5702 global CONFIG_IUFT_BCH; set CONFIG_IUFT_BCH 0
5703 global CONFIG_IUFT_TMR; set CONFIG_IUFT_TMR 0
5704 global CONFIG_DSU_ETHSZ1; set CONFIG_DSU_ETHSZ1 0
5705 global CONFIG_DSU_ETHSZ2; set CONFIG_DSU_ETHSZ2 0
5706 global CONFIG_DSU_ETHSZ4; set CONFIG_DSU_ETHSZ4 0
5707 global CONFIG_DSU_ETHSZ8; set CONFIG_DSU_ETHSZ8 0
5708 global CONFIG_DSU_ETHSZ16; set CONFIG_DSU_ETHSZ16 0
5709 global CONFIG_AHBRAM_SZ1; set CONFIG_AHBRAM_SZ1 0
5710 global CONFIG_AHBRAM_SZ2; set CONFIG_AHBRAM_SZ2 0
5711 global CONFIG_AHBRAM_SZ4; set CONFIG_AHBRAM_SZ4 0
5712 global CONFIG_AHBRAM_SZ8; set CONFIG_AHBRAM_SZ8 0
5713 global CONFIG_AHBRAM_SZ16; set CONFIG_AHBRAM_SZ16 0
5714 global CONFIG_AHBRAM_SZ32; set CONFIG_AHBRAM_SZ32 0
5715 global CONFIG_AHBRAM_SZ64; set CONFIG_AHBRAM_SZ64 0
5716 global CONFIG_GRETH_FIFO4; set CONFIG_GRETH_FIFO4 0
5717 global CONFIG_GRETH_FIFO8; set CONFIG_GRETH_FIFO8 0
5718 global CONFIG_GRETH_FIFO16; set CONFIG_GRETH_FIFO16 0
5719 global CONFIG_GRETH_FIFO32; set CONFIG_GRETH_FIFO32 0
5720 global CONFIG_GRETH_FIFO64; set CONFIG_GRETH_FIFO64 0
5721 global CONFIG_UA1_FIFO1; set CONFIG_UA1_FIFO1 0
5722 global CONFIG_UA1_FIFO2; set CONFIG_UA1_FIFO2 0
5723 global CONFIG_UA1_FIFO4; set CONFIG_UA1_FIFO4 0
5724 global CONFIG_UA1_FIFO8; set CONFIG_UA1_FIFO8 0
5725 global CONFIG_UA1_FIFO16; set CONFIG_UA1_FIFO16 0
5726 global CONFIG_UA1_FIFO32; set CONFIG_UA1_FIFO32 0
5727 global CONFIG_SPICTRL_NOFT; set CONFIG_SPICTRL_NOFT 0
5728 global CONFIG_SPICTRL_DMRFT; set CONFIG_SPICTRL_DMRFT 0
5729 global CONFIG_SPICTRL_TMRFT; set CONFIG_SPICTRL_TMRFT 0
5730 }
5731
5732
5733 proc update_choices { } {
5734 global tmpvar_0
5735 set tmpvar_0 "Inferred"
5736 global CONFIG_SYN_INFERRED
5737 if { $CONFIG_SYN_INFERRED == 1 } then { set tmpvar_0 "Inferred" }
5738 global CONFIG_SYN_STRATIX
5739 if { $CONFIG_SYN_STRATIX == 1 } then { set tmpvar_0 "Altera-Stratix" }
5740 global CONFIG_SYN_STRATIXII
5741 if { $CONFIG_SYN_STRATIXII == 1 } then { set tmpvar_0 "Altera-StratixII" }
5742 global CONFIG_SYN_STRATIXIII
5743 if { $CONFIG_SYN_STRATIXIII == 1 } then { set tmpvar_0 "Altera-StratixIII" }
5744 global CONFIG_SYN_CYCLONEIII
5745 if { $CONFIG_SYN_CYCLONEIII == 1 } then { set tmpvar_0 "Altera-CycloneIII" }
5746 global CONFIG_SYN_ALTERA
5747 if { $CONFIG_SYN_ALTERA == 1 } then { set tmpvar_0 "Altera-Others" }
5748 global CONFIG_SYN_AXCEL
5749 if { $CONFIG_SYN_AXCEL == 1 } then { set tmpvar_0 "Actel-Axcelerator" }
5750 global CONFIG_SYN_AXDSP
5751 if { $CONFIG_SYN_AXDSP == 1 } then { set tmpvar_0 "Actel-Axcelerator-DSP" }
5752 global CONFIG_SYN_PROASIC
5753 if { $CONFIG_SYN_PROASIC == 1 } then { set tmpvar_0 "Actel-Proasic" }
5754 global CONFIG_SYN_PROASICPLUS
5755 if { $CONFIG_SYN_PROASICPLUS == 1 } then { set tmpvar_0 "Actel-ProasicPlus" }
5756 global CONFIG_SYN_PROASIC3
5757 if { $CONFIG_SYN_PROASIC3 == 1 } then { set tmpvar_0 "Actel-Proasic3" }
5758 global CONFIG_SYN_PROASIC3E
5759 if { $CONFIG_SYN_PROASIC3E == 1 } then { set tmpvar_0 "Actel-Proasic3E" }
5760 global CONFIG_SYN_PROASIC3L
5761 if { $CONFIG_SYN_PROASIC3L == 1 } then { set tmpvar_0 "Actel-Proasic3L" }
5762 global CONFIG_SYN_IGLOO
5763 if { $CONFIG_SYN_IGLOO == 1 } then { set tmpvar_0 "Actel-IGLOO/p/L" }
5764 global CONFIG_SYN_FUSION
5765 if { $CONFIG_SYN_FUSION == 1 } then { set tmpvar_0 "Actel-Fusion" }
5766 global CONFIG_SYN_UT025CRH
5767 if { $CONFIG_SYN_UT025CRH == 1 } then { set tmpvar_0 "Aeroflex-UT025CRH" }
5768 global CONFIG_SYN_UT130HBD
5769 if { $CONFIG_SYN_UT130HBD == 1 } then { set tmpvar_0 "Aeroflex-UT130HBD" }
5770 global CONFIG_SYN_UT90NHBD
5771 if { $CONFIG_SYN_UT90NHBD == 1 } then { set tmpvar_0 "Aeroflex-UT90NHBD" }
5772 global CONFIG_SYN_ATC18
5773 if { $CONFIG_SYN_ATC18 == 1 } then { set tmpvar_0 "Atmel-ATC18" }
5774 global CONFIG_SYN_ATC18RHA
5775 if { $CONFIG_SYN_ATC18RHA == 1 } then { set tmpvar_0 "Atmel-ATC18RHA" }
5776 global CONFIG_SYN_CMOS9SF
5777 if { $CONFIG_SYN_CMOS9SF == 1 } then { set tmpvar_0 "IBM-CMOS9SF" }
5778 global CONFIG_SYN_CUSTOM1
5779 if { $CONFIG_SYN_CUSTOM1 == 1 } then { set tmpvar_0 "Custom1" }
5780 global CONFIG_SYN_EASIC90
5781 if { $CONFIG_SYN_EASIC90 == 1 } then { set tmpvar_0 "eASIC90" }
5782 global CONFIG_SYN_EASIC45
5783 if { $CONFIG_SYN_EASIC45 == 1 } then { set tmpvar_0 "eASIC45" }
5784 global CONFIG_SYN_IHP25
5785 if { $CONFIG_SYN_IHP25 == 1 } then { set tmpvar_0 "IHP25" }
5786 global CONFIG_SYN_IHP25RH
5787 if { $CONFIG_SYN_IHP25RH == 1 } then { set tmpvar_0 "IHP25RH" }
5788 global CONFIG_SYN_LATTICE
5789 if { $CONFIG_SYN_LATTICE == 1 } then { set tmpvar_0 "Lattice-EC/ECP/XP" }
5790 global CONFIG_SYN_ECLIPSE
5791 if { $CONFIG_SYN_ECLIPSE == 1 } then { set tmpvar_0 "Quicklogic-Eclipse" }
5792 global CONFIG_SYN_PEREGRINE
5793 if { $CONFIG_SYN_PEREGRINE == 1 } then { set tmpvar_0 "Peregrine" }
5794 global CONFIG_SYN_RH_LIB18T
5795 if { $CONFIG_SYN_RH_LIB18T == 1 } then { set tmpvar_0 "RH-LIB18T" }
5796 global CONFIG_SYN_RHUMC
5797 if { $CONFIG_SYN_RHUMC == 1 } then { set tmpvar_0 "RH-UMC" }
5798 global CONFIG_SYN_SMIC13
5799 if { $CONFIG_SYN_SMIC13 == 1 } then { set tmpvar_0 "SMIC130" }
5800 global CONFIG_SYN_TM65GPLUS
5801 if { $CONFIG_SYN_TM65GPLUS == 1 } then { set tmpvar_0 "TM65Gplus" }
5802 global CONFIG_SYN_TSMC90
5803 if { $CONFIG_SYN_TSMC90 == 1 } then { set tmpvar_0 "TSMC90" }
5804 global CONFIG_SYN_UMC
5805 if { $CONFIG_SYN_UMC == 1 } then { set tmpvar_0 "UMC180" }
5806 global CONFIG_SYN_SPARTAN2
5807 if { $CONFIG_SYN_SPARTAN2 == 1 } then { set tmpvar_0 "Xilinx-Spartan2" }
5808 global CONFIG_SYN_SPARTAN3
5809 if { $CONFIG_SYN_SPARTAN3 == 1 } then { set tmpvar_0 "Xilinx-Spartan3" }
5810 global CONFIG_SYN_SPARTAN3E
5811 if { $CONFIG_SYN_SPARTAN3E == 1 } then { set tmpvar_0 "Xilinx-Spartan3E" }
5812 global CONFIG_SYN_SPARTAN6
5813 if { $CONFIG_SYN_SPARTAN6 == 1 } then { set tmpvar_0 "Xilinx-Spartan6" }
5814 global CONFIG_SYN_VIRTEX
5815 if { $CONFIG_SYN_VIRTEX == 1 } then { set tmpvar_0 "Xilinx-Virtex" }
5816 global CONFIG_SYN_VIRTEXE
5817 if { $CONFIG_SYN_VIRTEXE == 1 } then { set tmpvar_0 "Xilinx-VirtexE" }
5818 global CONFIG_SYN_VIRTEX2
5819 if { $CONFIG_SYN_VIRTEX2 == 1 } then { set tmpvar_0 "Xilinx-Virtex2" }
5820 global CONFIG_SYN_VIRTEX4
5821 if { $CONFIG_SYN_VIRTEX4 == 1 } then { set tmpvar_0 "Xilinx-Virtex4" }
5822 global CONFIG_SYN_VIRTEX5
5823 if { $CONFIG_SYN_VIRTEX5 == 1 } then { set tmpvar_0 "Xilinx-Virtex5" }
5824 global CONFIG_SYN_VIRTEX6
5825 if { $CONFIG_SYN_VIRTEX6 == 1 } then { set tmpvar_0 "Xilinx-Virtex6" }
5826 global tmpvar_1
5827 set tmpvar_1 "Inferred"
5828 global CONFIG_MEM_INFERRED
5829 if { $CONFIG_MEM_INFERRED == 1 } then { set tmpvar_1 "Inferred" }
5830 global CONFIG_MEM_UMC
5831 if { $CONFIG_MEM_UMC == 1 } then { set tmpvar_1 "UMC18" }
5832 global CONFIG_MEM_RHUMC
5833 if { $CONFIG_MEM_RHUMC == 1 } then { set tmpvar_1 "RH-UMC" }
5834 global CONFIG_MEM_ARTISAN
5835 if { $CONFIG_MEM_ARTISAN == 1 } then { set tmpvar_1 "Artisan" }
5836 global CONFIG_MEM_CUSTOM1
5837 if { $CONFIG_MEM_CUSTOM1 == 1 } then { set tmpvar_1 "Custom1" }
5838 global CONFIG_MEM_VIRAGE
5839 if { $CONFIG_MEM_VIRAGE == 1 } then { set tmpvar_1 "Virage" }
5840 global CONFIG_MEM_VIRAGE90
5841 if { $CONFIG_MEM_VIRAGE90 == 1 } then { set tmpvar_1 "Virage-TSMC90" }
5842 global tmpvar_2
5843 set tmpvar_2 "Inferred"
5844 global CONFIG_CLK_INFERRED
5845 if { $CONFIG_CLK_INFERRED == 1 } then { set tmpvar_2 "Inferred" }
5846 global CONFIG_CLK_HCLKBUF
5847 if { $CONFIG_CLK_HCLKBUF == 1 } then { set tmpvar_2 "Actel-HCLKBUF" }
5848 global CONFIG_CLK_UT130HBD
5849 if { $CONFIG_CLK_UT130HBD == 1 } then { set tmpvar_2 "Aeroflex-UT130HBD" }
5850 global CONFIG_CLK_ALTDLL
5851 if { $CONFIG_CLK_ALTDLL == 1 } then { set tmpvar_2 "Altera-ALTPLL" }
5852 global CONFIG_CLK_LATDLL
5853 if { $CONFIG_CLK_LATDLL == 1 } then { set tmpvar_2 "Lattice-EXPLL" }
5854 global CONFIG_CLK_PRO3PLL
5855 if { $CONFIG_CLK_PRO3PLL == 1 } then { set tmpvar_2 "Proasic3-PLL" }
5856 global CONFIG_CLK_PRO3EPLL
5857 if { $CONFIG_CLK_PRO3EPLL == 1 } then { set tmpvar_2 "Proasic3E-PLL" }
5858 global CONFIG_CLK_PRO3LPLL
5859 if { $CONFIG_CLK_PRO3LPLL == 1 } then { set tmpvar_2 "Proasic3L-PLL" }
5860 global CONFIG_CLK_FUSPLL
5861 if { $CONFIG_CLK_FUSPLL == 1 } then { set tmpvar_2 "Fusion-PLL" }
5862 global CONFIG_CLK_LIB18T
5863 if { $CONFIG_CLK_LIB18T == 1 } then { set tmpvar_2 "RH-LIB18T-PLL" }
5864 global CONFIG_CLK_RHUMC
5865 if { $CONFIG_CLK_RHUMC == 1 } then { set tmpvar_2 "DARE-PLL" }
5866 global CONFIG_CLK_CLKDLL
5867 if { $CONFIG_CLK_CLKDLL == 1 } then { set tmpvar_2 "Xilinx-CLKDLL" }
5868 global CONFIG_CLK_DCM
5869 if { $CONFIG_CLK_DCM == 1 } then { set tmpvar_2 "Xilinx-DCM" }
5870 global tmpvar_3
5871 set tmpvar_3 "5-cycles"
5872 global CONFIG_IU_MUL_LATENCY_2
5873 if { $CONFIG_IU_MUL_LATENCY_2 == 1 } then { set tmpvar_3 "2-cycles" }
5874 global CONFIG_IU_MUL_LATENCY_4
5875 if { $CONFIG_IU_MUL_LATENCY_4 == 1 } then { set tmpvar_3 "4-cycles" }
5876 global CONFIG_IU_MUL_LATENCY_5
5877 if { $CONFIG_IU_MUL_LATENCY_5 == 1 } then { set tmpvar_3 "5-cycles" }
5878 global tmpvar_4
5879 set tmpvar_4 "Inferred"
5880 global CONFIG_IU_MUL_INFERRED
5881 if { $CONFIG_IU_MUL_INFERRED == 1 } then { set tmpvar_4 "Inferred" }
5882 global CONFIG_IU_MUL_MODGEN
5883 if { $CONFIG_IU_MUL_MODGEN == 1 } then { set tmpvar_4 "NTNU_Modgen" }
5884 global CONFIG_IU_MUL_TECHSPEC
5885 if { $CONFIG_IU_MUL_TECHSPEC == 1 } then { set tmpvar_4 "TechSpec" }
5886 global CONFIG_IU_MUL_DW
5887 if { $CONFIG_IU_MUL_DW == 1 } then { set tmpvar_4 "Designware" }
5888 global tmpvar_5
5889 set tmpvar_5 "GRFPU"
5890 global CONFIG_FPU_GRFPU
5891 if { $CONFIG_FPU_GRFPU == 1 } then { set tmpvar_5 "GRFPU" }
5892 global CONFIG_FPU_GRFPULITE
5893 if { $CONFIG_FPU_GRFPULITE == 1 } then { set tmpvar_5 "GRFPU-LITE" }
5894 global CONFIG_FPU_MEIKO
5895 if { $CONFIG_FPU_MEIKO == 1 } then { set tmpvar_5 "Meiko" }
5896 global tmpvar_6
5897 set tmpvar_6 "Inferred"
5898 global CONFIG_FPU_GRFPU_INFMUL
5899 if { $CONFIG_FPU_GRFPU_INFMUL == 1 } then { set tmpvar_6 "Inferred" }
5900 global CONFIG_FPU_GRFPU_DWMUL
5901 if { $CONFIG_FPU_GRFPU_DWMUL == 1 } then { set tmpvar_6 "DW" }
5902 global CONFIG_FPU_GRFPU_MODGEN
5903 if { $CONFIG_FPU_GRFPU_MODGEN == 1 } then { set tmpvar_6 "ModGen" }
5904 global CONFIG_FPU_GRFPU_TECHSPEC
5905 if { $CONFIG_FPU_GRFPU_TECHSPEC == 1 } then { set tmpvar_6 "TechSpec" }
5906 global tmpvar_7
5907 set tmpvar_7 "Simple"
5908 global CONFIG_FPU_GRFPC0
5909 if { $CONFIG_FPU_GRFPC0 == 1 } then { set tmpvar_7 "Simple" }
5910 global CONFIG_FPU_GRFPC1
5911 if { $CONFIG_FPU_GRFPC1 == 1 } then { set tmpvar_7 "Data-forwarding" }
5912 global CONFIG_FPU_GRFPC2
5913 if { $CONFIG_FPU_GRFPC2 == 1 } then { set tmpvar_7 "Non-blocking" }
5914 global tmpvar_8
5915 set tmpvar_8 "1"
5916 global CONFIG_ICACHE_ASSO1
5917 if { $CONFIG_ICACHE_ASSO1 == 1 } then { set tmpvar_8 "1" }
5918 global CONFIG_ICACHE_ASSO2
5919 if { $CONFIG_ICACHE_ASSO2 == 1 } then { set tmpvar_8 "2" }
5920 global CONFIG_ICACHE_ASSO3
5921 if { $CONFIG_ICACHE_ASSO3 == 1 } then { set tmpvar_8 "3" }
5922 global CONFIG_ICACHE_ASSO4
5923 if { $CONFIG_ICACHE_ASSO4 == 1 } then { set tmpvar_8 "4" }
5924 global tmpvar_9
5925 set tmpvar_9 "4"
5926 global CONFIG_ICACHE_SZ1
5927 if { $CONFIG_ICACHE_SZ1 == 1 } then { set tmpvar_9 "1" }
5928 global CONFIG_ICACHE_SZ2
5929 if { $CONFIG_ICACHE_SZ2 == 1 } then { set tmpvar_9 "2" }
5930 global CONFIG_ICACHE_SZ4
5931 if { $CONFIG_ICACHE_SZ4 == 1 } then { set tmpvar_9 "4" }
5932 global CONFIG_ICACHE_SZ8
5933 if { $CONFIG_ICACHE_SZ8 == 1 } then { set tmpvar_9 "8" }
5934 global CONFIG_ICACHE_SZ16
5935 if { $CONFIG_ICACHE_SZ16 == 1 } then { set tmpvar_9 "16" }
5936 global CONFIG_ICACHE_SZ32
5937 if { $CONFIG_ICACHE_SZ32 == 1 } then { set tmpvar_9 "32" }
5938 global CONFIG_ICACHE_SZ64
5939 if { $CONFIG_ICACHE_SZ64 == 1 } then { set tmpvar_9 "64" }
5940 global CONFIG_ICACHE_SZ128
5941 if { $CONFIG_ICACHE_SZ128 == 1 } then { set tmpvar_9 "128" }
5942 global CONFIG_ICACHE_SZ256
5943 if { $CONFIG_ICACHE_SZ256 == 1 } then { set tmpvar_9 "256" }
5944 global tmpvar_10
5945 set tmpvar_10 "32"
5946 global CONFIG_ICACHE_LZ16
5947 if { $CONFIG_ICACHE_LZ16 == 1 } then { set tmpvar_10 "16" }
5948 global CONFIG_ICACHE_LZ32
5949 if { $CONFIG_ICACHE_LZ32 == 1 } then { set tmpvar_10 "32" }
5950 global tmpvar_11
5951 set tmpvar_11 "Random"
5952 global CONFIG_ICACHE_ALGORND
5953 if { $CONFIG_ICACHE_ALGORND == 1 } then { set tmpvar_11 "Random" }
5954 global CONFIG_ICACHE_ALGODIR
5955 if { $CONFIG_ICACHE_ALGODIR == 1 } then { set tmpvar_11 "Direct" }
5956 global CONFIG_ICACHE_ALGOLRR
5957 if { $CONFIG_ICACHE_ALGOLRR == 1 } then { set tmpvar_11 "LRR" }
5958 global CONFIG_ICACHE_ALGOLRU
5959 if { $CONFIG_ICACHE_ALGOLRU == 1 } then { set tmpvar_11 "LRU" }
5960 global tmpvar_12
5961 set tmpvar_12 "4"
5962 global CONFIG_ICACHE_LRAM_SZ1
5963 if { $CONFIG_ICACHE_LRAM_SZ1 == 1 } then { set tmpvar_12 "1" }
5964 global CONFIG_ICACHE_LRAM_SZ2
5965 if { $CONFIG_ICACHE_LRAM_SZ2 == 1 } then { set tmpvar_12 "2" }
5966 global CONFIG_ICACHE_LRAM_SZ4
5967 if { $CONFIG_ICACHE_LRAM_SZ4 == 1 } then { set tmpvar_12 "4" }
5968 global CONFIG_ICACHE_LRAM_SZ8
5969 if { $CONFIG_ICACHE_LRAM_SZ8 == 1 } then { set tmpvar_12 "8" }
5970 global CONFIG_ICACHE_LRAM_SZ16
5971 if { $CONFIG_ICACHE_LRAM_SZ16 == 1 } then { set tmpvar_12 "16" }
5972 global CONFIG_ICACHE_LRAM_SZ32
5973 if { $CONFIG_ICACHE_LRAM_SZ32 == 1 } then { set tmpvar_12 "32" }
5974 global CONFIG_ICACHE_LRAM_SZ64
5975 if { $CONFIG_ICACHE_LRAM_SZ64 == 1 } then { set tmpvar_12 "64" }
5976 global CONFIG_ICACHE_LRAM_SZ128
5977 if { $CONFIG_ICACHE_LRAM_SZ128 == 1 } then { set tmpvar_12 "128" }
5978 global CONFIG_ICACHE_LRAM_SZ256
5979 if { $CONFIG_ICACHE_LRAM_SZ256 == 1 } then { set tmpvar_12 "256" }
5980 global tmpvar_13
5981 set tmpvar_13 "1"
5982 global CONFIG_DCACHE_ASSO1
5983 if { $CONFIG_DCACHE_ASSO1 == 1 } then { set tmpvar_13 "1" }
5984 global CONFIG_DCACHE_ASSO2
5985 if { $CONFIG_DCACHE_ASSO2 == 1 } then { set tmpvar_13 "2" }
5986 global CONFIG_DCACHE_ASSO3
5987 if { $CONFIG_DCACHE_ASSO3 == 1 } then { set tmpvar_13 "3" }
5988 global CONFIG_DCACHE_ASSO4
5989 if { $CONFIG_DCACHE_ASSO4 == 1 } then { set tmpvar_13 "4" }
5990 global tmpvar_14
5991 set tmpvar_14 "4"
5992 global CONFIG_DCACHE_SZ1
5993 if { $CONFIG_DCACHE_SZ1 == 1 } then { set tmpvar_14 "1" }
5994 global CONFIG_DCACHE_SZ2
5995 if { $CONFIG_DCACHE_SZ2 == 1 } then { set tmpvar_14 "2" }
5996 global CONFIG_DCACHE_SZ4
5997 if { $CONFIG_DCACHE_SZ4 == 1 } then { set tmpvar_14 "4" }
5998 global CONFIG_DCACHE_SZ8
5999 if { $CONFIG_DCACHE_SZ8 == 1 } then { set tmpvar_14 "8" }
6000 global CONFIG_DCACHE_SZ16
6001 if { $CONFIG_DCACHE_SZ16 == 1 } then { set tmpvar_14 "16" }
6002 global CONFIG_DCACHE_SZ32
6003 if { $CONFIG_DCACHE_SZ32 == 1 } then { set tmpvar_14 "32" }
6004 global CONFIG_DCACHE_SZ64
6005 if { $CONFIG_DCACHE_SZ64 == 1 } then { set tmpvar_14 "64" }
6006 global CONFIG_DCACHE_SZ128
6007 if { $CONFIG_DCACHE_SZ128 == 1 } then { set tmpvar_14 "128" }
6008 global CONFIG_DCACHE_SZ256
6009 if { $CONFIG_DCACHE_SZ256 == 1 } then { set tmpvar_14 "256" }
6010 global tmpvar_15
6011 set tmpvar_15 "32"
6012 global CONFIG_DCACHE_LZ16
6013 if { $CONFIG_DCACHE_LZ16 == 1 } then { set tmpvar_15 "16" }
6014 global CONFIG_DCACHE_LZ32
6015 if { $CONFIG_DCACHE_LZ32 == 1 } then { set tmpvar_15 "32" }
6016 global tmpvar_16
6017 set tmpvar_16 "Random"
6018 global CONFIG_DCACHE_ALGORND
6019 if { $CONFIG_DCACHE_ALGORND == 1 } then { set tmpvar_16 "Random" }
6020 global CONFIG_DCACHE_ALGODIR
6021 if { $CONFIG_DCACHE_ALGODIR == 1 } then { set tmpvar_16 "Direct" }
6022 global CONFIG_DCACHE_ALGOLRR
6023 if { $CONFIG_DCACHE_ALGOLRR == 1 } then { set tmpvar_16 "LRR" }
6024 global CONFIG_DCACHE_ALGOLRU
6025 if { $CONFIG_DCACHE_ALGOLRU == 1 } then { set tmpvar_16 "LRU" }
6026 global tmpvar_17
6027 set tmpvar_17 "4"
6028 global CONFIG_DCACHE_LRAM_SZ1
6029 if { $CONFIG_DCACHE_LRAM_SZ1 == 1 } then { set tmpvar_17 "1" }
6030 global CONFIG_DCACHE_LRAM_SZ2
6031 if { $CONFIG_DCACHE_LRAM_SZ2 == 1 } then { set tmpvar_17 "2" }
6032 global CONFIG_DCACHE_LRAM_SZ4
6033 if { $CONFIG_DCACHE_LRAM_SZ4 == 1 } then { set tmpvar_17 "4" }
6034 global CONFIG_DCACHE_LRAM_SZ8
6035 if { $CONFIG_DCACHE_LRAM_SZ8 == 1 } then { set tmpvar_17 "8" }
6036 global CONFIG_DCACHE_LRAM_SZ16
6037 if { $CONFIG_DCACHE_LRAM_SZ16 == 1 } then { set tmpvar_17 "16" }
6038 global CONFIG_DCACHE_LRAM_SZ32
6039 if { $CONFIG_DCACHE_LRAM_SZ32 == 1 } then { set tmpvar_17 "32" }
6040 global CONFIG_DCACHE_LRAM_SZ64
6041 if { $CONFIG_DCACHE_LRAM_SZ64 == 1 } then { set tmpvar_17 "64" }
6042 global CONFIG_DCACHE_LRAM_SZ128
6043 if { $CONFIG_DCACHE_LRAM_SZ128 == 1 } then { set tmpvar_17 "128" }
6044 global CONFIG_DCACHE_LRAM_SZ256
6045 if { $CONFIG_DCACHE_LRAM_SZ256 == 1 } then { set tmpvar_17 "256" }
6046 global tmpvar_18
6047 set tmpvar_18 "combined"
6048 global CONFIG_MMU_COMBINED
6049 if { $CONFIG_MMU_COMBINED == 1 } then { set tmpvar_18 "combined" }
6050 global CONFIG_MMU_SPLIT
6051 if { $CONFIG_MMU_SPLIT == 1 } then { set tmpvar_18 "split" }
6052 global tmpvar_19
6053 set tmpvar_19 "Increment"
6054 global CONFIG_MMU_REPARRAY
6055 if { $CONFIG_MMU_REPARRAY == 1 } then { set tmpvar_19 "LRU" }
6056 global CONFIG_MMU_REPINCREMENT
6057 if { $CONFIG_MMU_REPINCREMENT == 1 } then { set tmpvar_19 "Increment" }
6058 global tmpvar_20
6059 set tmpvar_20 "8"
6060 global CONFIG_MMU_I2
6061 if { $CONFIG_MMU_I2 == 1 } then { set tmpvar_20 "2" }
6062 global CONFIG_MMU_I4
6063 if { $CONFIG_MMU_I4 == 1 } then { set tmpvar_20 "4" }
6064 global CONFIG_MMU_I8
6065 if { $CONFIG_MMU_I8 == 1 } then { set tmpvar_20 "8" }
6066 global CONFIG_MMU_I16
6067 if { $CONFIG_MMU_I16 == 1 } then { set tmpvar_20 "16" }
6068 global CONFIG_MMU_I32
6069 if { $CONFIG_MMU_I32 == 1 } then { set tmpvar_20 "32" }
6070 global tmpvar_21
6071 set tmpvar_21 "8"
6072 global CONFIG_MMU_D2
6073 if { $CONFIG_MMU_D2 == 1 } then { set tmpvar_21 "2" }
6074 global CONFIG_MMU_D4
6075 if { $CONFIG_MMU_D4 == 1 } then { set tmpvar_21 "4" }
6076 global CONFIG_MMU_D8
6077 if { $CONFIG_MMU_D8 == 1 } then { set tmpvar_21 "8" }
6078 global CONFIG_MMU_D16
6079 if { $CONFIG_MMU_D16 == 1 } then { set tmpvar_21 "16" }
6080 global CONFIG_MMU_D32
6081 if { $CONFIG_MMU_D32 == 1 } then { set tmpvar_21 "32" }
6082 global tmpvar_22
6083 set tmpvar_22 "4K"
6084 global CONFIG_MMU_PAGE_4K
6085 if { $CONFIG_MMU_PAGE_4K == 1 } then { set tmpvar_22 "4K" }
6086 global CONFIG_MMU_PAGE_8K
6087 if { $CONFIG_MMU_PAGE_8K == 1 } then { set tmpvar_22 "8K" }
6088 global CONFIG_MMU_PAGE_16K
6089 if { $CONFIG_MMU_PAGE_16K == 1 } then { set tmpvar_22 "16K" }
6090 global CONFIG_MMU_PAGE_32K
6091 if { $CONFIG_MMU_PAGE_32K == 1 } then { set tmpvar_22 "32K" }
6092 global CONFIG_MMU_PAGE_PROG
6093 if { $CONFIG_MMU_PAGE_PROG == 1 } then { set tmpvar_22 "Programmable" }
6094 global tmpvar_23
6095 set tmpvar_23 "1"
6096 global CONFIG_DSU_ITRACESZ1
6097 if { $CONFIG_DSU_ITRACESZ1 == 1 } then { set tmpvar_23 "1" }
6098 global CONFIG_DSU_ITRACESZ2
6099 if { $CONFIG_DSU_ITRACESZ2 == 1 } then { set tmpvar_23 "2" }
6100 global CONFIG_DSU_ITRACESZ4
6101 if { $CONFIG_DSU_ITRACESZ4 == 1 } then { set tmpvar_23 "4" }
6102 global CONFIG_DSU_ITRACESZ8
6103 if { $CONFIG_DSU_ITRACESZ8 == 1 } then { set tmpvar_23 "8" }
6104 global CONFIG_DSU_ITRACESZ16
6105 if { $CONFIG_DSU_ITRACESZ16 == 1 } then { set tmpvar_23 "16" }
6106 global tmpvar_24
6107 set tmpvar_24 "1"
6108 global CONFIG_DSU_ATRACESZ1
6109 if { $CONFIG_DSU_ATRACESZ1 == 1 } then { set tmpvar_24 "1" }
6110 global CONFIG_DSU_ATRACESZ2
6111 if { $CONFIG_DSU_ATRACESZ2 == 1 } then { set tmpvar_24 "2" }
6112 global CONFIG_DSU_ATRACESZ4
6113 if { $CONFIG_DSU_ATRACESZ4 == 1 } then { set tmpvar_24 "4" }
6114 global CONFIG_DSU_ATRACESZ8
6115 if { $CONFIG_DSU_ATRACESZ8 == 1 } then { set tmpvar_24 "8" }
6116 global CONFIG_DSU_ATRACESZ16
6117 if { $CONFIG_DSU_ATRACESZ16 == 1 } then { set tmpvar_24 "16" }
6118 global tmpvar_25
6119 set tmpvar_25 "None"
6120 global CONFIG_IUFT_NONE
6121 if { $CONFIG_IUFT_NONE == 1 } then { set tmpvar_25 "None" }
6122 global CONFIG_IUFT_PAR
6123 if { $CONFIG_IUFT_PAR == 1 } then { set tmpvar_25 "Parity" }
6124 global CONFIG_IUFT_DMR
6125 if { $CONFIG_IUFT_DMR == 1 } then { set tmpvar_25 "PDMR" }
6126 global CONFIG_IUFT_BCH
6127 if { $CONFIG_IUFT_BCH == 1 } then { set tmpvar_25 "BCH" }
6128 global CONFIG_IUFT_TMR
6129 if { $CONFIG_IUFT_TMR == 1 } then { set tmpvar_25 "TMR" }
6130 global tmpvar_26
6131 set tmpvar_26 "2"
6132 global CONFIG_DSU_ETHSZ1
6133 if { $CONFIG_DSU_ETHSZ1 == 1 } then { set tmpvar_26 "1" }
6134 global CONFIG_DSU_ETHSZ2
6135 if { $CONFIG_DSU_ETHSZ2 == 1 } then { set tmpvar_26 "2" }
6136 global CONFIG_DSU_ETHSZ4
6137 if { $CONFIG_DSU_ETHSZ4 == 1 } then { set tmpvar_26 "4" }
6138 global CONFIG_DSU_ETHSZ8
6139 if { $CONFIG_DSU_ETHSZ8 == 1 } then { set tmpvar_26 "8" }
6140 global CONFIG_DSU_ETHSZ16
6141 if { $CONFIG_DSU_ETHSZ16 == 1 } then { set tmpvar_26 "16" }
6142 global tmpvar_27
6143 set tmpvar_27 "4"
6144 global CONFIG_AHBRAM_SZ1
6145 if { $CONFIG_AHBRAM_SZ1 == 1 } then { set tmpvar_27 "1" }
6146 global CONFIG_AHBRAM_SZ2
6147 if { $CONFIG_AHBRAM_SZ2 == 1 } then { set tmpvar_27 "2" }
6148 global CONFIG_AHBRAM_SZ4
6149 if { $CONFIG_AHBRAM_SZ4 == 1 } then { set tmpvar_27 "4" }
6150 global CONFIG_AHBRAM_SZ8
6151 if { $CONFIG_AHBRAM_SZ8 == 1 } then { set tmpvar_27 "8" }
6152 global CONFIG_AHBRAM_SZ16
6153 if { $CONFIG_AHBRAM_SZ16 == 1 } then { set tmpvar_27 "16" }
6154 global CONFIG_AHBRAM_SZ32
6155 if { $CONFIG_AHBRAM_SZ32 == 1 } then { set tmpvar_27 "32" }
6156 global CONFIG_AHBRAM_SZ64
6157 if { $CONFIG_AHBRAM_SZ64 == 1 } then { set tmpvar_27 "64" }
6158 global tmpvar_28
6159 set tmpvar_28 "8"
6160 global CONFIG_GRETH_FIFO4
6161 if { $CONFIG_GRETH_FIFO4 == 1 } then { set tmpvar_28 "4" }
6162 global CONFIG_GRETH_FIFO8
6163 if { $CONFIG_GRETH_FIFO8 == 1 } then { set tmpvar_28 "8" }
6164 global CONFIG_GRETH_FIFO16
6165 if { $CONFIG_GRETH_FIFO16 == 1 } then { set tmpvar_28 "16" }
6166 global CONFIG_GRETH_FIFO32
6167 if { $CONFIG_GRETH_FIFO32 == 1 } then { set tmpvar_28 "32" }
6168 global CONFIG_GRETH_FIFO64
6169 if { $CONFIG_GRETH_FIFO64 == 1 } then { set tmpvar_28 "64" }
6170 global tmpvar_29
6171 set tmpvar_29 "1"
6172 global CONFIG_UA1_FIFO1
6173 if { $CONFIG_UA1_FIFO1 == 1 } then { set tmpvar_29 "1" }
6174 global CONFIG_UA1_FIFO2
6175 if { $CONFIG_UA1_FIFO2 == 1 } then { set tmpvar_29 "2" }
6176 global CONFIG_UA1_FIFO4
6177 if { $CONFIG_UA1_FIFO4 == 1 } then { set tmpvar_29 "4" }
6178 global CONFIG_UA1_FIFO8
6179 if { $CONFIG_UA1_FIFO8 == 1 } then { set tmpvar_29 "8" }
6180 global CONFIG_UA1_FIFO16
6181 if { $CONFIG_UA1_FIFO16 == 1 } then { set tmpvar_29 "16" }
6182 global CONFIG_UA1_FIFO32
6183 if { $CONFIG_UA1_FIFO32 == 1 } then { set tmpvar_29 "32" }
6184 global tmpvar_30
6185 set tmpvar_30 "None"
6186 global CONFIG_SPICTRL_NOFT
6187 if { $CONFIG_SPICTRL_NOFT == 1 } then { set tmpvar_30 "None" }
6188 global CONFIG_SPICTRL_DMRFT
6189 if { $CONFIG_SPICTRL_DMRFT == 1 } then { set tmpvar_30 "Parity-DMR" }
6190 global CONFIG_SPICTRL_TMRFT
6191 if { $CONFIG_SPICTRL_TMRFT == 1 } then { set tmpvar_30 "TMR" }
6192 }
6193
6194
6195 proc update_define_mainmenu {} {
6196 global CONFIG_MODULES
6197 global CONFIG_LEON3FT_PRESENT
6198 global CONFIG_HAS_SHARED_GRFPU
6199 global CONSTANT_Y
6200 set CONFIG_LEON3FT_PRESENT $CONSTANT_Y
6201 set CONFIG_HAS_SHARED_GRFPU $CONSTANT_Y
6202 }
6203
6204
6205 # FILE: tail.tk
6206 # This file is boilerplate TCL/TK function definitions for 'make xconfig'.
6207 #
6208 # CHANGES
6209 # =======
6210 #
6211 # 8 January 1998, Michael Elizabeth Chastain, <mec@shout.net>
6212 # Arrange buttons in three columns for better screen fitting.
6213 #
6214
6215 #
6216 # Read the user's settings from .config. These will override whatever is
6217 # in config.in. Don't do this if the user specified a -D to force
6218 # the defaults.
6219 #
6220
6221 set defaults defconfig
6222
6223 if { [file readable .config] == 1} then {
6224 if { $argc > 0 } then {
6225 if { [lindex $argv 0] != "-D" } then {
6226 read_config .config
6227 }
6228 else
6229 {
6230 read_config $defaults
6231 }
6232 } else {
6233 read_config .config
6234 }
6235 } else {
6236 read_config $defaults
6237 }
6238
6239 update_define 1 $total_menus 0
6240 update_mainmenu
6241
6242 button .f0.right.save -anchor w -text "Save and Exit" -underline 0\
6243 -command { catch {exec cp -f .config .config.old}; \
6244 writeconfig .config config.h; wrapup .wrap }
6245
6246 button .f0.right.quit -anchor w -text "Quit Without Saving" -underline 0\
6247 -command { maybe_exit .maybe }
6248
6249 button .f0.right.load -anchor w -text "Load Configuration from File" \
6250 -command { load_configfile .load "Load Configuration from file" read_config_file
6251 }
6252
6253 button .f0.right.store -anchor w -text "Store Configuration to File" \
6254 -command { load_configfile .load "Store Configuration to file" write_config_file }
6255
6256 #
6257 # Now pack everything.
6258 #
6259
6260 pack .f0.right.store .f0.right.load .f0.right.quit .f0.right.save \
6261 -padx 0 -pady 0 -side bottom -fill x
6262 pack .f0.left .f0.middle .f0.right -side left -padx 5 -pady 0 -fill y
6263 pack .f0 -padx 5 -pady 5
6264
6265 update idletasks
6266 set winy [expr 10 + [winfo reqheight .f0]]
6267 set scry [lindex [wm maxsize .] 1]
6268 set winx [expr 10 + [winfo reqwidth .f0]]
6269 set scrx [lindex [wm maxsize .] 0]
6270 if {$winx < $scrx} then {set maxx -1} else {set maxx $winx}
6271 if {$winy < $scry} then {set maxy -1} else {set maxy $winy}
6272 .f0 configure -width $winx -height $winy
6273 wm maxsize . $maxx $maxy
6274
6275 #
6276 # If we cannot write our config files, disable the write button.
6277 #
6278 if { [file exists .config] == 1 } then {
6279 if { [file writable .config] == 0 } then {
6280 .f0.right.save configure -state disabled
6281 }
6282 } else {
6283 if { [file writable .] == 0 } then {
6284 .f0.right.save configure -state disabled
6285 }
6286 }
6287
6288 #if { [file exists include/linux/autoconf.h] == 1 } then {
6289 # if { [file writable include/linux/autoconf.h] == 0 } then {
6290 # .f0.right.save configure -state disabled
6291 # }
6292 # } else {
6293 # if { [file writable include/linux/] == 0 } then {
6294 # .f0.right.save configure -state disabled
6295 # }
6296 # }
@@ -0,0 +1,9
1
2 NET "clk27" TNM_NET = "clk27";
3 TIMESPEC "TS_clk27" = PERIOD "clk27" 37.00 ns HIGH 50 %;
4
5 NET "clk200p" TNM_NET = "clk200p";
6 TIMESPEC "TS_clk200p" = PERIOD "clk200p" 5.00 ns HIGH 50 %;
7
8 NET "erx_clk" TNM_NET = "erx_clk";
9 TIMESPEC "TS_erx_clk" = PERIOD "erx_clk" 8.00 ns HIGH 50 %;
@@ -0,0 +1,18
1
2 main()
3
4 {
5 report_start();
6
7
8 // svgactrl_test(0x80000600, 1, 0, 0x40200000, -1, 0, 0);
9 base_test();
10 /*
11 greth_test(0x80000e00);
12 spw_test(0x80100A00);
13 spw_test(0x80100B00);
14 spw_test(0x80100C00);
15 svgactrl_test(0x80000600, 1, 0, 0x40200000, -1, 0, 0);
16 */
17 report_end();
18 }
@@ -0,0 +1,325
1 -----------------------------------------------------------------------------
2 -- LEON3 Demonstration design test bench
3 -- Copyright (C) 2004 Jiri Gaisler, Gaisler Research
4 ------------------------------------------------------------------------------
5 -- This file is a part of the GRLIB VHDL IP LIBRARY
6 -- Copyright (C) 2003 - 2008, Gaisler Research
7 -- Copyright (C) 2008 - 2012, Aeroflex Gaisler
8 --
9 -- This program is free software; you can redistribute it and/or modify
10 -- it under the terms of the GNU General Public License as published by
11 -- the Free Software Foundation; either version 2 of the License, or
12 -- (at your option) any later version.
13 --
14 -- This program is distributed in the hope that it will be useful,
15 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
16 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 -- GNU General Public License for more details.
18 --
19 -- You should have received a copy of the GNU General Public License
20 -- along with this program; if not, write to the Free Software
21 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 ------------------------------------------------------------------------------
23
24 library ieee;
25 use ieee.std_logic_1164.all;
26 library gaisler;
27 use gaisler.libdcom.all;
28 use gaisler.sim.all;
29 library techmap;
30 use techmap.gencomp.all;
31 use work.debug.all;
32 library hynix;
33 use hynix.components.all;
34 library micron;
35
36 use work.config.all; -- configuration
37
38 entity testbench is
39 generic (
40 fabtech : integer := CFG_FABTECH;
41 memtech : integer := CFG_MEMTECH;
42 padtech : integer := CFG_PADTECH;
43 clktech : integer := CFG_CLKTECH;
44 disas : integer := CFG_DISAS; -- Enable disassembly to console
45 dbguart : integer := CFG_DUART; -- Print UART on console
46 pclow : integer := CFG_PCLOW
47
48 );
49 end;
50
51 architecture behav of testbench is
52
53 constant promfile : string := "prom.srec"; -- rom contents
54 constant sramfile : string := "sram.srec"; -- ram contents
55 constant sdramfile : string := "sdram.srec"; -- sdram contents
56
57 signal clk : std_logic := '0';
58 signal Rst : std_logic := '0'; -- Reset
59 constant ct : integer := 40;
60
61 signal address : std_logic_vector(24 downto 0);
62 signal data : std_logic_vector(15 downto 0);
63 signal button : std_logic_vector(3 downto 0) := "0000";
64 signal genio : std_logic_vector(59 downto 0);
65 signal romsn : std_logic;
66 signal oen : std_ulogic;
67 signal writen : std_ulogic;
68 signal GND : std_ulogic := '0';
69 signal VCC : std_ulogic := '1';
70 signal NC : std_ulogic := 'Z';
71
72 signal txd1, rxd1 : std_logic;
73 signal txd2, rxd2 : std_logic;
74 signal ctsn1, rtsn1 : std_ulogic;
75 signal ctsn2, rtsn2 : std_ulogic;
76
77 signal phy_mii_data: std_logic; -- ethernet PHY interface
78 signal phy_tx_clk : std_ulogic;
79 signal phy_rx_clk : std_ulogic;
80 signal phy_rx_data : std_logic_vector(7 downto 0);
81 signal phy_dv : std_ulogic;
82 signal phy_rx_er : std_ulogic;
83 signal phy_col : std_ulogic;
84 signal phy_crs : std_ulogic;
85 signal phy_tx_data : std_logic_vector(7 downto 0);
86 signal phy_tx_en : std_ulogic;
87 signal phy_tx_er : std_ulogic;
88 signal phy_mii_clk : std_ulogic;
89 signal phy_rst_n : std_ulogic;
90 signal phy_gtx_clk : std_ulogic;
91 signal phy_mii_int_n : std_ulogic;
92
93 signal clk27 : std_ulogic := '0';
94 signal clk200p : std_ulogic := '0';
95 signal clk200n : std_ulogic := '1';
96 signal clk33 : std_ulogic := '0';
97
98 signal iic_scl : std_ulogic;
99 signal iic_sda : std_ulogic;
100 signal ddc_scl : std_ulogic;
101 signal ddc_sda : std_ulogic;
102 signal dvi_iic_scl : std_logic;
103 signal dvi_iic_sda : std_logic;
104
105 signal tft_lcd_data : std_logic_vector(11 downto 0);
106 signal tft_lcd_clk_p : std_ulogic;
107 signal tft_lcd_clk_n : std_ulogic;
108 signal tft_lcd_hsync : std_ulogic;
109 signal tft_lcd_vsync : std_ulogic;
110 signal tft_lcd_de : std_ulogic;
111 signal tft_lcd_reset_b : std_ulogic;
112
113 -- DDR2 memory
114 signal ddr_clk : std_logic;
115 signal ddr_clkb : std_logic;
116 signal ddr_clk_fb : std_logic;
117 signal ddr_cke : std_logic;
118 signal ddr_csb : std_logic := '0';
119 signal ddr_we : std_ulogic; -- write enable
120 signal ddr_ras : std_ulogic; -- ras
121 signal ddr_cas : std_ulogic; -- cas
122 signal ddr_dm : std_logic_vector(1 downto 0); -- dm
123 signal ddr_dqs : std_logic_vector(1 downto 0); -- dqs
124 signal ddr_dqsn : std_logic_vector(1 downto 0); -- dqsn
125 signal ddr3_tdqs_n : std_logic_vector(1 downto 0); -- dqsn
126 signal ddr_ad : std_logic_vector(12 downto 0); -- address
127 signal ddr_ba : std_logic_vector(2 downto 0); -- bank address
128 signal ddr_dq : std_logic_vector(15 downto 0); -- data
129 signal ddr_dq2 : std_logic_vector(15 downto 0); -- data
130 signal ddr_odt : std_logic;
131 signal ddr_reset_n: std_logic;
132 signal ddr_rzq : std_logic;
133 signal ddr_zio : std_logic;
134
135
136 -- SPI flash
137 signal spi_sel_n : std_ulogic;
138 signal spi_clk : std_ulogic;
139 signal spi_mosi : std_ulogic;
140
141 signal dsurst : std_ulogic;
142 signal errorn : std_logic;
143
144 signal switch : std_logic_vector(3 downto 0); -- I/O port
145 signal led : std_logic_vector(3 downto 0); -- I/O port
146 constant lresp : boolean := false;
147
148 begin
149
150 -- clock and reset
151
152 clk27 <= not clk27 after ct * 1 ns;
153 clk33 <= not clk33 after 15 ns;
154 clk200p <= not clk200p after 2.5 ns;
155 clk200n <= not clk200n after 2.5 ns;
156 rst <= not dsurst;
157 rxd1 <= 'H'; ctsn1 <= '0';
158 rxd2 <= 'H'; ctsn2 <= '0';
159 button <= "0000";
160 switch <= "0000";
161
162 cpu : entity work.leon3mp
163 generic map ( fabtech, memtech, padtech, clktech,
164 disas, dbguart, pclow )
165 port map (rst, clk27, clk200p, clk200n, clk33, address(24 downto 1),
166 data, oen, writen, romsn,
167 ddr_clk, ddr_clkb, ddr_cke, ddr_odt, ddr_reset_n, ddr_we, ddr_ras, ddr_cas, ddr_dm,
168 ddr_dqs, ddr_dqsn, ddr_ad, ddr_ba, ddr_dq, ddr_rzq, ddr_zio,
169 txd1, rxd1, ctsn1, rtsn1, button,
170 switch, led,
171 phy_gtx_clk, phy_mii_data, phy_tx_clk, phy_rx_clk,
172 phy_rx_data, phy_dv, phy_rx_er, phy_col, phy_crs, phy_tx_data,
173 phy_tx_en, phy_tx_er, phy_mii_clk, phy_rst_n, phy_mii_int_n,
174 iic_scl, iic_sda, ddc_scl, ddc_sda,
175 dvi_iic_scl, dvi_iic_sda,
176 tft_lcd_data, tft_lcd_clk_p, tft_lcd_clk_n, tft_lcd_hsync,
177 tft_lcd_vsync, tft_lcd_de, tft_lcd_reset_b,
178 spi_sel_n, spi_clk, spi_mosi
179 );
180
181 -- prom0 : sram generic map (index => 6, abits => romdepth, fname => promfile)
182 -- port map (address(romdepth-1 downto 0), data(31 downto 24), romsn,
183 -- writen, oen);
184
185 prom0 : for i in 0 to 1 generate
186 sr0 : sram generic map (index => i+4, abits => 24, fname => promfile)
187 port map (address(24 downto 1), data(15-i*8 downto 8-i*8), romsn,
188 writen, oen);
189 end generate;
190 address(0) <= '0';
191
192 u1 : entity micron.ddr3
193 port map ( rst_n => ddr_reset_n, dq => ddr_dq,
194 tdqs_n => ddr3_tdqs_n,
195 dqs => ddr_dqs, dqs_n => ddr_dqsn,
196 dm_tdqs => ddr_dm, we_n => ddr_we, cas_n => ddr_cas,
197 ras_n => ddr_ras, cs_n => ddr_csb, ba => ddr_ba,
198 addr => ddr_ad(12 downto 0), cke => ddr_cke,
199 ck => ddr_clk, ck_n => ddr_clkb, odt => ddr_odt) ;
200
201 errorn <= led(1);
202 errorn <= 'H'; -- ERROR pull-up
203
204 phy0 : if (CFG_GRETH = 1) generate
205 phy_mii_data <= 'H';
206 p0: phy
207 generic map (address => 7)
208 port map(phy_rst_n, phy_mii_data, phy_tx_clk, phy_rx_clk, phy_rx_data,
209 phy_dv, phy_rx_er, phy_col, phy_crs, phy_tx_data, phy_tx_en,
210 phy_tx_er, phy_mii_clk, phy_gtx_clk);
211 end generate;
212
213 iuerr : process
214 begin
215 wait for 5000 ns;
216 if to_x01(errorn) = '1' then wait on errorn; end if;
217 assert (to_x01(errorn) = '1')
218 report "*** IU in error mode, simulation halted ***"
219 severity failure ;
220 end process;
221
222 data <= buskeep(data) after 5 ns;
223
224 dsucom : process
225 procedure dsucfg(signal dsurx : in std_ulogic; signal dsutx : out std_ulogic) is
226 variable w32 : std_logic_vector(31 downto 0);
227 variable c8 : std_logic_vector(7 downto 0);
228 constant txp : time := 320 * 1 ns;
229 begin
230 dsutx <= '1';
231 dsurst <= '0';
232 wait for 2500 ns;
233 dsurst <= '1';
234 wait;
235 wait for 5000 ns;
236 txc(dsutx, 16#55#, txp); -- sync uart
237
238 txc(dsutx, 16#c0#, txp);
239 txa(dsutx, 16#90#, 16#00#, 16#00#, 16#00#, txp);
240 txa(dsutx, 16#00#, 16#00#, 16#20#, 16#2e#, txp);
241
242 wait for 25000 ns;
243 txc(dsutx, 16#c0#, txp);
244 txa(dsutx, 16#90#, 16#00#, 16#00#, 16#20#, txp);
245 txa(dsutx, 16#00#, 16#00#, 16#00#, 16#01#, txp);
246
247 txc(dsutx, 16#c0#, txp);
248 txa(dsutx, 16#90#, 16#40#, 16#00#, 16#24#, txp);
249 txa(dsutx, 16#00#, 16#00#, 16#00#, 16#0D#, txp);
250
251 txc(dsutx, 16#c0#, txp);
252 txa(dsutx, 16#90#, 16#70#, 16#11#, 16#78#, txp);
253 txa(dsutx, 16#91#, 16#00#, 16#00#, 16#0D#, txp);
254
255 txa(dsutx, 16#90#, 16#40#, 16#00#, 16#44#, txp);
256 txa(dsutx, 16#00#, 16#00#, 16#20#, 16#00#, txp);
257
258 txc(dsutx, 16#80#, txp);
259 txa(dsutx, 16#90#, 16#40#, 16#00#, 16#44#, txp);
260
261 wait;
262 txc(dsutx, 16#c0#, txp);
263 txa(dsutx, 16#00#, 16#00#, 16#0a#, 16#aa#, txp);
264 txa(dsutx, 16#00#, 16#55#, 16#00#, 16#55#, txp);
265 txc(dsutx, 16#c0#, txp);
266 txa(dsutx, 16#00#, 16#00#, 16#0a#, 16#a0#, txp);
267 txa(dsutx, 16#01#, 16#02#, 16#09#, 16#33#, txp);
268
269 txc(dsutx, 16#c0#, txp);
270 txa(dsutx, 16#90#, 16#00#, 16#00#, 16#00#, txp);
271 txa(dsutx, 16#00#, 16#00#, 16#00#, 16#2e#, txp);
272 txc(dsutx, 16#c0#, txp);
273 txa(dsutx, 16#91#, 16#00#, 16#00#, 16#00#, txp);
274 txa(dsutx, 16#00#, 16#00#, 16#00#, 16#2e#, txp);
275 txc(dsutx, 16#c0#, txp);
276 txa(dsutx, 16#90#, 16#00#, 16#00#, 16#20#, txp);
277 txa(dsutx, 16#00#, 16#00#, 16#00#, 16#0f#, txp);
278 txc(dsutx, 16#c0#, txp);
279 txa(dsutx, 16#90#, 16#00#, 16#00#, 16#20#, txp);
280 txa(dsutx, 16#00#, 16#00#, 16#00#, 16#00#, txp);
281 txc(dsutx, 16#c0#, txp);
282 txa(dsutx, 16#80#, 16#00#, 16#02#, 16#10#, txp);
283 txa(dsutx, 16#00#, 16#00#, 16#00#, 16#0f#, txp);
284
285 txc(dsutx, 16#c0#, txp);
286 txa(dsutx, 16#91#, 16#40#, 16#00#, 16#24#, txp);
287 txa(dsutx, 16#00#, 16#00#, 16#00#, 16#24#, txp);
288 txc(dsutx, 16#c0#, txp);
289 txa(dsutx, 16#91#, 16#70#, 16#00#, 16#00#, txp);
290 txa(dsutx, 16#00#, 16#00#, 16#00#, 16#03#, txp);
291
292
293
294
295
296 txc(dsutx, 16#c0#, txp);
297 txa(dsutx, 16#90#, 16#00#, 16#00#, 16#20#, txp);
298 txa(dsutx, 16#00#, 16#00#, 16#ff#, 16#ff#, txp);
299
300 txc(dsutx, 16#c0#, txp);
301 txa(dsutx, 16#90#, 16#40#, 16#00#, 16#48#, txp);
302 txa(dsutx, 16#00#, 16#00#, 16#00#, 16#12#, txp);
303
304 txc(dsutx, 16#c0#, txp);
305 txa(dsutx, 16#90#, 16#40#, 16#00#, 16#60#, txp);
306 txa(dsutx, 16#00#, 16#00#, 16#12#, 16#10#, txp);
307
308 txc(dsutx, 16#80#, txp);
309 txa(dsutx, 16#90#, 16#00#, 16#00#, 16#00#, txp);
310 rxi(dsurx, w32, txp, lresp);
311
312 txc(dsutx, 16#a0#, txp);
313 txa(dsutx, 16#40#, 16#00#, 16#00#, 16#00#, txp);
314 rxi(dsurx, w32, txp, lresp);
315
316 end;
317
318 begin
319
320 dsucfg(txd2, rxd2);
321
322 wait;
323 end process;
324 end ;
325
This diff has been collapsed as it changes many lines, (1051 lines changed) Show them Hide them
@@ -0,0 +1,1051
1 #if defined CONFIG_SYN_INFERRED
2 #define CONFIG_SYN_TECH inferred
3 #elif defined CONFIG_SYN_UMC
4 #define CONFIG_SYN_TECH umc
5 #elif defined CONFIG_SYN_RHUMC
6 #define CONFIG_SYN_TECH rhumc
7 #elif defined CONFIG_SYN_ATC18
8 #define CONFIG_SYN_TECH atc18s
9 #elif defined CONFIG_SYN_ATC18RHA
10 #define CONFIG_SYN_TECH atc18rha
11 #elif defined CONFIG_SYN_AXCEL
12 #define CONFIG_SYN_TECH axcel
13 #elif defined CONFIG_SYN_AXDSP
14 #define CONFIG_SYN_TECH axdsp
15 #elif defined CONFIG_SYN_PROASICPLUS
16 #define CONFIG_SYN_TECH proasic
17 #elif defined CONFIG_SYN_ALTERA
18 #define CONFIG_SYN_TECH altera
19 #elif defined CONFIG_SYN_STRATIX
20 #define CONFIG_SYN_TECH stratix1
21 #elif defined CONFIG_SYN_STRATIXII
22 #define CONFIG_SYN_TECH stratix2
23 #elif defined CONFIG_SYN_STRATIXIII
24 #define CONFIG_SYN_TECH stratix3
25 #elif defined CONFIG_SYN_CYCLONEIII
26 #define CONFIG_SYN_TECH cyclone3
27 #elif defined CONFIG_SYN_EASIC45
28 #define CONFIG_SYN_TECH easic45
29 #elif defined CONFIG_SYN_EASIC90
30 #define CONFIG_SYN_TECH easic90
31 #elif defined CONFIG_SYN_IHP25
32 #define CONFIG_SYN_TECH ihp25
33 #elif defined CONFIG_SYN_IHP25RH
34 #define CONFIG_SYN_TECH ihp25rh
35 #elif defined CONFIG_SYN_CMOS9SF
36 #define CONFIG_SYN_TECH cmos9sf
37 #elif defined CONFIG_SYN_LATTICE
38 #define CONFIG_SYN_TECH lattice
39 #elif defined CONFIG_SYN_ECLIPSE
40 #define CONFIG_SYN_TECH eclipse
41 #elif defined CONFIG_SYN_PEREGRINE
42 #define CONFIG_SYN_TECH peregrine
43 #elif defined CONFIG_SYN_PROASIC
44 #define CONFIG_SYN_TECH proasic
45 #elif defined CONFIG_SYN_PROASIC3
46 #define CONFIG_SYN_TECH apa3
47 #elif defined CONFIG_SYN_PROASIC3E
48 #define CONFIG_SYN_TECH apa3e
49 #elif defined CONFIG_SYN_PROASIC3L
50 #define CONFIG_SYN_TECH apa3l
51 #elif defined CONFIG_SYN_IGLOO
52 #define CONFIG_SYN_TECH apa3
53 #elif defined CONFIG_SYN_FUSION
54 #define CONFIG_SYN_TECH actfus
55 #elif defined CONFIG_SYN_SPARTAN2
56 #define CONFIG_SYN_TECH virtex
57 #elif defined CONFIG_SYN_VIRTEX
58 #define CONFIG_SYN_TECH virtex
59 #elif defined CONFIG_SYN_VIRTEXE
60 #define CONFIG_SYN_TECH virtex
61 #elif defined CONFIG_SYN_SPARTAN3
62 #define CONFIG_SYN_TECH spartan3
63 #elif defined CONFIG_SYN_SPARTAN3E
64 #define CONFIG_SYN_TECH spartan3e
65 #elif defined CONFIG_SYN_SPARTAN6
66 #define CONFIG_SYN_TECH spartan6
67 #elif defined CONFIG_SYN_VIRTEX2
68 #define CONFIG_SYN_TECH virtex2
69 #elif defined CONFIG_SYN_VIRTEX4
70 #define CONFIG_SYN_TECH virtex4
71 #elif defined CONFIG_SYN_VIRTEX5
72 #define CONFIG_SYN_TECH virtex5
73 #elif defined CONFIG_SYN_VIRTEX6
74 #define CONFIG_SYN_TECH virtex6
75 #elif defined CONFIG_SYN_RH_LIB18T
76 #define CONFIG_SYN_TECH rhlib18t
77 #elif defined CONFIG_SYN_SMIC13
78 #define CONFIG_SYN_TECH smic013
79 #elif defined CONFIG_SYN_UT025CRH
80 #define CONFIG_SYN_TECH ut25
81 #elif defined CONFIG_SYN_UT130HBD
82 #define CONFIG_SYN_TECH ut130
83 #elif defined CONFIG_SYN_UT90NHBD
84 #define CONFIG_SYN_TECH ut90
85 #elif defined CONFIG_SYN_TSMC90
86 #define CONFIG_SYN_TECH tsmc90
87 #elif defined CONFIG_SYN_TM65GPLUS
88 #define CONFIG_SYN_TECH tm65gpl
89 #elif defined CONFIG_SYN_CUSTOM1
90 #define CONFIG_SYN_TECH custom1
91 #else
92 #error "unknown target technology"
93 #endif
94
95 #if defined CONFIG_SYN_INFER_RAM
96 #define CFG_RAM_TECH inferred
97 #elif defined CONFIG_MEM_UMC
98 #define CFG_RAM_TECH umc
99 #elif defined CONFIG_MEM_RHUMC
100 #define CFG_RAM_TECH rhumc
101 #elif defined CONFIG_MEM_VIRAGE
102 #define CFG_RAM_TECH memvirage
103 #elif defined CONFIG_MEM_ARTISAN
104 #define CFG_RAM_TECH memartisan
105 #elif defined CONFIG_MEM_CUSTOM1
106 #define CFG_RAM_TECH custom1
107 #elif defined CONFIG_MEM_VIRAGE90
108 #define CFG_RAM_TECH memvirage90
109 #elif defined CONFIG_MEM_INFERRED
110 #define CFG_RAM_TECH inferred
111 #else
112 #define CFG_RAM_TECH CONFIG_SYN_TECH
113 #endif
114
115 #if defined CONFIG_SYN_INFER_PADS
116 #define CFG_PAD_TECH inferred
117 #else
118 #define CFG_PAD_TECH CONFIG_SYN_TECH
119 #endif
120
121 #ifndef CONFIG_SYN_NO_ASYNC
122 #define CONFIG_SYN_NO_ASYNC 0
123 #endif
124
125 #ifndef CONFIG_SYN_SCAN
126 #define CONFIG_SYN_SCAN 0
127 #endif
128
129
130 #if defined CONFIG_CLK_ALTDLL
131 #define CFG_CLK_TECH CONFIG_SYN_TECH
132 #elif defined CONFIG_CLK_HCLKBUF
133 #define CFG_CLK_TECH axcel
134 #elif defined CONFIG_CLK_LATDLL
135 #define CFG_CLK_TECH lattice
136 #elif defined CONFIG_CLK_PRO3PLL
137 #define CFG_CLK_TECH apa3
138 #elif defined CONFIG_CLK_PRO3EPLL
139 #define CFG_CLK_TECH apa3e
140 #elif defined CONFIG_CLK_PRO3LPLL
141 #define CFG_CLK_TECH apa3l
142 #elif defined CONFIG_CLK_FUSPLL
143 #define CFG_CLK_TECH actfus
144 #elif defined CONFIG_CLK_CLKDLL
145 #define CFG_CLK_TECH virtex
146 #elif defined CONFIG_CLK_DCM
147 #define CFG_CLK_TECH CONFIG_SYN_TECH
148 #elif defined CONFIG_CLK_LIB18T
149 #define CFG_CLK_TECH rhlib18t
150 #elif defined CONFIG_CLK_RHUMC
151 #define CFG_CLK_TECH rhumc
152 #elif defined CONFIG_CLK_UT130HBD
153 #define CFG_CLK_TECH ut130
154 #else
155 #define CFG_CLK_TECH inferred
156 #endif
157
158 #ifndef CONFIG_CLK_MUL
159 #define CONFIG_CLK_MUL 2
160 #endif
161
162 #ifndef CONFIG_CLK_DIV
163 #define CONFIG_CLK_DIV 2
164 #endif
165
166 #ifndef CONFIG_OCLK_DIV
167 #define CONFIG_OCLK_DIV 1
168 #endif
169
170 #ifndef CONFIG_OCLKB_DIV
171 #define CONFIG_OCLKB_DIV 0
172 #endif
173
174 #ifndef CONFIG_OCLKC_DIV
175 #define CONFIG_OCLKC_DIV 0
176 #endif
177
178 #ifndef CONFIG_PCI_CLKDLL
179 #define CONFIG_PCI_CLKDLL 0
180 #endif
181
182 #ifndef CONFIG_PCI_SYSCLK
183 #define CONFIG_PCI_SYSCLK 0
184 #endif
185
186 #ifndef CONFIG_CLK_NOFB
187 #define CONFIG_CLK_NOFB 0
188 #endif
189 #ifndef CONFIG_LEON3
190 #define CONFIG_LEON3 0
191 #endif
192
193 #ifndef CONFIG_PROC_NUM
194 #define CONFIG_PROC_NUM 1
195 #endif
196
197 #ifndef CONFIG_IU_NWINDOWS
198 #define CONFIG_IU_NWINDOWS 8
199 #endif
200
201 #ifndef CONFIG_IU_RSTADDR
202 #define CONFIG_IU_RSTADDR 8
203 #endif
204
205 #ifndef CONFIG_IU_LDELAY
206 #define CONFIG_IU_LDELAY 1
207 #endif
208
209 #ifndef CONFIG_IU_WATCHPOINTS
210 #define CONFIG_IU_WATCHPOINTS 0
211 #endif
212
213 #ifdef CONFIG_IU_V8MULDIV
214 #ifdef CONFIG_IU_MUL_LATENCY_4
215 #define CFG_IU_V8 1
216 #elif defined CONFIG_IU_MUL_LATENCY_5
217 #define CFG_IU_V8 2
218 #elif defined CONFIG_IU_MUL_LATENCY_2
219 #define CFG_IU_V8 16#32#
220 #endif
221 #else
222 #define CFG_IU_V8 0
223 #endif
224
225 #ifdef CONFIG_IU_MUL_MODGEN
226 #define CFG_IU_MUL_STRUCT 1
227 #elif defined CONFIG_IU_MUL_TECHSPEC
228 #define CFG_IU_MUL_STRUCT 2
229 #elif defined CONFIG_IU_MUL_DW
230 #define CFG_IU_MUL_STRUCT 3
231 #else
232 #define CFG_IU_MUL_STRUCT 0
233 #endif
234
235 #ifndef CONFIG_PWD
236 #define CONFIG_PWD 0
237 #endif
238
239 #ifndef CONFIG_IU_MUL_MAC
240 #define CONFIG_IU_MUL_MAC 0
241 #endif
242
243 #ifndef CONFIG_IU_BP
244 #define CONFIG_IU_BP 0
245 #endif
246
247 #ifndef CONFIG_NOTAG
248 #define CONFIG_NOTAG 0
249 #endif
250
251 #ifndef CONFIG_IU_SVT
252 #define CONFIG_IU_SVT 0
253 #endif
254
255 #if defined CONFIG_FPU_GRFPC1
256 #define CONFIG_FPU_GRFPC 1
257 #elif defined CONFIG_FPU_GRFPC2
258 #define CONFIG_FPU_GRFPC 2
259 #else
260 #define CONFIG_FPU_GRFPC 0
261 #endif
262
263 #if defined CONFIG_FPU_GRFPU_INFMUL
264 #define CONFIG_FPU_GRFPU_MUL 0
265 #elif defined CONFIG_FPU_GRFPU_DWMUL
266 #define CONFIG_FPU_GRFPU_MUL 1
267 #elif defined CONFIG_FPU_GRFPU_MODGEN
268 #define CONFIG_FPU_GRFPU_MUL 2
269 #elif defined CONFIG_FPU_GRFPU_TECHSPEC
270 #define CONFIG_FPU_GRFPU_MUL 3
271 #else
272 #define CONFIG_FPU_GRFPU_MUL 0
273 #endif
274
275 #if defined CONFIG_FPU_GRFPU_SH
276 #define CONFIG_FPU_GRFPU_SHARED 1
277 #else
278 #define CONFIG_FPU_GRFPU_SHARED 0
279 #endif
280
281 #if defined CONFIG_FPU_GRFPU
282 #define CONFIG_FPU (1+CONFIG_FPU_GRFPU_MUL)
283 #elif defined CONFIG_FPU_MEIKO
284 #define CONFIG_FPU 15
285 #elif defined CONFIG_FPU_GRFPULITE
286 #define CONFIG_FPU (8+CONFIG_FPU_GRFPC)
287 #else
288 #define CONFIG_FPU 0
289 #endif
290
291 #ifndef CONFIG_FPU_NETLIST
292 #define CONFIG_FPU_NETLIST 0
293 #endif
294
295 #ifndef CONFIG_ICACHE_ENABLE
296 #define CONFIG_ICACHE_ENABLE 0
297 #endif
298
299 #if defined CONFIG_ICACHE_ASSO1
300 #define CFG_IU_ISETS 1
301 #elif defined CONFIG_ICACHE_ASSO2
302 #define CFG_IU_ISETS 2
303 #elif defined CONFIG_ICACHE_ASSO3
304 #define CFG_IU_ISETS 3
305 #elif defined CONFIG_ICACHE_ASSO4
306 #define CFG_IU_ISETS 4
307 #else
308 #define CFG_IU_ISETS 1
309 #endif
310
311 #if defined CONFIG_ICACHE_SZ1
312 #define CFG_ICACHE_SZ 1
313 #elif defined CONFIG_ICACHE_SZ2
314 #define CFG_ICACHE_SZ 2
315 #elif defined CONFIG_ICACHE_SZ4
316 #define CFG_ICACHE_SZ 4
317 #elif defined CONFIG_ICACHE_SZ8
318 #define CFG_ICACHE_SZ 8
319 #elif defined CONFIG_ICACHE_SZ16
320 #define CFG_ICACHE_SZ 16
321 #elif defined CONFIG_ICACHE_SZ32
322 #define CFG_ICACHE_SZ 32
323 #elif defined CONFIG_ICACHE_SZ64
324 #define CFG_ICACHE_SZ 64
325 #elif defined CONFIG_ICACHE_SZ128
326 #define CFG_ICACHE_SZ 128
327 #elif defined CONFIG_ICACHE_SZ256
328 #define CFG_ICACHE_SZ 256
329 #else
330 #define CFG_ICACHE_SZ 1
331 #endif
332
333 #ifdef CONFIG_ICACHE_LZ16
334 #define CFG_ILINE_SZ 4
335 #else
336 #define CFG_ILINE_SZ 8
337 #endif
338
339 #if defined CONFIG_ICACHE_ALGODIR
340 #define CFG_ICACHE_ALGORND 3
341 #elif defined CONFIG_ICACHE_ALGORND
342 #define CFG_ICACHE_ALGORND 2
343 #elif defined CONFIG_ICACHE_ALGOLRR
344 #define CFG_ICACHE_ALGORND 1
345 #else
346 #define CFG_ICACHE_ALGORND 0
347 #endif
348
349 #ifndef CONFIG_ICACHE_LOCK
350 #define CONFIG_ICACHE_LOCK 0
351 #endif
352
353 #ifndef CONFIG_ICACHE_LRAM
354 #define CONFIG_ICACHE_LRAM 0
355 #endif
356
357 #ifndef CONFIG_ICACHE_LRSTART
358 #define CONFIG_ICACHE_LRSTART 8E
359 #endif
360
361 #if defined CONFIG_ICACHE_LRAM_SZ2
362 #define CFG_ILRAM_SIZE 2
363 #elif defined CONFIG_ICACHE_LRAM_SZ4
364 #define CFG_ILRAM_SIZE 4
365 #elif defined CONFIG_ICACHE_LRAM_SZ8
366 #define CFG_ILRAM_SIZE 8
367 #elif defined CONFIG_ICACHE_LRAM_SZ16
368 #define CFG_ILRAM_SIZE 16
369 #elif defined CONFIG_ICACHE_LRAM_SZ32
370 #define CFG_ILRAM_SIZE 32
371 #elif defined CONFIG_ICACHE_LRAM_SZ64
372 #define CFG_ILRAM_SIZE 64
373 #elif defined CONFIG_ICACHE_LRAM_SZ128
374 #define CFG_ILRAM_SIZE 128
375 #elif defined CONFIG_ICACHE_LRAM_SZ256
376 #define CFG_ILRAM_SIZE 256
377 #else
378 #define CFG_ILRAM_SIZE 1
379 #endif
380
381
382 #ifndef CONFIG_DCACHE_ENABLE
383 #define CONFIG_DCACHE_ENABLE 0
384 #endif
385
386 #if defined CONFIG_DCACHE_ASSO1
387 #define CFG_IU_DSETS 1
388 #elif defined CONFIG_DCACHE_ASSO2
389 #define CFG_IU_DSETS 2
390 #elif defined CONFIG_DCACHE_ASSO3
391 #define CFG_IU_DSETS 3
392 #elif defined CONFIG_DCACHE_ASSO4
393 #define CFG_IU_DSETS 4
394 #else
395 #define CFG_IU_DSETS 1
396 #endif
397
398 #if defined CONFIG_DCACHE_SZ1
399 #define CFG_DCACHE_SZ 1
400 #elif defined CONFIG_DCACHE_SZ2
401 #define CFG_DCACHE_SZ 2
402 #elif defined CONFIG_DCACHE_SZ4
403 #define CFG_DCACHE_SZ 4
404 #elif defined CONFIG_DCACHE_SZ8
405 #define CFG_DCACHE_SZ 8
406 #elif defined CONFIG_DCACHE_SZ16
407 #define CFG_DCACHE_SZ 16
408 #elif defined CONFIG_DCACHE_SZ32
409 #define CFG_DCACHE_SZ 32
410 #elif defined CONFIG_DCACHE_SZ64
411 #define CFG_DCACHE_SZ 64
412 #elif defined CONFIG_DCACHE_SZ128
413 #define CFG_DCACHE_SZ 128
414 #elif defined CONFIG_DCACHE_SZ256
415 #define CFG_DCACHE_SZ 256
416 #else
417 #define CFG_DCACHE_SZ 1
418 #endif
419
420 #ifdef CONFIG_DCACHE_LZ16
421 #define CFG_DLINE_SZ 4
422 #else
423 #define CFG_DLINE_SZ 8
424 #endif
425
426 #if defined CONFIG_DCACHE_ALGODIR
427 #define CFG_DCACHE_ALGORND 3
428 #elif defined CONFIG_DCACHE_ALGORND
429 #define CFG_DCACHE_ALGORND 2
430 #elif defined CONFIG_DCACHE_ALGOLRR
431 #define CFG_DCACHE_ALGORND 1
432 #else
433 #define CFG_DCACHE_ALGORND 0
434 #endif
435
436 #ifndef CONFIG_DCACHE_LOCK
437 #define CONFIG_DCACHE_LOCK 0
438 #endif
439
440 #ifndef CONFIG_DCACHE_SNOOP
441 #define CONFIG_DCACHE_SNOOP 0
442 #endif
443
444 #ifndef CONFIG_DCACHE_SNOOP_FAST
445 #define CONFIG_DCACHE_SNOOP_FAST 0
446 #endif
447
448 #ifndef CONFIG_DCACHE_SNOOP_SEPTAG
449 #define CONFIG_DCACHE_SNOOP_SEPTAG 0
450 #endif
451
452 #ifndef CONFIG_CACHE_FIXED
453 #define CONFIG_CACHE_FIXED 0
454 #endif
455
456 #ifndef CONFIG_DCACHE_LRAM
457 #define CONFIG_DCACHE_LRAM 0
458 #endif
459
460 #ifndef CONFIG_DCACHE_LRSTART
461 #define CONFIG_DCACHE_LRSTART 8F
462 #endif
463
464 #if defined CONFIG_DCACHE_LRAM_SZ2
465 #define CFG_DLRAM_SIZE 2
466 #elif defined CONFIG_DCACHE_LRAM_SZ4
467 #define CFG_DLRAM_SIZE 4
468 #elif defined CONFIG_DCACHE_LRAM_SZ8
469 #define CFG_DLRAM_SIZE 8
470 #elif defined CONFIG_DCACHE_LRAM_SZ16
471 #define CFG_DLRAM_SIZE 16
472 #elif defined CONFIG_DCACHE_LRAM_SZ32
473 #define CFG_DLRAM_SIZE 32
474 #elif defined CONFIG_DCACHE_LRAM_SZ64
475 #define CFG_DLRAM_SIZE 64
476 #elif defined CONFIG_DCACHE_LRAM_SZ128
477 #define CFG_DLRAM_SIZE 128
478 #elif defined CONFIG_DCACHE_LRAM_SZ256
479 #define CFG_DLRAM_SIZE 256
480 #else
481 #define CFG_DLRAM_SIZE 1
482 #endif
483
484 #if defined CONFIG_MMU_PAGE_4K
485 #define CONFIG_MMU_PAGE 0
486 #elif defined CONFIG_MMU_PAGE_8K
487 #define CONFIG_MMU_PAGE 1
488 #elif defined CONFIG_MMU_PAGE_16K
489 #define CONFIG_MMU_PAGE 2
490 #elif defined CONFIG_MMU_PAGE_32K
491 #define CONFIG_MMU_PAGE 3
492 #elif defined CONFIG_MMU_PAGE_PROG
493 #define CONFIG_MMU_PAGE 4
494 #else
495 #define CONFIG_MMU_PAGE 0
496 #endif
497
498 #ifdef CONFIG_MMU_ENABLE
499 #define CONFIG_MMUEN 1
500
501 #ifdef CONFIG_MMU_SPLIT
502 #define CONFIG_TLB_TYPE 0
503 #endif
504 #ifdef CONFIG_MMU_COMBINED
505 #define CONFIG_TLB_TYPE 1
506 #endif
507
508 #ifdef CONFIG_MMU_REPARRAY
509 #define CONFIG_TLB_REP 0
510 #endif
511 #ifdef CONFIG_MMU_REPINCREMENT
512 #define CONFIG_TLB_REP 1
513 #endif
514
515 #ifdef CONFIG_MMU_I2
516 #define CONFIG_ITLBNUM 2
517 #endif
518 #ifdef CONFIG_MMU_I4
519 #define CONFIG_ITLBNUM 4
520 #endif
521 #ifdef CONFIG_MMU_I8
522 #define CONFIG_ITLBNUM 8
523 #endif
524 #ifdef CONFIG_MMU_I16
525 #define CONFIG_ITLBNUM 16
526 #endif
527 #ifdef CONFIG_MMU_I32
528 #define CONFIG_ITLBNUM 32
529 #endif
530
531 #define CONFIG_DTLBNUM 2
532 #ifdef CONFIG_MMU_D2
533 #undef CONFIG_DTLBNUM
534 #define CONFIG_DTLBNUM 2
535 #endif
536 #ifdef CONFIG_MMU_D4
537 #undef CONFIG_DTLBNUM
538 #define CONFIG_DTLBNUM 4
539 #endif
540 #ifdef CONFIG_MMU_D8
541 #undef CONFIG_DTLBNUM
542 #define CONFIG_DTLBNUM 8
543 #endif
544 #ifdef CONFIG_MMU_D16
545 #undef CONFIG_DTLBNUM
546 #define CONFIG_DTLBNUM 16
547 #endif
548 #ifdef CONFIG_MMU_D32
549 #undef CONFIG_DTLBNUM
550 #define CONFIG_DTLBNUM 32
551 #endif
552 #ifdef CONFIG_MMU_FASTWB
553 #define CFG_MMU_FASTWB 1
554 #else
555 #define CFG_MMU_FASTWB 0
556 #endif
557
558 #else
559 #define CONFIG_MMUEN 0
560 #define CONFIG_ITLBNUM 2
561 #define CONFIG_DTLBNUM 2
562 #define CONFIG_TLB_TYPE 1
563 #define CONFIG_TLB_REP 1
564 #define CFG_MMU_FASTWB 0
565 #endif
566
567 #ifndef CONFIG_DSU_ENABLE
568 #define CONFIG_DSU_ENABLE 0
569 #endif
570
571 #if defined CONFIG_DSU_ITRACESZ1
572 #define CFG_DSU_ITB 1
573 #elif CONFIG_DSU_ITRACESZ2
574 #define CFG_DSU_ITB 2
575 #elif CONFIG_DSU_ITRACESZ4
576 #define CFG_DSU_ITB 4
577 #elif CONFIG_DSU_ITRACESZ8
578 #define CFG_DSU_ITB 8
579 #elif CONFIG_DSU_ITRACESZ16
580 #define CFG_DSU_ITB 16
581 #else
582 #define CFG_DSU_ITB 0
583 #endif
584
585 #if defined CONFIG_DSU_ATRACESZ1
586 #define CFG_DSU_ATB 1
587 #elif CONFIG_DSU_ATRACESZ2
588 #define CFG_DSU_ATB 2
589 #elif CONFIG_DSU_ATRACESZ4
590 #define CFG_DSU_ATB 4
591 #elif CONFIG_DSU_ATRACESZ8
592 #define CFG_DSU_ATB 8
593 #elif CONFIG_DSU_ATRACESZ16
594 #define CFG_DSU_ATB 16
595 #else
596 #define CFG_DSU_ATB 0
597 #endif
598
599 #ifndef CONFIG_LEON3FT_EN
600 #define CONFIG_LEON3FT_EN 0
601 #endif
602
603 #if defined CONFIG_IUFT_PAR
604 #define CONFIG_IUFT_EN 1
605 #elif defined CONFIG_IUFT_DMR
606 #define CONFIG_IUFT_EN 2
607 #elif defined CONFIG_IUFT_BCH
608 #define CONFIG_IUFT_EN 3
609 #elif defined CONFIG_IUFT_TMR
610 #define CONFIG_IUFT_EN 4
611 #else
612 #define CONFIG_IUFT_EN 0
613 #endif
614 #ifndef CONFIG_RF_ERRINJ
615 #define CONFIG_RF_ERRINJ 0
616 #endif
617
618 #ifndef CONFIG_FPUFT_EN
619 #define CONFIG_FPUFT 0
620 #else
621 #ifdef CONFIG_FPU_GRFPU
622 #define CONFIG_FPUFT 2
623 #else
624 #define CONFIG_FPUFT 1
625 #endif
626 #endif
627
628 #ifndef CONFIG_CACHE_FT_EN
629 #define CONFIG_CACHE_FT_EN 0
630 #endif
631 #ifndef CONFIG_CACHE_ERRINJ
632 #define CONFIG_CACHE_ERRINJ 0
633 #endif
634
635 #ifndef CONFIG_LEON3_NETLIST
636 #define CONFIG_LEON3_NETLIST 0
637 #endif
638
639 #ifdef CONFIG_DEBUG_PC32
640 #define CFG_DEBUG_PC32 0
641 #else
642 #define CFG_DEBUG_PC32 2
643 #endif
644 #ifndef CONFIG_IU_DISAS
645 #define CONFIG_IU_DISAS 0
646 #endif
647 #ifndef CONFIG_IU_DISAS_NET
648 #define CONFIG_IU_DISAS_NET 0
649 #endif
650
651
652 #ifndef CONFIG_AHB_SPLIT
653 #define CONFIG_AHB_SPLIT 0
654 #endif
655
656 #ifndef CONFIG_AHB_RROBIN
657 #define CONFIG_AHB_RROBIN 0
658 #endif
659
660 #ifndef CONFIG_AHB_IOADDR
661 #define CONFIG_AHB_IOADDR FFF
662 #endif
663
664 #ifndef CONFIG_APB_HADDR
665 #define CONFIG_APB_HADDR 800
666 #endif
667
668 #ifndef CONFIG_AHB_MON
669 #define CONFIG_AHB_MON 0
670 #endif
671
672 #ifndef CONFIG_AHB_MONERR
673 #define CONFIG_AHB_MONERR 0
674 #endif
675
676 #ifndef CONFIG_AHB_MONWAR
677 #define CONFIG_AHB_MONWAR 0
678 #endif
679
680 #ifndef CONFIG_AHB_DTRACE
681 #define CONFIG_AHB_DTRACE 0
682 #endif
683
684 #ifndef CONFIG_DSU_JTAG
685 #define CONFIG_DSU_JTAG 0
686 #endif
687
688 #ifndef CONFIG_DSU_ETH
689 #define CONFIG_DSU_ETH 0
690 #endif
691
692 #ifndef CONFIG_DSU_IPMSB
693 #define CONFIG_DSU_IPMSB C0A8
694 #endif
695
696 #ifndef CONFIG_DSU_IPLSB
697 #define CONFIG_DSU_IPLSB 0033
698 #endif
699
700 #ifndef CONFIG_DSU_ETHMSB
701 #define CONFIG_DSU_ETHMSB 020000
702 #endif
703
704 #ifndef CONFIG_DSU_ETHLSB
705 #define CONFIG_DSU_ETHLSB 000009
706 #endif
707
708 #if defined CONFIG_DSU_ETHSZ1
709 #define CFG_DSU_ETHB 1
710 #elif CONFIG_DSU_ETHSZ2
711 #define CFG_DSU_ETHB 2
712 #elif CONFIG_DSU_ETHSZ4
713 #define CFG_DSU_ETHB 4
714 #elif CONFIG_DSU_ETHSZ8
715 #define CFG_DSU_ETHB 8
716 #elif CONFIG_DSU_ETHSZ16
717 #define CFG_DSU_ETHB 16
718 #elif CONFIG_DSU_ETHSZ32
719 #define CFG_DSU_ETHB 32
720 #else
721 #define CFG_DSU_ETHB 1
722 #endif
723
724 #ifndef CONFIG_DSU_ETH_PROG
725 #define CONFIG_DSU_ETH_PROG 0
726 #endif
727
728 #ifndef CONFIG_DSU_ETH_DIS
729 #define CONFIG_DSU_ETH_DIS 0
730 #endif
731
732 #ifndef CONFIG_MCTRL_LEON2
733 #define CONFIG_MCTRL_LEON2 0
734 #endif
735
736 #ifndef CONFIG_MCTRL_SDRAM
737 #define CONFIG_MCTRL_SDRAM 0
738 #endif
739
740 #ifndef CONFIG_MCTRL_SDRAM_SEPBUS
741 #define CONFIG_MCTRL_SDRAM_SEPBUS 0
742 #endif
743
744 #ifndef CONFIG_MCTRL_SDRAM_INVCLK
745 #define CONFIG_MCTRL_SDRAM_INVCLK 0
746 #endif
747
748 #ifndef CONFIG_MCTRL_SDRAM_BUS64
749 #define CONFIG_MCTRL_SDRAM_BUS64 0
750 #endif
751
752 #ifndef CONFIG_MCTRL_8BIT
753 #define CONFIG_MCTRL_8BIT 0
754 #endif
755
756 #ifndef CONFIG_MCTRL_16BIT
757 #define CONFIG_MCTRL_16BIT 0
758 #endif
759
760 #ifndef CONFIG_MCTRL_5CS
761 #define CONFIG_MCTRL_5CS 0
762 #endif
763
764 #ifndef CONFIG_MCTRL_EDAC
765 #define CONFIG_MCTRL_EDAC 0
766 #endif
767
768 #ifndef CONFIG_MCTRL_PAGE
769 #define CONFIG_MCTRL_PAGE 0
770 #endif
771
772 #ifndef CONFIG_MCTRL_PROGPAGE
773 #define CONFIG_MCTRL_PROGPAGE 0
774 #endif
775
776
777 #ifndef CONFIG_MIG_DDR2
778 #define CONFIG_MIG_DDR2 0
779 #endif
780
781 #ifndef CONFIG_MIG_RANKS
782 #define CONFIG_MIG_RANKS 1
783 #endif
784
785 #ifndef CONFIG_MIG_COLBITS
786 #define CONFIG_MIG_COLBITS 10
787 #endif
788
789 #ifndef CONFIG_MIG_ROWBITS
790 #define CONFIG_MIG_ROWBITS 13
791 #endif
792
793 #ifndef CONFIG_MIG_BANKBITS
794 #define CONFIG_MIG_BANKBITS 2
795 #endif
796
797 #ifndef CONFIG_MIG_HMASK
798 #define CONFIG_MIG_HMASK F00
799 #endif
800 #ifndef CONFIG_AHBSTAT_ENABLE
801 #define CONFIG_AHBSTAT_ENABLE 0
802 #endif
803
804 #ifndef CONFIG_AHBSTAT_NFTSLV
805 #define CONFIG_AHBSTAT_NFTSLV 1
806 #endif
807
808 #ifndef CONFIG_AHBROM_ENABLE
809 #define CONFIG_AHBROM_ENABLE 0
810 #endif
811
812 #ifndef CONFIG_AHBROM_START
813 #define CONFIG_AHBROM_START 000
814 #endif
815
816 #ifndef CONFIG_AHBROM_PIPE
817 #define CONFIG_AHBROM_PIPE 0
818 #endif
819
820 #if (CONFIG_AHBROM_START == 0) && (CONFIG_AHBROM_ENABLE == 1)
821 #define CONFIG_ROM_START 100
822 #else
823 #define CONFIG_ROM_START 000
824 #endif
825
826
827 #ifndef CONFIG_AHBRAM_ENABLE
828 #define CONFIG_AHBRAM_ENABLE 0
829 #endif
830
831 #ifndef CONFIG_AHBRAM_START
832 #define CONFIG_AHBRAM_START A00
833 #endif
834
835 #if defined CONFIG_AHBRAM_SZ1
836 #define CFG_AHBRAMSZ 1
837 #elif CONFIG_AHBRAM_SZ2
838 #define CFG_AHBRAMSZ 2
839 #elif CONFIG_AHBRAM_SZ4
840 #define CFG_AHBRAMSZ 4
841 #elif CONFIG_AHBRAM_SZ8
842 #define CFG_AHBRAMSZ 8
843 #elif CONFIG_AHBRAM_SZ16
844 #define CFG_AHBRAMSZ 16
845 #elif CONFIG_AHBRAM_SZ32
846 #define CFG_AHBRAMSZ 32
847 #elif CONFIG_AHBRAM_SZ64
848 #define CFG_AHBRAMSZ 64
849 #else
850 #define CFG_AHBRAMSZ 1
851 #endif
852
853 #ifndef CONFIG_GRETH_ENABLE
854 #define CONFIG_GRETH_ENABLE 0
855 #endif
856
857 #ifndef CONFIG_GRETH_GIGA
858 #define CONFIG_GRETH_GIGA 0
859 #endif
860
861 #if defined CONFIG_GRETH_FIFO4
862 #define CFG_GRETH_FIFO 4
863 #elif defined CONFIG_GRETH_FIFO8
864 #define CFG_GRETH_FIFO 8
865 #elif defined CONFIG_GRETH_FIFO16
866 #define CFG_GRETH_FIFO 16
867 #elif defined CONFIG_GRETH_FIFO32
868 #define CFG_GRETH_FIFO 32
869 #elif defined CONFIG_GRETH_FIFO64
870 #define CFG_GRETH_FIFO 64
871 #else
872 #define CFG_GRETH_FIFO 8
873 #endif
874
875 #ifndef CONFIG_UART1_ENABLE
876 #define CONFIG_UART1_ENABLE 0
877 #endif
878
879 #if defined CONFIG_UA1_FIFO1
880 #define CFG_UA1_FIFO 1
881 #elif defined CONFIG_UA1_FIFO2
882 #define CFG_UA1_FIFO 2
883 #elif defined CONFIG_UA1_FIFO4
884 #define CFG_UA1_FIFO 4
885 #elif defined CONFIG_UA1_FIFO8
886 #define CFG_UA1_FIFO 8
887 #elif defined CONFIG_UA1_FIFO16
888 #define CFG_UA1_FIFO 16
889 #elif defined CONFIG_UA1_FIFO32
890 #define CFG_UA1_FIFO 32
891 #else
892 #define CFG_UA1_FIFO 1
893 #endif
894
895 #ifndef CONFIG_IRQ3_ENABLE
896 #define CONFIG_IRQ3_ENABLE 0
897 #endif
898 #ifndef CONFIG_IRQ3_NSEC
899 #define CONFIG_IRQ3_NSEC 0
900 #endif
901 #ifndef CONFIG_GPT_ENABLE
902 #define CONFIG_GPT_ENABLE 0
903 #endif
904
905 #ifndef CONFIG_GPT_NTIM
906 #define CONFIG_GPT_NTIM 1
907 #endif
908
909 #ifndef CONFIG_GPT_SW
910 #define CONFIG_GPT_SW 8
911 #endif
912
913 #ifndef CONFIG_GPT_TW
914 #define CONFIG_GPT_TW 8
915 #endif
916
917 #ifndef CONFIG_GPT_IRQ
918 #define CONFIG_GPT_IRQ 8
919 #endif
920
921 #ifndef CONFIG_GPT_SEPIRQ
922 #define CONFIG_GPT_SEPIRQ 0
923 #endif
924 #ifndef CONFIG_GPT_ENABLE
925 #define CONFIG_GPT_ENABLE 0
926 #endif
927
928 #ifndef CONFIG_GPT_NTIM
929 #define CONFIG_GPT_NTIM 1
930 #endif
931
932 #ifndef CONFIG_GPT_SW
933 #define CONFIG_GPT_SW 8
934 #endif
935
936 #ifndef CONFIG_GPT_TW
937 #define CONFIG_GPT_TW 8
938 #endif
939
940 #ifndef CONFIG_GPT_IRQ
941 #define CONFIG_GPT_IRQ 8
942 #endif
943
944 #ifndef CONFIG_GPT_SEPIRQ
945 #define CONFIG_GPT_SEPIRQ 0
946 #endif
947
948 #ifndef CONFIG_GPT_WDOGEN
949 #define CONFIG_GPT_WDOGEN 0
950 #endif
951
952 #ifndef CONFIG_GPT_WDOG
953 #define CONFIG_GPT_WDOG 0
954 #endif
955
956 #ifndef CONFIG_GRGPIO_ENABLE
957 #define CONFIG_GRGPIO_ENABLE 0
958 #endif
959 #ifndef CONFIG_GRGPIO_IMASK
960 #define CONFIG_GRGPIO_IMASK 0000
961 #endif
962 #ifndef CONFIG_GRGPIO_WIDTH
963 #define CONFIG_GRGPIO_WIDTH 1
964 #endif
965
966 #ifndef CONFIG_VGA_ENABLE
967 #define CONFIG_VGA_ENABLE 0
968 #endif
969 #ifndef CONFIG_SVGA_ENABLE
970 #define CONFIG_SVGA_ENABLE 0
971 #endif
972 #ifndef CONFIG_KBD_ENABLE
973 #define CONFIG_KBD_ENABLE 0
974 #endif
975
976
977 #ifndef CONFIG_SPIMCTRL
978 #define CONFIG_SPIMCTRL 0
979 #endif
980
981 #ifndef CONFIG_SPIMCTRL_SDCARD
982 #define CONFIG_SPIMCTRL_SDCARD 0
983 #endif
984
985 #ifndef CONFIG_SPIMCTRL_READCMD
986 #define CONFIG_SPIMCTRL_READCMD 0
987 #endif
988
989 #ifndef CONFIG_SPIMCTRL_DUMMYBYTE
990 #define CONFIG_SPIMCTRL_DUMMYBYTE 0
991 #endif
992
993 #ifndef CONFIG_SPIMCTRL_DUALOUTPUT
994 #define CONFIG_SPIMCTRL_DUALOUTPUT 0
995 #endif
996
997 #ifndef CONFIG_SPIMCTRL_SCALER
998 #define CONFIG_SPIMCTRL_SCALER 1
999 #endif
1000
1001 #ifndef CONFIG_SPIMCTRL_ASCALER
1002 #define CONFIG_SPIMCTRL_ASCALER 1
1003 #endif
1004
1005 #ifndef CONFIG_SPIMCTRL_PWRUPCNT
1006 #define CONFIG_SPIMCTRL_PWRUPCNT 0
1007 #endif
1008 #ifndef CONFIG_SPICTRL_ENABLE
1009 #define CONFIG_SPICTRL_ENABLE 0
1010 #endif
1011 #ifndef CONFIG_SPICTRL_NUM
1012 #define CONFIG_SPICTRL_NUM 1
1013 #endif
1014 #ifndef CONFIG_SPICTRL_SLVS
1015 #define CONFIG_SPICTRL_SLVS 1
1016 #endif
1017 #ifndef CONFIG_SPICTRL_FIFO
1018 #define CONFIG_SPICTRL_FIFO 1
1019 #endif
1020 #ifndef CONFIG_SPICTRL_SLVREG
1021 #define CONFIG_SPICTRL_SLVREG 0
1022 #endif
1023 #ifndef CONFIG_SPICTRL_ODMODE
1024 #define CONFIG_SPICTRL_ODMODE 0
1025 #endif
1026 #ifndef CONFIG_SPICTRL_AM
1027 #define CONFIG_SPICTRL_AM 0
1028 #endif
1029 #ifndef CONFIG_SPICTRL_ASEL
1030 #define CONFIG_SPICTRL_ASEL 0
1031 #endif
1032 #ifndef CONFIG_SPICTRL_TWEN
1033 #define CONFIG_SPICTRL_TWEN 0
1034 #endif
1035 #ifndef CONFIG_SPICTRL_MAXWLEN
1036 #define CONFIG_SPICTRL_MAXWLEN 0
1037 #endif
1038 #ifndef CONFIG_SPICTRL_SYNCRAM
1039 #define CONFIG_SPICTRL_SYNCRAM 0
1040 #endif
1041 #if defined(CONFIG_SPICTRL_DMRFT)
1042 #define CONFIG_SPICTRL_FT 1
1043 #elif defined(CONFIG_SPICTRL_TMRFT)
1044 #define CONFIG_SPICTRL_FT 2
1045 #else
1046 #define CONFIG_SPICTRL_FT 0
1047 #endif
1048
1049 #ifndef CONFIG_DEBUG_UART
1050 #define CONFIG_DEBUG_UART 0
1051 #endif
@@ -0,0 +1,107
1 onerror {resume}
2 quietly WaveActivateNextPane {} 0
3 add wave -noupdate -radix hexadecimal /testbench/cpu/address
4 add wave -noupdate -radix hexadecimal /testbench/cpu/data
5 add wave -noupdate /testbench/cpu/oen
6 add wave -noupdate /testbench/cpu/writen
7 add wave -noupdate /testbench/cpu/romsn
8 add wave -noupdate /testbench/cpu/ddr_clk
9 add wave -noupdate /testbench/cpu/ddr_clkb
10 add wave -noupdate /testbench/cpu/ddr_cke
11 add wave -noupdate /testbench/cpu/ddr_odt
12 add wave -noupdate /testbench/cpu/ddr_reset_n
13 add wave -noupdate /testbench/cpu/ddr_we
14 add wave -noupdate /testbench/cpu/ddr_ras
15 add wave -noupdate /testbench/cpu/ddr_cas
16 add wave -noupdate /testbench/cpu/ddr_dm
17 add wave -noupdate /testbench/cpu/ddr_dqs
18 add wave -noupdate /testbench/cpu/ddr_dqs_n
19 add wave -noupdate -radix hexadecimal /testbench/cpu/ddr_ad
20 add wave -noupdate -radix hexadecimal /testbench/cpu/ddr_ba
21 add wave -noupdate -radix hexadecimal /testbench/cpu/ddr_dq
22 add wave -noupdate /testbench/cpu/ddr_rzq
23 add wave -noupdate /testbench/cpu/ddr_zio
24 add wave -noupdate /testbench/cpu/txd1
25 add wave -noupdate /testbench/cpu/rxd1
26 add wave -noupdate /testbench/cpu/ctsn1
27 add wave -noupdate /testbench/cpu/rtsn1
28 add wave -noupdate /testbench/cpu/switch
29 add wave -noupdate /testbench/cpu/led
30 add wave -noupdate /testbench/cpu/iic_scl
31 add wave -noupdate /testbench/cpu/iic_sda
32 add wave -noupdate /testbench/cpu/ddc_scl
33 add wave -noupdate /testbench/cpu/ddc_sda
34 add wave -noupdate /testbench/cpu/dvi_iic_scl
35 add wave -noupdate /testbench/cpu/dvi_iic_sda
36 add wave -noupdate /testbench/cpu/tft_lcd_data
37 add wave -noupdate /testbench/cpu/tft_lcd_clk_p
38 add wave -noupdate /testbench/cpu/tft_lcd_clk_n
39 add wave -noupdate /testbench/cpu/tft_lcd_hsync
40 add wave -noupdate /testbench/cpu/tft_lcd_vsync
41 add wave -noupdate /testbench/cpu/tft_lcd_de
42 add wave -noupdate /testbench/cpu/tft_lcd_reset_b
43 add wave -noupdate /testbench/cpu/spi_sel_n
44 add wave -noupdate /testbench/cpu/spi_clk
45 add wave -noupdate /testbench/cpu/spi_mosi
46 add wave -noupdate -radix hexadecimal /testbench/cpu/apbi
47 add wave -noupdate -radix hexadecimal /testbench/cpu/apbo
48 add wave -noupdate -radix hexadecimal /testbench/cpu/ahbsi
49 add wave -noupdate -radix hexadecimal /testbench/cpu/ahbso
50 add wave -noupdate -radix hexadecimal /testbench/cpu/ahbmi
51 add wave -noupdate -radix hexadecimal /testbench/cpu/ahbmo
52 add wave -noupdate /testbench/cpu/clkm
53 add wave -noupdate /testbench/cpu/rstn
54 add wave -noupdate /testbench/cpu/rstraw
55 add wave -noupdate /testbench/cpu/mig_gen/ddrc/MCB_inst/c3_sys_clk
56 add wave -noupdate /testbench/cpu/mig_gen/ddrc/MCB_inst/c3_calib_done
57 add wave -noupdate /testbench/cpu/vgadvi/dvi0/clk
58 add wave -noupdate /testbench/cpu/vgadvi/dvi0/vgao
59 add wave -noupdate /testbench/cpu/vgadvi/dvi0/vgaclk
60 add wave -noupdate /testbench/cpu/vgadvi/dvi0/dclk_p
61 add wave -noupdate /testbench/cpu/vgadvi/dvi0/dclk_n
62 add wave -noupdate /testbench/cpu/svga/svga0/vgaclk
63 add wave -noupdate -radix hexadecimal /testbench/cpu/svga/svga0/vgao
64 add wave -noupdate -radix hexadecimal /testbench/cpu/svga/svga0/clk_sel
65 add wave -noupdate -radix hexadecimal /testbench/cpu/svga/svga0/t
66 add wave -noupdate -radix hexadecimal /testbench/cpu/svga/svga0/r
67 add wave -noupdate -radix hexadecimal /testbench/cpu/svga/svga0/dmai
68 add wave -noupdate -radix hexadecimal /testbench/cpu/svga/svga0/dmao
69 add wave -noupdate /testbench/cpu/mig_gen/ddrc/calib_done
70 add wave -noupdate -radix hexadecimal /testbench/cpu/mig_gen/ddrc/r
71 add wave -noupdate -radix hexadecimal /testbench/cpu/mig_gen/ddrc/i
72 add wave -noupdate -radix hexadecimal /testbench/cpu/mig_gen/ddrc/ahbmi
73 add wave -noupdate -radix hexadecimal /testbench/cpu/mig_gen/ddrc/ahbmo
74 add wave -noupdate -radix hexadecimal /testbench/cpu/mig_gen/ddrc/r2
75 add wave -noupdate -radix hexadecimal /testbench/cpu/mig_gen/ddrc/p2
76 add wave -noupdate /testbench/cpu/phy_gtx_clk
77 add wave -noupdate /testbench/cpu/phy_mii_data
78 add wave -noupdate /testbench/cpu/phy_tx_clk
79 add wave -noupdate /testbench/cpu/phy_rx_clk
80 add wave -noupdate /testbench/cpu/phy_rx_data
81 add wave -noupdate /testbench/cpu/phy_dv
82 add wave -noupdate /testbench/cpu/phy_rx_er
83 add wave -noupdate /testbench/cpu/phy_col
84 add wave -noupdate /testbench/cpu/phy_crs
85 add wave -noupdate /testbench/cpu/phy_tx_data
86 add wave -noupdate /testbench/cpu/phy_tx_en
87 add wave -noupdate /testbench/cpu/phy_tx_er
88 add wave -noupdate /testbench/cpu/phy_mii_clk
89 add wave -noupdate /testbench/cpu/phy_rst_n
90 add wave -noupdate /testbench/cpu/egtx_clk
91 TreeUpdate [SetDefaultTree]
92 WaveRestoreCursors {{Cursor 3} {3787500 ps} 0} {{Cursor 3} {3807500 ps} 0}
93 configure wave -namecolwidth 212
94 configure wave -valuecolwidth 100
95 configure wave -justifyvalue left
96 configure wave -signalnamewidth 0
97 configure wave -snapdistance 10
98 configure wave -datasetprefix 0
99 configure wave -rowmargin 4
100 configure wave -childrowmargin 2
101 configure wave -gridoffset 0
102 configure wave -gridperiod 1
103 configure wave -griddelta 40
104 configure wave -timeline 0
105 configure wave -timelineunits ns
106 update
107 WaveRestoreZoom {48575 ps} {76724 ps}
@@ -0,0 +1,68
1 -- MinF_Cntr.vhd
2 library IEEE;
3 use IEEE.std_logic_1164.all;
4 use IEEE.numeric_std.all;
5
6
7
8
9 entity MinF_Cntr is
10 generic(MinFCount : integer := 64);
11 port(
12 clk : in std_logic;
13 reset : in std_logic;
14 Cnt_out : out integer range 0 to MinFCount-1
15 );
16 end entity;
17
18
19
20 architecture ar_MinF_Cntr of MinF_Cntr is
21
22 signal Cnt_int : integer range 0 to MinFCount-1 := 0;
23 signal MinF_reg : std_logic := '0';
24
25 begin
26
27 Cnt_out <= Cnt_int;
28
29 process(clk,reset)
30 begin
31 if reset = '0' then
32 Cnt_int <= 0;
33 elsif clk'event and clk = '1' then
34 if Cnt_int = MinFCount -1 then
35 Cnt_int <= 0;
36 else
37 Cnt_int <= Cnt_int + 1;
38 end if;
39 end if;
40 end process;
41 end ar_MinF_Cntr;
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
@@ -0,0 +1,64
1 ------------------------------------------------------------------------------
2 -- This file is a part of the LPP VHDL IP LIBRARY
3 -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
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 3 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 library ieee;
20 use ieee.std_logic_1164.all;
21
22
23 package Rocket_PCM_Encoder is
24
25 component MinF_Cntr is
26 generic(MinFCount : integer := 64);
27 port(
28 clk : in std_logic;
29 reset : in std_logic;
30 Cnt_out : out integer range 0 to MinFCount-1
31 );
32 end component;
33
34 component Serial_Driver is
35 generic(size : integer :=8);
36 port(
37 sclk : in std_logic;
38 inputDat: in std_logic_vector(size-1 downto 0);
39 Gate : in std_logic;
40 Data : out std_logic
41 );
42 end component;
43
44 component Serial_Driver_Multiplexor is
45 generic(InputCnt : integer := 2;inputSize : integer:=8);
46 port(
47 clk : in std_logic;
48 Sel : in integer range 0 to InputCnt-1;
49 input : in std_logic_vector(InputCnt*inputSize-1 downto 0);
50 output : out std_logic_vector(inputSize-1 downto 0)
51 );
52 end component;
53
54 component Word_Cntr is
55 generic(WordSize :integer := 8 ;N : integer := 144);
56 port(
57 Sclk : in std_logic;
58 reset : in std_logic;
59 WordClk : out std_logic;
60 Cnt_out : out integer range 0 to N-1
61 );
62 end component;
63
64 end Rocket_PCM_Encoder;
@@ -0,0 +1,44
1 -- Serial_Driver.vhd
2 library IEEE;
3 use IEEE.std_logic_1164.all;
4 use IEEE.numeric_std.all;
5
6
7 entity Serial_Driver is
8 generic(size : integer :=8);
9 port(
10 sclk : in std_logic;
11 inputDat: in std_logic_vector(size-1 downto 0);
12 Gate : in std_logic;
13 Data : out std_logic
14 );
15 end Serial_Driver;
16
17
18
19
20 architecture ar_Serial_Driver of Serial_Driver is
21 signal Count : integer range 0 to size-1;
22 signal SR_internal : std_logic_vector(size-1 downto 0):=std_logic_vector(TO_UNSIGNED(165,Size));
23 begin
24 process(sclk)
25 begin
26 if SCLK'event and SCLK = '1' then
27 if gate = '1' then
28 if Count = size-1 then
29 Count <= 0;
30 Data <= SR_internal(size-1);
31 SR_internal <= inputDat;
32 else
33 Count <= Count+1;
34 Data <= SR_internal(size-1);
35 SR_internal <= SR_internal(size-2 downto 0) & '0';
36 end if;
37 else
38 SR_internal <= inputDat;
39 Data <= '0';
40 Count <= 0;
41 end if;
42 end if;
43 end process;
44 end ar_Serial_Driver; No newline at end of file
@@ -0,0 +1,33
1 -- Serial_Driver_Multiplexor.vhd
2 library IEEE;
3 use IEEE.std_logic_1164.all;
4 use IEEE.numeric_std.all;
5
6
7
8 entity Serial_Driver_Multiplexor is
9 generic(InputCnt : integer := 2;inputSize : integer:=8);
10 port(
11 clk : in std_logic;
12 Sel : in integer range 0 to InputCnt-1;
13 input : in std_logic_vector(InputCnt*inputSize-1 downto 0);
14 output : out std_logic_vector(inputSize-1 downto 0)
15 );
16 end entity;
17
18
19
20 architecture ar_Serial_Driver_Multiplexor of Serial_Driver_Multiplexor is
21 begin
22
23
24 process(clk)
25 begin
26 if clk'event and clk = '1' then
27 output <= input((Sel+1)*inputSize-1 downto (Sel)*inputSize);
28 end if;
29 end process;
30
31
32 end ar_Serial_Driver_Multiplexor;
33
@@ -0,0 +1,70
1 -- Word_Cntr.vhd
2 library IEEE;
3 use IEEE.std_logic_1164.all;
4 use IEEE.numeric_std.all;
5
6
7
8
9 entity Word_Cntr is
10 generic(WordSize :integer := 8 ;N : integer := 144);
11 port(
12 Sclk : in std_logic;
13 reset : in std_logic;
14 WordClk : out std_logic;
15 Cnt_out : out integer range 0 to N-1
16 );
17 end entity;
18
19
20
21 architecture ar_Word_Cntr of Word_Cntr is
22
23 signal Cnt_int : integer range 0 to N-1 := 0;
24 signal Wcnt : integer range 0 to WordSize -1 ;
25
26 begin
27
28 Cnt_out <= Cnt_int;
29
30 process(Sclk,reset)
31 begin
32 if reset = '0' then
33 Cnt_int <= 0;
34 Wcnt <= 0;
35 WordClk <= '0';
36 elsif Sclk'event and Sclk = '1' then
37 if Wcnt = WordSize - 1 then
38 Cnt_int <= Cnt_int + 1;
39 Wcnt <= 0;
40 WordClk <= '1';
41 else
42 Wcnt <= Wcnt + 1;
43 WordClk <= '0';
44 end if;
45 end if;
46 end process;
47 end ar_Word_Cntr;
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@@ -0,0 +1,183
1 -- ADS1274_DRIVER.vhd
2 library IEEE;
3 use IEEE.std_logic_1164.all;
4 use IEEE.numeric_std.all;
5 library lpp;
6 use lpp.lpp_ad_conv.all;
7 use lpp.general_purpose.all;
8
9
10
11
12
13 entity ADS1278_DRIVER is
14 generic(modeCfg : ADS127X_MODE_Type := ADS127X_MODE_low_power; formatCfg : ADS127X_FORMAT_Type := ADS127X_FSYNC_FORMAT);
15 port(
16 Clk : in std_logic;
17 reset : in std_logic;
18 SpiClk : out std_logic;
19 DIN : in std_logic_vector(7 downto 0);
20 Ready : in std_logic;
21 Format : out std_logic_vector(2 downto 0);
22 Mode : out std_logic_vector(1 downto 0);
23 ClkDiv : out std_logic;
24 PWDOWN : out std_logic_vector(7 downto 0);
25 SmplClk : in std_logic;
26 OUT0 : out std_logic_vector(23 downto 0);
27 OUT1 : out std_logic_vector(23 downto 0);
28 OUT2 : out std_logic_vector(23 downto 0);
29 OUT3 : out std_logic_vector(23 downto 0);
30 OUT4 : out std_logic_vector(23 downto 0);
31 OUT5 : out std_logic_vector(23 downto 0);
32 OUT6 : out std_logic_vector(23 downto 0);
33 OUT7 : out std_logic_vector(23 downto 0);
34 FSynch : out std_logic
35 );
36 end ADS1278_DRIVER;
37
38
39
40
41
42
43 architecture ar_ADS1278_DRIVER of ADS1278_DRIVER is
44
45 signal Vec0,Vec1,Vec2,Vec3,Vec4,Vec5,Vec6,Vec7 : std_logic_vector(23 downto 0);
46 signal SmplClk_Reg : std_logic:= '0';
47 signal N : integer range 0 to 23*8 := 0;
48 signal SPI_CLk : std_logic;
49 signal SmplClk_clkd : std_logic:= '0';
50
51 begin
52
53
54 CLKDIV0 : Clk_Divider2
55 generic map(16)
56 port map(Clk,SPI_CLk);
57
58
59 Mode(1) <= modeCfg(1);
60 Mode(0) <= modeCfg(0);
61 Format(2) <= formatCfg(2);
62 Format(1) <= formatCfg(1);
63 Format(0) <= formatCfg(0);
64 PWDOWN <= (others => '1');
65 FSynch <= SmplClk_clkd;
66 ClkDiv <= '1';
67 SpiClk <= SPI_CLk;
68
69 process(reset,SPI_CLk)
70 begin
71
72 if reset = '0' then
73 Vec0 <= (others => '0');
74 Vec1 <= (others => '0');
75 Vec2 <= (others => '0');
76 Vec3 <= (others => '0');
77 Vec4 <= (others => '0');
78 Vec5 <= (others => '0');
79 Vec6 <= (others => '0');
80 Vec7 <= (others => '0');
81 N <= 0;
82 elsif SPI_CLk'event and SPI_CLk = '1' then
83 -- SmplClk_clkd <= SmplClk;
84 -- SmplClk_Reg <= SmplClk_clkd;
85 --if ((SmplClk_clkd = '1' and SmplClk_Reg = '0') or (N /= 0)) then
86 if ((SmplClk_clkd = '1' and SmplClk_Reg = '0') or (N /= 0)) then
87 --Vec0(0) <= DIN(0);
88 --Vec1(0) <= DIN(1);
89 --Vec2(0) <= DIN(2);
90 --Vec3(0) <= DIN(3);
91 --Vec0(23 downto 1) <= Vec0(22 downto 0);
92 --Vec1(23 downto 1) <= Vec1(22 downto 0);
93 --Vec2(23 downto 1) <= Vec2(22 downto 0);
94 --Vec3(23 downto 1) <= Vec3(22 downto 0);
95 Vec0(0) <= DIN(0);
96 Vec0(23 downto 1) <= Vec0(22 downto 0);
97 Vec1(0) <= Vec0(23);
98
99 Vec1(23 downto 1) <= Vec1(22 downto 0);
100 Vec2(0) <= Vec1(23);
101
102 Vec2(23 downto 1) <= Vec2(22 downto 0);
103 Vec3(0) <= Vec2(23);
104
105 Vec3(23 downto 1) <= Vec3(22 downto 0);
106 Vec4(0) <= Vec3(23);
107
108 Vec4(23 downto 1) <= Vec4(22 downto 0);
109 Vec5(0) <= Vec4(23);
110
111 Vec5(23 downto 1) <= Vec5(22 downto 0);
112 Vec6(0) <= Vec5(23);
113
114 Vec6(23 downto 1) <= Vec6(22 downto 0);
115 Vec7(0) <= Vec6(23);
116
117 Vec7(23 downto 1) <= Vec7(22 downto 0);
118 if N = (23*8) then
119 N <= 0;
120 else
121 N <= N+1;
122 end if;
123 end if;
124 end if;
125 end process;
126
127
128 process(SPI_CLk)
129 begin
130 if SPI_CLk'event and SPI_CLk ='0' then
131 SmplClk_clkd <= SmplClk;
132 SmplClk_Reg <= SmplClk_clkd;
133 end if;
134 end process;
135
136
137 process(SPI_CLk)
138 begin
139 if SPI_CLk'event and SPI_CLk ='1' then
140 if N = 0 then
141 OUT0 <= Vec0;
142 OUT1 <= Vec1;
143 OUT2 <= Vec2;
144 OUT3 <= Vec3;
145 OUT4 <= Vec4;
146 OUT5 <= Vec5;
147 OUT6 <= Vec6;
148 OUT7 <= Vec7;
149 end if;
150 end if;
151 end process;
152
153 end ar_ADS1278_DRIVER;
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
@@ -0,0 +1,221
1 -- ADS1274_DRIVER.vhd
2 library IEEE;
3 use IEEE.std_logic_1164.all;
4 use IEEE.numeric_std.all;
5 library lpp;
6 use lpp.lpp_ad_conv.all;
7 use lpp.general_purpose.all;
8
9
10
11
12
13 entity DUAL_ADS1278_DRIVER is
14 port(
15 Clk : in std_logic;
16 reset : in std_logic;
17 SpiClk : out std_logic;
18 DIN : in std_logic_vector(1 downto 0);
19 SmplClk : in std_logic;
20 OUT00 : out std_logic_vector(23 downto 0);
21 OUT01 : out std_logic_vector(23 downto 0);
22 OUT02 : out std_logic_vector(23 downto 0);
23 OUT03 : out std_logic_vector(23 downto 0);
24 OUT04 : out std_logic_vector(23 downto 0);
25 OUT05 : out std_logic_vector(23 downto 0);
26 OUT06 : out std_logic_vector(23 downto 0);
27 OUT07 : out std_logic_vector(23 downto 0);
28 OUT10 : out std_logic_vector(23 downto 0);
29 OUT11 : out std_logic_vector(23 downto 0);
30 OUT12 : out std_logic_vector(23 downto 0);
31 OUT13 : out std_logic_vector(23 downto 0);
32 OUT14 : out std_logic_vector(23 downto 0);
33 OUT15 : out std_logic_vector(23 downto 0);
34 OUT16 : out std_logic_vector(23 downto 0);
35 OUT17 : out std_logic_vector(23 downto 0);
36 FSynch : out std_logic
37 );
38 end DUAL_ADS1278_DRIVER;
39
40
41
42
43
44
45 architecture ar_DUAL_ADS1278_DRIVER of DUAL_ADS1278_DRIVER is
46
47 signal Vec00,Vec01,Vec02,Vec03,Vec04,Vec05,Vec06,Vec07,Vec10,Vec11,Vec12,Vec13,Vec14,Vec15,Vec16,Vec17 : std_logic_vector(23 downto 0);
48 signal SmplClk_Reg : std_logic:= '0';
49 signal N : integer range 0 to 23*8 := 0;
50 signal SPI_CLk : std_logic;
51 signal SmplClk_clkd : std_logic:= '0';
52
53 begin
54
55
56 CLKDIV0 : Clk_Divider2
57 generic map(16)
58 port map(Clk,SPI_CLk);
59
60
61 FSynch <= SmplClk_clkd;
62 SpiClk <= SPI_CLk;
63
64 process(reset,SPI_CLk)
65 begin
66
67 if reset = '0' then
68 Vec00 <= (others => '0');
69 Vec01 <= (others => '0');
70 Vec02 <= (others => '0');
71 Vec03 <= (others => '0');
72 Vec04 <= (others => '0');
73 Vec05 <= (others => '0');
74 Vec06 <= (others => '0');
75 Vec07 <= (others => '0');
76
77 Vec10 <= (others => '0');
78 Vec11 <= (others => '0');
79 Vec12 <= (others => '0');
80 Vec13 <= (others => '0');
81 Vec14 <= (others => '0');
82 Vec15 <= (others => '0');
83 Vec16 <= (others => '0');
84 Vec17 <= (others => '0');
85 N <= 0;
86 elsif SPI_CLk'event and SPI_CLk = '1' then
87 -- SmplClk_clkd <= SmplClk;
88 -- SmplClk_Reg <= SmplClk_clkd;
89 --if ((SmplClk_clkd = '1' and SmplClk_Reg = '0') or (N /= 0)) then
90 if ((SmplClk_clkd = '1' and SmplClk_Reg = '0') or (N /= 0)) then
91 --Vec0(0) <= DIN(0);
92 --Vec1(0) <= DIN(1);
93 --Vec2(0) <= DIN(2);
94 --Vec3(0) <= DIN(3);
95 --Vec0(23 downto 1) <= Vec0(22 downto 0);
96 --Vec1(23 downto 1) <= Vec1(22 downto 0);
97 --Vec2(23 downto 1) <= Vec2(22 downto 0);
98 --Vec3(23 downto 1) <= Vec3(22 downto 0);
99 Vec00(0) <= DIN(0);
100 Vec00(23 downto 1) <= Vec00(22 downto 0);
101 Vec01(0) <= Vec00(23);
102
103 Vec01(23 downto 1) <= Vec01(22 downto 0);
104 Vec02(0) <= Vec01(23);
105
106 Vec02(23 downto 1) <= Vec02(22 downto 0);
107 Vec03(0) <= Vec02(23);
108
109 Vec03(23 downto 1) <= Vec03(22 downto 0);
110 Vec04(0) <= Vec03(23);
111
112 Vec04(23 downto 1) <= Vec04(22 downto 0);
113 Vec05(0) <= Vec04(23);
114
115 Vec05(23 downto 1) <= Vec05(22 downto 0);
116 Vec06(0) <= Vec05(23);
117
118 Vec06(23 downto 1) <= Vec06(22 downto 0);
119 Vec07(0) <= Vec06(23);
120
121 Vec07(23 downto 1) <= Vec07(22 downto 0);
122
123
124 Vec10(0) <= DIN(1);
125 Vec10(23 downto 1) <= Vec10(22 downto 0);
126 Vec11(0) <= Vec10(23);
127
128 Vec11(23 downto 1) <= Vec11(22 downto 0);
129 Vec12(0) <= Vec11(23);
130
131 Vec12(23 downto 1) <= Vec12(22 downto 0);
132 Vec13(0) <= Vec12(23);
133
134 Vec13(23 downto 1) <= Vec13(22 downto 0);
135 Vec14(0) <= Vec13(23);
136
137 Vec14(23 downto 1) <= Vec14(22 downto 0);
138 Vec15(0) <= Vec14(23);
139
140 Vec15(23 downto 1) <= Vec15(22 downto 0);
141 Vec16(0) <= Vec15(23);
142
143 Vec16(23 downto 1) <= Vec16(22 downto 0);
144 Vec17(0) <= Vec16(23);
145
146 Vec17(23 downto 1) <= Vec17(22 downto 0);
147 if N = (23*8) then
148 N <= 0;
149 else
150 N <= N+1;
151 end if;
152 end if;
153 end if;
154 end process;
155
156
157 process(SPI_CLk)
158 begin
159 if SPI_CLk'event and SPI_CLk ='0' then
160 SmplClk_clkd <= SmplClk;
161 SmplClk_Reg <= SmplClk_clkd;
162 end if;
163 end process;
164
165
166 process(SPI_CLk)
167 begin
168 if SPI_CLk'event and SPI_CLk ='1' then
169 if N = 0 then
170 OUT00 <= Vec00;
171 OUT01 <= Vec01;
172 OUT02 <= Vec02;
173 OUT03 <= Vec03;
174 OUT04 <= Vec04;
175 OUT05 <= Vec05;
176 OUT06 <= Vec06;
177 OUT07 <= Vec07;
178
179 OUT10 <= Vec10;
180 OUT11 <= Vec11;
181 OUT12 <= Vec12;
182 OUT13 <= Vec13;
183 OUT14 <= Vec14;
184 OUT15 <= Vec15;
185 OUT16 <= Vec16;
186 OUT17 <= Vec17;
187 end if;
188 end if;
189 end process;
190
191 end ar_DUAL_ADS1278_DRIVER;
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
@@ -1,2 +1,11
1 NET "CLK" LOC = "AE16";
1 NET "CLK" LOC = "B10";
2 NET "RESET" LOC = "H10";
2 NET "RESET" LOC = "A5" | IOSTANDARD = LVTTL;
3 NET "SCLK" LOC = "V22" | IOSTANDARD = LVTTL;
4 NET "GATE" LOC = "T22" | IOSTANDARD = LVTTL;
5 NET "MINF" LOC = "T21" | IOSTANDARD = LVTTL;
6 NET "MAJF" LOC = "U22" | IOSTANDARD = LVTTL;
7 NET "DATA" LOC = "V21";
8 NET "DC_ADC_SCLK" LOC = "AB17";
9 NET "DC_ADC_IN(0)" LOC = "AB19" | IOSTANDARD = LVTTL;
10 NET "DC_ADC_IN(1)" LOC = "AA18" | IOSTANDARD = LVTTL;
11 NET "DC_ADC_FSynch" LOC = "AB18";
@@ -12,9 +12,22 port(
12 Wcount : in integer range 0 to WordCnt-1;
12 Wcount : in integer range 0 to WordCnt-1;
13 MinFCnt : in integer range 0 to MinFCount-1;
13 MinFCnt : in integer range 0 to MinFCount-1;
14 Flag : out std_logic;
14 Flag : out std_logic;
15 DC1 : in std_logic_vector(23 downto 0);
15 AMR1X : in std_logic_vector(23 downto 0);
16 DC2 : in std_logic_vector(23 downto 0);
16 AMR1Y : in std_logic_vector(23 downto 0);
17 DC3 : in std_logic_vector(23 downto 0);
17 AMR1Z : in std_logic_vector(23 downto 0);
18 AMR2X : in std_logic_vector(23 downto 0);
19 AMR2Y : in std_logic_vector(23 downto 0);
20 AMR2Z : in std_logic_vector(23 downto 0);
21 AMR3X : in std_logic_vector(23 downto 0);
22 AMR3Y : in std_logic_vector(23 downto 0);
23 AMR3Z : in std_logic_vector(23 downto 0);
24 AMR4X : in std_logic_vector(23 downto 0);
25 AMR4Y : in std_logic_vector(23 downto 0);
26 AMR4Z : in std_logic_vector(23 downto 0);
27 Temp1 : in std_logic_vector(23 downto 0);
28 Temp2 : in std_logic_vector(23 downto 0);
29 Temp3 : in std_logic_vector(23 downto 0);
30 Temp4 : in std_logic_vector(23 downto 0);
18 WordOut : out std_logic_vector(WordSize-1 downto 0)
31 WordOut : out std_logic_vector(WordSize-1 downto 0)
19
32
20 );
33 );
@@ -36,46 +49,228 MinFCntVectLSB <= MinFCntVect(0);
36 process(clk)
49 process(clk)
37 begin
50 begin
38 if clk'event and clk ='1' then
51 if clk'event and clk ='1' then
39 if MinFCntVectLSB = '0'then
52 case MinFCntVect(2 downto 0) is
40 case Wcount is
53 when "000" =>
41 when 15 =>
54 case Wcount is
42 WordOut <= DC1(23 downto 16);
55 when 47 =>
43 Flag <= '1';
56 WordOut <= AMR1X(23 downto 16);
44 when 16 =>
57 Flag <= '1';
45 WordOut <= DC1(15 downto 8);
58 when 48 =>
46 Flag <= '1';
59 WordOut <= AMR1X(15 downto 8);
47 when 19 =>
60 Flag <= '1';
48 WordOut <= DC1(7 downto 0);
61
49 Flag <= '1';
62 when 49 =>
50 when 23 =>
63 WordOut <= AMR1X(7 downto 0);
51 WordOut <= DC3(23 downto 16);
64 Flag <= '1';
52 Flag <= '1';
65 when 50 =>
53 when 24 =>
66 WordOut <= AMR1Y(23 downto 16);
54 WordOut <= DC3(15 downto 8);
67 Flag <= '1';
55 Flag <= '1';
68
56 when 27 =>
69 when 51 =>
57 WordOut <= DC3(7 downto 0);
70 WordOut <= AMR1Y(15 downto 8);
58 Flag <= '1';
71 Flag <= '1';
72 when 52 =>
73 WordOut <= AMR1Y(7 downto 0);
74 Flag <= '1';
75
76 when others =>
77 WordOut <= X"A5";
78 Flag <= '0';
79 end case;
80 when "001" =>
81 case Wcount is
82 when 47 =>
83 WordOut <= AMR1Z(23 downto 16);
84 Flag <= '1';
85 when 48 =>
86 WordOut <= AMR1Z(15 downto 8);
87 Flag <= '1';
88
89 when 49 =>
90 WordOut <= AMR1Z(7 downto 0);
91 Flag <= '1';
92 when 50 =>
93 WordOut <= AMR2X(23 downto 16);
94 Flag <= '1';
95
96 when 51 =>
97 WordOut <= AMR2X(15 downto 8);
98 Flag <= '1';
99 when 52 =>
100 WordOut <= AMR2X(7 downto 0);
101 Flag <= '1';
102
103 when others =>
104 WordOut <= X"A5";
105 Flag <= '0';
106 end case;
107 when "010" =>
108 case Wcount is
109 when 47 =>
110 WordOut <= AMR2Y(23 downto 16);
111 Flag <= '1';
112 when 48 =>
113 WordOut <= AMR2Y(15 downto 8);
114 Flag <= '1';
115
116 when 49 =>
117 WordOut <= AMR2Y(7 downto 0);
118 Flag <= '1';
119 when 50 =>
120 WordOut <= AMR2Z(23 downto 16);
121 Flag <= '1';
122
123 when 51 =>
124 WordOut <= AMR2Z(15 downto 8);
125 Flag <= '1';
126 when 52 =>
127 WordOut <= AMR2Z(7 downto 0);
128 Flag <= '1';
129
130 when others =>
131 WordOut <= X"A5";
132 Flag <= '0';
133 end case;
134 when "011" =>
135 case Wcount is
136 when 47 =>
137 WordOut <= AMR3X(23 downto 16);
138 Flag <= '1';
139 when 48 =>
140 WordOut <= AMR3X(15 downto 8);
141 Flag <= '1';
142
143 when 49 =>
144 WordOut <= AMR3X(7 downto 0);
145 Flag <= '1';
146 when 50 =>
147 WordOut <= AMR3Y(23 downto 16);
148 Flag <= '1';
149
150 when 51 =>
151 WordOut <= AMR3Y(15 downto 8);
152 Flag <= '1';
153 when 52 =>
154 WordOut <= AMR3Y(7 downto 0);
155 Flag <= '1';
156
157 when others =>
158 WordOut <= X"A5";
159 Flag <= '0';
160 end case;
161 when "100" =>
162 case Wcount is
163 when 47 =>
164 WordOut <= AMR3Z(23 downto 16);
165 Flag <= '1';
166 when 48 =>
167 WordOut <= AMR3Z(15 downto 8);
168 Flag <= '1';
169
170 when 49 =>
171 WordOut <= AMR3Z(7 downto 0);
172 Flag <= '1';
173 when 50 =>
174 WordOut <= AMR4X(23 downto 16);
175 Flag <= '1';
176
177 when 51 =>
178 WordOut <= AMR4X(15 downto 8);
179 Flag <= '1';
180 when 52 =>
181 WordOut <= AMR4X(7 downto 0);
182 Flag <= '1';
183
184 when others =>
185 WordOut <= X"A5";
186 Flag <= '0';
187 end case;
188 when "101" =>
189 case Wcount is
190 when 47 =>
191 WordOut <= AMR4Y(23 downto 16);
192 Flag <= '1';
193 when 48 =>
194 WordOut <= AMR4Y(15 downto 8);
195 Flag <= '1';
196
197 when 49 =>
198 WordOut <= AMR4Y(7 downto 0);
199 Flag <= '1';
200 when 50 =>
201 WordOut <= AMR4Z(23 downto 16);
202 Flag <= '1';
203
204 when 51 =>
205 WordOut <= AMR4Z(15 downto 8);
206 Flag <= '1';
207 when 52 =>
208 WordOut <= AMR4Z(7 downto 0);
209 Flag <= '1';
210
211 when others =>
212 WordOut <= X"A5";
213 Flag <= '0';
214 end case;
215 when "110" =>
216 case Wcount is
217 when 47 =>
218 WordOut <= Temp1(23 downto 16);
219 Flag <= '1';
220 when 48 =>
221 WordOut <= Temp1(15 downto 8);
222 Flag <= '1';
223
224 when 49 =>
225 WordOut <= Temp1(7 downto 0);
226 Flag <= '1';
227 when 50 =>
228 WordOut <= Temp2(23 downto 16);
229 Flag <= '1';
230
231 when 51 =>
232 WordOut <= Temp2(15 downto 8);
233 Flag <= '1';
234 when 52 =>
235 WordOut <= Temp2(7 downto 0);
236 Flag <= '1';
237
238 when others =>
239 WordOut <= X"A5";
240 Flag <= '0';
241 end case;
242 when "111" =>
243 case Wcount is
244 when 47 =>
245 WordOut <= Temp3(23 downto 16);
246 Flag <= '1';
247 when 48 =>
248 WordOut <= Temp3(15 downto 8);
249 Flag <= '1';
250
251 when 49 =>
252 WordOut <= Temp3(7 downto 0);
253 Flag <= '1';
254 when 50 =>
255 WordOut <= Temp4(23 downto 16);
256 Flag <= '1';
257
258 when 51 =>
259 WordOut <= Temp4(15 downto 8);
260 Flag <= '1';
261 when 52 =>
262 WordOut <= Temp4(7 downto 0);
263 Flag <= '1';
264
265 when others =>
266 WordOut <= X"A5";
267 Flag <= '0';
268 end case;
59 when others =>
269 when others =>
60 WordOut <= X"A5";
270 WordOut <= X"A5";
61 Flag <= '0';
271 Flag <= '0';
62 end case;
272
63 else
273 end case;
64 case Wcount is
65 when 15 =>
66 WordOut <= DC2(23 downto 16);
67 Flag <= '1';
68 when 16 =>
69 WordOut <= DC2(15 downto 8);
70 Flag <= '1';
71 when 19 =>
72 WordOut <= DC2(7 downto 0);
73 Flag <= '1';
74 when others =>
75 WordOut <= X"A5";
76 Flag <= '0';
77 end case;
78 end if;
79 end if;
274 end if;
80 end process;
275 end process;
81
276
@@ -38,16 +38,16 begin
38 when 6 =>
38 when 6 =>
39 WordOut <= LF1(7 downto 0);
39 WordOut <= LF1(7 downto 0);
40 Flag <= '1';
40 Flag <= '1';
41 when 13 =>
41 when 7 =>
42 WordOut <= LF2(15 downto 8);
42 WordOut <= LF2(15 downto 8);
43 Flag <= '1';
43 Flag <= '1';
44 when 14 =>
44 when 8 =>
45 WordOut <= LF2(7 downto 0);
45 WordOut <= LF2(7 downto 0);
46 Flag <= '1';
46 Flag <= '1';
47 when 21 =>
47 when 9 =>
48 WordOut <= LF3(15 downto 8);
48 WordOut <= LF3(15 downto 8);
49 Flag <= '1';
49 Flag <= '1';
50 when 22 =>
50 when 10 =>
51 WordOut <= LF3(7 downto 0);
51 WordOut <= LF3(7 downto 0);
52 Flag <= '1';
52 Flag <= '1';
53
53
@@ -57,16 +57,16 begin
57 when 30 =>
57 when 30 =>
58 WordOut <= LF1(7 downto 0);
58 WordOut <= LF1(7 downto 0);
59 Flag <= '1';
59 Flag <= '1';
60 when 37 =>
60 when 31 =>
61 WordOut <= LF2(15 downto 8);
61 WordOut <= LF2(15 downto 8);
62 Flag <= '1';
62 Flag <= '1';
63 when 38 =>
63 when 32 =>
64 WordOut <= LF2(7 downto 0);
64 WordOut <= LF2(7 downto 0);
65 Flag <= '1';
65 Flag <= '1';
66 when 45 =>
66 when 33 =>
67 WordOut <= LF3(15 downto 8);
67 WordOut <= LF3(15 downto 8);
68 Flag <= '1';
68 Flag <= '1';
69 when 46 =>
69 when 34 =>
70 WordOut <= LF3(7 downto 0);
70 WordOut <= LF3(7 downto 0);
71 Flag <= '1';
71 Flag <= '1';
72
72
@@ -76,16 +76,16 begin
76 when 54 =>
76 when 54 =>
77 WordOut <= LF1(7 downto 0);
77 WordOut <= LF1(7 downto 0);
78 Flag <= '1';
78 Flag <= '1';
79 when 61 =>
79 when 55 =>
80 WordOut <= LF2(15 downto 8);
80 WordOut <= LF2(15 downto 8);
81 Flag <= '1';
81 Flag <= '1';
82 when 62 =>
82 when 56 =>
83 WordOut <= LF2(7 downto 0);
83 WordOut <= LF2(7 downto 0);
84 Flag <= '1';
84 Flag <= '1';
85 when 69 =>
85 when 57 =>
86 WordOut <= LF3(15 downto 8);
86 WordOut <= LF3(15 downto 8);
87 Flag <= '1';
87 Flag <= '1';
88 when 70 =>
88 when 58 =>
89 WordOut <= LF3(7 downto 0);
89 WordOut <= LF3(7 downto 0);
90 Flag <= '1';
90 Flag <= '1';
91
91
@@ -95,16 +95,16 begin
95 when 78 =>
95 when 78 =>
96 WordOut <= LF1(7 downto 0);
96 WordOut <= LF1(7 downto 0);
97 Flag <= '1';
97 Flag <= '1';
98 when 85 =>
98 when 79 =>
99 WordOut <= LF2(15 downto 8);
99 WordOut <= LF2(15 downto 8);
100 Flag <= '1';
100 Flag <= '1';
101 when 86 =>
101 when 80 =>
102 WordOut <= LF2(7 downto 0);
102 WordOut <= LF2(7 downto 0);
103 Flag <= '1';
103 Flag <= '1';
104 when 93 =>
104 when 81 =>
105 WordOut <= LF3(15 downto 8);
105 WordOut <= LF3(15 downto 8);
106 Flag <= '1';
106 Flag <= '1';
107 when 94 =>
107 when 82 =>
108 WordOut <= LF3(7 downto 0);
108 WordOut <= LF3(7 downto 0);
109 Flag <= '1';
109 Flag <= '1';
110
110
@@ -114,16 +114,16 begin
114 when 102 =>
114 when 102 =>
115 WordOut <= LF1(7 downto 0);
115 WordOut <= LF1(7 downto 0);
116 Flag <= '1';
116 Flag <= '1';
117 when 109 =>
117 when 103 =>
118 WordOut <= LF2(15 downto 8);
118 WordOut <= LF2(15 downto 8);
119 Flag <= '1';
119 Flag <= '1';
120 when 110 =>
120 when 104 =>
121 WordOut <= LF2(7 downto 0);
121 WordOut <= LF2(7 downto 0);
122 Flag <= '1';
122 Flag <= '1';
123 when 117 =>
123 when 105 =>
124 WordOut <= LF3(15 downto 8);
124 WordOut <= LF3(15 downto 8);
125 Flag <= '1';
125 Flag <= '1';
126 when 118 =>
126 when 106 =>
127 WordOut <= LF3(7 downto 0);
127 WordOut <= LF3(7 downto 0);
128 Flag <= '1';
128 Flag <= '1';
129
129
@@ -133,16 +133,16 begin
133 when 126 =>
133 when 126 =>
134 WordOut <= LF1(7 downto 0);
134 WordOut <= LF1(7 downto 0);
135 Flag <= '1';
135 Flag <= '1';
136 when 133 =>
136 when 127 =>
137 WordOut <= LF2(15 downto 8);
137 WordOut <= LF2(15 downto 8);
138 Flag <= '1';
138 Flag <= '1';
139 when 134 =>
139 when 128 =>
140 WordOut <= LF2(7 downto 0);
140 WordOut <= LF2(7 downto 0);
141 Flag <= '1';
141 Flag <= '1';
142 when 141 =>
142 when 129 =>
143 WordOut <= LF3(15 downto 8);
143 WordOut <= LF3(15 downto 8);
144 Flag <= '1';
144 Flag <= '1';
145 when 142 =>
145 when 130 =>
146 WordOut <= LF3(7 downto 0);
146 WordOut <= LF3(7 downto 0);
147 Flag <= '1';
147 Flag <= '1';
148
148
@@ -2,18 +2,24 include .config
2
2
3 #GRLIB=$(GRLIB)
3 #GRLIB=$(GRLIB)
4 TOP=ici4
4 TOP=ici4
5 #BOARD=ICI4-main-BD
5 BOARD=ICI4-main-BD
6 BOARD=SP601
6 #BOARD=SP601
7 include $(GRLIB)/boards/$(BOARD)/Makefile.inc
7 include $(GRLIB)/boards/$(BOARD)/Makefile.inc
8 DEVICE=$(PART)-$(PACKAGE)$(SPEED)
8 DEVICE=$(PART)-$(PACKAGE)$(SPEED)
9 UCF=$(GRLIB)/boards/$(BOARD)/ICI3.ucf
9 #UCF=$(GRLIB)/boards/$(BOARD)/ICI3.ucf
10 #UCF=$(GRLIB)/boards/$(BOARD)/ICI4-Main-BD.ucf
10 UCF=$(GRLIB)/boards/$(BOARD)/ICI4-Main-BD.ucf
11 QSF=$(GRLIB)/boards/$(BOARD)/$(TOP).qsf
11 QSF=$(GRLIB)/boards/$(BOARD)/$(TOP).qsf
12 EFFORT=high
12 EFFORT=high
13 ISEMAPOPT="-timing"
13 ISEMAPOPT="-timing"
14 XSTOPT=""
14 XSTOPT=""
15 SYNPOPT="set_option -maxfan 100; set_option -pipe 1; set_option -retiming 1; set_option -write_apr_constraint 0"
15 SYNPOPT="set_option -maxfan 100; set_option -pipe 1; set_option -retiming 1; set_option -write_apr_constraint 0"
16 VHDLOPTSYNFILES= \
16 VHDLOPTSYNFILES= \
17 ICI4HDL/Convertisseur_config.vhd \
18 ICI4HDL/Convertisseur_Data.vhd \
19 ICI4HDL/DC_FRAME_PLACER.vhd \
20 ICI4HDL/DC_SMPL_CLK.vhd \
21 ICI4HDL/LF_FRAME_PLACER.vhd \
22 ICI4HDL/LF_SMPL_CLK.vhd
17
23
18 VHDLSYNFILES= \
24 VHDLSYNFILES= \
19 config.vhd ici4.vhd
25 config.vhd ici4.vhd
@@ -32,7 +38,7 DIRSKIP = b1553 pcif leon2 leon2ft crypt
32 leon4 leon4b64 l2cache gr1553b iommu haps ascs slink coremp7 pwm \
38 leon4 leon4b64 l2cache gr1553b iommu haps ascs slink coremp7 pwm \
33 ac97 hcan usb
39 ac97 hcan usb
34 DIRADD =
40 DIRADD =
35 FILEADD =
41 FILEADD =
36 FILESKIP = grcan.vhd ddr2.v mobile_ddr.v
42 FILESKIP = grcan.vhd ddr2.v mobile_ddr.v
37
43
38 include $(GRLIB)/bin/Makefile
44 include $(GRLIB)/bin/Makefile
@@ -9,6 +9,8
9
9
10 library techmap;
10 library techmap;
11 use techmap.gencomp.all;
11 use techmap.gencomp.all;
12 library ieee;
13 use ieee.std_logic_1164.all;
12
14
13 package config is
15 package config is
14 -- Technology and synthesis options
16 -- Technology and synthesis options
@@ -17,4 +19,34 package config is
17 constant CFG_PADTECH : integer := spartan6;
19 constant CFG_PADTECH : integer := spartan6;
18 -- Clock generator
20 -- Clock generator
19 constant CFG_CLKTECH : integer := spartan6;
21 constant CFG_CLKTECH : integer := spartan6;
22 constant SEND_CONSTANT_DATA : integer := 1;
23 constant SEND_MINF_VALUE : integer := 1;
24
25
26
27 constant LF1cst : std_logic_vector(15 downto 0) := X"1111";
28 constant LF2cst : std_logic_vector(15 downto 0) := X"2222";
29 constant LF3cst : std_logic_vector(15 downto 0) := X"3333";
30
31
32 constant AMR1Xcst : std_logic_vector(23 downto 0):= X"444444";
33 constant AMR1Ycst : std_logic_vector(23 downto 0):= X"555555";
34 constant AMR1Zcst : std_logic_vector(23 downto 0):= X"666666";
35
36 constant AMR2Xcst : std_logic_vector(23 downto 0):= X"777777";
37 constant AMR2Ycst : std_logic_vector(23 downto 0):= X"888888";
38 constant AMR2Zcst : std_logic_vector(23 downto 0):= X"999999";
39
40 constant AMR3Xcst : std_logic_vector(23 downto 0):= X"AAAAAA";
41 constant AMR3Ycst : std_logic_vector(23 downto 0):= X"BBBBBB";
42 constant AMR3Zcst : std_logic_vector(23 downto 0):= X"CCCCCC";
43
44 constant AMR4Xcst : std_logic_vector(23 downto 0):= X"DDDDDD";
45 constant AMR4Ycst : std_logic_vector(23 downto 0):= X"EEEEEE";
46 constant AMR4Zcst : std_logic_vector(23 downto 0):= X"FFFFFF";
47
48 constant Temp1cst : std_logic_vector(23 downto 0):= X"121212";
49 constant Temp2cst : std_logic_vector(23 downto 0):= X"343434";
50 constant Temp3cst : std_logic_vector(23 downto 0):= X"565656";
51 constant Temp4cst : std_logic_vector(23 downto 0):= X"787878";
20 end;
52 end;
@@ -1,29 +1,6
1 -----------------------------------------------------------------------------
2 -- LEON3 Xilinx SP605 Demonstration design
3 -- Copyright (C) 2011 Jiri Gaisler, Aeroflex Gaisler
4 ------------------------------------------------------------------------------
5 -- This file is a part of the GRLIB VHDL IP LIBRARY
6 -- Copyright (C) 2003 - 2008, Gaisler Research
7 -- Copyright (C) 2008 - 2011, Aeroflex Gaisler
8 --
9 -- This program is free software; you can redistribute it and/or modify
10 -- it under the terms of the GNU General Public License as published by
11 -- the Free Software Foundation; either version 2 of the License, or
12 -- (at your option) any later version.
13 --
14 -- This program is distributed in the hope that it will be useful,
15 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
16 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 -- GNU General Public License for more details.
18 --
19 -- You should have received a copy of the GNU General Public License
20 -- along with this program; if not, write to the Free Software
21 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 ------------------------------------------------------------------------------
23
24
25 library ieee;
1 library ieee;
26 use ieee.std_logic_1164.all;
2 use ieee.std_logic_1164.all;
3 use IEEE.numeric_std.all;
27 library grlib, techmap;
4 library grlib, techmap;
28 use grlib.amba.all;
5 use grlib.amba.all;
29 use grlib.amba.all;
6 use grlib.amba.all;
@@ -41,12 +18,11 use lpp.lpp_ad_conv.all;
41 use lpp.lpp_amba.all;
18 use lpp.lpp_amba.all;
42 use lpp.apb_devices_list.all;
19 use lpp.apb_devices_list.all;
43 use lpp.general_purpose.all;
20 use lpp.general_purpose.all;
21 use lpp.Rocket_PCM_Encoder.all;
44
22
45
23
46 use work.Convertisseur_config.all;
24 use work.Convertisseur_config.all;
47
25
48 library esa;
49 use esa.memoryctrl.all;
50
26
51 use work.config.all;
27 use work.config.all;
52
28
@@ -67,26 +43,12 WordSize : integer := 8; WordCnt :
67 MajF : in std_logic;
43 MajF : in std_logic;
68 Data : out std_logic;
44 Data : out std_logic;
69 DC_ADC_Sclk : out std_logic;
45 DC_ADC_Sclk : out std_logic;
70 DC_ADC_IN : in std_logic_vector(3 downto 0);
46 DC_ADC_IN : in std_logic_vector(1 downto 0);
71 DC_ADC_FORMAT : out std_logic_vector(2 downto 0);
72 DC_ADC_Mode : out std_logic_vector(1 downto 0);
73 DC_ADC_ClkDiv : out std_logic;
47 DC_ADC_ClkDiv : out std_logic;
74 DC_ADC_PWDOWN : out std_logic_vector(3 downto 0);
75 DC_ADC_FSynch : out std_logic;
48 DC_ADC_FSynch : out std_logic;
76 DC_ADC_Synch : out std_logic;
49 SET_RESET0 : out std_logic;
77 -- DATA_out_Test : out std_logic;
50 SET_RESET1 : out std_logic;
78 -- Sclk_out_test : out std_logic;
51 LED : out std_logic
79 -- Synch_out_test : out std_logic;
80 test : out std_logic;
81
82 LF_ADC_Sclk : out std_logic;
83 LF_ADC_IN : in std_logic_vector(3 downto 0);
84 LF_ADC_FORMAT : out std_logic_vector(2 downto 0);
85 LF_ADC_Mode : out std_logic_vector(1 downto 0);
86 LF_ADC_ClkDiv : out std_logic;
87 LF_ADC_PWDOWN : out std_logic_vector(3 downto 0);
88 LF_ADC_FSynch : out std_logic;
89 LF_ADC_Synch : out std_logic
90 );
52 );
91 end;
53 end;
92
54
@@ -102,13 +64,32 signal sclk_Inv : std_logic;
102 signal WordCount : integer range 0 to WordCnt-1;
64 signal WordCount : integer range 0 to WordCnt-1;
103 signal WordClk : std_logic;
65 signal WordClk : std_logic;
104
66
67 signal data_int : std_logic;
68
105 signal MuxOUT : std_logic_vector(WordSize-1 downto 0);
69 signal MuxOUT : std_logic_vector(WordSize-1 downto 0);
106 signal MuxIN : std_logic_vector((2*WordSize)-1 downto 0);
70 signal MuxIN : std_logic_vector((2*WordSize)-1 downto 0);
107 signal Sel : integer range 0 to 1;
71 signal Sel : integer range 0 to 1;
108
72
109 signal DC1 : std_logic_vector(23 downto 0);
73 signal AMR1X : std_logic_vector(23 downto 0);
110 signal DC2 : std_logic_vector(23 downto 0);
74 signal AMR1Y : std_logic_vector(23 downto 0);
111 signal DC3 : std_logic_vector(23 downto 0);
75 signal AMR1Z : std_logic_vector(23 downto 0);
76
77 signal AMR2X : std_logic_vector(23 downto 0);
78 signal AMR2Y : std_logic_vector(23 downto 0);
79 signal AMR2Z : std_logic_vector(23 downto 0);
80
81 signal AMR3X : std_logic_vector(23 downto 0);
82 signal AMR3Y : std_logic_vector(23 downto 0);
83 signal AMR3Z : std_logic_vector(23 downto 0);
84
85 signal AMR4X : std_logic_vector(23 downto 0);
86 signal AMR4Y : std_logic_vector(23 downto 0);
87 signal AMR4Z : std_logic_vector(23 downto 0);
88
89 signal Temp1 : std_logic_vector(23 downto 0);
90 signal Temp2 : std_logic_vector(23 downto 0);
91 signal Temp3 : std_logic_vector(23 downto 0);
92 signal Temp4 : std_logic_vector(23 downto 0);
112
93
113
94
114 signal LF1 : std_logic_vector(15 downto 0);
95 signal LF1 : std_logic_vector(15 downto 0);
@@ -120,18 +101,10 signal LF1_int : std_logic_vecto
120 signal LF2_int : std_logic_vector(23 downto 0);
101 signal LF2_int : std_logic_vector(23 downto 0);
121 signal LF3_int : std_logic_vector(23 downto 0);
102 signal LF3_int : std_logic_vector(23 downto 0);
122
103
123
124 --constant DC1cst : std_logic_vector(23 downto 0) := X"FA5961";
125 --constant DC2cst : std_logic_vector(23 downto 0) := X"123456";
126 --constant DC3cst : std_logic_vector(23 downto 0) := X"789012";
127 --
128 --constant LF1cst : std_logic_vector(15 downto 0) := X"3210";
129 --constant LF2cst : std_logic_vector(15 downto 0) := X"6543";
130 --constant LF3cst : std_logic_vector(15 downto 0) := X"3456";
131 --
132
133 signal DC_ADC_SmplClk : std_logic;
104 signal DC_ADC_SmplClk : std_logic;
134 signal LF_ADC_SmplClk : std_logic;
105 signal LF_ADC_SmplClk : std_logic;
106 signal SET_RESET0_sig : std_logic;
107 signal SET_RESET1_sig : std_logic;
135
108
136 signal MinFCnt : integer range 0 to MinFCount-1;
109 signal MinFCnt : integer range 0 to MinFCount-1;
137
110
@@ -139,40 +112,29 signal FramePlacerFlags : std_logi
139
112
140 begin
113 begin
141
114
142 --CLKINT0 : CLKINT
143 -- port map(clk,clk_buf);
144 --
145 --CLKINT1 : CLKINT
146 -- port map(reset,reset_buf);
147
115
148 clk_buf <= clk;
116 clk_buf <= clk;
149 reset_buf <= reset;
117 reset_buf <= reset;
150 --
118 --
151 --DATA_out_Test <= DC_ADC_IN(0);
152 --Sclk_out_test <= DC_ADC_Sclk;
153 --Synch_out_test <= DC_ADC_FSynch;
154
119
155 Gate_Inv <= not Gate;
120 Gate_Inv <= not Gate;
156 sclk_Inv <= not Sclk;
121 sclk_Inv <= not Sclk;
157 MinF_Inv <= not MinF;
122 MinF_Inv <= not MinF;
158
123
159 --DC1 <= DC1cst;
124 LED <= not data_int;
160 --DC2 <= DC2cst;
125 data <= data_int;
161 --DC3 <= DC3cst;
126
127
162
128
163 --LF1 <= LF1cst;
129 SD0 : Serial_Driver
164 --LF2 <= LF2cst;
130 generic map(WordSize)
165 --LF3 <= LF3cst;
131 port map(sclk_Inv,MuxOUT,Gate_inv,data_int);
166
132
167 SD0 : entity work.Serial_Driver
133 WC0 : Word_Cntr
168 generic map(WordSize)
169 port map(sclk_Inv,MuxOUT,Gate_inv,Data);
170
171 WC0 : entity work.Word_Cntr
172 generic map(WordSize,WordCnt)
134 generic map(WordSize,WordCnt)
173 port map(sclk_Inv,MinF,WordClk,WordCount);
135 port map(sclk_Inv,MinF,WordClk,WordCount);
174
136
175 MFC0 : entity work.MinF_Cntr
137 MFC0 : MinF_Cntr
176 generic map(MinFCount)
138 generic map(MinFCount)
177 port map(
139 port map(
178 clk => MinF_Inv,
140 clk => MinF_Inv,
@@ -181,7 +143,7 port map(
181 );
143 );
182
144
183
145
184 MUX0 : entity work.Serial_Driver_Multiplexor
146 MUX0 : Serial_Driver_Multiplexor
185 generic map(FramePlacerCount,WordSize)
147 generic map(FramePlacerCount,WordSize)
186 port map(sclk_Inv,Sel,MuxIN,MuxOUT);
148 port map(sclk_Inv,Sel,MuxIN,MuxOUT);
187
149
@@ -193,9 +155,22 port map(
193 Wcount => WordCount,
155 Wcount => WordCount,
194 MinFCnt => MinFCnt,
156 MinFCnt => MinFCnt,
195 Flag => FramePlacerFlags(0),
157 Flag => FramePlacerFlags(0),
196 DC1 => DC1,
158 AMR1X => AMR1X,
197 DC2 => DC2,
159 AMR1Y => AMR1Y,
198 DC3 => DC3,
160 AMR1Z => AMR1Z,
161 AMR2X => AMR2X,
162 AMR2Y => AMR2Y,
163 AMR2Z => AMR2Z,
164 AMR3X => AMR3X,
165 AMR3Y => AMR3Y,
166 AMR3Z => AMR3Z,
167 AMR4X => AMR4X,
168 AMR4Y => AMR4Y,
169 AMR4Z => AMR4Z,
170 Temp1 => Temp1,
171 Temp2 => Temp2,
172 Temp3 => Temp3,
173 Temp4 => Temp4,
199 WordOut => MuxIN(7 downto 0));
174 WordOut => MuxIN(7 downto 0));
200
175
201
176
@@ -216,32 +191,102 port map(
216 DC_SMPL_CLK0 : entity work.DC_SMPL_CLK
191 DC_SMPL_CLK0 : entity work.DC_SMPL_CLK
217 port map(MinF_Inv,DC_ADC_SmplClk);
192 port map(MinF_Inv,DC_ADC_SmplClk);
218
193
194 process(reset,DC_ADC_SmplClk)
195 begin
196 if reset = '0' then
197 SET_RESET0_sig <= '0';
198 elsif DC_ADC_SmplClk'event and DC_ADC_SmplClk = '1' then
199 SET_RESET0_sig <= not SET_RESET0_sig;
200 end if;
201 end process;
219
202
220 DC_ADC_Synch <= reset;
203 SET_RESET1_sig <= SET_RESET0_sig;
221 LF_ADC_Synch <= reset;
204 SET_RESET0 <= SET_RESET0_sig;
205 SET_RESET1 <= SET_RESET1_sig;
206 --
207
208
209
210 send_ADC_DATA : IF SEND_CONSTANT_DATA = 0 GENERATE
211 DC_ADC0 : DUAL_ADS1278_DRIVER --With AMR down ! => 24bits DC TM -> SC high res on Spin
212 port map(
213 Clk => clk_buf,
214 reset => reset_buf,
215 SpiClk => DC_ADC_Sclk,
216 DIN => DC_ADC_IN,
217 SmplClk => DC_ADC_SmplClk,
218 OUT00 => AMR1X,
219 OUT01 => AMR1Y,
220 OUT02 => AMR1Z,
221 OUT03 => AMR2X,
222 OUT04 => AMR2Y,
223 OUT05 => AMR2Z,
224 OUT06 => Temp1,
225 OUT07 => Temp2,
226 OUT10 => AMR3X,
227 OUT11 => AMR3Y,
228 OUT12 => AMR3Z,
229 OUT13 => AMR4X,
230 OUT14 => AMR4Y,
231 OUT15 => AMR4Z,
232 OUT16 => Temp3,
233 OUT17 => Temp4,
234 FSynch => DC_ADC_FSynch
235 );
236 LF1 <= LF1cst;
237 LF2 <= LF2cst;
238 LF3 <= LF3cst;
239 END GENERATE;
222
240
223 DC_ADC0 : ADS1274_DRIVER --With AMR down ! => 24bits DC TM -> SC high res on Spin
241 send_CST_DATA : IF (SEND_CONSTANT_DATA = 1) and (SEND_MINF_VALUE = 0) GENERATE
224 generic map(ADS127X_MODE_low_power,ADS127X_FSYNC_FORMAT)
242 AMR1X <= AMR1Xcst;
225 port map(
243 AMR1Y <= AMR1Ycst;
226 Clk => clk_buf,
244 AMR1Z <= AMR1Zcst;
227 reset => reset_buf,
245 AMR2X <= AMR2Xcst;
228 SpiClk => DC_ADC_Sclk,
246 AMR2Y <= AMR2Ycst;
229 DIN => DC_ADC_IN,
247 AMR2Z <= AMR2Zcst;
230 Ready => '0',
248 Temp1 <= Temp1cst;
231 Format => DC_ADC_Format,
249 Temp2 <= Temp2cst;
232 Mode => DC_ADC_Mode,
250 AMR3X <= AMR3Xcst;
233 ClkDiv => DC_ADC_ClkDiv,
251 AMR3Y <= AMR3Ycst;
234 PWDOWN => DC_ADC_PWDOWN,
252 AMR3Z <= AMR3Zcst;
235 SmplClk => DC_ADC_SmplClk,
253 AMR4X <= AMR4Xcst;
236 OUT0 => DC1,
254 AMR4Y <= AMR4Ycst;
237 OUT1 => DC2,
255 AMR4Z <= AMR4Zcst;
238 OUT2 => DC3,
256 Temp3 <= Temp3cst;
239 OUT3 => open,
257 Temp4 <= Temp4cst;
240 FSynch => DC_ADC_FSynch,
258
241 test => test
259 LF1 <= LF1cst;
242 );
260 LF2 <= LF2cst;
261 LF3 <= LF3cst;
262 END GENERATE;
263
264
243
265
244
266
267 send_minF_valuelbl : IF (SEND_CONSTANT_DATA = 1) and (SEND_MINF_VALUE = 1) GENERATE
268 AMR1X <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
269 AMR1Y <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
270 AMR1Z <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
271 AMR2X <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
272 AMR2Y <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
273 AMR2Z <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
274 Temp1 <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
275 Temp2 <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
276 AMR3X <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
277 AMR3Y <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
278 AMR3Z <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
279 AMR4X <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
280 AMR4Y <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
281 AMR4Z <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
282 Temp3 <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
283 Temp4 <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9));
284
285 LF1 <= LF1cst;
286 LF2 <= LF2cst;
287 LF3 <= LF3cst;
288 END GENERATE;
289
245 LF_SMPL_CLK0 : entity work.LF_SMPL_CLK
290 LF_SMPL_CLK0 : entity work.LF_SMPL_CLK
246 port map(
291 port map(
247 Wclck => WordClk,
292 Wclck => WordClk,
@@ -249,37 +294,8 port map(
249 SMPL_CLK => LF_ADC_SmplClk
294 SMPL_CLK => LF_ADC_SmplClk
250 );
295 );
251
296
252 LF_ADC0 : ADS1274_DRIVER
253 generic map(ADS127X_MODE_low_power,ADS127X_FSYNC_FORMAT)
254 port map(
255 Clk => clk_buf,
256 reset => reset_buf,
257 SpiClk => LF_ADC_Sclk,
258 DIN => LF_ADC_IN,
259 Ready => '0',
260 Format => LF_ADC_Format,
261 Mode => LF_ADC_Mode,
262 ClkDiv => LF_ADC_ClkDiv,
263 PWDOWN => LF_ADC_PWDOWN,
264 SmplClk => LF_ADC_SmplClk,
265 OUT0 => LF1_int,
266 OUT1 => LF2_int,
267 OUT2 => LF3_int,
268 OUT3 => open,
269 FSynch => LF_ADC_FSynch
270 );
271
297
272
298
273 LF1 <= LF1_int(23 downto 8);
274 LF2 <= LF2_int(23 downto 8);
275 LF3 <= LF3_int(23 downto 8);
276 --
277 --DC1 <= LF1_int(23 downto 0);
278 --DC2 <= LF2_int(23 downto 0);
279 --DC3 <= LF3_int(23 downto 0);
280
281 --Input Word Selection Decoder
282
283 process(clk)
299 process(clk)
284 variable SelVar : integer range 0 to 1;
300 variable SelVar : integer range 0 to 1;
285 begin
301 begin
@@ -1,6 +1,8
1 ./Rocket_PCM_Encoder
1 ./lpp_ad_Conv
2 ./lpp_ad_Conv
2 ./lpp_usb
3 ./lpp_usb
3 ./lpp_amba
4 ./lpp_amba
5 ./lpp_demux
4 ./lpp_memory
6 ./lpp_memory
5 ./general_purpose
7 ./general_purpose
6 ./general_purpose/lpp_AMR
8 ./general_purpose/lpp_AMR
@@ -162,30 +162,63 Type ADS127X_config is
162 MODE : ADS127X_MODE_Type;
162 MODE : ADS127X_MODE_Type;
163 end record;
163 end record;
164
164
165 COMPONENT ADS1274_DRIVER is
165 COMPONENT ADS1274_DRIVER is
166 generic(modeCfg : ADS127X_MODE_Type := ADS127X_MODE_low_power; formatCfg : ADS127X_FORMAT_Type := ADS127X_FSYNC_FORMAT);
166 generic(modeCfg : ADS127X_MODE_Type := ADS127X_MODE_low_power; formatCfg : ADS127X_FORMAT_Type := ADS127X_FSYNC_FORMAT);
167 port(
167 port(
168 Clk : in std_logic;
168 Clk : in std_logic;
169 reset : in std_logic;
169 reset : in std_logic;
170 SpiClk : out std_logic;
170 SpiClk : out std_logic;
171 DIN : in std_logic_vector(3 downto 0);
171 DIN : in std_logic_vector(3 downto 0);
172 Ready : in std_logic;
172 Ready : in std_logic;
173 Format : out std_logic_vector(2 downto 0);
173 Format : out std_logic_vector(2 downto 0);
174 Mode : out std_logic_vector(1 downto 0);
174 Mode : out std_logic_vector(1 downto 0);
175 ClkDiv : out std_logic;
175 ClkDiv : out std_logic;
176 PWDOWN : out std_logic_vector(3 downto 0);
176 PWDOWN : out std_logic_vector(3 downto 0);
177 SmplClk : in std_logic;
177 SmplClk : in std_logic;
178 OUT0 : out std_logic_vector(23 downto 0);
178 OUT0 : out std_logic_vector(23 downto 0);
179 OUT1 : out std_logic_vector(23 downto 0);
179 OUT1 : out std_logic_vector(23 downto 0);
180 OUT2 : out std_logic_vector(23 downto 0);
180 OUT2 : out std_logic_vector(23 downto 0);
181 OUT3 : out std_logic_vector(23 downto 0);
181 OUT3 : out std_logic_vector(23 downto 0);
182 FSynch : out std_logic;
182 FSynch : out std_logic;
183 test : out std_logic
183 test : out std_logic
184 );
184 );
185 end COMPONENT;
185 end COMPONENT;
186
186
187 -- todo clean file
188 COMPONENT DUAL_ADS1278_DRIVER is
189 port(
190 Clk : in std_logic;
191 reset : in std_logic;
192 SpiClk : out std_logic;
193 DIN : in std_logic_vector(1 downto 0);
194 SmplClk : in std_logic;
195 OUT00 : out std_logic_vector(23 downto 0);
196 OUT01 : out std_logic_vector(23 downto 0);
197 OUT02 : out std_logic_vector(23 downto 0);
198 OUT03 : out std_logic_vector(23 downto 0);
199 OUT04 : out std_logic_vector(23 downto 0);
200 OUT05 : out std_logic_vector(23 downto 0);
201 OUT06 : out std_logic_vector(23 downto 0);
202 OUT07 : out std_logic_vector(23 downto 0);
203 OUT10 : out std_logic_vector(23 downto 0);
204 OUT11 : out std_logic_vector(23 downto 0);
205 OUT12 : out std_logic_vector(23 downto 0);
206 OUT13 : out std_logic_vector(23 downto 0);
207 OUT14 : out std_logic_vector(23 downto 0);
208 OUT15 : out std_logic_vector(23 downto 0);
209 OUT16 : out std_logic_vector(23 downto 0);
210 OUT17 : out std_logic_vector(23 downto 0);
211 FSynch : out std_logic
212 );
213 end COMPONENT;
187
214
188
215
189 END lpp_ad_conv;
216 END lpp_ad_conv;
190
217
191
218
219
220
221
222
223
224
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (612 lines changed) Show them Hide them
General Comments 0
You need to be logged in to leave comments. Login now