# HG changeset patch # User jeandet # Date 2013-05-02 16:29:53 # Node ID 0b190be76d60148f150af6bbf9d100cc17211193 # Parent 217245b6ebffd328a80f643b07948066798a7778 ICI rockets designs added diff --git a/boards/ICI4-3DCAM/ICI4-Main-BD.ucf b/boards/ICI4-3DCAM/ICI4-Main-BD.ucf new file mode 100644 --- /dev/null +++ b/boards/ICI4-3DCAM/ICI4-Main-BD.ucf @@ -0,0 +1,11 @@ +NET "CLK" LOC = "B10"; +NET "RESET" LOC = "A5" | IOSTANDARD = LVTTL; +NET "SCLK" LOC = "V22" | IOSTANDARD = LVTTL; +NET "GATE" LOC = "T22" | IOSTANDARD = LVTTL; +NET "MINF" LOC = "T21" | IOSTANDARD = LVTTL; +NET "MAJF" LOC = "U22" | IOSTANDARD = LVTTL; +NET "DATA" LOC = "V21"; +NET "DC_ADC_SCLK" LOC = "AB17"; +NET "DC_ADC_IN(0)" LOC = "AB19" | IOSTANDARD = LVTTL; +NET "DC_ADC_IN(1)" LOC = "AA18" | IOSTANDARD = LVTTL; +NET "DC_ADC_FSynch" LOC = "AB18"; diff --git a/boards/ICI4-3DCAM/Makefile.inc b/boards/ICI4-3DCAM/Makefile.inc new file mode 100644 --- /dev/null +++ b/boards/ICI4-3DCAM/Makefile.inc @@ -0,0 +1,13 @@ +# +TECHNOLOGY=Spartan-3A +ISETECH="Spartan-3A" +PART=xc3s200a +PACKAGE=VQ100 +SPEED=-3 +SYNFREQ=220 +PROMGENPAR= + +MANUFACTURER=Xilinx +MGCPART=xc3s200a$(PACKAGE) +MGCTECHNOLOGY=SPARTAN-3A +MGCPACKAGE=$(PACKAGE) diff --git a/boards/ICI4-3DCAM/default.ut b/boards/ICI4-3DCAM/default.ut new file mode 100644 --- /dev/null +++ b/boards/ICI4-3DCAM/default.ut @@ -0,0 +1,24 @@ +-g DebugBitstream:No +-g Binary:no +-b +-g CRC:Enable +-g ConfigRate:26 +-g ProgPin:PullUp +-g DonePin:PullUp +-g TckPin:PullUp +-g TdiPin:PullUp +-g TdoPin:PullUp +-g TmsPin:PullUp +-g UnusedPin:PullDown +-g UserID:0xFFFFFFFF +-g SPI_buswidth:4 +-g StartUpClk:CCLK +-g DONE_cycle:4 +-g GTS_cycle:5 +-g GWE_cycle:6 +-g LCK_cycle:NoWait +-g Security:None +-g Persist:No +-g ReadBack +-g DonePipe:No +-g DriveDone:Yes diff --git a/boards/ICI4-3DCAM/fpga-usb.cmd b/boards/ICI4-3DCAM/fpga-usb.cmd new file mode 100644 --- /dev/null +++ b/boards/ICI4-3DCAM/fpga-usb.cmd @@ -0,0 +1,7 @@ +setMode -bscan +setCable -p usb21 +identify +assignfile -p 1 -file xilinx-sp605-xc6slx45t.bit +program -p 1 +quit + diff --git a/boards/ICI4-3DCAM/fpga.cmd b/boards/ICI4-3DCAM/fpga.cmd new file mode 100644 --- /dev/null +++ b/boards/ICI4-3DCAM/fpga.cmd @@ -0,0 +1,7 @@ +setMode -bs +setCable -port auto +Identify +identifyMPM +assignFile -p 2 -file "xilinx-sp605-xc6slx45t.bit" +Program -p 2 -defaultVersion 0 +quit diff --git a/boards/ICI4-main-BD/ICI4-Main-BD.ucf b/boards/ICI4-main-BD/ICI4-Main-BD.ucf --- a/boards/ICI4-main-BD/ICI4-Main-BD.ucf +++ b/boards/ICI4-main-BD/ICI4-Main-BD.ucf @@ -1,2 +1,11 @@ -NET "CLK" LOC = "AE16"; -NET "RESET" LOC = "H10"; +NET "CLK" LOC = "B10"; +NET "RESET" LOC = "A5" | IOSTANDARD = LVTTL; +NET "SCLK" LOC = "V22" | IOSTANDARD = LVTTL; +NET "GATE" LOC = "T22" | IOSTANDARD = LVTTL; +NET "MINF" LOC = "T21" | IOSTANDARD = LVTTL; +NET "MAJF" LOC = "U22" | IOSTANDARD = LVTTL; +NET "DATA" LOC = "V21"; +NET "DC_ADC_SCLK" LOC = "AB17"; +NET "DC_ADC_IN(0)" LOC = "AB19" | IOSTANDARD = LVTTL; +NET "DC_ADC_IN(1)" LOC = "AA18" | IOSTANDARD = LVTTL; +NET "DC_ADC_FSynch" LOC = "AB18"; diff --git a/designs/ICI4-3DCAM-Integ1/ICI4HDL/Convertisseur_config.vhd b/designs/ICI4-3DCAM-Integ1/ICI4HDL/Convertisseur_config.vhd new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/ICI4HDL/Convertisseur_config.vhd @@ -0,0 +1,66 @@ +-- Convertisseur_config.vhd +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + + +Package Convertisseur_config is + +--===========================================================| +--================== Variables Utiles =======================| +--===========================================================| + +constant Fr�q_clk_Hz : integer := 27000000; +constant D�bit_Hz : integer := 1000000; +constant nb_compteur_sclk : integer := Fr�q_clk_Hz/D�bit_Hz; +constant N_chanel : integer := 3; +constant nb_mots : integer := 144; +constant Vector_Dummy : std_logic_vector(23 downto 0) := X"FD1869"; + + +--===========================================================| +--================= Configuration ADS =======================| +--===========================================================| + +Type ADS_FORMAT_Type is array(2 downto 0) of std_logic; +constant SPI_FORMAT : ADS_FORMAT_Type := "010"; +constant FSYNC_FORMAT : ADS_FORMAT_Type := "101"; + +Type ADS_MODE_Type is array(1 downto 0) of std_logic; +constant MODE_low_power : ADS_MODE_Type := "10"; +constant MODE_low_speed : ADS_MODE_Type := "11"; +constant MODE_high_resolution : ADS_MODE_Type := "01"; + +Type ADS_config is + record + SYNC : std_logic; + CLKDIV : std_logic; + FORMAT : ADS_FORMAT_Type; + MODE : ADS_MODE_Type; + end record; + + +--===========================================================| +--================ Entr�es/Sorties ADS ======================| +--=============== + init entr�es (simu) =====================| +--===========================================================| + +Type Tbl_In is array(natural range <>) of std_logic; +Type Tbl_Out is array(natural range <>) of std_logic_vector(23 downto 0); + +Type IN_ADS is + record + RDY : std_logic; + Data_in : Tbl_In(1 to N_chanel); + end record; + +Type OUT_ADS is + record + Vector_out : Tbl_Out(1 to N_chanel); + end record; + +constant Data_inINIT : Tbl_In(1 to N_chanel) := (others => '0'); +constant IN_ADSINIT : IN_ADS := ('1',Data_inINIT); + + +end; \ No newline at end of file diff --git a/designs/ICI4-3DCAM-Integ1/ICI4HDL/ICI4_3DCAM_FRAM_PLACER.vhd b/designs/ICI4-3DCAM-Integ1/ICI4HDL/ICI4_3DCAM_FRAM_PLACER.vhd new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/ICI4HDL/ICI4_3DCAM_FRAM_PLACER.vhd @@ -0,0 +1,141 @@ +---------------------------------------------------------------------------------- +-- Company: +-- Engineer: +-- +-- Create Date: 10:39:51 04/25/2013 +-- Design Name: +-- Module Name: ICI4_3DCAM_FRAM_PLACER - Behavioral +-- Project Name: +-- Target Devices: +-- Tool versions: +-- Description: +-- +-- Dependencies: +-- +-- Revision: +-- Revision 0.01 - File Created +-- Additional Comments: +-- +---------------------------------------------------------------------------------- +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + +-- Uncomment the following library declaration if using +-- arithmetic functions with Signed or Unsigned values +--use IEEE.NUMERIC_STD.ALL; + +-- Uncomment the following library declaration if instantiating +-- any Xilinx primitives in this code. +--library UNISIM; +--use UNISIM.VComponents.all; + +entity ICI4_3DCAM_FRAM_PLACER is +generic(WordSize :integer := 8;WordCnt : integer := 144;MinFCount : integer := 64); +port( + clk : in std_logic; + Wcount : in integer range 0 to WordCnt-1; + Flag : out std_logic; + WORD0 : in std_logic_vector(15 downto 0); + WORD1 : in std_logic_vector(15 downto 0); + WORD2 : in std_logic_vector(15 downto 0); + WORD3 : in std_logic_vector(15 downto 0); + WORD4 : in std_logic_vector(15 downto 0); + WORD5 : in std_logic_vector(15 downto 0); + WORD6 : in std_logic_vector(15 downto 0); + WORD7 : in std_logic_vector(15 downto 0); + WORD8 : in std_logic_vector(15 downto 0); + WORD9 : in std_logic_vector(15 downto 0); + WORD10 : in std_logic_vector(15 downto 0); + WORD11 : in std_logic_vector(15 downto 0); + WORD12 : in std_logic_vector(15 downto 0); + WordOut : out std_logic_vector(WordSize-1 downto 0) + +); +end ICI4_3DCAM_FRAM_PLACER; + +architecture Behavioral of ICI4_3DCAM_FRAM_PLACER is + +begin + + + process(clk) + begin + if clk'event and clk ='1' then + case Wcount is + + + when 29 => + WordOut <= WORD3(15 downto 8); + Flag <= '1'; + when 30 => + WordOut <= WORD3(7 downto 0); + Flag <= '1'; + when 31 => + WordOut <= WORD4(15 downto 8); + Flag <= '1'; + when 32 => + WordOut <= WORD4(7 downto 0); + Flag <= '1'; + when 33 => + WordOut <= WORD5(15 downto 8); + Flag <= '1'; + when 34 => + WordOut <= WORD5(7 downto 0); + Flag <= '1'; + + when 35 => + WordOut <= WORD6(15 downto 8); + Flag <= '1'; + when 36 => + WordOut <= WORD6(7 downto 0); + Flag <= '1'; + when 37 => + WordOut <= WORD7(15 downto 8); + Flag <= '1'; + when 38 => + WordOut <= WORD7(7 downto 0); + Flag <= '1'; + when 39 => + WordOut <= WORD8(15 downto 8); + Flag <= '1'; + when 40 => + WordOut <= WORD8(7 downto 0); + Flag <= '1'; + + when 41 => + WordOut <= WORD9(15 downto 8); + Flag <= '1'; + when 42 => + WordOut <= WORD9(7 downto 0); + Flag <= '1'; + when 43 => + WordOut <= WORD10(15 downto 8); + Flag <= '1'; + when 44 => + WordOut <= WORD10(7 downto 0); + Flag <= '1'; + when 45 => + WordOut <= WORD11(15 downto 8); + Flag <= '1'; + when 46 => + WordOut <= WORD11(7 downto 0); + Flag <= '1'; + + when 47 => + WordOut <= WORD12(15 downto 8); + Flag <= '1'; + when 48 => + WordOut <= WORD12(7 downto 0); + Flag <= '1'; + + + when others => + WordOut <= X"A5"; + Flag <= '0'; + end case; + end if; + end process; + +end Behavioral; + diff --git a/designs/ICI4-3DCAM-Integ1/ICI4HDL/LF_FRAME_PLACER.vhd b/designs/ICI4-3DCAM-Integ1/ICI4HDL/LF_FRAME_PLACER.vhd new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/ICI4HDL/LF_FRAME_PLACER.vhd @@ -0,0 +1,63 @@ +-- LF_FRAME_PLACER.vhd +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + + + +entity LF_FRAME_PLACER is +generic(WordSize :integer := 8;WordCnt : integer := 144;MinFCount : integer := 64); +port( + clk : in std_logic; + Wcount : in integer range 0 to WordCnt-1; + Flag : out std_logic; + LF1 : in std_logic_vector(15 downto 0); + LF2 : in std_logic_vector(15 downto 0); + LF3 : in std_logic_vector(15 downto 0); + WordOut : out std_logic_vector(WordSize-1 downto 0) + +); +end entity; + + + + + +architecture ar_LF_FRAME_PLACER of LF_FRAME_PLACER is + + +begin + + process(clk) + begin + if clk'event and clk ='1' then + case Wcount is + when 23 => + WordOut <= LF1(15 downto 8); + Flag <= '1'; + when 24 => + WordOut <= LF1(7 downto 0); + Flag <= '1'; + when 25 => + WordOut <= LF2(15 downto 8); + Flag <= '1'; + when 26 => + WordOut <= LF2(7 downto 0); + Flag <= '1'; + when 27 => + WordOut <= LF3(15 downto 8); + Flag <= '1'; + when 28 => + WordOut <= LF3(7 downto 0); + Flag <= '1'; + + when others => + WordOut <= X"A5"; + Flag <= '0'; + end case; + end if; + end process; + + + +end ar_LF_FRAME_PLACER; \ No newline at end of file diff --git a/designs/ICI4-3DCAM-Integ1/Makefile b/designs/ICI4-3DCAM-Integ1/Makefile new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/Makefile @@ -0,0 +1,47 @@ +include .config + +#GRLIB=$(GRLIB) +TOP=ici4 +BOARD=ICI4-3DCAM +#BOARD=SP601 +include $(GRLIB)/boards/$(BOARD)/Makefile.inc +DEVICE=$(PART)-$(PACKAGE)$(SPEED) +#UCF=$(GRLIB)/boards/$(BOARD)/ICI3.ucf +UCF=$(GRLIB)/boards/$(BOARD)/ICI4-Main-BD.ucf +QSF=$(GRLIB)/boards/$(BOARD)/$(TOP).qsf +EFFORT=high +ISEMAPOPT="-timing" +XSTOPT="" +SYNPOPT="set_option -maxfan 100; set_option -pipe 1; set_option -retiming 1; set_option -write_apr_constraint 0" +VHDLOPTSYNFILES= \ + ICI4HDL/Convertisseur_config.vhd \ + ICI4HDL/ICI4_3DCAM_FRAM_PLACER.vhd \ + ICI4HDL/LF_FRAME_PLACER.vhd + +VHDLSYNFILES= \ + config.vhd ici4.vhd +VHDLSIMFILES=testbench.vhd +SIMTOP=testbench +#SDCFILE=$(GRLIB)/boards/$(BOARD)/default.sdc +SDCFILE=default.sdc +BITGEN=$(GRLIB)/boards/$(BOARD)/default.ut +CLEAN=soft-clean +VCOMOPT=-explicit +TECHLIBS = secureip unisim + +LIBSKIP = core1553bbc core1553brm core1553brt gr1553 corePCIF \ + tmtc openchip cypress ihp gleichmann gsi fmf spansion +DIRSKIP = b1553 pcif leon2 leon2ft crypto satcan pci leon3ft ambatest \ + leon4 leon4b64 l2cache gr1553b iommu haps ascs slink coremp7 pwm \ + ac97 hcan usb +DIRADD = +FILEADD = +FILESKIP = grcan.vhd ddr2.v mobile_ddr.v + +include $(GRLIB)/bin/Makefile +include $(GRLIB)/software/leon3/Makefile + + +################## project specific targets ########################## + + diff --git a/designs/ICI4-3DCAM-Integ1/README.txt b/designs/ICI4-3DCAM-Integ1/README.txt new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/README.txt @@ -0,0 +1,209 @@ +This leon3 design is tailored to the Xilinx SP605 Spartan6 board + +Simulation and synthesis +------------------------ + +The design uses the Xilinx MIG memory interface with an AHB-2.0 +interface. The MIG source code cannot be distributed due to the +prohibitive Xilinx license, so the MIG must be re-generated with +coregen before simulation and synthesis can be done. + +To generate the MIG and install tne Xilinx unisim simulation +library, do as follows: + + make mig + make install-secureip + +This will ONLY work with ISE-13.2 installed, and the XILINX variable +properly set in the shell. To synthesize the design, do + + make ise + +and then + + make ise-prog-fpga + +to program the FPGA. + +Design specifics +---------------- + +* System reset is mapped to the CPU RESET button + +* The AHB and processor is clocked by a 60 MHz clock, generated + from the 33 MHz SYSACE clock using a DCM. You can change the frequency + generation in the clocks menu of xconfig. The DDR3 (MIG) controller + runs at 667 MHz. + +* The GRETH core is enabled and runs without problems at 100 Mbit. + Ethernet debug link is enabled and has IP 192.168.0.51. + 1 Gbit operation is also possible (requires grlib com release), + uncomment related timing constraints in the leon3mp.ucf first. + +* 16-bit flash prom can be read at address 0. It can be programmed + with GRMON version 1.1.16 or later. + +* DDR3 is working with the provided Xilinx MIG DDR3 controller. + If you want to simulate this design, first install the secure + IP models with: + + make install-secureip + + Then rebuild the scripts and simulation model: + + make distclean vsim + + Modelsim v6.6e or newer is required to build the secure IP models. + Note that the regular leon3 test bench cannot be run in simulation + as the DDR3 model lacks data pre-load. + +* The application UART1 is connected to the USB/UART connector + +* The SVGA frame buffer uses a separate port on the DDR3 controller, + and therefore does not noticeably affect the performance of the processor. + Default output is analog VGA, to switch to DVI mode execute this + command in grmon: + + i2c dvi init_l4itx_vga + +* The JTAG DSU interface is enabled and accesible via the USB/JTAG port. + Start grmon with -xilusb to connect. + +* Output from GRMON is: + +$ grmon -xilusb -u + + GRMON LEON debug monitor v1.1.51 professional version (debug) + + Copyright (C) 2004-2011 Aeroflex Gaisler - all rights reserved. + For latest updates, go to http://www.gaisler.com/ + Comments or bug-reports to support@gaisler.com + + Xilinx cable: Cable type/rev : 0x3 + JTAG chain: xc6slx45t xccace + + GRLIB build version: 4111 + + initialising ............... + detected frequency: 50 MHz + SRAM waitstates: 1 + + Component Vendor + LEON3 SPARC V8 Processor Gaisler Research + AHB Debug JTAG TAP Gaisler Research + GR Ethernet MAC Gaisler Research + LEON2 Memory Controller European Space Agency + AHB/APB Bridge Gaisler Research + LEON3 Debug Support Unit Gaisler Research + Xilinx MIG DDR2 controller Gaisler Research + AHB/APB Bridge Gaisler Research + Generic APB UART Gaisler Research + Multi-processor Interrupt Ctrl Gaisler Research + Modular Timer Unit Gaisler Research + SVGA Controller Gaisler Research + AMBA Wrapper for OC I2C-master Gaisler Research + General purpose I/O port Gaisler Research + AHB status register Gaisler Research + + Use command 'info sys' to print a detailed report of attached cores + +grlib> inf sys +00.01:003 Gaisler Research LEON3 SPARC V8 Processor (ver 0x0) + ahb master 0 +01.01:01c Gaisler Research AHB Debug JTAG TAP (ver 0x1) + ahb master 1 +02.01:01d Gaisler Research GR Ethernet MAC (ver 0x0) + ahb master 2, irq 12 + apb: 80000e00 - 80000f00 + Device index: dev0 + edcl ip 192.168.1.51, buffer 2 kbyte +00.04:00f European Space Agency LEON2 Memory Controller (ver 0x1) + ahb: 00000000 - 20000000 + apb: 80000000 - 80000100 + 16-bit prom @ 0x00000000 +01.01:006 Gaisler Research AHB/APB Bridge (ver 0x0) + ahb: 80000000 - 80100000 +02.01:004 Gaisler Research LEON3 Debug Support Unit (ver 0x1) + ahb: 90000000 - a0000000 + AHB trace 256 lines, 32-bit bus, stack pointer 0x47fffff0 + CPU#0 win 8, hwbp 2, itrace 256, V8 mul/div, srmmu, lddel 1 + icache 2 * 8 kbyte, 32 byte/line rnd + dcache 2 * 4 kbyte, 16 byte/line rnd +04.01:06b Gaisler Research Xilinx MIG DDR2 controller (ver 0x0) + ahb: 40000000 - 48000000 + apb: 80100000 - 80100100 + DDR2: 128 Mbyte +0d.01:006 Gaisler Research AHB/APB Bridge (ver 0x0) + ahb: 80100000 - 80200000 +01.01:00c Gaisler Research Generic APB UART (ver 0x1) + irq 2 + apb: 80000100 - 80000200 + baud rate 38343, DSU mode (FIFO debug) +02.01:00d Gaisler Research Multi-processor Interrupt Ctrl (ver 0x3) + apb: 80000200 - 80000300 +03.01:011 Gaisler Research Modular Timer Unit (ver 0x0) + irq 8 + apb: 80000300 - 80000400 + 8-bit scaler, 2 * 32-bit timers, divisor 50 +06.01:063 Gaisler Research SVGA Controller (ver 0x0) + apb: 80000600 - 80000700 + clk0: 50.00 MHz +09.01:028 Gaisler Research AMBA Wrapper for OC I2C-master (ver 0x3) + irq 14 + apb: 80000900 - 80000a00 +0a.01:01a Gaisler Research General purpose I/O port (ver 0x1) + apb: 80000a00 - 80000b00 +0f.01:052 Gaisler Research AHB status register (ver 0x0) + irq 7 + apb: 80000f00 - 80001000 +grlib> fla + + Intel-style 16-bit flash on D[31:16] + + Manuf. Intel + Device Strataflash P30 + + Device ID 02e44603e127ffff + User ID ffffffffffffffff + + + 1 x 32 Mbyte = 32 Mbyte total @ 0x00000000 + + + CFI info + flash family : 1 + flash size : 256 Mbit + erase regions : 2 + erase blocks : 259 + write buffer : 1024 bytes + lock-down : yes + region 0 : 255 blocks of 128 Kbytes + region 1 : 4 blocks of 32 Kbytes + +grlib> lo ~/ibm/src/bench/leonbench/coremark.exe +section: .text at 0x40000000, size 102544 bytes +section: .data at 0x40019090, size 2788 bytes +total size: 105332 bytes (1.2 Mbit/s) +read 272 symbols +entry point: 0x40000000 +grlib> run +2K performance run parameters for coremark. +CoreMark Size : 666 +Total ticks : 19945918 +Total time (secs): 19.945918 +Iterations/Sec : 100.271143 +Iterations : 2000 +Compiler version : GCC4.4.2 +Compiler flags : -O3 -mv8 -funroll-loops -fgcse-sm -combine -DPERFORMANCE_RUN=1 -mcpu=v8 -msoft-float +Memory location : STACK +seedcrc : 0xe9f5 +[0]crclist : 0xe714 +[0]crcmatrix : 0x1fd7 +[0]crcstate : 0x8e3a +[0]crcfinal : 0x4983 +Correct operation validated. See readme.txt for run and reporting rules. +CoreMark 1.0 : 100.271143 / GCC4.4.2 -O3 -mv8 -funroll-loops -fgcse-sm -combine -DPERFORMANCE_RUN=1 -mcpu=v8 -msoft-float / Stack + +Program exited normally. +grlib> + diff --git a/designs/ICI4-3DCAM-Integ1/config.help b/designs/ICI4-3DCAM-Integ1/config.help new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/config.help @@ -0,0 +1,1030 @@ + + +Prompt for target technology +CONFIG_SYN_INFERRED + Selects the target technology for memory and pads. + The following are available: + + - Inferred: Generic FPGA or ASIC targets if your synthesis tool + is capable of inferring RAMs and pads automatically. + + - Actel ProAsic/P/3, IGLOO and Axcelerator FPGAs + - Aeroflex UT25CRH Rad-Hard 0.25 um CMOS + - Altera: Most Altera FPGA families + - Altera-Stratix: Altera Stratix FPGA family + - Altera-StratixII: Altera Stratix-II FPGA family + - ATC18: Atmel-Nantes 0.18 um rad-hard CMOS + - IHP25: IHP 0.25 um CMOS + - IHP25RH: IHP Rad-Hard 0.25 um CMOS + - Lattice : EC/ECP/XP FPGAs + - Quicklogic : Eclipse/E/II FPGAs + - UMC-0.18 : UMC 0.18 um CMOS with Virtual Silicon libraries + - Xilinx-Spartan/2/3: Xilinx Spartan/2/3 libraries + - Xilinx-Spartan3E: Xilinx Spartan3E libraries + - Xilinx-Virtex/E: Xilinx Virtex/E libraries + - Xilinx-Virtex2/4/5: Xilinx Virtex2/4/5 libraries + + +Ram library +CONFIG_MEM_VIRAGE + Select RAM generators for ASIC targets. + +Infer ram +CONFIG_SYN_INFER_RAM + Say Y here if you want the synthesis tool to infer your + RAM automatically. Say N to directly instantiate technology- + specific RAM cells for the selected target technology package. + +Infer pads +CONFIG_SYN_INFER_PADS + Say Y here if you want the synthesis tool to infer pads. + Say N to directly instantiate technology-specific pads from + the selected target technology package. + +No async reset +CONFIG_SYN_NO_ASYNC + Say Y here if you disable asynchronous reset in some of the IP cores. + Might be necessary if the target library does not have cells with + asynchronous set/reset. + +Scan support +CONFIG_SYN_SCAN + Say Y here to enable scan support in some cores. This will enable + the scan support generics where available and add logic to make + the design testable using full-scan. + +Use Virtex CLKDLL for clock synchronisation +CONFIG_CLK_INFERRED + Certain target technologies include clock generators to scale or + phase-adjust the system and SDRAM clocks. This is currently supported + for Xilinx, Altera and Proasic3 FPGAs. Depending on technology, you + can select to use the Xilinx CKLDLL macro (Virtex, VirtexE, Spartan1/2), + the Xilinx DCM (Virtex-2, Spartan3, Virtex-4), the Altera ALTDLL + (Stratix, Cyclone), or the Proasic3 PLL. Choose the 'inferred' + option to skip a clock generator. + +Clock multiplier +CONFIG_CLK_MUL + When using the Xilinx DCM or Altera ALTPLL, the system clock can + be multiplied with a factor of 2 - 32, and divided by a factor of + 1 - 32. This makes it possible to generate almost any desired + processor frequency. When using the Xilinx CLKDLL generator, + the resulting frequency scale factor (mul/div) must be one of + 1/2, 1 or 2. On Proasic3, the factor can be 1 - 128. + + WARNING: The resulting clock must be within the limits specified + by the target FPGA family. + +Clock divider +CONFIG_CLK_DIV + When using the Xilinx DCM or Altera ALTPLL, the system clock can + be multiplied with a factor of 2 - 32, and divided by a factor of + 1 - 32. This makes it possible to generate almost any desired + processor frequency. When using the Xilinx CLKDLL generator, + the resulting frequency scale factor (mul/div) must be one of + 1/2, 1 or 2. On Proasic3, the factor can be 1 - 128. + + WARNING: The resulting clock must be within the limits specified + by the target FPGA family. + +Output clock divider +CONFIG_OCLK_DIV + When using the Proasic3 PLL, the system clock is generated by three + parameters: input clock multiplication, input clock division and + output clock division. Only certain values of these parameters + are allowed, but unfortunately this is not documented by Actel. + To find the correct values, run the Libero Smartgen tool and + insert you desired input and output clock frequencies in the + Static PLL configurator. The mul/div factors can then be read + out from tool. + +Output clock divider, 2nd clock +CONFIG_OCLKB_DIV + See help for 'Ouput division factor'. Set this to 0 to disable the + second clock output. + +Output clock divider, 3rd clock +CONFIG_OCLKC_DIV + See help for 'Ouput division factor'. Set this to 0 to disable the + third clock output. + +System clock multiplier +CONFIG_CLKDLL_1_2 + The Xilinx CLKDLL can scale the input clock with a factor of 0.5, 1.0, + or 2.0. Useful when the target board has an oscillator with a too high + (or low) frequency for your design. The divided clock will be used as the + main clock for the whole processor (except PCI and ethernet clocks). + +System clock multiplier +CONFIG_DCM_2_3 + The Xilinx DCM and Altera ALTDLL can scale the input clock with a large + range of factors. Useful when the target board has an oscillator with a + too high (or low) frequency for your design. The divided clock will + be used as the main clock for the whole processor (except PCI and + ethernet clocks). NOTE: the resulting frequency must be at least + 24 MHz or the DCM and ALTDLL might not work. + +Enable CLKDLL for PCI clock +CONFIG_PCI_CLKDLL + Say Y here to re-synchronize the PCI clock using a + Virtex BUFGDLL macro. Will improve PCI clock-to-output + delays on the expense of input-setup requirements. + +Use PCI clock system clock +CONFIG_PCI_SYSCLK + Say Y here to the PCI clock to generate the system clock. + The PCI clock can be scaled using the DCM or CLKDLL to + generate a suitable processor clock. + +External SDRAM clock feedback +CONFIG_CLK_NOFB + Say Y here to disable the external clock feedback to synchronize the + SDRAM clock. This option is necessary if your board or design does not + have an external clock feedback that is connected to the pllref input + of the clock generator. + +Number of processors +CONFIG_PROC_NUM + The number of processor cores. The LEON3MP design can accomodate + up to 4 LEON3 processor cores. Use 1 unless you know what you are + doing ... + +Number of SPARC register windows +CONFIG_IU_NWINDOWS + The SPARC architecture (and LEON) allows 2 - 32 register windows. + However, any number except 8 will require that you modify and + recompile your run-time system or kernel. Unless you know what + you are doing, use 8. + +SPARC V8 multiply and divide instruction +CONFIG_IU_V8MULDIV + If you say Y here, the SPARC V8 multiply and divide instructions + will be implemented. The instructions are: UMUL, UMULCC, SMUL, + SMULCC, UDIV, UDIVCC, SDIV, SDIVCC. In code containing frequent + integer multiplications and divisions, significant performance + increase can be achieved. Emulated floating-point operations will + also benefit from this option. + + By default, the gcc compiler does not emit multiply or divide + instructions and your code must be compiled with -mv8 to see any + performance increase. On the other hand, code compiled with -mv8 + will generate an illegal instruction trap when executed on processors + with this option disabled. + + The divider consumes approximately 2 kgates, the multiplier 6 kgates. + +Multiplier latency +CONFIG_IU_MUL_LATENCY_2 + Implementation options for the integer multiplier. + + Type Implementation issue-rate/latency + 2-clocks 32x32 pipelined multiplier 1/2 + 4-clocks 16x16 standard multiplier 4/4 + 5-clocks 16x16 pipelined multiplier 4/5 + +MAC operation +CONFIG_IU_MUL_MAC + If you say Y here, the SPARC V8e UMAC/SMAC (multiply-accumulate) + instructions will be enabled. The instructions implement a + single-cycle 16x16->32 bits multiply with a 40-bits accumulator. + The details of these instructions can be found in the LEON manual, + This option is only available when 16x16 multiplier is used. + +Multiplier structure +CONFIG_IU_MUL_INFERRED + Structure options for the integer multiplier. The multiplier + can be implemented with the following structures: + + * Inferred by the synthesis tool + * Generated using Module Generators from NTNU + * Using technology specific netlists (TechSpec) + * Using Synopsys Designware (DW02_mult and DW_mult_pipe) + +Branch prediction +CONFIG_IU_BP + Enabling branch prediction will improve performance with + up to 20%, depending on application. The timing and area + overhead are minor, so it is recommended to always enable + this option. + +Single vector trapping +CONFIG_IU_SVT + Single-vector trapping is a SPARC V8e option to reduce code-size + in small applications. If enabled, the processor will jump to + the address of trap 0 (tt = 0x00) for all traps. No trap table + is then needed. The trap type is present in %psr.tt and must + be decoded by the O/S. Saves 4 Kbyte of code, but increases + trap and interrupt overhead. Currently, the only O/S supporting + this option is eCos. To enable SVT, the O/S must also set bit 13 + in %asr17. + +Load latency +CONFIG_IU_LDELAY + Defines the pipeline load delay (= pipeline cycles before the data + from a load instruction is available for the next instruction). + One cycle gives best performance, but might create a critical path + on targets with slow (data) cache memories. A 2-cycle delay can + improve timing but will reduce performance with about 5%. + +Reset address +CONFIG_IU_RSTADDR + By default, a SPARC processor starts execution at address 0. + With this option, any 4-kbyte aligned reset start address can be + choosen. Keep at 0 unless you really know what you are doing. + +No tagged arithmetic +CONFIG_NOTAG + Say Y here to disable tagged arithmetic and the CASA instructions. + This will save some area in minimal systems that do not need + these features. + +Power-down +CONFIG_PWD + Say Y here to enable the power-down feature of the processor. + Might reduce the maximum frequency slightly on FPGA targets. + For details on the power-down operation, see the LEON3 manual. + +Hardware watchpoints +CONFIG_IU_WATCHPOINTS + The processor can have up to 4 hardware watchpoints, allowing to + create both data and instruction breakpoints at any memory location, + also in PROM. Each watchpoint will use approximately 500 gates. + Use 0 to disable the watchpoint function. + +Floating-point enable +CONFIG_FPU_ENABLE + Say Y here to enable the floating-point interface for the MEIKO + or GRFPU. Note that no FPU's are provided with the GPL version + of GRLIB. Both the Gaisler GRFPU and the Meiko FPU are commercial + cores and must be obtained separately. + +FPU selection +CONFIG_FPU_GRFPU + Select between Gaisler Research's GRFPU and GRFPU-lite FPUs or the Sun + Meiko FPU core. All cores are fully IEEE-754 compatible and support + all SPARC FPU instructions. + +GRFPU Multiplier +CONFIG_FPU_GRFPU_INFMUL + On FPGA targets choose inferred multiplier. For ASIC implementations + choose between Synopsys Design Ware (DW) multiplier or Module + Generator (ModGen) multiplier. The DW multiplier gives better results + (smaller area and better timing) but requires a DW license. + The ModGen multiplier is part of GRLIB and does not require a license. + The Technology Specific multiplier option selects a pre-designed + multiplier using technology specific macrocells when available, else + an inferred multiplier is used. + +Shared GRFPU +CONFIG_FPU_GRFPU_SH + If enabled multiple CPU cores will share one GRFPU. + +GRFPC Configuration +CONFIG_FPU_GRFPC0 + Configures the GRFPU-LITE controller. + + In simple configuration controller executes FP instructions + in parallel with integer instructions. FP operands are fetched + in the register file stage and the result is written in the write + stage. This option uses least area resources. + + Data forwarding configuration gives ~ 10 % higher FP performance than + the simple configuration by adding data forwarding between the pipeline + stages. + + Non-blocking controller allows FP load and store instructions to + execute in parallel with FP instructions. The performance increase is + ~ 20 % for FP applications. This option uses most logic resources and + is suitable for ASIC implementations. + +Floating-point netlist +CONFIG_FPU_NETLIST + Say Y here to use a VHDL netlist of the GRFPU-Lite. This is + only available in certain versions of grlib. + +Enable Instruction cache +CONFIG_ICACHE_ENABLE + The instruction cache should always be enabled to allow + maximum performance. Some low-end system might want to + save area and disable the cache, but this will reduce + the performance with a factor of 2 - 3. + +Enable Data cache +CONFIG_DCACHE_ENABLE + The data cache should always be enabled to allow + maximum performance. Some low-end system might want to + save area and disable the cache, but this will reduce + the performance with a factor of 2 at least. + +Instruction cache associativity +CONFIG_ICACHE_ASSO1 + The instruction cache can be implemented as a multi-way cache with + 1 - 4 ways. Higher associativity usually increases the cache hit + rate and thereby the performance. The downside is higher power + consumption and increased gate-count for tag comparators. + + Note that a 1-way cache is effectively a direct-mapped cache. + +Instruction cache way size +CONFIG_ICACHE_SZ1 + The size of each way in the instuction cache (kbytes). Valid values + are 1 - 64 in binary steps. Note that the full range is only supported + by the generic and virtex2 targets. Most target packages are limited + to 2 - 16 kbyte. Large way size gives higher performance but might + affect the maximum frequency (on ASIC targets). The total instruction + cache size is the number of way multiplied with the way size. + +Instruction cache line size +CONFIG_ICACHE_LZ16 + The instruction cache line size. Can be set to either 16 or 32 + bytes per line. Instruction caches typically benefit from larger + line sizes, but on small caches it migh be better with 16 bytes/line + to limit eviction miss rate. + +Instruction cache replacement algorithm +CONFIG_ICACHE_ALGORND + Cache replacement algorithm for caches with 2 - 4 ways. The 'random' + algorithm selects the way to evict randomly. The least-recently-replaced + (LRR) algorithm evicts the way least recently replaced. The least- + recently-used (LRU) algorithm evicts the way least recently accessed. + The random algorithm uses a simple 1- or 2-bit counter to select + the eviction way and has low area overhead. The LRR scheme uses one + extra bit in the tag ram and has therefore also low area overhead. + However, the LRR scheme can only be used with 2-way caches. The LRU + scheme has typically the best performance but also highest area overhead. + A 2-way LRU uses 1 flip-flop per line, a 3-way LRU uses 3 flip-flops + per line, and a 4-way LRU uses 5 flip-flops per line to store the access + history. + +Instruction cache locking +CONFIG_ICACHE_LOCK + Say Y here to enable cache locking in the instruction cache. + Locking can be done on cache-line level, but will increase the + width of the tag ram with one bit. If you don't know what + locking is good for, it is safe to say N. + +Data cache associativity +CONFIG_DCACHE_ASSO1 + The data cache can be implemented as a multi-way cache with + 1 - 4 ways. Higher associativity usually increases the cache hit + rate and thereby the performance. The downside is higher power + consumption and increased gate-count for tag comparators. + + Note that a 1-way cache is effectively a direct-mapped cache. + +Data cache way size +CONFIG_DCACHE_SZ1 + The size of each way in the data cache (kbytes). Valid values are + 1 - 64 in binary steps. Note that the full range is only supported + by the generic and virtex2 targets. Most target packages are limited + to 2 - 16 kbyte. A large cache gives higher performance but the + data cache is timing critical an a too large setting might affect + the maximum frequency (on ASIC targets). The total data cache size + is the number of way multiplied with the way size. + +Data cache line size +CONFIG_DCACHE_LZ16 + The data cache line size. Can be set to either 16 or 32 bytes per + line. A smaller line size gives better associativity and higher + cache hit rate, but requires a larger tag memory. + +Data cache replacement algorithm +CONFIG_DCACHE_ALGORND + See the explanation for instruction cache replacement algorithm. + +Data cache locking +CONFIG_DCACHE_LOCK + Say Y here to enable cache locking in the data cache. + Locking can be done on cache-line level, but will increase the + width of the tag ram with one bit. If you don't know what + locking is good for, it is safe to say N. + +Data cache snooping +CONFIG_DCACHE_SNOOP + Say Y here to enable data cache snooping on the AHB bus. Is only + useful if you have additional AHB masters such as the DSU or a + target PCI interface. Note that the target technology must support + dual-port RAMs for this option to be enabled. Dual-port RAMS are + currently supported on Virtex/2, Virage and Actel targets. + +Data cache snooping implementation +CONFIG_DCACHE_SNOOP_FAST + The default snooping implementation is 'slow', which works if you + don't have AHB slaves in cacheable areas capable of zero-waitstates + non-sequential write accesses. Otherwise use 'fast' and suffer a + few kgates extra area. This option is currently only needed in + multi-master systems with the SSRAM or DDR memory controllers. + +Separate snoop tags +CONFIG_DCACHE_SNOOP_SEPTAG + Enable a separate memory to store the data tags used for snooping. + This is necessary when snooping support is wanted in systems + with MMU, typically for SMP systems. In this case, the snoop + tags will contain the physical tag address while the normal + tags contain the virtual tag address. This option can also be + together with the 'fast snooping' option to enable snooping + support on technologies without dual-port RAMs. In such case, + the snoop tag RAM will be implemented using a two-port RAM. + +Fixed cacheability map +CONFIG_CACHE_FIXED + If this variable is 0, the cacheable memory regions are defined + by the AHB plug&play information (default). To overriden the + plug&play settings, this variable can be set to indicate which + areas should be cached. The value is treated as a 16-bit hex value + with each bit defining if a 256 Mbyte segment should be cached or not. + The right-most (LSB) bit defines the cacheability of AHB address + 0 - 256 MByte, while the left-most bit (MSB) defines AHB address + 3840 - 4096 MByte. If the bit is set, the corresponding area is + cacheable. A value of 00F3 defines address 0 - 0x20000000 and + 0x40000000 - 0x80000000 as cacheable. + +Local data ram +CONFIG_DCACHE_LRAM + Say Y here to add a local ram to the data cache controller. + Accesses to the ram (load/store) will be performed at 0 waitstates + and store data will never be written back to the AHB bus. + +Size of local data ram +CONFIG_DCACHE_LRAM_SZ1 + Defines the size of the local data ram in Kbytes. Note that most + technology libraries do not support larger rams than 16 Kbyte. + +Start address of local data ram +CONFIG_DCACHE_LRSTART + Defines the 8 MSB bits of start address of the local data ram. + By default set to 8f (start address = 0x8f000000), but any value + (except 0) is possible. Note that the local data ram 'shadows' + a 16 Mbyte block of the address space. + +MMU enable +CONFIG_MMU_ENABLE + Say Y here to enable the Memory Management Unit. + +MMU split icache/dcache table lookaside buffer +CONFIG_MMU_COMBINED + Select "combined" for a combined icache/dcache table lookaside buffer, + "split" for a split icache/dcache table lookaside buffer + +MMU tlb replacement scheme +CONFIG_MMU_REPARRAY + Select "LRU" to use the "least recently used" algorithm for TLB + replacement, or "Increment" for a simple incremental replacement + scheme. + +Combined i/dcache tlb +CONFIG_MMU_I2 + Select the number of entries for the instruction TLB, or the + combined icache/dcache TLB if such is used. + +Split tlb, dcache +CONFIG_MMU_D2 + Select the number of entries for the dcache TLB. + +Fast writebuffer +CONFIG_MMU_FASTWB + Only selectable if split tlb is enabled. In case fast writebuffer is + enabled the tlb hit will be made concurrent to the cache hit. This + leads to higher store performance, but increased power and area. + +MMU pagesize +CONFIG_MMU_PAGE_4K + The deafult SPARC V8 SRMMU page size is 4 Kbyte. This limits the + cache way size to 4 Kbyte, and total data cache size to 16 Kbyte, + when the MMU is used. To increase the maximum data cache size, + the MMU pages size can be increased to up 32 Kbyte. This will + give a maximum data cache size of 128 Kbyte. + + Note that an MMU page size different than 4 Kbyte will require + a special linux tool-chain if glibc is used. If you don't know + what you are doing, stay with 4 Kbyte ... + +DSU enable +CONFIG_DSU_ENABLE + The debug support unit (DSU) allows non-intrusive debugging and tracing + of both executed instructions and AHB transfers. If you want to enable + the DSU, say Y here and select the configuration below. + +Trace buffer enable +CONFIG_DSU_TRACEBUF + Say Y to enable the trace buffer. The buffer is not necessary for + debugging, only for tracing instructions and data transfers. + +Enable instruction tracing +CONFIG_DSU_ITRACE + If you say Y here, an instruction trace buffer will be implemented + in each processor. The trace buffer will trace executed instructions + and their results, and place them in a circular buffer. The buffer + can be read out by any AHB master, and in particular by the debug + communication link. + +Size of trace buffer +CONFIG_DSU_ITRACESZ1 + Select the buffer size (in kbytes) for the instruction trace buffer. + Each line in the buffer needs 16 bytes. A 128-entry buffer will thus + need 2 kbyte. + +Enable AHB tracing +CONFIG_DSU_ATRACE + If you say Y here, an AHB trace buffer will be implemented in the + debug support unit processor. The AHB buffer will trace all transfers + on the AHB bus and save them in a circular buffer. The trace buffer + can be read out by any AHB master, and in particular by the debug + communication link. + +Size of trace buffer +CONFIG_DSU_ATRACESZ1 + Select the buffer size (in kbytes) for the AHB trace buffer. + Each line in the buffer needs 16 bytes. A 128-entry buffer will thus + need 2 kbyte. + + +LEON3FT enable +CONFIG_LEON3FT_EN + Say Y here to use the fault-tolerant LEON3FT core instead of the + standard non-FT LEON3. + +IU Register file protection +CONFIG_IUFT_NONE + Select the FT implementation in the LEON3FT integer unit + register file. The options include parity, parity with + sparing, 7-bit BCH and TMR. + +FPU Register file protection +CONFIG_FPUFT_EN + Say Y to enable SEU protection of the FPU register file. + The GRFPU will be protected using 8-bit parity without restart, while + the GRFPU-Lite will be protected with 4-bit parity with restart. If + disabled the FPU register file will be implemented using flip-flops. + +Cache memory error injection +CONFIG_RF_ERRINJ + Say Y here to enable error injection in to the IU/FPU regfiles. + Affects only simulation. + +Cache memory protection +CONFIG_CACHE_FT_EN + Enable SEU error-correction in the cache memories. + +Cache memory error injection +CONFIG_CACHE_ERRINJ + Say Y here to enable error injection in to the cache memories. + Affects only simulation. + +Leon3ft netlist +CONFIG_LEON3_NETLIST + Say Y here to use a VHDL netlist of the LEON3FT. This is + only available in certain versions of grlib. + +IU assembly printing +CONFIG_IU_DISAS + Enable printing of executed instructions to the console. + +IU assembly printing in netlist +CONFIG_IU_DISAS_NET + Enable printing of executed instructions to the console also + when simulating a netlist. NOTE: with this option enabled, it + will not be possible to pass place&route. + +32-bit program counters +CONFIG_DEBUG_PC32 + Since the LSB 2 bits of the program counters always are zero, they are + normally not implemented. If you say Y here, the program counters will + be implemented with full 32 bits, making debugging of the VHDL model + much easier. Turn of this option for synthesis or you will be wasting + area. +CONFIG_AHB_DEFMST + Sets the default AHB master (see AMBA 2.0 specification for definition). + Should not be set to a value larger than the number of AHB masters - 1. + For highest processor performance, leave it at 0. + +Default AHB master +CONFIG_AHB_RROBIN + Say Y here to enable round-robin arbitration of the AHB bus. A N will + select fixed priority, with the master with the highest bus index having + the highest priority. + +Support AHB split-transactions +CONFIG_AHB_SPLIT + Say Y here to enable AHB split-transaction support in the AHB arbiter. + Unless you actually have an AHB slave that can generate AHB split + responses, say N and save some gates. + +Default AHB master +CONFIG_AHB_IOADDR + Selects the MSB adddress (HADDR[31:20]) of the AHB IO area, as defined + in the plug&play extentions of the AMBA bus. Should be kept to FFF + unless you really know what you are doing. + +APB bridge address +CONFIG_APB_HADDR + Selects the MSB adddress (HADDR[31:20]) of the APB bridge. Should be + kept at 800 for software compatibility. + +AHB monitor +CONFIG_AHB_MON + Say Y to enable the AHB bus monitor. The monitor will check for + illegal AHB transactions during simulation. It has no impact on + synthesis. + +Report AHB errors +CONFIG_AHB_MONERR + Print out detected AHB violations on console. + +Report AHB warnings +CONFIG_AHB_MONWAR + Print out detected AHB warnings on console. + +Write trace to console +CONFIG_AHB_DTRACE + Say yes here to write a trace of all AHB transfers to the + simulator console. Has not impact on final netlist. + +JTAG Enable +CONFIG_DSU_JTAG + Say Y to enable the JTAG debug link (JTAG-to-AHB). Debugging is done + with GRMON through the boards JTAG chain at speeds of up to 800 kbits/s. + + The TAP controller can be implemented in custom macros on + Altera, Actel Proasic/3 and Xilinx devices. The commercial + GRLIB also includes a generic TAP controller in VHDL. + + Supported JTAG cables are Xilinx Parallel Cable III and IV, + Xilinx Platform cables (USB), and Altera parallel and USB cables, + Amontech JTAG key, various FTDI chip based USB/JTAG devices, and + Actel Flash Pro 3/4 cable. + +Ethernet DSU enable +CONFIG_DSU_ETH + Say Y to enable the Ethernet Debug Communication Link (EDCL). The link + provides a DSU gateway between ethernet and the AHB bus. Debugging is + done at 10 or 100 Mbit/s, using the GRMON debug monitor. You must + enable the GRETH Ethernet MAC for this option to become active. + +Size of EDCL trace buffer +CONFIG_DSU_ETHSZ1 + Select the buffer size (in kbytes) for the EDCL. 1 or 2 kbyte is + usually enough, while a larger buffer will increase the transfer rate. + When operating at 100 Mbit, use a buffer size of at least 8 kbyte for + maximum throughput. + +MSB IP address +CONFIG_DSU_IPMSB + Set the MSB 16 bits of the IP address of the EDCL. + +LSB IP address +CONFIG_DSU_IPLSB + Set the LSB 16 bits of the IP address of the EDCL. + +MSB ethernet address +CONFIG_DSU_ETHMSB + Set the MSB 24 bits of the ethernet address of the EDCL. + +LSB ethernet address +CONFIG_DSU_ETHLSB + Set the LSB 24 bits of the ethernet address of the EDCL. + +Programmable MAC/IP address +CONFIG_DSU_ETH_PROG + Say Y to make the LSB 4 bits of the EDCL MAC and IP address + configurable using the ethi.edcladdr inputs. +Leon2 memory controller +CONFIG_MCTRL_LEON2 + Say Y here to enable the LEON2 memory controller. The controller + can access PROM, I/O, SRAM and SDRAM. The bus width for PROM + and SRAM is programmable to 8-, 16- or 32-bits. + +8-bit memory support +CONFIG_MCTRL_8BIT + If you say Y here, the PROM/SRAM memory controller will support + 8-bit mode, i.e. operate from 8-bit devices as if they were 32-bit. + Say N to save a few hundred gates. + +16-bit memory support +CONFIG_MCTRL_16BIT + If you say Y here, the PROM/SRAM memory controller will support + 16-bit mode, i.e. operate from 16-bit devices as if they were 32-bit. + Say N to save a few hundred gates. + +Write strobe feedback +CONFIG_MCTRL_WFB + If you say Y here, the PROM/SRAM write strobes (WRITEN, WEN) will + be used to enable the data bus drivers during write cycles. This + will guarantee that the data is still valid on the rising edge of + the write strobe. If you say N, the write strobes and the data bus + drivers will be clocked on the rising edge, potentially creating + a hold time problem in external memory or I/O. However, in all + practical cases, there is enough capacitance in the data bus lines + to keep the value stable for a few (many?) nano-seconds after the + buffers have been disabled, making it safe to say N and remove a + combinational path in the netlist that might be difficult to + analyze. + +Write strobe feedback +CONFIG_MCTRL_5CS + If you say Y here, the 5th (RAMSN[4]) SRAM chip select signal will + be enabled. If you don't intend to use it, say N and save some gates. + +SDRAM controller enable +CONFIG_MCTRL_SDRAM + Say Y here to enabled the PC100/PC133 SDRAM controller. If you don't + intend to use SDRAM, say N and save about 1 kgates. + +SDRAM controller inverted clock +CONFIG_MCTRL_SDRAM_INVCLK + If you say Y here, the SDRAM controller output signals will be delayed + with 1/2 clock in respect to the SDRAM clock. This will allow the used + of an SDRAM clock which in not strictly in phase with the internal + clock. This option will limit the SDRAM frequency to 40 - 50 MHz. + + On FPGA targets without SDRAM clock synchronizations through PLL/DLL, + say Y. On ASIC targets, say N and tell your foundry to balance the + SDRAM clock output. + +SDRAM separate address buses +CONFIG_MCTRL_SDRAM_SEPBUS + Say Y here if your SDRAM is connected through separate address + and data buses (SA & SD). This is the case on the GR-CPCI-XC2V6000 + board, but not on the GR-PCI-XC2V3000 or Avnet XCV1500E boards. + +64-bit data bus +CONFIG_MCTRL_SDRAM_BUS64 + Say Y here to enable 64-bit SDRAM data bus. + +Page burst enable +CONFIG_MCTRL_PAGE + Say Y here to enable SDRAM page burst operation. This will implement + read operations using page bursts rather than 8-word bursts and save + about 500 gates (100 LUTs). Note that not all SDRAM supports page + burst, so use this option with care. + +Programmable page burst enable +CONFIG_MCTRL_PROGPAGE + Say Y here to enable programmable SDRAM page burst operation. This + will allow to dynamically enable/disable page burst by setting + bit 17 in MCFG2. + +AHB status register +CONFIG_AHBSTAT_ENABLE + Say Y here to enable the AHB status register (AHBSTAT IP). + The register will latch the AHB address and master index when + an error response is returned by any AHB slave. + +SDRAM separate address buses +CONFIG_AHBSTAT_NFTSLV + The AHB status register can also latch the AHB address on an external + input. Select here how many of such inputs are required. + +On-chip rom +CONFIG_AHBROM_ENABLE + Say Y here to add a block on on-chip rom to the AHB bus. The ram + provides 0-waitstates read access, burst support, and 8-, 16- + and 32-bit data size. The rom will be syntheised into block rams + on Xilinx and Altera FPGA devices, and into gates on ASIC + technologies. GRLIB includes a utility to automatically create + the rom VHDL model (ahbrom.vhd) from an ELF file. Refer to the GRLIB + documentation for details. + +On-chip rom address +CONFIG_AHBROM_START + Set the start address of AHB ROM (HADDR[31:20]). The ROM will occupy + a 1 Mbyte slot at the selected address. Default is 000, corresponding + to AHB address 0x00000000. When address 0x0 is selected, the rom area + of any other memory controller is set to 0x10000000 to avoid conflicts. + +Enable pipeline register for on-chip rom +CONFIG_AHBROM_PIPE + Say Y here to add a data pipeline register to the on-chip rom. + This should be done when the rom is implemenented in (ASIC) gates, + or in logic cells on FPGAs. Do not use this option when the rom is + implemented in block rams. If enabled, the rom will operate with + one waitstate. + +On-chip ram +CONFIG_AHBRAM_ENABLE + Say Y here to add a block on on-chip ram to the AHB bus. The ram + provides 0-waitstates read access and 0/1 waitstates write access. + All AHB burst types are supported, as well as 8-, 16- and 32-bit + data size. + +On-chip ram size +CONFIG_AHBRAM_SZ1 + Set the size of the on-chip AHB ram. The ram is infered/instantiated + as four byte-wide ram slices to allow byte and half-word write + accesses. It is therefore essential that the target package can + infer byte-wide rams. This is currently supported on the generic, + virtex, virtex2, proasic and axellerator targets. + +On-chip ram address +CONFIG_AHBRAM_START + Set the start address of AHB RAM (HADDR[31:20]). The RAM will occupy + a 1 Mbyte slot at the selected address. Default is A00, corresponding + to AHB address 0xA0000000. + +Gaisler Ethernet MAC enable +CONFIG_GRETH_ENABLE + Say Y here to enable the Gaisler Research Ethernet MAC . The MAC has + one AHB master interface to read and write packets to memory, and one + APB slave interface for accessing the control registers. + +Gaisler Ethernet 1G MAC enable +CONFIG_GRETH_GIGA + Say Y here to enable the Gaisler Research 1000 Mbit Ethernet MAC . + The 1G MAC is only available in the commercial version of GRLIB, + so do NOT enable it if you are using the GPL version. + +CONFIG_GRETH_FIFO4 + Set the depth of the receive and transmit FIFOs in the MAC core. + The MAC core will perform AHB burst read/writes with half the + size of the FIFO depth. + + +UART1 enable +CONFIG_UART1_ENABLE + Say Y here to enable UART1, or the console UART. This is needed to + get any print-out from LEON3 systems regardless of operating system. + +UART1 FIFO +CONFIG_UA1_FIFO1 + The UART has configurable transmitt and receive FIFO's, which can + be set to 1 - 32 bytes. Use 1 for minimum area, or 8 - 32 for + maximum throughput. + + +LEON3 interrupt controller +CONFIG_IRQ3_ENABLE + Say Y here to enable the LEON3 interrupt controller. This is needed + if you want to be able to receive interrupts. Operating systems like + Linux, RTEMS and eCos needs this option to be enabled. If you intend + to use the Bare-C run-time and not use interrupts, you could disable + the interrupt controller and save about 500 gates. + +LEON3 interrupt controller broadcast +CONFIG_IRQ3_BROADCAST_ENABLE + If enabled the broadcast register is used to determine which + interrupt should be sent to all cpus instead of just the first + one that consumes it. + +Secondary interrupts +CONFIG_IRQ3_SEC + The interrupt controller handles 15 interrupts by default (1 - 15). + These correspond to the 15 SPARC asyncronous traps (0x11 - 0x1F), + and AMBA interrupts 1 - 15. This option will enable 16 additional + (secondary) interrupts, corresponding to AMBA interrupts 16 - 31. + The secondary interrupts will be multiplexed onto one of the first + 15 interrupts. The total number of handled interrupts can then + be up to 30 (14 primary and 16 secondary). + +Number of interrupts +CONFIG_IRQ3_NSEC + Defines which of the first 15 interrupts should be used for the + secondary (16 - 31) interrupts. Interrupt 15 should be avoided + since it is not maskable by the processor. +Timer module enable +CONFIG_GPT_ENABLE + Say Y here to enable the Modular Timer Unit. The timer unit consists + of one common scaler and up to 7 independent timers. The timer unit + is needed for Linux, RTEMS, eCos and the Bare-C run-times. + +Timer module enable +CONFIG_GPT_NTIM + Set the number of timers in the timer unit (1 - 7). + +Scaler width +CONFIG_GPT_SW + Set the width if the common pre-scaler (2 - 16 bits). The scaler + is used to divide the system clock down to 1 MHz, so 8 bits should + be sufficient for most implementations (allows clocks up to 256 MHz). + +Timer width +CONFIG_GPT_TW + Set the width if the timers (2 - 32 bits). 32 bits is recommended + for the Bare-C run-time, lower values (e.g. 16 bits) can work with + RTEMS and Linux. + +Timer Interrupt +CONFIG_GPT_IRQ + Set the interrupt number for the first timer. Remaining timers will + have incrementing interrupts, unless the separate-interrupts option + below is disabled. + +Watchdog enable +CONFIG_GPT_WDOGEN + Say Y here to enable the watchdog functionality in the timer unit. + +Watchdog time-out value +CONFIG_GPT_WDOG + This value will be loaded in the watchdog timer at reset. + +GPIO port +CONFIG_GRGPIO_ENABLE + Say Y here to enable a general purpose I/O port. The port can be + configured from 1 - 32 bits, whith each port signal individually + programmable as input or output. The port signals can also serve + as interrupt inputs. + +GPIO port witdth +CONFIG_GRGPIO_WIDTH + Number of bits in the I/O port. Must be in the range of 1 - 32. + +GPIO interrupt mask +CONFIG_GRGPIO_IMASK + The I/O port interrupt mask defines which bits in the I/O port + should be able to create an interrupt. + +Text-mode VGA +CONFIG_VGA_ENABLE + Say Y here to enable a simple text-mode VGA controller. The controller + generate 48x36 characters on a 640x480 pixel screen. The pixel clock + is 25 MHz. + +SVGA frame buffer +CONFIG_SVGA_ENABLE + Say Y here to enable a graphical frame buffer. The frame buffer + can be configured up to 1024x768 pixels and 8-, 16- or 32-bit + colour depth. + +PS2 KBD interface +CONFIG_KBD_ENABLE + Say Y here to enable a PS/2 keyboard or mouse interface. + +SPI memory controller +CONFIG_SPIMCTRL + Say Y here to enable a simple SPI memory controller. + The controller maps a SPI memory device into AMBA address space and + also has a simple interface that allows sending commands directly + to the SPI device. + +SD card support +CONFIG_SPIMCTRL_SDCARD + Memory device connected to controller is SD card. + +Read command +CONFIG_SPIMCTRL_READCMD + Read instruction for SPI memory device + +Dummy byte +CONFIG_SPIMCTRL_DUMMYBYTE + Output dummy byte after address when issuing read instruction. + +Dual output +CONFIG_SPIMCTRL_DUALOUTPUT + Memory device supports dual output when reading data. + +Clock scaler +CONFIG_SPIMCTRL_SCALER + Selects the divisor used when dividing the system clock to produce + the memory device clock. The divisor used is two to the power of the + specified value. This value must be at least 1. + +Alternate clock scaler +CONFIG_SPIMCTRL_ASCALER + Selects the divisor used when dividing the system clock to produce + the alternate memory device clock. If the selected memory device is + a SD Card this clock will be used during card initialization. The + divisor used is two to the power of the specified value. This + value must be at least 1. + +Power-up cnt +CONFIG_SPIMCTRL_PWRUPCNT + Number of system clock cycles to wait before issuing first command. +Gaisler Research SPI controller +CONFIG_SPICTRL_ENABLE + Say Y here to enable the SPI controller(s) + +CONFIG_SPICTRL_NUM + Number of SPI controllers to implement in design. Note that most + template designs are limited to one SPI controller. + Configuration options made here in xconfig will apply to all + implemented SPI controllers. + +CONFIG_SPICTRL_MAXWLEN + 0: Core will support lengths up to 32 bits + 1-2: Illegal values + 3-15: Maximum word length will be value+1 (4-16) + +CONFIG_SPICTRL_SYNCRAM + Say Y here to use SYNCRAM_2P components for the core's receive + and transmit queues. This is the recommended setting, particularly + if the core is implemented with support for automatic mode. + +CONFIG_SPICTRL_FT + Fault-tolerance for internal buffers. Only applicable if core + buffers are implemented with SYNCRAM components. + +UART debugging +CONFIG_DEBUG_UART + During simulation, the output from the UARTs is printed on the + simulator console. Since the ratio between the system clock and + UART baud-rate is quite high, simulating UART output will be very + slow. If you say Y here, the UARTs will print a character as soon + as it is stored in the transmitter data register. The transmitter + ready flag will be permanently set, speeding up simulation. However, + the output on the UART tx line will be garbled. Has not impact on + synthesis, but will cause the LEON test bench to fail. + +FPU register tracing +CONFIG_DEBUG_FPURF + If you say Y here, all writes to the floating-point unit register file + will be printed on the simulator console. + diff --git a/designs/ICI4-3DCAM-Integ1/config.in b/designs/ICI4-3DCAM-Integ1/config.in new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/config.in @@ -0,0 +1,79 @@ + +# LEON3 configuration written in linux configuration language +# +# Written by Jiri Gaisler, Gaisler Research +# +# Comments and bug reports to jiri@gaisler.com +# +# + +#define_bool CONFIG_MCTRL_RMW y +define_bool CONFIG_LEON3FT_PRESENT y +define_bool CONFIG_HAS_SHARED_GRFPU y + +mainmenu_name "LEON3MP Design Configuration" + +mainmenu_option next_comment + comment 'Synthesis ' + source lib/techmap/gencomp/tech.in +endmenu + +mainmenu_option next_comment + comment 'Clock generation' + source lib/techmap/clocks/clkgen.in +endmenu + +source lib/gaisler/leon3/leon3.in +source lib/grlib/amba/amba.in + +mainmenu_option next_comment + comment 'Debug Link ' + source lib/gaisler/jtag/jtag.in + source lib/gaisler/net/edcl.in +endmenu + +mainmenu_option next_comment +comment 'Peripherals ' + + mainmenu_option next_comment + comment 'Memory controller ' + source lib/esa/memoryctrl/mctrl.in + source lib/gaisler/ddr/mig.in + source lib/gaisler/misc/ahbstat.in + endmenu + + mainmenu_option next_comment + comment 'On-chip RAM/ROM ' + source lib/gaisler/misc/ahbrom.in + source lib/gaisler/misc/ahbram.in + endmenu + + mainmenu_option next_comment + comment 'Ethernet ' + source lib/gaisler/greth/greth.in + endmenu + + mainmenu_option next_comment + comment 'UART, timer, I/O port and interrupt controller' + source lib/gaisler/uart/uart1.in + source lib/gaisler/leon3/irqmp.in + source lib/gaisler/misc/gptimer.in + source lib/gaisler/misc/grgpio.in + endmenu + + mainmenu_option next_comment + comment 'Keybord and VGA interface' + source lib/gaisler/misc/ps2vga.in + endmenu + mainmenu_option next_comment + comment 'SPI' + source lib/gaisler/spi/spimctrl.in + source lib/gaisler/spi/spictrl.in + endmenu + +endmenu + +mainmenu_option next_comment +comment 'VHDL Debugging ' + source lib/grlib/util/debug.in +endmenu diff --git a/designs/ICI4-3DCAM-Integ1/config.vhd b/designs/ICI4-3DCAM-Integ1/config.vhd new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/config.vhd @@ -0,0 +1,48 @@ + + + +----------------------------------------------------------------------------- +-- LEON3 Demonstration design test bench configuration +-- Copyright (C) 2009 Aeroflex Gaisler +------------------------------------------------------------------------------ + + + +library techmap; +use techmap.gencomp.all; + +library ieee; +use ieee.std_logic_1164.all; + +package config is +-- Technology and synthesis options + constant CFG_FABTECH : integer := spartan6; + constant CFG_MEMTECH : integer := spartan6; + constant CFG_PADTECH : integer := spartan6; +-- Clock generator + constant CFG_CLKTECH : integer := spartan6; + constant SEND_CONSTANT_DATA : integer := 1; + constant SEND_MINF_VALUE : integer := 1; + + + +constant WORD0cst : std_logic_vector(15 downto 0) := X"1111"; +constant WORD1cst : std_logic_vector(15 downto 0) := X"2222"; +constant WORD2cst : std_logic_vector(15 downto 0) := X"3333"; +constant WORD3cst : std_logic_vector(15 downto 0) := X"4444"; +constant WORD4cst : std_logic_vector(15 downto 0) := X"5555"; +constant WORD5cst : std_logic_vector(15 downto 0) := X"6666"; +constant WORD6cst : std_logic_vector(15 downto 0) := X"7777"; +constant WORD7cst : std_logic_vector(15 downto 0) := X"8888"; +constant WORD8cst : std_logic_vector(15 downto 0) := X"9999"; +constant WORD9cst : std_logic_vector(15 downto 0) := X"AAAA"; +constant WORD10cst : std_logic_vector(15 downto 0) := X"BBBB"; +constant WORD11cst : std_logic_vector(15 downto 0) := X"CCCC"; +constant WORD12cst : std_logic_vector(15 downto 0) := X"DDDD"; + + +constant LF1cst : std_logic_vector(15 downto 0) := X"1111"; +constant LF2cst : std_logic_vector(15 downto 0) := X"2222"; +constant LF3cst : std_logic_vector(15 downto 0) := X"3333"; + +end; diff --git a/designs/ICI4-3DCAM-Integ1/config.vhd.h b/designs/ICI4-3DCAM-Integ1/config.vhd.h new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/config.vhd.h @@ -0,0 +1,190 @@ +-- Technology and synthesis options + constant CFG_FABTECH : integer := CONFIG_SYN_TECH; + constant CFG_MEMTECH : integer := CFG_RAM_TECH; + constant CFG_PADTECH : integer := CFG_PAD_TECH; + constant CFG_NOASYNC : integer := CONFIG_SYN_NO_ASYNC; + constant CFG_SCAN : integer := CONFIG_SYN_SCAN; + +-- Clock generator + constant CFG_CLKTECH : integer := CFG_CLK_TECH; + constant CFG_CLKMUL : integer := CONFIG_CLK_MUL; + constant CFG_CLKDIV : integer := CONFIG_CLK_DIV; + constant CFG_OCLKDIV : integer := CONFIG_OCLK_DIV; + constant CFG_OCLKBDIV : integer := CONFIG_OCLKB_DIV; + constant CFG_OCLKCDIV : integer := CONFIG_OCLKC_DIV; + constant CFG_PCIDLL : integer := CONFIG_PCI_CLKDLL; + constant CFG_PCISYSCLK: integer := CONFIG_PCI_SYSCLK; + constant CFG_CLK_NOFB : integer := CONFIG_CLK_NOFB; + +-- LEON3 processor core + constant CFG_LEON3 : integer := CONFIG_LEON3; + constant CFG_NCPU : integer := CONFIG_PROC_NUM; + constant CFG_NWIN : integer := CONFIG_IU_NWINDOWS; + constant CFG_V8 : integer := CFG_IU_V8 + 4*CFG_IU_MUL_STRUCT; + constant CFG_MAC : integer := CONFIG_IU_MUL_MAC; + constant CFG_BP : integer := CONFIG_IU_BP; + constant CFG_SVT : integer := CONFIG_IU_SVT; + constant CFG_RSTADDR : integer := 16#CONFIG_IU_RSTADDR#; + constant CFG_LDDEL : integer := CONFIG_IU_LDELAY; + constant CFG_NOTAG : integer := CONFIG_NOTAG; + constant CFG_NWP : integer := CONFIG_IU_WATCHPOINTS; + constant CFG_PWD : integer := CONFIG_PWD*2; + constant CFG_FPU : integer := CONFIG_FPU + 16*CONFIG_FPU_NETLIST + 32*CONFIG_FPU_GRFPU_SHARED; + constant CFG_GRFPUSH : integer := CONFIG_FPU_GRFPU_SHARED; + constant CFG_ICEN : integer := CONFIG_ICACHE_ENABLE; + constant CFG_ISETS : integer := CFG_IU_ISETS; + constant CFG_ISETSZ : integer := CFG_ICACHE_SZ; + constant CFG_ILINE : integer := CFG_ILINE_SZ; + constant CFG_IREPL : integer := CFG_ICACHE_ALGORND; + constant CFG_ILOCK : integer := CONFIG_ICACHE_LOCK; + constant CFG_ILRAMEN : integer := CONFIG_ICACHE_LRAM; + constant CFG_ILRAMADDR: integer := 16#CONFIG_ICACHE_LRSTART#; + constant CFG_ILRAMSZ : integer := CFG_ILRAM_SIZE; + constant CFG_DCEN : integer := CONFIG_DCACHE_ENABLE; + constant CFG_DSETS : integer := CFG_IU_DSETS; + constant CFG_DSETSZ : integer := CFG_DCACHE_SZ; + constant CFG_DLINE : integer := CFG_DLINE_SZ; + constant CFG_DREPL : integer := CFG_DCACHE_ALGORND; + constant CFG_DLOCK : integer := CONFIG_DCACHE_LOCK; + constant CFG_DSNOOP : integer := CONFIG_DCACHE_SNOOP + CONFIG_DCACHE_SNOOP_FAST + 4*CONFIG_DCACHE_SNOOP_SEPTAG; + constant CFG_DFIXED : integer := 16#CONFIG_CACHE_FIXED#; + constant CFG_DLRAMEN : integer := CONFIG_DCACHE_LRAM; + constant CFG_DLRAMADDR: integer := 16#CONFIG_DCACHE_LRSTART#; + constant CFG_DLRAMSZ : integer := CFG_DLRAM_SIZE; + constant CFG_MMUEN : integer := CONFIG_MMUEN; + constant CFG_ITLBNUM : integer := CONFIG_ITLBNUM; + constant CFG_DTLBNUM : integer := CONFIG_DTLBNUM; + constant CFG_TLB_TYPE : integer := CONFIG_TLB_TYPE + CFG_MMU_FASTWB*2; + constant CFG_TLB_REP : integer := CONFIG_TLB_REP; + constant CFG_MMU_PAGE : integer := CONFIG_MMU_PAGE; + constant CFG_DSU : integer := CONFIG_DSU_ENABLE; + constant CFG_ITBSZ : integer := CFG_DSU_ITB; + constant CFG_ATBSZ : integer := CFG_DSU_ATB; + constant CFG_LEON3FT_EN : integer := CONFIG_LEON3FT_EN; + constant CFG_IUFT_EN : integer := CONFIG_IUFT_EN; + constant CFG_FPUFT_EN : integer := CONFIG_FPUFT; + constant CFG_RF_ERRINJ : integer := CONFIG_RF_ERRINJ; + constant CFG_CACHE_FT_EN : integer := CONFIG_CACHE_FT_EN; + constant CFG_CACHE_ERRINJ : integer := CONFIG_CACHE_ERRINJ; + constant CFG_LEON3_NETLIST: integer := CONFIG_LEON3_NETLIST; + constant CFG_DISAS : integer := CONFIG_IU_DISAS + CONFIG_IU_DISAS_NET; + constant CFG_PCLOW : integer := CFG_DEBUG_PC32; + +-- AMBA settings + constant CFG_DEFMST : integer := CONFIG_AHB_DEFMST; + constant CFG_RROBIN : integer := CONFIG_AHB_RROBIN; + constant CFG_SPLIT : integer := CONFIG_AHB_SPLIT; + constant CFG_AHBIO : integer := 16#CONFIG_AHB_IOADDR#; + constant CFG_APBADDR : integer := 16#CONFIG_APB_HADDR#; + constant CFG_AHB_MON : integer := CONFIG_AHB_MON; + constant CFG_AHB_MONERR : integer := CONFIG_AHB_MONERR; + constant CFG_AHB_MONWAR : integer := CONFIG_AHB_MONWAR; + constant CFG_AHB_DTRACE : integer := CONFIG_AHB_DTRACE; + +-- JTAG based DSU interface + constant CFG_AHB_JTAG : integer := CONFIG_DSU_JTAG; + +-- Ethernet DSU + constant CFG_DSU_ETH : integer := CONFIG_DSU_ETH + CONFIG_DSU_ETH_PROG + CONFIG_DSU_ETH_DIS; + constant CFG_ETH_BUF : integer := CFG_DSU_ETHB; + constant CFG_ETH_IPM : integer := 16#CONFIG_DSU_IPMSB#; + constant CFG_ETH_IPL : integer := 16#CONFIG_DSU_IPLSB#; + constant CFG_ETH_ENM : integer := 16#CONFIG_DSU_ETHMSB#; + constant CFG_ETH_ENL : integer := 16#CONFIG_DSU_ETHLSB#; + +-- LEON2 memory controller + constant CFG_MCTRL_LEON2 : integer := CONFIG_MCTRL_LEON2; + constant CFG_MCTRL_RAM8BIT : integer := CONFIG_MCTRL_8BIT; + constant CFG_MCTRL_RAM16BIT : integer := CONFIG_MCTRL_16BIT; + constant CFG_MCTRL_5CS : integer := CONFIG_MCTRL_5CS; + constant CFG_MCTRL_SDEN : integer := CONFIG_MCTRL_SDRAM; + constant CFG_MCTRL_SEPBUS : integer := CONFIG_MCTRL_SDRAM_SEPBUS; + constant CFG_MCTRL_INVCLK : integer := CONFIG_MCTRL_SDRAM_INVCLK; + constant CFG_MCTRL_SD64 : integer := CONFIG_MCTRL_SDRAM_BUS64; + constant CFG_MCTRL_PAGE : integer := CONFIG_MCTRL_PAGE + CONFIG_MCTRL_PROGPAGE; + +-- Xilinx MIG + constant CFG_MIG_DDR2 : integer := CONFIG_MIG_DDR2; + constant CFG_MIG_RANKS : integer := CONFIG_MIG_RANKS; + constant CFG_MIG_COLBITS : integer := CONFIG_MIG_COLBITS; + constant CFG_MIG_ROWBITS : integer := CONFIG_MIG_ROWBITS; + constant CFG_MIG_BANKBITS: integer := CONFIG_MIG_BANKBITS; + constant CFG_MIG_HMASK : integer := 16#CONFIG_MIG_HMASK#; + + +-- AHB status register + constant CFG_AHBSTAT : integer := CONFIG_AHBSTAT_ENABLE; + constant CFG_AHBSTATN : integer := CONFIG_AHBSTAT_NFTSLV; + +-- AHB ROM + constant CFG_AHBROMEN : integer := CONFIG_AHBROM_ENABLE; + constant CFG_AHBROPIP : integer := CONFIG_AHBROM_PIPE; + constant CFG_AHBRODDR : integer := 16#CONFIG_AHBROM_START#; + constant CFG_ROMADDR : integer := 16#CONFIG_ROM_START#; + constant CFG_ROMMASK : integer := 16#E00# + 16#CONFIG_ROM_START#; + +-- AHB RAM + constant CFG_AHBRAMEN : integer := CONFIG_AHBRAM_ENABLE; + constant CFG_AHBRSZ : integer := CFG_AHBRAMSZ; + constant CFG_AHBRADDR : integer := 16#CONFIG_AHBRAM_START#; + +-- Gaisler Ethernet core + constant CFG_GRETH : integer := CONFIG_GRETH_ENABLE; + constant CFG_GRETH1G : integer := CONFIG_GRETH_GIGA; + constant CFG_ETH_FIFO : integer := CFG_GRETH_FIFO; + +-- UART 1 + constant CFG_UART1_ENABLE : integer := CONFIG_UART1_ENABLE; + constant CFG_UART1_FIFO : integer := CFG_UA1_FIFO; + +-- LEON3 interrupt controller + constant CFG_IRQ3_ENABLE : integer := CONFIG_IRQ3_ENABLE; + constant CFG_IRQ3_NSEC : integer := CONFIG_IRQ3_NSEC; + +-- Modular timer + constant CFG_GPT_ENABLE : integer := CONFIG_GPT_ENABLE; + constant CFG_GPT_NTIM : integer := CONFIG_GPT_NTIM; + constant CFG_GPT_SW : integer := CONFIG_GPT_SW; + constant CFG_GPT_TW : integer := CONFIG_GPT_TW; + constant CFG_GPT_IRQ : integer := CONFIG_GPT_IRQ; + constant CFG_GPT_SEPIRQ : integer := CONFIG_GPT_SEPIRQ; + constant CFG_GPT_WDOGEN : integer := CONFIG_GPT_WDOGEN; + constant CFG_GPT_WDOG : integer := 16#CONFIG_GPT_WDOG#; + +-- GPIO port + constant CFG_GRGPIO_ENABLE : integer := CONFIG_GRGPIO_ENABLE; + constant CFG_GRGPIO_IMASK : integer := 16#CONFIG_GRGPIO_IMASK#; + constant CFG_GRGPIO_WIDTH : integer := CONFIG_GRGPIO_WIDTH; + +-- VGA and PS2/ interface + constant CFG_KBD_ENABLE : integer := CONFIG_KBD_ENABLE; + constant CFG_VGA_ENABLE : integer := CONFIG_VGA_ENABLE; + constant CFG_SVGA_ENABLE : integer := CONFIG_SVGA_ENABLE; + +-- SPI memory controller + constant CFG_SPIMCTRL : integer := CONFIG_SPIMCTRL; + constant CFG_SPIMCTRL_SDCARD : integer := CONFIG_SPIMCTRL_SDCARD; + constant CFG_SPIMCTRL_READCMD : integer := 16#CONFIG_SPIMCTRL_READCMD#; + constant CFG_SPIMCTRL_DUMMYBYTE : integer := CONFIG_SPIMCTRL_DUMMYBYTE; + constant CFG_SPIMCTRL_DUALOUTPUT : integer := CONFIG_SPIMCTRL_DUALOUTPUT; + constant CFG_SPIMCTRL_SCALER : integer := CONFIG_SPIMCTRL_SCALER; + constant CFG_SPIMCTRL_ASCALER : integer := CONFIG_SPIMCTRL_ASCALER; + constant CFG_SPIMCTRL_PWRUPCNT : integer := CONFIG_SPIMCTRL_PWRUPCNT; + +-- SPI controller + constant CFG_SPICTRL_ENABLE : integer := CONFIG_SPICTRL_ENABLE; + constant CFG_SPICTRL_NUM : integer := CONFIG_SPICTRL_NUM; + constant CFG_SPICTRL_SLVS : integer := CONFIG_SPICTRL_SLVS; + constant CFG_SPICTRL_FIFO : integer := CONFIG_SPICTRL_FIFO; + constant CFG_SPICTRL_SLVREG : integer := CONFIG_SPICTRL_SLVREG; + constant CFG_SPICTRL_ODMODE : integer := CONFIG_SPICTRL_ODMODE; + constant CFG_SPICTRL_AM : integer := CONFIG_SPICTRL_AM; + constant CFG_SPICTRL_ASEL : integer := CONFIG_SPICTRL_ASEL; + constant CFG_SPICTRL_TWEN : integer := CONFIG_SPICTRL_TWEN; + constant CFG_SPICTRL_MAXWLEN : integer := CONFIG_SPICTRL_MAXWLEN; + constant CFG_SPICTRL_SYNCRAM : integer := CONFIG_SPICTRL_SYNCRAM; + constant CFG_SPICTRL_FT : integer := CONFIG_SPICTRL_FT; + +-- GRLIB debugging + constant CFG_DUART : integer := CONFIG_DEBUG_UART; + diff --git a/designs/ICI4-3DCAM-Integ1/config.vhd.in b/designs/ICI4-3DCAM-Integ1/config.vhd.in new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/config.vhd.in @@ -0,0 +1,18 @@ +#include "config.h" +#include "tkconfig.h" + +----------------------------------------------------------------------------- +-- LEON3 Demonstration design test bench configuration +-- Copyright (C) 2009 Aeroflex Gaisler +------------------------------------------------------------------------------ + + +library techmap; +use techmap.gencomp.all; + +package config is + +#include "config.vhd.h" + + +end; diff --git a/designs/ICI4-3DCAM-Integ1/default.sdc b/designs/ICI4-3DCAM-Integ1/default.sdc new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/default.sdc @@ -0,0 +1,50 @@ +# Synplicity, Inc. constraint file +# /home/jiri/ibm/vhdl/grlib/boards/gr-xc3s-1500/default.sdc +# Written on Thu May 11 15:07:16 2006 +# by Synplify Pro, 7.1.1 Scope Editor + +# +# Clocks +# +define_clock -name {n:clkm} -freq 50.000 -route 5.0 -clockgroup ahb_clkgroup +define_clock -name {rxclki} -freq 100.000 -route 2.0 -clockgroup rxclki_clkgroup +define_clock -name {txclk} -freq 100.000 -route 2.0 -clockgroup txclk_clkgroup +define_clock -name {clk125} -freq 125.000 -route 2.0 -clockgroup eth_clkgroup +define_clock -name {usb_clkout} -freq 60.000 -route 4.0 -clockgroup usb_clkgroup +define_clock -name {n:clk50} -freq 50.000 -route 4.0 -clockgroup vga_clkgroup +define_clock -name {clk3} -freq 25.000 -route 2.0 -clockgroup eth_clkgroup +define_clock -name {n:video_clk} -freq 50.000 -route 2.0 -clockgroup video_clkgroup + +# +# Inputs/Outputs +# +define_clock_delay -rise {clk3} -rise {vga_clkgen|clkgen65.clk0B_derived_clock} -false +define_clock_delay -rise {vga_clkgen|clkgen65.clk0B_derived_clock} -rise {clk3} -false +define_clock_delay -rise {leon3mp|clkgen0.xc3s_v.clk0B_derived_clock} -rise {leon3mp|clk50} -false +define_clock_delay -rise {leon3mp|clk50} -rise {leon3mp|clkgen0.xc3s_v.clk0B_derived_clock} -false + +define_output_delay -disable -default 10.00 -improve 0.00 -route 0.00 -ref clk:r +define_input_delay -disable -default 10.00 -improve 0.00 -route 0.00 -ref clk:r +define_output_delay 8.00 -improve 0.00 -route 0.00 -ref {usb_clkout:r} +define_input_delay 8.00 -improve 0.00 -route 0.00 -ref {usb_clkout:r} + +# +# Registers +# + +# +# Multicycle Path +# + +# +# False Path +# + +# +# Attributes +# +define_global_attribute syn_useioff {1} + +# +# Other Constraints +# diff --git a/designs/ICI4-3DCAM-Integ1/defconfig b/designs/ICI4-3DCAM-Integ1/defconfig new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/defconfig @@ -0,0 +1,252 @@ +# +# Automatically generated make config: don't edit +# + +# +# Synthesis +# +# CONFIG_SYN_INFERRED is not set +# CONFIG_SYN_ALTERA is not set +# CONFIG_SYN_AXCEL is not set +# CONFIG_SYN_PROASIC is not set +# CONFIG_SYN_PROASICPLUS is not set +# CONFIG_SYN_PROASIC3 is not set +# CONFIG_SYN_ATC18 is not set +# CONFIG_SYN_IHP25 is not set +# CONFIG_SYN_LATTICE is not set +# CONFIG_SYN_RH_LIB18T is not set +# CONFIG_SYN_RHUMC is not set +# CONFIG_SYN_SPARTAN2 is not set +CONFIG_SYN_SPARTAN3=y +# CONFIG_SYN_VIRTEX is not set +# CONFIG_SYN_VIRTEXE is not set +# CONFIG_SYN_VIRTEX2 is not set +# CONFIG_SYN_VIRTEX4 is not set +# CONFIG_SYN_INFER_RAM is not set +# CONFIG_SYN_INFER_PADS is not set +# CONFIG_SYN_NO_ASYNC is not set + +# +# Clock generation +# +# CONFIG_CLK_INFERRED is not set +# CONFIG_CLK_HCLKBUF is not set +# CONFIG_CLK_ALTDLL is not set +# CONFIG_CLK_LATDLL is not set +# CONFIG_CLK_LIB18T is not set +# CONFIG_CLK_CLKDLL is not set +CONFIG_CLK_DCM=y +CONFIG_CLK_MUL=4 +CONFIG_CLK_DIV=5 +# CONFIG_PCI_CLKDLL is not set +# CONFIG_CLK_NOFB is not set +# CONFIG_PCI_SYSCLK is not set +CONFIG_LEON3=y +CONFIG_PROC_NUM=1 + +# +# Processor +# + +# +# Integer unit +# +CONFIG_IU_NWINDOWS=8 +CONFIG_IU_V8MULDIV=y +# CONFIG_IU_MUL_LATENCY_4 is not set +CONFIG_IU_MUL_LATENCY_5=y +CONFIG_IU_MUL_MAC=y +CONFIG_IU_SVT=y +CONFIG_IU_LDELAY=1 +CONFIG_IU_WATCHPOINTS=2 +CONFIG_PWD=y +CONFIG_IU_RSTADDR=00000 + +# +# Floating-point unit +# +# CONFIG_FPU_ENABLE is not set + +# +# Cache system +# +CONFIG_ICACHE_ENABLE=y +CONFIG_ICACHE_ASSO1=y +# CONFIG_ICACHE_ASSO2 is not set +# CONFIG_ICACHE_ASSO3 is not set +# CONFIG_ICACHE_ASSO4 is not set +# CONFIG_ICACHE_SZ1 is not set +# CONFIG_ICACHE_SZ2 is not set +# CONFIG_ICACHE_SZ4 is not set +CONFIG_ICACHE_SZ8=y +# CONFIG_ICACHE_SZ16 is not set +# CONFIG_ICACHE_SZ32 is not set +# CONFIG_ICACHE_SZ64 is not set +# CONFIG_ICACHE_SZ128 is not set +# CONFIG_ICACHE_SZ256 is not set +# CONFIG_ICACHE_LZ16 is not set +CONFIG_ICACHE_LZ32=y +CONFIG_DCACHE_ENABLE=y +CONFIG_DCACHE_ASSO1=y +# CONFIG_DCACHE_ASSO2 is not set +# CONFIG_DCACHE_ASSO3 is not set +# CONFIG_DCACHE_ASSO4 is not set +# CONFIG_DCACHE_SZ1 is not set +# CONFIG_DCACHE_SZ2 is not set +CONFIG_DCACHE_SZ4=y +# CONFIG_DCACHE_SZ8 is not set +# CONFIG_DCACHE_SZ16 is not set +# CONFIG_DCACHE_SZ32 is not set +# CONFIG_DCACHE_SZ64 is not set +# CONFIG_DCACHE_SZ128 is not set +# CONFIG_DCACHE_SZ256 is not set +# CONFIG_DCACHE_LZ16 is not set +CONFIG_DCACHE_LZ32=y +CONFIG_DCACHE_SNOOP=y +# CONFIG_DCACHE_SNOOP_FAST is not set +CONFIG_CACHE_FIXED=00F3 + +# +# MMU +# +CONFIG_MMU_ENABLE=y +# CONFIG_MMU_COMBINED is not set +CONFIG_MMU_SPLIT=y +CONFIG_MMU_REPARRAY=y +# CONFIG_MMU_REPINCREMENT is not set +# CONFIG_MMU_I2 is not set +# CONFIG_MMU_I4 is not set +CONFIG_MMU_I8=y +# CONFIG_MMU_I16 is not set +# CONFIG_MMU_I32 is not set +# CONFIG_MMU_D2 is not set +# CONFIG_MMU_D4 is not set +CONFIG_MMU_D8=y +# CONFIG_MMU_D16 is not set +# CONFIG_MMU_D32 is not set + +# +# Debug Support Unit +# +CONFIG_DSU_ENABLE=y +CONFIG_DSU_ITRACE=y +# CONFIG_DSU_ITRACESZ1 is not set +CONFIG_DSU_ITRACESZ2=y +# CONFIG_DSU_ITRACESZ4 is not set +# CONFIG_DSU_ITRACESZ8 is not set +# CONFIG_DSU_ITRACESZ16 is not set +CONFIG_DSU_ATRACE=y +# CONFIG_DSU_ATRACESZ1 is not set +CONFIG_DSU_ATRACESZ2=y +# CONFIG_DSU_ATRACESZ4 is not set +# CONFIG_DSU_ATRACESZ8 is not set +# CONFIG_DSU_ATRACESZ16 is not set + +# +# VHDL debug settings +# +# CONFIG_IU_DISAS is not set +# CONFIG_DEBUG_PC32 is not set + +# +# AMBA configuration +# +CONFIG_AHB_DEFMST=0 +CONFIG_AHB_RROBIN=y +# CONFIG_AHB_SPLIT is not set +CONFIG_AHB_IOADDR=FFF +CONFIG_APB_HADDR=800 + +# +# Debug Link +# +CONFIG_DSU_UART=y +CONFIG_DSU_JTAG=y +# CONFIG_USBDCL is not set +# CONFIG_DSU_ETH is not set + +# +# Peripherals +# + +# +# Memory controller +# + +# +# Leon2 memory controller +# +CONFIG_MCTRL_LEON2=y +CONFIG_MCTRL_8BIT=y +# CONFIG_MCTRL_16BIT is not set +# CONFIG_MCTRL_5CS is not set +CONFIG_MCTRL_SDRAM=y +# CONFIG_MCTRL_SDRAM_SEPBUS is not set +CONFIG_AHBSTAT_ENABLE=y +CONFIG_AHBSTAT_NFTSLV=1 + +# +# On-chip RAM/ROM +# +# CONFIG_AHBROM_ENABLE is not set +# CONFIG_AHBRAM_ENABLE is not set + +# +# Ethernet +# +CONFIG_GRETH_ENABLE=y +# CONFIG_GRETH_FIFO4 is not set +# CONFIG_GRETH_FIFO8 is not set +# CONFIG_GRETH_FIFO16 is not set +CONFIG_GRETH_FIFO32=y +# CONFIG_GRETH_FIFO64 is not set + +# +# IDE Disk controller +# +CONFIG_ATA_ENABLE=y +CONFIG_ATAIO=A00 +CONFIG_ATAIRQ=10 + +# +# CAN +# +# CONFIG_CAN_ENABLE is not set + +# +# UART, timer, I/O port and interrupt controller +# +CONFIG_UART1_ENABLE=y +# CONFIG_UA1_FIFO1 is not set +# CONFIG_UA1_FIFO2 is not set +# CONFIG_UA1_FIFO4 is not set +CONFIG_UA1_FIFO8=y +# CONFIG_UA1_FIFO16 is not set +# CONFIG_UA1_FIFO32 is not set +CONFIG_IRQ3_ENABLE=y +CONFIG_GPT_ENABLE=y +CONFIG_GPT_NTIM=2 +CONFIG_GPT_SW=8 +CONFIG_GPT_TW=32 +CONFIG_GPT_IRQ=8 +CONFIG_GPT_SEPIRQ=y +# CONFIG_GPT_WDOGEN is not set +CONFIG_GRGPIO_ENABLE=y +CONFIG_GRGPIO_WIDTH=18 +CONFIG_GRGPIO_IMASK=FFF0 + +# +# Spacewire +# +# CONFIG_SPW_ENABLE is not set + +# +# Keybord and VGA interface +# +CONFIG_KBD_ENABLE=y +CONFIG_VGA_ENABLE=y + +# +# VHDL Debugging +# +# CONFIG_DEBUG_UART is not set diff --git a/designs/ICI4-3DCAM-Integ1/ici4.ut b/designs/ICI4-3DCAM-Integ1/ici4.ut new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/ici4.ut @@ -0,0 +1,32 @@ +-w +-g DebugBitstream:No +-d +-g Binary:no +-g CRC:Enable +-g Reset_on_err:No +-g ConfigRate:25 +-g ProgPin:PullUp +-g DonePin:PullUp +-g TckPin:PullUp +-g TdiPin:PullUp +-g TdoPin:PullUp +-g TmsPin:PullUp +-g UnusedPin:PullDown +-g UserID:0xFFFFFFFF +-g StartUpClk:CClk +-g DONE_cycle:4 +-g GTS_cycle:5 +-g GWE_cycle:6 +-g LCK_cycle:NoWait +-g Security:None +-g Persist:No +-m +-g ReadBack +-g DonePipe:Yes +-g DriveDone:Yes +-g en_sw_gsr:No +-g en_porb:Yes +-g drive_awake:No +-g sw_clk:Startupclk +-g sw_gwe_cycle:5 +-g sw_gts_cycle:4 diff --git a/designs/ICI4-3DCAM-Integ1/ici4.vhd b/designs/ICI4-3DCAM-Integ1/ici4.vhd new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/ici4.vhd @@ -0,0 +1,191 @@ +library ieee; +use ieee.std_logic_1164.all; +library grlib, techmap; +use techmap.gencomp.all; +use techmap.allclkgen.all; + +-- pragma translate_off +use gaisler.sim.all; +library unisim; +use unisim.ODDR2; +-- pragma translate_on +library lpp; +use lpp.lpp_ad_conv.all; +use lpp.general_purpose.all; +use lpp.Rocket_PCM_Encoder.all; + + + +use work.Convertisseur_config.all; + + +use work.config.all; + +entity ici4 is + generic ( + fabtech : integer := CFG_FABTECH; + memtech : integer := CFG_MEMTECH; + padtech : integer := CFG_PADTECH; + clktech : integer := CFG_CLKTECH; +WordSize : integer := 8; WordCnt : integer := 144;MinFCount : integer := 64 + ); + port ( + reset : in std_ulogic; + clk : in std_ulogic; + sclk : in std_logic; + Gate : in std_logic; + MinF : in std_logic; + MajF : in std_logic; + Data : out std_logic + ); +end; + +architecture rtl of ici4 is + +signal clk_buf,reset_buf : std_logic; + +Constant FramePlacerCount : integer := 2; + +signal MinF_Inv : std_logic; +signal Gate_Inv : std_logic; +signal sclk_Inv : std_logic; +signal WordCount : integer range 0 to WordCnt-1; +signal WordClk : std_logic; + +signal data_int : std_logic; + +signal MuxOUT : std_logic_vector(WordSize-1 downto 0); +signal MuxIN : std_logic_vector((FramePlacerCount*WordSize)-1 downto 0); +signal Sel : integer range 0 to 1; + + +signal WORD0 : std_logic_vector(15 downto 0); +signal WORD1 : std_logic_vector(15 downto 0); +signal WORD2 : std_logic_vector(15 downto 0); +signal WORD3 : std_logic_vector(15 downto 0); +signal WORD4 : std_logic_vector(15 downto 0); +signal WORD5 : std_logic_vector(15 downto 0); +signal WORD6 : std_logic_vector(15 downto 0); +signal WORD7 : std_logic_vector(15 downto 0); +signal WORD8 : std_logic_vector(15 downto 0); +signal WORD9 : std_logic_vector(15 downto 0); +signal WORD10 : std_logic_vector(15 downto 0); +signal WORD11 : std_logic_vector(15 downto 0); +signal WORD12 : std_logic_vector(15 downto 0); + + +signal LF1 : std_logic_vector(15 downto 0); +signal LF2 : std_logic_vector(15 downto 0); +signal LF3 : std_logic_vector(15 downto 0); + + +signal MinFCnt : integer range 0 to MinFCount-1; + +signal FramePlacerFlags : std_logic_vector(FramePlacerCount-1 downto 0); + +begin + + +clk_buf <= clk; +reset_buf <= reset; +-- + +Gate_Inv <= not Gate; +sclk_Inv <= not Sclk; +MinF_Inv <= not MinF; + +data <= data_int; + + +SD0 : Serial_Driver +generic map(WordSize) +port map(sclk_Inv,MuxOUT,Gate_inv,data_int); + +WC0 : Word_Cntr +generic map(WordSize,WordCnt) +port map(sclk_Inv,MinF,WordClk,WordCount); + +MFC0 : MinF_Cntr +generic map(MinFCount) +port map( + clk => MinF_Inv, + reset => MajF, + Cnt_out => MinFCnt +); + + +MUX0 : Serial_Driver_Multiplexor +generic map(FramePlacerCount,WordSize) +port map(sclk_Inv,Sel,MuxIN,MuxOUT); + +LFP0 : entity work.LF_FRAME_PLACER +generic map(WordSize,WordCnt,MinFCount) +port map( + clk => Sclk, + Wcount => WordCount, + Flag => FramePlacerFlags(1), + LF1 => LF1, + LF2 => LF2, + LF3 => LF3, + WordOut => MuxIN(15 downto 8)); + + +CAMFP0 : entity work.ICI4_3DCAM_FRAM_PLACER +generic map(WordSize,WordCnt,MinFCount) +port map( + clk => Sclk, + Wcount => WordCount, + Flag => FramePlacerFlags(0), + WORD0 => WORD0, + WORD1 => WORD1, + WORD2 => WORD2, + WORD3 => WORD3, + WORD4 => WORD4, + WORD5 => WORD5, + WORD6 => WORD6, + WORD7 => WORD7, + WORD8 => WORD8, + WORD9 => WORD9, + WORD10 => WORD10, + WORD11 => WORD11, + WORD12 => WORD12, + WordOut => MuxIN(7 downto 0)); + + + WORD0 <= WORD0cst; + WORD1 <= WORD1cst; + WORD2 <= WORD2cst; + WORD3 <= WORD3cst; + WORD4 <= WORD4cst; + WORD5 <= WORD5cst; + WORD6 <= WORD6cst; + WORD7 <= WORD7cst; + WORD8 <= WORD8cst; + WORD9 <= WORD9cst; + WORD10 <= WORD10cst; + WORD11 <= WORD11cst; + WORD12 <= X"0" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + + + LF1 <= LF1cst; + LF2 <= LF2cst; + LF3 <= LF3cst; + +process(clk) +variable SelVar : integer range 0 to FramePlacerCount; +begin + if clk'event and clk ='1' then + Decoder: FOR i IN 0 to FramePlacerCount-1 loop + if FramePlacerFlags(i) = '1' then + SelVar := i; + end if; + END loop Decoder; + Sel <= SelVar; + end if; +end process; + + +end rtl; + + + diff --git a/designs/ICI4-3DCAM-Integ1/indata b/designs/ICI4-3DCAM-Integ1/indata new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/indata @@ -0,0 +1,2370 @@ +NYTT1 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +1101 +0000 +0000 +0000 +0000 +1010 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +1111 +1111 +1111 +1111 +1111 +1111 +1111 +1111 +1111 +1111 +1111 +1111 +1000 +0000 +0000 +0000 +0101 +1000 +0000 +0000 +0011 +0000 +1110 +1110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0001 +0001 +0000 +0000 +0000 +0000 +0000 +1100 +1000 +1010 +0000 +0000 +1000 +0001 +0000 +1100 +1000 +1010 +0000 +0000 +0010 +0011 +0000 +0000 +0000 +0000 +0111 +0010 +0000 +0001 +0011 +0000 +1010 +1101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0010 +1111 +0000 +0000 +0000 +0000 +0000 +1010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +NYTT2 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +0101 +1101 +0000 +0000 +0000 +0000 +1010 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +1111 +1111 +1111 +1111 +1111 +1111 +1111 +1111 +1111 +1111 +1111 +1111 +1000 +0000 +0000 +0000 +0101 +1000 +0000 +0000 +0000 +0000 +0010 +0110 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0001 +0001 +0000 +0000 +0000 +0000 +0000 +1100 +1000 +1010 +0000 +0000 +1000 +0001 +0000 +1100 +1000 +1010 +0000 +0000 +0010 +0011 +0000 +0000 +0000 +0000 +0111 +0010 +0000 +0001 +0000 +0000 +1110 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +1111 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0011 +0000 +1000 +1100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0111 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1010 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1011 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1100 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1101 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1110 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 diff --git a/designs/ICI4-3DCAM-Integ1/lconfig.tk b/designs/ICI4-3DCAM-Integ1/lconfig.tk new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/lconfig.tk @@ -0,0 +1,6296 @@ +# FILE: header.tk +# This file is boilerplate TCL/TK function definitions for 'make xconfig'. +# +# CHANGES +# ======= +# +# 8 January 1999, Michael Elizabeth Chastain, +# - Remove unused do_cmd function (part of the 2.0 sound support). +# - Arrange buttons in three columns for better screen fitting. +# - Add CONSTANT_Y, CONSTANT_M, CONSTANT_N for commands like: +# dep_tristate 'foo' CONFIG_FOO m +# +# 23 January 1999, Michael Elizabeth Chastain, +# - Shut vfix the hell up. +# +# 24 January 1999, Michael Elizabeth Chastain, +# - Improve the exit message (Jeff Ronne). + +# +# This is a handy replacement for ".widget cget" that requires neither tk4 +# nor additional source code uglification. +# +proc cget { w option } { + return "[lindex [$w configure $option] 4]" +} + +# +# Function to compensate for broken config.in scripts like the sound driver, +# which make dependencies on variables that are never even conditionally +# defined. +# +proc vfix { var } { + global $var + if [ catch {eval concat $$var} ] { + set $var 4 + } +} + +# +# Constant values used by certain dep_tristate commands. +# +set CONSTANT_Y 1 +set CONSTANT_M 2 +set CONSTANT_N 0 +set CONSTANT_E 4 + +# +# Create a "reference" object to steal colors from. +# +button .ref + +# +# On monochrome displays, -disabledforeground is blank by default; that's +# bad. Fill it with -foreground instead. +# +if { [cget .ref -disabledforeground] == "" } { + .ref configure -disabledforeground [cget .ref -foreground] +} + + +# +# Define some macros we will need to parse the config.in file. +# + +proc mainmenu_name { text } { + wm title . "$text" +} + +proc menu_option { w menu_num text } { + global menus_per_column + global processed_top_level + set processed_top_level [expr $processed_top_level + 1] + if { $processed_top_level <= $menus_per_column } then { + set myframe left + } elseif { $processed_top_level <= [expr 2 * $menus_per_column] } then { + set myframe middle + } else { + set myframe right + } + button .f0.x$menu_num -anchor w -text "$text" \ + -command "$w .$w \"$text\"" + pack .f0.x$menu_num -pady 0 -side top -fill x -in .f0.$myframe +} + +proc load_configfile { w title func } { + catch {destroy $w} + toplevel $w -class Dialog + global loadfile + frame $w.x + label $w.bm -bitmap questhead + pack $w.bm -pady 10 -side top -padx 10 + label $w.x.l -text "Enter filename:" -relief raised + entry $w.x.x -width 35 -relief sunken -borderwidth 2 \ + -textvariable loadfile + pack $w.x.l $w.x.x -anchor w -side left + pack $w.x -side top -pady 10 + wm title $w "$title" + + set oldFocus [focus] + frame $w.f + button $w.f.back -text "OK" -width 20 \ + -command "destroy $w; focus $oldFocus;$func .fileio" + button $w.f.canc -text "Cancel" \ + -width 20 -command "destroy $w; focus $oldFocus" + pack $w.f.back $w.f.canc -side left -pady 10 -padx 45 + pack $w.f -pady 10 -side bottom -padx 10 -anchor w + focus $w + global winx; global winy + set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30] + wm geometry $w +$winx+$winy +} + +bind all {maybe_exit .maybe} + +proc maybe_exit { w } { + catch {destroy $w} + toplevel $w -class Dialog + label $w.bm -bitmap questhead + pack $w.bm -pady 10 -side top -padx 10 + message $w.m -width 400 -aspect 300 \ + -text "Changes will be lost. Are you sure?" -relief flat + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Are you sure?" + + set oldFocus [focus] + frame $w.f + button $w.f.back -text "OK" -width 20 \ + -command "exit 1" + button $w.f.canc -text "Cancel" \ + -width 20 -command "destroy $w; focus $oldFocus" + pack $w.f.back $w.f.canc -side left -pady 10 -padx 45 + pack $w.f -pady 10 -side bottom -padx 10 -anchor w + bind $w "exit 1" + bind $w "destroy $w; focus $oldFocus" + focus $w + global winx; global winy + set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30] + wm geometry $w +$winx+$winy +} + +proc read_config_file { w } { + global loadfile + if { [string length $loadfile] != 0 && [file readable $loadfile] == 1 } then { + read_config $loadfile + } else { + catch {destroy $w} + toplevel $w -class Dialog + message $w.m -width 400 -aspect 300 -text \ + "Unable to read file $loadfile" \ + -relief raised + label $w.bm -bitmap error + pack $w.bm $w.m -pady 10 -side top -padx 10 + wm title $w "Xconfig Internal Error" + + set oldFocus [focus] + frame $w.f + button $w.f.back -text "Bummer" \ + -width 10 -command "destroy $w; focus $oldFocus" + pack $w.f.back -side bottom -pady 10 -anchor s + pack $w.f -pady 10 -side top -padx 10 -anchor s + focus $w + global winx; global winy + set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30] + wm geometry $w +$winx+$winy + } +} + +proc write_config_file { w } { + global loadfile + if { [string length $loadfile] != 0 + && ([file writable $loadfile] == 1 || ([file exists $loadfile] == 0 && [file writable [file dirname $loadfile]] == 1)) } then { + writeconfig $loadfile .null + } else { + catch {destroy $w} + toplevel $w -class Dialog + message $w.m -width 400 -aspect 300 -text \ + "Unable to write file $loadfile" \ + -relief raised + label $w.bm -bitmap error + pack $w.bm $w.m -pady 10 -side top -padx 10 + wm title $w "Xconfig Internal Error" + + set oldFocus [focus] + frame $w.f + button $w.f.back -text "OK" \ + -width 10 -command "destroy $w; focus $oldFocus" + pack $w.f.back -side bottom -pady 10 -anchor s + pack $w.f -pady 10 -side top -padx 10 -anchor s + focus $w + global winx; global winy + set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30] + wm geometry $w +$winx+$winy + } +} + +proc read_config { filename } { + set file1 [open $filename r] + clear_choices + while { [gets $file1 line] >= 0} { + if [regexp {([0-9A-Za-z_]+)=([ynm])} $line foo var value] { + if { $value == "y" } then { set cmd "global $var; set $var 1" } + if { $value == "n" } then { set cmd "global $var; set $var 0" } + if { $value == "m" } then { set cmd "global $var; set $var 2" } + eval $cmd + } + if [regexp {# ([0-9A-Za-z_]+) is not set} $line foo var] { + set cmd "global $var; set $var 0" + eval $cmd + } + if [regexp {([0-9A-Za-z_]+)=([0-9A-Fa-f]+)} $line foo var value] { + set cmd "global $var; set $var $value" + eval $cmd + } + if [regexp {([0-9A-Za-z_]+)="([^"]*)"} $line foo var value] { + set cmd "global $var; set $var \"$value\"" + eval $cmd + } + } + close $file1 + update_choices + update_mainmenu +} +proc write_comment { file1 file2 text } { + puts $file1 "" + puts $file1 "#" + puts $file1 "# $text" + puts $file1 "#" + puts $file2 "/*" + puts $file2 " * $text" + puts $file2 " */" +} + +proc effective_dep { deplist } { + global CONFIG_MODULES + set depend 1 + foreach i $deplist { + if {$i == 0} then {set depend 0} + if {$i == 2 && $depend == 1} then {set depend 2} + } + if {$depend == 2 && $CONFIG_MODULES == 0} then {set depend 0} + return $depend +} + +proc sync_tristate { var dep } { + global CONFIG_MODULES + if {$dep == 0 && ($var == 1 || $var == 2)} then { + set var 0 + } elseif {$dep == 2 && $var == 1} then { + set var 2 + } elseif {$var == 2 && $CONFIG_MODULES == 0} then { + if {$dep == 1} then {set var 1} else {set var 0} + } + return $var +} + +proc sync_bool { var dep modset } { + set var [sync_tristate $var $dep] + if {$dep == 2 && $var == 2} then { + set var $modset + } + return $var +} + +proc write_tristate { file1 file2 varname variable deplist modset } { + set variable [sync_tristate $variable [effective_dep $deplist]] + if { $variable == 2 } \ + then { set variable $modset } + if { $variable == 1 } \ + then { puts $file1 "$varname=y"; \ + puts $file2 "#define $varname 1" } \ + elseif { $variable == 2 } \ + then { puts $file1 "$varname=m"; \ + puts $file2 "#undef $varname"; \ + puts $file2 "#define ${varname}_MODULE 1" } \ + elseif { $variable == 0 } \ + then { puts $file1 "# $varname is not set"; \ + puts $file2 "#undef $varname"} \ + else { \ + puts stdout "ERROR - Attempting to write value for unconfigured variable ($varname)." \ + } +} + +proc write_int { file1 file2 varname variable dep } { + if { $dep == 0 } \ + then { puts $file1 "# $varname is not set"; \ + puts $file2 "#undef $varname"} \ + else { + puts $file1 "$varname=$variable"; \ + puts $file2 "#define $varname ($variable)"; \ + } +} + +proc write_hex { file1 file2 varname variable dep } { + if { $dep == 0 } \ + then { puts $file1 "# $varname is not set"; \ + puts $file2 "#undef $varname"} \ + else { + puts $file1 "$varname=$variable"; \ + puts -nonewline $file2 "#define $varname "; \ + puts $file2 [exec echo $variable | sed s/^0\[xX\]//]; \ + } +} + +proc write_string { file1 file2 varname variable dep } { + if { $dep == 0 } \ + then { puts $file1 "# $varname is not set"; \ + puts $file2 "#undef $varname"} \ + else { + puts $file1 "$varname=\"$variable\""; \ + puts $file2 "#define $varname \"$variable\""; \ + } +} + +proc option_name {w mnum line text helpidx} { + button $w.x$line.l -text "$text" -relief groove -anchor w + $w.x$line.l configure -activefore [cget $w.x$line.l -fg] \ + -activeback [cget $w.x$line.l -bg] + button $w.x$line.help -text "Help" -relief raised \ + -command "dohelp .dohelp $helpidx .menu$mnum" + pack $w.x$line.help -side right -fill y + pack $w.x$line.l -side right -fill both -expand on +} + +proc toggle_switch2 {w mnum line text variable} { + frame $w.x$line -relief sunken + radiobutton $w.x$line.y -text "y" -variable $variable -value 1 \ + -relief groove -width 2 -command "update_active" +# radiobutton $w.x$line.m -text "-" -variable $variable -value 2 \ +# -relief groove -width 2 -command "update_active" + radiobutton $w.x$line.n -text "n" -variable $variable -value 0 \ + -relief groove -width 2 -command "update_active" + + option_name $w $mnum $line $text $variable + + pack $w.x$line.n $w.x$line.y -side right -fill y +} + +proc toggle_switch3 {w mnum line text variable} { + frame $w.x$line -relief sunken + radiobutton $w.x$line.y -text "y" -variable $variable -value 1 \ + -relief groove -width 2 -command "update_active" + radiobutton $w.x$line.m -text "m" -variable $variable -value 2 \ + -relief groove -width 2 -command "update_active" + radiobutton $w.x$line.n -text "n" -variable $variable -value 0 \ + -relief groove -width 2 -command "update_active" + + option_name $w $mnum $line $text $variable + + global CONFIG_MODULES + if {($CONFIG_MODULES == 0)} then { + $w.x$line.m configure -state disabled + } + pack $w.x$line.n $w.x$line.m $w.x$line.y -side right -fill y +} + +proc bool {w mnum line text variable} { + toggle_switch2 $w $mnum $line $text $variable +# $w.x$line.m configure -state disabled + pack $w.x$line -anchor w -fill both -expand on +} + +proc tristate {w mnum line text variable } { + toggle_switch3 $w $mnum $line $text $variable + pack $w.x$line -anchor w -fill both -expand on +} + +proc dep_tristate {w mnum line text variable } { + tristate $w $mnum $line $text $variable +} + +proc dep_bool {w mnum line text variable } { + bool $w $mnum $line $text $variable +} + +proc int { w mnum line text variable } { + frame $w.x$line + entry $w.x$line.x -width 11 -relief sunken -borderwidth 2 \ + -textvariable $variable + option_name $w $mnum $line $text $variable + pack $w.x$line.x -anchor w -side right -fill y + pack $w.x$line -anchor w -fill both -expand on +} + +proc hex { w mnum line text variable } { + int $w $mnum $line $text $variable +} + +proc istring { w mnum line text variable } { + frame $w.x$line + entry $w.x$line.x -width 18 -relief sunken -borderwidth 2 \ + -textvariable $variable + option_name $w $mnum $line $text $variable + pack $w.x$line.x -anchor w -side right -fill y + pack $w.x$line -anchor w -fill both -expand on +} + +proc minimenu { w mnum line text variable helpidx } { + frame $w.x$line + menubutton $w.x$line.x -textvariable $variable -menu \ + $w.x$line.x.menu -relief raised \ + -anchor w + option_name $w $mnum $line $text $helpidx + pack $w.x$line.x -anchor w -side right -fill y + pack $w.x$line -anchor w -fill both -expand on +} + +proc menusplit {w m n} { + if { $n > 2 } then { + update idletasks + set menuoptsize [expr [$m yposition 2] - [$m yposition 1]] + set maxsize [winfo screenheight $w] + set splitpoint [expr $maxsize * 4 / 5 / $menuoptsize - 1] + for {set i [expr $splitpoint + 1]} {$i <= $n} {incr i $splitpoint} { + $m entryconfigure $i -columnbreak 1 + } + } +} + +proc menutitle {text menu w} { + wm title $w "$text" +} + +proc submenu { w mnum line text subnum } { + frame $w.x$line + button $w.x$line.l -text "" -width 9 -relief groove + $w.x$line.l configure -activefore [cget $w.x$line.l -fg] \ + -activeback [cget $w.x$line.l -bg] -state disabled + button $w.x$line.m -text "$text" -relief raised -anchor w \ + -command "catch {destroy .menu$subnum}; menu$subnum .menu$subnum \"$text\"" + pack $w.x$line.l -side left -fill both + pack $w.x$line.m -anchor w -side right -fill both -expand on + pack $w.x$line -anchor w -fill both -expand on +} + +proc comment {w mnum line text } { + frame $w.x$line + button $w.x$line.l -text "" -width 15 -relief groove + $w.x$line.l configure -activefore [cget $w.x$line.l -fg] \ + -activeback [cget $w.x$line.l -bg] -state disabled + button $w.x$line.m -text "$text" -relief groove -anchor w + $w.x$line.m configure -activefore [cget $w.x$line.m -fg] \ + -activeback [cget $w.x$line.m -bg] + pack $w.x$line.l -side left -fill both + pack $w.x$line.m -anchor w -side right -fill both -expand on + pack $w.x$line -anchor w -fill both -expand on +} + +proc readhelp {tag fn} { + set message "" + set b 0 + if { [file readable $fn] == 1} then { + set fhandle [open $fn r] + while {[gets $fhandle inline] >= 0} { + if { $b == 0 } { + if { [regexp $tag $inline ] } { + set b 1 + set message "$inline:\n" + } + } else { + if { [regexp {^[^ \t]} $inline]} { + break + } + set message "$message\n$inline" + } + } + close $fhandle + } + return $message +} + +proc dohelp {w var parent} { + catch {destroy $w} + toplevel $w -class Dialog + + set filefound 0 + set found 0 + set lineno 0 + + if { [file readable config.help] == 1} then { + set filefound 1 + # First escape sed regexp special characters in var: + set var [exec echo "$var" | sed s/\[\]\[\/.^$*\]/\\\\&/g] + # Now pick out right help text: + set message [readhelp $var config.help] + set found [expr [string length "$message"] > 0] + } + + frame $w.f1 + pack $w.f1 -fill both -expand on + + # Do the OK button + # + set oldFocus [focus] + frame $w.f2 + button $w.f2.ok -text "OK" \ + -width 10 -command "destroy $w; catch {focus $oldFocus}" + pack $w.f2.ok -side bottom -pady 6 -anchor n + pack $w.f2 -side bottom -padx 10 -anchor s + + scrollbar $w.f1.vscroll -command "$w.f1.canvas yview" + pack $w.f1.vscroll -side right -fill y + + canvas $w.f1.canvas -relief flat -borderwidth 0 \ + -yscrollcommand "$w.f1.vscroll set" + frame $w.f1.f + pack $w.f1.canvas -side right -fill y -expand on + + if { $found == 0 } then { + if { $filefound == 0 } then { + message $w.f1.f.m -width 750 -aspect 300 -relief flat -text \ + "No help available - unable to open file config.help." + } else { + message $w.f1.f.m -width 400 -aspect 300 -relief flat -text \ + "No help available for $var" + } + label $w.f1.bm -bitmap error + wm title $w "RTFM" + } else { + text $w.f1.f.m -width 73 -relief flat -wrap word + $w.f1.f.m insert 0.0 $message + $w.f1.f.m conf -state disabled -height [$w.f1.f.m index end] + + label $w.f1.bm -bitmap info + wm title $w "Configuration help" + } + pack $w.f1.f.m -side left + pack $w.f1.bm $w.f1.f -side left -padx 10 + + focus $w + set winx [expr [winfo x $parent]+20] + set winy [expr [winfo y $parent]+20] + wm geometry $w +$winx+$winy + set sizok [expr [winfo reqheight $w.f2.ok] + 12] + set maxy [expr [winfo screenheight .] * 3 / 4] + set canvtotal [winfo reqheight $w.f1.f.m] + if [expr $sizok + $canvtotal < $maxy] { + set sizy $canvtotal + } else { + set sizy [expr $maxy - $sizok] + } + $w.f1.canvas configure -height $sizy -width [winfo reqwidth $w.f1.f.m] \ + -scrollregion "0 0 [winfo reqwidth $w.f1.f.m] \ + [winfo reqheight $w.f1.f.m]" + $w.f1.canvas create window 0 0 -anchor nw -window $w.f1.f + update idletasks + + set maxy [winfo screenheight .] + if [expr $sizok + $canvtotal < $maxy] { + set sizy [expr $sizok + $canvtotal] + } else { + set sizy $maxy + } + wm maxsize $w [winfo width $w] $sizy +} + +bind all { catch {exec cp -f .config .config.old}; \ + writeconfig .config config.h; wrapup .wrap } + +proc wrapup {w } { + catch {destroy $w} + toplevel $w -class Dialog + + global CONFIG_MODVERSIONS; vfix CONFIG_MODVERSIONS + message $w.m -width 460 -aspect 300 -relief raised -text \ + "End of design configuration. " + label $w.bm -bitmap info + pack $w.bm $w.m -pady 10 -side top -padx 10 + wm title $w "LEON build instructions" + + set oldFocus [focus] + frame $w.f + button $w.f.back -text "OK" \ + -width 10 -command "exit 2" + pack $w.f.back -side bottom -pady 10 -anchor s + pack $w.f -pady 10 -side top -padx 10 -anchor s + focus $w + bind $w "exit 2" + global winx; global winy + set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30] + wm geometry $w +$winx+$winy + +} + +proc unregister_active {num} { + global active_menus + set index [lsearch -exact $active_menus $num] + if {$index != -1} then {set active_menus [lreplace $active_menus $index $index]} +} + +proc update_active {} { + global active_menus total_menus + set max 0 + if {[llength $active_menus] > 0} then { + set max [lindex $active_menus end] + update_define [toplevel_menu [lindex $active_menus 0]] $max 0 + } + foreach i $active_menus { + if {[winfo exists .menu$i] == 0} then { + unregister_active $i + } else { + update_menu$i + } + } + update_define [expr $max + 1] $total_menus 1 + update_mainmenu +} + +proc configure_entry {w option items} { + foreach i $items { + $w.$i configure -state $option + } +} + +proc validate_int {name val default} { + if {([exec echo $val | sed s/^-//g | tr -d \[:digit:\] ] != "")} then { + global $name; set $name $default + } +} + +proc validate_hex {name val default} { + if {([exec echo $val | tr -d \[:xdigit:\] ] != "")} then { + global $name; set $name $default + } +} + +proc update_define {first last allow_update} { + for {set i $first} {$i <= $last} {incr i} { + update_define_menu$i + if {$allow_update == 1} then update + } +} + +# +# Next set up the particulars for the top level menu, and define a few +# buttons which we will stick down at the bottom. +# + +frame .f0 +frame .f0.left +frame .f0.middle +frame .f0.right + +set active_menus [list] +set processed_top_level 0 +set ARCH sparc +set menus_per_column 4 +set total_menus 24 + +proc toplevel_menu {num} { + if {$num == 4} then {return 3} + if {$num == 5} then {return 3} + if {$num == 6} then {return 3} + if {$num == 7} then {return 3} + if {$num == 8} then {return 3} + if {$num == 9} then {return 3} + if {$num == 10} then {return 3} + if {$num == 14} then {return 13} + if {$num == 15} then {return 14} + if {$num == 16} then {return 14} + if {$num == 17} then {return 13} + if {$num == 18} then {return 13} + if {$num == 19} then {return 13} + if {$num == 20} then {return 13} + if {$num == 21} then {return 13} + if {$num == 22} then {return 21} + if {$num == 23} then {return 21} + return $num +} + +mainmenu_name "LEON3MP Design Configuration" +menu_option menu1 1 "Synthesis " +proc menu1 {w title} { + set oldFocus [focus] + catch {destroy $w; unregister_active 1} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 1]] + message $w.m -width 400 -aspect 300 -text \ + "Synthesis " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Synthesis " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 1; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 1; menu2 .menu2 \"$title\"" + frame $w.f + button $w.f.back -text "Main Menu" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 1" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 1; menu0 .menu0 \"$title\"" + $w.f.prev configure -state disabled + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + global tmpvar_0 + minimenu $w.config.f 1 0 "Target technology " tmpvar_0 CONFIG_SYN_INFERRED + menu $w.config.f.x0.x.menu -tearoffcommand "menutitle \"Target technology \"" + $w.config.f.x0.x.menu add radiobutton -label "Inferred" -variable tmpvar_0 -value "Inferred" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Altera-Stratix" -variable tmpvar_0 -value "Altera-Stratix" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Altera-StratixII" -variable tmpvar_0 -value "Altera-StratixII" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Altera-StratixIII" -variable tmpvar_0 -value "Altera-StratixIII" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Altera-CycloneIII" -variable tmpvar_0 -value "Altera-CycloneIII" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Altera-Others" -variable tmpvar_0 -value "Altera-Others" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Actel-Axcelerator" -variable tmpvar_0 -value "Actel-Axcelerator" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Actel-Axcelerator-DSP" -variable tmpvar_0 -value "Actel-Axcelerator-DSP" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Actel-Proasic" -variable tmpvar_0 -value "Actel-Proasic" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Actel-ProasicPlus" -variable tmpvar_0 -value "Actel-ProasicPlus" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Actel-Proasic3" -variable tmpvar_0 -value "Actel-Proasic3" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Actel-Proasic3E" -variable tmpvar_0 -value "Actel-Proasic3E" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Actel-Proasic3L" -variable tmpvar_0 -value "Actel-Proasic3L" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Actel-IGLOO/p/L" -variable tmpvar_0 -value "Actel-IGLOO/p/L" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Actel-Fusion" -variable tmpvar_0 -value "Actel-Fusion" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Aeroflex-UT025CRH" -variable tmpvar_0 -value "Aeroflex-UT025CRH" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Aeroflex-UT130HBD" -variable tmpvar_0 -value "Aeroflex-UT130HBD" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Aeroflex-UT90NHBD" -variable tmpvar_0 -value "Aeroflex-UT90NHBD" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Atmel-ATC18" -variable tmpvar_0 -value "Atmel-ATC18" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Atmel-ATC18RHA" -variable tmpvar_0 -value "Atmel-ATC18RHA" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "IBM-CMOS9SF" -variable tmpvar_0 -value "IBM-CMOS9SF" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Custom1" -variable tmpvar_0 -value "Custom1" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "eASIC90" -variable tmpvar_0 -value "eASIC90" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "eASIC45" -variable tmpvar_0 -value "eASIC45" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "IHP25" -variable tmpvar_0 -value "IHP25" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "IHP25RH" -variable tmpvar_0 -value "IHP25RH" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Lattice-EC/ECP/XP" -variable tmpvar_0 -value "Lattice-EC/ECP/XP" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Quicklogic-Eclipse" -variable tmpvar_0 -value "Quicklogic-Eclipse" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Peregrine" -variable tmpvar_0 -value "Peregrine" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "RH-LIB18T" -variable tmpvar_0 -value "RH-LIB18T" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "RH-UMC" -variable tmpvar_0 -value "RH-UMC" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "SMIC130" -variable tmpvar_0 -value "SMIC130" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "TM65Gplus" -variable tmpvar_0 -value "TM65Gplus" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "TSMC90" -variable tmpvar_0 -value "TSMC90" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "UMC180" -variable tmpvar_0 -value "UMC180" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Spartan2" -variable tmpvar_0 -value "Xilinx-Spartan2" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Spartan3" -variable tmpvar_0 -value "Xilinx-Spartan3" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Spartan3E" -variable tmpvar_0 -value "Xilinx-Spartan3E" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Spartan6" -variable tmpvar_0 -value "Xilinx-Spartan6" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Virtex" -variable tmpvar_0 -value "Xilinx-Virtex" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Xilinx-VirtexE" -variable tmpvar_0 -value "Xilinx-VirtexE" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Virtex2" -variable tmpvar_0 -value "Xilinx-Virtex2" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Virtex4" -variable tmpvar_0 -value "Xilinx-Virtex4" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Virtex5" -variable tmpvar_0 -value "Xilinx-Virtex5" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Xilinx-Virtex6" -variable tmpvar_0 -value "Xilinx-Virtex6" -command "update_active" + menusplit $w $w.config.f.x0.x.menu 45 + global tmpvar_1 + minimenu $w.config.f 1 1 "Memory Library " tmpvar_1 CONFIG_MEM_INFERRED + menu $w.config.f.x1.x.menu -tearoffcommand "menutitle \"Memory Library \"" + $w.config.f.x1.x.menu add radiobutton -label "Inferred" -variable tmpvar_1 -value "Inferred" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "UMC18" -variable tmpvar_1 -value "UMC18" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "RH-UMC" -variable tmpvar_1 -value "RH-UMC" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "Artisan" -variable tmpvar_1 -value "Artisan" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "Custom1" -variable tmpvar_1 -value "Custom1" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "Virage" -variable tmpvar_1 -value "Virage" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "Virage-TSMC90" -variable tmpvar_1 -value "Virage-TSMC90" -command "update_active" + menusplit $w $w.config.f.x1.x.menu 7 + bool $w.config.f 1 2 "Infer RAM" CONFIG_SYN_INFER_RAM + bool $w.config.f 1 3 "Infer pads" CONFIG_SYN_INFER_PADS + bool $w.config.f 1 4 "Disable asynchronous reset" CONFIG_SYN_NO_ASYNC + bool $w.config.f 1 5 "Enable scan support " CONFIG_SYN_SCAN + + + + focus $w + update_active + global winx; global winy + set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu1 {} { + global CONFIG_SYN_INFERRED + global CONFIG_SYN_CUSTOM1 + global CONFIG_SYN_ATC18 + global CONFIG_SYN_TSMC90 + global CONFIG_SYN_UMC + global CONFIG_SYN_RHUMC + global CONFIG_SYN_ARTISAN + 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}} + global CONFIG_SYN_INFER_RAM + if {($CONFIG_SYN_INFERRED != 1)} then { + configure_entry .menu1.config.f.x2 normal {n l y}} else {configure_entry .menu1.config.f.x2 disabled {y n l}} + global CONFIG_SYN_INFER_PADS + if {($CONFIG_SYN_INFERRED != 1)} then { + configure_entry .menu1.config.f.x3 normal {n l y}} else {configure_entry .menu1.config.f.x3 disabled {y n l}} +} + + +proc update_define_menu1 {} { + update_define_mainmenu + global CONFIG_MODULES + global tmpvar_0 + global CONFIG_SYN_INFERRED + if {$tmpvar_0 == "Inferred"} then {set CONFIG_SYN_INFERRED 1} else {set CONFIG_SYN_INFERRED 0} + global CONFIG_SYN_STRATIX + if {$tmpvar_0 == "Altera-Stratix"} then {set CONFIG_SYN_STRATIX 1} else {set CONFIG_SYN_STRATIX 0} + global CONFIG_SYN_STRATIXII + if {$tmpvar_0 == "Altera-StratixII"} then {set CONFIG_SYN_STRATIXII 1} else {set CONFIG_SYN_STRATIXII 0} + global CONFIG_SYN_STRATIXIII + if {$tmpvar_0 == "Altera-StratixIII"} then {set CONFIG_SYN_STRATIXIII 1} else {set CONFIG_SYN_STRATIXIII 0} + global CONFIG_SYN_CYCLONEIII + if {$tmpvar_0 == "Altera-CycloneIII"} then {set CONFIG_SYN_CYCLONEIII 1} else {set CONFIG_SYN_CYCLONEIII 0} + global CONFIG_SYN_ALTERA + if {$tmpvar_0 == "Altera-Others"} then {set CONFIG_SYN_ALTERA 1} else {set CONFIG_SYN_ALTERA 0} + global CONFIG_SYN_AXCEL + if {$tmpvar_0 == "Actel-Axcelerator"} then {set CONFIG_SYN_AXCEL 1} else {set CONFIG_SYN_AXCEL 0} + global CONFIG_SYN_AXDSP + if {$tmpvar_0 == "Actel-Axcelerator-DSP"} then {set CONFIG_SYN_AXDSP 1} else {set CONFIG_SYN_AXDSP 0} + global CONFIG_SYN_PROASIC + if {$tmpvar_0 == "Actel-Proasic"} then {set CONFIG_SYN_PROASIC 1} else {set CONFIG_SYN_PROASIC 0} + global CONFIG_SYN_PROASICPLUS + if {$tmpvar_0 == "Actel-ProasicPlus"} then {set CONFIG_SYN_PROASICPLUS 1} else {set CONFIG_SYN_PROASICPLUS 0} + global CONFIG_SYN_PROASIC3 + if {$tmpvar_0 == "Actel-Proasic3"} then {set CONFIG_SYN_PROASIC3 1} else {set CONFIG_SYN_PROASIC3 0} + global CONFIG_SYN_PROASIC3E + if {$tmpvar_0 == "Actel-Proasic3E"} then {set CONFIG_SYN_PROASIC3E 1} else {set CONFIG_SYN_PROASIC3E 0} + global CONFIG_SYN_PROASIC3L + if {$tmpvar_0 == "Actel-Proasic3L"} then {set CONFIG_SYN_PROASIC3L 1} else {set CONFIG_SYN_PROASIC3L 0} + global CONFIG_SYN_IGLOO + if {$tmpvar_0 == "Actel-IGLOO/p/L"} then {set CONFIG_SYN_IGLOO 1} else {set CONFIG_SYN_IGLOO 0} + global CONFIG_SYN_FUSION + if {$tmpvar_0 == "Actel-Fusion"} then {set CONFIG_SYN_FUSION 1} else {set CONFIG_SYN_FUSION 0} + global CONFIG_SYN_UT025CRH + if {$tmpvar_0 == "Aeroflex-UT025CRH"} then {set CONFIG_SYN_UT025CRH 1} else {set CONFIG_SYN_UT025CRH 0} + global CONFIG_SYN_UT130HBD + if {$tmpvar_0 == "Aeroflex-UT130HBD"} then {set CONFIG_SYN_UT130HBD 1} else {set CONFIG_SYN_UT130HBD 0} + global CONFIG_SYN_UT90NHBD + if {$tmpvar_0 == "Aeroflex-UT90NHBD"} then {set CONFIG_SYN_UT90NHBD 1} else {set CONFIG_SYN_UT90NHBD 0} + global CONFIG_SYN_ATC18 + if {$tmpvar_0 == "Atmel-ATC18"} then {set CONFIG_SYN_ATC18 1} else {set CONFIG_SYN_ATC18 0} + global CONFIG_SYN_ATC18RHA + if {$tmpvar_0 == "Atmel-ATC18RHA"} then {set CONFIG_SYN_ATC18RHA 1} else {set CONFIG_SYN_ATC18RHA 0} + global CONFIG_SYN_CMOS9SF + if {$tmpvar_0 == "IBM-CMOS9SF"} then {set CONFIG_SYN_CMOS9SF 1} else {set CONFIG_SYN_CMOS9SF 0} + global CONFIG_SYN_CUSTOM1 + if {$tmpvar_0 == "Custom1"} then {set CONFIG_SYN_CUSTOM1 1} else {set CONFIG_SYN_CUSTOM1 0} + global CONFIG_SYN_EASIC90 + if {$tmpvar_0 == "eASIC90"} then {set CONFIG_SYN_EASIC90 1} else {set CONFIG_SYN_EASIC90 0} + global CONFIG_SYN_EASIC45 + if {$tmpvar_0 == "eASIC45"} then {set CONFIG_SYN_EASIC45 1} else {set CONFIG_SYN_EASIC45 0} + global CONFIG_SYN_IHP25 + if {$tmpvar_0 == "IHP25"} then {set CONFIG_SYN_IHP25 1} else {set CONFIG_SYN_IHP25 0} + global CONFIG_SYN_IHP25RH + if {$tmpvar_0 == "IHP25RH"} then {set CONFIG_SYN_IHP25RH 1} else {set CONFIG_SYN_IHP25RH 0} + global CONFIG_SYN_LATTICE + if {$tmpvar_0 == "Lattice-EC/ECP/XP"} then {set CONFIG_SYN_LATTICE 1} else {set CONFIG_SYN_LATTICE 0} + global CONFIG_SYN_ECLIPSE + if {$tmpvar_0 == "Quicklogic-Eclipse"} then {set CONFIG_SYN_ECLIPSE 1} else {set CONFIG_SYN_ECLIPSE 0} + global CONFIG_SYN_PEREGRINE + if {$tmpvar_0 == "Peregrine"} then {set CONFIG_SYN_PEREGRINE 1} else {set CONFIG_SYN_PEREGRINE 0} + global CONFIG_SYN_RH_LIB18T + if {$tmpvar_0 == "RH-LIB18T"} then {set CONFIG_SYN_RH_LIB18T 1} else {set CONFIG_SYN_RH_LIB18T 0} + global CONFIG_SYN_RHUMC + if {$tmpvar_0 == "RH-UMC"} then {set CONFIG_SYN_RHUMC 1} else {set CONFIG_SYN_RHUMC 0} + global CONFIG_SYN_SMIC13 + if {$tmpvar_0 == "SMIC130"} then {set CONFIG_SYN_SMIC13 1} else {set CONFIG_SYN_SMIC13 0} + global CONFIG_SYN_TM65GPLUS + if {$tmpvar_0 == "TM65Gplus"} then {set CONFIG_SYN_TM65GPLUS 1} else {set CONFIG_SYN_TM65GPLUS 0} + global CONFIG_SYN_TSMC90 + if {$tmpvar_0 == "TSMC90"} then {set CONFIG_SYN_TSMC90 1} else {set CONFIG_SYN_TSMC90 0} + global CONFIG_SYN_UMC + if {$tmpvar_0 == "UMC180"} then {set CONFIG_SYN_UMC 1} else {set CONFIG_SYN_UMC 0} + global CONFIG_SYN_SPARTAN2 + if {$tmpvar_0 == "Xilinx-Spartan2"} then {set CONFIG_SYN_SPARTAN2 1} else {set CONFIG_SYN_SPARTAN2 0} + global CONFIG_SYN_SPARTAN3 + if {$tmpvar_0 == "Xilinx-Spartan3"} then {set CONFIG_SYN_SPARTAN3 1} else {set CONFIG_SYN_SPARTAN3 0} + global CONFIG_SYN_SPARTAN3E + if {$tmpvar_0 == "Xilinx-Spartan3E"} then {set CONFIG_SYN_SPARTAN3E 1} else {set CONFIG_SYN_SPARTAN3E 0} + global CONFIG_SYN_SPARTAN6 + if {$tmpvar_0 == "Xilinx-Spartan6"} then {set CONFIG_SYN_SPARTAN6 1} else {set CONFIG_SYN_SPARTAN6 0} + global CONFIG_SYN_VIRTEX + if {$tmpvar_0 == "Xilinx-Virtex"} then {set CONFIG_SYN_VIRTEX 1} else {set CONFIG_SYN_VIRTEX 0} + global CONFIG_SYN_VIRTEXE + if {$tmpvar_0 == "Xilinx-VirtexE"} then {set CONFIG_SYN_VIRTEXE 1} else {set CONFIG_SYN_VIRTEXE 0} + global CONFIG_SYN_VIRTEX2 + if {$tmpvar_0 == "Xilinx-Virtex2"} then {set CONFIG_SYN_VIRTEX2 1} else {set CONFIG_SYN_VIRTEX2 0} + global CONFIG_SYN_VIRTEX4 + if {$tmpvar_0 == "Xilinx-Virtex4"} then {set CONFIG_SYN_VIRTEX4 1} else {set CONFIG_SYN_VIRTEX4 0} + global CONFIG_SYN_VIRTEX5 + if {$tmpvar_0 == "Xilinx-Virtex5"} then {set CONFIG_SYN_VIRTEX5 1} else {set CONFIG_SYN_VIRTEX5 0} + global CONFIG_SYN_VIRTEX6 + if {$tmpvar_0 == "Xilinx-Virtex6"} then {set CONFIG_SYN_VIRTEX6 1} else {set CONFIG_SYN_VIRTEX6 0} + global tmpvar_1 + global CONFIG_MEM_INFERRED + if {$tmpvar_1 == "Inferred"} then {set CONFIG_MEM_INFERRED 1} else {set CONFIG_MEM_INFERRED 0} + global CONFIG_MEM_UMC + if {$tmpvar_1 == "UMC18"} then {set CONFIG_MEM_UMC 1} else {set CONFIG_MEM_UMC 0} + global CONFIG_MEM_RHUMC + if {$tmpvar_1 == "RH-UMC"} then {set CONFIG_MEM_RHUMC 1} else {set CONFIG_MEM_RHUMC 0} + global CONFIG_MEM_ARTISAN + if {$tmpvar_1 == "Artisan"} then {set CONFIG_MEM_ARTISAN 1} else {set CONFIG_MEM_ARTISAN 0} + global CONFIG_MEM_CUSTOM1 + if {$tmpvar_1 == "Custom1"} then {set CONFIG_MEM_CUSTOM1 1} else {set CONFIG_MEM_CUSTOM1 0} + global CONFIG_MEM_VIRAGE + if {$tmpvar_1 == "Virage"} then {set CONFIG_MEM_VIRAGE 1} else {set CONFIG_MEM_VIRAGE 0} + global CONFIG_MEM_VIRAGE90 + if {$tmpvar_1 == "Virage-TSMC90"} then {set CONFIG_MEM_VIRAGE90 1} else {set CONFIG_MEM_VIRAGE90 0} + global CONFIG_SYN_INFER_RAM + if {($CONFIG_SYN_INFERRED != 1)} then { + set CONFIG_SYN_INFER_RAM [expr $CONFIG_SYN_INFER_RAM&15]} else {set CONFIG_SYN_INFER_RAM [expr $CONFIG_SYN_INFER_RAM|16]} + global CONFIG_SYN_INFER_PADS + if {($CONFIG_SYN_INFERRED != 1)} then { + set CONFIG_SYN_INFER_PADS [expr $CONFIG_SYN_INFER_PADS&15]} else {set CONFIG_SYN_INFER_PADS [expr $CONFIG_SYN_INFER_PADS|16]} +} + + +menu_option menu2 2 "Clock generation" +proc menu2 {w title} { + set oldFocus [focus] + catch {destroy $w; unregister_active 2} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 2]] + message $w.m -width 400 -aspect 300 -text \ + "Clock generation" -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Clock generation" + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 2; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 2; menu3 .menu3 \"$title\"" + frame $w.f + button $w.f.back -text "Main Menu" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 2" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 2; menu1 .menu1 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 2; menu1 .menu1 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + global tmpvar_2 + minimenu $w.config.f 2 0 "Clock generator " tmpvar_2 CONFIG_CLK_INFERRED + menu $w.config.f.x0.x.menu -tearoffcommand "menutitle \"Clock generator \"" + $w.config.f.x0.x.menu add radiobutton -label "Inferred" -variable tmpvar_2 -value "Inferred" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Actel-HCLKBUF" -variable tmpvar_2 -value "Actel-HCLKBUF" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Aeroflex-UT130HBD" -variable tmpvar_2 -value "Aeroflex-UT130HBD" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Altera-ALTPLL" -variable tmpvar_2 -value "Altera-ALTPLL" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Lattice-EXPLL" -variable tmpvar_2 -value "Lattice-EXPLL" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Proasic3-PLL" -variable tmpvar_2 -value "Proasic3-PLL" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Proasic3E-PLL" -variable tmpvar_2 -value "Proasic3E-PLL" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Proasic3L-PLL" -variable tmpvar_2 -value "Proasic3L-PLL" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Fusion-PLL" -variable tmpvar_2 -value "Fusion-PLL" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "RH-LIB18T-PLL" -variable tmpvar_2 -value "RH-LIB18T-PLL" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "DARE-PLL" -variable tmpvar_2 -value "DARE-PLL" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Xilinx-CLKDLL" -variable tmpvar_2 -value "Xilinx-CLKDLL" -command "update_active" + $w.config.f.x0.x.menu add radiobutton -label "Xilinx-DCM" -variable tmpvar_2 -value "Xilinx-DCM" -command "update_active" + menusplit $w $w.config.f.x0.x.menu 13 + int $w.config.f 2 1 "Clock multiplication factor (allowed values are tech dependent)" CONFIG_CLK_MUL + int $w.config.f 2 2 "Clock division factor (allowed values are tech dependent)" CONFIG_CLK_DIV + int $w.config.f 2 3 "Outout division factor (1 - 32)" CONFIG_OCLK_DIV + int $w.config.f 2 4 "Outout division factor, 2nd clk (0 - 32, see help)" CONFIG_OCLKB_DIV + int $w.config.f 2 5 "Outout division factor, 3rd clk (0 - 32, see help)" CONFIG_OCLKC_DIV + bool $w.config.f 2 6 "Enable Xilinx CLKDLL for PCI clock" CONFIG_PCI_CLKDLL + bool $w.config.f 2 7 "Disable external feedback for SDRAM clock" CONFIG_CLK_NOFB + bool $w.config.f 2 8 "Use PCI clock as system clock" CONFIG_PCI_SYSCLK + + + + focus $w + update_active + global winx; global winy + set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu2 {} { + global CONFIG_CLK_DCM + global CONFIG_CLK_ALTDLL + global CONFIG_CLK_LATDLL + global CONFIG_CLK_PRO3PLL + global CONFIG_CLK_PRO3EPLL + global CONFIG_CLK_PRO3LPLL + global CONFIG_CLK_CLKDLL + global CONFIG_CLK_LIB18T + global CONFIG_CLK_FUSPLL + global CONFIG_CLK_MUL + 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} + global CONFIG_CLK_DIV + 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} + global CONFIG_OCLK_DIV + 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} + global CONFIG_OCLKB_DIV + 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} + global CONFIG_OCLKC_DIV + 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} + global CONFIG_PCI_CLKDLL + if {($CONFIG_CLK_CLKDLL == 1 || $CONFIG_CLK_DCM == 1)} then { + configure_entry .menu2.config.f.x6 normal {n l y}} else {configure_entry .menu2.config.f.x6 disabled {y n l}} + global CONFIG_CLK_NOFB + if {($CONFIG_CLK_DCM == 1)} then { + configure_entry .menu2.config.f.x7 normal {n l y}} else {configure_entry .menu2.config.f.x7 disabled {y n l}} + global CONFIG_PCI_ENABLE + global CONFIG_PCI_SYSCLK + if {($CONFIG_PCI_ENABLE != 1)} then { + configure_entry .menu2.config.f.x8 normal {n l y}} else {configure_entry .menu2.config.f.x8 disabled {y n l}} +} + + +proc update_define_menu2 {} { + update_define_mainmenu + global CONFIG_MODULES + global tmpvar_2 + global CONFIG_CLK_INFERRED + if {$tmpvar_2 == "Inferred"} then {set CONFIG_CLK_INFERRED 1} else {set CONFIG_CLK_INFERRED 0} + global CONFIG_CLK_HCLKBUF + if {$tmpvar_2 == "Actel-HCLKBUF"} then {set CONFIG_CLK_HCLKBUF 1} else {set CONFIG_CLK_HCLKBUF 0} + global CONFIG_CLK_UT130HBD + if {$tmpvar_2 == "Aeroflex-UT130HBD"} then {set CONFIG_CLK_UT130HBD 1} else {set CONFIG_CLK_UT130HBD 0} + global CONFIG_CLK_ALTDLL + if {$tmpvar_2 == "Altera-ALTPLL"} then {set CONFIG_CLK_ALTDLL 1} else {set CONFIG_CLK_ALTDLL 0} + global CONFIG_CLK_LATDLL + if {$tmpvar_2 == "Lattice-EXPLL"} then {set CONFIG_CLK_LATDLL 1} else {set CONFIG_CLK_LATDLL 0} + global CONFIG_CLK_PRO3PLL + if {$tmpvar_2 == "Proasic3-PLL"} then {set CONFIG_CLK_PRO3PLL 1} else {set CONFIG_CLK_PRO3PLL 0} + global CONFIG_CLK_PRO3EPLL + if {$tmpvar_2 == "Proasic3E-PLL"} then {set CONFIG_CLK_PRO3EPLL 1} else {set CONFIG_CLK_PRO3EPLL 0} + global CONFIG_CLK_PRO3LPLL + if {$tmpvar_2 == "Proasic3L-PLL"} then {set CONFIG_CLK_PRO3LPLL 1} else {set CONFIG_CLK_PRO3LPLL 0} + global CONFIG_CLK_FUSPLL + if {$tmpvar_2 == "Fusion-PLL"} then {set CONFIG_CLK_FUSPLL 1} else {set CONFIG_CLK_FUSPLL 0} + global CONFIG_CLK_LIB18T + if {$tmpvar_2 == "RH-LIB18T-PLL"} then {set CONFIG_CLK_LIB18T 1} else {set CONFIG_CLK_LIB18T 0} + global CONFIG_CLK_RHUMC + if {$tmpvar_2 == "DARE-PLL"} then {set CONFIG_CLK_RHUMC 1} else {set CONFIG_CLK_RHUMC 0} + global CONFIG_CLK_CLKDLL + if {$tmpvar_2 == "Xilinx-CLKDLL"} then {set CONFIG_CLK_CLKDLL 1} else {set CONFIG_CLK_CLKDLL 0} + global CONFIG_CLK_DCM + if {$tmpvar_2 == "Xilinx-DCM"} then {set CONFIG_CLK_DCM 1} else {set CONFIG_CLK_DCM 0} + global CONFIG_CLK_MUL + 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} + global CONFIG_CLK_DIV + 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} + global CONFIG_OCLK_DIV + 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} + global CONFIG_OCLKB_DIV + 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} + global CONFIG_OCLKC_DIV + 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} + global CONFIG_PCI_CLKDLL + if {($CONFIG_CLK_CLKDLL == 1 || $CONFIG_CLK_DCM == 1)} then { + set CONFIG_PCI_CLKDLL [expr $CONFIG_PCI_CLKDLL&15]} else {set CONFIG_PCI_CLKDLL [expr $CONFIG_PCI_CLKDLL|16]} + global CONFIG_CLK_NOFB + if {($CONFIG_CLK_DCM == 1)} then { + set CONFIG_CLK_NOFB [expr $CONFIG_CLK_NOFB&15]} else {set CONFIG_CLK_NOFB [expr $CONFIG_CLK_NOFB|16]} + global CONFIG_PCI_ENABLE + global CONFIG_PCI_SYSCLK + if {($CONFIG_PCI_ENABLE != 1)} then { + set CONFIG_PCI_SYSCLK [expr $CONFIG_PCI_SYSCLK&15]} else {set CONFIG_PCI_SYSCLK [expr $CONFIG_PCI_SYSCLK|16]} +} + + +menu_option menu3 3 "Processor " +proc menu3 {w title} { + set oldFocus [focus] + catch {destroy $w; unregister_active 3} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 3]] + message $w.m -width 400 -aspect 300 -text \ + "Processor " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Processor " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 3; break" + set nextscript "catch {focus $oldFocus}; menu4 .menu4 \"$title\"" + frame $w.f + button $w.f.back -text "Main Menu" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 3" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 3; menu2 .menu2 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 3; menu2 .menu2 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 3 0 "Enable LEON3 SPARC V8 Processor" CONFIG_LEON3 + int $w.config.f 3 1 "Number of processors" CONFIG_PROC_NUM + submenu $w.config.f 3 2 "Integer unit " 4 + submenu $w.config.f 3 3 "Floating-point unit" 5 + submenu $w.config.f 3 4 "Cache system" 6 + submenu $w.config.f 3 5 "MMU" 7 + submenu $w.config.f 3 6 "Debug Support Unit " 8 + submenu $w.config.f 3 7 "Fault-tolerance " 9 + submenu $w.config.f 3 8 "VHDL debug settings " 10 + + + + focus $w + update_active + global winx; global winy + set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu3 {} { + global CONFIG_LEON3 + global CONFIG_PROC_NUM + 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} + if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x2 normal {m}} else {configure_entry .menu3.config.f.x2 disabled {m}} + if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x3 normal {m}} else {configure_entry .menu3.config.f.x3 disabled {m}} + if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x4 normal {m}} else {configure_entry .menu3.config.f.x4 disabled {m}} + if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x5 normal {m}} else {configure_entry .menu3.config.f.x5 disabled {m}} + if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x6 normal {m}} else {configure_entry .menu3.config.f.x6 disabled {m}} + if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x7 normal {m}} else {configure_entry .menu3.config.f.x7 disabled {m}} + if {($CONFIG_LEON3 == 1)} then {configure_entry .menu3.config.f.x8 normal {m}} else {configure_entry .menu3.config.f.x8 disabled {m}} +} + + +proc update_define_menu3 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_LEON3 + global CONFIG_PROC_NUM + if {($CONFIG_LEON3 == 1)} then {validate_int CONFIG_PROC_NUM "$CONFIG_PROC_NUM" 1} +} + + +proc menu4 {w title} { + set oldFocus [focus] + catch {focus .menu3} + catch {destroy $w; unregister_active 4} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 4]] + message $w.m -width 400 -aspect 300 -text \ + "Integer unit " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Integer unit " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 4; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 4; menu5 .menu5 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 4" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 4; menu3 .menu3 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 4; menu3 .menu3 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + int $w.config.f 4 0 "SPARC register windows" CONFIG_IU_NWINDOWS + bool $w.config.f 4 1 "SPARC V8 MUL/DIV instructions" CONFIG_IU_V8MULDIV + global tmpvar_3 + minimenu $w.config.f 4 2 "Hardware multiplier latency" tmpvar_3 CONFIG_IU_MUL_LATENCY_2 + menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"Hardware multiplier latency\"" + $w.config.f.x2.x.menu add radiobutton -label "2-cycles" -variable tmpvar_3 -value "2-cycles" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "4-cycles" -variable tmpvar_3 -value "4-cycles" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "5-cycles" -variable tmpvar_3 -value "5-cycles" -command "update_active" + menusplit $w $w.config.f.x2.x.menu 3 + bool $w.config.f 4 3 "SPARC V8e SMAC/UMAC instructions " CONFIG_IU_MUL_MAC + global tmpvar_4 + minimenu $w.config.f 4 4 "Multipler structure " tmpvar_4 CONFIG_IU_MUL_INFERRED + menu $w.config.f.x4.x.menu -tearoffcommand "menutitle \"Multipler structure \"" + $w.config.f.x4.x.menu add radiobutton -label "Inferred" -variable tmpvar_4 -value "Inferred" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "NTNU_Modgen" -variable tmpvar_4 -value "NTNU_Modgen" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "TechSpec" -variable tmpvar_4 -value "TechSpec" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "Designware" -variable tmpvar_4 -value "Designware" -command "update_active" + menusplit $w $w.config.f.x4.x.menu 4 + bool $w.config.f 4 5 "Branch prediction " CONFIG_IU_BP + bool $w.config.f 4 6 "Single-vector trapping" CONFIG_IU_SVT + bool $w.config.f 4 7 "Disable tagged ADD/SUB and CASA" CONFIG_NOTAG + int $w.config.f 4 8 "Load delay" CONFIG_IU_LDELAY + int $w.config.f 4 9 "Hardware watchpoints" CONFIG_IU_WATCHPOINTS + bool $w.config.f 4 10 "Enable power-down mode " CONFIG_PWD + hex $w.config.f 4 11 " Reset start address (addr\[31:12\]) " CONFIG_IU_RSTADDR + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "} + set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu4 {} { + global CONFIG_LEON3 + global CONFIG_IU_NWINDOWS + 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} + global CONFIG_IU_V8MULDIV + if {($CONFIG_LEON3 == 1)} then { + configure_entry .menu4.config.f.x1 normal {n l y}} else {configure_entry .menu4.config.f.x1 disabled {y n l}} + 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}} + global CONFIG_IU_MUL_LATENCY_4 + global CONFIG_IU_MUL_LATENCY_5 + global CONFIG_IU_MUL_MAC + if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_V8MULDIV == 1) && ($CONFIG_IU_MUL_LATENCY_4 == 1 || $CONFIG_IU_MUL_LATENCY_5 == 1)} then { + configure_entry .menu4.config.f.x3 normal {n l y}} else {configure_entry .menu4.config.f.x3 disabled {y n l}} + 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}} + global CONFIG_IU_BP + if {($CONFIG_LEON3 == 1)} then { + configure_entry .menu4.config.f.x5 normal {n l y}} else {configure_entry .menu4.config.f.x5 disabled {y n l}} + global CONFIG_IU_SVT + if {($CONFIG_LEON3 == 1)} then { + configure_entry .menu4.config.f.x6 normal {n l y}} else {configure_entry .menu4.config.f.x6 disabled {y n l}} + global CONFIG_NOTAG + if {($CONFIG_LEON3 == 1)} then { + configure_entry .menu4.config.f.x7 normal {n l y}} else {configure_entry .menu4.config.f.x7 disabled {y n l}} + global CONFIG_IU_LDELAY + 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} + global CONFIG_IU_WATCHPOINTS + 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} + global CONFIG_PWD + if {($CONFIG_LEON3 == 1)} then { + configure_entry .menu4.config.f.x10 normal {n l y}} else {configure_entry .menu4.config.f.x10 disabled {y n l}} + global CONFIG_IU_RSTADDR + 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} +} + + +proc update_define_menu4 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_LEON3 + global CONFIG_IU_NWINDOWS + if {($CONFIG_LEON3 == 1)} then {validate_int CONFIG_IU_NWINDOWS "$CONFIG_IU_NWINDOWS" 8} + global CONFIG_IU_V8MULDIV + if {($CONFIG_LEON3 == 1)} then { + set CONFIG_IU_V8MULDIV [expr $CONFIG_IU_V8MULDIV&15]} else {set CONFIG_IU_V8MULDIV [expr $CONFIG_IU_V8MULDIV|16]} + global tmpvar_3 + global CONFIG_IU_MUL_LATENCY_2 + if {$tmpvar_3 == "2-cycles"} then {set CONFIG_IU_MUL_LATENCY_2 1} else {set CONFIG_IU_MUL_LATENCY_2 0} + global CONFIG_IU_MUL_LATENCY_4 + if {$tmpvar_3 == "4-cycles"} then {set CONFIG_IU_MUL_LATENCY_4 1} else {set CONFIG_IU_MUL_LATENCY_4 0} + global CONFIG_IU_MUL_LATENCY_5 + if {$tmpvar_3 == "5-cycles"} then {set CONFIG_IU_MUL_LATENCY_5 1} else {set CONFIG_IU_MUL_LATENCY_5 0} + global CONFIG_IU_MUL_MAC + if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_V8MULDIV == 1) && ($CONFIG_IU_MUL_LATENCY_4 == 1 || $CONFIG_IU_MUL_LATENCY_5 == 1)} then { + set CONFIG_IU_MUL_MAC [expr $CONFIG_IU_MUL_MAC&15]} else {set CONFIG_IU_MUL_MAC [expr $CONFIG_IU_MUL_MAC|16]} + global tmpvar_4 + global CONFIG_IU_MUL_INFERRED + if {$tmpvar_4 == "Inferred"} then {set CONFIG_IU_MUL_INFERRED 1} else {set CONFIG_IU_MUL_INFERRED 0} + global CONFIG_IU_MUL_MODGEN + if {$tmpvar_4 == "NTNU_Modgen"} then {set CONFIG_IU_MUL_MODGEN 1} else {set CONFIG_IU_MUL_MODGEN 0} + global CONFIG_IU_MUL_TECHSPEC + if {$tmpvar_4 == "TechSpec"} then {set CONFIG_IU_MUL_TECHSPEC 1} else {set CONFIG_IU_MUL_TECHSPEC 0} + global CONFIG_IU_MUL_DW + if {$tmpvar_4 == "Designware"} then {set CONFIG_IU_MUL_DW 1} else {set CONFIG_IU_MUL_DW 0} + global CONFIG_IU_BP + if {($CONFIG_LEON3 == 1)} then { + set CONFIG_IU_BP [expr $CONFIG_IU_BP&15]} else {set CONFIG_IU_BP [expr $CONFIG_IU_BP|16]} + global CONFIG_IU_SVT + if {($CONFIG_LEON3 == 1)} then { + set CONFIG_IU_SVT [expr $CONFIG_IU_SVT&15]} else {set CONFIG_IU_SVT [expr $CONFIG_IU_SVT|16]} + global CONFIG_NOTAG + if {($CONFIG_LEON3 == 1)} then { + set CONFIG_NOTAG [expr $CONFIG_NOTAG&15]} else {set CONFIG_NOTAG [expr $CONFIG_NOTAG|16]} + global CONFIG_IU_LDELAY + if {($CONFIG_LEON3 == 1)} then {validate_int CONFIG_IU_LDELAY "$CONFIG_IU_LDELAY" 1} + global CONFIG_IU_WATCHPOINTS + if {($CONFIG_LEON3 == 1)} then {validate_int CONFIG_IU_WATCHPOINTS "$CONFIG_IU_WATCHPOINTS" 0} + global CONFIG_PWD + if {($CONFIG_LEON3 == 1)} then { + set CONFIG_PWD [expr $CONFIG_PWD&15]} else {set CONFIG_PWD [expr $CONFIG_PWD|16]} + global CONFIG_IU_RSTADDR + if {($CONFIG_LEON3 == 1)} then {validate_hex CONFIG_IU_RSTADDR "$CONFIG_IU_RSTADDR" 00000} +} + + +proc menu5 {w title} { + set oldFocus [focus] + catch {focus .menu3} + catch {destroy $w; unregister_active 5} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 5]] + message $w.m -width 400 -aspect 300 -text \ + "Floating-point unit" -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Floating-point unit" + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 5; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 5; menu6 .menu6 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 5" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 5; menu4 .menu4 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 5; menu4 .menu4 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 5 0 "Enable FPU " CONFIG_FPU_ENABLE + global tmpvar_5 + minimenu $w.config.f 5 1 "FPU core" tmpvar_5 CONFIG_FPU_GRFPU + menu $w.config.f.x1.x.menu -tearoffcommand "menutitle \"FPU core\"" + $w.config.f.x1.x.menu add radiobutton -label "GRFPU" -variable tmpvar_5 -value "GRFPU" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "GRFPU-LITE" -variable tmpvar_5 -value "GRFPU-LITE" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "Meiko" -variable tmpvar_5 -value "Meiko" -command "update_active" + menusplit $w $w.config.f.x1.x.menu 3 + global tmpvar_6 + minimenu $w.config.f 5 2 "GRFPU multiplier" tmpvar_6 CONFIG_FPU_GRFPU_INFMUL + menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"GRFPU multiplier\"" + $w.config.f.x2.x.menu add radiobutton -label "Inferred" -variable tmpvar_6 -value "Inferred" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "DW" -variable tmpvar_6 -value "DW" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "ModGen" -variable tmpvar_6 -value "ModGen" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "TechSpec" -variable tmpvar_6 -value "TechSpec" -command "update_active" + menusplit $w $w.config.f.x2.x.menu 4 + bool $w.config.f 5 3 "Shared GRFPU " CONFIG_FPU_GRFPU_SH + global tmpvar_7 + minimenu $w.config.f 5 4 "GRFPU-LITE controller" tmpvar_7 CONFIG_FPU_GRFPC0 + menu $w.config.f.x4.x.menu -tearoffcommand "menutitle \"GRFPU-LITE controller\"" + $w.config.f.x4.x.menu add radiobutton -label "Simple" -variable tmpvar_7 -value "Simple" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "Data-forwarding" -variable tmpvar_7 -value "Data-forwarding" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "Non-blocking" -variable tmpvar_7 -value "Non-blocking" -command "update_active" + menusplit $w $w.config.f.x4.x.menu 3 + bool $w.config.f 5 5 "Use VHDL netlist " CONFIG_FPU_NETLIST + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "} + set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu5 {} { + global CONFIG_LEON3 + global CONFIG_FPU_ENABLE + if {($CONFIG_LEON3 == 1)} then { + configure_entry .menu5.config.f.x0 normal {n l y}} else {configure_entry .menu5.config.f.x0 disabled {y n l}} + 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}} + global CONFIG_FPU_GRFPU + 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}} + global CONFIG_HAS_SHARED_GRFPU + global CONFIG_FPU_GRFPU_SH + if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1) && ($CONFIG_HAS_SHARED_GRFPU == 1 && $CONFIG_FPU_GRFPU == 1)} then { + configure_entry .menu5.config.f.x3 normal {n l y}} else {configure_entry .menu5.config.f.x3 disabled {y n l}} + global CONFIG_FPU_GRFPULITE + 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}} + global CONFIG_FPU_NETLIST + if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1)} then { + configure_entry .menu5.config.f.x5 normal {n l y}} else {configure_entry .menu5.config.f.x5 disabled {y n l}} +} + + +proc update_define_menu5 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_LEON3 + global CONFIG_FPU_ENABLE + if {($CONFIG_LEON3 == 1)} then { + set CONFIG_FPU_ENABLE [expr $CONFIG_FPU_ENABLE&15]} else {set CONFIG_FPU_ENABLE [expr $CONFIG_FPU_ENABLE|16]} + global tmpvar_5 + global CONFIG_FPU_GRFPU + if {$tmpvar_5 == "GRFPU"} then {set CONFIG_FPU_GRFPU 1} else {set CONFIG_FPU_GRFPU 0} + global CONFIG_FPU_GRFPULITE + if {$tmpvar_5 == "GRFPU-LITE"} then {set CONFIG_FPU_GRFPULITE 1} else {set CONFIG_FPU_GRFPULITE 0} + global CONFIG_FPU_MEIKO + if {$tmpvar_5 == "Meiko"} then {set CONFIG_FPU_MEIKO 1} else {set CONFIG_FPU_MEIKO 0} + global tmpvar_6 + global CONFIG_FPU_GRFPU_INFMUL + if {$tmpvar_6 == "Inferred"} then {set CONFIG_FPU_GRFPU_INFMUL 1} else {set CONFIG_FPU_GRFPU_INFMUL 0} + global CONFIG_FPU_GRFPU_DWMUL + if {$tmpvar_6 == "DW"} then {set CONFIG_FPU_GRFPU_DWMUL 1} else {set CONFIG_FPU_GRFPU_DWMUL 0} + global CONFIG_FPU_GRFPU_MODGEN + if {$tmpvar_6 == "ModGen"} then {set CONFIG_FPU_GRFPU_MODGEN 1} else {set CONFIG_FPU_GRFPU_MODGEN 0} + global CONFIG_FPU_GRFPU_TECHSPEC + if {$tmpvar_6 == "TechSpec"} then {set CONFIG_FPU_GRFPU_TECHSPEC 1} else {set CONFIG_FPU_GRFPU_TECHSPEC 0} + global CONFIG_HAS_SHARED_GRFPU + global CONFIG_FPU_GRFPU_SH + if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1) && ($CONFIG_HAS_SHARED_GRFPU == 1 && $CONFIG_FPU_GRFPU == 1)} then { + set CONFIG_FPU_GRFPU_SH [expr $CONFIG_FPU_GRFPU_SH&15]} else {set CONFIG_FPU_GRFPU_SH [expr $CONFIG_FPU_GRFPU_SH|16]} + global tmpvar_7 + global CONFIG_FPU_GRFPC0 + if {$tmpvar_7 == "Simple"} then {set CONFIG_FPU_GRFPC0 1} else {set CONFIG_FPU_GRFPC0 0} + global CONFIG_FPU_GRFPC1 + if {$tmpvar_7 == "Data-forwarding"} then {set CONFIG_FPU_GRFPC1 1} else {set CONFIG_FPU_GRFPC1 0} + global CONFIG_FPU_GRFPC2 + if {$tmpvar_7 == "Non-blocking"} then {set CONFIG_FPU_GRFPC2 1} else {set CONFIG_FPU_GRFPC2 0} + global CONFIG_FPU_NETLIST + if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1)} then { + set CONFIG_FPU_NETLIST [expr $CONFIG_FPU_NETLIST&15]} else {set CONFIG_FPU_NETLIST [expr $CONFIG_FPU_NETLIST|16]} +} + + +proc menu6 {w title} { + set oldFocus [focus] + catch {focus .menu3} + catch {destroy $w; unregister_active 6} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 6]] + message $w.m -width 400 -aspect 300 -text \ + "Cache system" -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Cache system" + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 6; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 6; menu7 .menu7 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 6" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 6; menu5 .menu5 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 6; menu5 .menu5 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 6 0 "Enable instruction cache " CONFIG_ICACHE_ENABLE + global tmpvar_8 + minimenu $w.config.f 6 1 "Associativity (sets) " tmpvar_8 CONFIG_ICACHE_ASSO1 + menu $w.config.f.x1.x.menu -tearoffcommand "menutitle \"Associativity (sets) \"" + $w.config.f.x1.x.menu add radiobutton -label "1" -variable tmpvar_8 -value "1" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "2" -variable tmpvar_8 -value "2" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "3" -variable tmpvar_8 -value "3" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "4" -variable tmpvar_8 -value "4" -command "update_active" + menusplit $w $w.config.f.x1.x.menu 4 + global tmpvar_9 + minimenu $w.config.f 6 2 "Way size (kbytes/way)" tmpvar_9 CONFIG_ICACHE_SZ1 + menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"Way size (kbytes/way)\"" + $w.config.f.x2.x.menu add radiobutton -label "1" -variable tmpvar_9 -value "1" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "2" -variable tmpvar_9 -value "2" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "4" -variable tmpvar_9 -value "4" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "8" -variable tmpvar_9 -value "8" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "16" -variable tmpvar_9 -value "16" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "32" -variable tmpvar_9 -value "32" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "64" -variable tmpvar_9 -value "64" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "128" -variable tmpvar_9 -value "128" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "256" -variable tmpvar_9 -value "256" -command "update_active" + menusplit $w $w.config.f.x2.x.menu 9 + global tmpvar_10 + minimenu $w.config.f 6 3 "Line size (bytes/line)" tmpvar_10 CONFIG_ICACHE_LZ16 + menu $w.config.f.x3.x.menu -tearoffcommand "menutitle \"Line size (bytes/line)\"" + $w.config.f.x3.x.menu add radiobutton -label "16" -variable tmpvar_10 -value "16" -command "update_active" + $w.config.f.x3.x.menu add radiobutton -label "32" -variable tmpvar_10 -value "32" -command "update_active" + menusplit $w $w.config.f.x3.x.menu 2 + global tmpvar_11 + minimenu $w.config.f 6 4 "Replacement alorithm" tmpvar_11 CONFIG_ICACHE_ALGORND + menu $w.config.f.x4.x.menu -tearoffcommand "menutitle \"Replacement alorithm\"" + $w.config.f.x4.x.menu add radiobutton -label "Random" -variable tmpvar_11 -value "Random" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "Direct" -variable tmpvar_11 -value "Direct" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "LRR" -variable tmpvar_11 -value "LRR" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "LRU" -variable tmpvar_11 -value "LRU" -command "update_active" + menusplit $w $w.config.f.x4.x.menu 4 + bool $w.config.f 6 5 "Cache locking " CONFIG_ICACHE_LOCK + bool $w.config.f 6 6 "Enable local instruction RAM " CONFIG_ICACHE_LRAM + global tmpvar_12 + minimenu $w.config.f 6 7 "Local data RAM size (kbytes)" tmpvar_12 CONFIG_ICACHE_LRAM_SZ1 + menu $w.config.f.x7.x.menu -tearoffcommand "menutitle \"Local data RAM size (kbytes)\"" + $w.config.f.x7.x.menu add radiobutton -label "1" -variable tmpvar_12 -value "1" -command "update_active" + $w.config.f.x7.x.menu add radiobutton -label "2" -variable tmpvar_12 -value "2" -command "update_active" + $w.config.f.x7.x.menu add radiobutton -label "4" -variable tmpvar_12 -value "4" -command "update_active" + $w.config.f.x7.x.menu add radiobutton -label "8" -variable tmpvar_12 -value "8" -command "update_active" + $w.config.f.x7.x.menu add radiobutton -label "16" -variable tmpvar_12 -value "16" -command "update_active" + $w.config.f.x7.x.menu add radiobutton -label "32" -variable tmpvar_12 -value "32" -command "update_active" + $w.config.f.x7.x.menu add radiobutton -label "64" -variable tmpvar_12 -value "64" -command "update_active" + $w.config.f.x7.x.menu add radiobutton -label "128" -variable tmpvar_12 -value "128" -command "update_active" + $w.config.f.x7.x.menu add radiobutton -label "256" -variable tmpvar_12 -value "256" -command "update_active" + menusplit $w $w.config.f.x7.x.menu 9 + hex $w.config.f 6 8 " Local instruction RAM start address (8 MSB) " CONFIG_ICACHE_LRSTART + bool $w.config.f 6 9 "Enable data cache " CONFIG_DCACHE_ENABLE + global tmpvar_13 + minimenu $w.config.f 6 10 "Associativity (sets)" tmpvar_13 CONFIG_DCACHE_ASSO1 + menu $w.config.f.x10.x.menu -tearoffcommand "menutitle \"Associativity (sets)\"" + $w.config.f.x10.x.menu add radiobutton -label "1" -variable tmpvar_13 -value "1" -command "update_active" + $w.config.f.x10.x.menu add radiobutton -label "2" -variable tmpvar_13 -value "2" -command "update_active" + $w.config.f.x10.x.menu add radiobutton -label "3" -variable tmpvar_13 -value "3" -command "update_active" + $w.config.f.x10.x.menu add radiobutton -label "4" -variable tmpvar_13 -value "4" -command "update_active" + menusplit $w $w.config.f.x10.x.menu 4 + global tmpvar_14 + minimenu $w.config.f 6 11 "Set size (kbytes/set)" tmpvar_14 CONFIG_DCACHE_SZ1 + menu $w.config.f.x11.x.menu -tearoffcommand "menutitle \"Set size (kbytes/set)\"" + $w.config.f.x11.x.menu add radiobutton -label "1" -variable tmpvar_14 -value "1" -command "update_active" + $w.config.f.x11.x.menu add radiobutton -label "2" -variable tmpvar_14 -value "2" -command "update_active" + $w.config.f.x11.x.menu add radiobutton -label "4" -variable tmpvar_14 -value "4" -command "update_active" + $w.config.f.x11.x.menu add radiobutton -label "8" -variable tmpvar_14 -value "8" -command "update_active" + $w.config.f.x11.x.menu add radiobutton -label "16" -variable tmpvar_14 -value "16" -command "update_active" + $w.config.f.x11.x.menu add radiobutton -label "32" -variable tmpvar_14 -value "32" -command "update_active" + $w.config.f.x11.x.menu add radiobutton -label "64" -variable tmpvar_14 -value "64" -command "update_active" + $w.config.f.x11.x.menu add radiobutton -label "128" -variable tmpvar_14 -value "128" -command "update_active" + $w.config.f.x11.x.menu add radiobutton -label "256" -variable tmpvar_14 -value "256" -command "update_active" + menusplit $w $w.config.f.x11.x.menu 9 + global tmpvar_15 + minimenu $w.config.f 6 12 "Line size (bytes/line)" tmpvar_15 CONFIG_DCACHE_LZ16 + menu $w.config.f.x12.x.menu -tearoffcommand "menutitle \"Line size (bytes/line)\"" + $w.config.f.x12.x.menu add radiobutton -label "16" -variable tmpvar_15 -value "16" -command "update_active" + $w.config.f.x12.x.menu add radiobutton -label "32" -variable tmpvar_15 -value "32" -command "update_active" + menusplit $w $w.config.f.x12.x.menu 2 + global tmpvar_16 + minimenu $w.config.f 6 13 "Replacement alorithm" tmpvar_16 CONFIG_DCACHE_ALGORND + menu $w.config.f.x13.x.menu -tearoffcommand "menutitle \"Replacement alorithm\"" + $w.config.f.x13.x.menu add radiobutton -label "Random" -variable tmpvar_16 -value "Random" -command "update_active" + $w.config.f.x13.x.menu add radiobutton -label "Direct" -variable tmpvar_16 -value "Direct" -command "update_active" + $w.config.f.x13.x.menu add radiobutton -label "LRR" -variable tmpvar_16 -value "LRR" -command "update_active" + $w.config.f.x13.x.menu add radiobutton -label "LRU" -variable tmpvar_16 -value "LRU" -command "update_active" + menusplit $w $w.config.f.x13.x.menu 4 + bool $w.config.f 6 14 "Cache locking " CONFIG_DCACHE_LOCK + bool $w.config.f 6 15 "AHB snooping " CONFIG_DCACHE_SNOOP + bool $w.config.f 6 16 "Fast snooping " CONFIG_DCACHE_SNOOP_FAST + bool $w.config.f 6 17 "Separate snoop tags " CONFIG_DCACHE_SNOOP_SEPTAG + hex $w.config.f 6 18 "Fixed cacheability map " CONFIG_CACHE_FIXED + bool $w.config.f 6 19 "Enable local data RAM " CONFIG_DCACHE_LRAM + global tmpvar_17 + minimenu $w.config.f 6 20 "Local data RAM size (kbytes)" tmpvar_17 CONFIG_DCACHE_LRAM_SZ1 + menu $w.config.f.x20.x.menu -tearoffcommand "menutitle \"Local data RAM size (kbytes)\"" + $w.config.f.x20.x.menu add radiobutton -label "1" -variable tmpvar_17 -value "1" -command "update_active" + $w.config.f.x20.x.menu add radiobutton -label "2" -variable tmpvar_17 -value "2" -command "update_active" + $w.config.f.x20.x.menu add radiobutton -label "4" -variable tmpvar_17 -value "4" -command "update_active" + $w.config.f.x20.x.menu add radiobutton -label "8" -variable tmpvar_17 -value "8" -command "update_active" + $w.config.f.x20.x.menu add radiobutton -label "16" -variable tmpvar_17 -value "16" -command "update_active" + $w.config.f.x20.x.menu add radiobutton -label "32" -variable tmpvar_17 -value "32" -command "update_active" + $w.config.f.x20.x.menu add radiobutton -label "64" -variable tmpvar_17 -value "64" -command "update_active" + $w.config.f.x20.x.menu add radiobutton -label "128" -variable tmpvar_17 -value "128" -command "update_active" + $w.config.f.x20.x.menu add radiobutton -label "256" -variable tmpvar_17 -value "256" -command "update_active" + menusplit $w $w.config.f.x20.x.menu 9 + hex $w.config.f 6 21 " Local data RAM start address (8 MSB) " CONFIG_DCACHE_LRSTART + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "} + set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu6 {} { + global CONFIG_LEON3 + global CONFIG_ICACHE_ENABLE + if {($CONFIG_LEON3 == 1)} then { + configure_entry .menu6.config.f.x0 normal {n l y}} else {configure_entry .menu6.config.f.x0 disabled {y n l}} + 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}} + 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}} + 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}} + global CONFIG_ICACHE_ASSO1 + 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}} + global CONFIG_ICACHE_LOCK + if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1) && ($CONFIG_ICACHE_ASSO1 != 1)} then { + configure_entry .menu6.config.f.x5 normal {n l y}} else {configure_entry .menu6.config.f.x5 disabled {y n l}} + global CONFIG_MMU_ENABLE + global CONFIG_ICACHE_LRAM + if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE != 1)} then { + configure_entry .menu6.config.f.x6 normal {n l y}} else {configure_entry .menu6.config.f.x6 disabled {y n l}} + 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}} + global CONFIG_ICACHE_LRSTART + 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} + global CONFIG_DCACHE_ENABLE + if {($CONFIG_LEON3 == 1)} then { + configure_entry .menu6.config.f.x9 normal {n l y}} else {configure_entry .menu6.config.f.x9 disabled {y n l}} + 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}} + 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}} + 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}} + global CONFIG_DCACHE_ASSO1 + 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}} + global CONFIG_DCACHE_LOCK + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_ASSO1 != 1)} then { + configure_entry .menu6.config.f.x14 normal {n l y}} else {configure_entry .menu6.config.f.x14 disabled {y n l}} + global CONFIG_DCACHE_SNOOP + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then { + configure_entry .menu6.config.f.x15 normal {n l y}} else {configure_entry .menu6.config.f.x15 disabled {y n l}} + global CONFIG_DCACHE_SNOOP_FAST + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_SNOOP == 1)} then { + configure_entry .menu6.config.f.x16 normal {n l y}} else {configure_entry .menu6.config.f.x16 disabled {y n l}} + global CONFIG_DCACHE_SNOOP_SEPTAG + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_SNOOP == 1)} then { + configure_entry .menu6.config.f.x17 normal {n l y}} else {configure_entry .menu6.config.f.x17 disabled {y n l}} + global CONFIG_CACHE_FIXED + 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} + global CONFIG_DCACHE_LRAM + if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE != 1)} then { + configure_entry .menu6.config.f.x19 normal {n l y}} else {configure_entry .menu6.config.f.x19 disabled {y n l}} + 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}} + global CONFIG_DCACHE_LRSTART + 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} +} + + +proc update_define_menu6 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_LEON3 + global CONFIG_ICACHE_ENABLE + if {($CONFIG_LEON3 == 1)} then { + set CONFIG_ICACHE_ENABLE [expr $CONFIG_ICACHE_ENABLE&15]} else {set CONFIG_ICACHE_ENABLE [expr $CONFIG_ICACHE_ENABLE|16]} + global tmpvar_8 + global CONFIG_ICACHE_ASSO1 + if {$tmpvar_8 == "1"} then {set CONFIG_ICACHE_ASSO1 1} else {set CONFIG_ICACHE_ASSO1 0} + global CONFIG_ICACHE_ASSO2 + if {$tmpvar_8 == "2"} then {set CONFIG_ICACHE_ASSO2 1} else {set CONFIG_ICACHE_ASSO2 0} + global CONFIG_ICACHE_ASSO3 + if {$tmpvar_8 == "3"} then {set CONFIG_ICACHE_ASSO3 1} else {set CONFIG_ICACHE_ASSO3 0} + global CONFIG_ICACHE_ASSO4 + if {$tmpvar_8 == "4"} then {set CONFIG_ICACHE_ASSO4 1} else {set CONFIG_ICACHE_ASSO4 0} + global tmpvar_9 + global CONFIG_ICACHE_SZ1 + if {$tmpvar_9 == "1"} then {set CONFIG_ICACHE_SZ1 1} else {set CONFIG_ICACHE_SZ1 0} + global CONFIG_ICACHE_SZ2 + if {$tmpvar_9 == "2"} then {set CONFIG_ICACHE_SZ2 1} else {set CONFIG_ICACHE_SZ2 0} + global CONFIG_ICACHE_SZ4 + if {$tmpvar_9 == "4"} then {set CONFIG_ICACHE_SZ4 1} else {set CONFIG_ICACHE_SZ4 0} + global CONFIG_ICACHE_SZ8 + if {$tmpvar_9 == "8"} then {set CONFIG_ICACHE_SZ8 1} else {set CONFIG_ICACHE_SZ8 0} + global CONFIG_ICACHE_SZ16 + if {$tmpvar_9 == "16"} then {set CONFIG_ICACHE_SZ16 1} else {set CONFIG_ICACHE_SZ16 0} + global CONFIG_ICACHE_SZ32 + if {$tmpvar_9 == "32"} then {set CONFIG_ICACHE_SZ32 1} else {set CONFIG_ICACHE_SZ32 0} + global CONFIG_ICACHE_SZ64 + if {$tmpvar_9 == "64"} then {set CONFIG_ICACHE_SZ64 1} else {set CONFIG_ICACHE_SZ64 0} + global CONFIG_ICACHE_SZ128 + if {$tmpvar_9 == "128"} then {set CONFIG_ICACHE_SZ128 1} else {set CONFIG_ICACHE_SZ128 0} + global CONFIG_ICACHE_SZ256 + if {$tmpvar_9 == "256"} then {set CONFIG_ICACHE_SZ256 1} else {set CONFIG_ICACHE_SZ256 0} + global tmpvar_10 + global CONFIG_ICACHE_LZ16 + if {$tmpvar_10 == "16"} then {set CONFIG_ICACHE_LZ16 1} else {set CONFIG_ICACHE_LZ16 0} + global CONFIG_ICACHE_LZ32 + if {$tmpvar_10 == "32"} then {set CONFIG_ICACHE_LZ32 1} else {set CONFIG_ICACHE_LZ32 0} + global tmpvar_11 + global CONFIG_ICACHE_ALGORND + if {$tmpvar_11 == "Random"} then {set CONFIG_ICACHE_ALGORND 1} else {set CONFIG_ICACHE_ALGORND 0} + global CONFIG_ICACHE_ALGODIR + if {$tmpvar_11 == "Direct"} then {set CONFIG_ICACHE_ALGODIR 1} else {set CONFIG_ICACHE_ALGODIR 0} + global CONFIG_ICACHE_ALGOLRR + if {$tmpvar_11 == "LRR"} then {set CONFIG_ICACHE_ALGOLRR 1} else {set CONFIG_ICACHE_ALGOLRR 0} + global CONFIG_ICACHE_ALGOLRU + if {$tmpvar_11 == "LRU"} then {set CONFIG_ICACHE_ALGOLRU 1} else {set CONFIG_ICACHE_ALGOLRU 0} + global CONFIG_ICACHE_LOCK + if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1) && ($CONFIG_ICACHE_ASSO1 != 1)} then { + set CONFIG_ICACHE_LOCK [expr $CONFIG_ICACHE_LOCK&15]} else {set CONFIG_ICACHE_LOCK [expr $CONFIG_ICACHE_LOCK|16]} + global CONFIG_MMU_ENABLE + global CONFIG_ICACHE_LRAM + if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE != 1)} then { + set CONFIG_ICACHE_LRAM [expr $CONFIG_ICACHE_LRAM&15]} else {set CONFIG_ICACHE_LRAM [expr $CONFIG_ICACHE_LRAM|16]} + global tmpvar_12 + global CONFIG_ICACHE_LRAM_SZ1 + if {$tmpvar_12 == "1"} then {set CONFIG_ICACHE_LRAM_SZ1 1} else {set CONFIG_ICACHE_LRAM_SZ1 0} + global CONFIG_ICACHE_LRAM_SZ2 + if {$tmpvar_12 == "2"} then {set CONFIG_ICACHE_LRAM_SZ2 1} else {set CONFIG_ICACHE_LRAM_SZ2 0} + global CONFIG_ICACHE_LRAM_SZ4 + if {$tmpvar_12 == "4"} then {set CONFIG_ICACHE_LRAM_SZ4 1} else {set CONFIG_ICACHE_LRAM_SZ4 0} + global CONFIG_ICACHE_LRAM_SZ8 + if {$tmpvar_12 == "8"} then {set CONFIG_ICACHE_LRAM_SZ8 1} else {set CONFIG_ICACHE_LRAM_SZ8 0} + global CONFIG_ICACHE_LRAM_SZ16 + if {$tmpvar_12 == "16"} then {set CONFIG_ICACHE_LRAM_SZ16 1} else {set CONFIG_ICACHE_LRAM_SZ16 0} + global CONFIG_ICACHE_LRAM_SZ32 + if {$tmpvar_12 == "32"} then {set CONFIG_ICACHE_LRAM_SZ32 1} else {set CONFIG_ICACHE_LRAM_SZ32 0} + global CONFIG_ICACHE_LRAM_SZ64 + if {$tmpvar_12 == "64"} then {set CONFIG_ICACHE_LRAM_SZ64 1} else {set CONFIG_ICACHE_LRAM_SZ64 0} + global CONFIG_ICACHE_LRAM_SZ128 + if {$tmpvar_12 == "128"} then {set CONFIG_ICACHE_LRAM_SZ128 1} else {set CONFIG_ICACHE_LRAM_SZ128 0} + global CONFIG_ICACHE_LRAM_SZ256 + if {$tmpvar_12 == "256"} then {set CONFIG_ICACHE_LRAM_SZ256 1} else {set CONFIG_ICACHE_LRAM_SZ256 0} + global CONFIG_ICACHE_LRSTART + if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_LRAM == 1)} then {validate_hex CONFIG_ICACHE_LRSTART "$CONFIG_ICACHE_LRSTART" 8e} + global CONFIG_DCACHE_ENABLE + if {($CONFIG_LEON3 == 1)} then { + set CONFIG_DCACHE_ENABLE [expr $CONFIG_DCACHE_ENABLE&15]} else {set CONFIG_DCACHE_ENABLE [expr $CONFIG_DCACHE_ENABLE|16]} + global tmpvar_13 + global CONFIG_DCACHE_ASSO1 + if {$tmpvar_13 == "1"} then {set CONFIG_DCACHE_ASSO1 1} else {set CONFIG_DCACHE_ASSO1 0} + global CONFIG_DCACHE_ASSO2 + if {$tmpvar_13 == "2"} then {set CONFIG_DCACHE_ASSO2 1} else {set CONFIG_DCACHE_ASSO2 0} + global CONFIG_DCACHE_ASSO3 + if {$tmpvar_13 == "3"} then {set CONFIG_DCACHE_ASSO3 1} else {set CONFIG_DCACHE_ASSO3 0} + global CONFIG_DCACHE_ASSO4 + if {$tmpvar_13 == "4"} then {set CONFIG_DCACHE_ASSO4 1} else {set CONFIG_DCACHE_ASSO4 0} + global tmpvar_14 + global CONFIG_DCACHE_SZ1 + if {$tmpvar_14 == "1"} then {set CONFIG_DCACHE_SZ1 1} else {set CONFIG_DCACHE_SZ1 0} + global CONFIG_DCACHE_SZ2 + if {$tmpvar_14 == "2"} then {set CONFIG_DCACHE_SZ2 1} else {set CONFIG_DCACHE_SZ2 0} + global CONFIG_DCACHE_SZ4 + if {$tmpvar_14 == "4"} then {set CONFIG_DCACHE_SZ4 1} else {set CONFIG_DCACHE_SZ4 0} + global CONFIG_DCACHE_SZ8 + if {$tmpvar_14 == "8"} then {set CONFIG_DCACHE_SZ8 1} else {set CONFIG_DCACHE_SZ8 0} + global CONFIG_DCACHE_SZ16 + if {$tmpvar_14 == "16"} then {set CONFIG_DCACHE_SZ16 1} else {set CONFIG_DCACHE_SZ16 0} + global CONFIG_DCACHE_SZ32 + if {$tmpvar_14 == "32"} then {set CONFIG_DCACHE_SZ32 1} else {set CONFIG_DCACHE_SZ32 0} + global CONFIG_DCACHE_SZ64 + if {$tmpvar_14 == "64"} then {set CONFIG_DCACHE_SZ64 1} else {set CONFIG_DCACHE_SZ64 0} + global CONFIG_DCACHE_SZ128 + if {$tmpvar_14 == "128"} then {set CONFIG_DCACHE_SZ128 1} else {set CONFIG_DCACHE_SZ128 0} + global CONFIG_DCACHE_SZ256 + if {$tmpvar_14 == "256"} then {set CONFIG_DCACHE_SZ256 1} else {set CONFIG_DCACHE_SZ256 0} + global tmpvar_15 + global CONFIG_DCACHE_LZ16 + if {$tmpvar_15 == "16"} then {set CONFIG_DCACHE_LZ16 1} else {set CONFIG_DCACHE_LZ16 0} + global CONFIG_DCACHE_LZ32 + if {$tmpvar_15 == "32"} then {set CONFIG_DCACHE_LZ32 1} else {set CONFIG_DCACHE_LZ32 0} + global tmpvar_16 + global CONFIG_DCACHE_ALGORND + if {$tmpvar_16 == "Random"} then {set CONFIG_DCACHE_ALGORND 1} else {set CONFIG_DCACHE_ALGORND 0} + global CONFIG_DCACHE_ALGODIR + if {$tmpvar_16 == "Direct"} then {set CONFIG_DCACHE_ALGODIR 1} else {set CONFIG_DCACHE_ALGODIR 0} + global CONFIG_DCACHE_ALGOLRR + if {$tmpvar_16 == "LRR"} then {set CONFIG_DCACHE_ALGOLRR 1} else {set CONFIG_DCACHE_ALGOLRR 0} + global CONFIG_DCACHE_ALGOLRU + if {$tmpvar_16 == "LRU"} then {set CONFIG_DCACHE_ALGOLRU 1} else {set CONFIG_DCACHE_ALGOLRU 0} + global CONFIG_DCACHE_LOCK + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_ASSO1 != 1)} then { + set CONFIG_DCACHE_LOCK [expr $CONFIG_DCACHE_LOCK&15]} else {set CONFIG_DCACHE_LOCK [expr $CONFIG_DCACHE_LOCK|16]} + global CONFIG_DCACHE_SNOOP + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then { + set CONFIG_DCACHE_SNOOP [expr $CONFIG_DCACHE_SNOOP&15]} else {set CONFIG_DCACHE_SNOOP [expr $CONFIG_DCACHE_SNOOP|16]} + global CONFIG_DCACHE_SNOOP_FAST + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_SNOOP == 1)} then { + set CONFIG_DCACHE_SNOOP_FAST [expr $CONFIG_DCACHE_SNOOP_FAST&15]} else {set CONFIG_DCACHE_SNOOP_FAST [expr $CONFIG_DCACHE_SNOOP_FAST|16]} + global CONFIG_DCACHE_SNOOP_SEPTAG + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_SNOOP == 1)} then { + set CONFIG_DCACHE_SNOOP_SEPTAG [expr $CONFIG_DCACHE_SNOOP_SEPTAG&15]} else {set CONFIG_DCACHE_SNOOP_SEPTAG [expr $CONFIG_DCACHE_SNOOP_SEPTAG|16]} + global CONFIG_CACHE_FIXED + if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1 || $CONFIG_DCACHE_ENABLE == 1)} then {validate_hex CONFIG_CACHE_FIXED "$CONFIG_CACHE_FIXED" 0} + global CONFIG_DCACHE_LRAM + if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE != 1)} then { + set CONFIG_DCACHE_LRAM [expr $CONFIG_DCACHE_LRAM&15]} else {set CONFIG_DCACHE_LRAM [expr $CONFIG_DCACHE_LRAM|16]} + global tmpvar_17 + global CONFIG_DCACHE_LRAM_SZ1 + if {$tmpvar_17 == "1"} then {set CONFIG_DCACHE_LRAM_SZ1 1} else {set CONFIG_DCACHE_LRAM_SZ1 0} + global CONFIG_DCACHE_LRAM_SZ2 + if {$tmpvar_17 == "2"} then {set CONFIG_DCACHE_LRAM_SZ2 1} else {set CONFIG_DCACHE_LRAM_SZ2 0} + global CONFIG_DCACHE_LRAM_SZ4 + if {$tmpvar_17 == "4"} then {set CONFIG_DCACHE_LRAM_SZ4 1} else {set CONFIG_DCACHE_LRAM_SZ4 0} + global CONFIG_DCACHE_LRAM_SZ8 + if {$tmpvar_17 == "8"} then {set CONFIG_DCACHE_LRAM_SZ8 1} else {set CONFIG_DCACHE_LRAM_SZ8 0} + global CONFIG_DCACHE_LRAM_SZ16 + if {$tmpvar_17 == "16"} then {set CONFIG_DCACHE_LRAM_SZ16 1} else {set CONFIG_DCACHE_LRAM_SZ16 0} + global CONFIG_DCACHE_LRAM_SZ32 + if {$tmpvar_17 == "32"} then {set CONFIG_DCACHE_LRAM_SZ32 1} else {set CONFIG_DCACHE_LRAM_SZ32 0} + global CONFIG_DCACHE_LRAM_SZ64 + if {$tmpvar_17 == "64"} then {set CONFIG_DCACHE_LRAM_SZ64 1} else {set CONFIG_DCACHE_LRAM_SZ64 0} + global CONFIG_DCACHE_LRAM_SZ128 + if {$tmpvar_17 == "128"} then {set CONFIG_DCACHE_LRAM_SZ128 1} else {set CONFIG_DCACHE_LRAM_SZ128 0} + global CONFIG_DCACHE_LRAM_SZ256 + if {$tmpvar_17 == "256"} then {set CONFIG_DCACHE_LRAM_SZ256 1} else {set CONFIG_DCACHE_LRAM_SZ256 0} + global CONFIG_DCACHE_LRSTART + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_LRAM == 1)} then {validate_hex CONFIG_DCACHE_LRSTART "$CONFIG_DCACHE_LRSTART" 8f} +} + + +proc menu7 {w title} { + set oldFocus [focus] + catch {focus .menu3} + catch {destroy $w; unregister_active 7} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 7]] + message $w.m -width 400 -aspect 300 -text \ + "MMU" -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "MMU" + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 7; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 7; menu8 .menu8 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 7" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 7; menu6 .menu6 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 7; menu6 .menu6 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 7 0 "Enable MMU " CONFIG_MMU_ENABLE + global tmpvar_18 + minimenu $w.config.f 7 1 "MMU type " tmpvar_18 CONFIG_MMU_COMBINED + menu $w.config.f.x1.x.menu -tearoffcommand "menutitle \"MMU type \"" + $w.config.f.x1.x.menu add radiobutton -label "combined" -variable tmpvar_18 -value "combined" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "split" -variable tmpvar_18 -value "split" -command "update_active" + menusplit $w $w.config.f.x1.x.menu 2 + global tmpvar_19 + minimenu $w.config.f 7 2 "TLB replacement sheme " tmpvar_19 CONFIG_MMU_REPARRAY + menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"TLB replacement sheme \"" + $w.config.f.x2.x.menu add radiobutton -label "LRU" -variable tmpvar_19 -value "LRU" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "Increment" -variable tmpvar_19 -value "Increment" -command "update_active" + menusplit $w $w.config.f.x2.x.menu 2 + global tmpvar_20 + minimenu $w.config.f 7 3 "Instruction (or combined) TLB entries" tmpvar_20 CONFIG_MMU_I2 + menu $w.config.f.x3.x.menu -tearoffcommand "menutitle \"Instruction (or combined) TLB entries\"" + $w.config.f.x3.x.menu add radiobutton -label "2" -variable tmpvar_20 -value "2" -command "update_active" + $w.config.f.x3.x.menu add radiobutton -label "4" -variable tmpvar_20 -value "4" -command "update_active" + $w.config.f.x3.x.menu add radiobutton -label "8" -variable tmpvar_20 -value "8" -command "update_active" + $w.config.f.x3.x.menu add radiobutton -label "16" -variable tmpvar_20 -value "16" -command "update_active" + $w.config.f.x3.x.menu add radiobutton -label "32" -variable tmpvar_20 -value "32" -command "update_active" + menusplit $w $w.config.f.x3.x.menu 5 + global tmpvar_21 + minimenu $w.config.f 7 4 "Data TLB entries" tmpvar_21 CONFIG_MMU_D2 + menu $w.config.f.x4.x.menu -tearoffcommand "menutitle \"Data TLB entries\"" + $w.config.f.x4.x.menu add radiobutton -label "2" -variable tmpvar_21 -value "2" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "4" -variable tmpvar_21 -value "4" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "8" -variable tmpvar_21 -value "8" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "16" -variable tmpvar_21 -value "16" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "32" -variable tmpvar_21 -value "32" -command "update_active" + menusplit $w $w.config.f.x4.x.menu 5 + bool $w.config.f 7 5 "Fast writebuffer " CONFIG_MMU_FASTWB + global tmpvar_22 + minimenu $w.config.f 7 6 "MMU page size" tmpvar_22 CONFIG_MMU_PAGE_4K + menu $w.config.f.x6.x.menu -tearoffcommand "menutitle \"MMU page size\"" + $w.config.f.x6.x.menu add radiobutton -label "4K" -variable tmpvar_22 -value "4K" -command "update_active" + $w.config.f.x6.x.menu add radiobutton -label "8K" -variable tmpvar_22 -value "8K" -command "update_active" + $w.config.f.x6.x.menu add radiobutton -label "16K" -variable tmpvar_22 -value "16K" -command "update_active" + $w.config.f.x6.x.menu add radiobutton -label "32K" -variable tmpvar_22 -value "32K" -command "update_active" + $w.config.f.x6.x.menu add radiobutton -label "Programmable" -variable tmpvar_22 -value "Programmable" -command "update_active" + menusplit $w $w.config.f.x6.x.menu 5 + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "} + set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu7 {} { + global CONFIG_LEON3 + global CONFIG_MMU_ENABLE + if {($CONFIG_LEON3 == 1)} then { + configure_entry .menu7.config.f.x0 normal {n l y}} else {configure_entry .menu7.config.f.x0 disabled {y n l}} + 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}} + 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}} + 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}} + global CONFIG_MMU_SPLIT + 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}} + global CONFIG_MMU_FASTWB + if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1) && ($CONFIG_MMU_SPLIT == 1)} then { + configure_entry .menu7.config.f.x5 normal {n l y}} else {configure_entry .menu7.config.f.x5 disabled {y n l}} + 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}} +} + + +proc update_define_menu7 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_LEON3 + global CONFIG_MMU_ENABLE + if {($CONFIG_LEON3 == 1)} then { + set CONFIG_MMU_ENABLE [expr $CONFIG_MMU_ENABLE&15]} else {set CONFIG_MMU_ENABLE [expr $CONFIG_MMU_ENABLE|16]} + global tmpvar_18 + global CONFIG_MMU_COMBINED + if {$tmpvar_18 == "combined"} then {set CONFIG_MMU_COMBINED 1} else {set CONFIG_MMU_COMBINED 0} + global CONFIG_MMU_SPLIT + if {$tmpvar_18 == "split"} then {set CONFIG_MMU_SPLIT 1} else {set CONFIG_MMU_SPLIT 0} + global tmpvar_19 + global CONFIG_MMU_REPARRAY + if {$tmpvar_19 == "LRU"} then {set CONFIG_MMU_REPARRAY 1} else {set CONFIG_MMU_REPARRAY 0} + global CONFIG_MMU_REPINCREMENT + if {$tmpvar_19 == "Increment"} then {set CONFIG_MMU_REPINCREMENT 1} else {set CONFIG_MMU_REPINCREMENT 0} + global tmpvar_20 + global CONFIG_MMU_I2 + if {$tmpvar_20 == "2"} then {set CONFIG_MMU_I2 1} else {set CONFIG_MMU_I2 0} + global CONFIG_MMU_I4 + if {$tmpvar_20 == "4"} then {set CONFIG_MMU_I4 1} else {set CONFIG_MMU_I4 0} + global CONFIG_MMU_I8 + if {$tmpvar_20 == "8"} then {set CONFIG_MMU_I8 1} else {set CONFIG_MMU_I8 0} + global CONFIG_MMU_I16 + if {$tmpvar_20 == "16"} then {set CONFIG_MMU_I16 1} else {set CONFIG_MMU_I16 0} + global CONFIG_MMU_I32 + if {$tmpvar_20 == "32"} then {set CONFIG_MMU_I32 1} else {set CONFIG_MMU_I32 0} + global tmpvar_21 + global CONFIG_MMU_D2 + if {$tmpvar_21 == "2"} then {set CONFIG_MMU_D2 1} else {set CONFIG_MMU_D2 0} + global CONFIG_MMU_D4 + if {$tmpvar_21 == "4"} then {set CONFIG_MMU_D4 1} else {set CONFIG_MMU_D4 0} + global CONFIG_MMU_D8 + if {$tmpvar_21 == "8"} then {set CONFIG_MMU_D8 1} else {set CONFIG_MMU_D8 0} + global CONFIG_MMU_D16 + if {$tmpvar_21 == "16"} then {set CONFIG_MMU_D16 1} else {set CONFIG_MMU_D16 0} + global CONFIG_MMU_D32 + if {$tmpvar_21 == "32"} then {set CONFIG_MMU_D32 1} else {set CONFIG_MMU_D32 0} + global CONFIG_MMU_FASTWB + if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1) && ($CONFIG_MMU_SPLIT == 1)} then { + set CONFIG_MMU_FASTWB [expr $CONFIG_MMU_FASTWB&15]} else {set CONFIG_MMU_FASTWB [expr $CONFIG_MMU_FASTWB|16]} + global tmpvar_22 + global CONFIG_MMU_PAGE_4K + if {$tmpvar_22 == "4K"} then {set CONFIG_MMU_PAGE_4K 1} else {set CONFIG_MMU_PAGE_4K 0} + global CONFIG_MMU_PAGE_8K + if {$tmpvar_22 == "8K"} then {set CONFIG_MMU_PAGE_8K 1} else {set CONFIG_MMU_PAGE_8K 0} + global CONFIG_MMU_PAGE_16K + if {$tmpvar_22 == "16K"} then {set CONFIG_MMU_PAGE_16K 1} else {set CONFIG_MMU_PAGE_16K 0} + global CONFIG_MMU_PAGE_32K + if {$tmpvar_22 == "32K"} then {set CONFIG_MMU_PAGE_32K 1} else {set CONFIG_MMU_PAGE_32K 0} + global CONFIG_MMU_PAGE_PROG + if {$tmpvar_22 == "Programmable"} then {set CONFIG_MMU_PAGE_PROG 1} else {set CONFIG_MMU_PAGE_PROG 0} +} + + +proc menu8 {w title} { + set oldFocus [focus] + catch {focus .menu3} + catch {destroy $w; unregister_active 8} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 8]] + message $w.m -width 400 -aspect 300 -text \ + "Debug Support Unit " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Debug Support Unit " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 8; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 8; menu9 .menu9 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 8" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 8; menu7 .menu7 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 8; menu7 .menu7 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 8 0 "Enable LEON3 Debug support unit " CONFIG_DSU_ENABLE + bool $w.config.f 8 1 "Instruction trace buffer" CONFIG_DSU_ITRACE + global tmpvar_23 + minimenu $w.config.f 8 2 "Instruction trace buffer size (kbytes)" tmpvar_23 CONFIG_DSU_ITRACESZ1 + menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"Instruction trace buffer size (kbytes)\"" + $w.config.f.x2.x.menu add radiobutton -label "1" -variable tmpvar_23 -value "1" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "2" -variable tmpvar_23 -value "2" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "4" -variable tmpvar_23 -value "4" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "8" -variable tmpvar_23 -value "8" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "16" -variable tmpvar_23 -value "16" -command "update_active" + menusplit $w $w.config.f.x2.x.menu 5 + bool $w.config.f 8 3 "AHB trace buffer" CONFIG_DSU_ATRACE + global tmpvar_24 + minimenu $w.config.f 8 4 "AHB trace buffer size (kbytes)" tmpvar_24 CONFIG_DSU_ATRACESZ1 + menu $w.config.f.x4.x.menu -tearoffcommand "menutitle \"AHB trace buffer size (kbytes)\"" + $w.config.f.x4.x.menu add radiobutton -label "1" -variable tmpvar_24 -value "1" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "2" -variable tmpvar_24 -value "2" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "4" -variable tmpvar_24 -value "4" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "8" -variable tmpvar_24 -value "8" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "16" -variable tmpvar_24 -value "16" -command "update_active" + menusplit $w $w.config.f.x4.x.menu 5 + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "} + set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu8 {} { + global CONFIG_LEON3 + global CONFIG_DSU_ENABLE + if {($CONFIG_LEON3 == 1)} then { + configure_entry .menu8.config.f.x0 normal {n l y}} else {configure_entry .menu8.config.f.x0 disabled {y n l}} + global CONFIG_DSU_ITRACE + if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1)} then { + configure_entry .menu8.config.f.x1 normal {n l y}} else {configure_entry .menu8.config.f.x1 disabled {y n l}} + 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}} + global CONFIG_DSU_ATRACE + if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1)} then { + configure_entry .menu8.config.f.x3 normal {n l y}} else {configure_entry .menu8.config.f.x3 disabled {y n l}} + 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}} +} + + +proc update_define_menu8 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_LEON3 + global CONFIG_DSU_ENABLE + if {($CONFIG_LEON3 == 1)} then { + set CONFIG_DSU_ENABLE [expr $CONFIG_DSU_ENABLE&15]} else {set CONFIG_DSU_ENABLE [expr $CONFIG_DSU_ENABLE|16]} + global CONFIG_DSU_ITRACE + if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1)} then { + set CONFIG_DSU_ITRACE [expr $CONFIG_DSU_ITRACE&15]} else {set CONFIG_DSU_ITRACE [expr $CONFIG_DSU_ITRACE|16]} + global tmpvar_23 + global CONFIG_DSU_ITRACESZ1 + if {$tmpvar_23 == "1"} then {set CONFIG_DSU_ITRACESZ1 1} else {set CONFIG_DSU_ITRACESZ1 0} + global CONFIG_DSU_ITRACESZ2 + if {$tmpvar_23 == "2"} then {set CONFIG_DSU_ITRACESZ2 1} else {set CONFIG_DSU_ITRACESZ2 0} + global CONFIG_DSU_ITRACESZ4 + if {$tmpvar_23 == "4"} then {set CONFIG_DSU_ITRACESZ4 1} else {set CONFIG_DSU_ITRACESZ4 0} + global CONFIG_DSU_ITRACESZ8 + if {$tmpvar_23 == "8"} then {set CONFIG_DSU_ITRACESZ8 1} else {set CONFIG_DSU_ITRACESZ8 0} + global CONFIG_DSU_ITRACESZ16 + if {$tmpvar_23 == "16"} then {set CONFIG_DSU_ITRACESZ16 1} else {set CONFIG_DSU_ITRACESZ16 0} + global CONFIG_DSU_ATRACE + if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1)} then { + set CONFIG_DSU_ATRACE [expr $CONFIG_DSU_ATRACE&15]} else {set CONFIG_DSU_ATRACE [expr $CONFIG_DSU_ATRACE|16]} + global tmpvar_24 + global CONFIG_DSU_ATRACESZ1 + if {$tmpvar_24 == "1"} then {set CONFIG_DSU_ATRACESZ1 1} else {set CONFIG_DSU_ATRACESZ1 0} + global CONFIG_DSU_ATRACESZ2 + if {$tmpvar_24 == "2"} then {set CONFIG_DSU_ATRACESZ2 1} else {set CONFIG_DSU_ATRACESZ2 0} + global CONFIG_DSU_ATRACESZ4 + if {$tmpvar_24 == "4"} then {set CONFIG_DSU_ATRACESZ4 1} else {set CONFIG_DSU_ATRACESZ4 0} + global CONFIG_DSU_ATRACESZ8 + if {$tmpvar_24 == "8"} then {set CONFIG_DSU_ATRACESZ8 1} else {set CONFIG_DSU_ATRACESZ8 0} + global CONFIG_DSU_ATRACESZ16 + if {$tmpvar_24 == "16"} then {set CONFIG_DSU_ATRACESZ16 1} else {set CONFIG_DSU_ATRACESZ16 0} +} + + +proc menu9 {w title} { + set oldFocus [focus] + catch {focus .menu3} + catch {destroy $w; unregister_active 9} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 9]] + message $w.m -width 400 -aspect 300 -text \ + "Fault-tolerance " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Fault-tolerance " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 9; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 9; menu10 .menu10 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 9" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 9; menu8 .menu8 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 9; menu8 .menu8 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 9 0 "Use LEON3-FT processor core " CONFIG_LEON3FT_EN + global tmpvar_25 + minimenu $w.config.f 9 1 "IU Register file protection " tmpvar_25 CONFIG_IUFT_NONE + menu $w.config.f.x1.x.menu -tearoffcommand "menutitle \"IU Register file protection \"" + $w.config.f.x1.x.menu add radiobutton -label "None" -variable tmpvar_25 -value "None" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "Parity" -variable tmpvar_25 -value "Parity" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "PDMR" -variable tmpvar_25 -value "PDMR" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "BCH" -variable tmpvar_25 -value "BCH" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "TMR" -variable tmpvar_25 -value "TMR" -command "update_active" + menusplit $w $w.config.f.x1.x.menu 5 + bool $w.config.f 9 2 "FPU Register file protection " CONFIG_FPUFT_EN + bool $w.config.f 9 3 "Register file error injection" CONFIG_RF_ERRINJ + bool $w.config.f 9 4 "Cache memory protection " CONFIG_CACHE_FT_EN + int $w.config.f 9 5 "Cache memory error injection" CONFIG_CACHE_ERRINJ + bool $w.config.f 9 6 "Use LEON3FT netlist " CONFIG_LEON3_NETLIST + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "} + set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu9 {} { + global CONFIG_LEON3 + global CONFIG_LEON3FT_EN + if {($CONFIG_LEON3 == 1)} then { + configure_entry .menu9.config.f.x0 normal {n l y}} else {configure_entry .menu9.config.f.x0 disabled {y n l}} + 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}} + global CONFIG_FPU_ENABLE + global CONFIG_FPUFT_EN + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1) && ($CONFIG_FPU_ENABLE == 1)} then { + configure_entry .menu9.config.f.x2 normal {n l y}} else {configure_entry .menu9.config.f.x2 disabled {y n l}} + global CONFIG_RF_ERRINJ + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then { + configure_entry .menu9.config.f.x3 normal {n l y}} else {configure_entry .menu9.config.f.x3 disabled {y n l}} + global CONFIG_CACHE_FT_EN + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then { + configure_entry .menu9.config.f.x4 normal {n l y}} else {configure_entry .menu9.config.f.x4 disabled {y n l}} + global CONFIG_CACHE_ERRINJ + 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} + global CONFIG_LEON3_NETLIST + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then { + configure_entry .menu9.config.f.x6 normal {n l y}} else {configure_entry .menu9.config.f.x6 disabled {y n l}} +} + + +proc update_define_menu9 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_LEON3 + global CONFIG_LEON3FT_EN + if {($CONFIG_LEON3 == 1)} then { + set CONFIG_LEON3FT_EN [expr $CONFIG_LEON3FT_EN&15]} else {set CONFIG_LEON3FT_EN [expr $CONFIG_LEON3FT_EN|16]} + global tmpvar_25 + global CONFIG_IUFT_NONE + if {$tmpvar_25 == "None"} then {set CONFIG_IUFT_NONE 1} else {set CONFIG_IUFT_NONE 0} + global CONFIG_IUFT_PAR + if {$tmpvar_25 == "Parity"} then {set CONFIG_IUFT_PAR 1} else {set CONFIG_IUFT_PAR 0} + global CONFIG_IUFT_DMR + if {$tmpvar_25 == "PDMR"} then {set CONFIG_IUFT_DMR 1} else {set CONFIG_IUFT_DMR 0} + global CONFIG_IUFT_BCH + if {$tmpvar_25 == "BCH"} then {set CONFIG_IUFT_BCH 1} else {set CONFIG_IUFT_BCH 0} + global CONFIG_IUFT_TMR + if {$tmpvar_25 == "TMR"} then {set CONFIG_IUFT_TMR 1} else {set CONFIG_IUFT_TMR 0} + global CONFIG_FPU_ENABLE + global CONFIG_FPUFT_EN + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1) && ($CONFIG_FPU_ENABLE == 1)} then { + set CONFIG_FPUFT_EN [expr $CONFIG_FPUFT_EN&15]} else {set CONFIG_FPUFT_EN [expr $CONFIG_FPUFT_EN|16]} + global CONFIG_RF_ERRINJ + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then { + set CONFIG_RF_ERRINJ [expr $CONFIG_RF_ERRINJ&15]} else {set CONFIG_RF_ERRINJ [expr $CONFIG_RF_ERRINJ|16]} + global CONFIG_CACHE_FT_EN + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then { + set CONFIG_CACHE_FT_EN [expr $CONFIG_CACHE_FT_EN&15]} else {set CONFIG_CACHE_FT_EN [expr $CONFIG_CACHE_FT_EN|16]} + global CONFIG_CACHE_ERRINJ + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {validate_int CONFIG_CACHE_ERRINJ "$CONFIG_CACHE_ERRINJ" 0} + global CONFIG_LEON3_NETLIST + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then { + set CONFIG_LEON3_NETLIST [expr $CONFIG_LEON3_NETLIST&15]} else {set CONFIG_LEON3_NETLIST [expr $CONFIG_LEON3_NETLIST|16]} +} + + +proc menu10 {w title} { + set oldFocus [focus] + catch {focus .menu3} + catch {destroy $w; unregister_active 10} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 10]] + message $w.m -width 400 -aspect 300 -text \ + "VHDL debug settings " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "VHDL debug settings " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 10; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 10; catch {destroy .menu3}; unregister_active 3; menu11 .menu11 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 10" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 10; menu9 .menu9 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 10; menu9 .menu9 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 10 0 "Processor disassembly to console " CONFIG_IU_DISAS + bool $w.config.f 10 1 "Processor disassembly in netlist " CONFIG_IU_DISAS_NET + bool $w.config.f 10 2 "32-bit program counters " CONFIG_DEBUG_PC32 + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu3] == 0} then {menu3 .menu3 "Processor "} + set winx [expr [winfo x .menu3]+30]; set winy [expr [winfo y .menu3]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu10 {} { + global CONFIG_LEON3 + global CONFIG_IU_DISAS + if {($CONFIG_LEON3 == 1)} then { + configure_entry .menu10.config.f.x0 normal {n l y}} else {configure_entry .menu10.config.f.x0 disabled {y n l}} + global CONFIG_IU_DISAS_NET + if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_DISAS == 1)} then { + configure_entry .menu10.config.f.x1 normal {n l y}} else {configure_entry .menu10.config.f.x1 disabled {y n l}} + global CONFIG_DEBUG_PC32 + if {($CONFIG_LEON3 == 1)} then { + configure_entry .menu10.config.f.x2 normal {n l y}} else {configure_entry .menu10.config.f.x2 disabled {y n l}} +} + + +proc update_define_menu10 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_LEON3 + global CONFIG_IU_DISAS + if {($CONFIG_LEON3 == 1)} then { + set CONFIG_IU_DISAS [expr $CONFIG_IU_DISAS&15]} else {set CONFIG_IU_DISAS [expr $CONFIG_IU_DISAS|16]} + global CONFIG_IU_DISAS_NET + if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_DISAS == 1)} then { + set CONFIG_IU_DISAS_NET [expr $CONFIG_IU_DISAS_NET&15]} else {set CONFIG_IU_DISAS_NET [expr $CONFIG_IU_DISAS_NET|16]} + global CONFIG_DEBUG_PC32 + if {($CONFIG_LEON3 == 1)} then { + set CONFIG_DEBUG_PC32 [expr $CONFIG_DEBUG_PC32&15]} else {set CONFIG_DEBUG_PC32 [expr $CONFIG_DEBUG_PC32|16]} +} + + +menu_option menu11 11 "AMBA configuration" +proc menu11 {w title} { + set oldFocus [focus] + catch {destroy $w; unregister_active 11} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 11]] + message $w.m -width 400 -aspect 300 -text \ + "AMBA configuration" -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "AMBA configuration" + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 11; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 11; menu12 .menu12 \"$title\"" + frame $w.f + button $w.f.back -text "Main Menu" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 11" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 11; menu10 .menu10 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 11; menu10 .menu10 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + int $w.config.f 11 0 "Default AHB master" CONFIG_AHB_DEFMST + bool $w.config.f 11 1 "Round-robin arbiter " CONFIG_AHB_RROBIN + bool $w.config.f 11 2 "AHB split-transaction support " CONFIG_AHB_SPLIT + hex $w.config.f 11 3 "I/O area start address (haddr\[31:20\]) " CONFIG_AHB_IOADDR + hex $w.config.f 11 4 "AHB/APB bridge address (haddr\[31:20\]) " CONFIG_APB_HADDR + bool $w.config.f 11 5 "Enable AMBA AHB monitor " CONFIG_AHB_MON + bool $w.config.f 11 6 "Report AHB errors " CONFIG_AHB_MONERR + bool $w.config.f 11 7 "Report AHB warings " CONFIG_AHB_MONWAR + bool $w.config.f 11 8 "Write trace to simulation console " CONFIG_AHB_DTRACE + + + + focus $w + update_active + global winx; global winy + set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu11 {} { + global CONFIG_AHB_MON + global CONFIG_AHB_MONERR + if {($CONFIG_AHB_MON == 1)} then { + configure_entry .menu11.config.f.x6 normal {n l y}} else {configure_entry .menu11.config.f.x6 disabled {y n l}} + global CONFIG_AHB_MONWAR + if {($CONFIG_AHB_MON == 1)} then { + configure_entry .menu11.config.f.x7 normal {n l y}} else {configure_entry .menu11.config.f.x7 disabled {y n l}} +} + + +proc update_define_menu11 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_AHB_MON + global CONFIG_AHB_MONERR + if {($CONFIG_AHB_MON == 1)} then { + set CONFIG_AHB_MONERR [expr $CONFIG_AHB_MONERR&15]} else {set CONFIG_AHB_MONERR [expr $CONFIG_AHB_MONERR|16]} + global CONFIG_AHB_MONWAR + if {($CONFIG_AHB_MON == 1)} then { + set CONFIG_AHB_MONWAR [expr $CONFIG_AHB_MONWAR&15]} else {set CONFIG_AHB_MONWAR [expr $CONFIG_AHB_MONWAR|16]} +} + + +menu_option menu12 12 "Debug Link " +proc menu12 {w title} { + set oldFocus [focus] + catch {destroy $w; unregister_active 12} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 12]] + message $w.m -width 400 -aspect 300 -text \ + "Debug Link " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Debug Link " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 12; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 12; menu13 .menu13 \"$title\"" + frame $w.f + button $w.f.back -text "Main Menu" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 12" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 12; menu11 .menu11 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 12; menu11 .menu11 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 12 0 "JTAG Debug Link" CONFIG_DSU_JTAG + bool $w.config.f 12 1 "Ethernet Debug Communication Link (EDCL)" CONFIG_DSU_ETH + global tmpvar_26 + minimenu $w.config.f 12 2 "Ethernet/AHB bridge buffer size (kbytes)" tmpvar_26 CONFIG_DSU_ETHSZ1 + menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"Ethernet/AHB bridge buffer size (kbytes)\"" + $w.config.f.x2.x.menu add radiobutton -label "1" -variable tmpvar_26 -value "1" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "2" -variable tmpvar_26 -value "2" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "4" -variable tmpvar_26 -value "4" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "8" -variable tmpvar_26 -value "8" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "16" -variable tmpvar_26 -value "16" -command "update_active" + menusplit $w $w.config.f.x2.x.menu 5 + hex $w.config.f 12 3 "MSB 16 bits of IP address (hex) " CONFIG_DSU_IPMSB + hex $w.config.f 12 4 "LSB 16 bits of IP address (hex) " CONFIG_DSU_IPLSB + hex $w.config.f 12 5 "MSB 24 bits of ethern number (hex) " CONFIG_DSU_ETHMSB + hex $w.config.f 12 6 "LSB 24 bits of ethern number (hex) " CONFIG_DSU_ETHLSB + bool $w.config.f 12 7 "Programmable 4-bit LSB of MAC/IP address" CONFIG_DSU_ETH_PROG + bool $w.config.f 12 8 "EDCL disable pin " CONFIG_DSU_ETH_DIS + + + + focus $w + update_active + global winx; global winy + set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu12 {} { + global CONFIG_GRETH_ENABLE + global CONFIG_DSU_ETH + if {($CONFIG_GRETH_ENABLE == 1)} then { + configure_entry .menu12.config.f.x1 normal {n l y}} else {configure_entry .menu12.config.f.x1 disabled {y n l}} + 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}} + global CONFIG_DSU_IPMSB + 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} + global CONFIG_DSU_IPLSB + 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} + global CONFIG_DSU_ETHMSB + 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} + global CONFIG_DSU_ETHLSB + 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} + global CONFIG_GRETH_GIGA + global CONFIG_DSU_ETH_PROG + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1) && ($CONFIG_GRETH_GIGA == 0)} then { + configure_entry .menu12.config.f.x7 normal {n l y}} else {configure_entry .menu12.config.f.x7 disabled {y n l}} + global CONFIG_DSU_ETH_DIS + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1) && ($CONFIG_GRETH_GIGA == 0)} then { + configure_entry .menu12.config.f.x8 normal {n l y}} else {configure_entry .menu12.config.f.x8 disabled {y n l}} +} + + +proc update_define_menu12 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_GRETH_ENABLE + global CONFIG_DSU_ETH + if {($CONFIG_GRETH_ENABLE == 1)} then { + set CONFIG_DSU_ETH [expr $CONFIG_DSU_ETH&15]} else {set CONFIG_DSU_ETH [expr $CONFIG_DSU_ETH|16]} + global tmpvar_26 + global CONFIG_DSU_ETHSZ1 + if {$tmpvar_26 == "1"} then {set CONFIG_DSU_ETHSZ1 1} else {set CONFIG_DSU_ETHSZ1 0} + global CONFIG_DSU_ETHSZ2 + if {$tmpvar_26 == "2"} then {set CONFIG_DSU_ETHSZ2 1} else {set CONFIG_DSU_ETHSZ2 0} + global CONFIG_DSU_ETHSZ4 + if {$tmpvar_26 == "4"} then {set CONFIG_DSU_ETHSZ4 1} else {set CONFIG_DSU_ETHSZ4 0} + global CONFIG_DSU_ETHSZ8 + if {$tmpvar_26 == "8"} then {set CONFIG_DSU_ETHSZ8 1} else {set CONFIG_DSU_ETHSZ8 0} + global CONFIG_DSU_ETHSZ16 + if {$tmpvar_26 == "16"} then {set CONFIG_DSU_ETHSZ16 1} else {set CONFIG_DSU_ETHSZ16 0} + global CONFIG_DSU_IPMSB + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {validate_hex CONFIG_DSU_IPMSB "$CONFIG_DSU_IPMSB" C0A8} + global CONFIG_DSU_IPLSB + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {validate_hex CONFIG_DSU_IPLSB "$CONFIG_DSU_IPLSB" 0033} + global CONFIG_DSU_ETHMSB + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {validate_hex CONFIG_DSU_ETHMSB "$CONFIG_DSU_ETHMSB" 020000} + global CONFIG_DSU_ETHLSB + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {validate_hex CONFIG_DSU_ETHLSB "$CONFIG_DSU_ETHLSB" 000000} + global CONFIG_GRETH_GIGA + global CONFIG_DSU_ETH_PROG + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1) && ($CONFIG_GRETH_GIGA == 0)} then { + set CONFIG_DSU_ETH_PROG [expr $CONFIG_DSU_ETH_PROG&15]} else {set CONFIG_DSU_ETH_PROG [expr $CONFIG_DSU_ETH_PROG|16]} + global CONFIG_DSU_ETH_DIS + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1) && ($CONFIG_GRETH_GIGA == 0)} then { + set CONFIG_DSU_ETH_DIS [expr $CONFIG_DSU_ETH_DIS&15]} else {set CONFIG_DSU_ETH_DIS [expr $CONFIG_DSU_ETH_DIS|16]} +} + + +menu_option menu13 13 "Peripherals " +proc menu13 {w title} { + set oldFocus [focus] + catch {destroy $w; unregister_active 13} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 13]] + message $w.m -width 400 -aspect 300 -text \ + "Peripherals " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Peripherals " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 13; break" + set nextscript "catch {focus $oldFocus}; menu14 .menu14 \"$title\"" + frame $w.f + button $w.f.back -text "Main Menu" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 13" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 13; menu12 .menu12 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 13; menu12 .menu12 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + submenu $w.config.f 13 0 "Memory controller " 14 + submenu $w.config.f 13 1 "On-chip RAM/ROM " 17 + submenu $w.config.f 13 2 "Ethernet " 18 + submenu $w.config.f 13 3 "UART, timer, I/O port and interrupt controller" 19 + submenu $w.config.f 13 4 "Keybord and VGA interface" 20 + submenu $w.config.f 13 5 "SPI" 21 + + + + focus $w + update_active + global winx; global winy + set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu13 {} { +} + + +proc update_define_menu13 {} { + update_define_mainmenu + global CONFIG_MODULES +} + + +proc menu14 {w title} { + set oldFocus [focus] + catch {focus .menu13} + catch {destroy $w; unregister_active 14} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 14]] + message $w.m -width 400 -aspect 300 -text \ + "Memory controller " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Memory controller " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 14; break" + set nextscript "catch {focus $oldFocus}; menu15 .menu15 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 14" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 14; menu13 .menu13 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 14; menu13 .menu13 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + submenu $w.config.f 14 0 "Leon2 memory controller " 15 + submenu $w.config.f 14 1 "MIG memory controller " 16 + bool $w.config.f 14 2 "Enable AHB Status Register " CONFIG_AHBSTAT_ENABLE + int $w.config.f 14 3 "Number of correctable-error slaves " CONFIG_AHBSTAT_NFTSLV + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu13] == 0} then {menu13 .menu13 "Peripherals "} + set winx [expr [winfo x .menu13]+30]; set winy [expr [winfo y .menu13]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu14 {} { + global CONFIG_AHBSTAT_ENABLE + global CONFIG_AHBSTAT_NFTSLV + 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} +} + + +proc update_define_menu14 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_AHBSTAT_ENABLE + global CONFIG_AHBSTAT_NFTSLV + if {($CONFIG_AHBSTAT_ENABLE == 1)} then {validate_int CONFIG_AHBSTAT_NFTSLV "$CONFIG_AHBSTAT_NFTSLV" 1} +} + + +proc menu15 {w title} { + set oldFocus [focus] + catch {focus .menu14} + catch {destroy $w; unregister_active 15} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 15]] + message $w.m -width 400 -aspect 300 -text \ + "Leon2 memory controller " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Leon2 memory controller " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 15; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 15; menu16 .menu16 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 15" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 15; menu14 .menu14 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 15; menu14 .menu14 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 15 0 "Enable Leon2 memory controller " CONFIG_MCTRL_LEON2 + bool $w.config.f 15 1 "8-bit PROM/SRAM bus support " CONFIG_MCTRL_8BIT + bool $w.config.f 15 2 "16-bit PROM/SRAM bus support " CONFIG_MCTRL_16BIT + bool $w.config.f 15 3 "5th SRAM chip-select " CONFIG_MCTRL_5CS + bool $w.config.f 15 4 "SDRAM controller " CONFIG_MCTRL_SDRAM + bool $w.config.f 15 5 "Separate address and data buses" CONFIG_MCTRL_SDRAM_SEPBUS + bool $w.config.f 15 6 "64-bit SDRAM data bus" CONFIG_MCTRL_SDRAM_BUS64 + bool $w.config.f 15 7 "Unsynchronized sdclock" CONFIG_MCTRL_SDRAM_INVCLK + bool $w.config.f 15 8 "Enable page burst operation " CONFIG_MCTRL_PAGE + bool $w.config.f 15 9 "Enable programmable page burst " CONFIG_MCTRL_PROGPAGE + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu14] == 0} then {menu14 .menu14 "Memory controller "} + set winx [expr [winfo x .menu14]+30]; set winy [expr [winfo y .menu14]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu15 {} { + global CONFIG_MCTRL_LEON2 + global CONFIG_MCTRL_8BIT + if {($CONFIG_MCTRL_LEON2 == 1)} then { + configure_entry .menu15.config.f.x1 normal {n l y}} else {configure_entry .menu15.config.f.x1 disabled {y n l}} + global CONFIG_MCTRL_16BIT + if {($CONFIG_MCTRL_LEON2 == 1)} then { + configure_entry .menu15.config.f.x2 normal {n l y}} else {configure_entry .menu15.config.f.x2 disabled {y n l}} + global CONFIG_MCTRL_5CS + if {($CONFIG_MCTRL_LEON2 == 1)} then { + configure_entry .menu15.config.f.x3 normal {n l y}} else {configure_entry .menu15.config.f.x3 disabled {y n l}} + global CONFIG_MCTRL_SDRAM + if {($CONFIG_MCTRL_LEON2 == 1)} then { + configure_entry .menu15.config.f.x4 normal {n l y}} else {configure_entry .menu15.config.f.x4 disabled {y n l}} + global CONFIG_MCTRL_SDRAM_SEPBUS + if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1)} then { + configure_entry .menu15.config.f.x5 normal {n l y}} else {configure_entry .menu15.config.f.x5 disabled {y n l}} + global CONFIG_MCTRL_SDRAM_BUS64 + if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_SDRAM_SEPBUS == 1)} then { + configure_entry .menu15.config.f.x6 normal {n l y}} else {configure_entry .menu15.config.f.x6 disabled {y n l}} + global CONFIG_MCTRL_SDRAM_INVCLK + if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_SDRAM_SEPBUS == 1)} then { + configure_entry .menu15.config.f.x7 normal {n l y}} else {configure_entry .menu15.config.f.x7 disabled {y n l}} + global CONFIG_MCTRL_PAGE + if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1)} then { + configure_entry .menu15.config.f.x8 normal {n l y}} else {configure_entry .menu15.config.f.x8 disabled {y n l}} + global CONFIG_MCTRL_PROGPAGE + if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_PAGE == 1)} then { + configure_entry .menu15.config.f.x9 normal {n l y}} else {configure_entry .menu15.config.f.x9 disabled {y n l}} +} + + +proc update_define_menu15 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_MCTRL_LEON2 + global CONFIG_MCTRL_8BIT + if {($CONFIG_MCTRL_LEON2 == 1)} then { + set CONFIG_MCTRL_8BIT [expr $CONFIG_MCTRL_8BIT&15]} else {set CONFIG_MCTRL_8BIT [expr $CONFIG_MCTRL_8BIT|16]} + global CONFIG_MCTRL_16BIT + if {($CONFIG_MCTRL_LEON2 == 1)} then { + set CONFIG_MCTRL_16BIT [expr $CONFIG_MCTRL_16BIT&15]} else {set CONFIG_MCTRL_16BIT [expr $CONFIG_MCTRL_16BIT|16]} + global CONFIG_MCTRL_5CS + if {($CONFIG_MCTRL_LEON2 == 1)} then { + set CONFIG_MCTRL_5CS [expr $CONFIG_MCTRL_5CS&15]} else {set CONFIG_MCTRL_5CS [expr $CONFIG_MCTRL_5CS|16]} + global CONFIG_MCTRL_SDRAM + if {($CONFIG_MCTRL_LEON2 == 1)} then { + set CONFIG_MCTRL_SDRAM [expr $CONFIG_MCTRL_SDRAM&15]} else {set CONFIG_MCTRL_SDRAM [expr $CONFIG_MCTRL_SDRAM|16]} + global CONFIG_MCTRL_SDRAM_SEPBUS + if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1)} then { + set CONFIG_MCTRL_SDRAM_SEPBUS [expr $CONFIG_MCTRL_SDRAM_SEPBUS&15]} else {set CONFIG_MCTRL_SDRAM_SEPBUS [expr $CONFIG_MCTRL_SDRAM_SEPBUS|16]} + global CONFIG_MCTRL_SDRAM_BUS64 + if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_SDRAM_SEPBUS == 1)} then { + set CONFIG_MCTRL_SDRAM_BUS64 [expr $CONFIG_MCTRL_SDRAM_BUS64&15]} else {set CONFIG_MCTRL_SDRAM_BUS64 [expr $CONFIG_MCTRL_SDRAM_BUS64|16]} + global CONFIG_MCTRL_SDRAM_INVCLK + if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_SDRAM_SEPBUS == 1)} then { + set CONFIG_MCTRL_SDRAM_INVCLK [expr $CONFIG_MCTRL_SDRAM_INVCLK&15]} else {set CONFIG_MCTRL_SDRAM_INVCLK [expr $CONFIG_MCTRL_SDRAM_INVCLK|16]} + global CONFIG_MCTRL_PAGE + if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1)} then { + set CONFIG_MCTRL_PAGE [expr $CONFIG_MCTRL_PAGE&15]} else {set CONFIG_MCTRL_PAGE [expr $CONFIG_MCTRL_PAGE|16]} + global CONFIG_MCTRL_PROGPAGE + if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1) && ($CONFIG_MCTRL_PAGE == 1)} then { + set CONFIG_MCTRL_PROGPAGE [expr $CONFIG_MCTRL_PROGPAGE&15]} else {set CONFIG_MCTRL_PROGPAGE [expr $CONFIG_MCTRL_PROGPAGE|16]} +} + + +proc menu16 {w title} { + set oldFocus [focus] + catch {focus .menu14} + catch {destroy $w; unregister_active 16} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 16]] + message $w.m -width 400 -aspect 300 -text \ + "MIG memory controller " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "MIG memory controller " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 16; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 16; catch {destroy .menu14}; unregister_active 14; menu17 .menu17 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 16" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 16; menu15 .menu15 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 16; menu15 .menu15 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 16 0 "Enable Xilinx MIG memory controller" CONFIG_MIG_DDR2 + int $w.config.f 16 1 "Chip selects (ranks) " CONFIG_MIG_RANKS + int $w.config.f 16 2 "Column bits " CONFIG_MIG_COLBITS + int $w.config.f 16 3 "Row bits " CONFIG_MIG_ROWBITS + int $w.config.f 16 4 "Bank bits " CONFIG_MIG_BANKBITS + hex $w.config.f 16 5 "AHB HMASK " CONFIG_MIG_HMASK + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu14] == 0} then {menu14 .menu14 "Memory controller "} + set winx [expr [winfo x .menu14]+30]; set winy [expr [winfo y .menu14]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu16 {} { + global CONFIG_MIG_DDR2 + global CONFIG_MIG_RANKS + 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} + global CONFIG_MIG_COLBITS + 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} + global CONFIG_MIG_ROWBITS + 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} + global CONFIG_MIG_BANKBITS + 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} + global CONFIG_MIG_HMASK + 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} +} + + +proc update_define_menu16 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_MIG_DDR2 + global CONFIG_MIG_RANKS + if {($CONFIG_MIG_DDR2 == 1)} then {validate_int CONFIG_MIG_RANKS "$CONFIG_MIG_RANKS" 1} + global CONFIG_MIG_COLBITS + if {($CONFIG_MIG_DDR2 == 1)} then {validate_int CONFIG_MIG_COLBITS "$CONFIG_MIG_COLBITS" 10} + global CONFIG_MIG_ROWBITS + if {($CONFIG_MIG_DDR2 == 1)} then {validate_int CONFIG_MIG_ROWBITS "$CONFIG_MIG_ROWBITS" 13} + global CONFIG_MIG_BANKBITS + if {($CONFIG_MIG_DDR2 == 1)} then {validate_int CONFIG_MIG_BANKBITS "$CONFIG_MIG_BANKBITS" 2} + global CONFIG_MIG_HMASK + if {($CONFIG_MIG_DDR2 == 1)} then {validate_hex CONFIG_MIG_HMASK "$CONFIG_MIG_HMASK" F00} +} + + +proc menu17 {w title} { + set oldFocus [focus] + catch {focus .menu13} + catch {destroy $w; unregister_active 17} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 17]] + message $w.m -width 400 -aspect 300 -text \ + "On-chip RAM/ROM " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "On-chip RAM/ROM " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 17; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 17; menu18 .menu18 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 17" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 17; menu16 .menu16 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 17; menu16 .menu16 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 17 0 "On-chip AHB ROM " CONFIG_AHBROM_ENABLE + hex $w.config.f 17 1 "ROM start address (haddr\[31:20\]) " CONFIG_AHBROM_START + bool $w.config.f 17 2 "Pipelined ROM access " CONFIG_AHBROM_PIPE + bool $w.config.f 17 3 "On-chip AHB RAM " CONFIG_AHBRAM_ENABLE + global tmpvar_27 + minimenu $w.config.f 17 4 "AHB RAM size (Kbyte)" tmpvar_27 CONFIG_AHBRAM_SZ1 + menu $w.config.f.x4.x.menu -tearoffcommand "menutitle \"AHB RAM size (Kbyte)\"" + $w.config.f.x4.x.menu add radiobutton -label "1" -variable tmpvar_27 -value "1" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "2" -variable tmpvar_27 -value "2" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "4" -variable tmpvar_27 -value "4" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "8" -variable tmpvar_27 -value "8" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "16" -variable tmpvar_27 -value "16" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "32" -variable tmpvar_27 -value "32" -command "update_active" + $w.config.f.x4.x.menu add radiobutton -label "64" -variable tmpvar_27 -value "64" -command "update_active" + menusplit $w $w.config.f.x4.x.menu 7 + hex $w.config.f 17 5 "RAM start address (haddr\[31:20\]) " CONFIG_AHBRAM_START + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu13] == 0} then {menu13 .menu13 "Peripherals "} + set winx [expr [winfo x .menu13]+30]; set winy [expr [winfo y .menu13]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu17 {} { + global CONFIG_AHBROM_ENABLE + global CONFIG_AHBROM_START + 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} + global CONFIG_AHBROM_PIPE + if {($CONFIG_AHBROM_ENABLE == 1)} then { + configure_entry .menu17.config.f.x2 normal {n l y}} else {configure_entry .menu17.config.f.x2 disabled {y n l}} + global CONFIG_AHBRAM_ENABLE + 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}} + global CONFIG_AHBRAM_START + 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} +} + + +proc update_define_menu17 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_AHBROM_ENABLE + global CONFIG_AHBROM_START + if {($CONFIG_AHBROM_ENABLE == 1)} then {validate_hex CONFIG_AHBROM_START "$CONFIG_AHBROM_START" 000} + global CONFIG_AHBROM_PIPE + if {($CONFIG_AHBROM_ENABLE == 1)} then { + set CONFIG_AHBROM_PIPE [expr $CONFIG_AHBROM_PIPE&15]} else {set CONFIG_AHBROM_PIPE [expr $CONFIG_AHBROM_PIPE|16]} + global tmpvar_27 + global CONFIG_AHBRAM_SZ1 + if {$tmpvar_27 == "1"} then {set CONFIG_AHBRAM_SZ1 1} else {set CONFIG_AHBRAM_SZ1 0} + global CONFIG_AHBRAM_SZ2 + if {$tmpvar_27 == "2"} then {set CONFIG_AHBRAM_SZ2 1} else {set CONFIG_AHBRAM_SZ2 0} + global CONFIG_AHBRAM_SZ4 + if {$tmpvar_27 == "4"} then {set CONFIG_AHBRAM_SZ4 1} else {set CONFIG_AHBRAM_SZ4 0} + global CONFIG_AHBRAM_SZ8 + if {$tmpvar_27 == "8"} then {set CONFIG_AHBRAM_SZ8 1} else {set CONFIG_AHBRAM_SZ8 0} + global CONFIG_AHBRAM_SZ16 + if {$tmpvar_27 == "16"} then {set CONFIG_AHBRAM_SZ16 1} else {set CONFIG_AHBRAM_SZ16 0} + global CONFIG_AHBRAM_SZ32 + if {$tmpvar_27 == "32"} then {set CONFIG_AHBRAM_SZ32 1} else {set CONFIG_AHBRAM_SZ32 0} + global CONFIG_AHBRAM_SZ64 + if {$tmpvar_27 == "64"} then {set CONFIG_AHBRAM_SZ64 1} else {set CONFIG_AHBRAM_SZ64 0} + global CONFIG_AHBRAM_ENABLE + global CONFIG_AHBRAM_START + if {($CONFIG_AHBRAM_ENABLE == 1)} then {validate_hex CONFIG_AHBRAM_START "$CONFIG_AHBRAM_START" A00} +} + + +proc menu18 {w title} { + set oldFocus [focus] + catch {focus .menu13} + catch {destroy $w; unregister_active 18} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 18]] + message $w.m -width 400 -aspect 300 -text \ + "Ethernet " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Ethernet " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 18; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 18; menu19 .menu19 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 18" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 18; menu17 .menu17 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 18; menu17 .menu17 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 18 0 "Gaisler Research 10/100/1000 Mbit Ethernet MAC " CONFIG_GRETH_ENABLE + bool $w.config.f 18 1 "Enable 1000 Mbit support " CONFIG_GRETH_GIGA + global tmpvar_28 + minimenu $w.config.f 18 2 "AHB FIFO size (words) " tmpvar_28 CONFIG_GRETH_FIFO4 + menu $w.config.f.x2.x.menu -tearoffcommand "menutitle \"AHB FIFO size (words) \"" + $w.config.f.x2.x.menu add radiobutton -label "4" -variable tmpvar_28 -value "4" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "8" -variable tmpvar_28 -value "8" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "16" -variable tmpvar_28 -value "16" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "32" -variable tmpvar_28 -value "32" -command "update_active" + $w.config.f.x2.x.menu add radiobutton -label "64" -variable tmpvar_28 -value "64" -command "update_active" + menusplit $w $w.config.f.x2.x.menu 5 + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu13] == 0} then {menu13 .menu13 "Peripherals "} + set winx [expr [winfo x .menu13]+30]; set winy [expr [winfo y .menu13]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu18 {} { + global CONFIG_GRETH_ENABLE + global CONFIG_GRETH_GIGA + if {($CONFIG_GRETH_ENABLE == 1)} then { + configure_entry .menu18.config.f.x1 normal {n l y}} else {configure_entry .menu18.config.f.x1 disabled {y n l}} + 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}} +} + + +proc update_define_menu18 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_GRETH_ENABLE + global CONFIG_GRETH_GIGA + if {($CONFIG_GRETH_ENABLE == 1)} then { + set CONFIG_GRETH_GIGA [expr $CONFIG_GRETH_GIGA&15]} else {set CONFIG_GRETH_GIGA [expr $CONFIG_GRETH_GIGA|16]} + global tmpvar_28 + global CONFIG_GRETH_FIFO4 + if {$tmpvar_28 == "4"} then {set CONFIG_GRETH_FIFO4 1} else {set CONFIG_GRETH_FIFO4 0} + global CONFIG_GRETH_FIFO8 + if {$tmpvar_28 == "8"} then {set CONFIG_GRETH_FIFO8 1} else {set CONFIG_GRETH_FIFO8 0} + global CONFIG_GRETH_FIFO16 + if {$tmpvar_28 == "16"} then {set CONFIG_GRETH_FIFO16 1} else {set CONFIG_GRETH_FIFO16 0} + global CONFIG_GRETH_FIFO32 + if {$tmpvar_28 == "32"} then {set CONFIG_GRETH_FIFO32 1} else {set CONFIG_GRETH_FIFO32 0} + global CONFIG_GRETH_FIFO64 + if {$tmpvar_28 == "64"} then {set CONFIG_GRETH_FIFO64 1} else {set CONFIG_GRETH_FIFO64 0} +} + + +proc menu19 {w title} { + set oldFocus [focus] + catch {focus .menu13} + catch {destroy $w; unregister_active 19} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 19]] + message $w.m -width 400 -aspect 300 -text \ + "UART, timer, I/O port and interrupt controller" -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "UART, timer, I/O port and interrupt controller" + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 19; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 19; menu20 .menu20 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 19" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 19; menu18 .menu18 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 19; menu18 .menu18 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 19 0 "Enable console UART " CONFIG_UART1_ENABLE + global tmpvar_29 + minimenu $w.config.f 19 1 "UART1 FIFO depth" tmpvar_29 CONFIG_UA1_FIFO1 + menu $w.config.f.x1.x.menu -tearoffcommand "menutitle \"UART1 FIFO depth\"" + $w.config.f.x1.x.menu add radiobutton -label "1" -variable tmpvar_29 -value "1" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "2" -variable tmpvar_29 -value "2" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "4" -variable tmpvar_29 -value "4" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "8" -variable tmpvar_29 -value "8" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "16" -variable tmpvar_29 -value "16" -command "update_active" + $w.config.f.x1.x.menu add radiobutton -label "32" -variable tmpvar_29 -value "32" -command "update_active" + menusplit $w $w.config.f.x1.x.menu 6 + bool $w.config.f 19 2 "Enable LEON3 interrupt controller " CONFIG_IRQ3_ENABLE + bool $w.config.f 19 3 "Enable secondary interrupts " CONFIG_IRQ3_SEC + int $w.config.f 19 4 "Secondary interrupt number (1 - 15) " CONFIG_IRQ3_NSEC + bool $w.config.f 19 5 "Enable Timer Unit " CONFIG_GPT_ENABLE + int $w.config.f 19 6 "Number of timers (1 - 7) " CONFIG_GPT_NTIM + int $w.config.f 19 7 "Scaler width (2 - 16) " CONFIG_GPT_SW + int $w.config.f 19 8 "Timer width (2 - 32) " CONFIG_GPT_TW + int $w.config.f 19 9 "Timer unit interrupt " CONFIG_GPT_IRQ + bool $w.config.f 19 10 "Separate interrupts " CONFIG_GPT_SEPIRQ + bool $w.config.f 19 11 "Watchdog enable " CONFIG_GPT_WDOGEN + hex $w.config.f 19 12 "Initial watchdog time-out value " CONFIG_GPT_WDOG + bool $w.config.f 19 13 "Enable generic GPIO port " CONFIG_GRGPIO_ENABLE + int $w.config.f 19 14 "GPIO width " CONFIG_GRGPIO_WIDTH + hex $w.config.f 19 15 "GPIO interrupt mask " CONFIG_GRGPIO_IMASK + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu13] == 0} then {menu13 .menu13 "Peripherals "} + set winx [expr [winfo x .menu13]+30]; set winy [expr [winfo y .menu13]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu19 {} { + global CONFIG_UART1_ENABLE + 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}} + global CONFIG_IRQ3_ENABLE + global CONFIG_IRQ3_SEC + if {($CONFIG_IRQ3_ENABLE == 1)} then { + configure_entry .menu19.config.f.x3 normal {n l y}} else {configure_entry .menu19.config.f.x3 disabled {y n l}} + global CONFIG_IRQ3_NSEC + 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} + global CONFIG_GPT_ENABLE + global CONFIG_GPT_NTIM + 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} + global CONFIG_GPT_SW + 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} + global CONFIG_GPT_TW + 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} + global CONFIG_GPT_IRQ + 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} + global CONFIG_GPT_SEPIRQ + if {($CONFIG_GPT_ENABLE == 1)} then { + configure_entry .menu19.config.f.x10 normal {n l y}} else {configure_entry .menu19.config.f.x10 disabled {y n l}} + global CONFIG_GPT_WDOGEN + if {($CONFIG_GPT_ENABLE == 1)} then { + configure_entry .menu19.config.f.x11 normal {n l y}} else {configure_entry .menu19.config.f.x11 disabled {y n l}} + global CONFIG_GPT_WDOG + 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} + global CONFIG_GRGPIO_ENABLE + global CONFIG_GRGPIO_WIDTH + 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} + global CONFIG_GRGPIO_IMASK + 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} +} + + +proc update_define_menu19 {} { + update_define_mainmenu + global CONFIG_MODULES + global tmpvar_29 + global CONFIG_UA1_FIFO1 + if {$tmpvar_29 == "1"} then {set CONFIG_UA1_FIFO1 1} else {set CONFIG_UA1_FIFO1 0} + global CONFIG_UA1_FIFO2 + if {$tmpvar_29 == "2"} then {set CONFIG_UA1_FIFO2 1} else {set CONFIG_UA1_FIFO2 0} + global CONFIG_UA1_FIFO4 + if {$tmpvar_29 == "4"} then {set CONFIG_UA1_FIFO4 1} else {set CONFIG_UA1_FIFO4 0} + global CONFIG_UA1_FIFO8 + if {$tmpvar_29 == "8"} then {set CONFIG_UA1_FIFO8 1} else {set CONFIG_UA1_FIFO8 0} + global CONFIG_UA1_FIFO16 + if {$tmpvar_29 == "16"} then {set CONFIG_UA1_FIFO16 1} else {set CONFIG_UA1_FIFO16 0} + global CONFIG_UA1_FIFO32 + if {$tmpvar_29 == "32"} then {set CONFIG_UA1_FIFO32 1} else {set CONFIG_UA1_FIFO32 0} + global CONFIG_IRQ3_ENABLE + global CONFIG_IRQ3_SEC + if {($CONFIG_IRQ3_ENABLE == 1)} then { + set CONFIG_IRQ3_SEC [expr $CONFIG_IRQ3_SEC&15]} else {set CONFIG_IRQ3_SEC [expr $CONFIG_IRQ3_SEC|16]} + global CONFIG_IRQ3_NSEC + if {($CONFIG_IRQ3_ENABLE == 1) && ($CONFIG_IRQ3_SEC == 1)} then {validate_int CONFIG_IRQ3_NSEC "$CONFIG_IRQ3_NSEC" 12} + global CONFIG_GPT_ENABLE + global CONFIG_GPT_NTIM + if {($CONFIG_GPT_ENABLE == 1)} then {validate_int CONFIG_GPT_NTIM "$CONFIG_GPT_NTIM" 2} + global CONFIG_GPT_SW + if {($CONFIG_GPT_ENABLE == 1)} then {validate_int CONFIG_GPT_SW "$CONFIG_GPT_SW" 8} + global CONFIG_GPT_TW + if {($CONFIG_GPT_ENABLE == 1)} then {validate_int CONFIG_GPT_TW "$CONFIG_GPT_TW" 32} + global CONFIG_GPT_IRQ + if {($CONFIG_GPT_ENABLE == 1)} then {validate_int CONFIG_GPT_IRQ "$CONFIG_GPT_IRQ" 8} + global CONFIG_GPT_SEPIRQ + if {($CONFIG_GPT_ENABLE == 1)} then { + set CONFIG_GPT_SEPIRQ [expr $CONFIG_GPT_SEPIRQ&15]} else {set CONFIG_GPT_SEPIRQ [expr $CONFIG_GPT_SEPIRQ|16]} + global CONFIG_GPT_WDOGEN + if {($CONFIG_GPT_ENABLE == 1)} then { + set CONFIG_GPT_WDOGEN [expr $CONFIG_GPT_WDOGEN&15]} else {set CONFIG_GPT_WDOGEN [expr $CONFIG_GPT_WDOGEN|16]} + global CONFIG_GPT_WDOG + if {($CONFIG_GPT_ENABLE == 1) && ($CONFIG_GPT_WDOGEN == 1)} then {validate_hex CONFIG_GPT_WDOG "$CONFIG_GPT_WDOG" FFFF} + global CONFIG_GRGPIO_ENABLE + global CONFIG_GRGPIO_WIDTH + if {($CONFIG_GRGPIO_ENABLE == 1)} then {validate_int CONFIG_GRGPIO_WIDTH "$CONFIG_GRGPIO_WIDTH" 8} + global CONFIG_GRGPIO_IMASK + if {($CONFIG_GRGPIO_ENABLE == 1)} then {validate_hex CONFIG_GRGPIO_IMASK "$CONFIG_GRGPIO_IMASK" 0000} +} + + +proc menu20 {w title} { + set oldFocus [focus] + catch {focus .menu13} + catch {destroy $w; unregister_active 20} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 20]] + message $w.m -width 400 -aspect 300 -text \ + "Keybord and VGA interface" -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "Keybord and VGA interface" + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 20; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 20; menu21 .menu21 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 20" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 20; menu19 .menu19 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 20; menu19 .menu19 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 20 0 "Keyboard/mouse (PS2) interface " CONFIG_KBD_ENABLE + bool $w.config.f 20 1 "Text-based VGA interface " CONFIG_VGA_ENABLE + bool $w.config.f 20 2 "SVGA graphical frame buffer " CONFIG_SVGA_ENABLE + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu13] == 0} then {menu13 .menu13 "Peripherals "} + set winx [expr [winfo x .menu13]+30]; set winy [expr [winfo y .menu13]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu20 {} { + global CONFIG_VGA_ENABLE + global CONFIG_SVGA_ENABLE + if {($CONFIG_VGA_ENABLE == 0)} then { + configure_entry .menu20.config.f.x2 normal {n l y}} else {configure_entry .menu20.config.f.x2 disabled {y n l}} +} + + +proc update_define_menu20 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_VGA_ENABLE + global CONFIG_SVGA_ENABLE + if {($CONFIG_VGA_ENABLE == 0)} then { + set CONFIG_SVGA_ENABLE [expr $CONFIG_SVGA_ENABLE&15]} else {set CONFIG_SVGA_ENABLE [expr $CONFIG_SVGA_ENABLE|16]} +} + + +proc menu21 {w title} { + set oldFocus [focus] + catch {focus .menu13} + catch {destroy $w; unregister_active 21} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 21]] + message $w.m -width 400 -aspect 300 -text \ + "SPI" -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "SPI" + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 21; break" + set nextscript "catch {focus $oldFocus}; menu22 .menu22 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 21" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 21; menu20 .menu20 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 21; menu20 .menu20 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + submenu $w.config.f 21 0 "SPI memory controller " 22 + submenu $w.config.f 21 1 "SPI controller(s) " 23 + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu13] == 0} then {menu13 .menu13 "Peripherals "} + set winx [expr [winfo x .menu13]+30]; set winy [expr [winfo y .menu13]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu21 {} { +} + + +proc update_define_menu21 {} { + update_define_mainmenu + global CONFIG_MODULES +} + + +proc menu22 {w title} { + set oldFocus [focus] + catch {focus .menu21} + catch {destroy $w; unregister_active 22} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 22]] + message $w.m -width 400 -aspect 300 -text \ + "SPI memory controller " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "SPI memory controller " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 22; break" + set nextscript "catch {focus $oldFocus}; destroy $w; unregister_active 22; menu23 .menu23 \"$title\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 22" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 22; menu21 .menu21 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 22; menu21 .menu21 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 22 0 "Enable SPI memory controller " CONFIG_SPIMCTRL + bool $w.config.f 22 1 "Enable SD card support " CONFIG_SPIMCTRL_SDCARD + hex $w.config.f 22 2 "Read instruction " CONFIG_SPIMCTRL_READCMD + bool $w.config.f 22 3 "Read instruction requires dummy byte " CONFIG_SPIMCTRL_DUMMYBYTE + bool $w.config.f 22 4 "Enable dual output for reads " CONFIG_SPIMCTRL_DUALOUTPUT + int $w.config.f 22 5 "Clock divisor for device clock" CONFIG_SPIMCTRL_SCALER + int $w.config.f 22 6 "Clock divisor for alt. device clock" CONFIG_SPIMCTRL_ASCALER + int $w.config.f 22 7 "Number of clock cycles to idle after power up " CONFIG_SPIMCTRL_PWRUPCNT + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu21] == 0} then {menu21 .menu21 "SPI"} + set winx [expr [winfo x .menu21]+30]; set winy [expr [winfo y .menu21]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu22 {} { + global CONFIG_SPIMCTRL + global CONFIG_SPIMCTRL_SDCARD + if {($CONFIG_SPIMCTRL == 1)} then { + configure_entry .menu22.config.f.x1 normal {n l y}} else {configure_entry .menu22.config.f.x1 disabled {y n l}} + global CONFIG_SPIMCTRL_READCMD + 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} + global CONFIG_SPIMCTRL_DUMMYBYTE + if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then { + configure_entry .menu22.config.f.x3 normal {n l y}} else {configure_entry .menu22.config.f.x3 disabled {y n l}} + global CONFIG_SPIMCTRL_DUALOUTPUT + if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then { + configure_entry .menu22.config.f.x4 normal {n l y}} else {configure_entry .menu22.config.f.x4 disabled {y n l}} + global CONFIG_SPIMCTRL_SCALER + 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} + global CONFIG_SPIMCTRL_ASCALER + 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} + global CONFIG_SPIMCTRL_PWRUPCNT + 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} +} + + +proc update_define_menu22 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_SPIMCTRL + global CONFIG_SPIMCTRL_SDCARD + if {($CONFIG_SPIMCTRL == 1)} then { + set CONFIG_SPIMCTRL_SDCARD [expr $CONFIG_SPIMCTRL_SDCARD&15]} else {set CONFIG_SPIMCTRL_SDCARD [expr $CONFIG_SPIMCTRL_SDCARD|16]} + global CONFIG_SPIMCTRL_READCMD + if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then {validate_hex CONFIG_SPIMCTRL_READCMD "$CONFIG_SPIMCTRL_READCMD" 0B} + global CONFIG_SPIMCTRL_DUMMYBYTE + if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then { + set CONFIG_SPIMCTRL_DUMMYBYTE [expr $CONFIG_SPIMCTRL_DUMMYBYTE&15]} else {set CONFIG_SPIMCTRL_DUMMYBYTE [expr $CONFIG_SPIMCTRL_DUMMYBYTE|16]} + global CONFIG_SPIMCTRL_DUALOUTPUT + if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then { + set CONFIG_SPIMCTRL_DUALOUTPUT [expr $CONFIG_SPIMCTRL_DUALOUTPUT&15]} else {set CONFIG_SPIMCTRL_DUALOUTPUT [expr $CONFIG_SPIMCTRL_DUALOUTPUT|16]} + global CONFIG_SPIMCTRL_SCALER + if {($CONFIG_SPIMCTRL == 1)} then {validate_int CONFIG_SPIMCTRL_SCALER "$CONFIG_SPIMCTRL_SCALER" 1} + global CONFIG_SPIMCTRL_ASCALER + if {($CONFIG_SPIMCTRL == 1)} then {validate_int CONFIG_SPIMCTRL_ASCALER "$CONFIG_SPIMCTRL_ASCALER" 8} + global CONFIG_SPIMCTRL_PWRUPCNT + if {($CONFIG_SPIMCTRL == 1)} then {validate_int CONFIG_SPIMCTRL_PWRUPCNT "$CONFIG_SPIMCTRL_PWRUPCNT" 0} +} + + +proc menu23 {w title} { + set oldFocus [focus] + catch {focus .menu21} + catch {destroy $w; unregister_active 23} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 23]] + message $w.m -width 400 -aspect 300 -text \ + "SPI controller(s) " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "SPI controller(s) " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 23; break" + 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\"" + frame $w.f + button $w.f.back -text "OK" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 23" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + bind all $nextscript + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 23; menu22 .menu22 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 23; menu22 .menu22 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 23 0 "Enable SPI controller(s) " CONFIG_SPICTRL_ENABLE + int $w.config.f 23 1 "Number of SPI controllers " CONFIG_SPICTRL_NUM + int $w.config.f 23 2 "Slave select lines " CONFIG_SPICTRL_SLVS + int $w.config.f 23 3 "FIFO depth (2^N) " CONFIG_SPICTRL_FIFO + bool $w.config.f 23 4 "Enable slave select registers" CONFIG_SPICTRL_SLVREG + bool $w.config.f 23 5 "Enable automatic slave select" CONFIG_SPICTRL_ASEL + bool $w.config.f 23 6 "Support automated transfers " CONFIG_SPICTRL_AM + bool $w.config.f 23 7 "Support open drain mode " CONFIG_SPICTRL_ODMODE + bool $w.config.f 23 8 "Support three-wire mode " CONFIG_SPICTRL_TWEN + int $w.config.f 23 9 "Maximum supported word length (see help!) " CONFIG_SPICTRL_MAXWLEN + bool $w.config.f 23 10 "Use SYNCRAM for rx and tx queues " CONFIG_SPICTRL_SYNCRAM + global tmpvar_30 + minimenu $w.config.f 23 11 "Fault-tolerance" tmpvar_30 CONFIG_SPICTRL_NOFT + menu $w.config.f.x11.x.menu -tearoffcommand "menutitle \"Fault-tolerance\"" + $w.config.f.x11.x.menu add radiobutton -label "None" -variable tmpvar_30 -value "None" -command "update_active" + $w.config.f.x11.x.menu add radiobutton -label "Parity-DMR" -variable tmpvar_30 -value "Parity-DMR" -command "update_active" + $w.config.f.x11.x.menu add radiobutton -label "TMR" -variable tmpvar_30 -value "TMR" -command "update_active" + menusplit $w $w.config.f.x11.x.menu 3 + + + + focus $w + update_active + global winx; global winy + if {[winfo exists .menu21] == 0} then {menu21 .menu21 "SPI"} + set winx [expr [winfo x .menu21]+30]; set winy [expr [winfo y .menu21]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu23 {} { + global CONFIG_SPICTRL_ENABLE + global CONFIG_SPICTRL_NUM + 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} + global CONFIG_SPICTRL_SLVS + 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} + global CONFIG_SPICTRL_FIFO + 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} + global CONFIG_SPICTRL_SLVREG + if {($CONFIG_SPICTRL_ENABLE == 1)} then { + configure_entry .menu23.config.f.x4 normal {n l y}} else {configure_entry .menu23.config.f.x4 disabled {y n l}} + global CONFIG_SPICTRL_ASEL + if {($CONFIG_SPICTRL_ENABLE == 1)} then { + configure_entry .menu23.config.f.x5 normal {n l y}} else {configure_entry .menu23.config.f.x5 disabled {y n l}} + global CONFIG_SPICTRL_AM + if {($CONFIG_SPICTRL_ENABLE == 1)} then { + configure_entry .menu23.config.f.x6 normal {n l y}} else {configure_entry .menu23.config.f.x6 disabled {y n l}} + global CONFIG_SPICTRL_ODMODE + if {($CONFIG_SPICTRL_ENABLE == 1)} then { + configure_entry .menu23.config.f.x7 normal {n l y}} else {configure_entry .menu23.config.f.x7 disabled {y n l}} + global CONFIG_SPICTRL_TWEN + if {($CONFIG_SPICTRL_ENABLE == 1)} then { + configure_entry .menu23.config.f.x8 normal {n l y}} else {configure_entry .menu23.config.f.x8 disabled {y n l}} + global CONFIG_SPICTRL_MAXWLEN + 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} + global CONFIG_SPICTRL_SYNCRAM + if {($CONFIG_SPICTRL_ENABLE == 1)} then { + configure_entry .menu23.config.f.x10 normal {n l y}} else {configure_entry .menu23.config.f.x10 disabled {y n l}} + 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}} +} + + +proc update_define_menu23 {} { + update_define_mainmenu + global CONFIG_MODULES + global CONFIG_SPICTRL_ENABLE + global CONFIG_SPICTRL_NUM + if {($CONFIG_SPICTRL_ENABLE == 1)} then {validate_int CONFIG_SPICTRL_NUM "$CONFIG_SPICTRL_NUM" 1} + global CONFIG_SPICTRL_SLVS + if {($CONFIG_SPICTRL_ENABLE == 1)} then {validate_int CONFIG_SPICTRL_SLVS "$CONFIG_SPICTRL_SLVS" 1} + global CONFIG_SPICTRL_FIFO + if {($CONFIG_SPICTRL_ENABLE == 1)} then {validate_int CONFIG_SPICTRL_FIFO "$CONFIG_SPICTRL_FIFO" 1} + global CONFIG_SPICTRL_SLVREG + if {($CONFIG_SPICTRL_ENABLE == 1)} then { + set CONFIG_SPICTRL_SLVREG [expr $CONFIG_SPICTRL_SLVREG&15]} else {set CONFIG_SPICTRL_SLVREG [expr $CONFIG_SPICTRL_SLVREG|16]} + global CONFIG_SPICTRL_ASEL + if {($CONFIG_SPICTRL_ENABLE == 1)} then { + set CONFIG_SPICTRL_ASEL [expr $CONFIG_SPICTRL_ASEL&15]} else {set CONFIG_SPICTRL_ASEL [expr $CONFIG_SPICTRL_ASEL|16]} + global CONFIG_SPICTRL_AM + if {($CONFIG_SPICTRL_ENABLE == 1)} then { + set CONFIG_SPICTRL_AM [expr $CONFIG_SPICTRL_AM&15]} else {set CONFIG_SPICTRL_AM [expr $CONFIG_SPICTRL_AM|16]} + global CONFIG_SPICTRL_ODMODE + if {($CONFIG_SPICTRL_ENABLE == 1)} then { + set CONFIG_SPICTRL_ODMODE [expr $CONFIG_SPICTRL_ODMODE&15]} else {set CONFIG_SPICTRL_ODMODE [expr $CONFIG_SPICTRL_ODMODE|16]} + global CONFIG_SPICTRL_TWEN + if {($CONFIG_SPICTRL_ENABLE == 1)} then { + set CONFIG_SPICTRL_TWEN [expr $CONFIG_SPICTRL_TWEN&15]} else {set CONFIG_SPICTRL_TWEN [expr $CONFIG_SPICTRL_TWEN|16]} + global CONFIG_SPICTRL_MAXWLEN + if {($CONFIG_SPICTRL_ENABLE == 1)} then {validate_int CONFIG_SPICTRL_MAXWLEN "$CONFIG_SPICTRL_MAXWLEN" 0} + global CONFIG_SPICTRL_SYNCRAM + if {($CONFIG_SPICTRL_ENABLE == 1)} then { + set CONFIG_SPICTRL_SYNCRAM [expr $CONFIG_SPICTRL_SYNCRAM&15]} else {set CONFIG_SPICTRL_SYNCRAM [expr $CONFIG_SPICTRL_SYNCRAM|16]} + global tmpvar_30 + global CONFIG_SPICTRL_NOFT + if {$tmpvar_30 == "None"} then {set CONFIG_SPICTRL_NOFT 1} else {set CONFIG_SPICTRL_NOFT 0} + global CONFIG_SPICTRL_DMRFT + if {$tmpvar_30 == "Parity-DMR"} then {set CONFIG_SPICTRL_DMRFT 1} else {set CONFIG_SPICTRL_DMRFT 0} + global CONFIG_SPICTRL_TMRFT + if {$tmpvar_30 == "TMR"} then {set CONFIG_SPICTRL_TMRFT 1} else {set CONFIG_SPICTRL_TMRFT 0} +} + + +menu_option menu24 24 "VHDL Debugging " +proc menu24 {w title} { + set oldFocus [focus] + catch {destroy $w; unregister_active 24} + toplevel $w -class Dialog + wm withdraw $w + global active_menus + set active_menus [lsort -integer [linsert $active_menus end 24]] + message $w.m -width 400 -aspect 300 -text \ + "VHDL Debugging " -relief raised + pack $w.m -pady 10 -side top -padx 10 + wm title $w "VHDL Debugging " + + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 24; break" + set nextscript "catch {focus $oldFocus}; menu25 .menu25 \"$title\"" + frame $w.f + button $w.f.back -text "Main Menu" \ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 24" + button $w.f.next -text "Next" -underline 0\ + -width 15 -command $nextscript + $w.f.next configure -state disabled + bind all "puts \"no more menus\" " + button $w.f.prev -text "Prev" -underline 0\ + -width 15 -command "catch {focus $oldFocus}; destroy $w; unregister_active 24; menu23 .menu23 \"$title\"" + bind $w "catch {focus $oldFocus}; destroy $w; unregister_active 24; menu23 .menu23 \"$title\";break" + pack $w.f.back $w.f.next $w.f.prev -side left -expand on + pack $w.f -pady 10 -side bottom -anchor w -fill x + frame $w.topline -relief ridge -borderwidth 2 -height 2 + pack $w.topline -side top -fill x + + frame $w.botline -relief ridge -borderwidth 2 -height 2 + pack $w.botline -side bottom -fill x + + frame $w.config + pack $w.config -fill y -expand on + + scrollbar $w.config.vscroll -command "$w.config.canvas yview" + pack $w.config.vscroll -side right -fill y + + canvas $w.config.canvas -height 1\ + -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \ + -width [expr [winfo screenwidth .] * 1 / 2] + frame $w.config.f + bind $w "$w.config.canvas yview scroll 1 unit;break;" + bind $w "$w.config.canvas yview scroll -1 unit;break;" + bind $w "$w.config.canvas yview scroll 1 page;break;" + bind $w "$w.config.canvas yview scroll -1 page;break;" + bind $w "$w.config.canvas yview moveto 0;break;" + bind $w "$w.config.canvas yview moveto 1 ;break;" + pack $w.config.canvas -side right -fill y + + + bool $w.config.f 24 0 "Accelerated UART tracing " CONFIG_DEBUG_UART + + + + focus $w + update_active + global winx; global winy + set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30] + if {[winfo exists $w]} then {wm geometry $w +$winx+$winy} + update idletasks + if {[winfo exists $w]} then {$w.config.canvas create window 0 0 -anchor nw -window $w.config.f + + $w.config.canvas configure \ + -width [expr [winfo reqwidth $w.config.f] + 1]\ + -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \ + [expr [winfo reqheight $w.config.f] + 1]" + + set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]] + set scry [expr [winfo screenh $w] / 2] + set maxy [expr [winfo screenh $w] * 3 / 4] + set canvtotal [expr [winfo reqh $w.config.f] + 2] + if [expr $winy + $canvtotal < $maxy] { + $w.config.canvas configure -height $canvtotal + } else { + $w.config.canvas configure -height [expr $scry - $winy] + } + } + update idletasks + if {[winfo exists $w]} then { + wm maxsize $w [winfo width $w] [winfo screenheight $w] + wm minsize $w [winfo width $w] 100 + + wm deiconify $w +} +} + +proc update_menu24 {} { +} + + +proc update_define_menu24 {} { + update_define_mainmenu + global CONFIG_MODULES +} + + +proc update_mainmenu {} { +} + + +set tmpvar_0 "(not set)" +set CONFIG_SYN_INFERRED 0 +set CONFIG_SYN_STRATIX 0 +set CONFIG_SYN_STRATIXII 0 +set CONFIG_SYN_STRATIXIII 0 +set CONFIG_SYN_CYCLONEIII 0 +set CONFIG_SYN_ALTERA 0 +set CONFIG_SYN_AXCEL 0 +set CONFIG_SYN_AXDSP 0 +set CONFIG_SYN_PROASIC 0 +set CONFIG_SYN_PROASICPLUS 0 +set CONFIG_SYN_PROASIC3 0 +set CONFIG_SYN_PROASIC3E 0 +set CONFIG_SYN_PROASIC3L 0 +set CONFIG_SYN_IGLOO 0 +set CONFIG_SYN_FUSION 0 +set CONFIG_SYN_UT025CRH 0 +set CONFIG_SYN_UT130HBD 0 +set CONFIG_SYN_UT90NHBD 0 +set CONFIG_SYN_ATC18 0 +set CONFIG_SYN_ATC18RHA 0 +set CONFIG_SYN_CMOS9SF 0 +set CONFIG_SYN_CUSTOM1 0 +set CONFIG_SYN_EASIC90 0 +set CONFIG_SYN_EASIC45 0 +set CONFIG_SYN_IHP25 0 +set CONFIG_SYN_IHP25RH 0 +set CONFIG_SYN_LATTICE 0 +set CONFIG_SYN_ECLIPSE 0 +set CONFIG_SYN_PEREGRINE 0 +set CONFIG_SYN_RH_LIB18T 0 +set CONFIG_SYN_RHUMC 0 +set CONFIG_SYN_SMIC13 0 +set CONFIG_SYN_TM65GPLUS 0 +set CONFIG_SYN_TSMC90 0 +set CONFIG_SYN_UMC 0 +set CONFIG_SYN_SPARTAN2 0 +set CONFIG_SYN_SPARTAN3 0 +set CONFIG_SYN_SPARTAN3E 0 +set CONFIG_SYN_SPARTAN6 0 +set CONFIG_SYN_VIRTEX 0 +set CONFIG_SYN_VIRTEXE 0 +set CONFIG_SYN_VIRTEX2 0 +set CONFIG_SYN_VIRTEX4 0 +set CONFIG_SYN_VIRTEX5 0 +set CONFIG_SYN_VIRTEX6 0 +set tmpvar_1 "(not set)" +set CONFIG_MEM_INFERRED 0 +set CONFIG_MEM_UMC 0 +set CONFIG_MEM_RHUMC 0 +set CONFIG_MEM_ARTISAN 0 +set CONFIG_MEM_CUSTOM1 0 +set CONFIG_MEM_VIRAGE 0 +set CONFIG_MEM_VIRAGE90 0 +set CONFIG_SYN_INFER_RAM 0 +set CONFIG_SYN_INFER_PADS 0 +set CONFIG_SYN_NO_ASYNC 0 +set CONFIG_SYN_SCAN 0 +set tmpvar_2 "(not set)" +set CONFIG_CLK_INFERRED 0 +set CONFIG_CLK_HCLKBUF 0 +set CONFIG_CLK_UT130HBD 0 +set CONFIG_CLK_ALTDLL 0 +set CONFIG_CLK_LATDLL 0 +set CONFIG_CLK_PRO3PLL 0 +set CONFIG_CLK_PRO3EPLL 0 +set CONFIG_CLK_PRO3LPLL 0 +set CONFIG_CLK_FUSPLL 0 +set CONFIG_CLK_LIB18T 0 +set CONFIG_CLK_RHUMC 0 +set CONFIG_CLK_CLKDLL 0 +set CONFIG_CLK_DCM 0 +set CONFIG_CLK_MUL 2 +set CONFIG_CLK_DIV 2 +set CONFIG_OCLK_DIV 1 +set CONFIG_OCLKB_DIV 0 +set CONFIG_OCLKC_DIV 0 +set CONFIG_PCI_CLKDLL 0 +set CONFIG_CLK_NOFB 0 +set CONFIG_PCI_SYSCLK 0 +set CONFIG_LEON3 0 +set CONFIG_PROC_NUM 1 +set CONFIG_IU_NWINDOWS 8 +set CONFIG_IU_V8MULDIV 0 +set tmpvar_3 "(not set)" +set CONFIG_IU_MUL_LATENCY_2 0 +set CONFIG_IU_MUL_LATENCY_4 0 +set CONFIG_IU_MUL_LATENCY_5 0 +set CONFIG_IU_MUL_MAC 0 +set tmpvar_4 "(not set)" +set CONFIG_IU_MUL_INFERRED 0 +set CONFIG_IU_MUL_MODGEN 0 +set CONFIG_IU_MUL_TECHSPEC 0 +set CONFIG_IU_MUL_DW 0 +set CONFIG_IU_BP 0 +set CONFIG_IU_SVT 0 +set CONFIG_NOTAG 0 +set CONFIG_IU_LDELAY 1 +set CONFIG_IU_WATCHPOINTS 0 +set CONFIG_PWD 0 +set CONFIG_IU_RSTADDR 00000 +set CONFIG_FPU_ENABLE 0 +set tmpvar_5 "(not set)" +set CONFIG_FPU_GRFPU 0 +set CONFIG_FPU_GRFPULITE 0 +set CONFIG_FPU_MEIKO 0 +set tmpvar_6 "(not set)" +set CONFIG_FPU_GRFPU_INFMUL 0 +set CONFIG_FPU_GRFPU_DWMUL 0 +set CONFIG_FPU_GRFPU_MODGEN 0 +set CONFIG_FPU_GRFPU_TECHSPEC 0 +set CONFIG_FPU_GRFPU_SH 0 +set tmpvar_7 "(not set)" +set CONFIG_FPU_GRFPC0 0 +set CONFIG_FPU_GRFPC1 0 +set CONFIG_FPU_GRFPC2 0 +set CONFIG_FPU_NETLIST 0 +set CONFIG_ICACHE_ENABLE 0 +set tmpvar_8 "(not set)" +set CONFIG_ICACHE_ASSO1 0 +set CONFIG_ICACHE_ASSO2 0 +set CONFIG_ICACHE_ASSO3 0 +set CONFIG_ICACHE_ASSO4 0 +set tmpvar_9 "(not set)" +set CONFIG_ICACHE_SZ1 0 +set CONFIG_ICACHE_SZ2 0 +set CONFIG_ICACHE_SZ4 0 +set CONFIG_ICACHE_SZ8 0 +set CONFIG_ICACHE_SZ16 0 +set CONFIG_ICACHE_SZ32 0 +set CONFIG_ICACHE_SZ64 0 +set CONFIG_ICACHE_SZ128 0 +set CONFIG_ICACHE_SZ256 0 +set tmpvar_10 "(not set)" +set CONFIG_ICACHE_LZ16 0 +set CONFIG_ICACHE_LZ32 0 +set tmpvar_11 "(not set)" +set CONFIG_ICACHE_ALGORND 0 +set CONFIG_ICACHE_ALGODIR 0 +set CONFIG_ICACHE_ALGOLRR 0 +set CONFIG_ICACHE_ALGOLRU 0 +set CONFIG_ICACHE_LOCK 0 +set CONFIG_ICACHE_LRAM 0 +set tmpvar_12 "(not set)" +set CONFIG_ICACHE_LRAM_SZ1 0 +set CONFIG_ICACHE_LRAM_SZ2 0 +set CONFIG_ICACHE_LRAM_SZ4 0 +set CONFIG_ICACHE_LRAM_SZ8 0 +set CONFIG_ICACHE_LRAM_SZ16 0 +set CONFIG_ICACHE_LRAM_SZ32 0 +set CONFIG_ICACHE_LRAM_SZ64 0 +set CONFIG_ICACHE_LRAM_SZ128 0 +set CONFIG_ICACHE_LRAM_SZ256 0 +set CONFIG_ICACHE_LRSTART 8e +set CONFIG_DCACHE_ENABLE 0 +set tmpvar_13 "(not set)" +set CONFIG_DCACHE_ASSO1 0 +set CONFIG_DCACHE_ASSO2 0 +set CONFIG_DCACHE_ASSO3 0 +set CONFIG_DCACHE_ASSO4 0 +set tmpvar_14 "(not set)" +set CONFIG_DCACHE_SZ1 0 +set CONFIG_DCACHE_SZ2 0 +set CONFIG_DCACHE_SZ4 0 +set CONFIG_DCACHE_SZ8 0 +set CONFIG_DCACHE_SZ16 0 +set CONFIG_DCACHE_SZ32 0 +set CONFIG_DCACHE_SZ64 0 +set CONFIG_DCACHE_SZ128 0 +set CONFIG_DCACHE_SZ256 0 +set tmpvar_15 "(not set)" +set CONFIG_DCACHE_LZ16 0 +set CONFIG_DCACHE_LZ32 0 +set tmpvar_16 "(not set)" +set CONFIG_DCACHE_ALGORND 0 +set CONFIG_DCACHE_ALGODIR 0 +set CONFIG_DCACHE_ALGOLRR 0 +set CONFIG_DCACHE_ALGOLRU 0 +set CONFIG_DCACHE_LOCK 0 +set CONFIG_DCACHE_SNOOP 0 +set CONFIG_DCACHE_SNOOP_FAST 0 +set CONFIG_DCACHE_SNOOP_SEPTAG 0 +set CONFIG_CACHE_FIXED 0 +set CONFIG_DCACHE_LRAM 0 +set tmpvar_17 "(not set)" +set CONFIG_DCACHE_LRAM_SZ1 0 +set CONFIG_DCACHE_LRAM_SZ2 0 +set CONFIG_DCACHE_LRAM_SZ4 0 +set CONFIG_DCACHE_LRAM_SZ8 0 +set CONFIG_DCACHE_LRAM_SZ16 0 +set CONFIG_DCACHE_LRAM_SZ32 0 +set CONFIG_DCACHE_LRAM_SZ64 0 +set CONFIG_DCACHE_LRAM_SZ128 0 +set CONFIG_DCACHE_LRAM_SZ256 0 +set CONFIG_DCACHE_LRSTART 8f +set CONFIG_MMU_ENABLE 0 +set tmpvar_18 "(not set)" +set CONFIG_MMU_COMBINED 0 +set CONFIG_MMU_SPLIT 0 +set tmpvar_19 "(not set)" +set CONFIG_MMU_REPARRAY 0 +set CONFIG_MMU_REPINCREMENT 0 +set tmpvar_20 "(not set)" +set CONFIG_MMU_I2 0 +set CONFIG_MMU_I4 0 +set CONFIG_MMU_I8 0 +set CONFIG_MMU_I16 0 +set CONFIG_MMU_I32 0 +set tmpvar_21 "(not set)" +set CONFIG_MMU_D2 0 +set CONFIG_MMU_D4 0 +set CONFIG_MMU_D8 0 +set CONFIG_MMU_D16 0 +set CONFIG_MMU_D32 0 +set CONFIG_MMU_FASTWB 0 +set tmpvar_22 "(not set)" +set CONFIG_MMU_PAGE_4K 0 +set CONFIG_MMU_PAGE_8K 0 +set CONFIG_MMU_PAGE_16K 0 +set CONFIG_MMU_PAGE_32K 0 +set CONFIG_MMU_PAGE_PROG 0 +set CONFIG_DSU_ENABLE 0 +set CONFIG_DSU_ITRACE 0 +set tmpvar_23 "(not set)" +set CONFIG_DSU_ITRACESZ1 0 +set CONFIG_DSU_ITRACESZ2 0 +set CONFIG_DSU_ITRACESZ4 0 +set CONFIG_DSU_ITRACESZ8 0 +set CONFIG_DSU_ITRACESZ16 0 +set CONFIG_DSU_ATRACE 0 +set tmpvar_24 "(not set)" +set CONFIG_DSU_ATRACESZ1 0 +set CONFIG_DSU_ATRACESZ2 0 +set CONFIG_DSU_ATRACESZ4 0 +set CONFIG_DSU_ATRACESZ8 0 +set CONFIG_DSU_ATRACESZ16 0 +set CONFIG_LEON3FT_EN 0 +set tmpvar_25 "(not set)" +set CONFIG_IUFT_NONE 0 +set CONFIG_IUFT_PAR 0 +set CONFIG_IUFT_DMR 0 +set CONFIG_IUFT_BCH 0 +set CONFIG_IUFT_TMR 0 +set CONFIG_FPUFT_EN 0 +set CONFIG_RF_ERRINJ 0 +set CONFIG_CACHE_FT_EN 0 +set CONFIG_CACHE_ERRINJ 0 +set CONFIG_LEON3_NETLIST 0 +set CONFIG_IU_DISAS 0 +set CONFIG_IU_DISAS_NET 0 +set CONFIG_DEBUG_PC32 0 +set CONFIG_AHB_DEFMST 0 +set CONFIG_AHB_RROBIN 0 +set CONFIG_AHB_SPLIT 0 +set CONFIG_AHB_IOADDR FFF +set CONFIG_APB_HADDR 800 +set CONFIG_AHB_MON 0 +set CONFIG_AHB_MONERR 0 +set CONFIG_AHB_MONWAR 0 +set CONFIG_AHB_DTRACE 0 +set CONFIG_DSU_JTAG 0 +set CONFIG_DSU_ETH 0 +set tmpvar_26 "(not set)" +set CONFIG_DSU_ETHSZ1 0 +set CONFIG_DSU_ETHSZ2 0 +set CONFIG_DSU_ETHSZ4 0 +set CONFIG_DSU_ETHSZ8 0 +set CONFIG_DSU_ETHSZ16 0 +set CONFIG_DSU_IPMSB C0A8 +set CONFIG_DSU_IPLSB 0033 +set CONFIG_DSU_ETHMSB 020000 +set CONFIG_DSU_ETHLSB 000000 +set CONFIG_DSU_ETH_PROG 0 +set CONFIG_DSU_ETH_DIS 0 +set CONFIG_MCTRL_LEON2 0 +set CONFIG_MCTRL_8BIT 0 +set CONFIG_MCTRL_16BIT 0 +set CONFIG_MCTRL_5CS 0 +set CONFIG_MCTRL_SDRAM 0 +set CONFIG_MCTRL_SDRAM_SEPBUS 0 +set CONFIG_MCTRL_SDRAM_BUS64 0 +set CONFIG_MCTRL_SDRAM_INVCLK 0 +set CONFIG_MCTRL_PAGE 0 +set CONFIG_MCTRL_PROGPAGE 0 +set CONFIG_MIG_DDR2 0 +set CONFIG_MIG_RANKS 1 +set CONFIG_MIG_COLBITS 10 +set CONFIG_MIG_ROWBITS 13 +set CONFIG_MIG_BANKBITS 2 +set CONFIG_MIG_HMASK F00 +set CONFIG_AHBSTAT_ENABLE 0 +set CONFIG_AHBSTAT_NFTSLV 1 +set CONFIG_AHBROM_ENABLE 0 +set CONFIG_AHBROM_START 000 +set CONFIG_AHBROM_PIPE 0 +set CONFIG_AHBRAM_ENABLE 0 +set tmpvar_27 "(not set)" +set CONFIG_AHBRAM_SZ1 0 +set CONFIG_AHBRAM_SZ2 0 +set CONFIG_AHBRAM_SZ4 0 +set CONFIG_AHBRAM_SZ8 0 +set CONFIG_AHBRAM_SZ16 0 +set CONFIG_AHBRAM_SZ32 0 +set CONFIG_AHBRAM_SZ64 0 +set CONFIG_AHBRAM_START A00 +set CONFIG_GRETH_ENABLE 0 +set CONFIG_GRETH_GIGA 0 +set tmpvar_28 "(not set)" +set CONFIG_GRETH_FIFO4 0 +set CONFIG_GRETH_FIFO8 0 +set CONFIG_GRETH_FIFO16 0 +set CONFIG_GRETH_FIFO32 0 +set CONFIG_GRETH_FIFO64 0 +set CONFIG_UART1_ENABLE 0 +set tmpvar_29 "(not set)" +set CONFIG_UA1_FIFO1 0 +set CONFIG_UA1_FIFO2 0 +set CONFIG_UA1_FIFO4 0 +set CONFIG_UA1_FIFO8 0 +set CONFIG_UA1_FIFO16 0 +set CONFIG_UA1_FIFO32 0 +set CONFIG_IRQ3_ENABLE 0 +set CONFIG_IRQ3_SEC 0 +set CONFIG_IRQ3_NSEC 12 +set CONFIG_GPT_ENABLE 0 +set CONFIG_GPT_NTIM 2 +set CONFIG_GPT_SW 8 +set CONFIG_GPT_TW 32 +set CONFIG_GPT_IRQ 8 +set CONFIG_GPT_SEPIRQ 0 +set CONFIG_GPT_WDOGEN 0 +set CONFIG_GPT_WDOG FFFF +set CONFIG_GRGPIO_ENABLE 0 +set CONFIG_GRGPIO_WIDTH 8 +set CONFIG_GRGPIO_IMASK 0000 +set CONFIG_KBD_ENABLE 0 +set CONFIG_VGA_ENABLE 0 +set CONFIG_SVGA_ENABLE 0 +set CONFIG_SPIMCTRL 0 +set CONFIG_SPIMCTRL_SDCARD 0 +set CONFIG_SPIMCTRL_READCMD 0B +set CONFIG_SPIMCTRL_DUMMYBYTE 0 +set CONFIG_SPIMCTRL_DUALOUTPUT 0 +set CONFIG_SPIMCTRL_SCALER 1 +set CONFIG_SPIMCTRL_ASCALER 8 +set CONFIG_SPIMCTRL_PWRUPCNT 0 +set CONFIG_SPICTRL_ENABLE 0 +set CONFIG_SPICTRL_NUM 1 +set CONFIG_SPICTRL_SLVS 1 +set CONFIG_SPICTRL_FIFO 1 +set CONFIG_SPICTRL_SLVREG 0 +set CONFIG_SPICTRL_ASEL 0 +set CONFIG_SPICTRL_AM 0 +set CONFIG_SPICTRL_ODMODE 0 +set CONFIG_SPICTRL_TWEN 0 +set CONFIG_SPICTRL_MAXWLEN 0 +set CONFIG_SPICTRL_SYNCRAM 0 +set tmpvar_30 "(not set)" +set CONFIG_SPICTRL_NOFT 0 +set CONFIG_SPICTRL_DMRFT 0 +set CONFIG_SPICTRL_TMRFT 0 +set CONFIG_DEBUG_UART 0 +set CONFIG_LEON3FT_PRESENT 4 +set CONFIG_HAS_SHARED_GRFPU 4 +set CONFIG_SYN_ARTISAN 4 +set CONFIG_PCI_ENABLE 4 +set CONFIG_MODULES 4 +proc writeconfig {file1 file2} { + set cfg [open $file1 w] + set autocfg [open $file2 w] + set notmod 1 + set notset 0 + puts $cfg "#" + puts $cfg "# Automatically generated make config: don't edit" + puts $cfg "#" + puts $autocfg "/*" + puts $autocfg " * Automatically generated C config: don't edit" + puts $autocfg " */" + puts $autocfg "#define AUTOCONF_INCLUDED" + global CONFIG_LEON3FT_PRESENT + global CONSTANT_Y + write_tristate $cfg $autocfg CONFIG_LEON3FT_PRESENT $CONFIG_LEON3FT_PRESENT [list $notmod] 2 + global CONFIG_HAS_SHARED_GRFPU + write_tristate $cfg $autocfg CONFIG_HAS_SHARED_GRFPU $CONFIG_HAS_SHARED_GRFPU [list $notmod] 2 + write_comment $cfg $autocfg "Synthesis " + global tmpvar_0 + + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + global tmpvar_1 + global CONFIG_SYN_INFERRED + global CONFIG_SYN_CUSTOM1 + global CONFIG_SYN_ATC18 + global CONFIG_SYN_TSMC90 + global CONFIG_SYN_UMC + global CONFIG_SYN_RHUMC + global CONFIG_SYN_ARTISAN + 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 { + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 }} + global CONFIG_SYN_INFER_RAM + if {($CONFIG_SYN_INFERRED != 1)} then {write_tristate $cfg $autocfg CONFIG_SYN_INFER_RAM $CONFIG_SYN_INFER_RAM [list $notmod] 2 } + global CONFIG_SYN_INFER_PADS + if {($CONFIG_SYN_INFERRED != 1)} then {write_tristate $cfg $autocfg CONFIG_SYN_INFER_PADS $CONFIG_SYN_INFER_PADS [list $notmod] 2 } + global CONFIG_SYN_NO_ASYNC + write_tristate $cfg $autocfg CONFIG_SYN_NO_ASYNC $CONFIG_SYN_NO_ASYNC [list $notmod] 2 + global CONFIG_SYN_SCAN + write_tristate $cfg $autocfg CONFIG_SYN_SCAN $CONFIG_SYN_SCAN [list $notmod] 2 + write_comment $cfg $autocfg "Clock generation" + global tmpvar_2 + + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + global CONFIG_CLK_MUL + global CONFIG_CLK_DCM + global CONFIG_CLK_ALTDLL + global CONFIG_CLK_LATDLL + global CONFIG_CLK_PRO3PLL + global CONFIG_CLK_PRO3EPLL + global CONFIG_CLK_PRO3LPLL + global CONFIG_CLK_CLKDLL + global CONFIG_CLK_LIB18T + global CONFIG_CLK_FUSPLL + 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 } + global CONFIG_CLK_DIV + 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 } + global CONFIG_OCLK_DIV + 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 } + global CONFIG_OCLKB_DIV + 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 } + global CONFIG_OCLKC_DIV + 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 } + global CONFIG_PCI_CLKDLL + if {($CONFIG_CLK_CLKDLL == 1 || $CONFIG_CLK_DCM == 1)} then {write_tristate $cfg $autocfg CONFIG_PCI_CLKDLL $CONFIG_PCI_CLKDLL [list $notmod] 2 } + global CONFIG_CLK_NOFB + if {($CONFIG_CLK_DCM == 1)} then {write_tristate $cfg $autocfg CONFIG_CLK_NOFB $CONFIG_CLK_NOFB [list $notmod] 2 } + global CONFIG_PCI_SYSCLK + global CONFIG_PCI_ENABLE + if {($CONFIG_PCI_ENABLE != 1)} then {write_tristate $cfg $autocfg CONFIG_PCI_SYSCLK $CONFIG_PCI_SYSCLK [list $notmod] 2 } + global CONFIG_LEON3 + write_tristate $cfg $autocfg CONFIG_LEON3 $CONFIG_LEON3 [list $notmod] 2 + global CONFIG_PROC_NUM + if {($CONFIG_LEON3 == 1)} then {write_int $cfg $autocfg CONFIG_PROC_NUM $CONFIG_PROC_NUM $notmod } + if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "Processor "} + if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "Integer unit "} + global CONFIG_IU_NWINDOWS + if {($CONFIG_LEON3 == 1)} then {write_int $cfg $autocfg CONFIG_IU_NWINDOWS $CONFIG_IU_NWINDOWS $notmod } + global CONFIG_IU_V8MULDIV + if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_IU_V8MULDIV $CONFIG_IU_V8MULDIV [list $notmod] 2 } + global tmpvar_3 + if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_V8MULDIV == 1)} then { + 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 } + 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 } + 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 }} + global CONFIG_IU_MUL_MAC + global CONFIG_IU_MUL_LATENCY_4 + global CONFIG_IU_MUL_LATENCY_5 + 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 } + global tmpvar_4 + if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_V8MULDIV == 1)} then { + 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 } + 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 } + 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 } + 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 }} + global CONFIG_IU_BP + if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_IU_BP $CONFIG_IU_BP [list $notmod] 2 } + global CONFIG_IU_SVT + if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_IU_SVT $CONFIG_IU_SVT [list $notmod] 2 } + global CONFIG_NOTAG + if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_NOTAG $CONFIG_NOTAG [list $notmod] 2 } + global CONFIG_IU_LDELAY + if {($CONFIG_LEON3 == 1)} then {write_int $cfg $autocfg CONFIG_IU_LDELAY $CONFIG_IU_LDELAY $notmod } + global CONFIG_IU_WATCHPOINTS + if {($CONFIG_LEON3 == 1)} then {write_int $cfg $autocfg CONFIG_IU_WATCHPOINTS $CONFIG_IU_WATCHPOINTS $notmod } + global CONFIG_PWD + if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_PWD $CONFIG_PWD [list $notmod] 2 } + global CONFIG_IU_RSTADDR + if {($CONFIG_LEON3 == 1)} then {write_hex $cfg $autocfg CONFIG_IU_RSTADDR $CONFIG_IU_RSTADDR $notmod } + if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "Floating-point unit"} + global CONFIG_FPU_ENABLE + if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_FPU_ENABLE $CONFIG_FPU_ENABLE [list $notmod] 2 } + global tmpvar_5 + if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1)} then { + 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 } + 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 } + 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 }} + global tmpvar_6 + global CONFIG_FPU_GRFPU + if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1) && ($CONFIG_FPU_GRFPU == 1)} then { + 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 } + 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 } + 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 } + 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 }} + global CONFIG_FPU_GRFPU_SH + 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 } + global tmpvar_7 + global CONFIG_FPU_GRFPULITE + if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1) && ($CONFIG_FPU_GRFPULITE == 1)} then { + 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 } + 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 } + 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 }} + global CONFIG_FPU_NETLIST + if {($CONFIG_LEON3 == 1) && ($CONFIG_FPU_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_FPU_NETLIST $CONFIG_FPU_NETLIST [list $notmod] 2 } + if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "Cache system"} + global CONFIG_ICACHE_ENABLE + if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_ICACHE_ENABLE $CONFIG_ICACHE_ENABLE [list $notmod] 2 } + global tmpvar_8 + if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1)} then { + 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 } + 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 } + 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 } + 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 }} + global tmpvar_9 + if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1)} then { + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 }} + global tmpvar_10 + if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1)} then { + 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 } + 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 }} + global tmpvar_11 + global CONFIG_ICACHE_ASSO1 + if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1) && ($CONFIG_ICACHE_ASSO1 != 1)} then { + 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 } + 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 } + 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 } + 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 }} + global CONFIG_ICACHE_LOCK + 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 } + global CONFIG_ICACHE_LRAM + global CONFIG_MMU_ENABLE + if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE != 1)} then {write_tristate $cfg $autocfg CONFIG_ICACHE_LRAM $CONFIG_ICACHE_LRAM [list $notmod] 2 } + global tmpvar_12 + if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_LRAM == 1)} then { + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 }} + global CONFIG_ICACHE_LRSTART + if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_LRAM == 1)} then {write_hex $cfg $autocfg CONFIG_ICACHE_LRSTART $CONFIG_ICACHE_LRSTART $notmod } + global CONFIG_DCACHE_ENABLE + if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_DCACHE_ENABLE $CONFIG_DCACHE_ENABLE [list $notmod] 2 } + global tmpvar_13 + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then { + 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 } + 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 } + 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 } + 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 }} + global tmpvar_14 + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then { + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 }} + global tmpvar_15 + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then { + 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 } + 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 }} + global tmpvar_16 + global CONFIG_DCACHE_ASSO1 + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1) && ($CONFIG_DCACHE_ASSO1 != 1)} then { + 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 } + 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 } + 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 } + 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 }} + global CONFIG_DCACHE_LOCK + 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 } + global CONFIG_DCACHE_SNOOP + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_DCACHE_SNOOP $CONFIG_DCACHE_SNOOP [list $notmod] 2 } + global CONFIG_DCACHE_SNOOP_FAST + 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 } + global CONFIG_DCACHE_SNOOP_SEPTAG + 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 } + global CONFIG_CACHE_FIXED + if {($CONFIG_LEON3 == 1) && ($CONFIG_ICACHE_ENABLE == 1 || $CONFIG_DCACHE_ENABLE == 1)} then {write_hex $cfg $autocfg CONFIG_CACHE_FIXED $CONFIG_CACHE_FIXED $notmod } + global CONFIG_DCACHE_LRAM + if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE != 1)} then {write_tristate $cfg $autocfg CONFIG_DCACHE_LRAM $CONFIG_DCACHE_LRAM [list $notmod] 2 } + global tmpvar_17 + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_LRAM == 1)} then { + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 }} + global CONFIG_DCACHE_LRSTART + if {($CONFIG_LEON3 == 1) && ($CONFIG_DCACHE_LRAM == 1)} then {write_hex $cfg $autocfg CONFIG_DCACHE_LRSTART $CONFIG_DCACHE_LRSTART $notmod } + if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "MMU"} + if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_MMU_ENABLE $CONFIG_MMU_ENABLE [list $notmod] 2 } + global tmpvar_18 + if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1)} then { + 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 } + 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 }} + global tmpvar_19 + if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1)} then { + 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 } + 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 }} + global tmpvar_20 + if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1)} then { + 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 } + 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 } + 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 } + 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 } + 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 }} + global tmpvar_21 + global CONFIG_MMU_SPLIT + if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1) && ($CONFIG_MMU_SPLIT == 1)} then { + 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 } + 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 } + 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 } + 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 } + 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 }} + global CONFIG_MMU_FASTWB + 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 } + global tmpvar_22 + if {($CONFIG_LEON3 == 1) && ($CONFIG_MMU_ENABLE == 1)} then { + 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 } + 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 } + 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 } + 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 } + 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 }} + if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "Debug Support Unit "} + global CONFIG_DSU_ENABLE + if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_DSU_ENABLE $CONFIG_DSU_ENABLE [list $notmod] 2 } + global CONFIG_DSU_ITRACE + if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_DSU_ITRACE $CONFIG_DSU_ITRACE [list $notmod] 2 } + global tmpvar_23 + if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1) && ($CONFIG_DSU_ITRACE == 1)} then { + 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 } + 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 } + 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 } + 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 } + 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 }} + global CONFIG_DSU_ATRACE + if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_DSU_ATRACE $CONFIG_DSU_ATRACE [list $notmod] 2 } + global tmpvar_24 + if {($CONFIG_LEON3 == 1) && ($CONFIG_DSU_ENABLE == 1) && ($CONFIG_DSU_ATRACE == 1)} then { + 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 } + 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 } + 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 } + 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 } + 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 }} + if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "Fault-tolerance "} + global CONFIG_LEON3FT_EN + if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_LEON3FT_EN $CONFIG_LEON3FT_EN [list $notmod] 2 } + global tmpvar_25 + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then { + 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 } + 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 } + 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 } + 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 } + 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 }} + global CONFIG_FPUFT_EN + 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 } + global CONFIG_RF_ERRINJ + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {write_tristate $cfg $autocfg CONFIG_RF_ERRINJ $CONFIG_RF_ERRINJ [list $notmod] 2 } + global CONFIG_CACHE_FT_EN + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {write_tristate $cfg $autocfg CONFIG_CACHE_FT_EN $CONFIG_CACHE_FT_EN [list $notmod] 2 } + global CONFIG_CACHE_ERRINJ + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {write_int $cfg $autocfg CONFIG_CACHE_ERRINJ $CONFIG_CACHE_ERRINJ $notmod } + global CONFIG_LEON3_NETLIST + if {($CONFIG_LEON3 == 1) && ($CONFIG_LEON3FT_EN == 1)} then {write_tristate $cfg $autocfg CONFIG_LEON3_NETLIST $CONFIG_LEON3_NETLIST [list $notmod] 2 } + if {($CONFIG_LEON3 == 1)} then {write_comment $cfg $autocfg "VHDL debug settings "} + global CONFIG_IU_DISAS + if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_IU_DISAS $CONFIG_IU_DISAS [list $notmod] 2 } + global CONFIG_IU_DISAS_NET + if {($CONFIG_LEON3 == 1) && ($CONFIG_IU_DISAS == 1)} then {write_tristate $cfg $autocfg CONFIG_IU_DISAS_NET $CONFIG_IU_DISAS_NET [list $notmod] 2 } + global CONFIG_DEBUG_PC32 + if {($CONFIG_LEON3 == 1)} then {write_tristate $cfg $autocfg CONFIG_DEBUG_PC32 $CONFIG_DEBUG_PC32 [list $notmod] 2 } + write_comment $cfg $autocfg "AMBA configuration" + global CONFIG_AHB_DEFMST + write_int $cfg $autocfg CONFIG_AHB_DEFMST $CONFIG_AHB_DEFMST $notmod + global CONFIG_AHB_RROBIN + write_tristate $cfg $autocfg CONFIG_AHB_RROBIN $CONFIG_AHB_RROBIN [list $notmod] 2 + global CONFIG_AHB_SPLIT + write_tristate $cfg $autocfg CONFIG_AHB_SPLIT $CONFIG_AHB_SPLIT [list $notmod] 2 + global CONFIG_AHB_IOADDR + write_hex $cfg $autocfg CONFIG_AHB_IOADDR $CONFIG_AHB_IOADDR $notmod + global CONFIG_APB_HADDR + write_hex $cfg $autocfg CONFIG_APB_HADDR $CONFIG_APB_HADDR $notmod + global CONFIG_AHB_MON + write_tristate $cfg $autocfg CONFIG_AHB_MON $CONFIG_AHB_MON [list $notmod] 2 + global CONFIG_AHB_MONERR + if {($CONFIG_AHB_MON == 1)} then {write_tristate $cfg $autocfg CONFIG_AHB_MONERR $CONFIG_AHB_MONERR [list $notmod] 2 } + global CONFIG_AHB_MONWAR + if {($CONFIG_AHB_MON == 1)} then {write_tristate $cfg $autocfg CONFIG_AHB_MONWAR $CONFIG_AHB_MONWAR [list $notmod] 2 } + global CONFIG_AHB_DTRACE + write_tristate $cfg $autocfg CONFIG_AHB_DTRACE $CONFIG_AHB_DTRACE [list $notmod] 2 + write_comment $cfg $autocfg "Debug Link " + global CONFIG_DSU_JTAG + write_tristate $cfg $autocfg CONFIG_DSU_JTAG $CONFIG_DSU_JTAG [list $notmod] 2 + global CONFIG_DSU_ETH + global CONFIG_GRETH_ENABLE + if {($CONFIG_GRETH_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_DSU_ETH $CONFIG_DSU_ETH [list $notmod] 2 } + global tmpvar_26 + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then { + 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 } + 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 } + 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 } + 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 } + 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 }} + global CONFIG_DSU_IPMSB + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {write_hex $cfg $autocfg CONFIG_DSU_IPMSB $CONFIG_DSU_IPMSB $notmod } + global CONFIG_DSU_IPLSB + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {write_hex $cfg $autocfg CONFIG_DSU_IPLSB $CONFIG_DSU_IPLSB $notmod } + global CONFIG_DSU_ETHMSB + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {write_hex $cfg $autocfg CONFIG_DSU_ETHMSB $CONFIG_DSU_ETHMSB $notmod } + global CONFIG_DSU_ETHLSB + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_DSU_ETH == 1)} then {write_hex $cfg $autocfg CONFIG_DSU_ETHLSB $CONFIG_DSU_ETHLSB $notmod } + global CONFIG_DSU_ETH_PROG + global CONFIG_GRETH_GIGA + 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 } + global CONFIG_DSU_ETH_DIS + 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 } + write_comment $cfg $autocfg "Peripherals " + write_comment $cfg $autocfg "Memory controller " + write_comment $cfg $autocfg "Leon2 memory controller " + global CONFIG_MCTRL_LEON2 + write_tristate $cfg $autocfg CONFIG_MCTRL_LEON2 $CONFIG_MCTRL_LEON2 [list $notmod] 2 + global CONFIG_MCTRL_8BIT + if {($CONFIG_MCTRL_LEON2 == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_8BIT $CONFIG_MCTRL_8BIT [list $notmod] 2 } + global CONFIG_MCTRL_16BIT + if {($CONFIG_MCTRL_LEON2 == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_16BIT $CONFIG_MCTRL_16BIT [list $notmod] 2 } + global CONFIG_MCTRL_5CS + if {($CONFIG_MCTRL_LEON2 == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_5CS $CONFIG_MCTRL_5CS [list $notmod] 2 } + global CONFIG_MCTRL_SDRAM + if {($CONFIG_MCTRL_LEON2 == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_SDRAM $CONFIG_MCTRL_SDRAM [list $notmod] 2 } + global CONFIG_MCTRL_SDRAM_SEPBUS + 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 } + global CONFIG_MCTRL_SDRAM_BUS64 + 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 } + global CONFIG_MCTRL_SDRAM_INVCLK + 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 } + global CONFIG_MCTRL_PAGE + if {($CONFIG_MCTRL_LEON2 == 1) && ($CONFIG_MCTRL_SDRAM == 1)} then {write_tristate $cfg $autocfg CONFIG_MCTRL_PAGE $CONFIG_MCTRL_PAGE [list $notmod] 2 } + global CONFIG_MCTRL_PROGPAGE + 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 } + write_comment $cfg $autocfg "MIG memory controller " + global CONFIG_MIG_DDR2 + write_tristate $cfg $autocfg CONFIG_MIG_DDR2 $CONFIG_MIG_DDR2 [list $notmod] 2 + global CONFIG_MIG_RANKS + if {($CONFIG_MIG_DDR2 == 1)} then {write_int $cfg $autocfg CONFIG_MIG_RANKS $CONFIG_MIG_RANKS $notmod } + global CONFIG_MIG_COLBITS + if {($CONFIG_MIG_DDR2 == 1)} then {write_int $cfg $autocfg CONFIG_MIG_COLBITS $CONFIG_MIG_COLBITS $notmod } + global CONFIG_MIG_ROWBITS + if {($CONFIG_MIG_DDR2 == 1)} then {write_int $cfg $autocfg CONFIG_MIG_ROWBITS $CONFIG_MIG_ROWBITS $notmod } + global CONFIG_MIG_BANKBITS + if {($CONFIG_MIG_DDR2 == 1)} then {write_int $cfg $autocfg CONFIG_MIG_BANKBITS $CONFIG_MIG_BANKBITS $notmod } + global CONFIG_MIG_HMASK + if {($CONFIG_MIG_DDR2 == 1)} then {write_hex $cfg $autocfg CONFIG_MIG_HMASK $CONFIG_MIG_HMASK $notmod } + global CONFIG_AHBSTAT_ENABLE + write_tristate $cfg $autocfg CONFIG_AHBSTAT_ENABLE $CONFIG_AHBSTAT_ENABLE [list $notmod] 2 + global CONFIG_AHBSTAT_NFTSLV + if {($CONFIG_AHBSTAT_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_AHBSTAT_NFTSLV $CONFIG_AHBSTAT_NFTSLV $notmod } + write_comment $cfg $autocfg "On-chip RAM/ROM " + global CONFIG_AHBROM_ENABLE + write_tristate $cfg $autocfg CONFIG_AHBROM_ENABLE $CONFIG_AHBROM_ENABLE [list $notmod] 2 + global CONFIG_AHBROM_START + if {($CONFIG_AHBROM_ENABLE == 1)} then {write_hex $cfg $autocfg CONFIG_AHBROM_START $CONFIG_AHBROM_START $notmod } + global CONFIG_AHBROM_PIPE + if {($CONFIG_AHBROM_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_AHBROM_PIPE $CONFIG_AHBROM_PIPE [list $notmod] 2 } + global CONFIG_AHBRAM_ENABLE + write_tristate $cfg $autocfg CONFIG_AHBRAM_ENABLE $CONFIG_AHBRAM_ENABLE [list $notmod] 2 + global tmpvar_27 + if {($CONFIG_AHBRAM_ENABLE == 1)} then { + 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 } + 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 } + 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 } + 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 } + 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 } + 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 } + 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 }} + global CONFIG_AHBRAM_START + if {($CONFIG_AHBRAM_ENABLE == 1)} then {write_hex $cfg $autocfg CONFIG_AHBRAM_START $CONFIG_AHBRAM_START $notmod } + write_comment $cfg $autocfg "Ethernet " + write_tristate $cfg $autocfg CONFIG_GRETH_ENABLE $CONFIG_GRETH_ENABLE [list $notmod] 2 + if {($CONFIG_GRETH_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_GRETH_GIGA $CONFIG_GRETH_GIGA [list $notmod] 2 } + global tmpvar_28 + if {($CONFIG_GRETH_ENABLE == 1) && ($CONFIG_GRETH_GIGA == 0)} then { + 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 } + 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 } + 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 } + 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 } + 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 }} + write_comment $cfg $autocfg "UART, timer, I/O port and interrupt controller" + global CONFIG_UART1_ENABLE + write_tristate $cfg $autocfg CONFIG_UART1_ENABLE $CONFIG_UART1_ENABLE [list $notmod] 2 + global tmpvar_29 + if {($CONFIG_UART1_ENABLE == 1)} then { + 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 } + 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 } + 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 } + 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 } + 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 } + 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 }} + global CONFIG_IRQ3_ENABLE + write_tristate $cfg $autocfg CONFIG_IRQ3_ENABLE $CONFIG_IRQ3_ENABLE [list $notmod] 2 + global CONFIG_IRQ3_SEC + if {($CONFIG_IRQ3_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_IRQ3_SEC $CONFIG_IRQ3_SEC [list $notmod] 2 } + global CONFIG_IRQ3_NSEC + if {($CONFIG_IRQ3_ENABLE == 1) && ($CONFIG_IRQ3_SEC == 1)} then {write_int $cfg $autocfg CONFIG_IRQ3_NSEC $CONFIG_IRQ3_NSEC $notmod } + global CONFIG_GPT_ENABLE + write_tristate $cfg $autocfg CONFIG_GPT_ENABLE $CONFIG_GPT_ENABLE [list $notmod] 2 + global CONFIG_GPT_NTIM + if {($CONFIG_GPT_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_GPT_NTIM $CONFIG_GPT_NTIM $notmod } + global CONFIG_GPT_SW + if {($CONFIG_GPT_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_GPT_SW $CONFIG_GPT_SW $notmod } + global CONFIG_GPT_TW + if {($CONFIG_GPT_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_GPT_TW $CONFIG_GPT_TW $notmod } + global CONFIG_GPT_IRQ + if {($CONFIG_GPT_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_GPT_IRQ $CONFIG_GPT_IRQ $notmod } + global CONFIG_GPT_SEPIRQ + if {($CONFIG_GPT_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_GPT_SEPIRQ $CONFIG_GPT_SEPIRQ [list $notmod] 2 } + global CONFIG_GPT_WDOGEN + if {($CONFIG_GPT_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_GPT_WDOGEN $CONFIG_GPT_WDOGEN [list $notmod] 2 } + global CONFIG_GPT_WDOG + if {($CONFIG_GPT_ENABLE == 1) && ($CONFIG_GPT_WDOGEN == 1)} then {write_hex $cfg $autocfg CONFIG_GPT_WDOG $CONFIG_GPT_WDOG $notmod } + global CONFIG_GRGPIO_ENABLE + write_tristate $cfg $autocfg CONFIG_GRGPIO_ENABLE $CONFIG_GRGPIO_ENABLE [list $notmod] 2 + global CONFIG_GRGPIO_WIDTH + if {($CONFIG_GRGPIO_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_GRGPIO_WIDTH $CONFIG_GRGPIO_WIDTH $notmod } + global CONFIG_GRGPIO_IMASK + if {($CONFIG_GRGPIO_ENABLE == 1)} then {write_hex $cfg $autocfg CONFIG_GRGPIO_IMASK $CONFIG_GRGPIO_IMASK $notmod } + write_comment $cfg $autocfg "Keybord and VGA interface" + global CONFIG_KBD_ENABLE + write_tristate $cfg $autocfg CONFIG_KBD_ENABLE $CONFIG_KBD_ENABLE [list $notmod] 2 + global CONFIG_VGA_ENABLE + write_tristate $cfg $autocfg CONFIG_VGA_ENABLE $CONFIG_VGA_ENABLE [list $notmod] 2 + global CONFIG_SVGA_ENABLE + if {($CONFIG_VGA_ENABLE == 0)} then {write_tristate $cfg $autocfg CONFIG_SVGA_ENABLE $CONFIG_SVGA_ENABLE [list $notmod] 2 } + write_comment $cfg $autocfg "SPI" + write_comment $cfg $autocfg "SPI memory controller " + global CONFIG_SPIMCTRL + write_tristate $cfg $autocfg CONFIG_SPIMCTRL $CONFIG_SPIMCTRL [list $notmod] 2 + global CONFIG_SPIMCTRL_SDCARD + if {($CONFIG_SPIMCTRL == 1)} then {write_tristate $cfg $autocfg CONFIG_SPIMCTRL_SDCARD $CONFIG_SPIMCTRL_SDCARD [list $notmod] 2 } + global CONFIG_SPIMCTRL_READCMD + if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then {write_hex $cfg $autocfg CONFIG_SPIMCTRL_READCMD $CONFIG_SPIMCTRL_READCMD $notmod } + global CONFIG_SPIMCTRL_DUMMYBYTE + if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then {write_tristate $cfg $autocfg CONFIG_SPIMCTRL_DUMMYBYTE $CONFIG_SPIMCTRL_DUMMYBYTE [list $notmod] 2 } + global CONFIG_SPIMCTRL_DUALOUTPUT + if {($CONFIG_SPIMCTRL == 1) && ($CONFIG_SPIMCTRL_SDCARD != 1)} then {write_tristate $cfg $autocfg CONFIG_SPIMCTRL_DUALOUTPUT $CONFIG_SPIMCTRL_DUALOUTPUT [list $notmod] 2 } + global CONFIG_SPIMCTRL_SCALER + if {($CONFIG_SPIMCTRL == 1)} then {write_int $cfg $autocfg CONFIG_SPIMCTRL_SCALER $CONFIG_SPIMCTRL_SCALER $notmod } + global CONFIG_SPIMCTRL_ASCALER + if {($CONFIG_SPIMCTRL == 1)} then {write_int $cfg $autocfg CONFIG_SPIMCTRL_ASCALER $CONFIG_SPIMCTRL_ASCALER $notmod } + global CONFIG_SPIMCTRL_PWRUPCNT + if {($CONFIG_SPIMCTRL == 1)} then {write_int $cfg $autocfg CONFIG_SPIMCTRL_PWRUPCNT $CONFIG_SPIMCTRL_PWRUPCNT $notmod } + write_comment $cfg $autocfg "SPI controller(s) " + global CONFIG_SPICTRL_ENABLE + write_tristate $cfg $autocfg CONFIG_SPICTRL_ENABLE $CONFIG_SPICTRL_ENABLE [list $notmod] 2 + global CONFIG_SPICTRL_NUM + if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_SPICTRL_NUM $CONFIG_SPICTRL_NUM $notmod } + global CONFIG_SPICTRL_SLVS + if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_SPICTRL_SLVS $CONFIG_SPICTRL_SLVS $notmod } + global CONFIG_SPICTRL_FIFO + if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_SPICTRL_FIFO $CONFIG_SPICTRL_FIFO $notmod } + global CONFIG_SPICTRL_SLVREG + if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_SPICTRL_SLVREG $CONFIG_SPICTRL_SLVREG [list $notmod] 2 } + global CONFIG_SPICTRL_ASEL + if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_SPICTRL_ASEL $CONFIG_SPICTRL_ASEL [list $notmod] 2 } + global CONFIG_SPICTRL_AM + if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_SPICTRL_AM $CONFIG_SPICTRL_AM [list $notmod] 2 } + global CONFIG_SPICTRL_ODMODE + if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_SPICTRL_ODMODE $CONFIG_SPICTRL_ODMODE [list $notmod] 2 } + global CONFIG_SPICTRL_TWEN + if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_SPICTRL_TWEN $CONFIG_SPICTRL_TWEN [list $notmod] 2 } + global CONFIG_SPICTRL_MAXWLEN + if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_int $cfg $autocfg CONFIG_SPICTRL_MAXWLEN $CONFIG_SPICTRL_MAXWLEN $notmod } + global CONFIG_SPICTRL_SYNCRAM + if {($CONFIG_SPICTRL_ENABLE == 1)} then {write_tristate $cfg $autocfg CONFIG_SPICTRL_SYNCRAM $CONFIG_SPICTRL_SYNCRAM [list $notmod] 2 } + global tmpvar_30 + if {($CONFIG_SPICTRL_ENABLE == 1) && ($CONFIG_SPICTRL_SYNCRAM == 1)} then { + 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 } + 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 } + 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 }} + write_comment $cfg $autocfg "VHDL Debugging " + global CONFIG_DEBUG_UART + write_tristate $cfg $autocfg CONFIG_DEBUG_UART $CONFIG_DEBUG_UART [list $notmod] 2 + close $cfg + close $autocfg +} + + +proc clear_choices { } { + global CONFIG_SYN_INFERRED; set CONFIG_SYN_INFERRED 0 + global CONFIG_SYN_STRATIX; set CONFIG_SYN_STRATIX 0 + global CONFIG_SYN_STRATIXII; set CONFIG_SYN_STRATIXII 0 + global CONFIG_SYN_STRATIXIII; set CONFIG_SYN_STRATIXIII 0 + global CONFIG_SYN_CYCLONEIII; set CONFIG_SYN_CYCLONEIII 0 + global CONFIG_SYN_ALTERA; set CONFIG_SYN_ALTERA 0 + global CONFIG_SYN_AXCEL; set CONFIG_SYN_AXCEL 0 + global CONFIG_SYN_AXDSP; set CONFIG_SYN_AXDSP 0 + global CONFIG_SYN_PROASIC; set CONFIG_SYN_PROASIC 0 + global CONFIG_SYN_PROASICPLUS; set CONFIG_SYN_PROASICPLUS 0 + global CONFIG_SYN_PROASIC3; set CONFIG_SYN_PROASIC3 0 + global CONFIG_SYN_PROASIC3E; set CONFIG_SYN_PROASIC3E 0 + global CONFIG_SYN_PROASIC3L; set CONFIG_SYN_PROASIC3L 0 + global CONFIG_SYN_IGLOO; set CONFIG_SYN_IGLOO 0 + global CONFIG_SYN_FUSION; set CONFIG_SYN_FUSION 0 + global CONFIG_SYN_UT025CRH; set CONFIG_SYN_UT025CRH 0 + global CONFIG_SYN_UT130HBD; set CONFIG_SYN_UT130HBD 0 + global CONFIG_SYN_UT90NHBD; set CONFIG_SYN_UT90NHBD 0 + global CONFIG_SYN_ATC18; set CONFIG_SYN_ATC18 0 + global CONFIG_SYN_ATC18RHA; set CONFIG_SYN_ATC18RHA 0 + global CONFIG_SYN_CMOS9SF; set CONFIG_SYN_CMOS9SF 0 + global CONFIG_SYN_CUSTOM1; set CONFIG_SYN_CUSTOM1 0 + global CONFIG_SYN_EASIC90; set CONFIG_SYN_EASIC90 0 + global CONFIG_SYN_EASIC45; set CONFIG_SYN_EASIC45 0 + global CONFIG_SYN_IHP25; set CONFIG_SYN_IHP25 0 + global CONFIG_SYN_IHP25RH; set CONFIG_SYN_IHP25RH 0 + global CONFIG_SYN_LATTICE; set CONFIG_SYN_LATTICE 0 + global CONFIG_SYN_ECLIPSE; set CONFIG_SYN_ECLIPSE 0 + global CONFIG_SYN_PEREGRINE; set CONFIG_SYN_PEREGRINE 0 + global CONFIG_SYN_RH_LIB18T; set CONFIG_SYN_RH_LIB18T 0 + global CONFIG_SYN_RHUMC; set CONFIG_SYN_RHUMC 0 + global CONFIG_SYN_SMIC13; set CONFIG_SYN_SMIC13 0 + global CONFIG_SYN_TM65GPLUS; set CONFIG_SYN_TM65GPLUS 0 + global CONFIG_SYN_TSMC90; set CONFIG_SYN_TSMC90 0 + global CONFIG_SYN_UMC; set CONFIG_SYN_UMC 0 + global CONFIG_SYN_SPARTAN2; set CONFIG_SYN_SPARTAN2 0 + global CONFIG_SYN_SPARTAN3; set CONFIG_SYN_SPARTAN3 0 + global CONFIG_SYN_SPARTAN3E; set CONFIG_SYN_SPARTAN3E 0 + global CONFIG_SYN_SPARTAN6; set CONFIG_SYN_SPARTAN6 0 + global CONFIG_SYN_VIRTEX; set CONFIG_SYN_VIRTEX 0 + global CONFIG_SYN_VIRTEXE; set CONFIG_SYN_VIRTEXE 0 + global CONFIG_SYN_VIRTEX2; set CONFIG_SYN_VIRTEX2 0 + global CONFIG_SYN_VIRTEX4; set CONFIG_SYN_VIRTEX4 0 + global CONFIG_SYN_VIRTEX5; set CONFIG_SYN_VIRTEX5 0 + global CONFIG_SYN_VIRTEX6; set CONFIG_SYN_VIRTEX6 0 + global CONFIG_MEM_INFERRED; set CONFIG_MEM_INFERRED 0 + global CONFIG_MEM_UMC; set CONFIG_MEM_UMC 0 + global CONFIG_MEM_RHUMC; set CONFIG_MEM_RHUMC 0 + global CONFIG_MEM_ARTISAN; set CONFIG_MEM_ARTISAN 0 + global CONFIG_MEM_CUSTOM1; set CONFIG_MEM_CUSTOM1 0 + global CONFIG_MEM_VIRAGE; set CONFIG_MEM_VIRAGE 0 + global CONFIG_MEM_VIRAGE90; set CONFIG_MEM_VIRAGE90 0 + global CONFIG_CLK_INFERRED; set CONFIG_CLK_INFERRED 0 + global CONFIG_CLK_HCLKBUF; set CONFIG_CLK_HCLKBUF 0 + global CONFIG_CLK_UT130HBD; set CONFIG_CLK_UT130HBD 0 + global CONFIG_CLK_ALTDLL; set CONFIG_CLK_ALTDLL 0 + global CONFIG_CLK_LATDLL; set CONFIG_CLK_LATDLL 0 + global CONFIG_CLK_PRO3PLL; set CONFIG_CLK_PRO3PLL 0 + global CONFIG_CLK_PRO3EPLL; set CONFIG_CLK_PRO3EPLL 0 + global CONFIG_CLK_PRO3LPLL; set CONFIG_CLK_PRO3LPLL 0 + global CONFIG_CLK_FUSPLL; set CONFIG_CLK_FUSPLL 0 + global CONFIG_CLK_LIB18T; set CONFIG_CLK_LIB18T 0 + global CONFIG_CLK_RHUMC; set CONFIG_CLK_RHUMC 0 + global CONFIG_CLK_CLKDLL; set CONFIG_CLK_CLKDLL 0 + global CONFIG_CLK_DCM; set CONFIG_CLK_DCM 0 + global CONFIG_IU_MUL_LATENCY_2; set CONFIG_IU_MUL_LATENCY_2 0 + global CONFIG_IU_MUL_LATENCY_4; set CONFIG_IU_MUL_LATENCY_4 0 + global CONFIG_IU_MUL_LATENCY_5; set CONFIG_IU_MUL_LATENCY_5 0 + global CONFIG_IU_MUL_INFERRED; set CONFIG_IU_MUL_INFERRED 0 + global CONFIG_IU_MUL_MODGEN; set CONFIG_IU_MUL_MODGEN 0 + global CONFIG_IU_MUL_TECHSPEC; set CONFIG_IU_MUL_TECHSPEC 0 + global CONFIG_IU_MUL_DW; set CONFIG_IU_MUL_DW 0 + global CONFIG_FPU_GRFPU; set CONFIG_FPU_GRFPU 0 + global CONFIG_FPU_GRFPULITE; set CONFIG_FPU_GRFPULITE 0 + global CONFIG_FPU_MEIKO; set CONFIG_FPU_MEIKO 0 + global CONFIG_FPU_GRFPU_INFMUL; set CONFIG_FPU_GRFPU_INFMUL 0 + global CONFIG_FPU_GRFPU_DWMUL; set CONFIG_FPU_GRFPU_DWMUL 0 + global CONFIG_FPU_GRFPU_MODGEN; set CONFIG_FPU_GRFPU_MODGEN 0 + global CONFIG_FPU_GRFPU_TECHSPEC; set CONFIG_FPU_GRFPU_TECHSPEC 0 + global CONFIG_FPU_GRFPC0; set CONFIG_FPU_GRFPC0 0 + global CONFIG_FPU_GRFPC1; set CONFIG_FPU_GRFPC1 0 + global CONFIG_FPU_GRFPC2; set CONFIG_FPU_GRFPC2 0 + global CONFIG_ICACHE_ASSO1; set CONFIG_ICACHE_ASSO1 0 + global CONFIG_ICACHE_ASSO2; set CONFIG_ICACHE_ASSO2 0 + global CONFIG_ICACHE_ASSO3; set CONFIG_ICACHE_ASSO3 0 + global CONFIG_ICACHE_ASSO4; set CONFIG_ICACHE_ASSO4 0 + global CONFIG_ICACHE_SZ1; set CONFIG_ICACHE_SZ1 0 + global CONFIG_ICACHE_SZ2; set CONFIG_ICACHE_SZ2 0 + global CONFIG_ICACHE_SZ4; set CONFIG_ICACHE_SZ4 0 + global CONFIG_ICACHE_SZ8; set CONFIG_ICACHE_SZ8 0 + global CONFIG_ICACHE_SZ16; set CONFIG_ICACHE_SZ16 0 + global CONFIG_ICACHE_SZ32; set CONFIG_ICACHE_SZ32 0 + global CONFIG_ICACHE_SZ64; set CONFIG_ICACHE_SZ64 0 + global CONFIG_ICACHE_SZ128; set CONFIG_ICACHE_SZ128 0 + global CONFIG_ICACHE_SZ256; set CONFIG_ICACHE_SZ256 0 + global CONFIG_ICACHE_LZ16; set CONFIG_ICACHE_LZ16 0 + global CONFIG_ICACHE_LZ32; set CONFIG_ICACHE_LZ32 0 + global CONFIG_ICACHE_ALGORND; set CONFIG_ICACHE_ALGORND 0 + global CONFIG_ICACHE_ALGODIR; set CONFIG_ICACHE_ALGODIR 0 + global CONFIG_ICACHE_ALGOLRR; set CONFIG_ICACHE_ALGOLRR 0 + global CONFIG_ICACHE_ALGOLRU; set CONFIG_ICACHE_ALGOLRU 0 + global CONFIG_ICACHE_LRAM_SZ1; set CONFIG_ICACHE_LRAM_SZ1 0 + global CONFIG_ICACHE_LRAM_SZ2; set CONFIG_ICACHE_LRAM_SZ2 0 + global CONFIG_ICACHE_LRAM_SZ4; set CONFIG_ICACHE_LRAM_SZ4 0 + global CONFIG_ICACHE_LRAM_SZ8; set CONFIG_ICACHE_LRAM_SZ8 0 + global CONFIG_ICACHE_LRAM_SZ16; set CONFIG_ICACHE_LRAM_SZ16 0 + global CONFIG_ICACHE_LRAM_SZ32; set CONFIG_ICACHE_LRAM_SZ32 0 + global CONFIG_ICACHE_LRAM_SZ64; set CONFIG_ICACHE_LRAM_SZ64 0 + global CONFIG_ICACHE_LRAM_SZ128; set CONFIG_ICACHE_LRAM_SZ128 0 + global CONFIG_ICACHE_LRAM_SZ256; set CONFIG_ICACHE_LRAM_SZ256 0 + global CONFIG_DCACHE_ASSO1; set CONFIG_DCACHE_ASSO1 0 + global CONFIG_DCACHE_ASSO2; set CONFIG_DCACHE_ASSO2 0 + global CONFIG_DCACHE_ASSO3; set CONFIG_DCACHE_ASSO3 0 + global CONFIG_DCACHE_ASSO4; set CONFIG_DCACHE_ASSO4 0 + global CONFIG_DCACHE_SZ1; set CONFIG_DCACHE_SZ1 0 + global CONFIG_DCACHE_SZ2; set CONFIG_DCACHE_SZ2 0 + global CONFIG_DCACHE_SZ4; set CONFIG_DCACHE_SZ4 0 + global CONFIG_DCACHE_SZ8; set CONFIG_DCACHE_SZ8 0 + global CONFIG_DCACHE_SZ16; set CONFIG_DCACHE_SZ16 0 + global CONFIG_DCACHE_SZ32; set CONFIG_DCACHE_SZ32 0 + global CONFIG_DCACHE_SZ64; set CONFIG_DCACHE_SZ64 0 + global CONFIG_DCACHE_SZ128; set CONFIG_DCACHE_SZ128 0 + global CONFIG_DCACHE_SZ256; set CONFIG_DCACHE_SZ256 0 + global CONFIG_DCACHE_LZ16; set CONFIG_DCACHE_LZ16 0 + global CONFIG_DCACHE_LZ32; set CONFIG_DCACHE_LZ32 0 + global CONFIG_DCACHE_ALGORND; set CONFIG_DCACHE_ALGORND 0 + global CONFIG_DCACHE_ALGODIR; set CONFIG_DCACHE_ALGODIR 0 + global CONFIG_DCACHE_ALGOLRR; set CONFIG_DCACHE_ALGOLRR 0 + global CONFIG_DCACHE_ALGOLRU; set CONFIG_DCACHE_ALGOLRU 0 + global CONFIG_DCACHE_LRAM_SZ1; set CONFIG_DCACHE_LRAM_SZ1 0 + global CONFIG_DCACHE_LRAM_SZ2; set CONFIG_DCACHE_LRAM_SZ2 0 + global CONFIG_DCACHE_LRAM_SZ4; set CONFIG_DCACHE_LRAM_SZ4 0 + global CONFIG_DCACHE_LRAM_SZ8; set CONFIG_DCACHE_LRAM_SZ8 0 + global CONFIG_DCACHE_LRAM_SZ16; set CONFIG_DCACHE_LRAM_SZ16 0 + global CONFIG_DCACHE_LRAM_SZ32; set CONFIG_DCACHE_LRAM_SZ32 0 + global CONFIG_DCACHE_LRAM_SZ64; set CONFIG_DCACHE_LRAM_SZ64 0 + global CONFIG_DCACHE_LRAM_SZ128; set CONFIG_DCACHE_LRAM_SZ128 0 + global CONFIG_DCACHE_LRAM_SZ256; set CONFIG_DCACHE_LRAM_SZ256 0 + global CONFIG_MMU_COMBINED; set CONFIG_MMU_COMBINED 0 + global CONFIG_MMU_SPLIT; set CONFIG_MMU_SPLIT 0 + global CONFIG_MMU_REPARRAY; set CONFIG_MMU_REPARRAY 0 + global CONFIG_MMU_REPINCREMENT; set CONFIG_MMU_REPINCREMENT 0 + global CONFIG_MMU_I2; set CONFIG_MMU_I2 0 + global CONFIG_MMU_I4; set CONFIG_MMU_I4 0 + global CONFIG_MMU_I8; set CONFIG_MMU_I8 0 + global CONFIG_MMU_I16; set CONFIG_MMU_I16 0 + global CONFIG_MMU_I32; set CONFIG_MMU_I32 0 + global CONFIG_MMU_D2; set CONFIG_MMU_D2 0 + global CONFIG_MMU_D4; set CONFIG_MMU_D4 0 + global CONFIG_MMU_D8; set CONFIG_MMU_D8 0 + global CONFIG_MMU_D16; set CONFIG_MMU_D16 0 + global CONFIG_MMU_D32; set CONFIG_MMU_D32 0 + global CONFIG_MMU_PAGE_4K; set CONFIG_MMU_PAGE_4K 0 + global CONFIG_MMU_PAGE_8K; set CONFIG_MMU_PAGE_8K 0 + global CONFIG_MMU_PAGE_16K; set CONFIG_MMU_PAGE_16K 0 + global CONFIG_MMU_PAGE_32K; set CONFIG_MMU_PAGE_32K 0 + global CONFIG_MMU_PAGE_PROG; set CONFIG_MMU_PAGE_PROG 0 + global CONFIG_DSU_ITRACESZ1; set CONFIG_DSU_ITRACESZ1 0 + global CONFIG_DSU_ITRACESZ2; set CONFIG_DSU_ITRACESZ2 0 + global CONFIG_DSU_ITRACESZ4; set CONFIG_DSU_ITRACESZ4 0 + global CONFIG_DSU_ITRACESZ8; set CONFIG_DSU_ITRACESZ8 0 + global CONFIG_DSU_ITRACESZ16; set CONFIG_DSU_ITRACESZ16 0 + global CONFIG_DSU_ATRACESZ1; set CONFIG_DSU_ATRACESZ1 0 + global CONFIG_DSU_ATRACESZ2; set CONFIG_DSU_ATRACESZ2 0 + global CONFIG_DSU_ATRACESZ4; set CONFIG_DSU_ATRACESZ4 0 + global CONFIG_DSU_ATRACESZ8; set CONFIG_DSU_ATRACESZ8 0 + global CONFIG_DSU_ATRACESZ16; set CONFIG_DSU_ATRACESZ16 0 + global CONFIG_IUFT_NONE; set CONFIG_IUFT_NONE 0 + global CONFIG_IUFT_PAR; set CONFIG_IUFT_PAR 0 + global CONFIG_IUFT_DMR; set CONFIG_IUFT_DMR 0 + global CONFIG_IUFT_BCH; set CONFIG_IUFT_BCH 0 + global CONFIG_IUFT_TMR; set CONFIG_IUFT_TMR 0 + global CONFIG_DSU_ETHSZ1; set CONFIG_DSU_ETHSZ1 0 + global CONFIG_DSU_ETHSZ2; set CONFIG_DSU_ETHSZ2 0 + global CONFIG_DSU_ETHSZ4; set CONFIG_DSU_ETHSZ4 0 + global CONFIG_DSU_ETHSZ8; set CONFIG_DSU_ETHSZ8 0 + global CONFIG_DSU_ETHSZ16; set CONFIG_DSU_ETHSZ16 0 + global CONFIG_AHBRAM_SZ1; set CONFIG_AHBRAM_SZ1 0 + global CONFIG_AHBRAM_SZ2; set CONFIG_AHBRAM_SZ2 0 + global CONFIG_AHBRAM_SZ4; set CONFIG_AHBRAM_SZ4 0 + global CONFIG_AHBRAM_SZ8; set CONFIG_AHBRAM_SZ8 0 + global CONFIG_AHBRAM_SZ16; set CONFIG_AHBRAM_SZ16 0 + global CONFIG_AHBRAM_SZ32; set CONFIG_AHBRAM_SZ32 0 + global CONFIG_AHBRAM_SZ64; set CONFIG_AHBRAM_SZ64 0 + global CONFIG_GRETH_FIFO4; set CONFIG_GRETH_FIFO4 0 + global CONFIG_GRETH_FIFO8; set CONFIG_GRETH_FIFO8 0 + global CONFIG_GRETH_FIFO16; set CONFIG_GRETH_FIFO16 0 + global CONFIG_GRETH_FIFO32; set CONFIG_GRETH_FIFO32 0 + global CONFIG_GRETH_FIFO64; set CONFIG_GRETH_FIFO64 0 + global CONFIG_UA1_FIFO1; set CONFIG_UA1_FIFO1 0 + global CONFIG_UA1_FIFO2; set CONFIG_UA1_FIFO2 0 + global CONFIG_UA1_FIFO4; set CONFIG_UA1_FIFO4 0 + global CONFIG_UA1_FIFO8; set CONFIG_UA1_FIFO8 0 + global CONFIG_UA1_FIFO16; set CONFIG_UA1_FIFO16 0 + global CONFIG_UA1_FIFO32; set CONFIG_UA1_FIFO32 0 + global CONFIG_SPICTRL_NOFT; set CONFIG_SPICTRL_NOFT 0 + global CONFIG_SPICTRL_DMRFT; set CONFIG_SPICTRL_DMRFT 0 + global CONFIG_SPICTRL_TMRFT; set CONFIG_SPICTRL_TMRFT 0 +} + + +proc update_choices { } { + global tmpvar_0 + set tmpvar_0 "Inferred" + global CONFIG_SYN_INFERRED + if { $CONFIG_SYN_INFERRED == 1 } then { set tmpvar_0 "Inferred" } + global CONFIG_SYN_STRATIX + if { $CONFIG_SYN_STRATIX == 1 } then { set tmpvar_0 "Altera-Stratix" } + global CONFIG_SYN_STRATIXII + if { $CONFIG_SYN_STRATIXII == 1 } then { set tmpvar_0 "Altera-StratixII" } + global CONFIG_SYN_STRATIXIII + if { $CONFIG_SYN_STRATIXIII == 1 } then { set tmpvar_0 "Altera-StratixIII" } + global CONFIG_SYN_CYCLONEIII + if { $CONFIG_SYN_CYCLONEIII == 1 } then { set tmpvar_0 "Altera-CycloneIII" } + global CONFIG_SYN_ALTERA + if { $CONFIG_SYN_ALTERA == 1 } then { set tmpvar_0 "Altera-Others" } + global CONFIG_SYN_AXCEL + if { $CONFIG_SYN_AXCEL == 1 } then { set tmpvar_0 "Actel-Axcelerator" } + global CONFIG_SYN_AXDSP + if { $CONFIG_SYN_AXDSP == 1 } then { set tmpvar_0 "Actel-Axcelerator-DSP" } + global CONFIG_SYN_PROASIC + if { $CONFIG_SYN_PROASIC == 1 } then { set tmpvar_0 "Actel-Proasic" } + global CONFIG_SYN_PROASICPLUS + if { $CONFIG_SYN_PROASICPLUS == 1 } then { set tmpvar_0 "Actel-ProasicPlus" } + global CONFIG_SYN_PROASIC3 + if { $CONFIG_SYN_PROASIC3 == 1 } then { set tmpvar_0 "Actel-Proasic3" } + global CONFIG_SYN_PROASIC3E + if { $CONFIG_SYN_PROASIC3E == 1 } then { set tmpvar_0 "Actel-Proasic3E" } + global CONFIG_SYN_PROASIC3L + if { $CONFIG_SYN_PROASIC3L == 1 } then { set tmpvar_0 "Actel-Proasic3L" } + global CONFIG_SYN_IGLOO + if { $CONFIG_SYN_IGLOO == 1 } then { set tmpvar_0 "Actel-IGLOO/p/L" } + global CONFIG_SYN_FUSION + if { $CONFIG_SYN_FUSION == 1 } then { set tmpvar_0 "Actel-Fusion" } + global CONFIG_SYN_UT025CRH + if { $CONFIG_SYN_UT025CRH == 1 } then { set tmpvar_0 "Aeroflex-UT025CRH" } + global CONFIG_SYN_UT130HBD + if { $CONFIG_SYN_UT130HBD == 1 } then { set tmpvar_0 "Aeroflex-UT130HBD" } + global CONFIG_SYN_UT90NHBD + if { $CONFIG_SYN_UT90NHBD == 1 } then { set tmpvar_0 "Aeroflex-UT90NHBD" } + global CONFIG_SYN_ATC18 + if { $CONFIG_SYN_ATC18 == 1 } then { set tmpvar_0 "Atmel-ATC18" } + global CONFIG_SYN_ATC18RHA + if { $CONFIG_SYN_ATC18RHA == 1 } then { set tmpvar_0 "Atmel-ATC18RHA" } + global CONFIG_SYN_CMOS9SF + if { $CONFIG_SYN_CMOS9SF == 1 } then { set tmpvar_0 "IBM-CMOS9SF" } + global CONFIG_SYN_CUSTOM1 + if { $CONFIG_SYN_CUSTOM1 == 1 } then { set tmpvar_0 "Custom1" } + global CONFIG_SYN_EASIC90 + if { $CONFIG_SYN_EASIC90 == 1 } then { set tmpvar_0 "eASIC90" } + global CONFIG_SYN_EASIC45 + if { $CONFIG_SYN_EASIC45 == 1 } then { set tmpvar_0 "eASIC45" } + global CONFIG_SYN_IHP25 + if { $CONFIG_SYN_IHP25 == 1 } then { set tmpvar_0 "IHP25" } + global CONFIG_SYN_IHP25RH + if { $CONFIG_SYN_IHP25RH == 1 } then { set tmpvar_0 "IHP25RH" } + global CONFIG_SYN_LATTICE + if { $CONFIG_SYN_LATTICE == 1 } then { set tmpvar_0 "Lattice-EC/ECP/XP" } + global CONFIG_SYN_ECLIPSE + if { $CONFIG_SYN_ECLIPSE == 1 } then { set tmpvar_0 "Quicklogic-Eclipse" } + global CONFIG_SYN_PEREGRINE + if { $CONFIG_SYN_PEREGRINE == 1 } then { set tmpvar_0 "Peregrine" } + global CONFIG_SYN_RH_LIB18T + if { $CONFIG_SYN_RH_LIB18T == 1 } then { set tmpvar_0 "RH-LIB18T" } + global CONFIG_SYN_RHUMC + if { $CONFIG_SYN_RHUMC == 1 } then { set tmpvar_0 "RH-UMC" } + global CONFIG_SYN_SMIC13 + if { $CONFIG_SYN_SMIC13 == 1 } then { set tmpvar_0 "SMIC130" } + global CONFIG_SYN_TM65GPLUS + if { $CONFIG_SYN_TM65GPLUS == 1 } then { set tmpvar_0 "TM65Gplus" } + global CONFIG_SYN_TSMC90 + if { $CONFIG_SYN_TSMC90 == 1 } then { set tmpvar_0 "TSMC90" } + global CONFIG_SYN_UMC + if { $CONFIG_SYN_UMC == 1 } then { set tmpvar_0 "UMC180" } + global CONFIG_SYN_SPARTAN2 + if { $CONFIG_SYN_SPARTAN2 == 1 } then { set tmpvar_0 "Xilinx-Spartan2" } + global CONFIG_SYN_SPARTAN3 + if { $CONFIG_SYN_SPARTAN3 == 1 } then { set tmpvar_0 "Xilinx-Spartan3" } + global CONFIG_SYN_SPARTAN3E + if { $CONFIG_SYN_SPARTAN3E == 1 } then { set tmpvar_0 "Xilinx-Spartan3E" } + global CONFIG_SYN_SPARTAN6 + if { $CONFIG_SYN_SPARTAN6 == 1 } then { set tmpvar_0 "Xilinx-Spartan6" } + global CONFIG_SYN_VIRTEX + if { $CONFIG_SYN_VIRTEX == 1 } then { set tmpvar_0 "Xilinx-Virtex" } + global CONFIG_SYN_VIRTEXE + if { $CONFIG_SYN_VIRTEXE == 1 } then { set tmpvar_0 "Xilinx-VirtexE" } + global CONFIG_SYN_VIRTEX2 + if { $CONFIG_SYN_VIRTEX2 == 1 } then { set tmpvar_0 "Xilinx-Virtex2" } + global CONFIG_SYN_VIRTEX4 + if { $CONFIG_SYN_VIRTEX4 == 1 } then { set tmpvar_0 "Xilinx-Virtex4" } + global CONFIG_SYN_VIRTEX5 + if { $CONFIG_SYN_VIRTEX5 == 1 } then { set tmpvar_0 "Xilinx-Virtex5" } + global CONFIG_SYN_VIRTEX6 + if { $CONFIG_SYN_VIRTEX6 == 1 } then { set tmpvar_0 "Xilinx-Virtex6" } + global tmpvar_1 + set tmpvar_1 "Inferred" + global CONFIG_MEM_INFERRED + if { $CONFIG_MEM_INFERRED == 1 } then { set tmpvar_1 "Inferred" } + global CONFIG_MEM_UMC + if { $CONFIG_MEM_UMC == 1 } then { set tmpvar_1 "UMC18" } + global CONFIG_MEM_RHUMC + if { $CONFIG_MEM_RHUMC == 1 } then { set tmpvar_1 "RH-UMC" } + global CONFIG_MEM_ARTISAN + if { $CONFIG_MEM_ARTISAN == 1 } then { set tmpvar_1 "Artisan" } + global CONFIG_MEM_CUSTOM1 + if { $CONFIG_MEM_CUSTOM1 == 1 } then { set tmpvar_1 "Custom1" } + global CONFIG_MEM_VIRAGE + if { $CONFIG_MEM_VIRAGE == 1 } then { set tmpvar_1 "Virage" } + global CONFIG_MEM_VIRAGE90 + if { $CONFIG_MEM_VIRAGE90 == 1 } then { set tmpvar_1 "Virage-TSMC90" } + global tmpvar_2 + set tmpvar_2 "Inferred" + global CONFIG_CLK_INFERRED + if { $CONFIG_CLK_INFERRED == 1 } then { set tmpvar_2 "Inferred" } + global CONFIG_CLK_HCLKBUF + if { $CONFIG_CLK_HCLKBUF == 1 } then { set tmpvar_2 "Actel-HCLKBUF" } + global CONFIG_CLK_UT130HBD + if { $CONFIG_CLK_UT130HBD == 1 } then { set tmpvar_2 "Aeroflex-UT130HBD" } + global CONFIG_CLK_ALTDLL + if { $CONFIG_CLK_ALTDLL == 1 } then { set tmpvar_2 "Altera-ALTPLL" } + global CONFIG_CLK_LATDLL + if { $CONFIG_CLK_LATDLL == 1 } then { set tmpvar_2 "Lattice-EXPLL" } + global CONFIG_CLK_PRO3PLL + if { $CONFIG_CLK_PRO3PLL == 1 } then { set tmpvar_2 "Proasic3-PLL" } + global CONFIG_CLK_PRO3EPLL + if { $CONFIG_CLK_PRO3EPLL == 1 } then { set tmpvar_2 "Proasic3E-PLL" } + global CONFIG_CLK_PRO3LPLL + if { $CONFIG_CLK_PRO3LPLL == 1 } then { set tmpvar_2 "Proasic3L-PLL" } + global CONFIG_CLK_FUSPLL + if { $CONFIG_CLK_FUSPLL == 1 } then { set tmpvar_2 "Fusion-PLL" } + global CONFIG_CLK_LIB18T + if { $CONFIG_CLK_LIB18T == 1 } then { set tmpvar_2 "RH-LIB18T-PLL" } + global CONFIG_CLK_RHUMC + if { $CONFIG_CLK_RHUMC == 1 } then { set tmpvar_2 "DARE-PLL" } + global CONFIG_CLK_CLKDLL + if { $CONFIG_CLK_CLKDLL == 1 } then { set tmpvar_2 "Xilinx-CLKDLL" } + global CONFIG_CLK_DCM + if { $CONFIG_CLK_DCM == 1 } then { set tmpvar_2 "Xilinx-DCM" } + global tmpvar_3 + set tmpvar_3 "5-cycles" + global CONFIG_IU_MUL_LATENCY_2 + if { $CONFIG_IU_MUL_LATENCY_2 == 1 } then { set tmpvar_3 "2-cycles" } + global CONFIG_IU_MUL_LATENCY_4 + if { $CONFIG_IU_MUL_LATENCY_4 == 1 } then { set tmpvar_3 "4-cycles" } + global CONFIG_IU_MUL_LATENCY_5 + if { $CONFIG_IU_MUL_LATENCY_5 == 1 } then { set tmpvar_3 "5-cycles" } + global tmpvar_4 + set tmpvar_4 "Inferred" + global CONFIG_IU_MUL_INFERRED + if { $CONFIG_IU_MUL_INFERRED == 1 } then { set tmpvar_4 "Inferred" } + global CONFIG_IU_MUL_MODGEN + if { $CONFIG_IU_MUL_MODGEN == 1 } then { set tmpvar_4 "NTNU_Modgen" } + global CONFIG_IU_MUL_TECHSPEC + if { $CONFIG_IU_MUL_TECHSPEC == 1 } then { set tmpvar_4 "TechSpec" } + global CONFIG_IU_MUL_DW + if { $CONFIG_IU_MUL_DW == 1 } then { set tmpvar_4 "Designware" } + global tmpvar_5 + set tmpvar_5 "GRFPU" + global CONFIG_FPU_GRFPU + if { $CONFIG_FPU_GRFPU == 1 } then { set tmpvar_5 "GRFPU" } + global CONFIG_FPU_GRFPULITE + if { $CONFIG_FPU_GRFPULITE == 1 } then { set tmpvar_5 "GRFPU-LITE" } + global CONFIG_FPU_MEIKO + if { $CONFIG_FPU_MEIKO == 1 } then { set tmpvar_5 "Meiko" } + global tmpvar_6 + set tmpvar_6 "Inferred" + global CONFIG_FPU_GRFPU_INFMUL + if { $CONFIG_FPU_GRFPU_INFMUL == 1 } then { set tmpvar_6 "Inferred" } + global CONFIG_FPU_GRFPU_DWMUL + if { $CONFIG_FPU_GRFPU_DWMUL == 1 } then { set tmpvar_6 "DW" } + global CONFIG_FPU_GRFPU_MODGEN + if { $CONFIG_FPU_GRFPU_MODGEN == 1 } then { set tmpvar_6 "ModGen" } + global CONFIG_FPU_GRFPU_TECHSPEC + if { $CONFIG_FPU_GRFPU_TECHSPEC == 1 } then { set tmpvar_6 "TechSpec" } + global tmpvar_7 + set tmpvar_7 "Simple" + global CONFIG_FPU_GRFPC0 + if { $CONFIG_FPU_GRFPC0 == 1 } then { set tmpvar_7 "Simple" } + global CONFIG_FPU_GRFPC1 + if { $CONFIG_FPU_GRFPC1 == 1 } then { set tmpvar_7 "Data-forwarding" } + global CONFIG_FPU_GRFPC2 + if { $CONFIG_FPU_GRFPC2 == 1 } then { set tmpvar_7 "Non-blocking" } + global tmpvar_8 + set tmpvar_8 "1" + global CONFIG_ICACHE_ASSO1 + if { $CONFIG_ICACHE_ASSO1 == 1 } then { set tmpvar_8 "1" } + global CONFIG_ICACHE_ASSO2 + if { $CONFIG_ICACHE_ASSO2 == 1 } then { set tmpvar_8 "2" } + global CONFIG_ICACHE_ASSO3 + if { $CONFIG_ICACHE_ASSO3 == 1 } then { set tmpvar_8 "3" } + global CONFIG_ICACHE_ASSO4 + if { $CONFIG_ICACHE_ASSO4 == 1 } then { set tmpvar_8 "4" } + global tmpvar_9 + set tmpvar_9 "4" + global CONFIG_ICACHE_SZ1 + if { $CONFIG_ICACHE_SZ1 == 1 } then { set tmpvar_9 "1" } + global CONFIG_ICACHE_SZ2 + if { $CONFIG_ICACHE_SZ2 == 1 } then { set tmpvar_9 "2" } + global CONFIG_ICACHE_SZ4 + if { $CONFIG_ICACHE_SZ4 == 1 } then { set tmpvar_9 "4" } + global CONFIG_ICACHE_SZ8 + if { $CONFIG_ICACHE_SZ8 == 1 } then { set tmpvar_9 "8" } + global CONFIG_ICACHE_SZ16 + if { $CONFIG_ICACHE_SZ16 == 1 } then { set tmpvar_9 "16" } + global CONFIG_ICACHE_SZ32 + if { $CONFIG_ICACHE_SZ32 == 1 } then { set tmpvar_9 "32" } + global CONFIG_ICACHE_SZ64 + if { $CONFIG_ICACHE_SZ64 == 1 } then { set tmpvar_9 "64" } + global CONFIG_ICACHE_SZ128 + if { $CONFIG_ICACHE_SZ128 == 1 } then { set tmpvar_9 "128" } + global CONFIG_ICACHE_SZ256 + if { $CONFIG_ICACHE_SZ256 == 1 } then { set tmpvar_9 "256" } + global tmpvar_10 + set tmpvar_10 "32" + global CONFIG_ICACHE_LZ16 + if { $CONFIG_ICACHE_LZ16 == 1 } then { set tmpvar_10 "16" } + global CONFIG_ICACHE_LZ32 + if { $CONFIG_ICACHE_LZ32 == 1 } then { set tmpvar_10 "32" } + global tmpvar_11 + set tmpvar_11 "Random" + global CONFIG_ICACHE_ALGORND + if { $CONFIG_ICACHE_ALGORND == 1 } then { set tmpvar_11 "Random" } + global CONFIG_ICACHE_ALGODIR + if { $CONFIG_ICACHE_ALGODIR == 1 } then { set tmpvar_11 "Direct" } + global CONFIG_ICACHE_ALGOLRR + if { $CONFIG_ICACHE_ALGOLRR == 1 } then { set tmpvar_11 "LRR" } + global CONFIG_ICACHE_ALGOLRU + if { $CONFIG_ICACHE_ALGOLRU == 1 } then { set tmpvar_11 "LRU" } + global tmpvar_12 + set tmpvar_12 "4" + global CONFIG_ICACHE_LRAM_SZ1 + if { $CONFIG_ICACHE_LRAM_SZ1 == 1 } then { set tmpvar_12 "1" } + global CONFIG_ICACHE_LRAM_SZ2 + if { $CONFIG_ICACHE_LRAM_SZ2 == 1 } then { set tmpvar_12 "2" } + global CONFIG_ICACHE_LRAM_SZ4 + if { $CONFIG_ICACHE_LRAM_SZ4 == 1 } then { set tmpvar_12 "4" } + global CONFIG_ICACHE_LRAM_SZ8 + if { $CONFIG_ICACHE_LRAM_SZ8 == 1 } then { set tmpvar_12 "8" } + global CONFIG_ICACHE_LRAM_SZ16 + if { $CONFIG_ICACHE_LRAM_SZ16 == 1 } then { set tmpvar_12 "16" } + global CONFIG_ICACHE_LRAM_SZ32 + if { $CONFIG_ICACHE_LRAM_SZ32 == 1 } then { set tmpvar_12 "32" } + global CONFIG_ICACHE_LRAM_SZ64 + if { $CONFIG_ICACHE_LRAM_SZ64 == 1 } then { set tmpvar_12 "64" } + global CONFIG_ICACHE_LRAM_SZ128 + if { $CONFIG_ICACHE_LRAM_SZ128 == 1 } then { set tmpvar_12 "128" } + global CONFIG_ICACHE_LRAM_SZ256 + if { $CONFIG_ICACHE_LRAM_SZ256 == 1 } then { set tmpvar_12 "256" } + global tmpvar_13 + set tmpvar_13 "1" + global CONFIG_DCACHE_ASSO1 + if { $CONFIG_DCACHE_ASSO1 == 1 } then { set tmpvar_13 "1" } + global CONFIG_DCACHE_ASSO2 + if { $CONFIG_DCACHE_ASSO2 == 1 } then { set tmpvar_13 "2" } + global CONFIG_DCACHE_ASSO3 + if { $CONFIG_DCACHE_ASSO3 == 1 } then { set tmpvar_13 "3" } + global CONFIG_DCACHE_ASSO4 + if { $CONFIG_DCACHE_ASSO4 == 1 } then { set tmpvar_13 "4" } + global tmpvar_14 + set tmpvar_14 "4" + global CONFIG_DCACHE_SZ1 + if { $CONFIG_DCACHE_SZ1 == 1 } then { set tmpvar_14 "1" } + global CONFIG_DCACHE_SZ2 + if { $CONFIG_DCACHE_SZ2 == 1 } then { set tmpvar_14 "2" } + global CONFIG_DCACHE_SZ4 + if { $CONFIG_DCACHE_SZ4 == 1 } then { set tmpvar_14 "4" } + global CONFIG_DCACHE_SZ8 + if { $CONFIG_DCACHE_SZ8 == 1 } then { set tmpvar_14 "8" } + global CONFIG_DCACHE_SZ16 + if { $CONFIG_DCACHE_SZ16 == 1 } then { set tmpvar_14 "16" } + global CONFIG_DCACHE_SZ32 + if { $CONFIG_DCACHE_SZ32 == 1 } then { set tmpvar_14 "32" } + global CONFIG_DCACHE_SZ64 + if { $CONFIG_DCACHE_SZ64 == 1 } then { set tmpvar_14 "64" } + global CONFIG_DCACHE_SZ128 + if { $CONFIG_DCACHE_SZ128 == 1 } then { set tmpvar_14 "128" } + global CONFIG_DCACHE_SZ256 + if { $CONFIG_DCACHE_SZ256 == 1 } then { set tmpvar_14 "256" } + global tmpvar_15 + set tmpvar_15 "32" + global CONFIG_DCACHE_LZ16 + if { $CONFIG_DCACHE_LZ16 == 1 } then { set tmpvar_15 "16" } + global CONFIG_DCACHE_LZ32 + if { $CONFIG_DCACHE_LZ32 == 1 } then { set tmpvar_15 "32" } + global tmpvar_16 + set tmpvar_16 "Random" + global CONFIG_DCACHE_ALGORND + if { $CONFIG_DCACHE_ALGORND == 1 } then { set tmpvar_16 "Random" } + global CONFIG_DCACHE_ALGODIR + if { $CONFIG_DCACHE_ALGODIR == 1 } then { set tmpvar_16 "Direct" } + global CONFIG_DCACHE_ALGOLRR + if { $CONFIG_DCACHE_ALGOLRR == 1 } then { set tmpvar_16 "LRR" } + global CONFIG_DCACHE_ALGOLRU + if { $CONFIG_DCACHE_ALGOLRU == 1 } then { set tmpvar_16 "LRU" } + global tmpvar_17 + set tmpvar_17 "4" + global CONFIG_DCACHE_LRAM_SZ1 + if { $CONFIG_DCACHE_LRAM_SZ1 == 1 } then { set tmpvar_17 "1" } + global CONFIG_DCACHE_LRAM_SZ2 + if { $CONFIG_DCACHE_LRAM_SZ2 == 1 } then { set tmpvar_17 "2" } + global CONFIG_DCACHE_LRAM_SZ4 + if { $CONFIG_DCACHE_LRAM_SZ4 == 1 } then { set tmpvar_17 "4" } + global CONFIG_DCACHE_LRAM_SZ8 + if { $CONFIG_DCACHE_LRAM_SZ8 == 1 } then { set tmpvar_17 "8" } + global CONFIG_DCACHE_LRAM_SZ16 + if { $CONFIG_DCACHE_LRAM_SZ16 == 1 } then { set tmpvar_17 "16" } + global CONFIG_DCACHE_LRAM_SZ32 + if { $CONFIG_DCACHE_LRAM_SZ32 == 1 } then { set tmpvar_17 "32" } + global CONFIG_DCACHE_LRAM_SZ64 + if { $CONFIG_DCACHE_LRAM_SZ64 == 1 } then { set tmpvar_17 "64" } + global CONFIG_DCACHE_LRAM_SZ128 + if { $CONFIG_DCACHE_LRAM_SZ128 == 1 } then { set tmpvar_17 "128" } + global CONFIG_DCACHE_LRAM_SZ256 + if { $CONFIG_DCACHE_LRAM_SZ256 == 1 } then { set tmpvar_17 "256" } + global tmpvar_18 + set tmpvar_18 "combined" + global CONFIG_MMU_COMBINED + if { $CONFIG_MMU_COMBINED == 1 } then { set tmpvar_18 "combined" } + global CONFIG_MMU_SPLIT + if { $CONFIG_MMU_SPLIT == 1 } then { set tmpvar_18 "split" } + global tmpvar_19 + set tmpvar_19 "Increment" + global CONFIG_MMU_REPARRAY + if { $CONFIG_MMU_REPARRAY == 1 } then { set tmpvar_19 "LRU" } + global CONFIG_MMU_REPINCREMENT + if { $CONFIG_MMU_REPINCREMENT == 1 } then { set tmpvar_19 "Increment" } + global tmpvar_20 + set tmpvar_20 "8" + global CONFIG_MMU_I2 + if { $CONFIG_MMU_I2 == 1 } then { set tmpvar_20 "2" } + global CONFIG_MMU_I4 + if { $CONFIG_MMU_I4 == 1 } then { set tmpvar_20 "4" } + global CONFIG_MMU_I8 + if { $CONFIG_MMU_I8 == 1 } then { set tmpvar_20 "8" } + global CONFIG_MMU_I16 + if { $CONFIG_MMU_I16 == 1 } then { set tmpvar_20 "16" } + global CONFIG_MMU_I32 + if { $CONFIG_MMU_I32 == 1 } then { set tmpvar_20 "32" } + global tmpvar_21 + set tmpvar_21 "8" + global CONFIG_MMU_D2 + if { $CONFIG_MMU_D2 == 1 } then { set tmpvar_21 "2" } + global CONFIG_MMU_D4 + if { $CONFIG_MMU_D4 == 1 } then { set tmpvar_21 "4" } + global CONFIG_MMU_D8 + if { $CONFIG_MMU_D8 == 1 } then { set tmpvar_21 "8" } + global CONFIG_MMU_D16 + if { $CONFIG_MMU_D16 == 1 } then { set tmpvar_21 "16" } + global CONFIG_MMU_D32 + if { $CONFIG_MMU_D32 == 1 } then { set tmpvar_21 "32" } + global tmpvar_22 + set tmpvar_22 "4K" + global CONFIG_MMU_PAGE_4K + if { $CONFIG_MMU_PAGE_4K == 1 } then { set tmpvar_22 "4K" } + global CONFIG_MMU_PAGE_8K + if { $CONFIG_MMU_PAGE_8K == 1 } then { set tmpvar_22 "8K" } + global CONFIG_MMU_PAGE_16K + if { $CONFIG_MMU_PAGE_16K == 1 } then { set tmpvar_22 "16K" } + global CONFIG_MMU_PAGE_32K + if { $CONFIG_MMU_PAGE_32K == 1 } then { set tmpvar_22 "32K" } + global CONFIG_MMU_PAGE_PROG + if { $CONFIG_MMU_PAGE_PROG == 1 } then { set tmpvar_22 "Programmable" } + global tmpvar_23 + set tmpvar_23 "1" + global CONFIG_DSU_ITRACESZ1 + if { $CONFIG_DSU_ITRACESZ1 == 1 } then { set tmpvar_23 "1" } + global CONFIG_DSU_ITRACESZ2 + if { $CONFIG_DSU_ITRACESZ2 == 1 } then { set tmpvar_23 "2" } + global CONFIG_DSU_ITRACESZ4 + if { $CONFIG_DSU_ITRACESZ4 == 1 } then { set tmpvar_23 "4" } + global CONFIG_DSU_ITRACESZ8 + if { $CONFIG_DSU_ITRACESZ8 == 1 } then { set tmpvar_23 "8" } + global CONFIG_DSU_ITRACESZ16 + if { $CONFIG_DSU_ITRACESZ16 == 1 } then { set tmpvar_23 "16" } + global tmpvar_24 + set tmpvar_24 "1" + global CONFIG_DSU_ATRACESZ1 + if { $CONFIG_DSU_ATRACESZ1 == 1 } then { set tmpvar_24 "1" } + global CONFIG_DSU_ATRACESZ2 + if { $CONFIG_DSU_ATRACESZ2 == 1 } then { set tmpvar_24 "2" } + global CONFIG_DSU_ATRACESZ4 + if { $CONFIG_DSU_ATRACESZ4 == 1 } then { set tmpvar_24 "4" } + global CONFIG_DSU_ATRACESZ8 + if { $CONFIG_DSU_ATRACESZ8 == 1 } then { set tmpvar_24 "8" } + global CONFIG_DSU_ATRACESZ16 + if { $CONFIG_DSU_ATRACESZ16 == 1 } then { set tmpvar_24 "16" } + global tmpvar_25 + set tmpvar_25 "None" + global CONFIG_IUFT_NONE + if { $CONFIG_IUFT_NONE == 1 } then { set tmpvar_25 "None" } + global CONFIG_IUFT_PAR + if { $CONFIG_IUFT_PAR == 1 } then { set tmpvar_25 "Parity" } + global CONFIG_IUFT_DMR + if { $CONFIG_IUFT_DMR == 1 } then { set tmpvar_25 "PDMR" } + global CONFIG_IUFT_BCH + if { $CONFIG_IUFT_BCH == 1 } then { set tmpvar_25 "BCH" } + global CONFIG_IUFT_TMR + if { $CONFIG_IUFT_TMR == 1 } then { set tmpvar_25 "TMR" } + global tmpvar_26 + set tmpvar_26 "2" + global CONFIG_DSU_ETHSZ1 + if { $CONFIG_DSU_ETHSZ1 == 1 } then { set tmpvar_26 "1" } + global CONFIG_DSU_ETHSZ2 + if { $CONFIG_DSU_ETHSZ2 == 1 } then { set tmpvar_26 "2" } + global CONFIG_DSU_ETHSZ4 + if { $CONFIG_DSU_ETHSZ4 == 1 } then { set tmpvar_26 "4" } + global CONFIG_DSU_ETHSZ8 + if { $CONFIG_DSU_ETHSZ8 == 1 } then { set tmpvar_26 "8" } + global CONFIG_DSU_ETHSZ16 + if { $CONFIG_DSU_ETHSZ16 == 1 } then { set tmpvar_26 "16" } + global tmpvar_27 + set tmpvar_27 "4" + global CONFIG_AHBRAM_SZ1 + if { $CONFIG_AHBRAM_SZ1 == 1 } then { set tmpvar_27 "1" } + global CONFIG_AHBRAM_SZ2 + if { $CONFIG_AHBRAM_SZ2 == 1 } then { set tmpvar_27 "2" } + global CONFIG_AHBRAM_SZ4 + if { $CONFIG_AHBRAM_SZ4 == 1 } then { set tmpvar_27 "4" } + global CONFIG_AHBRAM_SZ8 + if { $CONFIG_AHBRAM_SZ8 == 1 } then { set tmpvar_27 "8" } + global CONFIG_AHBRAM_SZ16 + if { $CONFIG_AHBRAM_SZ16 == 1 } then { set tmpvar_27 "16" } + global CONFIG_AHBRAM_SZ32 + if { $CONFIG_AHBRAM_SZ32 == 1 } then { set tmpvar_27 "32" } + global CONFIG_AHBRAM_SZ64 + if { $CONFIG_AHBRAM_SZ64 == 1 } then { set tmpvar_27 "64" } + global tmpvar_28 + set tmpvar_28 "8" + global CONFIG_GRETH_FIFO4 + if { $CONFIG_GRETH_FIFO4 == 1 } then { set tmpvar_28 "4" } + global CONFIG_GRETH_FIFO8 + if { $CONFIG_GRETH_FIFO8 == 1 } then { set tmpvar_28 "8" } + global CONFIG_GRETH_FIFO16 + if { $CONFIG_GRETH_FIFO16 == 1 } then { set tmpvar_28 "16" } + global CONFIG_GRETH_FIFO32 + if { $CONFIG_GRETH_FIFO32 == 1 } then { set tmpvar_28 "32" } + global CONFIG_GRETH_FIFO64 + if { $CONFIG_GRETH_FIFO64 == 1 } then { set tmpvar_28 "64" } + global tmpvar_29 + set tmpvar_29 "1" + global CONFIG_UA1_FIFO1 + if { $CONFIG_UA1_FIFO1 == 1 } then { set tmpvar_29 "1" } + global CONFIG_UA1_FIFO2 + if { $CONFIG_UA1_FIFO2 == 1 } then { set tmpvar_29 "2" } + global CONFIG_UA1_FIFO4 + if { $CONFIG_UA1_FIFO4 == 1 } then { set tmpvar_29 "4" } + global CONFIG_UA1_FIFO8 + if { $CONFIG_UA1_FIFO8 == 1 } then { set tmpvar_29 "8" } + global CONFIG_UA1_FIFO16 + if { $CONFIG_UA1_FIFO16 == 1 } then { set tmpvar_29 "16" } + global CONFIG_UA1_FIFO32 + if { $CONFIG_UA1_FIFO32 == 1 } then { set tmpvar_29 "32" } + global tmpvar_30 + set tmpvar_30 "None" + global CONFIG_SPICTRL_NOFT + if { $CONFIG_SPICTRL_NOFT == 1 } then { set tmpvar_30 "None" } + global CONFIG_SPICTRL_DMRFT + if { $CONFIG_SPICTRL_DMRFT == 1 } then { set tmpvar_30 "Parity-DMR" } + global CONFIG_SPICTRL_TMRFT + if { $CONFIG_SPICTRL_TMRFT == 1 } then { set tmpvar_30 "TMR" } +} + + +proc update_define_mainmenu {} { + global CONFIG_MODULES + global CONFIG_LEON3FT_PRESENT + global CONFIG_HAS_SHARED_GRFPU + global CONSTANT_Y + set CONFIG_LEON3FT_PRESENT $CONSTANT_Y + set CONFIG_HAS_SHARED_GRFPU $CONSTANT_Y +} + + +# FILE: tail.tk +# This file is boilerplate TCL/TK function definitions for 'make xconfig'. +# +# CHANGES +# ======= +# +# 8 January 1998, Michael Elizabeth Chastain, +# Arrange buttons in three columns for better screen fitting. +# + +# +# Read the user's settings from .config. These will override whatever is +# in config.in. Don't do this if the user specified a -D to force +# the defaults. +# + +set defaults defconfig + +if { [file readable .config] == 1} then { + if { $argc > 0 } then { + if { [lindex $argv 0] != "-D" } then { + read_config .config + } + else + { + read_config $defaults + } + } else { + read_config .config + } +} else { + read_config $defaults +} + +update_define 1 $total_menus 0 +update_mainmenu + +button .f0.right.save -anchor w -text "Save and Exit" -underline 0\ + -command { catch {exec cp -f .config .config.old}; \ + writeconfig .config config.h; wrapup .wrap } + +button .f0.right.quit -anchor w -text "Quit Without Saving" -underline 0\ + -command { maybe_exit .maybe } + +button .f0.right.load -anchor w -text "Load Configuration from File" \ + -command { load_configfile .load "Load Configuration from file" read_config_file +} + +button .f0.right.store -anchor w -text "Store Configuration to File" \ + -command { load_configfile .load "Store Configuration to file" write_config_file } + +# +# Now pack everything. +# + +pack .f0.right.store .f0.right.load .f0.right.quit .f0.right.save \ + -padx 0 -pady 0 -side bottom -fill x +pack .f0.left .f0.middle .f0.right -side left -padx 5 -pady 0 -fill y +pack .f0 -padx 5 -pady 5 + +update idletasks +set winy [expr 10 + [winfo reqheight .f0]] +set scry [lindex [wm maxsize .] 1] +set winx [expr 10 + [winfo reqwidth .f0]] +set scrx [lindex [wm maxsize .] 0] +if {$winx < $scrx} then {set maxx -1} else {set maxx $winx} +if {$winy < $scry} then {set maxy -1} else {set maxy $winy} +.f0 configure -width $winx -height $winy +wm maxsize . $maxx $maxy + +# +# If we cannot write our config files, disable the write button. +# +if { [file exists .config] == 1 } then { + if { [file writable .config] == 0 } then { + .f0.right.save configure -state disabled + } + } else { + if { [file writable .] == 0 } then { + .f0.right.save configure -state disabled + } + } + +#if { [file exists include/linux/autoconf.h] == 1 } then { +# if { [file writable include/linux/autoconf.h] == 0 } then { +# .f0.right.save configure -state disabled +# } +# } else { +# if { [file writable include/linux/] == 0 } then { +# .f0.right.save configure -state disabled +# } +# } diff --git a/designs/ICI4-3DCAM-Integ1/leon3mp.xcf b/designs/ICI4-3DCAM-Integ1/leon3mp.xcf new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/leon3mp.xcf @@ -0,0 +1,9 @@ + +NET "clk27" TNM_NET = "clk27"; +TIMESPEC "TS_clk27" = PERIOD "clk27" 37.00 ns HIGH 50 %; + +NET "clk200p" TNM_NET = "clk200p"; +TIMESPEC "TS_clk200p" = PERIOD "clk200p" 5.00 ns HIGH 50 %; + +NET "erx_clk" TNM_NET = "erx_clk"; +TIMESPEC "TS_erx_clk" = PERIOD "erx_clk" 8.00 ns HIGH 50 %; diff --git a/designs/ICI4-3DCAM-Integ1/systest.c b/designs/ICI4-3DCAM-Integ1/systest.c new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/systest.c @@ -0,0 +1,18 @@ + +main() + +{ + report_start(); + + +// svgactrl_test(0x80000600, 1, 0, 0x40200000, -1, 0, 0); + base_test(); +/* + greth_test(0x80000e00); + spw_test(0x80100A00); + spw_test(0x80100B00); + spw_test(0x80100C00); + svgactrl_test(0x80000600, 1, 0, 0x40200000, -1, 0, 0); +*/ + report_end(); +} diff --git a/designs/ICI4-3DCAM-Integ1/testbench.vhd b/designs/ICI4-3DCAM-Integ1/testbench.vhd new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/testbench.vhd @@ -0,0 +1,325 @@ +----------------------------------------------------------------------------- +-- LEON3 Demonstration design test bench +-- Copyright (C) 2004 Jiri Gaisler, Gaisler Research +------------------------------------------------------------------------------ +-- This file is a part of the GRLIB VHDL IP LIBRARY +-- Copyright (C) 2003 - 2008, Gaisler Research +-- Copyright (C) 2008 - 2012, Aeroflex Gaisler +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +------------------------------------------------------------------------------ + +library ieee; +use ieee.std_logic_1164.all; +library gaisler; +use gaisler.libdcom.all; +use gaisler.sim.all; +library techmap; +use techmap.gencomp.all; +use work.debug.all; +library hynix; +use hynix.components.all; +library micron; + +use work.config.all; -- configuration + +entity testbench is + generic ( + fabtech : integer := CFG_FABTECH; + memtech : integer := CFG_MEMTECH; + padtech : integer := CFG_PADTECH; + clktech : integer := CFG_CLKTECH; + disas : integer := CFG_DISAS; -- Enable disassembly to console + dbguart : integer := CFG_DUART; -- Print UART on console + pclow : integer := CFG_PCLOW + + ); +end; + +architecture behav of testbench is + +constant promfile : string := "prom.srec"; -- rom contents +constant sramfile : string := "sram.srec"; -- ram contents +constant sdramfile : string := "sdram.srec"; -- sdram contents + +signal clk : std_logic := '0'; +signal Rst : std_logic := '0'; -- Reset +constant ct : integer := 40; + +signal address : std_logic_vector(24 downto 0); +signal data : std_logic_vector(15 downto 0); +signal button : std_logic_vector(3 downto 0) := "0000"; +signal genio : std_logic_vector(59 downto 0); +signal romsn : std_logic; +signal oen : std_ulogic; +signal writen : std_ulogic; +signal GND : std_ulogic := '0'; +signal VCC : std_ulogic := '1'; +signal NC : std_ulogic := 'Z'; + +signal txd1, rxd1 : std_logic; +signal txd2, rxd2 : std_logic; +signal ctsn1, rtsn1 : std_ulogic; +signal ctsn2, rtsn2 : std_ulogic; + +signal phy_mii_data: std_logic; -- ethernet PHY interface +signal phy_tx_clk : std_ulogic; +signal phy_rx_clk : std_ulogic; +signal phy_rx_data : std_logic_vector(7 downto 0); +signal phy_dv : std_ulogic; +signal phy_rx_er : std_ulogic; +signal phy_col : std_ulogic; +signal phy_crs : std_ulogic; +signal phy_tx_data : std_logic_vector(7 downto 0); +signal phy_tx_en : std_ulogic; +signal phy_tx_er : std_ulogic; +signal phy_mii_clk : std_ulogic; +signal phy_rst_n : std_ulogic; +signal phy_gtx_clk : std_ulogic; +signal phy_mii_int_n : std_ulogic; + +signal clk27 : std_ulogic := '0'; +signal clk200p : std_ulogic := '0'; +signal clk200n : std_ulogic := '1'; +signal clk33 : std_ulogic := '0'; + +signal iic_scl : std_ulogic; +signal iic_sda : std_ulogic; +signal ddc_scl : std_ulogic; +signal ddc_sda : std_ulogic; +signal dvi_iic_scl : std_logic; +signal dvi_iic_sda : std_logic; + +signal tft_lcd_data : std_logic_vector(11 downto 0); +signal tft_lcd_clk_p : std_ulogic; +signal tft_lcd_clk_n : std_ulogic; +signal tft_lcd_hsync : std_ulogic; +signal tft_lcd_vsync : std_ulogic; +signal tft_lcd_de : std_ulogic; +signal tft_lcd_reset_b : std_ulogic; + + -- DDR2 memory + signal ddr_clk : std_logic; + signal ddr_clkb : std_logic; + signal ddr_clk_fb : std_logic; + signal ddr_cke : std_logic; + signal ddr_csb : std_logic := '0'; + signal ddr_we : std_ulogic; -- write enable + signal ddr_ras : std_ulogic; -- ras + signal ddr_cas : std_ulogic; -- cas + signal ddr_dm : std_logic_vector(1 downto 0); -- dm + signal ddr_dqs : std_logic_vector(1 downto 0); -- dqs + signal ddr_dqsn : std_logic_vector(1 downto 0); -- dqsn + signal ddr3_tdqs_n : std_logic_vector(1 downto 0); -- dqsn + signal ddr_ad : std_logic_vector(12 downto 0); -- address + signal ddr_ba : std_logic_vector(2 downto 0); -- bank address + signal ddr_dq : std_logic_vector(15 downto 0); -- data + signal ddr_dq2 : std_logic_vector(15 downto 0); -- data + signal ddr_odt : std_logic; + signal ddr_reset_n: std_logic; + signal ddr_rzq : std_logic; + signal ddr_zio : std_logic; + + + -- SPI flash + signal spi_sel_n : std_ulogic; + signal spi_clk : std_ulogic; + signal spi_mosi : std_ulogic; + + signal dsurst : std_ulogic; + signal errorn : std_logic; + +signal switch : std_logic_vector(3 downto 0); -- I/O port +signal led : std_logic_vector(3 downto 0); -- I/O port +constant lresp : boolean := false; + +begin + +-- clock and reset + + clk27 <= not clk27 after ct * 1 ns; + clk33 <= not clk33 after 15 ns; + clk200p <= not clk200p after 2.5 ns; + clk200n <= not clk200n after 2.5 ns; + rst <= not dsurst; + rxd1 <= 'H'; ctsn1 <= '0'; + rxd2 <= 'H'; ctsn2 <= '0'; + button <= "0000"; + switch <= "0000"; + + cpu : entity work.leon3mp + generic map ( fabtech, memtech, padtech, clktech, + disas, dbguart, pclow ) + port map (rst, clk27, clk200p, clk200n, clk33, address(24 downto 1), + data, oen, writen, romsn, + ddr_clk, ddr_clkb, ddr_cke, ddr_odt, ddr_reset_n, ddr_we, ddr_ras, ddr_cas, ddr_dm, + ddr_dqs, ddr_dqsn, ddr_ad, ddr_ba, ddr_dq, ddr_rzq, ddr_zio, + txd1, rxd1, ctsn1, rtsn1, button, + switch, led, + phy_gtx_clk, phy_mii_data, phy_tx_clk, phy_rx_clk, + phy_rx_data, phy_dv, phy_rx_er, phy_col, phy_crs, phy_tx_data, + phy_tx_en, phy_tx_er, phy_mii_clk, phy_rst_n, phy_mii_int_n, + iic_scl, iic_sda, ddc_scl, ddc_sda, + dvi_iic_scl, dvi_iic_sda, + tft_lcd_data, tft_lcd_clk_p, tft_lcd_clk_n, tft_lcd_hsync, + tft_lcd_vsync, tft_lcd_de, tft_lcd_reset_b, + spi_sel_n, spi_clk, spi_mosi + ); + +-- prom0 : sram generic map (index => 6, abits => romdepth, fname => promfile) +-- port map (address(romdepth-1 downto 0), data(31 downto 24), romsn, +-- writen, oen); + + prom0 : for i in 0 to 1 generate + sr0 : sram generic map (index => i+4, abits => 24, fname => promfile) + port map (address(24 downto 1), data(15-i*8 downto 8-i*8), romsn, + writen, oen); + end generate; + address(0) <= '0'; + + u1 : entity micron.ddr3 + port map ( rst_n => ddr_reset_n, dq => ddr_dq, + tdqs_n => ddr3_tdqs_n, + dqs => ddr_dqs, dqs_n => ddr_dqsn, + dm_tdqs => ddr_dm, we_n => ddr_we, cas_n => ddr_cas, + ras_n => ddr_ras, cs_n => ddr_csb, ba => ddr_ba, + addr => ddr_ad(12 downto 0), cke => ddr_cke, + ck => ddr_clk, ck_n => ddr_clkb, odt => ddr_odt) ; + + errorn <= led(1); + errorn <= 'H'; -- ERROR pull-up + + phy0 : if (CFG_GRETH = 1) generate + phy_mii_data <= 'H'; + p0: phy + generic map (address => 7) + port map(phy_rst_n, phy_mii_data, phy_tx_clk, phy_rx_clk, phy_rx_data, + phy_dv, phy_rx_er, phy_col, phy_crs, phy_tx_data, phy_tx_en, + phy_tx_er, phy_mii_clk, phy_gtx_clk); + end generate; + + iuerr : process + begin + wait for 5000 ns; + if to_x01(errorn) = '1' then wait on errorn; end if; + assert (to_x01(errorn) = '1') + report "*** IU in error mode, simulation halted ***" + severity failure ; + end process; + + data <= buskeep(data) after 5 ns; + + dsucom : process + procedure dsucfg(signal dsurx : in std_ulogic; signal dsutx : out std_ulogic) is + variable w32 : std_logic_vector(31 downto 0); + variable c8 : std_logic_vector(7 downto 0); + constant txp : time := 320 * 1 ns; + begin + dsutx <= '1'; + dsurst <= '0'; + wait for 2500 ns; + dsurst <= '1'; + wait; + wait for 5000 ns; + txc(dsutx, 16#55#, txp); -- sync uart + + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#90#, 16#00#, 16#00#, 16#00#, txp); + txa(dsutx, 16#00#, 16#00#, 16#20#, 16#2e#, txp); + + wait for 25000 ns; + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#90#, 16#00#, 16#00#, 16#20#, txp); + txa(dsutx, 16#00#, 16#00#, 16#00#, 16#01#, txp); + + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#90#, 16#40#, 16#00#, 16#24#, txp); + txa(dsutx, 16#00#, 16#00#, 16#00#, 16#0D#, txp); + + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#90#, 16#70#, 16#11#, 16#78#, txp); + txa(dsutx, 16#91#, 16#00#, 16#00#, 16#0D#, txp); + + txa(dsutx, 16#90#, 16#40#, 16#00#, 16#44#, txp); + txa(dsutx, 16#00#, 16#00#, 16#20#, 16#00#, txp); + + txc(dsutx, 16#80#, txp); + txa(dsutx, 16#90#, 16#40#, 16#00#, 16#44#, txp); + + wait; + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#00#, 16#00#, 16#0a#, 16#aa#, txp); + txa(dsutx, 16#00#, 16#55#, 16#00#, 16#55#, txp); + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#00#, 16#00#, 16#0a#, 16#a0#, txp); + txa(dsutx, 16#01#, 16#02#, 16#09#, 16#33#, txp); + + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#90#, 16#00#, 16#00#, 16#00#, txp); + txa(dsutx, 16#00#, 16#00#, 16#00#, 16#2e#, txp); + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#91#, 16#00#, 16#00#, 16#00#, txp); + txa(dsutx, 16#00#, 16#00#, 16#00#, 16#2e#, txp); + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#90#, 16#00#, 16#00#, 16#20#, txp); + txa(dsutx, 16#00#, 16#00#, 16#00#, 16#0f#, txp); + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#90#, 16#00#, 16#00#, 16#20#, txp); + txa(dsutx, 16#00#, 16#00#, 16#00#, 16#00#, txp); + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#80#, 16#00#, 16#02#, 16#10#, txp); + txa(dsutx, 16#00#, 16#00#, 16#00#, 16#0f#, txp); + + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#91#, 16#40#, 16#00#, 16#24#, txp); + txa(dsutx, 16#00#, 16#00#, 16#00#, 16#24#, txp); + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#91#, 16#70#, 16#00#, 16#00#, txp); + txa(dsutx, 16#00#, 16#00#, 16#00#, 16#03#, txp); + + + + + + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#90#, 16#00#, 16#00#, 16#20#, txp); + txa(dsutx, 16#00#, 16#00#, 16#ff#, 16#ff#, txp); + + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#90#, 16#40#, 16#00#, 16#48#, txp); + txa(dsutx, 16#00#, 16#00#, 16#00#, 16#12#, txp); + + txc(dsutx, 16#c0#, txp); + txa(dsutx, 16#90#, 16#40#, 16#00#, 16#60#, txp); + txa(dsutx, 16#00#, 16#00#, 16#12#, 16#10#, txp); + + txc(dsutx, 16#80#, txp); + txa(dsutx, 16#90#, 16#00#, 16#00#, 16#00#, txp); + rxi(dsurx, w32, txp, lresp); + + txc(dsutx, 16#a0#, txp); + txa(dsutx, 16#40#, 16#00#, 16#00#, 16#00#, txp); + rxi(dsurx, w32, txp, lresp); + + end; + + begin + + dsucfg(txd2, rxd2); + + wait; + end process; +end ; + diff --git a/designs/ICI4-3DCAM-Integ1/tkconfig.h b/designs/ICI4-3DCAM-Integ1/tkconfig.h new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/tkconfig.h @@ -0,0 +1,1051 @@ +#if defined CONFIG_SYN_INFERRED +#define CONFIG_SYN_TECH inferred +#elif defined CONFIG_SYN_UMC +#define CONFIG_SYN_TECH umc +#elif defined CONFIG_SYN_RHUMC +#define CONFIG_SYN_TECH rhumc +#elif defined CONFIG_SYN_ATC18 +#define CONFIG_SYN_TECH atc18s +#elif defined CONFIG_SYN_ATC18RHA +#define CONFIG_SYN_TECH atc18rha +#elif defined CONFIG_SYN_AXCEL +#define CONFIG_SYN_TECH axcel +#elif defined CONFIG_SYN_AXDSP +#define CONFIG_SYN_TECH axdsp +#elif defined CONFIG_SYN_PROASICPLUS +#define CONFIG_SYN_TECH proasic +#elif defined CONFIG_SYN_ALTERA +#define CONFIG_SYN_TECH altera +#elif defined CONFIG_SYN_STRATIX +#define CONFIG_SYN_TECH stratix1 +#elif defined CONFIG_SYN_STRATIXII +#define CONFIG_SYN_TECH stratix2 +#elif defined CONFIG_SYN_STRATIXIII +#define CONFIG_SYN_TECH stratix3 +#elif defined CONFIG_SYN_CYCLONEIII +#define CONFIG_SYN_TECH cyclone3 +#elif defined CONFIG_SYN_EASIC45 +#define CONFIG_SYN_TECH easic45 +#elif defined CONFIG_SYN_EASIC90 +#define CONFIG_SYN_TECH easic90 +#elif defined CONFIG_SYN_IHP25 +#define CONFIG_SYN_TECH ihp25 +#elif defined CONFIG_SYN_IHP25RH +#define CONFIG_SYN_TECH ihp25rh +#elif defined CONFIG_SYN_CMOS9SF +#define CONFIG_SYN_TECH cmos9sf +#elif defined CONFIG_SYN_LATTICE +#define CONFIG_SYN_TECH lattice +#elif defined CONFIG_SYN_ECLIPSE +#define CONFIG_SYN_TECH eclipse +#elif defined CONFIG_SYN_PEREGRINE +#define CONFIG_SYN_TECH peregrine +#elif defined CONFIG_SYN_PROASIC +#define CONFIG_SYN_TECH proasic +#elif defined CONFIG_SYN_PROASIC3 +#define CONFIG_SYN_TECH apa3 +#elif defined CONFIG_SYN_PROASIC3E +#define CONFIG_SYN_TECH apa3e +#elif defined CONFIG_SYN_PROASIC3L +#define CONFIG_SYN_TECH apa3l +#elif defined CONFIG_SYN_IGLOO +#define CONFIG_SYN_TECH apa3 +#elif defined CONFIG_SYN_FUSION +#define CONFIG_SYN_TECH actfus +#elif defined CONFIG_SYN_SPARTAN2 +#define CONFIG_SYN_TECH virtex +#elif defined CONFIG_SYN_VIRTEX +#define CONFIG_SYN_TECH virtex +#elif defined CONFIG_SYN_VIRTEXE +#define CONFIG_SYN_TECH virtex +#elif defined CONFIG_SYN_SPARTAN3 +#define CONFIG_SYN_TECH spartan3 +#elif defined CONFIG_SYN_SPARTAN3E +#define CONFIG_SYN_TECH spartan3e +#elif defined CONFIG_SYN_SPARTAN6 +#define CONFIG_SYN_TECH spartan6 +#elif defined CONFIG_SYN_VIRTEX2 +#define CONFIG_SYN_TECH virtex2 +#elif defined CONFIG_SYN_VIRTEX4 +#define CONFIG_SYN_TECH virtex4 +#elif defined CONFIG_SYN_VIRTEX5 +#define CONFIG_SYN_TECH virtex5 +#elif defined CONFIG_SYN_VIRTEX6 +#define CONFIG_SYN_TECH virtex6 +#elif defined CONFIG_SYN_RH_LIB18T +#define CONFIG_SYN_TECH rhlib18t +#elif defined CONFIG_SYN_SMIC13 +#define CONFIG_SYN_TECH smic013 +#elif defined CONFIG_SYN_UT025CRH +#define CONFIG_SYN_TECH ut25 +#elif defined CONFIG_SYN_UT130HBD +#define CONFIG_SYN_TECH ut130 +#elif defined CONFIG_SYN_UT90NHBD +#define CONFIG_SYN_TECH ut90 +#elif defined CONFIG_SYN_TSMC90 +#define CONFIG_SYN_TECH tsmc90 +#elif defined CONFIG_SYN_TM65GPLUS +#define CONFIG_SYN_TECH tm65gpl +#elif defined CONFIG_SYN_CUSTOM1 +#define CONFIG_SYN_TECH custom1 +#else +#error "unknown target technology" +#endif + +#if defined CONFIG_SYN_INFER_RAM +#define CFG_RAM_TECH inferred +#elif defined CONFIG_MEM_UMC +#define CFG_RAM_TECH umc +#elif defined CONFIG_MEM_RHUMC +#define CFG_RAM_TECH rhumc +#elif defined CONFIG_MEM_VIRAGE +#define CFG_RAM_TECH memvirage +#elif defined CONFIG_MEM_ARTISAN +#define CFG_RAM_TECH memartisan +#elif defined CONFIG_MEM_CUSTOM1 +#define CFG_RAM_TECH custom1 +#elif defined CONFIG_MEM_VIRAGE90 +#define CFG_RAM_TECH memvirage90 +#elif defined CONFIG_MEM_INFERRED +#define CFG_RAM_TECH inferred +#else +#define CFG_RAM_TECH CONFIG_SYN_TECH +#endif + +#if defined CONFIG_SYN_INFER_PADS +#define CFG_PAD_TECH inferred +#else +#define CFG_PAD_TECH CONFIG_SYN_TECH +#endif + +#ifndef CONFIG_SYN_NO_ASYNC +#define CONFIG_SYN_NO_ASYNC 0 +#endif + +#ifndef CONFIG_SYN_SCAN +#define CONFIG_SYN_SCAN 0 +#endif + + +#if defined CONFIG_CLK_ALTDLL +#define CFG_CLK_TECH CONFIG_SYN_TECH +#elif defined CONFIG_CLK_HCLKBUF +#define CFG_CLK_TECH axcel +#elif defined CONFIG_CLK_LATDLL +#define CFG_CLK_TECH lattice +#elif defined CONFIG_CLK_PRO3PLL +#define CFG_CLK_TECH apa3 +#elif defined CONFIG_CLK_PRO3EPLL +#define CFG_CLK_TECH apa3e +#elif defined CONFIG_CLK_PRO3LPLL +#define CFG_CLK_TECH apa3l +#elif defined CONFIG_CLK_FUSPLL +#define CFG_CLK_TECH actfus +#elif defined CONFIG_CLK_CLKDLL +#define CFG_CLK_TECH virtex +#elif defined CONFIG_CLK_DCM +#define CFG_CLK_TECH CONFIG_SYN_TECH +#elif defined CONFIG_CLK_LIB18T +#define CFG_CLK_TECH rhlib18t +#elif defined CONFIG_CLK_RHUMC +#define CFG_CLK_TECH rhumc +#elif defined CONFIG_CLK_UT130HBD +#define CFG_CLK_TECH ut130 +#else +#define CFG_CLK_TECH inferred +#endif + +#ifndef CONFIG_CLK_MUL +#define CONFIG_CLK_MUL 2 +#endif + +#ifndef CONFIG_CLK_DIV +#define CONFIG_CLK_DIV 2 +#endif + +#ifndef CONFIG_OCLK_DIV +#define CONFIG_OCLK_DIV 1 +#endif + +#ifndef CONFIG_OCLKB_DIV +#define CONFIG_OCLKB_DIV 0 +#endif + +#ifndef CONFIG_OCLKC_DIV +#define CONFIG_OCLKC_DIV 0 +#endif + +#ifndef CONFIG_PCI_CLKDLL +#define CONFIG_PCI_CLKDLL 0 +#endif + +#ifndef CONFIG_PCI_SYSCLK +#define CONFIG_PCI_SYSCLK 0 +#endif + +#ifndef CONFIG_CLK_NOFB +#define CONFIG_CLK_NOFB 0 +#endif +#ifndef CONFIG_LEON3 +#define CONFIG_LEON3 0 +#endif + +#ifndef CONFIG_PROC_NUM +#define CONFIG_PROC_NUM 1 +#endif + +#ifndef CONFIG_IU_NWINDOWS +#define CONFIG_IU_NWINDOWS 8 +#endif + +#ifndef CONFIG_IU_RSTADDR +#define CONFIG_IU_RSTADDR 8 +#endif + +#ifndef CONFIG_IU_LDELAY +#define CONFIG_IU_LDELAY 1 +#endif + +#ifndef CONFIG_IU_WATCHPOINTS +#define CONFIG_IU_WATCHPOINTS 0 +#endif + +#ifdef CONFIG_IU_V8MULDIV +#ifdef CONFIG_IU_MUL_LATENCY_4 +#define CFG_IU_V8 1 +#elif defined CONFIG_IU_MUL_LATENCY_5 +#define CFG_IU_V8 2 +#elif defined CONFIG_IU_MUL_LATENCY_2 +#define CFG_IU_V8 16#32# +#endif +#else +#define CFG_IU_V8 0 +#endif + +#ifdef CONFIG_IU_MUL_MODGEN +#define CFG_IU_MUL_STRUCT 1 +#elif defined CONFIG_IU_MUL_TECHSPEC +#define CFG_IU_MUL_STRUCT 2 +#elif defined CONFIG_IU_MUL_DW +#define CFG_IU_MUL_STRUCT 3 +#else +#define CFG_IU_MUL_STRUCT 0 +#endif + +#ifndef CONFIG_PWD +#define CONFIG_PWD 0 +#endif + +#ifndef CONFIG_IU_MUL_MAC +#define CONFIG_IU_MUL_MAC 0 +#endif + +#ifndef CONFIG_IU_BP +#define CONFIG_IU_BP 0 +#endif + +#ifndef CONFIG_NOTAG +#define CONFIG_NOTAG 0 +#endif + +#ifndef CONFIG_IU_SVT +#define CONFIG_IU_SVT 0 +#endif + +#if defined CONFIG_FPU_GRFPC1 +#define CONFIG_FPU_GRFPC 1 +#elif defined CONFIG_FPU_GRFPC2 +#define CONFIG_FPU_GRFPC 2 +#else +#define CONFIG_FPU_GRFPC 0 +#endif + +#if defined CONFIG_FPU_GRFPU_INFMUL +#define CONFIG_FPU_GRFPU_MUL 0 +#elif defined CONFIG_FPU_GRFPU_DWMUL +#define CONFIG_FPU_GRFPU_MUL 1 +#elif defined CONFIG_FPU_GRFPU_MODGEN +#define CONFIG_FPU_GRFPU_MUL 2 +#elif defined CONFIG_FPU_GRFPU_TECHSPEC +#define CONFIG_FPU_GRFPU_MUL 3 +#else +#define CONFIG_FPU_GRFPU_MUL 0 +#endif + +#if defined CONFIG_FPU_GRFPU_SH +#define CONFIG_FPU_GRFPU_SHARED 1 +#else +#define CONFIG_FPU_GRFPU_SHARED 0 +#endif + +#if defined CONFIG_FPU_GRFPU +#define CONFIG_FPU (1+CONFIG_FPU_GRFPU_MUL) +#elif defined CONFIG_FPU_MEIKO +#define CONFIG_FPU 15 +#elif defined CONFIG_FPU_GRFPULITE +#define CONFIG_FPU (8+CONFIG_FPU_GRFPC) +#else +#define CONFIG_FPU 0 +#endif + +#ifndef CONFIG_FPU_NETLIST +#define CONFIG_FPU_NETLIST 0 +#endif + +#ifndef CONFIG_ICACHE_ENABLE +#define CONFIG_ICACHE_ENABLE 0 +#endif + +#if defined CONFIG_ICACHE_ASSO1 +#define CFG_IU_ISETS 1 +#elif defined CONFIG_ICACHE_ASSO2 +#define CFG_IU_ISETS 2 +#elif defined CONFIG_ICACHE_ASSO3 +#define CFG_IU_ISETS 3 +#elif defined CONFIG_ICACHE_ASSO4 +#define CFG_IU_ISETS 4 +#else +#define CFG_IU_ISETS 1 +#endif + +#if defined CONFIG_ICACHE_SZ1 +#define CFG_ICACHE_SZ 1 +#elif defined CONFIG_ICACHE_SZ2 +#define CFG_ICACHE_SZ 2 +#elif defined CONFIG_ICACHE_SZ4 +#define CFG_ICACHE_SZ 4 +#elif defined CONFIG_ICACHE_SZ8 +#define CFG_ICACHE_SZ 8 +#elif defined CONFIG_ICACHE_SZ16 +#define CFG_ICACHE_SZ 16 +#elif defined CONFIG_ICACHE_SZ32 +#define CFG_ICACHE_SZ 32 +#elif defined CONFIG_ICACHE_SZ64 +#define CFG_ICACHE_SZ 64 +#elif defined CONFIG_ICACHE_SZ128 +#define CFG_ICACHE_SZ 128 +#elif defined CONFIG_ICACHE_SZ256 +#define CFG_ICACHE_SZ 256 +#else +#define CFG_ICACHE_SZ 1 +#endif + +#ifdef CONFIG_ICACHE_LZ16 +#define CFG_ILINE_SZ 4 +#else +#define CFG_ILINE_SZ 8 +#endif + +#if defined CONFIG_ICACHE_ALGODIR +#define CFG_ICACHE_ALGORND 3 +#elif defined CONFIG_ICACHE_ALGORND +#define CFG_ICACHE_ALGORND 2 +#elif defined CONFIG_ICACHE_ALGOLRR +#define CFG_ICACHE_ALGORND 1 +#else +#define CFG_ICACHE_ALGORND 0 +#endif + +#ifndef CONFIG_ICACHE_LOCK +#define CONFIG_ICACHE_LOCK 0 +#endif + +#ifndef CONFIG_ICACHE_LRAM +#define CONFIG_ICACHE_LRAM 0 +#endif + +#ifndef CONFIG_ICACHE_LRSTART +#define CONFIG_ICACHE_LRSTART 8E +#endif + +#if defined CONFIG_ICACHE_LRAM_SZ2 +#define CFG_ILRAM_SIZE 2 +#elif defined CONFIG_ICACHE_LRAM_SZ4 +#define CFG_ILRAM_SIZE 4 +#elif defined CONFIG_ICACHE_LRAM_SZ8 +#define CFG_ILRAM_SIZE 8 +#elif defined CONFIG_ICACHE_LRAM_SZ16 +#define CFG_ILRAM_SIZE 16 +#elif defined CONFIG_ICACHE_LRAM_SZ32 +#define CFG_ILRAM_SIZE 32 +#elif defined CONFIG_ICACHE_LRAM_SZ64 +#define CFG_ILRAM_SIZE 64 +#elif defined CONFIG_ICACHE_LRAM_SZ128 +#define CFG_ILRAM_SIZE 128 +#elif defined CONFIG_ICACHE_LRAM_SZ256 +#define CFG_ILRAM_SIZE 256 +#else +#define CFG_ILRAM_SIZE 1 +#endif + + +#ifndef CONFIG_DCACHE_ENABLE +#define CONFIG_DCACHE_ENABLE 0 +#endif + +#if defined CONFIG_DCACHE_ASSO1 +#define CFG_IU_DSETS 1 +#elif defined CONFIG_DCACHE_ASSO2 +#define CFG_IU_DSETS 2 +#elif defined CONFIG_DCACHE_ASSO3 +#define CFG_IU_DSETS 3 +#elif defined CONFIG_DCACHE_ASSO4 +#define CFG_IU_DSETS 4 +#else +#define CFG_IU_DSETS 1 +#endif + +#if defined CONFIG_DCACHE_SZ1 +#define CFG_DCACHE_SZ 1 +#elif defined CONFIG_DCACHE_SZ2 +#define CFG_DCACHE_SZ 2 +#elif defined CONFIG_DCACHE_SZ4 +#define CFG_DCACHE_SZ 4 +#elif defined CONFIG_DCACHE_SZ8 +#define CFG_DCACHE_SZ 8 +#elif defined CONFIG_DCACHE_SZ16 +#define CFG_DCACHE_SZ 16 +#elif defined CONFIG_DCACHE_SZ32 +#define CFG_DCACHE_SZ 32 +#elif defined CONFIG_DCACHE_SZ64 +#define CFG_DCACHE_SZ 64 +#elif defined CONFIG_DCACHE_SZ128 +#define CFG_DCACHE_SZ 128 +#elif defined CONFIG_DCACHE_SZ256 +#define CFG_DCACHE_SZ 256 +#else +#define CFG_DCACHE_SZ 1 +#endif + +#ifdef CONFIG_DCACHE_LZ16 +#define CFG_DLINE_SZ 4 +#else +#define CFG_DLINE_SZ 8 +#endif + +#if defined CONFIG_DCACHE_ALGODIR +#define CFG_DCACHE_ALGORND 3 +#elif defined CONFIG_DCACHE_ALGORND +#define CFG_DCACHE_ALGORND 2 +#elif defined CONFIG_DCACHE_ALGOLRR +#define CFG_DCACHE_ALGORND 1 +#else +#define CFG_DCACHE_ALGORND 0 +#endif + +#ifndef CONFIG_DCACHE_LOCK +#define CONFIG_DCACHE_LOCK 0 +#endif + +#ifndef CONFIG_DCACHE_SNOOP +#define CONFIG_DCACHE_SNOOP 0 +#endif + +#ifndef CONFIG_DCACHE_SNOOP_FAST +#define CONFIG_DCACHE_SNOOP_FAST 0 +#endif + +#ifndef CONFIG_DCACHE_SNOOP_SEPTAG +#define CONFIG_DCACHE_SNOOP_SEPTAG 0 +#endif + +#ifndef CONFIG_CACHE_FIXED +#define CONFIG_CACHE_FIXED 0 +#endif + +#ifndef CONFIG_DCACHE_LRAM +#define CONFIG_DCACHE_LRAM 0 +#endif + +#ifndef CONFIG_DCACHE_LRSTART +#define CONFIG_DCACHE_LRSTART 8F +#endif + +#if defined CONFIG_DCACHE_LRAM_SZ2 +#define CFG_DLRAM_SIZE 2 +#elif defined CONFIG_DCACHE_LRAM_SZ4 +#define CFG_DLRAM_SIZE 4 +#elif defined CONFIG_DCACHE_LRAM_SZ8 +#define CFG_DLRAM_SIZE 8 +#elif defined CONFIG_DCACHE_LRAM_SZ16 +#define CFG_DLRAM_SIZE 16 +#elif defined CONFIG_DCACHE_LRAM_SZ32 +#define CFG_DLRAM_SIZE 32 +#elif defined CONFIG_DCACHE_LRAM_SZ64 +#define CFG_DLRAM_SIZE 64 +#elif defined CONFIG_DCACHE_LRAM_SZ128 +#define CFG_DLRAM_SIZE 128 +#elif defined CONFIG_DCACHE_LRAM_SZ256 +#define CFG_DLRAM_SIZE 256 +#else +#define CFG_DLRAM_SIZE 1 +#endif + +#if defined CONFIG_MMU_PAGE_4K +#define CONFIG_MMU_PAGE 0 +#elif defined CONFIG_MMU_PAGE_8K +#define CONFIG_MMU_PAGE 1 +#elif defined CONFIG_MMU_PAGE_16K +#define CONFIG_MMU_PAGE 2 +#elif defined CONFIG_MMU_PAGE_32K +#define CONFIG_MMU_PAGE 3 +#elif defined CONFIG_MMU_PAGE_PROG +#define CONFIG_MMU_PAGE 4 +#else +#define CONFIG_MMU_PAGE 0 +#endif + +#ifdef CONFIG_MMU_ENABLE +#define CONFIG_MMUEN 1 + +#ifdef CONFIG_MMU_SPLIT +#define CONFIG_TLB_TYPE 0 +#endif +#ifdef CONFIG_MMU_COMBINED +#define CONFIG_TLB_TYPE 1 +#endif + +#ifdef CONFIG_MMU_REPARRAY +#define CONFIG_TLB_REP 0 +#endif +#ifdef CONFIG_MMU_REPINCREMENT +#define CONFIG_TLB_REP 1 +#endif + +#ifdef CONFIG_MMU_I2 +#define CONFIG_ITLBNUM 2 +#endif +#ifdef CONFIG_MMU_I4 +#define CONFIG_ITLBNUM 4 +#endif +#ifdef CONFIG_MMU_I8 +#define CONFIG_ITLBNUM 8 +#endif +#ifdef CONFIG_MMU_I16 +#define CONFIG_ITLBNUM 16 +#endif +#ifdef CONFIG_MMU_I32 +#define CONFIG_ITLBNUM 32 +#endif + +#define CONFIG_DTLBNUM 2 +#ifdef CONFIG_MMU_D2 +#undef CONFIG_DTLBNUM +#define CONFIG_DTLBNUM 2 +#endif +#ifdef CONFIG_MMU_D4 +#undef CONFIG_DTLBNUM +#define CONFIG_DTLBNUM 4 +#endif +#ifdef CONFIG_MMU_D8 +#undef CONFIG_DTLBNUM +#define CONFIG_DTLBNUM 8 +#endif +#ifdef CONFIG_MMU_D16 +#undef CONFIG_DTLBNUM +#define CONFIG_DTLBNUM 16 +#endif +#ifdef CONFIG_MMU_D32 +#undef CONFIG_DTLBNUM +#define CONFIG_DTLBNUM 32 +#endif +#ifdef CONFIG_MMU_FASTWB +#define CFG_MMU_FASTWB 1 +#else +#define CFG_MMU_FASTWB 0 +#endif + +#else +#define CONFIG_MMUEN 0 +#define CONFIG_ITLBNUM 2 +#define CONFIG_DTLBNUM 2 +#define CONFIG_TLB_TYPE 1 +#define CONFIG_TLB_REP 1 +#define CFG_MMU_FASTWB 0 +#endif + +#ifndef CONFIG_DSU_ENABLE +#define CONFIG_DSU_ENABLE 0 +#endif + +#if defined CONFIG_DSU_ITRACESZ1 +#define CFG_DSU_ITB 1 +#elif CONFIG_DSU_ITRACESZ2 +#define CFG_DSU_ITB 2 +#elif CONFIG_DSU_ITRACESZ4 +#define CFG_DSU_ITB 4 +#elif CONFIG_DSU_ITRACESZ8 +#define CFG_DSU_ITB 8 +#elif CONFIG_DSU_ITRACESZ16 +#define CFG_DSU_ITB 16 +#else +#define CFG_DSU_ITB 0 +#endif + +#if defined CONFIG_DSU_ATRACESZ1 +#define CFG_DSU_ATB 1 +#elif CONFIG_DSU_ATRACESZ2 +#define CFG_DSU_ATB 2 +#elif CONFIG_DSU_ATRACESZ4 +#define CFG_DSU_ATB 4 +#elif CONFIG_DSU_ATRACESZ8 +#define CFG_DSU_ATB 8 +#elif CONFIG_DSU_ATRACESZ16 +#define CFG_DSU_ATB 16 +#else +#define CFG_DSU_ATB 0 +#endif + +#ifndef CONFIG_LEON3FT_EN +#define CONFIG_LEON3FT_EN 0 +#endif + +#if defined CONFIG_IUFT_PAR +#define CONFIG_IUFT_EN 1 +#elif defined CONFIG_IUFT_DMR +#define CONFIG_IUFT_EN 2 +#elif defined CONFIG_IUFT_BCH +#define CONFIG_IUFT_EN 3 +#elif defined CONFIG_IUFT_TMR +#define CONFIG_IUFT_EN 4 +#else +#define CONFIG_IUFT_EN 0 +#endif +#ifndef CONFIG_RF_ERRINJ +#define CONFIG_RF_ERRINJ 0 +#endif + +#ifndef CONFIG_FPUFT_EN +#define CONFIG_FPUFT 0 +#else +#ifdef CONFIG_FPU_GRFPU +#define CONFIG_FPUFT 2 +#else +#define CONFIG_FPUFT 1 +#endif +#endif + +#ifndef CONFIG_CACHE_FT_EN +#define CONFIG_CACHE_FT_EN 0 +#endif +#ifndef CONFIG_CACHE_ERRINJ +#define CONFIG_CACHE_ERRINJ 0 +#endif + +#ifndef CONFIG_LEON3_NETLIST +#define CONFIG_LEON3_NETLIST 0 +#endif + +#ifdef CONFIG_DEBUG_PC32 +#define CFG_DEBUG_PC32 0 +#else +#define CFG_DEBUG_PC32 2 +#endif +#ifndef CONFIG_IU_DISAS +#define CONFIG_IU_DISAS 0 +#endif +#ifndef CONFIG_IU_DISAS_NET +#define CONFIG_IU_DISAS_NET 0 +#endif + + +#ifndef CONFIG_AHB_SPLIT +#define CONFIG_AHB_SPLIT 0 +#endif + +#ifndef CONFIG_AHB_RROBIN +#define CONFIG_AHB_RROBIN 0 +#endif + +#ifndef CONFIG_AHB_IOADDR +#define CONFIG_AHB_IOADDR FFF +#endif + +#ifndef CONFIG_APB_HADDR +#define CONFIG_APB_HADDR 800 +#endif + +#ifndef CONFIG_AHB_MON +#define CONFIG_AHB_MON 0 +#endif + +#ifndef CONFIG_AHB_MONERR +#define CONFIG_AHB_MONERR 0 +#endif + +#ifndef CONFIG_AHB_MONWAR +#define CONFIG_AHB_MONWAR 0 +#endif + +#ifndef CONFIG_AHB_DTRACE +#define CONFIG_AHB_DTRACE 0 +#endif + +#ifndef CONFIG_DSU_JTAG +#define CONFIG_DSU_JTAG 0 +#endif + +#ifndef CONFIG_DSU_ETH +#define CONFIG_DSU_ETH 0 +#endif + +#ifndef CONFIG_DSU_IPMSB +#define CONFIG_DSU_IPMSB C0A8 +#endif + +#ifndef CONFIG_DSU_IPLSB +#define CONFIG_DSU_IPLSB 0033 +#endif + +#ifndef CONFIG_DSU_ETHMSB +#define CONFIG_DSU_ETHMSB 020000 +#endif + +#ifndef CONFIG_DSU_ETHLSB +#define CONFIG_DSU_ETHLSB 000009 +#endif + +#if defined CONFIG_DSU_ETHSZ1 +#define CFG_DSU_ETHB 1 +#elif CONFIG_DSU_ETHSZ2 +#define CFG_DSU_ETHB 2 +#elif CONFIG_DSU_ETHSZ4 +#define CFG_DSU_ETHB 4 +#elif CONFIG_DSU_ETHSZ8 +#define CFG_DSU_ETHB 8 +#elif CONFIG_DSU_ETHSZ16 +#define CFG_DSU_ETHB 16 +#elif CONFIG_DSU_ETHSZ32 +#define CFG_DSU_ETHB 32 +#else +#define CFG_DSU_ETHB 1 +#endif + +#ifndef CONFIG_DSU_ETH_PROG +#define CONFIG_DSU_ETH_PROG 0 +#endif + +#ifndef CONFIG_DSU_ETH_DIS +#define CONFIG_DSU_ETH_DIS 0 +#endif + +#ifndef CONFIG_MCTRL_LEON2 +#define CONFIG_MCTRL_LEON2 0 +#endif + +#ifndef CONFIG_MCTRL_SDRAM +#define CONFIG_MCTRL_SDRAM 0 +#endif + +#ifndef CONFIG_MCTRL_SDRAM_SEPBUS +#define CONFIG_MCTRL_SDRAM_SEPBUS 0 +#endif + +#ifndef CONFIG_MCTRL_SDRAM_INVCLK +#define CONFIG_MCTRL_SDRAM_INVCLK 0 +#endif + +#ifndef CONFIG_MCTRL_SDRAM_BUS64 +#define CONFIG_MCTRL_SDRAM_BUS64 0 +#endif + +#ifndef CONFIG_MCTRL_8BIT +#define CONFIG_MCTRL_8BIT 0 +#endif + +#ifndef CONFIG_MCTRL_16BIT +#define CONFIG_MCTRL_16BIT 0 +#endif + +#ifndef CONFIG_MCTRL_5CS +#define CONFIG_MCTRL_5CS 0 +#endif + +#ifndef CONFIG_MCTRL_EDAC +#define CONFIG_MCTRL_EDAC 0 +#endif + +#ifndef CONFIG_MCTRL_PAGE +#define CONFIG_MCTRL_PAGE 0 +#endif + +#ifndef CONFIG_MCTRL_PROGPAGE +#define CONFIG_MCTRL_PROGPAGE 0 +#endif + + +#ifndef CONFIG_MIG_DDR2 +#define CONFIG_MIG_DDR2 0 +#endif + +#ifndef CONFIG_MIG_RANKS +#define CONFIG_MIG_RANKS 1 +#endif + +#ifndef CONFIG_MIG_COLBITS +#define CONFIG_MIG_COLBITS 10 +#endif + +#ifndef CONFIG_MIG_ROWBITS +#define CONFIG_MIG_ROWBITS 13 +#endif + +#ifndef CONFIG_MIG_BANKBITS +#define CONFIG_MIG_BANKBITS 2 +#endif + +#ifndef CONFIG_MIG_HMASK +#define CONFIG_MIG_HMASK F00 +#endif +#ifndef CONFIG_AHBSTAT_ENABLE +#define CONFIG_AHBSTAT_ENABLE 0 +#endif + +#ifndef CONFIG_AHBSTAT_NFTSLV +#define CONFIG_AHBSTAT_NFTSLV 1 +#endif + +#ifndef CONFIG_AHBROM_ENABLE +#define CONFIG_AHBROM_ENABLE 0 +#endif + +#ifndef CONFIG_AHBROM_START +#define CONFIG_AHBROM_START 000 +#endif + +#ifndef CONFIG_AHBROM_PIPE +#define CONFIG_AHBROM_PIPE 0 +#endif + +#if (CONFIG_AHBROM_START == 0) && (CONFIG_AHBROM_ENABLE == 1) +#define CONFIG_ROM_START 100 +#else +#define CONFIG_ROM_START 000 +#endif + + +#ifndef CONFIG_AHBRAM_ENABLE +#define CONFIG_AHBRAM_ENABLE 0 +#endif + +#ifndef CONFIG_AHBRAM_START +#define CONFIG_AHBRAM_START A00 +#endif + +#if defined CONFIG_AHBRAM_SZ1 +#define CFG_AHBRAMSZ 1 +#elif CONFIG_AHBRAM_SZ2 +#define CFG_AHBRAMSZ 2 +#elif CONFIG_AHBRAM_SZ4 +#define CFG_AHBRAMSZ 4 +#elif CONFIG_AHBRAM_SZ8 +#define CFG_AHBRAMSZ 8 +#elif CONFIG_AHBRAM_SZ16 +#define CFG_AHBRAMSZ 16 +#elif CONFIG_AHBRAM_SZ32 +#define CFG_AHBRAMSZ 32 +#elif CONFIG_AHBRAM_SZ64 +#define CFG_AHBRAMSZ 64 +#else +#define CFG_AHBRAMSZ 1 +#endif + +#ifndef CONFIG_GRETH_ENABLE +#define CONFIG_GRETH_ENABLE 0 +#endif + +#ifndef CONFIG_GRETH_GIGA +#define CONFIG_GRETH_GIGA 0 +#endif + +#if defined CONFIG_GRETH_FIFO4 +#define CFG_GRETH_FIFO 4 +#elif defined CONFIG_GRETH_FIFO8 +#define CFG_GRETH_FIFO 8 +#elif defined CONFIG_GRETH_FIFO16 +#define CFG_GRETH_FIFO 16 +#elif defined CONFIG_GRETH_FIFO32 +#define CFG_GRETH_FIFO 32 +#elif defined CONFIG_GRETH_FIFO64 +#define CFG_GRETH_FIFO 64 +#else +#define CFG_GRETH_FIFO 8 +#endif + +#ifndef CONFIG_UART1_ENABLE +#define CONFIG_UART1_ENABLE 0 +#endif + +#if defined CONFIG_UA1_FIFO1 +#define CFG_UA1_FIFO 1 +#elif defined CONFIG_UA1_FIFO2 +#define CFG_UA1_FIFO 2 +#elif defined CONFIG_UA1_FIFO4 +#define CFG_UA1_FIFO 4 +#elif defined CONFIG_UA1_FIFO8 +#define CFG_UA1_FIFO 8 +#elif defined CONFIG_UA1_FIFO16 +#define CFG_UA1_FIFO 16 +#elif defined CONFIG_UA1_FIFO32 +#define CFG_UA1_FIFO 32 +#else +#define CFG_UA1_FIFO 1 +#endif + +#ifndef CONFIG_IRQ3_ENABLE +#define CONFIG_IRQ3_ENABLE 0 +#endif +#ifndef CONFIG_IRQ3_NSEC +#define CONFIG_IRQ3_NSEC 0 +#endif +#ifndef CONFIG_GPT_ENABLE +#define CONFIG_GPT_ENABLE 0 +#endif + +#ifndef CONFIG_GPT_NTIM +#define CONFIG_GPT_NTIM 1 +#endif + +#ifndef CONFIG_GPT_SW +#define CONFIG_GPT_SW 8 +#endif + +#ifndef CONFIG_GPT_TW +#define CONFIG_GPT_TW 8 +#endif + +#ifndef CONFIG_GPT_IRQ +#define CONFIG_GPT_IRQ 8 +#endif + +#ifndef CONFIG_GPT_SEPIRQ +#define CONFIG_GPT_SEPIRQ 0 +#endif +#ifndef CONFIG_GPT_ENABLE +#define CONFIG_GPT_ENABLE 0 +#endif + +#ifndef CONFIG_GPT_NTIM +#define CONFIG_GPT_NTIM 1 +#endif + +#ifndef CONFIG_GPT_SW +#define CONFIG_GPT_SW 8 +#endif + +#ifndef CONFIG_GPT_TW +#define CONFIG_GPT_TW 8 +#endif + +#ifndef CONFIG_GPT_IRQ +#define CONFIG_GPT_IRQ 8 +#endif + +#ifndef CONFIG_GPT_SEPIRQ +#define CONFIG_GPT_SEPIRQ 0 +#endif + +#ifndef CONFIG_GPT_WDOGEN +#define CONFIG_GPT_WDOGEN 0 +#endif + +#ifndef CONFIG_GPT_WDOG +#define CONFIG_GPT_WDOG 0 +#endif + +#ifndef CONFIG_GRGPIO_ENABLE +#define CONFIG_GRGPIO_ENABLE 0 +#endif +#ifndef CONFIG_GRGPIO_IMASK +#define CONFIG_GRGPIO_IMASK 0000 +#endif +#ifndef CONFIG_GRGPIO_WIDTH +#define CONFIG_GRGPIO_WIDTH 1 +#endif + +#ifndef CONFIG_VGA_ENABLE +#define CONFIG_VGA_ENABLE 0 +#endif +#ifndef CONFIG_SVGA_ENABLE +#define CONFIG_SVGA_ENABLE 0 +#endif +#ifndef CONFIG_KBD_ENABLE +#define CONFIG_KBD_ENABLE 0 +#endif + + +#ifndef CONFIG_SPIMCTRL +#define CONFIG_SPIMCTRL 0 +#endif + +#ifndef CONFIG_SPIMCTRL_SDCARD +#define CONFIG_SPIMCTRL_SDCARD 0 +#endif + +#ifndef CONFIG_SPIMCTRL_READCMD +#define CONFIG_SPIMCTRL_READCMD 0 +#endif + +#ifndef CONFIG_SPIMCTRL_DUMMYBYTE +#define CONFIG_SPIMCTRL_DUMMYBYTE 0 +#endif + +#ifndef CONFIG_SPIMCTRL_DUALOUTPUT +#define CONFIG_SPIMCTRL_DUALOUTPUT 0 +#endif + +#ifndef CONFIG_SPIMCTRL_SCALER +#define CONFIG_SPIMCTRL_SCALER 1 +#endif + +#ifndef CONFIG_SPIMCTRL_ASCALER +#define CONFIG_SPIMCTRL_ASCALER 1 +#endif + +#ifndef CONFIG_SPIMCTRL_PWRUPCNT +#define CONFIG_SPIMCTRL_PWRUPCNT 0 +#endif +#ifndef CONFIG_SPICTRL_ENABLE +#define CONFIG_SPICTRL_ENABLE 0 +#endif +#ifndef CONFIG_SPICTRL_NUM +#define CONFIG_SPICTRL_NUM 1 +#endif +#ifndef CONFIG_SPICTRL_SLVS +#define CONFIG_SPICTRL_SLVS 1 +#endif +#ifndef CONFIG_SPICTRL_FIFO +#define CONFIG_SPICTRL_FIFO 1 +#endif +#ifndef CONFIG_SPICTRL_SLVREG +#define CONFIG_SPICTRL_SLVREG 0 +#endif +#ifndef CONFIG_SPICTRL_ODMODE +#define CONFIG_SPICTRL_ODMODE 0 +#endif +#ifndef CONFIG_SPICTRL_AM +#define CONFIG_SPICTRL_AM 0 +#endif +#ifndef CONFIG_SPICTRL_ASEL +#define CONFIG_SPICTRL_ASEL 0 +#endif +#ifndef CONFIG_SPICTRL_TWEN +#define CONFIG_SPICTRL_TWEN 0 +#endif +#ifndef CONFIG_SPICTRL_MAXWLEN +#define CONFIG_SPICTRL_MAXWLEN 0 +#endif +#ifndef CONFIG_SPICTRL_SYNCRAM +#define CONFIG_SPICTRL_SYNCRAM 0 +#endif +#if defined(CONFIG_SPICTRL_DMRFT) +#define CONFIG_SPICTRL_FT 1 +#elif defined(CONFIG_SPICTRL_TMRFT) +#define CONFIG_SPICTRL_FT 2 +#else +#define CONFIG_SPICTRL_FT 0 +#endif + +#ifndef CONFIG_DEBUG_UART +#define CONFIG_DEBUG_UART 0 +#endif diff --git a/designs/ICI4-3DCAM-Integ1/wave.do b/designs/ICI4-3DCAM-Integ1/wave.do new file mode 100644 --- /dev/null +++ b/designs/ICI4-3DCAM-Integ1/wave.do @@ -0,0 +1,107 @@ +onerror {resume} +quietly WaveActivateNextPane {} 0 +add wave -noupdate -radix hexadecimal /testbench/cpu/address +add wave -noupdate -radix hexadecimal /testbench/cpu/data +add wave -noupdate /testbench/cpu/oen +add wave -noupdate /testbench/cpu/writen +add wave -noupdate /testbench/cpu/romsn +add wave -noupdate /testbench/cpu/ddr_clk +add wave -noupdate /testbench/cpu/ddr_clkb +add wave -noupdate /testbench/cpu/ddr_cke +add wave -noupdate /testbench/cpu/ddr_odt +add wave -noupdate /testbench/cpu/ddr_reset_n +add wave -noupdate /testbench/cpu/ddr_we +add wave -noupdate /testbench/cpu/ddr_ras +add wave -noupdate /testbench/cpu/ddr_cas +add wave -noupdate /testbench/cpu/ddr_dm +add wave -noupdate /testbench/cpu/ddr_dqs +add wave -noupdate /testbench/cpu/ddr_dqs_n +add wave -noupdate -radix hexadecimal /testbench/cpu/ddr_ad +add wave -noupdate -radix hexadecimal /testbench/cpu/ddr_ba +add wave -noupdate -radix hexadecimal /testbench/cpu/ddr_dq +add wave -noupdate /testbench/cpu/ddr_rzq +add wave -noupdate /testbench/cpu/ddr_zio +add wave -noupdate /testbench/cpu/txd1 +add wave -noupdate /testbench/cpu/rxd1 +add wave -noupdate /testbench/cpu/ctsn1 +add wave -noupdate /testbench/cpu/rtsn1 +add wave -noupdate /testbench/cpu/switch +add wave -noupdate /testbench/cpu/led +add wave -noupdate /testbench/cpu/iic_scl +add wave -noupdate /testbench/cpu/iic_sda +add wave -noupdate /testbench/cpu/ddc_scl +add wave -noupdate /testbench/cpu/ddc_sda +add wave -noupdate /testbench/cpu/dvi_iic_scl +add wave -noupdate /testbench/cpu/dvi_iic_sda +add wave -noupdate /testbench/cpu/tft_lcd_data +add wave -noupdate /testbench/cpu/tft_lcd_clk_p +add wave -noupdate /testbench/cpu/tft_lcd_clk_n +add wave -noupdate /testbench/cpu/tft_lcd_hsync +add wave -noupdate /testbench/cpu/tft_lcd_vsync +add wave -noupdate /testbench/cpu/tft_lcd_de +add wave -noupdate /testbench/cpu/tft_lcd_reset_b +add wave -noupdate /testbench/cpu/spi_sel_n +add wave -noupdate /testbench/cpu/spi_clk +add wave -noupdate /testbench/cpu/spi_mosi +add wave -noupdate -radix hexadecimal /testbench/cpu/apbi +add wave -noupdate -radix hexadecimal /testbench/cpu/apbo +add wave -noupdate -radix hexadecimal /testbench/cpu/ahbsi +add wave -noupdate -radix hexadecimal /testbench/cpu/ahbso +add wave -noupdate -radix hexadecimal /testbench/cpu/ahbmi +add wave -noupdate -radix hexadecimal /testbench/cpu/ahbmo +add wave -noupdate /testbench/cpu/clkm +add wave -noupdate /testbench/cpu/rstn +add wave -noupdate /testbench/cpu/rstraw +add wave -noupdate /testbench/cpu/mig_gen/ddrc/MCB_inst/c3_sys_clk +add wave -noupdate /testbench/cpu/mig_gen/ddrc/MCB_inst/c3_calib_done +add wave -noupdate /testbench/cpu/vgadvi/dvi0/clk +add wave -noupdate /testbench/cpu/vgadvi/dvi0/vgao +add wave -noupdate /testbench/cpu/vgadvi/dvi0/vgaclk +add wave -noupdate /testbench/cpu/vgadvi/dvi0/dclk_p +add wave -noupdate /testbench/cpu/vgadvi/dvi0/dclk_n +add wave -noupdate /testbench/cpu/svga/svga0/vgaclk +add wave -noupdate -radix hexadecimal /testbench/cpu/svga/svga0/vgao +add wave -noupdate -radix hexadecimal /testbench/cpu/svga/svga0/clk_sel +add wave -noupdate -radix hexadecimal /testbench/cpu/svga/svga0/t +add wave -noupdate -radix hexadecimal /testbench/cpu/svga/svga0/r +add wave -noupdate -radix hexadecimal /testbench/cpu/svga/svga0/dmai +add wave -noupdate -radix hexadecimal /testbench/cpu/svga/svga0/dmao +add wave -noupdate /testbench/cpu/mig_gen/ddrc/calib_done +add wave -noupdate -radix hexadecimal /testbench/cpu/mig_gen/ddrc/r +add wave -noupdate -radix hexadecimal /testbench/cpu/mig_gen/ddrc/i +add wave -noupdate -radix hexadecimal /testbench/cpu/mig_gen/ddrc/ahbmi +add wave -noupdate -radix hexadecimal /testbench/cpu/mig_gen/ddrc/ahbmo +add wave -noupdate -radix hexadecimal /testbench/cpu/mig_gen/ddrc/r2 +add wave -noupdate -radix hexadecimal /testbench/cpu/mig_gen/ddrc/p2 +add wave -noupdate /testbench/cpu/phy_gtx_clk +add wave -noupdate /testbench/cpu/phy_mii_data +add wave -noupdate /testbench/cpu/phy_tx_clk +add wave -noupdate /testbench/cpu/phy_rx_clk +add wave -noupdate /testbench/cpu/phy_rx_data +add wave -noupdate /testbench/cpu/phy_dv +add wave -noupdate /testbench/cpu/phy_rx_er +add wave -noupdate /testbench/cpu/phy_col +add wave -noupdate /testbench/cpu/phy_crs +add wave -noupdate /testbench/cpu/phy_tx_data +add wave -noupdate /testbench/cpu/phy_tx_en +add wave -noupdate /testbench/cpu/phy_tx_er +add wave -noupdate /testbench/cpu/phy_mii_clk +add wave -noupdate /testbench/cpu/phy_rst_n +add wave -noupdate /testbench/cpu/egtx_clk +TreeUpdate [SetDefaultTree] +WaveRestoreCursors {{Cursor 3} {3787500 ps} 0} {{Cursor 3} {3807500 ps} 0} +configure wave -namecolwidth 212 +configure wave -valuecolwidth 100 +configure wave -justifyvalue left +configure wave -signalnamewidth 0 +configure wave -snapdistance 10 +configure wave -datasetprefix 0 +configure wave -rowmargin 4 +configure wave -childrowmargin 2 +configure wave -gridoffset 0 +configure wave -gridperiod 1 +configure wave -griddelta 40 +configure wave -timeline 0 +configure wave -timelineunits ns +update +WaveRestoreZoom {48575 ps} {76724 ps} diff --git a/designs/ICI4-Integ1/ICI4HDL/DC_FRAME_PLACER.vhd b/designs/ICI4-Integ1/ICI4HDL/DC_FRAME_PLACER.vhd --- a/designs/ICI4-Integ1/ICI4HDL/DC_FRAME_PLACER.vhd +++ b/designs/ICI4-Integ1/ICI4HDL/DC_FRAME_PLACER.vhd @@ -12,9 +12,22 @@ port( Wcount : in integer range 0 to WordCnt-1; MinFCnt : in integer range 0 to MinFCount-1; Flag : out std_logic; - DC1 : in std_logic_vector(23 downto 0); - DC2 : in std_logic_vector(23 downto 0); - DC3 : in std_logic_vector(23 downto 0); + AMR1X : in std_logic_vector(23 downto 0); + AMR1Y : in std_logic_vector(23 downto 0); + AMR1Z : in std_logic_vector(23 downto 0); + AMR2X : in std_logic_vector(23 downto 0); + AMR2Y : in std_logic_vector(23 downto 0); + AMR2Z : in std_logic_vector(23 downto 0); + AMR3X : in std_logic_vector(23 downto 0); + AMR3Y : in std_logic_vector(23 downto 0); + AMR3Z : in std_logic_vector(23 downto 0); + AMR4X : in std_logic_vector(23 downto 0); + AMR4Y : in std_logic_vector(23 downto 0); + AMR4Z : in std_logic_vector(23 downto 0); + Temp1 : in std_logic_vector(23 downto 0); + Temp2 : in std_logic_vector(23 downto 0); + Temp3 : in std_logic_vector(23 downto 0); + Temp4 : in std_logic_vector(23 downto 0); WordOut : out std_logic_vector(WordSize-1 downto 0) ); @@ -36,46 +49,228 @@ MinFCntVectLSB <= MinFCntVect(0); process(clk) begin if clk'event and clk ='1' then - if MinFCntVectLSB = '0'then - case Wcount is - when 15 => - WordOut <= DC1(23 downto 16); - Flag <= '1'; - when 16 => - WordOut <= DC1(15 downto 8); - Flag <= '1'; - when 19 => - WordOut <= DC1(7 downto 0); - Flag <= '1'; - when 23 => - WordOut <= DC3(23 downto 16); - Flag <= '1'; - when 24 => - WordOut <= DC3(15 downto 8); - Flag <= '1'; - when 27 => - WordOut <= DC3(7 downto 0); - Flag <= '1'; + case MinFCntVect(2 downto 0) is + when "000" => + case Wcount is + when 47 => + WordOut <= AMR1X(23 downto 16); + Flag <= '1'; + when 48 => + WordOut <= AMR1X(15 downto 8); + Flag <= '1'; + + when 49 => + WordOut <= AMR1X(7 downto 0); + Flag <= '1'; + when 50 => + WordOut <= AMR1Y(23 downto 16); + Flag <= '1'; + + when 51 => + WordOut <= AMR1Y(15 downto 8); + Flag <= '1'; + when 52 => + WordOut <= AMR1Y(7 downto 0); + Flag <= '1'; + + when others => + WordOut <= X"A5"; + Flag <= '0'; + end case; + when "001" => + case Wcount is + when 47 => + WordOut <= AMR1Z(23 downto 16); + Flag <= '1'; + when 48 => + WordOut <= AMR1Z(15 downto 8); + Flag <= '1'; + + when 49 => + WordOut <= AMR1Z(7 downto 0); + Flag <= '1'; + when 50 => + WordOut <= AMR2X(23 downto 16); + Flag <= '1'; + + when 51 => + WordOut <= AMR2X(15 downto 8); + Flag <= '1'; + when 52 => + WordOut <= AMR2X(7 downto 0); + Flag <= '1'; + + when others => + WordOut <= X"A5"; + Flag <= '0'; + end case; + when "010" => + case Wcount is + when 47 => + WordOut <= AMR2Y(23 downto 16); + Flag <= '1'; + when 48 => + WordOut <= AMR2Y(15 downto 8); + Flag <= '1'; + + when 49 => + WordOut <= AMR2Y(7 downto 0); + Flag <= '1'; + when 50 => + WordOut <= AMR2Z(23 downto 16); + Flag <= '1'; + + when 51 => + WordOut <= AMR2Z(15 downto 8); + Flag <= '1'; + when 52 => + WordOut <= AMR2Z(7 downto 0); + Flag <= '1'; + + when others => + WordOut <= X"A5"; + Flag <= '0'; + end case; + when "011" => + case Wcount is + when 47 => + WordOut <= AMR3X(23 downto 16); + Flag <= '1'; + when 48 => + WordOut <= AMR3X(15 downto 8); + Flag <= '1'; + + when 49 => + WordOut <= AMR3X(7 downto 0); + Flag <= '1'; + when 50 => + WordOut <= AMR3Y(23 downto 16); + Flag <= '1'; + + when 51 => + WordOut <= AMR3Y(15 downto 8); + Flag <= '1'; + when 52 => + WordOut <= AMR3Y(7 downto 0); + Flag <= '1'; + + when others => + WordOut <= X"A5"; + Flag <= '0'; + end case; + when "100" => + case Wcount is + when 47 => + WordOut <= AMR3Z(23 downto 16); + Flag <= '1'; + when 48 => + WordOut <= AMR3Z(15 downto 8); + Flag <= '1'; + + when 49 => + WordOut <= AMR3Z(7 downto 0); + Flag <= '1'; + when 50 => + WordOut <= AMR4X(23 downto 16); + Flag <= '1'; + + when 51 => + WordOut <= AMR4X(15 downto 8); + Flag <= '1'; + when 52 => + WordOut <= AMR4X(7 downto 0); + Flag <= '1'; + + when others => + WordOut <= X"A5"; + Flag <= '0'; + end case; + when "101" => + case Wcount is + when 47 => + WordOut <= AMR4Y(23 downto 16); + Flag <= '1'; + when 48 => + WordOut <= AMR4Y(15 downto 8); + Flag <= '1'; + + when 49 => + WordOut <= AMR4Y(7 downto 0); + Flag <= '1'; + when 50 => + WordOut <= AMR4Z(23 downto 16); + Flag <= '1'; + + when 51 => + WordOut <= AMR4Z(15 downto 8); + Flag <= '1'; + when 52 => + WordOut <= AMR4Z(7 downto 0); + Flag <= '1'; + + when others => + WordOut <= X"A5"; + Flag <= '0'; + end case; + when "110" => + case Wcount is + when 47 => + WordOut <= Temp1(23 downto 16); + Flag <= '1'; + when 48 => + WordOut <= Temp1(15 downto 8); + Flag <= '1'; + + when 49 => + WordOut <= Temp1(7 downto 0); + Flag <= '1'; + when 50 => + WordOut <= Temp2(23 downto 16); + Flag <= '1'; + + when 51 => + WordOut <= Temp2(15 downto 8); + Flag <= '1'; + when 52 => + WordOut <= Temp2(7 downto 0); + Flag <= '1'; + + when others => + WordOut <= X"A5"; + Flag <= '0'; + end case; + when "111" => + case Wcount is + when 47 => + WordOut <= Temp3(23 downto 16); + Flag <= '1'; + when 48 => + WordOut <= Temp3(15 downto 8); + Flag <= '1'; + + when 49 => + WordOut <= Temp3(7 downto 0); + Flag <= '1'; + when 50 => + WordOut <= Temp4(23 downto 16); + Flag <= '1'; + + when 51 => + WordOut <= Temp4(15 downto 8); + Flag <= '1'; + when 52 => + WordOut <= Temp4(7 downto 0); + Flag <= '1'; + + when others => + WordOut <= X"A5"; + Flag <= '0'; + end case; when others => - WordOut <= X"A5"; - Flag <= '0'; - end case; - else - case Wcount is - when 15 => - WordOut <= DC2(23 downto 16); - Flag <= '1'; - when 16 => - WordOut <= DC2(15 downto 8); - Flag <= '1'; - when 19 => - WordOut <= DC2(7 downto 0); - Flag <= '1'; - when others => - WordOut <= X"A5"; - Flag <= '0'; - end case; - end if; + WordOut <= X"A5"; + Flag <= '0'; + + end case; end if; end process; diff --git a/designs/ICI4-Integ1/ICI4HDL/LF_FRAME_PLACER.vhd b/designs/ICI4-Integ1/ICI4HDL/LF_FRAME_PLACER.vhd --- a/designs/ICI4-Integ1/ICI4HDL/LF_FRAME_PLACER.vhd +++ b/designs/ICI4-Integ1/ICI4HDL/LF_FRAME_PLACER.vhd @@ -38,16 +38,16 @@ begin when 6 => WordOut <= LF1(7 downto 0); Flag <= '1'; - when 13 => + when 7 => WordOut <= LF2(15 downto 8); Flag <= '1'; - when 14 => + when 8 => WordOut <= LF2(7 downto 0); Flag <= '1'; - when 21 => + when 9 => WordOut <= LF3(15 downto 8); Flag <= '1'; - when 22 => + when 10 => WordOut <= LF3(7 downto 0); Flag <= '1'; @@ -57,16 +57,16 @@ begin when 30 => WordOut <= LF1(7 downto 0); Flag <= '1'; - when 37 => + when 31 => WordOut <= LF2(15 downto 8); Flag <= '1'; - when 38 => + when 32 => WordOut <= LF2(7 downto 0); Flag <= '1'; - when 45 => + when 33 => WordOut <= LF3(15 downto 8); Flag <= '1'; - when 46 => + when 34 => WordOut <= LF3(7 downto 0); Flag <= '1'; @@ -76,16 +76,16 @@ begin when 54 => WordOut <= LF1(7 downto 0); Flag <= '1'; - when 61 => + when 55 => WordOut <= LF2(15 downto 8); Flag <= '1'; - when 62 => + when 56 => WordOut <= LF2(7 downto 0); Flag <= '1'; - when 69 => + when 57 => WordOut <= LF3(15 downto 8); Flag <= '1'; - when 70 => + when 58 => WordOut <= LF3(7 downto 0); Flag <= '1'; @@ -95,16 +95,16 @@ begin when 78 => WordOut <= LF1(7 downto 0); Flag <= '1'; - when 85 => + when 79 => WordOut <= LF2(15 downto 8); Flag <= '1'; - when 86 => + when 80 => WordOut <= LF2(7 downto 0); Flag <= '1'; - when 93 => + when 81 => WordOut <= LF3(15 downto 8); Flag <= '1'; - when 94 => + when 82 => WordOut <= LF3(7 downto 0); Flag <= '1'; @@ -114,16 +114,16 @@ begin when 102 => WordOut <= LF1(7 downto 0); Flag <= '1'; - when 109 => + when 103 => WordOut <= LF2(15 downto 8); Flag <= '1'; - when 110 => + when 104 => WordOut <= LF2(7 downto 0); Flag <= '1'; - when 117 => + when 105 => WordOut <= LF3(15 downto 8); Flag <= '1'; - when 118 => + when 106 => WordOut <= LF3(7 downto 0); Flag <= '1'; @@ -133,16 +133,16 @@ begin when 126 => WordOut <= LF1(7 downto 0); Flag <= '1'; - when 133 => + when 127 => WordOut <= LF2(15 downto 8); Flag <= '1'; - when 134 => + when 128 => WordOut <= LF2(7 downto 0); Flag <= '1'; - when 141 => + when 129 => WordOut <= LF3(15 downto 8); Flag <= '1'; - when 142 => + when 130 => WordOut <= LF3(7 downto 0); Flag <= '1'; diff --git a/designs/ICI4-Integ1/Makefile b/designs/ICI4-Integ1/Makefile --- a/designs/ICI4-Integ1/Makefile +++ b/designs/ICI4-Integ1/Makefile @@ -2,18 +2,24 @@ include .config #GRLIB=$(GRLIB) TOP=ici4 -#BOARD=ICI4-main-BD -BOARD=SP601 +BOARD=ICI4-main-BD +#BOARD=SP601 include $(GRLIB)/boards/$(BOARD)/Makefile.inc DEVICE=$(PART)-$(PACKAGE)$(SPEED) -UCF=$(GRLIB)/boards/$(BOARD)/ICI3.ucf -#UCF=$(GRLIB)/boards/$(BOARD)/ICI4-Main-BD.ucf +#UCF=$(GRLIB)/boards/$(BOARD)/ICI3.ucf +UCF=$(GRLIB)/boards/$(BOARD)/ICI4-Main-BD.ucf QSF=$(GRLIB)/boards/$(BOARD)/$(TOP).qsf EFFORT=high ISEMAPOPT="-timing" XSTOPT="" SYNPOPT="set_option -maxfan 100; set_option -pipe 1; set_option -retiming 1; set_option -write_apr_constraint 0" VHDLOPTSYNFILES= \ + ICI4HDL/Convertisseur_config.vhd \ + ICI4HDL/Convertisseur_Data.vhd \ + ICI4HDL/DC_FRAME_PLACER.vhd \ + ICI4HDL/DC_SMPL_CLK.vhd \ + ICI4HDL/LF_FRAME_PLACER.vhd \ + ICI4HDL/LF_SMPL_CLK.vhd VHDLSYNFILES= \ config.vhd ici4.vhd @@ -32,7 +38,7 @@ DIRSKIP = b1553 pcif leon2 leon2ft crypt leon4 leon4b64 l2cache gr1553b iommu haps ascs slink coremp7 pwm \ ac97 hcan usb DIRADD = -FILEADD = +FILEADD = FILESKIP = grcan.vhd ddr2.v mobile_ddr.v include $(GRLIB)/bin/Makefile diff --git a/designs/ICI4-Integ1/config.vhd b/designs/ICI4-Integ1/config.vhd --- a/designs/ICI4-Integ1/config.vhd +++ b/designs/ICI4-Integ1/config.vhd @@ -9,6 +9,8 @@ library techmap; use techmap.gencomp.all; +library ieee; +use ieee.std_logic_1164.all; package config is -- Technology and synthesis options @@ -17,4 +19,34 @@ package config is constant CFG_PADTECH : integer := spartan6; -- Clock generator constant CFG_CLKTECH : integer := spartan6; + constant SEND_CONSTANT_DATA : integer := 1; + constant SEND_MINF_VALUE : integer := 1; + + + +constant LF1cst : std_logic_vector(15 downto 0) := X"1111"; +constant LF2cst : std_logic_vector(15 downto 0) := X"2222"; +constant LF3cst : std_logic_vector(15 downto 0) := X"3333"; + + +constant AMR1Xcst : std_logic_vector(23 downto 0):= X"444444"; +constant AMR1Ycst : std_logic_vector(23 downto 0):= X"555555"; +constant AMR1Zcst : std_logic_vector(23 downto 0):= X"666666"; + +constant AMR2Xcst : std_logic_vector(23 downto 0):= X"777777"; +constant AMR2Ycst : std_logic_vector(23 downto 0):= X"888888"; +constant AMR2Zcst : std_logic_vector(23 downto 0):= X"999999"; + +constant AMR3Xcst : std_logic_vector(23 downto 0):= X"AAAAAA"; +constant AMR3Ycst : std_logic_vector(23 downto 0):= X"BBBBBB"; +constant AMR3Zcst : std_logic_vector(23 downto 0):= X"CCCCCC"; + +constant AMR4Xcst : std_logic_vector(23 downto 0):= X"DDDDDD"; +constant AMR4Ycst : std_logic_vector(23 downto 0):= X"EEEEEE"; +constant AMR4Zcst : std_logic_vector(23 downto 0):= X"FFFFFF"; + +constant Temp1cst : std_logic_vector(23 downto 0):= X"121212"; +constant Temp2cst : std_logic_vector(23 downto 0):= X"343434"; +constant Temp3cst : std_logic_vector(23 downto 0):= X"565656"; +constant Temp4cst : std_logic_vector(23 downto 0):= X"787878"; end; diff --git a/designs/ICI4-Integ1/ici4.vhd b/designs/ICI4-Integ1/ici4.vhd --- a/designs/ICI4-Integ1/ici4.vhd +++ b/designs/ICI4-Integ1/ici4.vhd @@ -1,29 +1,6 @@ ------------------------------------------------------------------------------ --- LEON3 Xilinx SP605 Demonstration design --- Copyright (C) 2011 Jiri Gaisler, Aeroflex Gaisler ------------------------------------------------------------------------------- --- This file is a part of the GRLIB VHDL IP LIBRARY --- Copyright (C) 2003 - 2008, Gaisler Research --- Copyright (C) 2008 - 2011, Aeroflex Gaisler --- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------------- - - library ieee; -use ieee.std_logic_1164.all; +use ieee.std_logic_1164.all; +use IEEE.numeric_std.all; library grlib, techmap; use grlib.amba.all; use grlib.amba.all; @@ -41,12 +18,11 @@ use lpp.lpp_ad_conv.all; use lpp.lpp_amba.all; use lpp.apb_devices_list.all; use lpp.general_purpose.all; +use lpp.Rocket_PCM_Encoder.all; use work.Convertisseur_config.all; -library esa; -use esa.memoryctrl.all; use work.config.all; @@ -67,26 +43,12 @@ WordSize : integer := 8; WordCnt : MajF : in std_logic; Data : out std_logic; DC_ADC_Sclk : out std_logic; - DC_ADC_IN : in std_logic_vector(3 downto 0); - DC_ADC_FORMAT : out std_logic_vector(2 downto 0); - DC_ADC_Mode : out std_logic_vector(1 downto 0); + DC_ADC_IN : in std_logic_vector(1 downto 0); DC_ADC_ClkDiv : out std_logic; - DC_ADC_PWDOWN : out std_logic_vector(3 downto 0); DC_ADC_FSynch : out std_logic; - DC_ADC_Synch : out std_logic; --- DATA_out_Test : out std_logic; --- Sclk_out_test : out std_logic; --- Synch_out_test : out std_logic; - test : out std_logic; - - LF_ADC_Sclk : out std_logic; - LF_ADC_IN : in std_logic_vector(3 downto 0); - LF_ADC_FORMAT : out std_logic_vector(2 downto 0); - LF_ADC_Mode : out std_logic_vector(1 downto 0); - LF_ADC_ClkDiv : out std_logic; - LF_ADC_PWDOWN : out std_logic_vector(3 downto 0); - LF_ADC_FSynch : out std_logic; - LF_ADC_Synch : out std_logic + SET_RESET0 : out std_logic; + SET_RESET1 : out std_logic; + LED : out std_logic ); end; @@ -102,13 +64,32 @@ signal sclk_Inv : std_logic; signal WordCount : integer range 0 to WordCnt-1; signal WordClk : std_logic; +signal data_int : std_logic; + signal MuxOUT : std_logic_vector(WordSize-1 downto 0); signal MuxIN : std_logic_vector((2*WordSize)-1 downto 0); signal Sel : integer range 0 to 1; -signal DC1 : std_logic_vector(23 downto 0); -signal DC2 : std_logic_vector(23 downto 0); -signal DC3 : std_logic_vector(23 downto 0); +signal AMR1X : std_logic_vector(23 downto 0); +signal AMR1Y : std_logic_vector(23 downto 0); +signal AMR1Z : std_logic_vector(23 downto 0); + +signal AMR2X : std_logic_vector(23 downto 0); +signal AMR2Y : std_logic_vector(23 downto 0); +signal AMR2Z : std_logic_vector(23 downto 0); + +signal AMR3X : std_logic_vector(23 downto 0); +signal AMR3Y : std_logic_vector(23 downto 0); +signal AMR3Z : std_logic_vector(23 downto 0); + +signal AMR4X : std_logic_vector(23 downto 0); +signal AMR4Y : std_logic_vector(23 downto 0); +signal AMR4Z : std_logic_vector(23 downto 0); + +signal Temp1 : std_logic_vector(23 downto 0); +signal Temp2 : std_logic_vector(23 downto 0); +signal Temp3 : std_logic_vector(23 downto 0); +signal Temp4 : std_logic_vector(23 downto 0); signal LF1 : std_logic_vector(15 downto 0); @@ -120,18 +101,10 @@ signal LF1_int : std_logic_vecto signal LF2_int : std_logic_vector(23 downto 0); signal LF3_int : std_logic_vector(23 downto 0); - ---constant DC1cst : std_logic_vector(23 downto 0) := X"FA5961"; ---constant DC2cst : std_logic_vector(23 downto 0) := X"123456"; ---constant DC3cst : std_logic_vector(23 downto 0) := X"789012"; --- ---constant LF1cst : std_logic_vector(15 downto 0) := X"3210"; ---constant LF2cst : std_logic_vector(15 downto 0) := X"6543"; ---constant LF3cst : std_logic_vector(15 downto 0) := X"3456"; --- - signal DC_ADC_SmplClk : std_logic; signal LF_ADC_SmplClk : std_logic; +signal SET_RESET0_sig : std_logic; +signal SET_RESET1_sig : std_logic; signal MinFCnt : integer range 0 to MinFCount-1; @@ -139,40 +112,29 @@ signal FramePlacerFlags : std_logi begin ---CLKINT0 : CLKINT --- port map(clk,clk_buf); --- ---CLKINT1 : CLKINT --- port map(reset,reset_buf); clk_buf <= clk; reset_buf <= reset; -- ---DATA_out_Test <= DC_ADC_IN(0); ---Sclk_out_test <= DC_ADC_Sclk; ---Synch_out_test <= DC_ADC_FSynch; Gate_Inv <= not Gate; sclk_Inv <= not Sclk; MinF_Inv <= not MinF; ---DC1 <= DC1cst; ---DC2 <= DC2cst; ---DC3 <= DC3cst; +LED <= not data_int; +data <= data_int; + + ---LF1 <= LF1cst; ---LF2 <= LF2cst; ---LF3 <= LF3cst; +SD0 : Serial_Driver +generic map(WordSize) +port map(sclk_Inv,MuxOUT,Gate_inv,data_int); -SD0 : entity work.Serial_Driver -generic map(WordSize) -port map(sclk_Inv,MuxOUT,Gate_inv,Data); - -WC0 : entity work.Word_Cntr +WC0 : Word_Cntr generic map(WordSize,WordCnt) port map(sclk_Inv,MinF,WordClk,WordCount); -MFC0 : entity work.MinF_Cntr +MFC0 : MinF_Cntr generic map(MinFCount) port map( clk => MinF_Inv, @@ -181,7 +143,7 @@ port map( ); -MUX0 : entity work.Serial_Driver_Multiplexor +MUX0 : Serial_Driver_Multiplexor generic map(FramePlacerCount,WordSize) port map(sclk_Inv,Sel,MuxIN,MuxOUT); @@ -193,9 +155,22 @@ port map( Wcount => WordCount, MinFCnt => MinFCnt, Flag => FramePlacerFlags(0), - DC1 => DC1, - DC2 => DC2, - DC3 => DC3, + AMR1X => AMR1X, + AMR1Y => AMR1Y, + AMR1Z => AMR1Z, + AMR2X => AMR2X, + AMR2Y => AMR2Y, + AMR2Z => AMR2Z, + AMR3X => AMR3X, + AMR3Y => AMR3Y, + AMR3Z => AMR3Z, + AMR4X => AMR4X, + AMR4Y => AMR4Y, + AMR4Z => AMR4Z, + Temp1 => Temp1, + Temp2 => Temp2, + Temp3 => Temp3, + Temp4 => Temp4, WordOut => MuxIN(7 downto 0)); @@ -216,32 +191,102 @@ port map( DC_SMPL_CLK0 : entity work.DC_SMPL_CLK port map(MinF_Inv,DC_ADC_SmplClk); +process(reset,DC_ADC_SmplClk) +begin +if reset = '0' then + SET_RESET0_sig <= '0'; +elsif DC_ADC_SmplClk'event and DC_ADC_SmplClk = '1' then + SET_RESET0_sig <= not SET_RESET0_sig; +end if; +end process; -DC_ADC_Synch <= reset; -LF_ADC_Synch <= reset; +SET_RESET1_sig <= SET_RESET0_sig; +SET_RESET0 <= SET_RESET0_sig; +SET_RESET1 <= SET_RESET1_sig; +-- + + + +send_ADC_DATA : IF SEND_CONSTANT_DATA = 0 GENERATE + DC_ADC0 : DUAL_ADS1278_DRIVER --With AMR down ! => 24bits DC TM -> SC high res on Spin + port map( + Clk => clk_buf, + reset => reset_buf, + SpiClk => DC_ADC_Sclk, + DIN => DC_ADC_IN, + SmplClk => DC_ADC_SmplClk, + OUT00 => AMR1X, + OUT01 => AMR1Y, + OUT02 => AMR1Z, + OUT03 => AMR2X, + OUT04 => AMR2Y, + OUT05 => AMR2Z, + OUT06 => Temp1, + OUT07 => Temp2, + OUT10 => AMR3X, + OUT11 => AMR3Y, + OUT12 => AMR3Z, + OUT13 => AMR4X, + OUT14 => AMR4Y, + OUT15 => AMR4Z, + OUT16 => Temp3, + OUT17 => Temp4, + FSynch => DC_ADC_FSynch + ); + LF1 <= LF1cst; + LF2 <= LF2cst; + LF3 <= LF3cst; + END GENERATE; -DC_ADC0 : ADS1274_DRIVER --With AMR down ! => 24bits DC TM -> SC high res on Spin -generic map(ADS127X_MODE_low_power,ADS127X_FSYNC_FORMAT) -port map( - Clk => clk_buf, - reset => reset_buf, - SpiClk => DC_ADC_Sclk, - DIN => DC_ADC_IN, - Ready => '0', - Format => DC_ADC_Format, - Mode => DC_ADC_Mode, - ClkDiv => DC_ADC_ClkDiv, - PWDOWN => DC_ADC_PWDOWN, - SmplClk => DC_ADC_SmplClk, - OUT0 => DC1, - OUT1 => DC2, - OUT2 => DC3, - OUT3 => open, - FSynch => DC_ADC_FSynch, - test => test -); +send_CST_DATA : IF (SEND_CONSTANT_DATA = 1) and (SEND_MINF_VALUE = 0) GENERATE + AMR1X <= AMR1Xcst; + AMR1Y <= AMR1Ycst; + AMR1Z <= AMR1Zcst; + AMR2X <= AMR2Xcst; + AMR2Y <= AMR2Ycst; + AMR2Z <= AMR2Zcst; + Temp1 <= Temp1cst; + Temp2 <= Temp2cst; + AMR3X <= AMR3Xcst; + AMR3Y <= AMR3Ycst; + AMR3Z <= AMR3Zcst; + AMR4X <= AMR4Xcst; + AMR4Y <= AMR4Ycst; + AMR4Z <= AMR4Zcst; + Temp3 <= Temp3cst; + Temp4 <= Temp4cst; + + LF1 <= LF1cst; + LF2 <= LF2cst; + LF3 <= LF3cst; + END GENERATE; + + +send_minF_valuelbl : IF (SEND_CONSTANT_DATA = 1) and (SEND_MINF_VALUE = 1) GENERATE + AMR1X <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + AMR1Y <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + AMR1Z <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + AMR2X <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + AMR2Y <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + AMR2Z <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + Temp1 <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + Temp2 <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + AMR3X <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + AMR3Y <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + AMR3Z <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + AMR4X <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + AMR4Y <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + AMR4Z <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + Temp3 <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + Temp4 <= X"000" & "000" & std_logic_vector(TO_UNSIGNED(MinFCnt,9)); + + LF1 <= LF1cst; + LF2 <= LF2cst; + LF3 <= LF3cst; + END GENERATE; + LF_SMPL_CLK0 : entity work.LF_SMPL_CLK port map( Wclck => WordClk, @@ -249,37 +294,8 @@ port map( SMPL_CLK => LF_ADC_SmplClk ); -LF_ADC0 : ADS1274_DRIVER -generic map(ADS127X_MODE_low_power,ADS127X_FSYNC_FORMAT) -port map( - Clk => clk_buf, - reset => reset_buf, - SpiClk => LF_ADC_Sclk, - DIN => LF_ADC_IN, - Ready => '0', - Format => LF_ADC_Format, - Mode => LF_ADC_Mode, - ClkDiv => LF_ADC_ClkDiv, - PWDOWN => LF_ADC_PWDOWN, - SmplClk => LF_ADC_SmplClk, - OUT0 => LF1_int, - OUT1 => LF2_int, - OUT2 => LF3_int, - OUT3 => open, - FSynch => LF_ADC_FSynch -); -LF1 <= LF1_int(23 downto 8); -LF2 <= LF2_int(23 downto 8); -LF3 <= LF3_int(23 downto 8); --- ---DC1 <= LF1_int(23 downto 0); ---DC2 <= LF2_int(23 downto 0); ---DC3 <= LF3_int(23 downto 0); - ---Input Word Selection Decoder - process(clk) variable SelVar : integer range 0 to 1; begin diff --git a/lib/lpp/Rocket_PCM_Encoder/MinF_Cntr.vhd b/lib/lpp/Rocket_PCM_Encoder/MinF_Cntr.vhd new file mode 100644 --- /dev/null +++ b/lib/lpp/Rocket_PCM_Encoder/MinF_Cntr.vhd @@ -0,0 +1,68 @@ +-- MinF_Cntr.vhd +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + + + + +entity MinF_Cntr is +generic(MinFCount : integer := 64); +port( + clk : in std_logic; + reset : in std_logic; + Cnt_out : out integer range 0 to MinFCount-1 +); +end entity; + + + +architecture ar_MinF_Cntr of MinF_Cntr is + +signal Cnt_int : integer range 0 to MinFCount-1 := 0; +signal MinF_reg : std_logic := '0'; + +begin + +Cnt_out <= Cnt_int; + +process(clk,reset) +begin + if reset = '0' then + Cnt_int <= 0; + elsif clk'event and clk = '1' then + if Cnt_int = MinFCount -1 then + Cnt_int <= 0; + else + Cnt_int <= Cnt_int + 1; + end if; + end if; +end process; +end ar_MinF_Cntr; + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/lpp/Rocket_PCM_Encoder/Rocket_PCM_Encoder.vhd b/lib/lpp/Rocket_PCM_Encoder/Rocket_PCM_Encoder.vhd new file mode 100644 --- /dev/null +++ b/lib/lpp/Rocket_PCM_Encoder/Rocket_PCM_Encoder.vhd @@ -0,0 +1,64 @@ +------------------------------------------------------------------------------ +-- This file is a part of the LPP VHDL IP LIBRARY +-- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +------------------------------------------------------------------------------- +library ieee; +use ieee.std_logic_1164.all; + + +package Rocket_PCM_Encoder is + +component MinF_Cntr is +generic(MinFCount : integer := 64); +port( + clk : in std_logic; + reset : in std_logic; + Cnt_out : out integer range 0 to MinFCount-1 +); +end component; + +component Serial_Driver is +generic(size : integer :=8); +port( + sclk : in std_logic; + inputDat: in std_logic_vector(size-1 downto 0); + Gate : in std_logic; + Data : out std_logic +); +end component; + +component Serial_Driver_Multiplexor is +generic(InputCnt : integer := 2;inputSize : integer:=8); +port( + clk : in std_logic; + Sel : in integer range 0 to InputCnt-1; + input : in std_logic_vector(InputCnt*inputSize-1 downto 0); + output : out std_logic_vector(inputSize-1 downto 0) +); +end component; + +component Word_Cntr is +generic(WordSize :integer := 8 ;N : integer := 144); +port( + Sclk : in std_logic; + reset : in std_logic; + WordClk : out std_logic; + Cnt_out : out integer range 0 to N-1 +); +end component; + +end Rocket_PCM_Encoder; diff --git a/lib/lpp/Rocket_PCM_Encoder/Serial_Driver.vhd b/lib/lpp/Rocket_PCM_Encoder/Serial_Driver.vhd new file mode 100644 --- /dev/null +++ b/lib/lpp/Rocket_PCM_Encoder/Serial_Driver.vhd @@ -0,0 +1,44 @@ +-- Serial_Driver.vhd +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + + +entity Serial_Driver is +generic(size : integer :=8); +port( + sclk : in std_logic; + inputDat: in std_logic_vector(size-1 downto 0); + Gate : in std_logic; + Data : out std_logic +); +end Serial_Driver; + + + + +architecture ar_Serial_Driver of Serial_Driver is +signal Count : integer range 0 to size-1; +signal SR_internal : std_logic_vector(size-1 downto 0):=std_logic_vector(TO_UNSIGNED(165,Size)); +begin +process(sclk) +begin + if SCLK'event and SCLK = '1' then + if gate = '1' then + if Count = size-1 then + Count <= 0; + Data <= SR_internal(size-1); + SR_internal <= inputDat; + else + Count <= Count+1; + Data <= SR_internal(size-1); + SR_internal <= SR_internal(size-2 downto 0) & '0'; + end if; + else + SR_internal <= inputDat; + Data <= '0'; + Count <= 0; + end if; + end if; +end process; +end ar_Serial_Driver; \ No newline at end of file diff --git a/lib/lpp/Rocket_PCM_Encoder/Serial_Driver_Multiplexor.vhd b/lib/lpp/Rocket_PCM_Encoder/Serial_Driver_Multiplexor.vhd new file mode 100644 --- /dev/null +++ b/lib/lpp/Rocket_PCM_Encoder/Serial_Driver_Multiplexor.vhd @@ -0,0 +1,33 @@ +-- Serial_Driver_Multiplexor.vhd +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + + + +entity Serial_Driver_Multiplexor is +generic(InputCnt : integer := 2;inputSize : integer:=8); +port( + clk : in std_logic; + Sel : in integer range 0 to InputCnt-1; + input : in std_logic_vector(InputCnt*inputSize-1 downto 0); + output : out std_logic_vector(inputSize-1 downto 0) +); +end entity; + + + +architecture ar_Serial_Driver_Multiplexor of Serial_Driver_Multiplexor is +begin + + +process(clk) +begin +if clk'event and clk = '1' then + output <= input((Sel+1)*inputSize-1 downto (Sel)*inputSize); +end if; +end process; + + +end ar_Serial_Driver_Multiplexor; + diff --git a/lib/lpp/Rocket_PCM_Encoder/Word_Cntr.vhd b/lib/lpp/Rocket_PCM_Encoder/Word_Cntr.vhd new file mode 100644 --- /dev/null +++ b/lib/lpp/Rocket_PCM_Encoder/Word_Cntr.vhd @@ -0,0 +1,70 @@ +-- Word_Cntr.vhd +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + + + + +entity Word_Cntr is +generic(WordSize :integer := 8 ;N : integer := 144); +port( + Sclk : in std_logic; + reset : in std_logic; + WordClk : out std_logic; + Cnt_out : out integer range 0 to N-1 +); +end entity; + + + +architecture ar_Word_Cntr of Word_Cntr is + +signal Cnt_int : integer range 0 to N-1 := 0; +signal Wcnt : integer range 0 to WordSize -1 ; + +begin + +Cnt_out <= Cnt_int; + +process(Sclk,reset) +begin + if reset = '0' then + Cnt_int <= 0; + Wcnt <= 0; + WordClk <= '0'; + elsif Sclk'event and Sclk = '1' then + if Wcnt = WordSize - 1 then + Cnt_int <= Cnt_int + 1; + Wcnt <= 0; + WordClk <= '1'; + else + Wcnt <= Wcnt + 1; + WordClk <= '0'; + end if; + end if; +end process; +end ar_Word_Cntr; + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/lpp/dirs.txt b/lib/lpp/dirs.txt --- a/lib/lpp/dirs.txt +++ b/lib/lpp/dirs.txt @@ -1,6 +1,8 @@ +./Rocket_PCM_Encoder ./lpp_ad_Conv ./lpp_usb ./lpp_amba +./lpp_demux ./lpp_memory ./general_purpose ./general_purpose/lpp_AMR diff --git a/lib/lpp/leon3mp.vhd b/lib/lpp/leon3mp.vhd deleted file mode 100644 --- a/lib/lpp/leon3mp.vhd +++ /dev/null @@ -1,612 +0,0 @@ ------------------------------------------------------------------------------ --- LEON3 Demonstration design --- Copyright (C) 2004 Jiri Gaisler, Gaisler Research --- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------------- - - -library ieee; -use ieee.std_logic_1164.all; -library grlib; -use grlib.amba.all; -use grlib.stdlib.all; -library techmap; -use techmap.gencomp.all; -library gaisler; -use gaisler.memctrl.all; -use gaisler.leon3.all; -use gaisler.uart.all; -use gaisler.misc.all; -library esa; -use esa.memoryctrl.all; -use work.config.all; -library lpp; -use lpp.lpp_amba.all; -use lpp.lpp_memory.all; -use lpp.lpp_uart.all; -use lpp.lpp_matrix.all; -use lpp.lpp_delay.all; -use lpp.lpp_fft.all; -use lpp.fft_components.all; -use lpp.lpp_ad_conv.all; -use lpp.iir_filter.all; -use lpp.general_purpose.all; -use lpp.Filtercfg.all; - -entity leon3mp is - generic ( - fabtech : integer := CFG_FABTECH; - memtech : integer := CFG_MEMTECH; - padtech : integer := CFG_PADTECH; - clktech : integer := CFG_CLKTECH; - disas : integer := CFG_DISAS; -- Enable disassembly to console - dbguart : integer := CFG_DUART; -- Print UART on console - pclow : integer := CFG_PCLOW - ); - port ( - clk50MHz : in std_ulogic; - reset : in std_ulogic; - ramclk : out std_logic; - - ahbrxd : in std_ulogic; -- DSU rx data - ahbtxd : out std_ulogic; -- DSU tx data - dsubre : in std_ulogic; - dsuact : out std_ulogic; - urxd1 : in std_ulogic; -- UART1 rx data - utxd1 : out std_ulogic; -- UART1 tx data - errorn : out std_ulogic; - - address : out std_logic_vector(18 downto 0); - data : inout std_logic_vector(31 downto 0); - gpio : inout std_logic_vector(6 downto 0); -- I/O port - - nBWa : out std_logic; - nBWb : out std_logic; - nBWc : out std_logic; - nBWd : out std_logic; - nBWE : out std_logic; - nADSC : out std_logic; - nADSP : out std_logic; - nADV : out std_logic; - nGW : out std_logic; - nCE1 : out std_logic; - CE2 : out std_logic; - nCE3 : out std_logic; - nOE : out std_logic; - MODE : out std_logic; - SSRAM_CLK : out std_logic; - ZZ : out std_logic; ---------------------------------------------------------------------- ---- AJOUT TEST ------------------------In/Out----------------------- ---------------------------------------------------------------------- --- UART - UART_RXD : in std_logic; - UART_TXD : out std_logic; --- ADC --- ADC_in : in AD7688_in(4 downto 0); --- ADC_out : out AD7688_out; --- Bias_Fails : out std_logic; --- CNA --- DAC_SYNC : out std_logic; --- DAC_SCLK : out std_logic; --- DAC_DATA : out std_logic; --- Diver - SPW1_EN : out std_logic; - SPW2_EN : out std_logic; - TEST : out std_logic_vector(3 downto 0); - - BP : in std_logic; ---------------------------------------------------------------------- - led : out std_logic_vector(1 downto 0) - ); -end; - -architecture Behavioral of leon3mp is - -constant maxahbmsp : integer := CFG_NCPU+CFG_AHB_UART+ - CFG_GRETH+CFG_AHB_JTAG; -constant maxahbm : integer := maxahbmsp; - ---Clk & Rst g�n� -signal vcc : std_logic_vector(4 downto 0); -signal gnd : std_logic_vector(4 downto 0); -signal resetnl : std_ulogic; -signal clk2x : std_ulogic; -signal lclk : std_ulogic; -signal lclk2x : std_ulogic; -signal clkm : std_ulogic; -signal rstn : std_ulogic; -signal rstraw : std_ulogic; -signal pciclk : std_ulogic; -signal sdclkl : std_ulogic; -signal cgi : clkgen_in_type; -signal cgo : clkgen_out_type; ---- AHB / APB -signal apbi : apb_slv_in_type; -signal apbo : apb_slv_out_vector := (others => apb_none); -signal ahbsi : ahb_slv_in_type; -signal ahbso : ahb_slv_out_vector := (others => ahbs_none); -signal ahbmi : ahb_mst_in_type; -signal ahbmo : ahb_mst_out_vector := (others => ahbm_none); ---UART -signal ahbuarti : uart_in_type; -signal ahbuarto : uart_out_type; -signal apbuarti : uart_in_type; -signal apbuarto : uart_out_type; ---MEM CTRLR -signal memi : memory_in_type; -signal memo : memory_out_type; -signal wpo : wprot_out_type; -signal sdo : sdram_out_type; ---IRQ -signal irqi : irq_in_vector(0 to CFG_NCPU-1); -signal irqo : irq_out_vector(0 to CFG_NCPU-1); ---Timer -signal gpti : gptimer_in_type; -signal gpto : gptimer_out_type; ---GPIO -signal gpioi : gpio_in_type; -signal gpioo : gpio_out_type; ---DSU -signal dbgi : l3_debug_in_vector(0 to CFG_NCPU-1); -signal dbgo : l3_debug_out_vector(0 to CFG_NCPU-1); -signal dsui : dsu_in_type; -signal dsuo : dsu_out_type; - ---------------------------------------------------------------------- ---- AJOUT TEST ------------------------Signaux---------------------- ---------------------------------------------------------------------- --- FIFOs -signal FifoIN_Full : std_logic_vector(4 downto 0); -signal FifoIN_Empty : std_logic_vector(4 downto 0); -signal FifoIN_Data : std_logic_vector(79 downto 0); - -signal FifoINT_Full : std_logic_vector(4 downto 0); -signal FifoINT_Data : std_logic_vector(79 downto 0); - -signal FifoOUT_FullV : std_logic; -signal FifoOUT_Full : std_logic_vector(1 downto 0); -signal Matrix_WriteV : std_logic_vector(0 downto 0); - --- MATRICE SPECTRALE -signal Matrix_Write : std_logic; -signal Matrix_Read : std_logic_vector(1 downto 0); -signal Matrix_Result : std_logic_vector(31 downto 0); - -signal TopSM_Start : std_logic; -signal TopSM_Statu : std_logic_vector(3 downto 0); -signal TopSM_Read : std_logic_vector(4 downto 0); -signal TopSM_Data1 : std_logic_vector(15 downto 0); -signal TopSM_Data2 : std_logic_vector(15 downto 0); - -signal Disp_FlagError : std_logic; -signal Disp_Pong : std_logic; -signal Disp_Write : std_logic_vector(1 downto 0);-- -signal Disp_Data : std_logic_vector(63 downto 0);-- -signal Dma_acq : std_logic; - --- FFT -signal Drive_Write : std_logic; -signal Drive_Read : std_logic_vector(4 downto 0); -signal Drive_DataRE : std_logic_vector(15 downto 0); -signal Drive_DataIM : std_logic_vector(15 downto 0); - -signal Start : std_logic; -signal RstnFFT : std_logic; -signal FFT_Load : std_logic; -signal FFT_Ready : std_logic; -signal FFT_Valid : std_logic; -signal FFT_DataRE : std_logic_vector(15 downto 0); -signal FFT_DataIM : std_logic_vector(15 downto 0); - -signal Link_Read : std_logic; -signal Link_Write : std_logic_vector(4 downto 0); -signal Link_ReUse : std_logic_vector(4 downto 0); -signal Link_Data : std_logic_vector(79 downto 0); - --- ADC -signal SmplClk : std_logic; -signal ADC_DataReady : std_logic; -signal ADC_SmplOut : Samples_out(4 downto 0); -signal enableADC : std_logic; - -signal WG_Write : std_logic_vector(4 downto 0); -signal WG_ReUse : std_logic_vector(4 downto 0); -signal WG_DATA : std_logic_vector(79 downto 0); -signal s_out : std_logic_vector(79 downto 0); - -signal fuller : std_logic_vector(4 downto 0); -signal reader : std_logic_vector(4 downto 0); -signal try : std_logic_vector(1 downto 0); -signal TXDint : std_logic; - --- IIR Filter -signal sample_clk_out : std_logic; - -signal Rd : std_logic_vector(0 downto 0); -signal Ept : std_logic_vector(4 downto 0); - -signal Bwr : std_logic_vector(0 downto 0); -signal Bre : std_logic_vector(0 downto 0); -signal DataTMP : std_logic_vector(15 downto 0); -signal FullUp : std_logic_vector(0 downto 0); -signal EmptyUp : std_logic_vector(0 downto 0); -signal FullDown : std_logic_vector(0 downto 0); -signal EmptyDown : std_logic_vector(0 downto 0); ---------------------------------------------------------------------- -constant IOAEN : integer := CFG_CAN; -constant boardfreq : integer := 50000; - -begin - ---------------------------------------------------------------------- ---- AJOUT TEST -------------------------------------IPs------------- ---------------------------------------------------------------------- -led(1 downto 0) <= gpio(1 downto 0); - ---- COM USB --------------------------------------------------------- --- MemIn0 : APB_FifoWrite --- generic map (5,5, Data_sz => 8, Addr_sz => 8, addr_max_int => 256) --- port map (clkm,rstn,apbi,USB_Read,open,open,InOutData,apbo(5)); --- --- BUF0 : APB_USB --- generic map (6,6,DataMax => 1024) --- port map(clkm,rstn,flagC,flagB,ifclk,sloe,USB_Read,USB_Write,pktend,fifoadr,InOutData,apbi,apbo(6)); --- --- MemOut0 : APB_FifoRead --- generic map (7,7, Data_sz => 8, Addr_sz => 8, addr_max_int => 256) --- port map (clkm,rstn,apbi,USB_Write,open,open,InOutData,apbo(7)); --- ---slrd <= usb_Read; ---slwr <= usb_Write; - ---- CNA ------------------------------------------------------------- - --- CONV : APB_CNA --- generic map (5,5) --- port map(clkm,rstn,apbi,apbo(5),DAC_SYNC,DAC_SCLK,DAC_DATA); - ---TEST(0) <= SmplClk; ---TEST(1) <= WG_Write(0); ---TEST(2) <= Fuller(0); ---TEST(3) <= s_out(s_out'length-1); - - ---SPW1_EN <= '1'; ---SPW2_EN <= '0'; - ---- CAN ------------------------------------------------------------- - --- Divider : Clk_divider --- generic map(OSC_freqHz => 24_576_000, TargetFreq_Hz => 24_576) --- Port map(clkm,rstn,SmplClk); --- --- ADC : AD7688_drvr --- generic map (ChanelCount => 5, clkkHz => 24_576) --- port map (clkm,rstn,enableADC,SmplClk,ADC_DataReady,ADC_SmplOut,ADC_in,ADC_out); --- --- WG : WriteGen_ADC --- port map (clkm,rstn,SmplClk,ADC_DataReady,Fuller,WG_ReUse,WG_Write); --- ---enableADC <= gpio(0); ---Bias_Fails <= '0'; ---WG_DATA <= ADC_SmplOut(4) & ADC_SmplOut(3) & ADC_SmplOut(2) & ADC_SmplOut(1) & ADC_SmplOut(0); --- --- --- MemIn1 : APB_FIFO --- generic map (pindex => 6, paddr => 6, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '0', R => 1, W => 0) --- port map (clkm,rstn,clkm,clkm,WG_ReUse,(others => '1'),WG_Write,open,Fuller,open,WG_DATA,open,open,apbi,apbo(6)); - ---- FFT ------------------------------------------------------------- - - MemIn : APB_FIFO - generic map (pindex => 8, paddr => 8, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '0', R => 0, W => 1) - port map (clkm,rstn,clkm,clkm,(others => '0'),Drive_Read,(others => '1'),FifoIN_Empty,FifoIN_Full,FifoIN_Data,(others => '0'),open,open,apbi,apbo(8)); - - DRIVE : Driver_FFT - generic map(Data_sz => 16) - port map(clkm,rstn,FFT_Load,FifoIN_Empty,FifoIN_Data,Drive_Write,Drive_Read,Drive_DataRE,Drive_DataIM); - -Start <= '0'; - - FFT : CoreFFT - generic map( - LOGPTS => gLOGPTS, - LOGLOGPTS => gLOGLOGPTS, - WSIZE => gWSIZE, - TWIDTH => gTWIDTH, - DWIDTH => gDWIDTH, - TDWIDTH => gTDWIDTH, - RND_MODE => gRND_MODE, - SCALE_MODE => gSCALE_MODE, - PTS => gPTS, - HALFPTS => gHALFPTS, - inBuf_RWDLY => gInBuf_RWDLY) - port map(clkm,start,rstn,Drive_Write,Link_Read,Drive_DataIM,Drive_DataRE,FFT_Load,open,FFT_DataIM,FFT_DataRE,FFT_Valid,FFT_Ready); - - LINK : Linker_FFT - generic map(Data_sz => 16) - port map(clkm,rstn,FFT_Ready,FFT_Valid,FifoINT_Full,FFT_DataRE,FFT_DataIM,Link_Read,Link_Write,Link_ReUse,Link_Data); - ------ LINK MEMORY ------------------------------------------------------- - --- MemOut : APB_FIFO --- generic map (pindex => 9, paddr => 9, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '1', R => 1, W => 0) --- port map (clkm,rstn,clkm,clkm,Link_ReUse,(others =>'1'),Link_Write,Ept,FifoOUT_Full,open,Link_Data,open,open,apbi,apbo(9)); - - MemInt : lppFIFOxN - generic map(Data_sz => 16, FifoCnt => 5, Enable_ReUse => '1') - port map(rstn,clkm,clkm,Link_ReUse,Link_Write,TopSM_Read,Link_Data,FifoINT_Data,FifoINT_Full,open); - --- MemIn : APB_FIFO --- generic map (pindex => 8, paddr => 8, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '1', R => 0, W => 1) --- port map (clkm,rstn,clkm,clkm,(others => '0'),TopSM_Read,(others => '1'),open,FifoINT_Full,FifoINT_Data,(others => '0'),open,open,apbi,apbo(8)); - ------ MATRICE SPECTRALE ---------------------5 FIFO Input--------------- - - TopSM : TopSpecMatrix - generic map (Input_SZ => 16) - port map(clkm,rstn,Matrix_Write,Matrix_Read,FifoINT_Full,FifoINT_Data,TopSM_Start,TopSM_Read,TopSM_Statu,TopSM_Data1,TopSM_Data2); - - SM : SpectralMatrix - generic map (Input_SZ => 16, Result_SZ => 32) - port map(clkm,rstn,TopSM_Start,TopSM_Data1,TopSM_Data2,TopSM_Statu,Matrix_Read,Matrix_Write,Matrix_Result); - -Dma_acq <= '1'; - - DISP : Dispatch - generic map(Data_SZ => 32) - port map(clkm,rstn,Dma_acq,Matrix_Result,Matrix_Write,FifoOUT_Full,Disp_Data,Disp_Write,Disp_Pong,Disp_FlagError); - - MemOut : APB_FIFO - generic map (pindex => 9, paddr => 9, FifoCnt => 2, Data_sz => 32, Addr_sz => 8, Enable_ReUse => '0', R => 1, W => 0) - port map (clkm,rstn,clkm,clkm,(others => '0'),(others => '1'),Disp_Write,open,FifoOUT_Full,open,Disp_Data,open,open,apbi,apbo(9)); - ------ FIFO ------------------------------------------------------------- - - Memtest : APB_FIFO - generic map (pindex => 5, paddr => 5, FifoCnt => 5, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '1', R => 1, W => 1) - port map (clkm,rstn,clkm,clkm,(others => '0'),(others => '1'),(others => '1'),open,open,open,(others => '0'),open,open,apbi,apbo(5)); - ---***************************************TEST DEMI-FIFO******************************************************************************** --- MemIn : APB_FIFO --- generic map (pindex => 8, paddr => 8, FifoCnt => 1, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '0', R => 0, W => 1) --- port map (clkm,rstn,clkm,clkm,(others => '0'),Bre,(others => '1'),EmptyUp,FullUp,DataTMP,(others => '0'),open,open,apbi,apbo(8)); --- --- Pont : Bridge --- port map(clkm,rstn,EmptyUp(0),FullDown(0),Bwr(0),Bre(0)); --- --- MemOut : APB_FIFO --- generic map (pindex => 9, paddr => 9, FifoCnt => 1, Data_sz => 16, Addr_sz => 8, Enable_ReUse => '0', R => 1, W => 0) --- port map (clkm,rstn,clkm,clkm,(others => '0'),(others => '1'),Bwr,EmptyDown,FullDown,open,DataTMP,open,open,apbi,apbo(9)); ---************************************************************************************************************************************* - ---- UART ------------------------------------------------------------- - - COM0 : APB_UART - generic map (pindex => 4, paddr => 4) - port map (clkm,rstn,apbi,apbo(4),UART_TXD,UART_RXD); - ---- DELAY ------------------------------------------------------------ - --- Delay0 : APB_Delay --- generic map (pindex => 4, paddr => 4) --- port map (clkm,rstn,apbi,apbo(4)); - ---- IIR Filter ------------------------------------------------------- ---Test(0) <= sample_clk_out; --- --- --- IIR1: APB_IIR_Filter --- generic map( --- tech => CFG_MEMTECH, --- pindex => 8, --- paddr => 8, --- Sample_SZ => Sample_SZ, --- ChanelsCount => ChanelsCount, --- Coef_SZ => Coef_SZ, --- CoefCntPerCel => CoefCntPerCel, --- Cels_count => Cels_count, --- virgPos => virgPos --- ) --- port map( --- rst => rstn, --- clk => clkm, --- apbi => apbi, --- apbo => apbo(8), --- sample_clk_out => sample_clk_out, --- GOtest => Test(1), --- CoefsInitVal => (others => '1') --- ); ----------------------------------------------------------------------- - ----------------------------------------------------------------------- ---- Reset and Clock generation ------------------------------------- ----------------------------------------------------------------------- - - vcc <= (others => '1'); gnd <= (others => '0'); - cgi.pllctrl <= "00"; cgi.pllrst <= rstraw; - - rst0 : rstgen port map (reset, clkm, cgo.clklock, rstn, rstraw); - - - clk_pad : clkpad generic map (tech => padtech) port map (clk50MHz, lclk2x); - - clkgen0 : clkgen -- clock generator - generic map (clktech, CFG_CLKMUL, CFG_CLKDIV, CFG_MCTRL_SDEN, - CFG_CLK_NOFB, 0, 0, 0, boardfreq, 0, 0, CFG_OCLKDIV) - port map (lclk, lclk, clkm, open, clk2x, sdclkl, pciclk, cgi, cgo); - - ramclk <= clkm; -process(lclk2x) -begin - if lclk2x'event and lclk2x = '1' then - lclk <= not lclk; - end if; -end process; - ----------------------------------------------------------------------- ---- LEON3 processor / DSU / IRQ ------------------------------------ ----------------------------------------------------------------------- - - l3 : if CFG_LEON3 = 1 generate - cpu : for i in 0 to CFG_NCPU-1 generate - u0 : leon3s -- LEON3 processor - generic map (i, fabtech, memtech, CFG_NWIN, CFG_DSU, CFG_FPU, CFG_V8, - 0, CFG_MAC, pclow, 0, CFG_NWP, CFG_ICEN, CFG_IREPL, CFG_ISETS, CFG_ILINE, - CFG_ISETSZ, CFG_ILOCK, CFG_DCEN, CFG_DREPL, CFG_DSETS, CFG_DLINE, CFG_DSETSZ, - CFG_DLOCK, CFG_DSNOOP, CFG_ILRAMEN, CFG_ILRAMSZ, CFG_ILRAMADDR, CFG_DLRAMEN, - CFG_DLRAMSZ, CFG_DLRAMADDR, CFG_MMUEN, CFG_ITLBNUM, CFG_DTLBNUM, CFG_TLB_TYPE, CFG_TLB_REP, - CFG_LDDEL, disas, CFG_ITBSZ, CFG_PWD, CFG_SVT, CFG_RSTADDR, CFG_NCPU-1) - port map (clkm, rstn, ahbmi, ahbmo(i), ahbsi, ahbso, - irqi(i), irqo(i), dbgi(i), dbgo(i)); - end generate; - errorn_pad : outpad generic map (tech => padtech) port map (errorn, dbgo(0).error); - - dsugen : if CFG_DSU = 1 generate - dsu0 : dsu3 -- LEON3 Debug Support Unit - generic map (hindex => 2, haddr => 16#900#, hmask => 16#F00#, - ncpu => CFG_NCPU, tbits => 30, tech => memtech, irq => 0, kbytes => CFG_ATBSZ) - port map (rstn, clkm, ahbmi, ahbsi, ahbso(2), dbgo, dbgi, dsui, dsuo); --- dsuen_pad : inpad generic map (tech => padtech) port map (dsuen, dsui.enable); - dsui.enable <= '1'; - dsubre_pad : inpad generic map (tech => padtech) port map (dsubre, dsui.break); - dsuact_pad : outpad generic map (tech => padtech) port map (dsuact, dsuo.active); - end generate; - end generate; - - nodsu : if CFG_DSU = 0 generate - ahbso(2) <= ahbs_none; dsuo.tstop <= '0'; dsuo.active <= '0'; - end generate; - - irqctrl : if CFG_IRQ3_ENABLE /= 0 generate - irqctrl0 : irqmp -- interrupt controller - generic map (pindex => 2, paddr => 2, ncpu => CFG_NCPU) - port map (rstn, clkm, apbi, apbo(2), irqo, irqi); - end generate; - irq3 : if CFG_IRQ3_ENABLE = 0 generate - x : for i in 0 to CFG_NCPU-1 generate - irqi(i).irl <= "0000"; - end generate; - apbo(2) <= apb_none; - end generate; - ----------------------------------------------------------------------- ---- Memory controllers --------------------------------------------- ----------------------------------------------------------------------- - - memctrlr : mctrl generic map (hindex => 0,pindex => 0, paddr => 0) - port map (rstn, clkm, memi, memo, ahbsi, ahbso(0),apbi,apbo(0),wpo, sdo); - - memi.brdyn <= '1'; memi.bexcn <= '1'; - memi.writen <= '1'; memi.wrn <= "1111"; memi.bwidth <= "10"; - - bdr : for i in 0 to 3 generate - data_pad : iopadv generic map (tech => padtech, width => 8) - port map (data(31-i*8 downto 24-i*8), memo.data(31-i*8 downto 24-i*8), - memo.bdrive(i), memi.data(31-i*8 downto 24-i*8)); - end generate; - - - addr_pad : outpadv generic map (width => 19, tech => padtech) - port map (address, memo.address(20 downto 2)); - - - SSRAM_0:entity ssram_plugin - generic map (tech => padtech) - port map - (lclk2x,memo,SSRAM_CLK,nBWa,nBWb,nBWc,nBWd,nBWE,nADSC,nADSP,nADV,nGW,nCE1,CE2,nCE3,nOE,MODE,ZZ); - ----------------------------------------------------------------------- ---- AHB CONTROLLER ------------------------------------------------- ----------------------------------------------------------------------- - - ahb0 : ahbctrl -- AHB arbiter/multiplexer - generic map (defmast => CFG_DEFMST, split => CFG_SPLIT, - rrobin => CFG_RROBIN, ioaddr => CFG_AHBIO, - ioen => IOAEN, nahbm => maxahbm, nahbs => 8) - port map (rstn, clkm, ahbmi, ahbmo, ahbsi, ahbso); - ----------------------------------------------------------------------- ---- AHB UART ------------------------------------------------------- ----------------------------------------------------------------------- - - dcomgen : if CFG_AHB_UART = 1 generate - dcom0: ahbuart -- Debug UART - generic map (hindex => CFG_NCPU, pindex => 7, paddr => 7) - port map (rstn, clkm, ahbuarti, ahbuarto, apbi, apbo(7), ahbmi, ahbmo(CFG_NCPU)); - dsurx_pad : inpad generic map (tech => padtech) port map (ahbrxd, ahbuarti.rxd); - dsutx_pad : outpad generic map (tech => padtech) port map (ahbtxd, ahbuarto.txd); --- led(0) <= not ahbuarti.rxd; led(1) <= not ahbuarto.txd; - end generate; - nouah : if CFG_AHB_UART = 0 generate apbo(7) <= apb_none; end generate; - ----------------------------------------------------------------------- ---- APB Bridge ----------------------------------------------------- ----------------------------------------------------------------------- - - apb0 : apbctrl -- AHB/APB bridge - generic map (hindex => 1, haddr => CFG_APBADDR) - port map (rstn, clkm, ahbsi, ahbso(1), apbi, apbo ); - ----------------------------------------------------------------------- ---- GPT Timer ------------------------------------------------------ ----------------------------------------------------------------------- - - gpt : if CFG_GPT_ENABLE /= 0 generate - timer0 : gptimer -- timer unit - generic map (pindex => 3, paddr => 3, pirq => CFG_GPT_IRQ, - sepirq => CFG_GPT_SEPIRQ, sbits => CFG_GPT_SW, ntimers => CFG_GPT_NTIM, - nbits => CFG_GPT_TW) - port map (rstn, clkm, apbi, apbo(3), gpti, gpto); - gpti.dhalt <= dsuo.tstop; gpti.extclk <= '0'; --- led(4) <= gpto.wdog; - end generate; - notim : if CFG_GPT_ENABLE = 0 generate apbo(3) <= apb_none; end generate; - - ----------------------------------------------------------------------- ---- APB UART ------------------------------------------------------- ----------------------------------------------------------------------- - - ua1 : if CFG_UART1_ENABLE /= 0 generate - uart1 : apbuart -- UART 1 - generic map (pindex => 1, paddr => 1, pirq => 2, console => dbguart, - fifosize => CFG_UART1_FIFO) - port map (rstn, clkm, apbi, apbo(1), ahbuarti, apbuarto); - apbuarti.rxd <= urxd1; apbuarti.extclk <= '0'; utxd1 <= apbuarto.txd; - apbuarti.ctsn <= '0'; --rtsn1 <= apbuarto.rtsn; --- led(0) <= not apbuarti.rxd; led(1) <= not apbuarto.txd; - end generate; - noua0 : if CFG_UART1_ENABLE = 0 generate apbo(1) <= apb_none; end generate; - ----------------------------------------------------------------------- ---- GPIO ----------------------------------------------------------- ----------------------------------------------------------------------- - - gpio0 : if CFG_GRGPIO_ENABLE /= 0 generate -- GR GPIO unit - grgpio0: grgpio - generic map( pindex => 11, paddr => 11, imask => CFG_GRGPIO_IMASK, nbits => 7) - port map( rstn, clkm, apbi, apbo(11), gpioi, gpioo); - - pio_pads : for i in 0 to 6 generate - pio_pad : iopad generic map (tech => padtech) - port map (gpio(i), gpioo.dout(i), gpioo.oen(i), gpioi.din(i)); - end generate; - end generate; - - -end Behavioral; \ No newline at end of file diff --git a/lib/lpp/lpp_ad_Conv/ADS1278_drvr.vhd b/lib/lpp/lpp_ad_Conv/ADS1278_drvr.vhd new file mode 100644 --- /dev/null +++ b/lib/lpp/lpp_ad_Conv/ADS1278_drvr.vhd @@ -0,0 +1,183 @@ +-- ADS1274_DRIVER.vhd +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; +library lpp; +use lpp.lpp_ad_conv.all; +use lpp.general_purpose.all; + + + + + +entity ADS1278_DRIVER is +generic(modeCfg : ADS127X_MODE_Type := ADS127X_MODE_low_power; formatCfg : ADS127X_FORMAT_Type := ADS127X_FSYNC_FORMAT); +port( + Clk : in std_logic; + reset : in std_logic; + SpiClk : out std_logic; + DIN : in std_logic_vector(7 downto 0); + Ready : in std_logic; + Format : out std_logic_vector(2 downto 0); + Mode : out std_logic_vector(1 downto 0); + ClkDiv : out std_logic; + PWDOWN : out std_logic_vector(7 downto 0); + SmplClk : in std_logic; + OUT0 : out std_logic_vector(23 downto 0); + OUT1 : out std_logic_vector(23 downto 0); + OUT2 : out std_logic_vector(23 downto 0); + OUT3 : out std_logic_vector(23 downto 0); + OUT4 : out std_logic_vector(23 downto 0); + OUT5 : out std_logic_vector(23 downto 0); + OUT6 : out std_logic_vector(23 downto 0); + OUT7 : out std_logic_vector(23 downto 0); + FSynch : out std_logic +); +end ADS1278_DRIVER; + + + + + + +architecture ar_ADS1278_DRIVER of ADS1278_DRIVER is + +signal Vec0,Vec1,Vec2,Vec3,Vec4,Vec5,Vec6,Vec7 : std_logic_vector(23 downto 0); +signal SmplClk_Reg : std_logic:= '0'; +signal N : integer range 0 to 23*8 := 0; +signal SPI_CLk : std_logic; +signal SmplClk_clkd : std_logic:= '0'; + +begin + + +CLKDIV0 : Clk_Divider2 +generic map(16) +port map(Clk,SPI_CLk); + + +Mode(1) <= modeCfg(1); +Mode(0) <= modeCfg(0); +Format(2) <= formatCfg(2); +Format(1) <= formatCfg(1); +Format(0) <= formatCfg(0); +PWDOWN <= (others => '1'); +FSynch <= SmplClk_clkd; +ClkDiv <= '1'; +SpiClk <= SPI_CLk; + +process(reset,SPI_CLk) +begin + + if reset = '0' then + Vec0 <= (others => '0'); + Vec1 <= (others => '0'); + Vec2 <= (others => '0'); + Vec3 <= (others => '0'); + Vec4 <= (others => '0'); + Vec5 <= (others => '0'); + Vec6 <= (others => '0'); + Vec7 <= (others => '0'); + N <= 0; + elsif SPI_CLk'event and SPI_CLk = '1' then +-- SmplClk_clkd <= SmplClk; +-- SmplClk_Reg <= SmplClk_clkd; + --if ((SmplClk_clkd = '1' and SmplClk_Reg = '0') or (N /= 0)) then + if ((SmplClk_clkd = '1' and SmplClk_Reg = '0') or (N /= 0)) then + --Vec0(0) <= DIN(0); + --Vec1(0) <= DIN(1); + --Vec2(0) <= DIN(2); + --Vec3(0) <= DIN(3); + --Vec0(23 downto 1) <= Vec0(22 downto 0); + --Vec1(23 downto 1) <= Vec1(22 downto 0); + --Vec2(23 downto 1) <= Vec2(22 downto 0); + --Vec3(23 downto 1) <= Vec3(22 downto 0); + Vec0(0) <= DIN(0); + Vec0(23 downto 1) <= Vec0(22 downto 0); + Vec1(0) <= Vec0(23); + + Vec1(23 downto 1) <= Vec1(22 downto 0); + Vec2(0) <= Vec1(23); + + Vec2(23 downto 1) <= Vec2(22 downto 0); + Vec3(0) <= Vec2(23); + + Vec3(23 downto 1) <= Vec3(22 downto 0); + Vec4(0) <= Vec3(23); + + Vec4(23 downto 1) <= Vec4(22 downto 0); + Vec5(0) <= Vec4(23); + + Vec5(23 downto 1) <= Vec5(22 downto 0); + Vec6(0) <= Vec5(23); + + Vec6(23 downto 1) <= Vec6(22 downto 0); + Vec7(0) <= Vec6(23); + + Vec7(23 downto 1) <= Vec7(22 downto 0); + if N = (23*8) then + N <= 0; + else + N <= N+1; + end if; + end if; + end if; +end process; + + +process(SPI_CLk) +begin + if SPI_CLk'event and SPI_CLk ='0' then + SmplClk_clkd <= SmplClk; + SmplClk_Reg <= SmplClk_clkd; + end if; +end process; + + +process(SPI_CLk) +begin + if SPI_CLk'event and SPI_CLk ='1' then + if N = 0 then + OUT0 <= Vec0; + OUT1 <= Vec1; + OUT2 <= Vec2; + OUT3 <= Vec3; + OUT4 <= Vec4; + OUT5 <= Vec5; + OUT6 <= Vec6; + OUT7 <= Vec7; + end if; + end if; +end process; + +end ar_ADS1278_DRIVER; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/lpp/lpp_ad_Conv/dual_ADS1278_drvr.vhd b/lib/lpp/lpp_ad_Conv/dual_ADS1278_drvr.vhd new file mode 100644 --- /dev/null +++ b/lib/lpp/lpp_ad_Conv/dual_ADS1278_drvr.vhd @@ -0,0 +1,221 @@ +-- ADS1274_DRIVER.vhd +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; +library lpp; +use lpp.lpp_ad_conv.all; +use lpp.general_purpose.all; + + + + + +entity DUAL_ADS1278_DRIVER is +port( + Clk : in std_logic; + reset : in std_logic; + SpiClk : out std_logic; + DIN : in std_logic_vector(1 downto 0); + SmplClk : in std_logic; + OUT00 : out std_logic_vector(23 downto 0); + OUT01 : out std_logic_vector(23 downto 0); + OUT02 : out std_logic_vector(23 downto 0); + OUT03 : out std_logic_vector(23 downto 0); + OUT04 : out std_logic_vector(23 downto 0); + OUT05 : out std_logic_vector(23 downto 0); + OUT06 : out std_logic_vector(23 downto 0); + OUT07 : out std_logic_vector(23 downto 0); + OUT10 : out std_logic_vector(23 downto 0); + OUT11 : out std_logic_vector(23 downto 0); + OUT12 : out std_logic_vector(23 downto 0); + OUT13 : out std_logic_vector(23 downto 0); + OUT14 : out std_logic_vector(23 downto 0); + OUT15 : out std_logic_vector(23 downto 0); + OUT16 : out std_logic_vector(23 downto 0); + OUT17 : out std_logic_vector(23 downto 0); + FSynch : out std_logic +); +end DUAL_ADS1278_DRIVER; + + + + + + +architecture ar_DUAL_ADS1278_DRIVER of DUAL_ADS1278_DRIVER is + +signal Vec00,Vec01,Vec02,Vec03,Vec04,Vec05,Vec06,Vec07,Vec10,Vec11,Vec12,Vec13,Vec14,Vec15,Vec16,Vec17 : std_logic_vector(23 downto 0); +signal SmplClk_Reg : std_logic:= '0'; +signal N : integer range 0 to 23*8 := 0; +signal SPI_CLk : std_logic; +signal SmplClk_clkd : std_logic:= '0'; + +begin + + +CLKDIV0 : Clk_Divider2 +generic map(16) +port map(Clk,SPI_CLk); + + +FSynch <= SmplClk_clkd; +SpiClk <= SPI_CLk; + +process(reset,SPI_CLk) +begin + + if reset = '0' then + Vec00 <= (others => '0'); + Vec01 <= (others => '0'); + Vec02 <= (others => '0'); + Vec03 <= (others => '0'); + Vec04 <= (others => '0'); + Vec05 <= (others => '0'); + Vec06 <= (others => '0'); + Vec07 <= (others => '0'); + + Vec10 <= (others => '0'); + Vec11 <= (others => '0'); + Vec12 <= (others => '0'); + Vec13 <= (others => '0'); + Vec14 <= (others => '0'); + Vec15 <= (others => '0'); + Vec16 <= (others => '0'); + Vec17 <= (others => '0'); + N <= 0; + elsif SPI_CLk'event and SPI_CLk = '1' then +-- SmplClk_clkd <= SmplClk; +-- SmplClk_Reg <= SmplClk_clkd; + --if ((SmplClk_clkd = '1' and SmplClk_Reg = '0') or (N /= 0)) then + if ((SmplClk_clkd = '1' and SmplClk_Reg = '0') or (N /= 0)) then + --Vec0(0) <= DIN(0); + --Vec1(0) <= DIN(1); + --Vec2(0) <= DIN(2); + --Vec3(0) <= DIN(3); + --Vec0(23 downto 1) <= Vec0(22 downto 0); + --Vec1(23 downto 1) <= Vec1(22 downto 0); + --Vec2(23 downto 1) <= Vec2(22 downto 0); + --Vec3(23 downto 1) <= Vec3(22 downto 0); + Vec00(0) <= DIN(0); + Vec00(23 downto 1) <= Vec00(22 downto 0); + Vec01(0) <= Vec00(23); + + Vec01(23 downto 1) <= Vec01(22 downto 0); + Vec02(0) <= Vec01(23); + + Vec02(23 downto 1) <= Vec02(22 downto 0); + Vec03(0) <= Vec02(23); + + Vec03(23 downto 1) <= Vec03(22 downto 0); + Vec04(0) <= Vec03(23); + + Vec04(23 downto 1) <= Vec04(22 downto 0); + Vec05(0) <= Vec04(23); + + Vec05(23 downto 1) <= Vec05(22 downto 0); + Vec06(0) <= Vec05(23); + + Vec06(23 downto 1) <= Vec06(22 downto 0); + Vec07(0) <= Vec06(23); + + Vec07(23 downto 1) <= Vec07(22 downto 0); + + + Vec10(0) <= DIN(1); + Vec10(23 downto 1) <= Vec10(22 downto 0); + Vec11(0) <= Vec10(23); + + Vec11(23 downto 1) <= Vec11(22 downto 0); + Vec12(0) <= Vec11(23); + + Vec12(23 downto 1) <= Vec12(22 downto 0); + Vec13(0) <= Vec12(23); + + Vec13(23 downto 1) <= Vec13(22 downto 0); + Vec14(0) <= Vec13(23); + + Vec14(23 downto 1) <= Vec14(22 downto 0); + Vec15(0) <= Vec14(23); + + Vec15(23 downto 1) <= Vec15(22 downto 0); + Vec16(0) <= Vec15(23); + + Vec16(23 downto 1) <= Vec16(22 downto 0); + Vec17(0) <= Vec16(23); + + Vec17(23 downto 1) <= Vec17(22 downto 0); + if N = (23*8) then + N <= 0; + else + N <= N+1; + end if; + end if; + end if; +end process; + + +process(SPI_CLk) +begin + if SPI_CLk'event and SPI_CLk ='0' then + SmplClk_clkd <= SmplClk; + SmplClk_Reg <= SmplClk_clkd; + end if; +end process; + + +process(SPI_CLk) +begin + if SPI_CLk'event and SPI_CLk ='1' then + if N = 0 then + OUT00 <= Vec00; + OUT01 <= Vec01; + OUT02 <= Vec02; + OUT03 <= Vec03; + OUT04 <= Vec04; + OUT05 <= Vec05; + OUT06 <= Vec06; + OUT07 <= Vec07; + + OUT10 <= Vec10; + OUT11 <= Vec11; + OUT12 <= Vec12; + OUT13 <= Vec13; + OUT14 <= Vec14; + OUT15 <= Vec15; + OUT16 <= Vec16; + OUT17 <= Vec17; + end if; + end if; +end process; + +end ar_DUAL_ADS1278_DRIVER; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/lpp/lpp_ad_Conv/lpp_ad_Conv.vhd b/lib/lpp/lpp_ad_Conv/lpp_ad_Conv.vhd --- a/lib/lpp/lpp_ad_Conv/lpp_ad_Conv.vhd +++ b/lib/lpp/lpp_ad_Conv/lpp_ad_Conv.vhd @@ -162,30 +162,63 @@ Type ADS127X_config is MODE : ADS127X_MODE_Type; end record; -COMPONENT ADS1274_DRIVER is -generic(modeCfg : ADS127X_MODE_Type := ADS127X_MODE_low_power; formatCfg : ADS127X_FORMAT_Type := ADS127X_FSYNC_FORMAT); -port( - Clk : in std_logic; - reset : in std_logic; - SpiClk : out std_logic; - DIN : in std_logic_vector(3 downto 0); - Ready : in std_logic; - Format : out std_logic_vector(2 downto 0); - Mode : out std_logic_vector(1 downto 0); - ClkDiv : out std_logic; - PWDOWN : out std_logic_vector(3 downto 0); - SmplClk : in std_logic; - OUT0 : out std_logic_vector(23 downto 0); - OUT1 : out std_logic_vector(23 downto 0); - OUT2 : out std_logic_vector(23 downto 0); - OUT3 : out std_logic_vector(23 downto 0); - FSynch : out std_logic; - test : out std_logic -); +COMPONENT ADS1274_DRIVER is +generic(modeCfg : ADS127X_MODE_Type := ADS127X_MODE_low_power; formatCfg : ADS127X_FORMAT_Type := ADS127X_FSYNC_FORMAT); +port( + Clk : in std_logic; + reset : in std_logic; + SpiClk : out std_logic; + DIN : in std_logic_vector(3 downto 0); + Ready : in std_logic; + Format : out std_logic_vector(2 downto 0); + Mode : out std_logic_vector(1 downto 0); + ClkDiv : out std_logic; + PWDOWN : out std_logic_vector(3 downto 0); + SmplClk : in std_logic; + OUT0 : out std_logic_vector(23 downto 0); + OUT1 : out std_logic_vector(23 downto 0); + OUT2 : out std_logic_vector(23 downto 0); + OUT3 : out std_logic_vector(23 downto 0); + FSynch : out std_logic; + test : out std_logic +); end COMPONENT; +-- todo clean file +COMPONENT DUAL_ADS1278_DRIVER is +port( + Clk : in std_logic; + reset : in std_logic; + SpiClk : out std_logic; + DIN : in std_logic_vector(1 downto 0); + SmplClk : in std_logic; + OUT00 : out std_logic_vector(23 downto 0); + OUT01 : out std_logic_vector(23 downto 0); + OUT02 : out std_logic_vector(23 downto 0); + OUT03 : out std_logic_vector(23 downto 0); + OUT04 : out std_logic_vector(23 downto 0); + OUT05 : out std_logic_vector(23 downto 0); + OUT06 : out std_logic_vector(23 downto 0); + OUT07 : out std_logic_vector(23 downto 0); + OUT10 : out std_logic_vector(23 downto 0); + OUT11 : out std_logic_vector(23 downto 0); + OUT12 : out std_logic_vector(23 downto 0); + OUT13 : out std_logic_vector(23 downto 0); + OUT14 : out std_logic_vector(23 downto 0); + OUT15 : out std_logic_vector(23 downto 0); + OUT16 : out std_logic_vector(23 downto 0); + OUT17 : out std_logic_vector(23 downto 0); + FSynch : out std_logic +); +end COMPONENT; END lpp_ad_conv; + + + + + +