├── README.md └── leon2-1.0.30-xst ├── .synopsys_vss.setup ├── COPYING ├── COPYING.LGPL ├── Makefile ├── README.config ├── VERSION ├── boards ├── Makefile ├── avnet-xcv1000e │ ├── 971A_lqfp.bsd │ ├── Makefile │ ├── bitgen.ut │ ├── config-default │ ├── leon.npl │ ├── leon.prj │ ├── leon.sdc │ ├── leon.tcl │ ├── leon.ucf │ ├── leon_eth.prj │ ├── leon_eth.syn │ ├── leon_eth.ucf │ ├── leon_eth.xcf │ ├── leon_eth_pci.prj │ ├── leon_eth_pci.ucf │ ├── leon_eth_pci.xcf │ ├── leon_pci.prj │ └── leon_pci.ucf ├── avnet-xcv2p20 │ ├── README.TXT │ ├── leon_avnet.cdf │ ├── leon_avnet.npl │ ├── leon_avnet.ucf │ ├── leon_avnet.vhd │ └── leon_avnet.xcf ├── billo-mblaze-xc2v │ ├── Makefile │ ├── README │ ├── bitgen.ut │ ├── config-54mhz │ ├── config-default │ ├── config-mmu │ ├── cpld │ │ └── cpld.jed │ ├── leon.prj │ ├── leon.sdc │ ├── leon.tcl │ ├── leon.ucf │ ├── leon.xst │ ├── leon_eth.prj │ ├── leon_eth.ucf │ ├── leon_eth_mblaze.vhd │ ├── leon_mblaze.vhd │ └── mblaze_clkgen.vhd ├── gr-cpci-xc2v │ ├── .recordref │ ├── 971A_lqfp.bsd │ ├── Makefile │ ├── bitgen.ut │ ├── config-50mhz │ ├── config-53mhz │ ├── config-60mhz │ ├── config-default │ ├── config-mmu │ ├── device.vhd │ ├── leon-ise5.npl │ ├── leon-ise6.npl │ ├── leon.npl │ ├── leon.prj │ ├── leon.sdc │ ├── leon.tcl │ ├── leon.ucf │ ├── leon_eth.prj │ ├── leon_eth.ucf │ ├── leon_eth_pci.prj │ ├── leon_eth_pci.ucf │ ├── leon_pci.prj │ └── leon_pci.ucf ├── gr-pci-xc2v │ ├── .recordref │ ├── 971A_lqfp.bsd │ ├── Makefile │ ├── bitgen.ut │ ├── config-50mhz │ ├── config-53mhz │ ├── config-60mhz │ ├── config-default │ ├── config-mmu │ ├── device.vhd │ ├── leon-ise5.npl │ ├── leon-ise6.npl │ ├── leon.npl │ ├── leon.prj │ ├── leon.sdc │ ├── leon.tcl │ ├── leon.ucf │ ├── leon_eth.prj │ ├── leon_eth.ucf │ ├── leon_eth_pci.prj │ ├── leon_eth_pci.ucf │ ├── leon_pci.prj │ ├── leon_pci.ucf │ ├── prom.cmd │ └── prom_xst.cmd ├── gr-xc3s1500 │ ├── .config │ ├── .recordref │ ├── Makefile │ ├── bitgen.ut │ ├── config-default │ ├── device.vhd │ ├── leon-ise5.npl │ ├── leon-ise6.npl │ ├── leon.npl │ ├── leon.prj │ ├── leon.sdc │ ├── leon.tcl │ ├── leon.ucf │ ├── leon_eth.prj │ ├── leon_eth.ucf │ └── prom.cmd ├── hecht-xsv800 │ ├── Makefile │ ├── README │ ├── bitgen.ut │ ├── config-default │ ├── cpld │ │ ├── dwnldpar.svf │ │ ├── dwnldpar.ucf │ │ └── dwnldpar.vhd │ ├── leon.prj │ ├── leon.sdc │ ├── leon.tcl │ ├── leon.ucf │ ├── leon.xst │ ├── leon_eth.prj │ ├── leon_eth.ucf │ ├── leon_eth_xsv800.vhd │ └── leon_xsv800.vhd └── tiggeler-xcv800 │ ├── .recordref │ ├── Makefile │ ├── bitgen.ut │ ├── config-default │ ├── leon.prj │ ├── leon.sdc │ ├── leon.tcl │ └── leon.ucf ├── cds.lib ├── compile.do ├── doc ├── ethernet.pdf ├── fpu_lth.pdf └── leon2-1.0.30-xst.pdf ├── hdl.var ├── leon ├── .synopsys_vss.setup ├── Makefile ├── acache.vhd ├── ahbarb.vhd ├── ahbmst.vhd ├── ahbram.vhd ├── ahbstat.vhd ├── ahbtest.vhd ├── amba.vhd ├── ambacomp.vhd ├── apbmst.vhd ├── bprom.vhd ├── cache.vhd ├── cachemem.vhd ├── cds.lib ├── compile.bat ├── config.vhd ├── dcache.vhd ├── dcom.vhd ├── dcom_uart.vhd ├── debug.vhd ├── device.v ├── device.vhd ├── div.vhd ├── dma.vhd ├── dsu.vhd ├── dsu_mem.vhd ├── eth_oc.vhd ├── eth_top.v ├── ethermac.v ├── fp1eu.vhd ├── fpu_core.vhd ├── fpu_lth.vhd ├── fpulib.vhd ├── grfpc.vhd ├── hdl.var ├── icache.vhd ├── iface.vhd ├── ioport.vhd ├── irqctrl.vhd ├── irqctrl2.vhd ├── iu.vhd ├── lconf.vhd ├── leon.vhd ├── leon_eth.vhd ├── leon_eth_pci.vhd ├── leon_pci.vhd ├── macro.vhd ├── mcore.vhd ├── mctrl.vhd ├── meiko.vhd ├── mmu.vhd ├── mmu_acache.vhd ├── mmu_cache.vhd ├── mmu_dcache.vhd ├── mmu_icache.vhd ├── mmuconfig.vhd ├── mmulru.vhd ├── mmulrue.vhd ├── mmutlb.vhd ├── mmutlbcam.vhd ├── mmutw.vhd ├── modelsim.ini ├── mul.vhd ├── multlib.vhd ├── pci.vhd ├── pci_arb.vhd ├── pci_gr.vhd ├── proc.vhd ├── rstgen.vhd ├── sdmctrl.vhd ├── sparcv8.vhd ├── target.vhd ├── tech_atc18.vhd ├── tech_atc25.vhd ├── tech_atc35.vhd ├── tech_axcel.vhd ├── tech_fs90.vhd ├── tech_generic.vhd ├── tech_map.vhd ├── tech_proasic.vhd ├── tech_tsmc25.vhd ├── tech_umc18.vhd ├── tech_virtex.vhd ├── tech_virtex2.vhd ├── timers.vhd ├── transcript ├── uart.vhd └── wprot.vhd ├── modelsim.ini ├── pmon ├── COPYING ├── Makefile ├── README.mon ├── README.romgen ├── bin2mif.c ├── bprom.c ├── eprom.c ├── hello.c ├── lmon.o ├── rom.vhdl ├── rom2vhdl.c └── tmpl.vhdl ├── sim ├── ghdl │ └── compile.sh ├── modelsim │ ├── compile.do │ ├── modelsim.ini │ ├── wave.do │ ├── wave_eth_pci.do │ ├── wave_msp.do │ └── wave_pci.do └── ncsim │ └── compile.sh ├── syn ├── Makefile ├── README ├── ise │ ├── leon.xst │ ├── route │ ├── route_ngc │ ├── xstmod │ └── xstrun ├── leonardo │ ├── README │ └── leon.tcl ├── synopsys │ ├── Makefile │ ├── README │ ├── atc18cond.dcsh │ ├── atc25cond.dcsh │ ├── atc25setup.dcsh │ ├── atc35setup.dcsh │ ├── fs90cond.dcsh │ ├── fs90setup.dcsh │ ├── leon.dcsh │ ├── leon.fc2 │ ├── leon_eth.dcsh │ ├── leon_eth_pci.dcsh │ └── leon_pci.dcsh ├── synplify │ ├── .recordref │ ├── Makefile │ ├── ethermac.v │ ├── leon.prj │ ├── leon.sdc │ ├── leon_eth.prj │ ├── leon_eth_pci.prj │ ├── leon_files.tcl │ └── leon_pci.prj ├── verilog │ └── ethermac.v └── xst │ ├── Makefile │ ├── leon.npl │ ├── leon.xst │ └── leon_xst.ucf ├── tbench ├── .synopsys_vss.setup ├── Makefile ├── bprom.dat ├── bprom.vhd ├── cds.lib ├── compile.bat ├── hdl.var ├── iram.vhd ├── leonlib.vhd ├── modelsim.ini ├── mspram.vhd ├── mt48lc16m16a2.vhd ├── tb_msp.vhd ├── tbdef.vhd ├── tbgen.vhd ├── tbleon.vhd ├── tblib.vhd └── testmod.vhd ├── tkconfig ├── .config ├── .config.old ├── .null ├── Makefile ├── config-language.txt ├── config.h ├── config.help ├── config.in ├── defconfig ├── header.tk ├── mkdevice.c ├── tail.tk ├── tkcond.c ├── tkgen.c ├── tkparse ├── tkparse.c └── tkparse.h └── tsource ├── Makefile ├── asm.h ├── boot.S ├── bootsd.S ├── bootsdm.S ├── bprom.dat ├── cache.c ├── defs.h ├── divtest.c ├── dsu.c ├── extra.c ├── fpu.c ├── fram.dat ├── ioport.c ├── irqctrl.c ├── leon.h ├── leon_full_test.c ├── leon_ram.c ├── leon_test.c ├── leon_test_mmu.c ├── linkboot ├── linkleon ├── linkram ├── locore1.S ├── locore1mmu.S ├── memtest.c ├── misc.c ├── mmram.dat ├── mmu.c ├── mmu.h ├── mmu_asm.S ├── mram.dat ├── multest.c ├── ram.dat ├── ramtest.c ├── regtest.S ├── rom.dat ├── romsd.dat ├── romsdm.dat ├── sdram.rec ├── test.h ├── timers.c └── uart.c /README.md: -------------------------------------------------------------------------------- 1 | LEON2 2 | ===== 3 | 4 | LEON2 SPARC CPU IP core LGPL by Gaisler Research -------------------------------------------------------------------------------- /leon2-1.0.30-xst/Makefile: -------------------------------------------------------------------------------- 1 | CONFIG = default 2 | VLIB = vlib 3 | VCOM = vcom 4 | VSIM = vsim 5 | BOARD = gr-pci-xc2v 6 | NCVHPAR = -nocopyright 7 | NCVLPAR = -nocopyright 8 | NCELPAR = -nocopyright 9 | GHDLPAR = --ieee=synopsys 10 | 11 | all: 12 | @echo 13 | @echo " choose one of following targets:" 14 | @echo 15 | @echo " make xgates : compile Xilinx gate level models with modelsim" 16 | @echo " make vsim : compile simulation model with modelsim" 17 | @echo " make ncsim : compile simulation model with ncsim" 18 | @echo " make vss : compile simulation model with synopsys-vss" 19 | @echo " make test : run tb_func32 testbench with modelsim simulator" 20 | @echo " make config : configure VHDL model for the GR-PCI-XC2V fpga board" 21 | @echo " make xconfig : run the graphical configuration tool" 22 | @echo " make fpga : do synthesis and p&r for the GR-PCI-XC2V fpga board" 23 | @echo " make clean : remove all temporary files except config and fpga bitfiles" 24 | @echo " make dist-clean : remove all temporary files" 25 | @echo 26 | @echo " To target other fpga boards than the GR-PCI-XC2V, add BOARD=xxx" 27 | @echo " where xxx is one of gr-pci-xc2v, gr-cpci-xc2v, avnet-xcv1000e," 28 | @echo " gr-xc3s1500, tiggeler-xcv800, hecht-xsv800 or billo-mblaze-xc2v" 29 | @echo 30 | @echo " When synthesising for Virtex fpga's, Xilinx XST is used by default." 31 | @echo " To use Synplify, add parameter SYN=synplify. Place&route effort is" 32 | @echo " by default std, but can be set through the EFFORT parameter. The CONFIG" 33 | @echo " parameter can be used to specify alternative model configurations." 34 | @echo 35 | @echo " Examples: " 36 | @echo " make config fpga EFFORT=high CONFIG=60mhz" 37 | @echo " make config fpga BOARD=avnet-xcv1000e SYN=synplify EFFORT=med" 38 | @echo 39 | 40 | xgates: 41 | cd leon; make xlib 42 | 43 | vsim: 44 | cd leon; make 45 | cd tbench; make 46 | 47 | ncsim: 48 | cd leon; make VCOM="ncvhdl $(NCVHPAR) -work work" \ 49 | VLOG="ncvlog $(NCVLPAR) -work work" VLIB=mkdir 50 | cd tbench; make VCOM="ncvhdl $(NCVHPAR) -work work" \ 51 | VLOG="ncvlog $(NCVLPAR) -work work" VLIB=mkdir 52 | ncelab $(NCELPAR) tb_func32 53 | 54 | ghdl: 55 | cd leon; make VCOM="ghdl -a $(GHDLPAR) --workdir=work" \ 56 | VLOG="echo no verilog support:" VLIB=mkdir 57 | cd tbench; make VCOM="ghdl -a $(GHDLPAR) --workdir=../leon/work" \ 58 | VLOG="echo no verilog support:" VLIB=mkdir 59 | ghdl -e $(GHDLPAR) --workdir=leon/work tb_func32 60 | 61 | vss: 62 | cd leon; make VCOM="vhdlan -nc -interp" VLIB="mkdir" 63 | cd tbench; make VCOM="vhdlan -nc -interp" VLIB="mkdir" 64 | 65 | test: vsim 66 | $(VSIM) -quiet -c tb_func32 -do "run -all" 67 | dep: 68 | cd tkconfig; make dep 69 | wconfig: 70 | cd tkconfig; make wconfig 71 | xconfig: 72 | cd tkconfig; make xconfig 73 | tsoft: 74 | cd tsource; make 75 | pci: 76 | make vsim 77 | cd tbpci; ./core.bat 78 | fpga: 79 | cd boards/$(BOARD); make all 80 | config: 81 | cp boards/$(BOARD)/config-$(CONFIG) tkconfig/.config 82 | make dep 83 | clean: 84 | cd boards; make clean 85 | cd leon; make clean 86 | cd tbench; make clean 87 | cd tsource; make clean 88 | cd tkconfig; make clean 89 | cd syn; make clean 90 | -rm -rf dumpdata.txt trnscrpt transcript vsim.wlf vsim.wav \ 91 | tbpci/actelpci_lib tbpci/adpms_lib */nc*.log nc*.log \ 92 | tb_* 93 | 94 | dist-clean: clean 95 | cd tkconfig; make dist-clean 96 | cd boards; make dist-clean 97 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/README.config: -------------------------------------------------------------------------------- 1 | 2 | The primary way of configuring the model is using a TCL/TK based GUI. 3 | The GUI is based on the 'xconfig' sripts from the linux kernel and 4 | works both on unix and cygwin hosts with TCL/TK 8.0 or later. 5 | 6 | To make a configuration, do 'make xconfig' in the leon top directory. 7 | After having saved the new configuration, do a 'make dep' to install 8 | the configuration in the VHDL model. To build the model, do 'make' 9 | as usual. 10 | 11 | 12 | Enjoy, Jiri Gaisler - Gaisler Research. 13 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: 3 | 4 | clean: 5 | cd gr-pci-xc2v; make clean 6 | cd gr-cpci-xc2v; make clean 7 | cd gr-xc3s1500; make clean 8 | cd avnet-xcv1000e; make clean 9 | cd tiggeler-xcv800; make clean 10 | cd billo-mblaze-xc2v; make clean 11 | 12 | dist-clean: clean 13 | cd gr-pci-xc2v; make dist-clean 14 | cd gr-cpci-xc2v; make dist-clean 15 | cd gr-xc3s1500; make dist-clean 16 | cd avnet-xcv1000e; make dist-clean 17 | cd tiggeler-xcv800; make dist-clean 18 | cd billo-mblaze-xc2v; make dist-clean 19 | 20 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv1000e/bitgen.ut: -------------------------------------------------------------------------------- 1 | -g ConfigRate:4 2 | -g CclkPin:PULLUP 3 | -g TdoPin:PULLNONE 4 | -g M1Pin:PULLUP 5 | -g DonePin:PULLUP 6 | -g DriveDone:Yes 7 | -g StartUpClk:CCLK 8 | -g DONE_cycle:4 9 | -g GTS_cycle:5 10 | -g M0Pin:PULLUP 11 | -g M2Pin:PULLUP 12 | -g ProgPin:PULLUP 13 | -g TckPin:PULLUP 14 | -g TdiPin:PULLUP 15 | -g TmsPin:PULLUP 16 | -g DonePipe:No 17 | -g GWE_cycle:6 18 | -g LCK_cycle:NoWait 19 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv1000e/leon.npl: -------------------------------------------------------------------------------- 1 | JDF F 2 | // Created by Project Navigator ver 1.0 3 | PROJECT syn 4 | DESIGN leon Normal 5 | DEVFAM virtexe 6 | DEVFAMTIME 1041788708 7 | DEVICE xcv1000e 8 | DEVICETIME 1041788708 9 | DEVPKG fg1152 10 | DEVPKGTIME 1041788708 11 | DEVSPEED -6 12 | DEVSPEEDTIME 0 13 | FLOW XST VHDL 14 | FLOWTIME 1041788708 15 | MODULE ..\..\..\leon\ahbstat.vhd 16 | MODSTYLE ahbstat Normal 17 | MODULE ..\..\..\leon\dcom_uart.vhd 18 | MODSTYLE dcom_uart Normal 19 | MODULE ..\..\..\leon\cache.vhd 20 | MODSTYLE cache Normal 21 | MODULE ..\..\..\leon\fpu_lth.vhd 22 | MODSTYLE fpu_lth Normal 23 | MODULE ..\..\..\leon\irqctrl.vhd 24 | MODSTYLE irqctrl Normal 25 | MODULE ..\..\..\leon\irqctrl2.vhd 26 | MODSTYLE irqctrl2 Normal 27 | MODULE ..\..\..\leon\meiko.vhd 28 | MODSTYLE fpu Normal 29 | MODULE ..\..\..\leon\lconf.vhd 30 | MODSTYLE lconf Normal 31 | MODULE ..\..\..\leon\mcore.vhd 32 | MODSTYLE mcore Normal 33 | MODULE ..\..\..\leon\mctrl.vhd 34 | MODSTYLE mctrl Normal 35 | MODULE ..\..\..\leon\wprot.vhd 36 | MODSTYLE wprot Normal 37 | MODULE ..\..\..\leon\bprom.vhd 38 | MODSTYLE gen_bprom Normal 39 | MODULE ..\..\..\leon\div.vhd 40 | MODSTYLE div Normal 41 | MODULE ..\..\..\leon\dsu.vhd 42 | MODSTYLE dsu Normal 43 | MODULE ..\..\..\leon\mul.vhd 44 | MODSTYLE mul Normal 45 | MODULE ..\..\..\leon\ahbarb.vhd 46 | MODSTYLE ahbarb Normal 47 | MODULE ..\..\..\leon\dcache.vhd 48 | MODSTYLE dcache Normal 49 | MODULE ..\..\..\leon\icache.vhd 50 | MODSTYLE icache Normal 51 | MODULE ..\..\..\leon\acache.vhd 52 | MODSTYLE acache Normal 53 | MODULE ..\..\..\leon\cachemem.vhd 54 | MODSTYLE cachemem Normal 55 | MODULE ..\..\..\leon\fpu_core.vhd 56 | MODSTYLE fpu_core Normal 57 | MODULE ..\..\..\leon\timers.vhd 58 | MODSTYLE timers Normal 59 | MODULE ..\..\..\leon\ahbram.vhd 60 | MODSTYLE ahbram Normal 61 | MODULE ..\..\..\leon\rstgen.vhd 62 | MODSTYLE rstgen Normal 63 | MODULE ..\..\..\leon\ahbmst.vhd 64 | MODSTYLE ahbmst Normal 65 | MODULE ..\..\..\leon\dcom.vhd 66 | MODSTYLE dcom Normal 67 | MODULE ..\..\..\leon\proc.vhd 68 | MODSTYLE proc Normal 69 | MODULE ..\..\..\leon\uart.vhd 70 | MODSTYLE uart Normal 71 | MODULE ..\..\..\leon\apbmst.vhd 72 | MODSTYLE apbmst Normal 73 | MODULE ..\..\..\leon\ioport.vhd 74 | MODSTYLE ioport Normal 75 | MODULE ..\..\..\leon\iu.vhd 76 | MODSTYLE iu Normal 77 | MODULE ..\..\..\leon\dsu_mem.vhd 78 | MODSTYLE dsu_mem Normal 79 | MODULE ..\..\..\leon\sdmctrl.vhd 80 | MODSTYLE sdmctrl Normal 81 | MODULE ..\..\..\leon\leon.vhd 82 | MODSTYLE leon Normal 83 | LIBFILE ..\..\..\leon\tech_fs90.vhd work *** 84 | LIBFILE ..\..\..\leon\device.vhd work *** 85 | LIBFILE ..\..\..\leon\tech_axcel.vhd work *** 86 | LIBFILE ..\..\..\leon\config.vhd work *** 87 | LIBFILE ..\..\..\leon\fpulib.vhd work *** 88 | LIBFILE ..\..\..\leon\target.vhd work *** 89 | LIBFILE ..\..\..\leon\iface.vhd work *** 90 | LIBFILE ..\..\..\leon\macro.vhd work *** 91 | LIBFILE ..\..\..\leon\tech_virtex2.vhd work *** 92 | LIBFILE ..\..\..\leon\amba.vhd work *** 93 | LIBFILE ..\..\..\leon\tech_tsmc25.vhd work *** 94 | LIBFILE ..\..\..\leon\tech_map.vhd work *** 95 | LIBFILE ..\..\..\leon\ambacomp.vhd work *** 96 | LIBFILE ..\..\..\leon\tech_generic.vhd work *** 97 | LIBFILE ..\..\..\leon\tech_proasic.vhd work *** 98 | LIBFILE ..\..\..\leon\tech_atc25.vhd work *** 99 | LIBFILE ..\..\..\leon\tech_atc35.vhd work *** 100 | LIBFILE ..\..\..\leon\tech_atc18.vhd work *** 101 | LIBFILE ..\..\..\leon\multlib.vhd work *** 102 | LIBFILE ..\..\..\leon\tech_virtex.vhd work *** 103 | LIBFILE ..\..\..\leon\sparcv8.vhd work *** 104 | LIBFILE ..\..\..\leon\tech_umc18.vhd work *** 105 | DEPASSOC leon leon.ucf Normal 106 | [Normal] 107 | p_SimModelTarget=xstvhd, virtexe, VHDL.t_postMapSimModel, 1041792828, Modelsim_VHDL 108 | [STRATEGY-LIST] 109 | Normal=True 110 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv1000e/leon.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon" 5 | project -result_file "./leon.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv1000e/leon.sdc: -------------------------------------------------------------------------------- 1 | 2 | define_clock -name {clk} -freq 35.0 -clockgroup default_clkgroup 3 | define_clock -name {pciclk} -freq 40.000 -clockgroup pci_clkgroup 4 | define_clock -name {erx_clk} -freq 30.000 -clockgroup erx_clk_clkgroup 5 | define_clock -name {etx_clk} -freq 30.000 -clockgroup etx_clk_clkgroup 6 | 7 | define_output_delay -default 8.00 -ref clk:r 8 | define_input_delay -default 10.00 -ref clk:r 9 | define_output_delay -default 14.00 -ref pciclk:r 10 | define_input_delay -default 18.00 -ref pciclk:r 11 | 12 | define_output_delay -default 8.00 -ref erx_clk:r 13 | define_input_delay -default 10.00 -ref erx_clk:r 14 | define_output_delay -default 8.00 -ref etx_clk:r 15 | define_input_delay -default 10.00 -ref etx_clk:r 16 | 17 | define_global_attribute syn_useioff {1} 18 | define_attribute {erx_clk} syn_noclockbuf {1} 19 | define_attribute {etx_clk} syn_noclockbuf {1} 20 | 21 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv1000e/leon.tcl: -------------------------------------------------------------------------------- 1 | source "../../syn/synplify/leon_files.tcl" 2 | add_file -constraint "leon.sdc" 3 | 4 | impl -add syn 5 | 6 | set_option -technology VIRTEX-E 7 | set_option -part XCV1000E 8 | set_option -package FG1156 9 | set_option -speed_grade -6 10 | 11 | set_option -default_enum_encoding onehot 12 | set_option -symbolic_fsm_compiler 0 13 | set_option -resource_sharing 0 14 | set_option -use_fsm_explorer 0 15 | 16 | set_option -frequency 35.000 17 | set_option -fanout_limit 100 18 | set_option -disable_io_insertion 0 19 | set_option -pipe 1 20 | set_option -modular 0 21 | set_option -retiming 1 22 | 23 | set_option -write_verilog 0 24 | set_option -write_vhdl 1 25 | 26 | set_option -write_apr_constraint 0 27 | set_option -compiler_compatible 0 28 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv1000e/leon_eth.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_eth" 5 | project -result_file "./leon_eth.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv1000e/leon_eth.syn: -------------------------------------------------------------------------------- 1 | 2 | add_file -vhdl -lib work "../../../leon/leon_eth.vhd" 3 | add_file -constraint "leon.sdc" 4 | 5 | impl -add syn 6 | 7 | set_option -technology VIRTEX-E 8 | set_option -part XCV1000E 9 | set_option -package FG1156 10 | set_option -speed_grade -6 11 | 12 | set_option -default_enum_encoding onehot 13 | set_option -symbolic_fsm_compiler 0 14 | set_option -resource_sharing 0 15 | set_option -use_fsm_explorer 0 16 | set_option -top_module "leon_eth" 17 | 18 | set_option -frequency 35.000 19 | set_option -fanout_limit 100 20 | set_option -disable_io_insertion 0 21 | set_option -pipe 1 22 | set_option -modular 0 23 | set_option -retiming 1 24 | 25 | set_option -write_verilog 0 26 | set_option -write_vhdl 1 27 | 28 | set_option -write_apr_constraint 0 29 | 30 | project -result_file "./leon_eth.edf" 31 | 32 | set_option -compiler_compatible 0 33 | impl -active "syn" 34 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv1000e/leon_eth.xcf: -------------------------------------------------------------------------------- 1 | BEGIN MODEL leon_eth 2 | NET erx_clk clock_buffer=ibuf; 3 | NET etx_clk clock_buffer=ibuf; 4 | END; 5 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv1000e/leon_eth_pci.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_eth_pci" 5 | project -result_file "./leon_eth_pci.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv1000e/leon_eth_pci.xcf: -------------------------------------------------------------------------------- 1 | BEGIN MODEL leon_eth_pci 2 | NET erx_clk clock_buffer=ibuf; 3 | NET etx_clk clock_buffer=ibuf; 4 | END; 5 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv1000e/leon_pci.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_pci" 5 | project -result_file "./leon_pci.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv2p20/README.TXT: -------------------------------------------------------------------------------- 1 | Leon project for Avnet Xilinx V2P20 Development Board 2 | Author: Michele Portolan, TIMA Laboratory, portolan@imag.fr 3 | Last Modified 7 October 2004 4 | 5 | 6 | This release is composed of five files: 7 | 8 | leon_avnet.npl: ISE 6.3.01i project file 9 | leon_avnet.vhd: Wrapper for Leon to adapt it the board requirements 10 | leon_avnet.ucf: Pin Mapping file 11 | leon_avnet.cdf: Configuration file for Impact 12 | leon_avnet.xcf: User constraint file. Could be used to enable Incremental Synthesis (default is off) 13 | 14 | So far I had not been able to make a working Makefile for command-line synthesis: I always get error from "par" -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv2p20/leon_avnet.cdf: -------------------------------------------------------------------------------- 1 | JedecChain; 2 | FileRevision(JESDxxA); 3 | /* NoviceMode */ 4 | /* Active Mode BS */ 5 | /* Mode BS */ 6 | /* Cable ParallelIV lpt1 5000000 */ 7 | P ActionCode(Cfg) 8 | Device 9 | PartName(xccace) 10 | File("BYPASS") 11 | ; 12 | P ActionCode(Cfg) 13 | Device 14 | PartName(xc2vp20) 15 | File("leon_avnet.bit") 16 | ; 17 | P ActionCode(Cfg) 18 | Device 19 | PartName(xc18v02) 20 | File("BYPASS") 21 | ; 22 | P ActionCode(Cfg) 23 | Device 24 | PartName(xcv300e) 25 | File("BYPASS") 26 | ; 27 | /* Mode SS */ 28 | /* Mode SM */ 29 | /* Mode BSFILE */ 30 | /* Mode HW140 */ 31 | ChainEnd; 32 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/avnet-xcv2p20/leon_avnet.xcf: -------------------------------------------------------------------------------- 1 | MODEL leon incremental_synthesis=no; 2 | 3 | MODEL genoutpad incremental_synthesis=no; 4 | MODEL inpad incremental_synthesis=no; 5 | MODEL outpad incremental_synthesis=no; 6 | MODEL outpad1 incremental_synthesis=no; 7 | MODEL outpad2 incremental_synthesis=no; 8 | MODEL virtex2_dpram incremental_synthesis=no; 9 | MODEL geniopad incremental_synthesis=no; 10 | MODEL iopad incremental_synthesis=no; 11 | MODEL smiopad incremental_synthesis=no; 12 | MODEL iopad0 incremental_synthesis=no; 13 | MODEL uart incremental_synthesis=no; 14 | MODEL syncram9 incremental_synthesis=no; 15 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/billo-mblaze-xc2v/Makefile: -------------------------------------------------------------------------------- 1 | 2 | EFFORT=3 3 | DEVICE=xc2v2000-ff896-4 4 | 5 | all: 6 | @if test "$(SYN)" = "synplify"; then make grsyn; \ 7 | else make grxst; fi; 8 | 9 | help: 10 | @echo 11 | @echo " choose one of following targets:" 12 | @echo 13 | @echo " make all : synthesis and place&route" 14 | @echo " make clean : remove all temporary files except config and fpga bitfiles" 15 | @echo " make dist-clean : remove all temporary files" 16 | @echo 17 | @echo " XST is used by default, to use Synplify do 'make SYN=synplify'" 18 | @echo 19 | 20 | 21 | grxst: 22 | @pci=`grep pcicore ../../leon/device.vhd | awk '{print $$3}'` ; \ 23 | eth=`grep ethen ../../leon/device.vhd | awk '{print $$12}'` ; \ 24 | if test "$$pci" != "none"; then \ 25 | echo " ERROR: PCI is not supported for Microblaze Multimedia Board" ; \ 26 | exit 2; \ 27 | fi; \ 28 | if test "$$eth" != "false"; then make eth_top.ngc ; fi; \ 29 | if test "$$eth" = "false"; then \ 30 | echo " making leon_mblaze_xst.bit" ; \ 31 | make leon_mblaze_xst.bit; \ 32 | else \ 33 | echo " making leon_eth_mblaze_xst.bit" ; \ 34 | make leon_eth_mblaze_xst.bit; \ 35 | fi; \ 36 | 37 | grsyn: 38 | @pci=`grep pcicore ../../leon/device.vhd | awk '{print $$3}'` ; \ 39 | eth=`grep ethen ../../leon/device.vhd | awk '{print $$12}'` ; \ 40 | if test "$$pci" = "none"; then \ 41 | if test "$$eth" = "false"; then \ 42 | echo " making leon.bit" ; \ 43 | make leon.bit; \ 44 | else \ 45 | echo " making leon_eth.bit" ; \ 46 | make leon_eth.bit; \ 47 | fi; \ 48 | else \ 49 | echo " ERROR: PCI is not supported for Microblaze Multimedia Board " ; \ 50 | exit 2; \ 51 | fi; 52 | 53 | leon.edf: ../../leon/device.vhd ../../leon/device.v 54 | synplify_pro -batch leon.prj 55 | 56 | leon_eth.edf: ../../leon/device.vhd ../../leon/device.v 57 | synplify_pro -batch leon_eth.prj 58 | 59 | eth_top.ngc: ../../leon/eth_top.v ../../leon/device.v 60 | ../../syn/ise/xstmod eth_top ../../syn/verilog/ethermac.v $(DEVICE) > xst.scr 61 | xst -ifn xst.scr 62 | 63 | leon_mblaze.ngc: ../../leon/device.vhd 64 | -rm -rf xst 65 | xst -ifn ../../syn/ise/leon.xst 66 | xst -ifn leon.xst 67 | ../../syn/ise/xstrun leon_mblaze leon_mblaze.vhd $(DEVICE) > xst.scr 68 | xst -ifn xst.scr 69 | 70 | leon_eth_mblaze.ngc: ../../leon/device.vhd 71 | -rm -rf xst 72 | xst -ifn ../../syn/ise/leon.xst 73 | xst -ifn leon.xst 74 | ../../syn/ise/xstrun leon_eth_mblaze leon_eth_mblaze.vhd $(DEVICE) > xst.scr 75 | xst -ifn xst.scr 76 | 77 | leon_mblaze_xst.bit: leon_mblaze.ngc 78 | ../../syn/ise/route_ngc leon_mblaze leon.ucf $(DEVICE) $(EFFORT) 79 | 80 | leon_eth_mblaze_xst.bit: leon_eth_mblaze.ngc 81 | ../../syn/ise/route_ngc leon_eth_mblaze leon_eth.ucf $(DEVICE) $(EFFORT) 82 | 83 | leon.bit: leon.edf 84 | ../../syn/ise/route leon leon.ucf $(DEVICE) $(EFFORT) 85 | 86 | leon_eth.bit: leon_eth.edf 87 | ../../syn/ise/route leon_eth leon_eth.ucf $(DEVICE) $(EFFORT) 88 | 89 | clean: 90 | -rm -rf *.ngc *.bgn *.bld *.dly *.drc *.ll *.mrp *.msk *.ncd *.ngd \ 91 | *.ngm *.pad *.par *.pcf *.srp *.twr *.xpi *.nav *.lst *.scr \ 92 | xst *.tlg *.log *.srs *.srr *.plg *.fse *.vhm *.srm *.srd *.edf *.edn \ 93 | *.prd *.ngo *.jhd __projnav* .recordref 94 | 95 | dist-clean: clean 96 | -rm -f *.bit 97 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/billo-mblaze-xc2v/README: -------------------------------------------------------------------------------- 1 | ============================================================ 2 | Hints 3 | ============================================================ 4 | SW-0 ==> DSU enable 5 | SW-1 ==> DSU break 6 | 7 | - No reset switch is configured in this design (boards push-buttons are left unused for other applications). 8 | If you want to reset the processor, do it through dsumon. 9 | - Serial port connection should be ==> 0 X, to allow usage of both DSU and UART1 serials. 10 | - You need a serial Y-Cable. If you don't have one, refer to the website below. 11 | 12 | 13 | ============================================================ 14 | Comments or questions: 15 | ============================================================ 16 | Website howto: http://www.lsc.ic.unicamp.br/~billo/leon2_on_mblazeboard 17 | E-mail contact: Eduardo Billo - eduardo.billo@ic.unicamp.br 18 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/billo-mblaze-xc2v/bitgen.ut: -------------------------------------------------------------------------------- 1 | -g ConfigRate:4 2 | -g CclkPin:PULLUP 3 | -g TdoPin:PULLNONE 4 | -g M1Pin:PULLUP 5 | -g DonePin:PULLUP 6 | -g DriveDone:Yes 7 | -g StartUpClk:CCLK 8 | -g DONE_cycle:4 9 | -g GTS_cycle:5 10 | -g M0Pin:PULLUP 11 | -g M2Pin:PULLUP 12 | -g ProgPin:PULLUP 13 | -g TckPin:PULLUP 14 | -g TdiPin:PULLUP 15 | -g TmsPin:PULLUP 16 | -g DonePipe:No 17 | -g GWE_cycle:6 18 | -g LCK_cycle:NoWait 19 | -g Security:LEVEL1 20 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/billo-mblaze-xc2v/leon.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_mblaze" 5 | project -result_file "./leon.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/billo-mblaze-xc2v/leon.sdc: -------------------------------------------------------------------------------- 1 | 2 | define_clock -name {clk} -freq 54.0 -clockgroup default_clkgroup 3 | define_clock -name {pci_clk_in} -freq 40.000 -clockgroup pci_clkgroup 4 | define_clock -name {erx_clk} -freq 30.000 -clockgroup erx_clk_clkgroup 5 | define_clock -name {etx_clk} -freq 30.000 -clockgroup etx_clk_clkgroup 6 | 7 | define_output_delay -default 8.00 -ref clk:r 8 | define_input_delay -default 10.00 -ref clk:r 9 | define_output_delay -default 14.00 -ref pci_clk_in:r 10 | define_input_delay -default 18.00 -ref pci_clk_in:r 11 | define_output_delay -default 8.00 -ref erx_clk:r 12 | define_input_delay -default 10.00 -ref erx_clk:r 13 | define_output_delay -default 8.00 -ref etx_clk:r 14 | define_input_delay -default 10.00 -ref etx_clk:r 15 | 16 | define_global_attribute syn_useioff {1} 17 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/billo-mblaze-xc2v/leon.tcl: -------------------------------------------------------------------------------- 1 | 2 | source "../../syn/synplify/leon_files.tcl" 3 | add_file -constraint "leon.sdc" 4 | add_file -vhdl -lib work "mblaze_clkgen.vhd" 5 | add_file -vhdl -lib work "leon_mblaze.vhd" 6 | add_file -vhdl -lib work "leon_eth_mblaze.vhd" 7 | 8 | impl -add syn 9 | 10 | set_option -technology VIRTEX2 11 | set_option -part XC2V2000 12 | set_option -package FF896 13 | set_option -speed_grade -4 14 | 15 | set_option -default_enum_encoding onehot 16 | set_option -symbolic_fsm_compiler 0 17 | set_option -resource_sharing 0 18 | set_option -use_fsm_explorer 0 19 | 20 | set_option -fanout_limit 100 21 | set_option -disable_io_insertion 0 22 | set_option -pipe 1 23 | set_option -modular 0 24 | set_option -retiming 1 25 | 26 | set_option -write_verilog 0 27 | set_option -write_vhdl 0 28 | 29 | set_option -write_apr_constraint 0 30 | set_option -compiler_compatible 0 31 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/billo-mblaze-xc2v/leon.xst: -------------------------------------------------------------------------------- 1 | elaborate -ifmt vhdl -ifn mblaze_clkgen.vhd 2 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/billo-mblaze-xc2v/leon_eth.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_eth_mblaze" 5 | project -result_file "./leon_eth.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-cpci-xc2v/.recordref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/boards/gr-cpci-xc2v/.recordref -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-cpci-xc2v/bitgen.ut: -------------------------------------------------------------------------------- 1 | -g ConfigRate:4 2 | -g CclkPin:PULLUP 3 | -g TdoPin:PULLNONE 4 | -g M1Pin:PULLUP 5 | -g DonePin:PULLUP 6 | -g DriveDone:Yes 7 | -g StartUpClk:CCLK 8 | -g DONE_cycle:4 9 | -g GTS_cycle:5 10 | -g M0Pin:PULLUP 11 | -g M2Pin:PULLUP 12 | -g ProgPin:PULLUP 13 | -g TckPin:PULLUP 14 | -g TdiPin:PULLUP 15 | -g TmsPin:PULLUP 16 | -g DonePipe:No 17 | -g GWE_cycle:6 18 | -g LCK_cycle:NoWait 19 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-cpci-xc2v/leon-ise5.npl: -------------------------------------------------------------------------------- 1 | JDF F 2 | // Created by Project Navigator ver 1.0 3 | PROJECT syn 4 | DESIGN leon Normal 5 | DEVFAM virtex2 6 | DEVFAMTIME 1041788708 7 | DEVICE xc2v3000 8 | DEVICETIME 1041788708 9 | DEVPKG fg676 10 | DEVPKGTIME 1041788708 11 | DEVSPEED -4 12 | DEVSPEEDTIME 0 13 | FLOW XST VHDL 14 | FLOWTIME 1041788708 15 | MODULE ..\..\leon\ahbstat.vhd 16 | MODSTYLE ahbstat Normal 17 | MODULE ..\..\leon\dcom_uart.vhd 18 | MODSTYLE dcom_uart Normal 19 | MODULE ..\..\leon\cache.vhd 20 | MODSTYLE cache Normal 21 | MODULE ..\..\leon\fpu_lth.vhd 22 | MODSTYLE fpu_lth Normal 23 | MODULE ..\..\leon\irqctrl.vhd 24 | MODSTYLE irqctrl Normal 25 | MODULE ..\..\leon\irqctrl2.vhd 26 | MODSTYLE irqctrl2 Normal 27 | MODULE ..\..\leon\meiko.vhd 28 | MODSTYLE fpu Normal 29 | MODULE ..\..\leon\lconf.vhd 30 | MODSTYLE lconf Normal 31 | MODULE ..\..\leon\mcore.vhd 32 | MODSTYLE mcore Normal 33 | MODULE ..\..\leon\mctrl.vhd 34 | MODSTYLE mctrl Normal 35 | MODULE ..\..\leon\wprot.vhd 36 | MODSTYLE wprot Normal 37 | MODULE ..\..\leon\bprom.vhd 38 | MODSTYLE gen_bprom Normal 39 | MODULE ..\..\leon\div.vhd 40 | MODSTYLE div Normal 41 | MODULE ..\..\leon\dsu.vhd 42 | MODSTYLE dsu Normal 43 | MODULE ..\..\leon\mul.vhd 44 | MODSTYLE mul Normal 45 | MODULE ..\..\leon\ahbarb.vhd 46 | MODSTYLE ahbarb Normal 47 | MODULE ..\..\leon\dcache.vhd 48 | MODSTYLE dcache Normal 49 | MODULE ..\..\leon\icache.vhd 50 | MODSTYLE icache Normal 51 | MODULE ..\..\leon\acache.vhd 52 | MODSTYLE acache Normal 53 | MODULE ..\..\leon\cachemem.vhd 54 | MODSTYLE cachemem Normal 55 | MODULE ..\..\leon\fpu_core.vhd 56 | MODSTYLE fpu_core Normal 57 | MODULE ..\..\leon\timers.vhd 58 | MODSTYLE timers Normal 59 | MODULE ..\..\leon\ahbram.vhd 60 | MODSTYLE ahbram Normal 61 | MODULE ..\..\leon\rstgen.vhd 62 | MODSTYLE rstgen Normal 63 | MODULE ..\..\leon\ahbmst.vhd 64 | MODSTYLE ahbmst Normal 65 | MODULE ..\..\leon\dcom.vhd 66 | MODSTYLE dcom Normal 67 | MODULE ..\..\leon\proc.vhd 68 | MODSTYLE proc Normal 69 | MODULE ..\..\leon\uart.vhd 70 | MODSTYLE uart Normal 71 | MODULE ..\..\leon\apbmst.vhd 72 | MODSTYLE apbmst Normal 73 | MODULE ..\..\leon\ioport.vhd 74 | MODSTYLE ioport Normal 75 | MODULE ..\..\leon\iu.vhd 76 | MODSTYLE iu Normal 77 | MODULE ..\..\leon\dsu_mem.vhd 78 | MODSTYLE dsu_mem Normal 79 | MODULE ..\..\leon\grfpc.vhd 80 | MODSTYLE grfpc Normal 81 | MODULE ..\..\leon\sdmctrl.vhd 82 | MODSTYLE sdmctrl Normal 83 | MODULE ..\..\leon\leon.vhd 84 | MODSTYLE leon Normal 85 | LIBFILE ..\..\leon\tech_fs90.vhd work *** 86 | LIBFILE ..\..\leon\device.vhd work *** 87 | LIBFILE ..\..\leon\tech_axcel.vhd work *** 88 | LIBFILE ..\..\leon\config.vhd work *** 89 | LIBFILE ..\..\leon\mmuconfig.vhd work *** 90 | LIBFILE ..\..\leon\fpulib.vhd work *** 91 | LIBFILE ..\..\leon\target.vhd work *** 92 | LIBFILE ..\..\leon\iface.vhd work *** 93 | LIBFILE ..\..\leon\macro.vhd work *** 94 | LIBFILE ..\..\leon\tech_virtex2.vhd work *** 95 | LIBFILE ..\..\leon\amba.vhd work *** 96 | LIBFILE ..\..\leon\tech_tsmc25.vhd work *** 97 | LIBFILE ..\..\leon\tech_map.vhd work *** 98 | LIBFILE ..\..\leon\ambacomp.vhd work *** 99 | LIBFILE ..\..\leon\tech_generic.vhd work *** 100 | LIBFILE ..\..\leon\tech_proasic.vhd work *** 101 | LIBFILE ..\..\leon\tech_atc25.vhd work *** 102 | LIBFILE ..\..\leon\tech_atc35.vhd work *** 103 | LIBFILE ..\..\leon\tech_atc18.vhd work *** 104 | LIBFILE ..\..\leon\multlib.vhd work *** 105 | LIBFILE ..\..\leon\tech_virtex.vhd work *** 106 | LIBFILE ..\..\leon\sparcv8.vhd work *** 107 | LIBFILE ..\..\leon\tech_umc18.vhd work *** 108 | DEPASSOC leon leon.ucf Normal 109 | [Normal] 110 | p_SimModelTarget=xstvhd, virtexe, VHDL.t_postMapSimModel, 1041792828, Modelsim_VHDL 111 | [STRATEGY-LIST] 112 | Normal=True 113 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-cpci-xc2v/leon-ise6.npl: -------------------------------------------------------------------------------- 1 | JDF G 2 | // Converted from an earlier version by Project Navigator version 5 3 | PROJECT syn 4 | DESIGN leon Normal 5 | DEVFAM virtex2 6 | DEVFAMTIME 1041788708 7 | DEVICE xc2v3000 8 | DEVICETIME 1041788708 9 | DEVPKG fg676 10 | DEVPKGTIME 1041788708 11 | DEVSPEED -4 12 | DEVSPEEDTIME 0 13 | DEVTOPLEVELMODULETYPE HDL 14 | TOPLEVELMODULETYPETIME 0 15 | DEVSYNTHESISTOOL XST (VHDL/Verilog) 16 | SYNTHESISTOOLTIME 0 17 | DEVSIMULATOR Modelsim 18 | SIMULATORTIME 0 19 | DEVGENERATEDSIMULATIONMODEL VHDL 20 | GENERATEDSIMULATIONMODELTIME 0 21 | MODULE ../../leon/ahbstat.vhd 22 | MODSTYLE ahbstat Normal 23 | MODULE ../../leon/dcom_uart.vhd 24 | MODSTYLE dcom_uart Normal 25 | MODULE ../../leon/cache.vhd 26 | MODSTYLE cache Normal 27 | MODULE ../../leon/fpu_lth.vhd 28 | MODSTYLE fpu_lth Normal 29 | MODULE ../../leon/irqctrl.vhd 30 | MODSTYLE irqctrl Normal 31 | MODULE ../../leon/irqctrl2.vhd 32 | MODSTYLE irqctrl2 Normal 33 | MODULE ../../leon/meiko.vhd 34 | MODSTYLE fpu Normal 35 | MODULE ../../leon/lconf.vhd 36 | MODSTYLE lconf Normal 37 | MODULE ../../leon/mcore.vhd 38 | MODSTYLE mcore Normal 39 | MODULE ../../leon/mctrl.vhd 40 | MODSTYLE mctrl Normal 41 | MODULE ../../leon/wprot.vhd 42 | MODSTYLE wprot Normal 43 | MODULE ../../leon/bprom.vhd 44 | MODSTYLE gen_bprom Normal 45 | MODULE ../../leon/div.vhd 46 | MODSTYLE div Normal 47 | MODULE ../../leon/dsu.vhd 48 | MODSTYLE dsu Normal 49 | MODULE ../../leon/mul.vhd 50 | MODSTYLE mul Normal 51 | MODULE ../../leon/ahbarb.vhd 52 | MODSTYLE ahbarb Normal 53 | MODULE ../../leon/dcache.vhd 54 | MODSTYLE dcache Normal 55 | MODULE ../../leon/icache.vhd 56 | MODSTYLE icache Normal 57 | MODULE ../../leon/acache.vhd 58 | MODSTYLE acache Normal 59 | MODULE ../../leon/cachemem.vhd 60 | MODSTYLE cachemem Normal 61 | MODULE ../../leon/fpu_core.vhd 62 | MODSTYLE fpu_core Normal 63 | MODULE ../../leon/timers.vhd 64 | MODSTYLE timers Normal 65 | MODULE ../../leon/ahbram.vhd 66 | MODSTYLE ahbram Normal 67 | MODULE ../../leon/rstgen.vhd 68 | MODSTYLE rstgen Normal 69 | MODULE ../../leon/ahbmst.vhd 70 | MODSTYLE ahbmst Normal 71 | MODULE ../../leon/dcom.vhd 72 | MODSTYLE dcom Normal 73 | MODULE ../../leon/proc.vhd 74 | MODSTYLE proc Normal 75 | MODULE ../../leon/uart.vhd 76 | MODSTYLE uart Normal 77 | MODULE ../../leon/apbmst.vhd 78 | MODSTYLE apbmst Normal 79 | MODULE ../../leon/ioport.vhd 80 | MODSTYLE ioport Normal 81 | MODULE ../../leon/iu.vhd 82 | MODSTYLE iu Normal 83 | MODULE ../../leon/dsu_mem.vhd 84 | MODSTYLE dsu_mem Normal 85 | MODULE ../../leon/grfpc.vhd 86 | MODSTYLE grfpc Normal 87 | MODULE ../../leon/sdmctrl.vhd 88 | MODSTYLE sdmctrl Normal 89 | MODULE ../../leon/leon.vhd 90 | MODSTYLE leon Normal 91 | LIBFILE ../../leon/tech_fs90.vhd work *** 92 | LIBFILE ../../leon/device.vhd work *** 93 | LIBFILE ../../leon/tech_axcel.vhd work *** 94 | LIBFILE ../../leon/config.vhd work *** 95 | LIBFILE ../../leon/mmuconfig.vhd work *** 96 | LIBFILE ../../leon/fpulib.vhd work *** 97 | LIBFILE ../../leon/target.vhd work *** 98 | LIBFILE ../../leon/iface.vhd work *** 99 | LIBFILE ../../leon/macro.vhd work *** 100 | LIBFILE ../../leon/tech_virtex2.vhd work *** 101 | LIBFILE ../../leon/amba.vhd work *** 102 | LIBFILE ../../leon/tech_tsmc25.vhd work *** 103 | LIBFILE ../../leon/tech_map.vhd work *** 104 | LIBFILE ../../leon/ambacomp.vhd work *** 105 | LIBFILE ../../leon/tech_generic.vhd work *** 106 | LIBFILE ../../leon/tech_proasic.vhd work *** 107 | LIBFILE ../../leon/tech_atc25.vhd work *** 108 | LIBFILE ../../leon/tech_atc35.vhd work *** 109 | LIBFILE ../../leon/tech_atc18.vhd work *** 110 | LIBFILE ../../leon/multlib.vhd work *** 111 | LIBFILE ../../leon/tech_virtex.vhd work *** 112 | LIBFILE ../../leon/sparcv8.vhd work *** 113 | LIBFILE ../../leon/tech_umc18.vhd work *** 114 | DEPASSOC leon leon.ucf Normal 115 | [Normal] 116 | p_SimModelTarget=xstvhd, virtexe, VHDL.t_postMapSimModel, 1041792828, Modelsim_VHDL 117 | [STRATEGY-LIST] 118 | Normal=True 119 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-cpci-xc2v/leon.npl: -------------------------------------------------------------------------------- 1 | JDF F 2 | // Created by Project Navigator ver 1.0 3 | PROJECT syn 4 | DESIGN leon Normal 5 | DEVFAM virtex2 6 | DEVFAMTIME 1041788708 7 | DEVICE xc2v3000 8 | DEVICETIME 1041788708 9 | DEVPKG fg676 10 | DEVPKGTIME 1041788708 11 | DEVSPEED -4 12 | DEVSPEEDTIME 0 13 | FLOW XST VHDL 14 | FLOWTIME 1041788708 15 | MODULE ..\..\leon\ahbstat.vhd 16 | MODSTYLE ahbstat Normal 17 | MODULE ..\..\leon\dcom_uart.vhd 18 | MODSTYLE dcom_uart Normal 19 | MODULE ..\..\leon\cache.vhd 20 | MODSTYLE cache Normal 21 | MODULE ..\..\leon\fpu_lth.vhd 22 | MODSTYLE fpu_lth Normal 23 | MODULE ..\..\leon\irqctrl.vhd 24 | MODSTYLE irqctrl Normal 25 | MODULE ..\..\leon\irqctrl2.vhd 26 | MODSTYLE irqctrl2 Normal 27 | MODULE ..\..\leon\meiko.vhd 28 | MODSTYLE fpu Normal 29 | MODULE ..\..\leon\lconf.vhd 30 | MODSTYLE lconf Normal 31 | MODULE ..\..\leon\mcore.vhd 32 | MODSTYLE mcore Normal 33 | MODULE ..\..\leon\mctrl.vhd 34 | MODSTYLE mctrl Normal 35 | MODULE ..\..\leon\wprot.vhd 36 | MODSTYLE wprot Normal 37 | MODULE ..\..\leon\bprom.vhd 38 | MODSTYLE gen_bprom Normal 39 | MODULE ..\..\leon\div.vhd 40 | MODSTYLE div Normal 41 | MODULE ..\..\leon\dsu.vhd 42 | MODSTYLE dsu Normal 43 | MODULE ..\..\leon\mul.vhd 44 | MODSTYLE mul Normal 45 | MODULE ..\..\leon\ahbarb.vhd 46 | MODSTYLE ahbarb Normal 47 | MODULE ..\..\leon\dcache.vhd 48 | MODSTYLE dcache Normal 49 | MODULE ..\..\leon\icache.vhd 50 | MODSTYLE icache Normal 51 | MODULE ..\..\leon\acache.vhd 52 | MODSTYLE acache Normal 53 | MODULE ..\..\leon\cachemem.vhd 54 | MODSTYLE cachemem Normal 55 | MODULE ..\..\leon\fpu_core.vhd 56 | MODSTYLE fpu_core Normal 57 | MODULE ..\..\leon\timers.vhd 58 | MODSTYLE timers Normal 59 | MODULE ..\..\leon\ahbram.vhd 60 | MODSTYLE ahbram Normal 61 | MODULE ..\..\leon\rstgen.vhd 62 | MODSTYLE rstgen Normal 63 | MODULE ..\..\leon\ahbmst.vhd 64 | MODSTYLE ahbmst Normal 65 | MODULE ..\..\leon\dcom.vhd 66 | MODSTYLE dcom Normal 67 | MODULE ..\..\leon\proc.vhd 68 | MODSTYLE proc Normal 69 | MODULE ..\..\leon\uart.vhd 70 | MODSTYLE uart Normal 71 | MODULE ..\..\leon\apbmst.vhd 72 | MODSTYLE apbmst Normal 73 | MODULE ..\..\leon\ioport.vhd 74 | MODSTYLE ioport Normal 75 | MODULE ..\..\leon\iu.vhd 76 | MODSTYLE iu Normal 77 | MODULE ..\..\leon\dsu_mem.vhd 78 | MODSTYLE dsu_mem Normal 79 | MODULE ..\..\leon\grfpc.vhd 80 | MODSTYLE grfpc Normal 81 | MODULE ..\..\leon\sdmctrl.vhd 82 | MODSTYLE sdmctrl Normal 83 | MODULE ..\..\leon\leon.vhd 84 | MODSTYLE leon Normal 85 | LIBFILE ..\..\leon\tech_fs90.vhd work *** 86 | LIBFILE ..\..\leon\device.vhd work *** 87 | LIBFILE ..\..\leon\tech_axcel.vhd work *** 88 | LIBFILE ..\..\leon\config.vhd work *** 89 | LIBFILE ..\..\leon\mmuconfig.vhd work *** 90 | LIBFILE ..\..\leon\fpulib.vhd work *** 91 | LIBFILE ..\..\leon\target.vhd work *** 92 | LIBFILE ..\..\leon\iface.vhd work *** 93 | LIBFILE ..\..\leon\macro.vhd work *** 94 | LIBFILE ..\..\leon\tech_virtex2.vhd work *** 95 | LIBFILE ..\..\leon\amba.vhd work *** 96 | LIBFILE ..\..\leon\tech_tsmc25.vhd work *** 97 | LIBFILE ..\..\leon\tech_map.vhd work *** 98 | LIBFILE ..\..\leon\ambacomp.vhd work *** 99 | LIBFILE ..\..\leon\tech_generic.vhd work *** 100 | LIBFILE ..\..\leon\tech_proasic.vhd work *** 101 | LIBFILE ..\..\leon\tech_atc25.vhd work *** 102 | LIBFILE ..\..\leon\tech_atc35.vhd work *** 103 | LIBFILE ..\..\leon\tech_atc18.vhd work *** 104 | LIBFILE ..\..\leon\multlib.vhd work *** 105 | LIBFILE ..\..\leon\tech_virtex.vhd work *** 106 | LIBFILE ..\..\leon\sparcv8.vhd work *** 107 | LIBFILE ..\..\leon\tech_umc18.vhd work *** 108 | DEPASSOC leon leon.ucf Normal 109 | [Normal] 110 | p_SimModelTarget=xstvhd, virtexe, VHDL.t_postMapSimModel, 1041792828, Modelsim_VHDL 111 | [STRATEGY-LIST] 112 | Normal=True 113 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-cpci-xc2v/leon.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon" 5 | project -result_file "./leon.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-cpci-xc2v/leon.sdc: -------------------------------------------------------------------------------- 1 | 2 | define_clock -name {clk} -freq 50.0 -clockgroup default_clkgroup 3 | define_clock -name {pciclk} -freq 40.000 -clockgroup pci_clkgroup 4 | define_clock -name {erx_clk} -freq 30.000 -clockgroup erx_clk_clkgroup 5 | define_clock -name {etx_clk} -freq 30.000 -clockgroup etx_clk_clkgroup 6 | 7 | define_output_delay -default 14.00 -ref pciclk:r 8 | define_input_delay -default 18.00 -ref pciclk:r 9 | 10 | #define_output_delay -default 8.00 -ref erx_clk:r 11 | #define_input_delay -default 10.00 -ref erx_clk:r 12 | #define_output_delay -default 8.00 -ref etx_clk:r 13 | #define_input_delay -default 10.00 -ref etx_clk:r 14 | 15 | define_global_attribute syn_useioff {1} 16 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-cpci-xc2v/leon.tcl: -------------------------------------------------------------------------------- 1 | 2 | source "../../syn/synplify/leon_files.tcl" 3 | add_file -constraint "leon.sdc" 4 | 5 | impl -add syn 6 | 7 | set_option -technology VIRTEX2 8 | set_option -part XC2V6000 9 | set_option -package BF957 10 | set_option -speed_grade -4 11 | 12 | set_option -default_enum_encoding onehot 13 | set_option -symbolic_fsm_compiler 0 14 | set_option -resource_sharing 0 15 | set_option -use_fsm_explorer 0 16 | 17 | set_option -frequency 50.000 18 | set_option -fanout_limit 100 19 | set_option -disable_io_insertion 0 20 | set_option -pipe 0 21 | set_option -modular 0 22 | set_option -retiming 0 23 | 24 | set_option -write_verilog 0 25 | set_option -write_vhdl 0 26 | 27 | set_option -write_apr_constraint 0 28 | set_option -compiler_compatible 0 29 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-cpci-xc2v/leon_eth.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_eth" 5 | project -result_file "./leon_eth.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-cpci-xc2v/leon_eth_pci.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_eth_pci" 5 | project -result_file "./leon_eth_pci.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-cpci-xc2v/leon_pci.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_pci" 5 | project -result_file "./leon_pci.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-pci-xc2v/.recordref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/boards/gr-pci-xc2v/.recordref -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-pci-xc2v/bitgen.ut: -------------------------------------------------------------------------------- 1 | -g ConfigRate:4 2 | -g CclkPin:PULLUP 3 | -g TdoPin:PULLNONE 4 | -g M1Pin:PULLUP 5 | -g DonePin:PULLUP 6 | -g DriveDone:Yes 7 | -g StartUpClk:CCLK 8 | -g DONE_cycle:4 9 | -g GTS_cycle:5 10 | -g M0Pin:PULLUP 11 | -g M2Pin:PULLUP 12 | -g ProgPin:PULLUP 13 | -g TckPin:PULLUP 14 | -g TdiPin:PULLUP 15 | -g TmsPin:PULLUP 16 | -g DonePipe:No 17 | -g GWE_cycle:6 18 | -g LCK_cycle:NoWait 19 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-pci-xc2v/leon-ise5.npl: -------------------------------------------------------------------------------- 1 | JDF F 2 | // Created by Project Navigator ver 1.0 3 | PROJECT syn 4 | DESIGN leon Normal 5 | DEVFAM virtex2 6 | DEVFAMTIME 1041788708 7 | DEVICE xc2v3000 8 | DEVICETIME 1041788708 9 | DEVPKG fg676 10 | DEVPKGTIME 1041788708 11 | DEVSPEED -4 12 | DEVSPEEDTIME 0 13 | FLOW XST VHDL 14 | FLOWTIME 1041788708 15 | MODULE ..\..\leon\ahbstat.vhd 16 | MODSTYLE ahbstat Normal 17 | MODULE ..\..\leon\dcom_uart.vhd 18 | MODSTYLE dcom_uart Normal 19 | MODULE ..\..\leon\cache.vhd 20 | MODSTYLE cache Normal 21 | MODULE ..\..\leon\fpu_lth.vhd 22 | MODSTYLE fpu_lth Normal 23 | MODULE ..\..\leon\irqctrl.vhd 24 | MODSTYLE irqctrl Normal 25 | MODULE ..\..\leon\irqctrl2.vhd 26 | MODSTYLE irqctrl2 Normal 27 | MODULE ..\..\leon\meiko.vhd 28 | MODSTYLE fpu Normal 29 | MODULE ..\..\leon\lconf.vhd 30 | MODSTYLE lconf Normal 31 | MODULE ..\..\leon\mcore.vhd 32 | MODSTYLE mcore Normal 33 | MODULE ..\..\leon\mctrl.vhd 34 | MODSTYLE mctrl Normal 35 | MODULE ..\..\leon\wprot.vhd 36 | MODSTYLE wprot Normal 37 | MODULE ..\..\leon\bprom.vhd 38 | MODSTYLE gen_bprom Normal 39 | MODULE ..\..\leon\div.vhd 40 | MODSTYLE div Normal 41 | MODULE ..\..\leon\dsu.vhd 42 | MODSTYLE dsu Normal 43 | MODULE ..\..\leon\mul.vhd 44 | MODSTYLE mul Normal 45 | MODULE ..\..\leon\ahbarb.vhd 46 | MODSTYLE ahbarb Normal 47 | MODULE ..\..\leon\dcache.vhd 48 | MODSTYLE dcache Normal 49 | MODULE ..\..\leon\icache.vhd 50 | MODSTYLE icache Normal 51 | MODULE ..\..\leon\acache.vhd 52 | MODSTYLE acache Normal 53 | MODULE ..\..\leon\cachemem.vhd 54 | MODSTYLE cachemem Normal 55 | MODULE ..\..\leon\fpu_core.vhd 56 | MODSTYLE fpu_core Normal 57 | MODULE ..\..\leon\timers.vhd 58 | MODSTYLE timers Normal 59 | MODULE ..\..\leon\ahbram.vhd 60 | MODSTYLE ahbram Normal 61 | MODULE ..\..\leon\rstgen.vhd 62 | MODSTYLE rstgen Normal 63 | MODULE ..\..\leon\ahbmst.vhd 64 | MODSTYLE ahbmst Normal 65 | MODULE ..\..\leon\dcom.vhd 66 | MODSTYLE dcom Normal 67 | MODULE ..\..\leon\proc.vhd 68 | MODSTYLE proc Normal 69 | MODULE ..\..\leon\uart.vhd 70 | MODSTYLE uart Normal 71 | MODULE ..\..\leon\apbmst.vhd 72 | MODSTYLE apbmst Normal 73 | MODULE ..\..\leon\ioport.vhd 74 | MODSTYLE ioport Normal 75 | MODULE ..\..\leon\iu.vhd 76 | MODSTYLE iu Normal 77 | MODULE ..\..\leon\dsu_mem.vhd 78 | MODSTYLE dsu_mem Normal 79 | MODULE ..\..\leon\grfpc.vhd 80 | MODSTYLE grfpc Normal 81 | MODULE ..\..\leon\sdmctrl.vhd 82 | MODSTYLE sdmctrl Normal 83 | MODULE ..\..\leon\leon.vhd 84 | MODSTYLE leon Normal 85 | LIBFILE ..\..\leon\tech_fs90.vhd work *** 86 | LIBFILE ..\..\leon\device.vhd work *** 87 | LIBFILE ..\..\leon\tech_axcel.vhd work *** 88 | LIBFILE ..\..\leon\config.vhd work *** 89 | LIBFILE ..\..\leon\mmuconfig.vhd work *** 90 | LIBFILE ..\..\leon\fpulib.vhd work *** 91 | LIBFILE ..\..\leon\target.vhd work *** 92 | LIBFILE ..\..\leon\iface.vhd work *** 93 | LIBFILE ..\..\leon\macro.vhd work *** 94 | LIBFILE ..\..\leon\tech_virtex2.vhd work *** 95 | LIBFILE ..\..\leon\amba.vhd work *** 96 | LIBFILE ..\..\leon\tech_tsmc25.vhd work *** 97 | LIBFILE ..\..\leon\tech_map.vhd work *** 98 | LIBFILE ..\..\leon\ambacomp.vhd work *** 99 | LIBFILE ..\..\leon\tech_generic.vhd work *** 100 | LIBFILE ..\..\leon\tech_proasic.vhd work *** 101 | LIBFILE ..\..\leon\tech_atc25.vhd work *** 102 | LIBFILE ..\..\leon\tech_atc35.vhd work *** 103 | LIBFILE ..\..\leon\tech_atc18.vhd work *** 104 | LIBFILE ..\..\leon\multlib.vhd work *** 105 | LIBFILE ..\..\leon\tech_virtex.vhd work *** 106 | LIBFILE ..\..\leon\sparcv8.vhd work *** 107 | LIBFILE ..\..\leon\tech_umc18.vhd work *** 108 | DEPASSOC leon leon.ucf Normal 109 | [Normal] 110 | p_SimModelTarget=xstvhd, virtexe, VHDL.t_postMapSimModel, 1041792828, Modelsim_VHDL 111 | [STRATEGY-LIST] 112 | Normal=True 113 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-pci-xc2v/leon-ise6.npl: -------------------------------------------------------------------------------- 1 | JDF G 2 | // Converted from an earlier version by Project Navigator version 5 3 | PROJECT syn 4 | DESIGN leon Normal 5 | DEVFAM virtex2 6 | DEVFAMTIME 1041788708 7 | DEVICE xc2v3000 8 | DEVICETIME 1041788708 9 | DEVPKG fg676 10 | DEVPKGTIME 1041788708 11 | DEVSPEED -4 12 | DEVSPEEDTIME 0 13 | DEVTOPLEVELMODULETYPE HDL 14 | TOPLEVELMODULETYPETIME 0 15 | DEVSYNTHESISTOOL XST (VHDL/Verilog) 16 | SYNTHESISTOOLTIME 0 17 | DEVSIMULATOR Modelsim 18 | SIMULATORTIME 0 19 | DEVGENERATEDSIMULATIONMODEL VHDL 20 | GENERATEDSIMULATIONMODELTIME 0 21 | MODULE ../../leon/ahbstat.vhd 22 | MODSTYLE ahbstat Normal 23 | MODULE ../../leon/dcom_uart.vhd 24 | MODSTYLE dcom_uart Normal 25 | MODULE ../../leon/cache.vhd 26 | MODSTYLE cache Normal 27 | MODULE ../../leon/fpu_lth.vhd 28 | MODSTYLE fpu_lth Normal 29 | MODULE ../../leon/irqctrl.vhd 30 | MODSTYLE irqctrl Normal 31 | MODULE ../../leon/irqctrl2.vhd 32 | MODSTYLE irqctrl2 Normal 33 | MODULE ../../leon/meiko.vhd 34 | MODSTYLE fpu Normal 35 | MODULE ../../leon/lconf.vhd 36 | MODSTYLE lconf Normal 37 | MODULE ../../leon/mcore.vhd 38 | MODSTYLE mcore Normal 39 | MODULE ../../leon/mctrl.vhd 40 | MODSTYLE mctrl Normal 41 | MODULE ../../leon/wprot.vhd 42 | MODSTYLE wprot Normal 43 | MODULE ../../leon/bprom.vhd 44 | MODSTYLE gen_bprom Normal 45 | MODULE ../../leon/div.vhd 46 | MODSTYLE div Normal 47 | MODULE ../../leon/dsu.vhd 48 | MODSTYLE dsu Normal 49 | MODULE ../../leon/mul.vhd 50 | MODSTYLE mul Normal 51 | MODULE ../../leon/ahbarb.vhd 52 | MODSTYLE ahbarb Normal 53 | MODULE ../../leon/dcache.vhd 54 | MODSTYLE dcache Normal 55 | MODULE ../../leon/icache.vhd 56 | MODSTYLE icache Normal 57 | MODULE ../../leon/acache.vhd 58 | MODSTYLE acache Normal 59 | MODULE ../../leon/cachemem.vhd 60 | MODSTYLE cachemem Normal 61 | MODULE ../../leon/fpu_core.vhd 62 | MODSTYLE fpu_core Normal 63 | MODULE ../../leon/timers.vhd 64 | MODSTYLE timers Normal 65 | MODULE ../../leon/ahbram.vhd 66 | MODSTYLE ahbram Normal 67 | MODULE ../../leon/rstgen.vhd 68 | MODSTYLE rstgen Normal 69 | MODULE ../../leon/ahbmst.vhd 70 | MODSTYLE ahbmst Normal 71 | MODULE ../../leon/dcom.vhd 72 | MODSTYLE dcom Normal 73 | MODULE ../../leon/proc.vhd 74 | MODSTYLE proc Normal 75 | MODULE ../../leon/uart.vhd 76 | MODSTYLE uart Normal 77 | MODULE ../../leon/apbmst.vhd 78 | MODSTYLE apbmst Normal 79 | MODULE ../../leon/ioport.vhd 80 | MODSTYLE ioport Normal 81 | MODULE ../../leon/iu.vhd 82 | MODSTYLE iu Normal 83 | MODULE ../../leon/dsu_mem.vhd 84 | MODSTYLE dsu_mem Normal 85 | MODULE ../../leon/grfpc.vhd 86 | MODSTYLE grfpc Normal 87 | MODULE ../../leon/sdmctrl.vhd 88 | MODSTYLE sdmctrl Normal 89 | MODULE ../../leon/leon.vhd 90 | MODSTYLE leon Normal 91 | LIBFILE ../../leon/tech_fs90.vhd work *** 92 | LIBFILE ../../leon/device.vhd work *** 93 | LIBFILE ../../leon/tech_axcel.vhd work *** 94 | LIBFILE ../../leon/config.vhd work *** 95 | LIBFILE ../../leon/mmuconfig.vhd work *** 96 | LIBFILE ../../leon/fpulib.vhd work *** 97 | LIBFILE ../../leon/target.vhd work *** 98 | LIBFILE ../../leon/iface.vhd work *** 99 | LIBFILE ../../leon/macro.vhd work *** 100 | LIBFILE ../../leon/tech_virtex2.vhd work *** 101 | LIBFILE ../../leon/amba.vhd work *** 102 | LIBFILE ../../leon/tech_tsmc25.vhd work *** 103 | LIBFILE ../../leon/tech_map.vhd work *** 104 | LIBFILE ../../leon/ambacomp.vhd work *** 105 | LIBFILE ../../leon/tech_generic.vhd work *** 106 | LIBFILE ../../leon/tech_proasic.vhd work *** 107 | LIBFILE ../../leon/tech_atc25.vhd work *** 108 | LIBFILE ../../leon/tech_atc35.vhd work *** 109 | LIBFILE ../../leon/tech_atc18.vhd work *** 110 | LIBFILE ../../leon/multlib.vhd work *** 111 | LIBFILE ../../leon/tech_virtex.vhd work *** 112 | LIBFILE ../../leon/sparcv8.vhd work *** 113 | LIBFILE ../../leon/tech_umc18.vhd work *** 114 | DEPASSOC leon leon.ucf Normal 115 | [Normal] 116 | p_SimModelTarget=xstvhd, virtexe, VHDL.t_postMapSimModel, 1041792828, Modelsim_VHDL 117 | [STRATEGY-LIST] 118 | Normal=True 119 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-pci-xc2v/leon.npl: -------------------------------------------------------------------------------- 1 | JDF F 2 | // Created by Project Navigator ver 1.0 3 | PROJECT syn 4 | DESIGN leon Normal 5 | DEVFAM virtex2 6 | DEVFAMTIME 1041788708 7 | DEVICE xc2v3000 8 | DEVICETIME 1041788708 9 | DEVPKG fg676 10 | DEVPKGTIME 1041788708 11 | DEVSPEED -4 12 | DEVSPEEDTIME 0 13 | FLOW XST VHDL 14 | FLOWTIME 1041788708 15 | MODULE ..\..\leon\ahbstat.vhd 16 | MODSTYLE ahbstat Normal 17 | MODULE ..\..\leon\dcom_uart.vhd 18 | MODSTYLE dcom_uart Normal 19 | MODULE ..\..\leon\cache.vhd 20 | MODSTYLE cache Normal 21 | MODULE ..\..\leon\fpu_lth.vhd 22 | MODSTYLE fpu_lth Normal 23 | MODULE ..\..\leon\irqctrl.vhd 24 | MODSTYLE irqctrl Normal 25 | MODULE ..\..\leon\irqctrl2.vhd 26 | MODSTYLE irqctrl2 Normal 27 | MODULE ..\..\leon\meiko.vhd 28 | MODSTYLE fpu Normal 29 | MODULE ..\..\leon\lconf.vhd 30 | MODSTYLE lconf Normal 31 | MODULE ..\..\leon\mcore.vhd 32 | MODSTYLE mcore Normal 33 | MODULE ..\..\leon\mctrl.vhd 34 | MODSTYLE mctrl Normal 35 | MODULE ..\..\leon\wprot.vhd 36 | MODSTYLE wprot Normal 37 | MODULE ..\..\leon\bprom.vhd 38 | MODSTYLE gen_bprom Normal 39 | MODULE ..\..\leon\div.vhd 40 | MODSTYLE div Normal 41 | MODULE ..\..\leon\dsu.vhd 42 | MODSTYLE dsu Normal 43 | MODULE ..\..\leon\mul.vhd 44 | MODSTYLE mul Normal 45 | MODULE ..\..\leon\ahbarb.vhd 46 | MODSTYLE ahbarb Normal 47 | MODULE ..\..\leon\dcache.vhd 48 | MODSTYLE dcache Normal 49 | MODULE ..\..\leon\icache.vhd 50 | MODSTYLE icache Normal 51 | MODULE ..\..\leon\acache.vhd 52 | MODSTYLE acache Normal 53 | MODULE ..\..\leon\cachemem.vhd 54 | MODSTYLE cachemem Normal 55 | MODULE ..\..\leon\fpu_core.vhd 56 | MODSTYLE fpu_core Normal 57 | MODULE ..\..\leon\timers.vhd 58 | MODSTYLE timers Normal 59 | MODULE ..\..\leon\ahbram.vhd 60 | MODSTYLE ahbram Normal 61 | MODULE ..\..\leon\rstgen.vhd 62 | MODSTYLE rstgen Normal 63 | MODULE ..\..\leon\ahbmst.vhd 64 | MODSTYLE ahbmst Normal 65 | MODULE ..\..\leon\dcom.vhd 66 | MODSTYLE dcom Normal 67 | MODULE ..\..\leon\proc.vhd 68 | MODSTYLE proc Normal 69 | MODULE ..\..\leon\uart.vhd 70 | MODSTYLE uart Normal 71 | MODULE ..\..\leon\apbmst.vhd 72 | MODSTYLE apbmst Normal 73 | MODULE ..\..\leon\ioport.vhd 74 | MODSTYLE ioport Normal 75 | MODULE ..\..\leon\iu.vhd 76 | MODSTYLE iu Normal 77 | MODULE ..\..\leon\dsu_mem.vhd 78 | MODSTYLE dsu_mem Normal 79 | MODULE ..\..\leon\grfpc.vhd 80 | MODSTYLE grfpc Normal 81 | MODULE ..\..\leon\sdmctrl.vhd 82 | MODSTYLE sdmctrl Normal 83 | MODULE ..\..\leon\leon.vhd 84 | MODSTYLE leon Normal 85 | LIBFILE ..\..\leon\tech_fs90.vhd work *** 86 | LIBFILE ..\..\leon\device.vhd work *** 87 | LIBFILE ..\..\leon\tech_axcel.vhd work *** 88 | LIBFILE ..\..\leon\config.vhd work *** 89 | LIBFILE ..\..\leon\mmuconfig.vhd work *** 90 | LIBFILE ..\..\leon\fpulib.vhd work *** 91 | LIBFILE ..\..\leon\target.vhd work *** 92 | LIBFILE ..\..\leon\iface.vhd work *** 93 | LIBFILE ..\..\leon\macro.vhd work *** 94 | LIBFILE ..\..\leon\tech_virtex2.vhd work *** 95 | LIBFILE ..\..\leon\amba.vhd work *** 96 | LIBFILE ..\..\leon\tech_tsmc25.vhd work *** 97 | LIBFILE ..\..\leon\tech_map.vhd work *** 98 | LIBFILE ..\..\leon\ambacomp.vhd work *** 99 | LIBFILE ..\..\leon\tech_generic.vhd work *** 100 | LIBFILE ..\..\leon\tech_proasic.vhd work *** 101 | LIBFILE ..\..\leon\tech_atc25.vhd work *** 102 | LIBFILE ..\..\leon\tech_atc35.vhd work *** 103 | LIBFILE ..\..\leon\tech_atc18.vhd work *** 104 | LIBFILE ..\..\leon\multlib.vhd work *** 105 | LIBFILE ..\..\leon\tech_virtex.vhd work *** 106 | LIBFILE ..\..\leon\sparcv8.vhd work *** 107 | LIBFILE ..\..\leon\tech_umc18.vhd work *** 108 | DEPASSOC leon leon.ucf Normal 109 | [Normal] 110 | p_SimModelTarget=xstvhd, virtexe, VHDL.t_postMapSimModel, 1041792828, Modelsim_VHDL 111 | [STRATEGY-LIST] 112 | Normal=True 113 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-pci-xc2v/leon.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon" 5 | project -result_file "./leon.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-pci-xc2v/leon.sdc: -------------------------------------------------------------------------------- 1 | 2 | define_clock -name {clk} -freq 50.0 -clockgroup default_clkgroup 3 | define_clock -name {pciclk} -freq 40.000 -clockgroup pci_clkgroup 4 | define_clock -name {erx_clk} -freq 30.000 -clockgroup erx_clk_clkgroup 5 | define_clock -name {etx_clk} -freq 30.000 -clockgroup etx_clk_clkgroup 6 | 7 | define_output_delay -default 8.00 -ref clk:r 8 | define_input_delay -default 10.00 -ref clk:r 9 | define_output_delay -default 14.00 -ref pciclk:r 10 | define_input_delay -default 18.00 -ref pciclk:r 11 | define_output_delay -default 8.00 -ref erx_clk:r 12 | define_input_delay -default 10.00 -ref erx_clk:r 13 | define_output_delay -default 8.00 -ref etx_clk:r 14 | define_input_delay -default 10.00 -ref etx_clk:r 15 | 16 | define_global_attribute syn_useioff {1} 17 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-pci-xc2v/leon.tcl: -------------------------------------------------------------------------------- 1 | 2 | source "../../syn/synplify/leon_files.tcl" 3 | add_file -constraint "leon.sdc" 4 | 5 | impl -add syn 6 | 7 | set_option -technology VIRTEX2 8 | set_option -part XC2V3000 9 | set_option -package FG676 10 | set_option -speed_grade -4 11 | 12 | set_option -default_enum_encoding onehot 13 | set_option -symbolic_fsm_compiler 0 14 | set_option -resource_sharing 0 15 | set_option -use_fsm_explorer 0 16 | 17 | set_option -frequency 50.000 18 | set_option -fanout_limit 100 19 | set_option -disable_io_insertion 0 20 | set_option -pipe 0 21 | set_option -modular 0 22 | set_option -retiming 0 23 | 24 | set_option -write_verilog 0 25 | set_option -write_vhdl 0 26 | 27 | set_option -write_apr_constraint 0 28 | set_option -compiler_compatible 0 29 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-pci-xc2v/leon_eth.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_eth" 5 | project -result_file "./leon_eth.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-pci-xc2v/leon_eth_pci.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_eth_pci" 5 | project -result_file "./leon_eth_pci.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-pci-xc2v/leon_pci.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_pci" 5 | project -result_file "./leon_pci.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-pci-xc2v/prom.cmd: -------------------------------------------------------------------------------- 1 | setPreference -pref UserLevel:NOVICE 2 | setPreference -pref MessageLevel:DETAILED 3 | setPreference -pref ConcurrentMode:FALSE 4 | setPreference -pref UseHighz:FALSE 5 | setPreference -pref ConfigOnFailure:STOP 6 | setPreference -pref StartupCLock:AUTO_CORRECTION 7 | setPreference -pref AutoSignature:FALSE 8 | setPreference -pref KeepSVF:FALSE 9 | setPreference -pref svfUseTime:FALSE 10 | setPreference -pref UserLevel:NOVICE 11 | setPreference -pref MessageLevel:DETAILED 12 | setPreference -pref ConcurrentMode:FALSE 13 | setPreference -pref UseHighz:FALSE 14 | setPreference -pref ConfigOnFailure:STOP 15 | setPreference -pref StartupCLock:AUTO_CORRECTION 16 | setPreference -pref AutoSignature:FALSE 17 | setPreference -pref KeepSVF:FALSE 18 | setPreference -pref svfUseTime:FALSE 19 | setMode -bs 20 | setPreference -pref UserLevel:Novice 21 | setMode -pff 22 | addConfigDevice -size 0 -name "xc18v04" -path "./" 23 | setAttribute -configdevice -attr size -value "0" 24 | setAttribute -configdevice -attr reseveSize -value "0" 25 | setSubmode -pffserial 26 | setAttribute -configdevice -attr activeCollection -value "leon_eth_pci" 27 | addCollection -name "leon_eth_pci" 28 | addDesign -version 0 -name "0" 29 | addDeviceChain -index 0 30 | addDevice -position 1 -file "leon_eth_pci.bit" 31 | 32 | addPromDevice -position 1 -size 0 -name "xc18v04" 33 | addPromDevice -position 2 -size 0 -name "xc18v04" 34 | addPromDevice -position 3 -size 0 -name "xc18v04" 35 | setAttribute -configdevice -attr fileFormat -value "mcs" 36 | setAttribute -configdevice -attr swapBit -value "FALSE" 37 | setAttribute -configdevice -attr fillValue -value "FF" 38 | setAttribute -collection -attr dir -value "UP" 39 | setMode -mpm 40 | setMode -cf 41 | setMode -dtconfig 42 | setMode -bsfile 43 | setMode -sm 44 | setMode -ss 45 | setMode -bs 46 | setCable -port parport0 47 | setMode -pff 48 | setMode -bs 49 | setMode -ss 50 | setMode -sm 51 | setMode -bsfile 52 | setMode -dtconfig 53 | setMode -cf 54 | setMode -mpm 55 | setMode -pff 56 | setCurrentDeviceChain -index 0 57 | setMode -pff 58 | setMode -pff 59 | setAttribute -configdevice -attr fillValue -value "FF" 60 | setAttribute -configdevice -attr fileFormat -value "mcs" 61 | setAttribute -collection -attr dir -value "UP" 62 | setAttribute -configdevice -attr path -value "./" 63 | setAttribute -collection -attr name -value "leon_eth_pci" 64 | generate 65 | setCurrentDesign -version 0 66 | setCurrentDesign -version 0 67 | setMode -bs 68 | setPreference -pref UserLevel:Novice 69 | setMode -pff 70 | setMode -mpm 71 | setMode -cf 72 | setMode -dtconfig 73 | setMode -bsfile 74 | setMode -sm 75 | setMode -ss 76 | setMode -bs 77 | addDevice -position 1 -part "xc18v04" 78 | setAttribute -position 1 -attr configFileName -value "leon_eth_pci_0.mcs" 79 | 80 | addDevice -position 2 -part "xc18v04" 81 | setAttribute -position 2 -attr configFileName -value "leon_eth_pci_1.mcs" 82 | 83 | addDevice -position 3 -part "xc18v04" 84 | setAttribute -position 3 -attr configFileName -value "leon_eth_pci_2.mcs" 85 | 86 | addDevice -position 4 -part "xc2v3000" 87 | addDevice -position 5 -part "971A_lqfp.bsd" 88 | 89 | setCable -port parport0 90 | setMode -bs 91 | setMode -bs 92 | setMode -ss 93 | setMode -sm 94 | setMode -bsfile 95 | setMode -dtconfig 96 | setMode -cf 97 | setMode -mpm 98 | setMode -pff 99 | setMode -bs 100 | Program -p 1 2 3 -e -v 101 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-pci-xc2v/prom_xst.cmd: -------------------------------------------------------------------------------- 1 | setPreference -pref UserLevel:NOVICE 2 | setPreference -pref MessageLevel:DETAILED 3 | setPreference -pref ConcurrentMode:FALSE 4 | setPreference -pref UseHighz:FALSE 5 | setPreference -pref ConfigOnFailure:STOP 6 | setPreference -pref StartupCLock:AUTO_CORRECTION 7 | setPreference -pref AutoSignature:FALSE 8 | setPreference -pref KeepSVF:FALSE 9 | setPreference -pref svfUseTime:FALSE 10 | setPreference -pref UserLevel:NOVICE 11 | setPreference -pref MessageLevel:DETAILED 12 | setPreference -pref ConcurrentMode:FALSE 13 | setPreference -pref UseHighz:FALSE 14 | setPreference -pref ConfigOnFailure:STOP 15 | setPreference -pref StartupCLock:AUTO_CORRECTION 16 | setPreference -pref AutoSignature:FALSE 17 | setPreference -pref KeepSVF:FALSE 18 | setPreference -pref svfUseTime:FALSE 19 | setMode -bs 20 | setPreference -pref UserLevel:Novice 21 | setMode -pff 22 | addConfigDevice -size 0 -name "xc18v04" -path "./" 23 | setAttribute -configdevice -attr size -value "0" 24 | setAttribute -configdevice -attr reseveSize -value "0" 25 | setSubmode -pffserial 26 | setAttribute -configdevice -attr activeCollection -value "leon_eth_pci_xst" 27 | addCollection -name "leon_eth_pci_xst" 28 | addDesign -version 0 -name "0" 29 | addDeviceChain -index 0 30 | addDevice -position 1 -file "leon_eth_pci_xst.bit" 31 | 32 | addPromDevice -position 1 -size 0 -name "xc18v04" 33 | addPromDevice -position 2 -size 0 -name "xc18v04" 34 | addPromDevice -position 3 -size 0 -name "xc18v04" 35 | setAttribute -configdevice -attr fileFormat -value "mcs" 36 | setAttribute -configdevice -attr swapBit -value "FALSE" 37 | setAttribute -configdevice -attr fillValue -value "FF" 38 | setAttribute -collection -attr dir -value "UP" 39 | setMode -mpm 40 | setMode -cf 41 | setMode -dtconfig 42 | setMode -bsfile 43 | setMode -sm 44 | setMode -ss 45 | setMode -bs 46 | setCable -port parport0 47 | setMode -pff 48 | setMode -bs 49 | setMode -ss 50 | setMode -sm 51 | setMode -bsfile 52 | setMode -dtconfig 53 | setMode -cf 54 | setMode -mpm 55 | setMode -pff 56 | setCurrentDeviceChain -index 0 57 | setMode -pff 58 | setMode -pff 59 | setAttribute -configdevice -attr fillValue -value "FF" 60 | setAttribute -configdevice -attr fileFormat -value "mcs" 61 | setAttribute -collection -attr dir -value "UP" 62 | setAttribute -configdevice -attr path -value "./" 63 | setAttribute -collection -attr name -value "leon_eth_pci_xst" 64 | generate 65 | setCurrentDesign -version 0 66 | setCurrentDesign -version 0 67 | setMode -bs 68 | setPreference -pref UserLevel:Novice 69 | setMode -pff 70 | setMode -mpm 71 | setMode -cf 72 | setMode -dtconfig 73 | setMode -bsfile 74 | setMode -sm 75 | setMode -ss 76 | setMode -bs 77 | addDevice -position 1 -part "xc18v04" 78 | setAttribute -position 1 -attr configFileName -value "leon_eth_pci_xst_0.mcs" 79 | 80 | addDevice -position 2 -part "xc18v04" 81 | setAttribute -position 2 -attr configFileName -value "leon_eth_pci_xst_1.mcs" 82 | 83 | addDevice -position 3 -part "xc18v04" 84 | setAttribute -position 3 -attr configFileName -value "leon_eth_pci_xst_2.mcs" 85 | 86 | addDevice -position 4 -part "xc2v3000" 87 | addDevice -position 5 -part "971A_lqfp.bsd" 88 | 89 | setCable -port parport0 90 | setMode -bs 91 | setMode -bs 92 | setMode -ss 93 | setMode -sm 94 | setMode -bsfile 95 | setMode -dtconfig 96 | setMode -cf 97 | setMode -mpm 98 | setMode -pff 99 | setMode -bs 100 | Program -p 1 2 3 -e -v 101 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-xc3s1500/.recordref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/boards/gr-xc3s1500/.recordref -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-xc3s1500/bitgen.ut: -------------------------------------------------------------------------------- 1 | -g ConfigRate:6 2 | -g CclkPin:PULLUP 3 | -g TdoPin:PULLNONE 4 | -g M1Pin:PULLUP 5 | -g DonePin:PULLUP 6 | -g DriveDone:Yes 7 | -g StartUpClk:CCLK 8 | -g DONE_cycle:4 9 | -g GTS_cycle:5 10 | -g M0Pin:PULLUP 11 | -g M2Pin:PULLUP 12 | -g ProgPin:PULLUP 13 | -g TckPin:PULLUP 14 | -g TdiPin:PULLUP 15 | -g TmsPin:PULLUP 16 | -g DonePipe:No 17 | -g GWE_cycle:6 18 | -g LCK_cycle:NoWait 19 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-xc3s1500/leon-ise5.npl: -------------------------------------------------------------------------------- 1 | JDF F 2 | // Created by Project Navigator ver 1.0 3 | PROJECT syn 4 | DESIGN leon Normal 5 | DEVFAM virtex2 6 | DEVFAMTIME 1041788708 7 | DEVICE xc2v3000 8 | DEVICETIME 1041788708 9 | DEVPKG fg676 10 | DEVPKGTIME 1041788708 11 | DEVSPEED -4 12 | DEVSPEEDTIME 0 13 | FLOW XST VHDL 14 | FLOWTIME 1041788708 15 | MODULE ..\..\leon\ahbstat.vhd 16 | MODSTYLE ahbstat Normal 17 | MODULE ..\..\leon\dcom_uart.vhd 18 | MODSTYLE dcom_uart Normal 19 | MODULE ..\..\leon\cache.vhd 20 | MODSTYLE cache Normal 21 | MODULE ..\..\leon\fpu_lth.vhd 22 | MODSTYLE fpu_lth Normal 23 | MODULE ..\..\leon\irqctrl.vhd 24 | MODSTYLE irqctrl Normal 25 | MODULE ..\..\leon\irqctrl2.vhd 26 | MODSTYLE irqctrl2 Normal 27 | MODULE ..\..\leon\meiko.vhd 28 | MODSTYLE fpu Normal 29 | MODULE ..\..\leon\lconf.vhd 30 | MODSTYLE lconf Normal 31 | MODULE ..\..\leon\mcore.vhd 32 | MODSTYLE mcore Normal 33 | MODULE ..\..\leon\mctrl.vhd 34 | MODSTYLE mctrl Normal 35 | MODULE ..\..\leon\wprot.vhd 36 | MODSTYLE wprot Normal 37 | MODULE ..\..\leon\bprom.vhd 38 | MODSTYLE gen_bprom Normal 39 | MODULE ..\..\leon\div.vhd 40 | MODSTYLE div Normal 41 | MODULE ..\..\leon\dsu.vhd 42 | MODSTYLE dsu Normal 43 | MODULE ..\..\leon\mul.vhd 44 | MODSTYLE mul Normal 45 | MODULE ..\..\leon\ahbarb.vhd 46 | MODSTYLE ahbarb Normal 47 | MODULE ..\..\leon\dcache.vhd 48 | MODSTYLE dcache Normal 49 | MODULE ..\..\leon\icache.vhd 50 | MODSTYLE icache Normal 51 | MODULE ..\..\leon\acache.vhd 52 | MODSTYLE acache Normal 53 | MODULE ..\..\leon\cachemem.vhd 54 | MODSTYLE cachemem Normal 55 | MODULE ..\..\leon\fpu_core.vhd 56 | MODSTYLE fpu_core Normal 57 | MODULE ..\..\leon\timers.vhd 58 | MODSTYLE timers Normal 59 | MODULE ..\..\leon\ahbram.vhd 60 | MODSTYLE ahbram Normal 61 | MODULE ..\..\leon\rstgen.vhd 62 | MODSTYLE rstgen Normal 63 | MODULE ..\..\leon\ahbmst.vhd 64 | MODSTYLE ahbmst Normal 65 | MODULE ..\..\leon\dcom.vhd 66 | MODSTYLE dcom Normal 67 | MODULE ..\..\leon\proc.vhd 68 | MODSTYLE proc Normal 69 | MODULE ..\..\leon\uart.vhd 70 | MODSTYLE uart Normal 71 | MODULE ..\..\leon\apbmst.vhd 72 | MODSTYLE apbmst Normal 73 | MODULE ..\..\leon\ioport.vhd 74 | MODSTYLE ioport Normal 75 | MODULE ..\..\leon\iu.vhd 76 | MODSTYLE iu Normal 77 | MODULE ..\..\leon\dsu_mem.vhd 78 | MODSTYLE dsu_mem Normal 79 | MODULE ..\..\leon\grfpc.vhd 80 | MODSTYLE grfpc Normal 81 | MODULE ..\..\leon\sdmctrl.vhd 82 | MODSTYLE sdmctrl Normal 83 | MODULE ..\..\leon\leon.vhd 84 | MODSTYLE leon Normal 85 | LIBFILE ..\..\leon\tech_fs90.vhd work *** 86 | LIBFILE ..\..\leon\device.vhd work *** 87 | LIBFILE ..\..\leon\tech_axcel.vhd work *** 88 | LIBFILE ..\..\leon\config.vhd work *** 89 | LIBFILE ..\..\leon\mmuconfig.vhd work *** 90 | LIBFILE ..\..\leon\fpulib.vhd work *** 91 | LIBFILE ..\..\leon\target.vhd work *** 92 | LIBFILE ..\..\leon\iface.vhd work *** 93 | LIBFILE ..\..\leon\macro.vhd work *** 94 | LIBFILE ..\..\leon\tech_virtex2.vhd work *** 95 | LIBFILE ..\..\leon\amba.vhd work *** 96 | LIBFILE ..\..\leon\tech_tsmc25.vhd work *** 97 | LIBFILE ..\..\leon\tech_map.vhd work *** 98 | LIBFILE ..\..\leon\ambacomp.vhd work *** 99 | LIBFILE ..\..\leon\tech_generic.vhd work *** 100 | LIBFILE ..\..\leon\tech_proasic.vhd work *** 101 | LIBFILE ..\..\leon\tech_atc25.vhd work *** 102 | LIBFILE ..\..\leon\tech_atc35.vhd work *** 103 | LIBFILE ..\..\leon\tech_atc18.vhd work *** 104 | LIBFILE ..\..\leon\multlib.vhd work *** 105 | LIBFILE ..\..\leon\tech_virtex.vhd work *** 106 | LIBFILE ..\..\leon\sparcv8.vhd work *** 107 | LIBFILE ..\..\leon\tech_umc18.vhd work *** 108 | DEPASSOC leon leon.ucf Normal 109 | [Normal] 110 | p_SimModelTarget=xstvhd, virtexe, VHDL.t_postMapSimModel, 1041792828, Modelsim_VHDL 111 | [STRATEGY-LIST] 112 | Normal=True 113 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-xc3s1500/leon-ise6.npl: -------------------------------------------------------------------------------- 1 | JDF G 2 | // Converted from an earlier version by Project Navigator version 5 3 | PROJECT syn 4 | DESIGN leon Normal 5 | DEVFAM virtex2 6 | DEVFAMTIME 1041788708 7 | DEVICE xc2v3000 8 | DEVICETIME 1041788708 9 | DEVPKG fg676 10 | DEVPKGTIME 1041788708 11 | DEVSPEED -4 12 | DEVSPEEDTIME 0 13 | DEVTOPLEVELMODULETYPE HDL 14 | TOPLEVELMODULETYPETIME 0 15 | DEVSYNTHESISTOOL XST (VHDL/Verilog) 16 | SYNTHESISTOOLTIME 0 17 | DEVSIMULATOR Modelsim 18 | SIMULATORTIME 0 19 | DEVGENERATEDSIMULATIONMODEL VHDL 20 | GENERATEDSIMULATIONMODELTIME 0 21 | MODULE ../../leon/ahbstat.vhd 22 | MODSTYLE ahbstat Normal 23 | MODULE ../../leon/dcom_uart.vhd 24 | MODSTYLE dcom_uart Normal 25 | MODULE ../../leon/cache.vhd 26 | MODSTYLE cache Normal 27 | MODULE ../../leon/fpu_lth.vhd 28 | MODSTYLE fpu_lth Normal 29 | MODULE ../../leon/irqctrl.vhd 30 | MODSTYLE irqctrl Normal 31 | MODULE ../../leon/irqctrl2.vhd 32 | MODSTYLE irqctrl2 Normal 33 | MODULE ../../leon/meiko.vhd 34 | MODSTYLE fpu Normal 35 | MODULE ../../leon/lconf.vhd 36 | MODSTYLE lconf Normal 37 | MODULE ../../leon/mcore.vhd 38 | MODSTYLE mcore Normal 39 | MODULE ../../leon/mctrl.vhd 40 | MODSTYLE mctrl Normal 41 | MODULE ../../leon/wprot.vhd 42 | MODSTYLE wprot Normal 43 | MODULE ../../leon/bprom.vhd 44 | MODSTYLE gen_bprom Normal 45 | MODULE ../../leon/div.vhd 46 | MODSTYLE div Normal 47 | MODULE ../../leon/dsu.vhd 48 | MODSTYLE dsu Normal 49 | MODULE ../../leon/mul.vhd 50 | MODSTYLE mul Normal 51 | MODULE ../../leon/ahbarb.vhd 52 | MODSTYLE ahbarb Normal 53 | MODULE ../../leon/dcache.vhd 54 | MODSTYLE dcache Normal 55 | MODULE ../../leon/icache.vhd 56 | MODSTYLE icache Normal 57 | MODULE ../../leon/acache.vhd 58 | MODSTYLE acache Normal 59 | MODULE ../../leon/cachemem.vhd 60 | MODSTYLE cachemem Normal 61 | MODULE ../../leon/fpu_core.vhd 62 | MODSTYLE fpu_core Normal 63 | MODULE ../../leon/timers.vhd 64 | MODSTYLE timers Normal 65 | MODULE ../../leon/ahbram.vhd 66 | MODSTYLE ahbram Normal 67 | MODULE ../../leon/rstgen.vhd 68 | MODSTYLE rstgen Normal 69 | MODULE ../../leon/ahbmst.vhd 70 | MODSTYLE ahbmst Normal 71 | MODULE ../../leon/dcom.vhd 72 | MODSTYLE dcom Normal 73 | MODULE ../../leon/proc.vhd 74 | MODSTYLE proc Normal 75 | MODULE ../../leon/uart.vhd 76 | MODSTYLE uart Normal 77 | MODULE ../../leon/apbmst.vhd 78 | MODSTYLE apbmst Normal 79 | MODULE ../../leon/ioport.vhd 80 | MODSTYLE ioport Normal 81 | MODULE ../../leon/iu.vhd 82 | MODSTYLE iu Normal 83 | MODULE ../../leon/dsu_mem.vhd 84 | MODSTYLE dsu_mem Normal 85 | MODULE ../../leon/grfpc.vhd 86 | MODSTYLE grfpc Normal 87 | MODULE ../../leon/sdmctrl.vhd 88 | MODSTYLE sdmctrl Normal 89 | MODULE ../../leon/leon.vhd 90 | MODSTYLE leon Normal 91 | LIBFILE ../../leon/tech_fs90.vhd work *** 92 | LIBFILE ../../leon/device.vhd work *** 93 | LIBFILE ../../leon/tech_axcel.vhd work *** 94 | LIBFILE ../../leon/config.vhd work *** 95 | LIBFILE ../../leon/mmuconfig.vhd work *** 96 | LIBFILE ../../leon/fpulib.vhd work *** 97 | LIBFILE ../../leon/target.vhd work *** 98 | LIBFILE ../../leon/iface.vhd work *** 99 | LIBFILE ../../leon/macro.vhd work *** 100 | LIBFILE ../../leon/tech_virtex2.vhd work *** 101 | LIBFILE ../../leon/amba.vhd work *** 102 | LIBFILE ../../leon/tech_tsmc25.vhd work *** 103 | LIBFILE ../../leon/tech_map.vhd work *** 104 | LIBFILE ../../leon/ambacomp.vhd work *** 105 | LIBFILE ../../leon/tech_generic.vhd work *** 106 | LIBFILE ../../leon/tech_proasic.vhd work *** 107 | LIBFILE ../../leon/tech_atc25.vhd work *** 108 | LIBFILE ../../leon/tech_atc35.vhd work *** 109 | LIBFILE ../../leon/tech_atc18.vhd work *** 110 | LIBFILE ../../leon/multlib.vhd work *** 111 | LIBFILE ../../leon/tech_virtex.vhd work *** 112 | LIBFILE ../../leon/sparcv8.vhd work *** 113 | LIBFILE ../../leon/tech_umc18.vhd work *** 114 | DEPASSOC leon leon.ucf Normal 115 | [Normal] 116 | p_SimModelTarget=xstvhd, virtexe, VHDL.t_postMapSimModel, 1041792828, Modelsim_VHDL 117 | [STRATEGY-LIST] 118 | Normal=True 119 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-xc3s1500/leon.npl: -------------------------------------------------------------------------------- 1 | JDF F 2 | // Created by Project Navigator ver 1.0 3 | PROJECT syn 4 | DESIGN leon Normal 5 | DEVFAM virtex2 6 | DEVFAMTIME 1041788708 7 | DEVICE xc2v3000 8 | DEVICETIME 1041788708 9 | DEVPKG fg676 10 | DEVPKGTIME 1041788708 11 | DEVSPEED -4 12 | DEVSPEEDTIME 0 13 | FLOW XST VHDL 14 | FLOWTIME 1041788708 15 | MODULE ..\..\leon\ahbstat.vhd 16 | MODSTYLE ahbstat Normal 17 | MODULE ..\..\leon\dcom_uart.vhd 18 | MODSTYLE dcom_uart Normal 19 | MODULE ..\..\leon\cache.vhd 20 | MODSTYLE cache Normal 21 | MODULE ..\..\leon\fpu_lth.vhd 22 | MODSTYLE fpu_lth Normal 23 | MODULE ..\..\leon\irqctrl.vhd 24 | MODSTYLE irqctrl Normal 25 | MODULE ..\..\leon\irqctrl2.vhd 26 | MODSTYLE irqctrl2 Normal 27 | MODULE ..\..\leon\meiko.vhd 28 | MODSTYLE fpu Normal 29 | MODULE ..\..\leon\lconf.vhd 30 | MODSTYLE lconf Normal 31 | MODULE ..\..\leon\mcore.vhd 32 | MODSTYLE mcore Normal 33 | MODULE ..\..\leon\mctrl.vhd 34 | MODSTYLE mctrl Normal 35 | MODULE ..\..\leon\wprot.vhd 36 | MODSTYLE wprot Normal 37 | MODULE ..\..\leon\bprom.vhd 38 | MODSTYLE gen_bprom Normal 39 | MODULE ..\..\leon\div.vhd 40 | MODSTYLE div Normal 41 | MODULE ..\..\leon\dsu.vhd 42 | MODSTYLE dsu Normal 43 | MODULE ..\..\leon\mul.vhd 44 | MODSTYLE mul Normal 45 | MODULE ..\..\leon\ahbarb.vhd 46 | MODSTYLE ahbarb Normal 47 | MODULE ..\..\leon\dcache.vhd 48 | MODSTYLE dcache Normal 49 | MODULE ..\..\leon\icache.vhd 50 | MODSTYLE icache Normal 51 | MODULE ..\..\leon\acache.vhd 52 | MODSTYLE acache Normal 53 | MODULE ..\..\leon\cachemem.vhd 54 | MODSTYLE cachemem Normal 55 | MODULE ..\..\leon\fpu_core.vhd 56 | MODSTYLE fpu_core Normal 57 | MODULE ..\..\leon\timers.vhd 58 | MODSTYLE timers Normal 59 | MODULE ..\..\leon\ahbram.vhd 60 | MODSTYLE ahbram Normal 61 | MODULE ..\..\leon\rstgen.vhd 62 | MODSTYLE rstgen Normal 63 | MODULE ..\..\leon\ahbmst.vhd 64 | MODSTYLE ahbmst Normal 65 | MODULE ..\..\leon\dcom.vhd 66 | MODSTYLE dcom Normal 67 | MODULE ..\..\leon\proc.vhd 68 | MODSTYLE proc Normal 69 | MODULE ..\..\leon\uart.vhd 70 | MODSTYLE uart Normal 71 | MODULE ..\..\leon\apbmst.vhd 72 | MODSTYLE apbmst Normal 73 | MODULE ..\..\leon\ioport.vhd 74 | MODSTYLE ioport Normal 75 | MODULE ..\..\leon\iu.vhd 76 | MODSTYLE iu Normal 77 | MODULE ..\..\leon\dsu_mem.vhd 78 | MODSTYLE dsu_mem Normal 79 | MODULE ..\..\leon\grfpc.vhd 80 | MODSTYLE grfpc Normal 81 | MODULE ..\..\leon\sdmctrl.vhd 82 | MODSTYLE sdmctrl Normal 83 | MODULE ..\..\leon\leon.vhd 84 | MODSTYLE leon Normal 85 | LIBFILE ..\..\leon\tech_fs90.vhd work *** 86 | LIBFILE ..\..\leon\device.vhd work *** 87 | LIBFILE ..\..\leon\tech_axcel.vhd work *** 88 | LIBFILE ..\..\leon\config.vhd work *** 89 | LIBFILE ..\..\leon\mmuconfig.vhd work *** 90 | LIBFILE ..\..\leon\fpulib.vhd work *** 91 | LIBFILE ..\..\leon\target.vhd work *** 92 | LIBFILE ..\..\leon\iface.vhd work *** 93 | LIBFILE ..\..\leon\macro.vhd work *** 94 | LIBFILE ..\..\leon\tech_virtex2.vhd work *** 95 | LIBFILE ..\..\leon\amba.vhd work *** 96 | LIBFILE ..\..\leon\tech_tsmc25.vhd work *** 97 | LIBFILE ..\..\leon\tech_map.vhd work *** 98 | LIBFILE ..\..\leon\ambacomp.vhd work *** 99 | LIBFILE ..\..\leon\tech_generic.vhd work *** 100 | LIBFILE ..\..\leon\tech_proasic.vhd work *** 101 | LIBFILE ..\..\leon\tech_atc25.vhd work *** 102 | LIBFILE ..\..\leon\tech_atc35.vhd work *** 103 | LIBFILE ..\..\leon\tech_atc18.vhd work *** 104 | LIBFILE ..\..\leon\multlib.vhd work *** 105 | LIBFILE ..\..\leon\tech_virtex.vhd work *** 106 | LIBFILE ..\..\leon\sparcv8.vhd work *** 107 | LIBFILE ..\..\leon\tech_umc18.vhd work *** 108 | DEPASSOC leon leon.ucf Normal 109 | [Normal] 110 | p_SimModelTarget=xstvhd, virtexe, VHDL.t_postMapSimModel, 1041792828, Modelsim_VHDL 111 | [STRATEGY-LIST] 112 | Normal=True 113 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-xc3s1500/leon.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon" 5 | project -result_file "./leon.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-xc3s1500/leon.sdc: -------------------------------------------------------------------------------- 1 | 2 | define_clock -name {clk} -freq 52.0 -clockgroup default_clkgroup 3 | define_clock -name {erx_clk} -freq 30.000 -clockgroup erx_clk_clkgroup 4 | define_clock -name {etx_clk} -freq 30.000 -clockgroup etx_clk_clkgroup 5 | 6 | define_output_delay -default 8.00 -ref clk:r 7 | define_input_delay -default 10.00 -ref clk:r 8 | define_output_delay -default 8.00 -ref erx_clk:r 9 | define_input_delay -default 10.00 -ref erx_clk:r 10 | define_output_delay -default 8.00 -ref etx_clk:r 11 | define_input_delay -default 10.00 -ref etx_clk:r 12 | 13 | define_global_attribute syn_useioff {1} 14 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-xc3s1500/leon.tcl: -------------------------------------------------------------------------------- 1 | 2 | source "../../syn/synplify/leon_files.tcl" 3 | add_file -constraint "leon.sdc" 4 | 5 | impl -add syn 6 | 7 | set_option -technology SPARTAN3 8 | set_option -part XC3S1500 9 | set_option -package FG456 10 | set_option -speed_grade -4 11 | 12 | set_option -default_enum_encoding onehot 13 | set_option -symbolic_fsm_compiler 0 14 | set_option -resource_sharing 0 15 | set_option -use_fsm_explorer 0 16 | 17 | set_option -frequency 52.000 18 | set_option -fanout_limit 100 19 | set_option -disable_io_insertion 0 20 | set_option -pipe 0 21 | set_option -modular 0 22 | set_option -retiming 0 23 | 24 | set_option -write_verilog 0 25 | set_option -write_vhdl 0 26 | 27 | set_option -write_apr_constraint 0 28 | set_option -compiler_compatible 0 29 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-xc3s1500/leon_eth.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_eth" 5 | project -result_file "./leon_eth.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/gr-xc3s1500/prom.cmd: -------------------------------------------------------------------------------- 1 | setPreference -pref UserLevel:NOVICE 2 | setPreference -pref MessageLevel:DETAILED 3 | setPreference -pref ConcurrentMode:FALSE 4 | setPreference -pref UseHighz:FALSE 5 | setPreference -pref ConfigOnFailure:STOP 6 | setPreference -pref StartupCLock:AUTO_CORRECTION 7 | setPreference -pref AutoSignature:FALSE 8 | setPreference -pref KeepSVF:FALSE 9 | setPreference -pref svfUseTime:FALSE 10 | setPreference -pref UserLevel:NOVICE 11 | setPreference -pref MessageLevel:DETAILED 12 | setPreference -pref ConcurrentMode:FALSE 13 | setPreference -pref UseHighz:FALSE 14 | setPreference -pref ConfigOnFailure:STOP 15 | setPreference -pref StartupCLock:AUTO_CORRECTION 16 | setPreference -pref AutoSignature:FALSE 17 | setPreference -pref KeepSVF:FALSE 18 | setPreference -pref svfUseTime:FALSE 19 | setMode -pff 20 | setMode -pff 21 | setMode -pff 22 | addConfigDevice -size 512 -name "xcf04s" -path "/home/jiri/ibm/vhdl/leon2-1.0.28-xst/boards/gr-xc3s1500/" 23 | setSubmode -pffserial 24 | addPromDevice -position 1 -size -1 -name "xcf04s" 25 | addPromDevice -position 2 -size -1 -name "xcf01s" 26 | setMode -pff 27 | setSubmode -pffserial 28 | setAttribute -configdevice -attr size -value "0" 29 | addCollection -name "leon_eth" 30 | setAttribute -collection -attr dir -value "UP" 31 | addDesign -version 0 -name "0000" 32 | addDeviceChain -index 0 33 | addDevice -position 1 -file "/home/jiri/ibm/vhdl/leon2-1.0.28-xst/boards/gr-xc3s1500/leon_eth.bit" 34 | setMode -pff 35 | setAttribute -configdevice -attr fillValue -value "FF" 36 | setAttribute -configdevice -attr fileFormat -value "mcs" 37 | setAttribute -collection -attr dir -value "UP" 38 | setAttribute -configdevice -attr path -value "/home/jiri/ibm/vhdl/leon2-1.0.28-xst/boards/gr-xc3s1500/" 39 | setAttribute -collection -attr name -value "leon_eth" 40 | generate 41 | setCurrentDesign -version 0 42 | setMode -bs 43 | setCable -port auto 44 | Identify 45 | setAttribute -position 1 -attr devicePartName -value "xcf04s" 46 | setAttribute -position 1 -attr configFileName -value "/home/jiri/ibm/vhdl/leon2-1.0.28-xst/boards/gr-xc3s1500/leon_eth_0.mcs" 47 | setAttribute -position 2 -attr devicePartName -value "xcf04s" 48 | setAttribute -position 2 -attr configFileName -value "/home/jiri/ibm/vhdl/leon2-1.0.28-xst/boards/gr-xc3s1500/leon_eth_1.mcs" 49 | Program -p 1 2 -e -v 50 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/hecht-xsv800/Makefile: -------------------------------------------------------------------------------- 1 | 2 | EFFORT=3 3 | DEVICE=xcv800-hq240-4 4 | 5 | all: 6 | @if test "$(SYN)" = "synplify"; then make grsyn; \ 7 | else make grxst; fi; 8 | 9 | help: 10 | @echo 11 | @echo " choose one of following targets:" 12 | @echo 13 | @echo " make all : synthesis and place&route" 14 | @echo " make clean : remove all temporary files except config and fpga bitfiles" 15 | @echo " make dist-clean : remove all temporary files" 16 | @echo 17 | @echo " XST is used by default, to use Synplify do 'make SYN=synplify'" 18 | @echo 19 | 20 | 21 | grxst: 22 | @pci=`grep pcicore ../../leon/device.vhd | awk '{print $$3}'` ; \ 23 | eth=`grep ethen ../../leon/device.vhd | awk '{print $$12}'` ; \ 24 | if test "$$pci" != "none"; then \ 25 | echo " ERROR: PCI is not supported for XSV800 " ; \ 26 | exit 2; \ 27 | fi; \ 28 | if test "$$eth" != "false"; then make eth_top.ngc ; fi; \ 29 | if test "$$eth" = "false"; then \ 30 | echo " making leon_xsv800_xst.bit" ; \ 31 | make leon_xsv800_xst.bit; \ 32 | else \ 33 | echo " making leon_eth_xsv800_xst.bit" ; \ 34 | make leon_eth_xsv800_xst.bit; \ 35 | fi; \ 36 | 37 | grsyn: 38 | @pci=`grep pcicore ../../leon/device.vhd | awk '{print $$3}'` ; \ 39 | eth=`grep ethen ../../leon/device.vhd | awk '{print $$12}'` ; \ 40 | if test "$$pci" = "none"; then \ 41 | if test "$$eth" = "false"; then \ 42 | echo " making leon.bit" ; \ 43 | make leon.bit; \ 44 | else \ 45 | echo " making leon_eth.bit" ; \ 46 | make leon_eth.bit; \ 47 | fi; \ 48 | else \ 49 | echo " ERROR: PCI is not supported for XSV800 " ; \ 50 | exit 2; \ 51 | fi; 52 | 53 | leon.edf: ../../leon/device.vhd ../../leon/device.v 54 | synplify_pro -batch leon.prj 55 | 56 | leon_eth.edf: ../../leon/device.vhd ../../leon/device.v 57 | synplify_pro -batch leon_eth.prj 58 | 59 | eth_top.ngc: ../../leon/eth_top.v ../../leon/device.v 60 | ../../syn/ise/xstmod eth_top ../../syn/verilog/ethermac.v $(DEVICE) > xst.scr 61 | xst -ifn xst.scr 62 | 63 | leon_xsv800.ngc: ../../leon/device.vhd 64 | -rm -rf xst 65 | xst -ifn ../../syn/ise/leon.xst 66 | xst -ifn leon.xst 67 | ../../syn/ise/xstrun leon_xsv800 leon_xsv800.vhd $(DEVICE) > xst.scr 68 | xst -ifn xst.scr 69 | 70 | leon_eth_xsv800.ngc: ../../leon/device.vhd 71 | -rm -rf xst 72 | xst -ifn ../../syn/ise/leon.xst 73 | xst -ifn leon.xst 74 | ../../syn/ise/xstrun leon_eth_xsv800 leon_eth_xsv800.vhd $(DEVICE) > xst.scr 75 | xst -ifn xst.scr 76 | 77 | leon_xsv800_xst.bit: leon_xsv800.ngc 78 | ../../syn/ise/route_ngc leon_xsv800 leon.ucf $(DEVICE) $(EFFORT) 79 | 80 | leon_eth_xsv800_xst.bit: leon_eth_xsv800.ngc 81 | ../../syn/ise/route_ngc leon_eth_xsv800 leon_eth.ucf $(DEVICE) $(EFFORT) 82 | 83 | 84 | leon.bit: leon.edf 85 | ../../syn/ise/route leon leon.ucf $(DEVICE) $(EFFORT) 86 | 87 | leon_eth.bit: leon_eth.edf 88 | ../../syn/ise/route leon_eth leon_eth.ucf $(DEVICE) $(EFFORT) 89 | 90 | clean: 91 | -rm -rf *.ngc *.bgn *.bld *.dly *.drc *.ll *.mrp *.msk *.ncd *.ngd \ 92 | *.ngm *.pad *.par *.pcf *.srp *.twr *.xpi *.nav *.lst *.scr \ 93 | xst *.tlg *.log *.srs *.srr *.plg *.fse *.vhm *.srm *.srd *.edf *.edn \ 94 | *.prd *.ngo *.jhd __projnav* .recordref 95 | 96 | dist-clean: clean 97 | -rm -f *.bit 98 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/hecht-xsv800/README: -------------------------------------------------------------------------------- 1 | Reset is on SW1. 2 | 3 | To get UART1 and DSUMON running on the XSV800 a serial Y-adapter 4 | has to be built. 5 | 6 | xsv800 | CPLD Pin | serial 7 | -------+----------+------- 8 | rd | 80 | UART1-rx 9 | td | 81 | UART1-tx 10 | cts | 85 | DSUMON-rx 11 | rts | 82 | DSUMON-tx 12 | 13 | To Enable DSUMON SW6-1 and SW6-2 must be turned off. 14 | 15 | If you have questions/comments contact 16 | Ronald Hecht 17 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/hecht-xsv800/bitgen.ut: -------------------------------------------------------------------------------- 1 | -g ConfigRate:4 2 | -g CclkPin:PULLUP 3 | -g TdoPin:PULLNONE 4 | -g M1Pin:PULLUP 5 | -g DonePin:PULLUP 6 | -g DriveDone:Yes 7 | -g StartUpClk:CCLK 8 | -g DONE_cycle:4 9 | -g GTS_cycle:5 10 | -g M0Pin:PULLUP 11 | -g M2Pin:PULLUP 12 | -g ProgPin:PULLUP 13 | -g TckPin:PULLUP 14 | -g TdiPin:PULLUP 15 | -g TmsPin:PULLUP 16 | -g DonePipe:No 17 | -g GWE_cycle:6 18 | -g LCK_cycle:NoWait 19 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/hecht-xsv800/cpld/dwnldpar.vhd: -------------------------------------------------------------------------------- 1 | library ieee; 2 | use ieee.std_logic_1164.all; 3 | 4 | entity dwnldpar is 5 | port( 6 | -- parallel port data, control, and status pins 7 | ppc : in std_logic_vector(3 downto 0); 8 | 9 | -- serial port 10 | rxd : in std_logic; 11 | txd : out std_logic; 12 | cts : in std_logic; 13 | rts : out std_logic; 14 | 15 | -- Virtex FPGA pins 16 | v_tck : out std_logic; -- driver to Virtex JTAG clock 17 | v_cclk : out std_logic; -- driver to Virtex config clock 18 | v_progb : out std_logic; -- driver to Virtex program pin 19 | v_done : in std_logic; -- input from Virtex done pin 20 | v_d : out std_logic; -- drivers to Virtex data pins 21 | v_m : out std_logic_vector(2 downto 0); -- Virtex config mode pins 22 | 23 | v_rxd : out std_logic; 24 | v_txd : in std_logic; 25 | v_cts : out std_logic; 26 | v_rts : in std_logic; 27 | 28 | ceb : out std_logic; -- Flash chip-enable 29 | resetb : out std_logic; -- reset for video input and Ethernet chips 30 | 31 | bar: out std_logic_vector(9 downto 5); -- LED bargraph 32 | 33 | -- Ethernet configuration 34 | cfg: out std_logic_vector(1 downto 0); 35 | mf: out std_logic_vector(4 downto 0); 36 | fde: out std_logic; 37 | mddis: out std_logic; 38 | -- Ethernet status 39 | ledsb: in std_logic; 40 | ledrb: in std_logic; 41 | ledtb: in std_logic; 42 | ledlb: in std_logic; 43 | ledcb: in std_logic 44 | ); 45 | end dwnldpar; 46 | 47 | architecture dwnldpar_arch of dwnldpar is 48 | constant SLAVE_SERIAL_MODE : std_logic_vector(2 downto 0) := "111"; 49 | begin 50 | -- disable other chips on the XSV Board so they don't interfere 51 | -- during the configuration of the Virtex FPGA 52 | -- disable flash -- until config is done 53 | ceb <= '1';-- when v_done = '0' else 'Z'; 54 | -- disable the video input and Ethernet chips until config is done 55 | resetb <= '0' when v_done = '0' else '1'; 56 | 57 | -- deactivate Virtex JTAG circuit 58 | v_tck <= '0'; 59 | -- connect Virtex configuration pins 60 | v_m <= SLAVE_SERIAL_MODE; -- set Virtex config mode pins 61 | v_progb <= ppc(0); -- Virtex programming pulse comes from parallel port 62 | v_cclk <= ppc(1); -- Virtex config clock comes from parallel port 63 | -- config bitstream comes from parallel port control pin until 64 | -- config is done and then gets 'Z' 65 | v_d <= ppc(3) when v_done = '0' else 'Z'; 66 | 67 | -- serial port route through 68 | v_rxd <= rxd; 69 | txd <= v_txd; 70 | v_cts <= cts; 71 | rts <= v_rts; 72 | 73 | -- control ethernet chip 74 | mddis <= '0'; -- management over MDC and MDIO enabled 75 | fde <= '1'; -- full duplex enable 76 | cfg(0) <= '0'; -- 10MBit/s 77 | cfg(1) <= '0'; -- advertise all 78 | mf(0) <= '1'; -- Auto-negotiation enabled 79 | mf(1) <= '0'; -- DTE 80 | mf(2) <= '0'; -- 4Bit 81 | mf(3) <= '0'; -- Scrambler enabled 82 | mf(4) <= '0'; -- advertise all 83 | -- display status of ethernet PHY 84 | bar(9) <= not ledsb; -- 100MBit/s 85 | bar(8) <= not ledrb; -- receive 86 | bar(7) <= not ledtb; -- transmit 87 | bar(6) <= not ledlb; -- link 88 | bar(5) <= not ledcb; -- collision 89 | 90 | end dwnldpar_arch; 91 | 92 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/hecht-xsv800/leon.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_xsv800" 5 | project -result_file "./leon.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/hecht-xsv800/leon.sdc: -------------------------------------------------------------------------------- 1 | 2 | define_clock -name {clk} -freq 50.0 -clockgroup default_clkgroup 3 | define_clock -name {pci_clk_in} -freq 40.000 -clockgroup pci_clkgroup 4 | define_clock -name {erx_clk} -freq 30.000 -clockgroup erx_clk_clkgroup 5 | define_clock -name {etx_clk} -freq 30.000 -clockgroup etx_clk_clkgroup 6 | 7 | define_output_delay -default 8.00 -ref clk:r 8 | define_input_delay -default 10.00 -ref clk:r 9 | define_output_delay -default 14.00 -ref pci_clk_in:r 10 | define_input_delay -default 18.00 -ref pci_clk_in:r 11 | define_output_delay -default 8.00 -ref erx_clk:r 12 | define_input_delay -default 10.00 -ref erx_clk:r 13 | define_output_delay -default 8.00 -ref etx_clk:r 14 | define_input_delay -default 10.00 -ref etx_clk:r 15 | 16 | define_global_attribute syn_useioff {1} 17 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/hecht-xsv800/leon.tcl: -------------------------------------------------------------------------------- 1 | 2 | source "../../syn/synplify/leon_files.tcl" 3 | add_file -constraint "leon.sdc" 4 | add_file -vhdl -lib work "leon_xsv800.vhd" 5 | add_file -vhdl -lib work "leon_eth_xsv800.vhd" 6 | 7 | impl -add syn 8 | 9 | set_option -technology VIRTEX 10 | set_option -part XCV800 11 | set_option -package HQ240 12 | set_option -speed_grade -4 13 | 14 | set_option -default_enum_encoding onehot 15 | set_option -symbolic_fsm_compiler 0 16 | set_option -resource_sharing 0 17 | set_option -use_fsm_explorer 0 18 | 19 | #set_option -frequency 50.000 20 | set_option -fanout_limit 100 21 | set_option -disable_io_insertion 0 22 | set_option -pipe 1 23 | set_option -modular 0 24 | set_option -retiming 1 25 | 26 | set_option -write_verilog 0 27 | set_option -write_vhdl 0 28 | 29 | set_option -write_apr_constraint 0 30 | set_option -compiler_compatible 0 31 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/hecht-xsv800/leon.ucf: -------------------------------------------------------------------------------- 1 | # Clock 2 | NET "clk" TNM_NET = "clk"; 3 | TIMESPEC "TS_clk" = PERIOD "clk" 40 ns HIGH 50 %; 4 | OFFSET = IN 6 ns BEFORE "clk"; 5 | OFFSET = OUT 17 ns AFTER "clk"; 6 | NET "clk" LOC = "P89"; 7 | 8 | # Reset at SW1 9 | NET "resetn" LOC = "P174"; 10 | 11 | # Error at LED bar 4 12 | NET "error" LOC = "P162"; 13 | 14 | # RAM 15 | NET "address1(0)" LOC = "P200"; 16 | NET "address1(1)" LOC = "P199"; 17 | NET "address1(2)" LOC = "P195"; 18 | NET "address1(3)" LOC = "P194"; 19 | NET "address1(4)" LOC = "P193"; 20 | NET "address1(5)" LOC = "P192"; 21 | NET "address1(6)" LOC = "P191"; 22 | NET "address1(7)" LOC = "P189"; 23 | NET "address1(8)" LOC = "P188"; 24 | NET "address1(9)" LOC = "P187"; 25 | NET "address1(10)" LOC = "P238"; 26 | NET "address1(11)" LOC = "P237"; 27 | NET "address1(12)" LOC = "P236"; 28 | NET "address1(13)" LOC = "P235"; 29 | NET "address1(14)" LOC = "P234"; 30 | NET "address1(15)" LOC = "P232"; 31 | NET "address1(16)" LOC = "P231"; 32 | NET "address1(17)" LOC = "P230"; 33 | NET "address1(18)" LOC = "P229"; 34 | NET "address2(0)" LOC = "P67"; 35 | NET "address2(1)" LOC = "P66"; 36 | NET "address2(2)" LOC = "P65"; 37 | NET "address2(3)" LOC = "P64"; 38 | NET "address2(4)" LOC = "P63"; 39 | NET "address2(5)" LOC = "P57"; 40 | NET "address2(6)" LOC = "P56"; 41 | NET "address2(7)" LOC = "P55"; 42 | NET "address2(8)" LOC = "P54"; 43 | NET "address2(9)" LOC = "P53"; 44 | NET "address2(10)" LOC = "P108"; 45 | NET "address2(11)" LOC = "P107"; 46 | NET "address2(12)" LOC = "P103"; 47 | NET "address2(13)" LOC = "P102"; 48 | NET "address2(14)" LOC = "P101"; 49 | NET "address2(15)" LOC = "P100"; 50 | NET "address2(16)" LOC = "P99"; 51 | NET "address2(17)" LOC = "P97"; 52 | NET "address2(18)" LOC = "P96"; 53 | NET "data1(0)" LOC = "P202"; 54 | NET "data1(1)" LOC = "P203"; 55 | NET "data1(2)" LOC = "P205"; 56 | NET "data1(3)" LOC = "P206"; 57 | NET "data1(4)" LOC = "P207"; 58 | NET "data1(5)" LOC = "P208"; 59 | NET "data1(6)" LOC = "P209"; 60 | NET "data1(7)" LOC = "P215"; 61 | NET "data1(8)" LOC = "P216"; 62 | NET "data1(9)" LOC = "P217"; 63 | NET "data1(10)" LOC = "P218"; 64 | NET "data1(11)" LOC = "P220"; 65 | NET "data1(12)" LOC = "P221"; 66 | NET "data1(13)" LOC = "P222"; 67 | NET "data1(14)" LOC = "P223"; 68 | NET "data1(15)" LOC = "P224"; 69 | NET "data2(0)" LOC = "P70"; 70 | NET "data2(1)" LOC = "P71"; 71 | NET "data2(2)" LOC = "P72"; 72 | NET "data2(3)" LOC = "P73"; 73 | NET "data2(4)" LOC = "P74"; 74 | NET "data2(5)" LOC = "P78"; 75 | NET "data2(6)" LOC = "P79"; 76 | NET "data2(7)" LOC = "P80"; 77 | NET "data2(8)" LOC = "P81"; 78 | NET "data2(9)" LOC = "P82"; 79 | NET "data2(10)" LOC = "P84"; 80 | NET "data2(11)" LOC = "P85"; 81 | NET "data2(12)" LOC = "P86"; 82 | NET "data2(13)" LOC = "P87"; 83 | NET "data2(14)" LOC = "P93"; 84 | NET "data2(15)" LOC = "P94"; 85 | NET "ramsn1" LOC = "P186"; 86 | NET "ramsn2" LOC = "P109"; 87 | NET "ramoen1" LOC = "P228"; 88 | NET "ramoen2" LOC = "P95"; 89 | NET "rwen1" LOC = "P201"; 90 | NET "rwen2" LOC = "P68"; 91 | 92 | # UART 1 93 | NET "rxd1" LOC = "P184"; 94 | NET "txd1" LOC = "P178"; 95 | #NET "rts1" LOC = "P123" 96 | #NET "cts1" LOC = "P185" 97 | 98 | # DSU 99 | NET "dsurx" LOC = "P185"; 100 | NET "dsutx" LOC = "P123"; 101 | # DSU enable at SW6-1 102 | NET "dsuen" LOC = "P161"; 103 | # DSU break at SW6-2 104 | NET "dsubre" LOC = "P159"; 105 | # DSU active at LED bar 3 106 | NET "dsuact" LOC = "P160"; 107 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/hecht-xsv800/leon.xst: -------------------------------------------------------------------------------- 1 | elaborate -ifmt vhdl -ifn ../../leon/leon.vhd 2 | elaborate -ifmt vhdl -ifn ../../leon/leon_eth.vhd 3 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/hecht-xsv800/leon_eth.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon.tcl" 3 | 4 | set_option -top_module "leon_eth_xsv800" 5 | project -result_file "./leon_eth.edf" 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/tiggeler-xcv800/.recordref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/boards/tiggeler-xcv800/.recordref -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/tiggeler-xcv800/Makefile: -------------------------------------------------------------------------------- 1 | 2 | EFFORT=3 3 | DEVICE=xcv800-hq240-6 4 | 5 | all: 6 | @if test "$(SYN)" = "synplify"; then make leon.bit; else make leon_xst.bit; fi; 7 | 8 | help: 9 | @echo 10 | @echo " choose one of following targets:" 11 | @echo 12 | @echo " make all : synthesis and place&route" 13 | @echo " make clean : remove all temporary files except config and fpga bitfiles" 14 | @echo " make dist-clean : remove all temporary files" 15 | @echo 16 | @echo " XST is used by default, to use Synplify do 'make SYN=synplify'" 17 | @echo 18 | 19 | leon.edf: ../../leon/device.vhd ../../leon/device.v 20 | synplify -batch leon.prj 21 | 22 | leon.ngc: ../../leon/device.vhd 23 | -rm -rf xst 24 | xst -ifn ../../syn/ise/leon.xst 25 | ../../syn/ise/xstrun leon ../../leon/leon.vhd $(DEVICE) > xst.scr 26 | xst -ifn xst.scr 27 | 28 | leon_xst.bit: leon.ngc 29 | ../../syn/ise/route_ngc leon leon.ucf $(DEVICE) $(EFFORT) 30 | 31 | leon.bit: leon.edf 32 | ../../syn/ise/route leon leon.ucf $(DEVICE) $(EFFORT) 33 | 34 | clean: 35 | -rm -rf *.ngc *.bgn *.bld *.dly *.drc *.ll *.mrp *.msk *.ncd *.ngd \ 36 | *.ngm *.pad *.par *.pcf *.srp *.twr *.xpi *.nav *.lst *.scr \ 37 | xst *.tlg *.log *.srs *.srr *.plg *.fse *.vhm *.srm *.srd *.edf *.edn \ 38 | *.prd *.ngo *.jhd __projnav* 39 | 40 | dist-clean: clean 41 | -rm -f *.bit 42 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/tiggeler-xcv800/bitgen.ut: -------------------------------------------------------------------------------- 1 | -g ConfigRate:4 2 | -g CclkPin:PULLUP 3 | -g TdoPin:PULLNONE 4 | -g M1Pin:PULLUP 5 | -g DonePin:PULLUP 6 | -g DriveDone:Yes 7 | -g StartUpClk:CCLK 8 | -g DONE_cycle:4 9 | -g GTS_cycle:5 10 | -g M0Pin:PULLUP 11 | -g M2Pin:PULLUP 12 | -g ProgPin:PULLUP 13 | -g TckPin:PULLUP 14 | -g TdiPin:PULLUP 15 | -g TmsPin:PULLUP 16 | -g DonePipe:No 17 | -g GWE_cycle:6 18 | -g LCK_cycle:NoWait 19 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/tiggeler-xcv800/leon.prj: -------------------------------------------------------------------------------- 1 | source "leon.tcl" 2 | 3 | set_option -top_module "leon" 4 | project -result_file "./leon.edf" 5 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/tiggeler-xcv800/leon.sdc: -------------------------------------------------------------------------------- 1 | 2 | define_clock -name {clk} -freq 50.0 -clockgroup default_clkgroup 3 | define_clock -name {pci_clk_in} -freq 40.000 -clockgroup pci_clkgroup 4 | define_clock -name {erx_clk} -freq 30.000 -clockgroup erx_clk_clkgroup 5 | define_clock -name {etx_clk} -freq 30.000 -clockgroup etx_clk_clkgroup 6 | 7 | define_output_delay -default 8.00 -ref clk:r 8 | define_input_delay -default 10.00 -ref clk:r 9 | define_output_delay -default 14.00 -ref pci_clk_in:r 10 | define_input_delay -default 18.00 -ref pci_clk_in:r 11 | define_output_delay -default 8.00 -ref erx_clk:r 12 | define_input_delay -default 10.00 -ref erx_clk:r 13 | define_output_delay -default 8.00 -ref etx_clk:r 14 | define_input_delay -default 10.00 -ref etx_clk:r 15 | 16 | define_global_attribute syn_useioff {1} 17 | define_attribute {pci_rst_in_n} xc_padtype {ibuf_pci33_3} 18 | define_attribute {pci_clk_in} xc_padtype {ibuf_pci33_3} 19 | define_attribute {pci_gnt_in_n} xc_padtype {ibuf_pci33_3} 20 | define_attribute {pci_idsel_in} xc_padtype {ibuf_pci33_3} 21 | define_attribute {pci_lock_n} xc_padtype {iobuf_pci33_3} 22 | define_attribute {pci_ad[31:0]} xc_padtype {iobuf_pci33_3} 23 | define_attribute {pci_cbe_n[3:0]} xc_padtype {iobuf_pci33_3} 24 | define_attribute {pci_frame_n} xc_padtype {iobuf_pci33_3} 25 | define_attribute {pci_irdy_n} xc_padtype {iobuf_pci33_3} 26 | define_attribute {pci_trdy_n} xc_padtype {iobuf_pci33_3} 27 | define_attribute {pci_devsel_n} xc_padtype {iobuf_pci33_3} 28 | define_attribute {pci_stop_n} xc_padtype {iobuf_pci33_3} 29 | define_attribute {pci_perr_n} xc_padtype {iobuf_pci33_3} 30 | define_attribute {pci_par} xc_padtype {iobuf_pci33_3} 31 | define_attribute {pci_req_n} xc_padtype {iobuf_pci33_3} 32 | define_attribute {pci_serr_n} xc_padtype {iobuf_pci33_3} 33 | define_attribute {pci_arb_req_n[0:3]} xc_padtype {ibuf_pci33_3} 34 | define_attribute {pci_arb_gnt_n[0:3]} xc_padtype {obuf_pci33_3} 35 | define_attribute {p:power_state[1:0]} xc_padtype {obuf_pci33_3} 36 | define_attribute {p:pme_enable} xc_padtype {obuf_pci33_3} 37 | define_attribute {p:pme_clear} xc_padtype {obuf_pci33_3} 38 | define_attribute {pme_status} xc_padtype {ibuf_pci33_3} 39 | define_attribute {pci_host} xc_padtype {ibuf_pci33_3} 40 | define_attribute {pci_66} xc_padtype {ibuf_pci33_3} 41 | define_attribute -disable {pci_irdy_n} xc_nodelay {1} 42 | define_attribute -disable {pci_frame_n} xc_nodelay {1} 43 | define_attribute -disable {pci_gnt_in_n} xc_nodelay {1} 44 | define_attribute -disable {pci_stop_n} xc_nodelay {1} 45 | define_attribute -disable {pci_rst_in_n} xc_nodelay {1} 46 | define_attribute -disable {pci_trdy_n} xc_nodelay {1} 47 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/boards/tiggeler-xcv800/leon.tcl: -------------------------------------------------------------------------------- 1 | source "../../syn/synplify/leon_files.tcl" 2 | add_file -constraint "leon.sdc" 3 | 4 | impl -add syn 5 | 6 | set_option -technology VIRTEX 7 | set_option -part XCV800 8 | set_option -package HQ240 9 | set_option -speed_grade -6 10 | 11 | set_option -default_enum_encoding onehot 12 | set_option -symbolic_fsm_compiler 0 13 | set_option -resource_sharing 0 14 | set_option -use_fsm_explorer 0 15 | 16 | #set_option -frequency 50.000 17 | set_option -fanout_limit 100 18 | set_option -disable_io_insertion 0 19 | set_option -pipe 1 20 | set_option -modular 0 21 | set_option -retiming 1 22 | 23 | set_option -write_verilog 0 24 | set_option -write_vhdl 1 25 | 26 | set_option -write_apr_constraint 0 27 | set_option -compiler_compatible 0 28 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/cds.lib: -------------------------------------------------------------------------------- 1 | include $CDS_INST_DIR/tools/inca/files/cds.lib 2 | DEFINE work leon/work 3 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/compile.do: -------------------------------------------------------------------------------- 1 | cd leon 2 | do compile.bat 3 | cd ../tbench 4 | do compile.bat 5 | cd .. 6 | echo "" 7 | echo " LEON model id compiled. Run the test bench with the following commanad:" 8 | echo "" 9 | echo " vsim tb_func32 -do \"run -all\" " 10 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/doc/ethernet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/doc/ethernet.pdf -------------------------------------------------------------------------------- /leon2-1.0.30-xst/doc/fpu_lth.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/doc/fpu_lth.pdf -------------------------------------------------------------------------------- /leon2-1.0.30-xst/doc/leon2-1.0.30-xst.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/doc/leon2-1.0.30-xst.pdf -------------------------------------------------------------------------------- /leon2-1.0.30-xst/hdl.var: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/hdl.var -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/ahbram.vhd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ---------------------------------------------------------------------------- 6 | -- This file is a part of the LEON VHDL model 7 | -- Copyright (C) 2003 Gaisler Research 8 | -- 9 | -- This library is free software; you can redistribute it and/or 10 | -- modify it under the terms of the GNU Lesser General Public 11 | -- License as published by the Free Software Foundation; either 12 | -- version 2 of the License, or (at your option) any later version. 13 | -- 14 | -- See the file COPYING.LGPL for the full details of the license. 15 | 16 | 17 | ----------------------------------------------------------------------------- 18 | -- Entity: ahbram 19 | -- File: ahbram.vhd 20 | -- Author: Jiri Gaisler - Gaisler Reserch 21 | -- Description: AHB ram. 0-waitstate read, 0/1-waitstate write. 22 | ------------------------------------------------------------------------------ 23 | 24 | library IEEE; 25 | use IEEE.std_logic_1164.all; 26 | use IEEE.std_logic_unsigned.conv_integer; 27 | use work.target.all; 28 | use work.config.all; 29 | use work.iface.all; 30 | use work.amba.all; 31 | use work.tech_map.all; 32 | 33 | entity ahbram is 34 | generic ( abits : integer := 10); 35 | port ( 36 | rst : in std_logic; 37 | clk : in clk_type; 38 | ahbsi : in ahb_slv_in_type; 39 | ahbso : out ahb_slv_out_type 40 | ); 41 | end; 42 | 43 | architecture rtl of ahbram is 44 | type reg_type is record 45 | hwrite : std_logic; 46 | hready : std_logic; 47 | hsel : std_logic; 48 | addr : std_logic_vector(abits+1 downto 0); 49 | size : std_logic_vector(1 downto 0); 50 | end record; 51 | signal r, c : reg_type; 52 | signal ramsel : std_logic; 53 | signal write : std_logic_vector(3 downto 0); 54 | signal ramaddr : std_logic_vector(abits-1 downto 0); 55 | begin 56 | 57 | comb : process (ahbsi, r, rst) 58 | variable bs : std_logic_vector(3 downto 0); 59 | variable v : reg_type; 60 | variable haddr : std_logic_vector(abits-1 downto 0); 61 | begin 62 | v := r; v.hready := '1'; bs := (others => '0'); 63 | if (r.hwrite or not r.hready) = '1' then haddr := r.addr(abits+1 downto 2); 64 | else 65 | haddr := ahbsi.haddr(abits+1 downto 2); bs := (others => '0'); 66 | end if; 67 | if ahbsi.hready = '1' then 68 | v.hsel := ahbsi.hsel and ahbsi.htrans(1); 69 | v.hwrite := ahbsi.hwrite and v.hsel; 70 | v.addr := ahbsi.haddr(abits+1 downto 0); 71 | v.size := ahbsi.hsize(1 downto 0); 72 | end if; 73 | if r.hwrite = '1' then 74 | case r.size(1 downto 0) is 75 | when "00" => bs (conv_integer(r.addr(1 downto 0))) := '1'; 76 | when "01" => bs := r.addr(1) & r.addr(1) & not (r.addr(1) & r.addr(1)); 77 | when others => bs := (others => '1'); 78 | end case; 79 | v.hready := not (v.hsel and not ahbsi.hwrite); 80 | v.hwrite := v.hwrite and v.hready; 81 | end if; 82 | if rst = '0' then v.hwrite := '0'; end if; 83 | write <= bs; ramsel <= v.hsel or r.hwrite; ahbso.hready <= r.hready; 84 | ramaddr <= haddr; c <= v; 85 | end process; 86 | 87 | ahbso.hresp <= "00"; ahbso.hsplit <= (others => '0'); 88 | 89 | ra : for i in 0 to 3 generate 90 | aram : syncram generic map (abits, 8) port map ( 91 | ramaddr, clk, ahbsi.hwdata(i*8+7 downto i*8), 92 | ahbso.hrdata(i*8+7 downto i*8), ramsel, write(3-i)); 93 | end generate; 94 | 95 | reg : process (clk) 96 | begin 97 | if rising_edge(clk ) then r <= c; end if; 98 | end process; 99 | end; 100 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/ahbstat.vhd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ---------------------------------------------------------------------------- 6 | -- This file is a part of the LEON VHDL model 7 | -- Copyright (C) 1999 European Space Agency (ESA) 8 | -- 9 | -- This library is free software; you can redistribute it and/or 10 | -- modify it under the terms of the GNU Lesser General Public 11 | -- License as published by the Free Software Foundation; either 12 | -- version 2 of the License, or (at your option) any later version. 13 | -- 14 | -- See the file COPYING.LGPL for the full details of the license. 15 | 16 | 17 | ----------------------------------------------------------------------------- 18 | -- Entity: ahbstat 19 | -- File: ahbstat.vhd 20 | -- Author: Jiri Gaisler - ESA/ESTEC 21 | -- Description: AHB status register. Latches the address and bus 22 | -- parameters when an error is signalled on the AHB bus. 23 | ------------------------------------------------------------------------------ 24 | 25 | library IEEE; 26 | use IEEE.std_logic_1164.all; 27 | use work.config.all; 28 | use work.iface.all; 29 | use work.amba.all; 30 | 31 | entity ahbstat is 32 | port ( 33 | rst : in std_logic; 34 | clk : in clk_type; 35 | ahbmi : in ahb_mst_in_type; 36 | ahbsi : in ahb_slv_in_type; 37 | apbi : in apb_slv_in_type; 38 | apbo : out apb_slv_out_type; 39 | ahbsto : out ahbstat_out_type 40 | 41 | ); 42 | end; 43 | 44 | architecture rtl of ahbstat is 45 | 46 | type memstattype is record 47 | hsize : std_logic_vector(2 downto 0); 48 | hmaster : std_logic_vector(3 downto 0); 49 | address : std_logic_vector(31 downto 0); -- failed address 50 | read : std_logic; 51 | newerr : std_logic; 52 | ahberr : std_logic; 53 | hresp : std_logic_vector(1 downto 0); 54 | end record; 55 | 56 | signal r, rin : memstattype; 57 | 58 | 59 | begin 60 | 61 | 62 | ctrl : process(rst, ahbmi, ahbsi, apbi, r) 63 | 64 | variable v : memstattype; 65 | variable regsd : std_logic_vector(31 downto 0); -- data from registers 66 | 67 | 68 | begin 69 | 70 | v := r; regsd := (others => '0'); 71 | 72 | case apbi.paddr(2 downto 2) is 73 | when "1" => regsd := r.address; 74 | when "0" => 75 | regsd := "00000000000000000000000" & r.newerr & r.read & 76 | r.hmaster & r.hsize ; 77 | 78 | when others => regsd := (others => '-'); 79 | end case; 80 | 81 | apbo.prdata <= regsd; 82 | 83 | if (apbi.psel and apbi.penable and apbi.pwrite) = '1' then 84 | case apbi.paddr(2 downto 2) is 85 | when "1" => v.address := apbi.pwdata; 86 | when "0" => 87 | 88 | v.newerr := apbi.pwdata(8); 89 | v.read := apbi.pwdata(7); 90 | v.hmaster := apbi.pwdata(6 downto 3); 91 | v.hsize := apbi.pwdata(2 downto 0); 92 | when others => null; 93 | end case; 94 | 95 | end if; 96 | 97 | v.hresp := ahbmi.hresp; 98 | 99 | if (ahbsi.hready = '1') then 100 | 101 | if (r.newerr = '0') then 102 | if (r.hresp = HRESP_ERROR) then v.newerr := '1'; 103 | else 104 | v.hmaster := ahbsi.hmaster; v.address := ahbsi.haddr; 105 | v.read := not ahbsi.hwrite; v.hsize := ahbsi.hsize; 106 | end if; 107 | end if; 108 | v.hresp := HRESP_OKAY; 109 | end if; 110 | 111 | if rst = '0' then 112 | v.newerr := '0'; v.hresp := HRESP_OKAY; 113 | end if; 114 | 115 | v.ahberr := v.newerr and not r.newerr; 116 | 117 | rin <= v; 118 | ahbsto.ahberr <= r.ahberr; 119 | 120 | end process; 121 | 122 | 123 | memstatregs : process(clk) 124 | begin if rising_edge(clk) then r <= rin; end if; end process; 125 | 126 | 127 | 128 | end; 129 | 130 | 131 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/cds.lib: -------------------------------------------------------------------------------- 1 | include $CDS_INST_DIR/tools/inca/files/cds.lib 2 | DEFINE work ./work 3 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/compile.bat: -------------------------------------------------------------------------------- 1 | vlib work 2 | vlog -quiet ethermac.v 3 | vcom -quiet amba.vhd 4 | vcom -quiet target.vhd 5 | vcom -quiet device.vhd 6 | vcom -quiet config.vhd 7 | vcom -quiet sparcv8.vhd 8 | vcom -quiet mmuconfig.vhd 9 | vcom -quiet iface.vhd 10 | vcom -quiet macro.vhd 11 | vcom -quiet debug.vhd 12 | vcom -quiet ambacomp.vhd 13 | vcom -quiet multlib.vhd 14 | vcom -quiet tech_generic.vhd 15 | vcom -quiet tech_proasic.vhd 16 | vcom -quiet tech_axcel.vhd 17 | vcom -quiet tech_atc18.vhd 18 | vcom -quiet tech_tsmc25.vhd 19 | vcom -quiet tech_atc35.vhd 20 | vcom -quiet tech_atc25.vhd 21 | vcom -quiet tech_atc18.vhd 22 | vcom -quiet tech_umc18.vhd 23 | vcom -quiet tech_fs90.vhd 24 | vcom -quiet bprom.vhd 25 | vcom -quiet tech_virtex.vhd 26 | vcom -quiet tech_virtex2.vhd 27 | vcom -quiet tech_map.vhd 28 | vcom -quiet fpulib.vhd 29 | vcom -quiet meiko.vhd 30 | vcom -quiet fpu_lth.vhd 31 | vcom -quiet fpu_core.vhd 32 | vcom -quiet grfpc.vhd 33 | vcom -quiet fp1eu.vhd 34 | vcom -quiet mmu_icache.vhd 35 | vcom -quiet mmu_dcache.vhd 36 | vcom -quiet mmu_acache.vhd 37 | vcom -quiet mmutlbcam.vhd 38 | vcom -quiet mmulrue.vhd 39 | vcom -quiet mmulru.vhd 40 | vcom -quiet mmutlb.vhd 41 | vcom -quiet mmutw.vhd 42 | vcom -quiet mmu.vhd 43 | vcom -quiet mmu_cache.vhd 44 | vcom -quiet mul.vhd 45 | vcom -quiet div.vhd 46 | vcom -quiet rstgen.vhd 47 | vcom -quiet iu.vhd 48 | vcom -quiet icache.vhd 49 | vcom -quiet dcache.vhd 50 | vcom -quiet cachemem.vhd 51 | vcom -quiet acache.vhd 52 | vcom -quiet cache.vhd 53 | vcom -quiet proc.vhd 54 | vcom -quiet irqctrl2.vhd 55 | vcom -quiet apbmst.vhd 56 | vcom -quiet ahbarb.vhd 57 | vcom -quiet lconf.vhd 58 | vcom -quiet wprot.vhd 59 | vcom -quiet ahbtest.vhd 60 | vcom -quiet ahbram.vhd 61 | vcom -quiet ahbstat.vhd 62 | vcom -quiet timers.vhd 63 | vcom -quiet irqctrl.vhd 64 | vcom -quiet uart.vhd 65 | vcom -quiet ioport.vhd 66 | vcom -quiet sdmctrl.vhd 67 | vcom -quiet mctrl.vhd 68 | vcom -quiet ahbmst.vhd 69 | vcom -quiet dcom_uart.vhd 70 | vcom -quiet dcom.vhd 71 | vcom -quiet dma.vhd 72 | vcom -quiet dsu.vhd 73 | vcom -quiet dsu_mem.vhd 74 | vcom -quiet pci_arb.vhd 75 | vcom -quiet pci_gr.vhd 76 | vcom -quiet pci.vhd 77 | vcom -quiet eth_oc.vhd 78 | vcom -quiet mcore.vhd 79 | vcom -quiet leon_pci.vhd 80 | vcom -quiet leon.vhd 81 | vcom -quiet leon_eth.vhd 82 | vcom -quiet leon_eth_pci.vhd 83 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/device.v: -------------------------------------------------------------------------------- 1 | 2 | `define HEADER_VENDOR_ID 16'h0000 3 | `define HEADER_DEVICE_ID 16'h0000 4 | `define HEADER_REVISION_ID 8'h00 5 | 6 | `define FPGA 7 | `define XILINX 8 | `define WBW_ADDR_LENGTH 7 9 | `define WBR_ADDR_LENGTH 7 10 | `define PCIW_ADDR_LENGTH 7 11 | `define PCIR_ADDR_LENGTH 7 12 | `define PCI_FIFO_RAM_ADDR_LENGTH 8 13 | `define WB_FIFO_RAM_ADDR_LENGTH 8 14 | 15 | `define ETH_WISHBONE_B3 16 | 17 | `define ETH_TX_FIFO_CNT_WIDTH 4 18 | `define ETH_TX_FIFO_DEPTH 8 19 | 20 | `define ETH_RX_FIFO_CNT_WIDTH 4 21 | `define ETH_RX_FIFO_DEPTH 8 22 | 23 | `define ETH_BURST_CNT_WIDTH 3 24 | `define ETH_BURST_LENGTH 4 25 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/ethermac.v: -------------------------------------------------------------------------------- 1 | `include "device.v" 2 | `include "eth_top.v" 3 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/fpu_core.vhd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ---------------------------------------------------------------------------- 6 | -- This file is a part of the LEON VHDL model 7 | -- Copyright (C) 1999 European Space Agency (ESA) 8 | -- 9 | -- This library is free software; you can redistribute it and/or 10 | -- modify it under the terms of the GNU Lesser General Public 11 | -- License as published by the Free Software Foundation; either 12 | -- version 2 of the License, or (at your option) any later version. 13 | -- 14 | -- See the file COPYING.LGPL for the full details of the license. 15 | 16 | 17 | ----------------------------------------------------------------------------- 18 | -- Entity: fpu_core 19 | -- File: fpu_core.vhd 20 | -- Author: Jiri Gaisler - Gaisler Research 21 | -- Description: Wrapper around Meiko compatible FPU cores 22 | ------------------------------------------------------------------------------ 23 | library IEEE; 24 | use IEEE.std_logic_1164.all; 25 | 26 | use work.target.all; 27 | use work.config.all; 28 | use work.iface.all; 29 | use work.fpulib.all; 30 | 31 | entity fpu_core is 32 | port ( 33 | clk : in clk_type; -- main clock 34 | fpui : in fpu_in_type; 35 | fpuo : out fpu_out_type 36 | ); 37 | end; 38 | 39 | architecture rtl of fpu_core is 40 | begin 41 | 42 | meiko0 : if FPCORE = meiko generate 43 | fpu0 : fpu port map ( 44 | ss_clock => clk, 45 | FpInst => fpui.FpInst, 46 | FpOp => fpui.fpop, 47 | FpLd => fpui.FpLd, 48 | Reset => fpui.reset, 49 | fprf_dout1 => fpui.fprf_dout1, 50 | fprf_dout2 => fpui.fprf_dout2, 51 | RoundingMode => fpui.RoundingMode, 52 | FpBusy => fpuo.FpBusy, 53 | FracResult => fpuo.FracResult, 54 | ExpResult => fpuo.ExpResult, 55 | SignResult => fpuo.SignResult, 56 | SNnotDB => fpuo.SNnotDB, 57 | Excep => fpuo.Excep, 58 | ConditionCodes => fpuo.ConditionCodes, 59 | ss_scan_mode => fpui.ss_scan_mode, 60 | fp_ctl_scan_in => fpui.fp_ctl_scan_in, 61 | fp_ctl_scan_out => fpuo.fp_ctl_scan_out 62 | ); 63 | end generate; 64 | 65 | lth0 : if FPCORE = lth generate 66 | fpu0 : fpu_lth port map ( 67 | 68 | ss_clock => clk, 69 | 70 | FpInst => fpui.FpInst, 71 | FpOp => fpui.fpop, 72 | FpLd => fpui.FpLd, 73 | Reset => fpui.reset, 74 | fprf_dout1 => fpui.fprf_dout1, 75 | fprf_dout2 => fpui.fprf_dout2, 76 | RoundingMode => fpui.RoundingMode, 77 | FpBusy => fpuo.FpBusy, 78 | FracResult => fpuo.FracResult, 79 | ExpResult => fpuo.ExpResult, 80 | SignResult => fpuo.SignResult, 81 | SNnotDB => fpuo.SNnotDB, 82 | Excep => fpuo.Excep, 83 | ConditionCodes => fpuo.ConditionCodes, 84 | ss_scan_mode => fpui.ss_scan_mode, 85 | fp_ctl_scan_in => fpui.fp_ctl_scan_in, 86 | fp_ctl_scan_out => fpuo.fp_ctl_scan_out 87 | ); 88 | end generate; 89 | 90 | end; 91 | 92 | 93 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/hdl.var: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/leon/hdl.var -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/lconf.vhd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ---------------------------------------------------------------------------- 6 | -- This file is a part of the LEON VHDL model 7 | -- Copyright (C) 1999 European Space Agency (ESA) 8 | -- 9 | -- This library is free software; you can redistribute it and/or 10 | -- modify it under the terms of the GNU Lesser General Public 11 | -- License as published by the Free Software Foundation; either 12 | -- version 2 of the License, or (at your option) any later version. 13 | -- 14 | -- See the file COPYING.LGPL for the full details of the license. 15 | 16 | 17 | ----------------------------------------------------------------------------- 18 | -- Entity: lconf 19 | -- File: lconf.vhd 20 | -- Author: Jiri Gaisler - ESA/ESTEC 21 | -- Description: LEON configuration register. Returns the configuration 22 | -- of the processor. 23 | ------------------------------------------------------------------------------ 24 | 25 | library IEEE; 26 | use IEEE.std_logic_1164.all; 27 | use IEEE.std_logic_arith.all; 28 | use work.target.all; 29 | use work.config.all; 30 | use work.mmuconfig.all; 31 | use work.iface.all; 32 | use work.amba.all; 33 | entity lconf is 34 | port ( 35 | rst : std_logic; 36 | apbo : out apb_slv_out_type 37 | ); 38 | end; 39 | 40 | architecture rtl of lconf is 41 | 42 | begin 43 | 44 | beh : process(rst) 45 | variable regsd : std_logic_vector(31 downto 0); 46 | begin 47 | regsd := (others => '0'); 48 | if WPROTEN then regsd(1 downto 0) := "01"; end if; 49 | case PCICORE is 50 | when none => regsd(3 downto 2) := "00"; 51 | -- when insilicon => regsd(3 downto 2) := "01"; 52 | -- when opencores => regsd(3 downto 2) := "10"; 53 | when others => regsd(3 downto 2) := "11"; 54 | end case; 55 | if FPEN then 56 | if (FPCORE = meiko) then regsd(5 downto 4) := "01"; 57 | else regsd(5 downto 4) := "10"; end if; 58 | end if; 59 | if AHBSTATEN then regsd(6) := '1'; end if; 60 | if WDOGEN then regsd(7) := '1'; end if; 61 | if MULTIPLIER /= none then regsd(8) := '1'; end if; 62 | if DIVIDER /= none then regsd(9) := '1'; end if; 63 | regsd(11 downto 10) := std_logic_vector(conv_unsigned(DLINE_BITS, 2)); 64 | regsd(14 downto 12) := std_logic_vector(conv_unsigned(DLINE_BITS+DOFFSET_BITS-8, 3)); 65 | regsd(16 downto 15) := std_logic_vector(conv_unsigned(ILINE_BITS, 2)); 66 | regsd(19 downto 17) := std_logic_vector(conv_unsigned(ILINE_BITS+IOFFSET_BITS-8, 3)); 67 | regsd(24 downto 20) := std_logic_vector(conv_unsigned(NWINDOWS-1,5)); 68 | if MACEN then regsd(25) := '1'; end if; 69 | regsd(28 downto 26) := std_logic_vector(conv_unsigned(WATCHPOINTS,3)); 70 | if SDRAMEN then regsd(29) := '1'; end if; 71 | if DEBUG_UNIT then regsd(30) := '1'; end if; 72 | if M_EN then regsd(31) := '1'; end if; 73 | 74 | apbo.prdata <= regsd; 75 | 76 | end process; 77 | 78 | 79 | end; 80 | 81 | 82 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/meiko.vhd: -------------------------------------------------------------------------------- 1 | 2 | ---------------------------------------------------------------------------- 3 | -- This file is a part of the LEON VHDL model 4 | -- Copyright (C) 1999 European Space Agency (ESA) 5 | -- 6 | -- This library is free software; you can redistribute it and/or 7 | -- modify it under the terms of the GNU Lesser General Public 8 | -- License as published by the Free Software Foundation; either 9 | -- version 2 of the License, or (at your option) any later version. 10 | -- 11 | -- See the file COPYING.LGPL for the full details of the license. 12 | 13 | 14 | ----------------------------------------------------------------------------- 15 | -- Entity: meiko 16 | -- File: meiko.vhd 17 | -- Description: Dummy version of Meiko FPU 18 | ------------------------------------------------------------------------------ 19 | library IEEE; 20 | use IEEE.Std_Logic_1164.all; 21 | use work.iface.all; 22 | 23 | entity fpu is 24 | port( 25 | ss_clock : in clk_type; 26 | FpInst : in std_logic_vector(9 downto 0); 27 | FpOp : in std_logic; 28 | FpLd : in std_logic; 29 | Reset : in std_logic; 30 | fprf_dout1 : in std_logic_vector(63 downto 0); 31 | fprf_dout2 : in std_logic_vector(63 downto 0); 32 | RoundingMode : in std_logic_vector(1 downto 0); 33 | FpBusy : out std_logic; 34 | FracResult : out std_logic_vector(54 downto 3); 35 | ExpResult : out std_logic_vector(10 downto 0); 36 | SignResult : out std_logic; 37 | SNnotDB : out std_logic; 38 | Excep : out std_logic_vector(5 downto 0); 39 | ConditionCodes : out std_logic_vector(1 downto 0); 40 | ss_scan_mode : in std_logic; 41 | fp_ctl_scan_in : in std_logic; 42 | fp_ctl_scan_out : out std_logic 43 | 44 | ); 45 | end; 46 | 47 | architecture rtl of fpu is 48 | begin 49 | FpBusy <= '1'; 50 | FracResult <= (others => '0'); 51 | ExpResult <= (others => '0'); 52 | Excep <= (others => '0'); 53 | ConditionCodes <= (others => '0'); 54 | SignResult <= '0'; 55 | SNnotDB <= '0'; 56 | 57 | end; 58 | 59 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/mmuconfig.vhd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/leon/mmuconfig.vhd -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/mmulrue.vhd: -------------------------------------------------------------------------------- 1 | ---------------------------------------------------------------------------- 2 | -- This file is a part of the LEON VHDL model 3 | -- Copyright (C) 2003 Gaisler Research, all rights reserved 4 | -- 5 | -- This library is free software; you can redistribute it and/or 6 | -- modify it under the terms of the GNU Lesser General Public 7 | -- License as published by the Free Software Foundation; either 8 | -- version 2 of the License, or (at your option) any later version. 9 | -- 10 | -- See the file COPYING.LGPL for the full details of the license. 11 | ---------------------------------------------------------------------------- 12 | 13 | -- Konrad Eisele ,2002 14 | 15 | library ieee; 16 | use ieee.std_logic_1164.all; 17 | use IEEE.std_logic_arith.all; 18 | use IEEE.std_logic_unsigned."+"; 19 | use IEEE.std_logic_unsigned.conv_integer; 20 | use work.iface.all; 21 | use work.config.all; 22 | use work.mmuconfig.all; 23 | use work.target.all; 24 | 25 | entity mmulrue is 26 | generic ( 27 | position : integer; 28 | entries : integer := 8 ); 29 | port ( 30 | rst : in std_logic; 31 | clk : in clk_type; 32 | lruei : in mmulrue_in_type; 33 | lrueo : out mmulrue_out_type ); 34 | end mmulrue; 35 | 36 | architecture rtl of mmulrue is 37 | 38 | constant entries_log : integer := log2(entries); 39 | type lru_rtype is record 40 | pos : std_logic_vector(entries_log-1 downto 0); 41 | movetop : std_logic; 42 | -- pragma translate_off 43 | dummy : std_logic; 44 | -- pragma translate_on 45 | end record; 46 | 47 | signal c,r : lru_rtype; 48 | begin 49 | 50 | p0: process (clk, rst, r, c, lruei) 51 | variable v : lru_rtype; 52 | begin 53 | v := r; 54 | -- #init 55 | 56 | if (r.movetop and (not lruei.fromleft)) = '1' then 57 | v.pos := lruei.left(entries_log-1 downto 0); 58 | v.movetop := '0'; 59 | elsif (lruei.fromright) = '1' then 60 | v.pos := lruei.right(entries_log-1 downto 0); 61 | v.movetop := not lruei.clear; 62 | end if; 63 | 64 | if (lruei.touch and not lruei.clear) = '1' then -- touch request 65 | if (v.pos = lruei.pos(entries_log-1 downto 0)) then -- check 66 | v.movetop := '1'; 67 | end if; 68 | end if; 69 | 70 | if (rst) = '0' then 71 | v.pos := std_logic_vector(conv_unsigned(position, entries_log)); 72 | v.movetop := '0'; 73 | end if; 74 | 75 | --# Drive signals 76 | lrueo.pos(entries_log-1 downto 0) <= r.pos; 77 | lrueo.movetop <= r.movetop; 78 | 79 | c <= v; 80 | end process p0; 81 | 82 | p1: process (clk) 83 | begin if rising_edge(clk) then r <= c; end if; 84 | end process p1; 85 | 86 | end rtl; 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/pci.vhd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ---------------------------------------------------------------------------- 6 | -- This file is a part of the LEON VHDL model 7 | -- Copyright (C) 1999 European Space Agency (ESA) 8 | -- 9 | -- This library is free software; you can redistribute it and/or 10 | -- modify it under the terms of the GNU Lesser General Public 11 | -- License as published by the Free Software Foundation; either 12 | -- version 2 of the License, or (at your option) any later version. 13 | -- 14 | -- See the file COPYING.LGPL for the full details of the license. 15 | 16 | 17 | ----------------------------------------------------------------------------- 18 | -- Entity: pci 19 | -- File: pci.vhd 20 | -- Author: Jiri Gaisler - Gaisler Reserch 21 | -- Description: Module containing all possible PCI cores 22 | ------------------------------------------------------------------------------ 23 | 24 | library IEEE; 25 | use IEEE.std_logic_1164.all; 26 | use work.target.all; 27 | use work.config.all; 28 | use work.iface.all; 29 | use work.amba.all; 30 | use work.ambacomp.all; 31 | 32 | entity pci is 33 | port ( 34 | resetn : in std_logic; 35 | clk : in clk_type; 36 | pciclk : in clk_type; 37 | pcirst : in std_logic; 38 | pcii : in pci_in_type; 39 | pcio : out pci_out_type; 40 | apbi : in apb_slv_in_type; 41 | apbo : out apb_slv_out_type; 42 | ahbmi1 : in ahb_mst_in_type; 43 | ahbmo1 : out ahb_mst_out_type; 44 | ahbsi : in ahb_slv_in_type; 45 | ahbso : out ahb_slv_out_type; 46 | irq : out std_logic 47 | ); 48 | end; 49 | 50 | architecture rtl of pci is 51 | 52 | signal gnd4 : std_logic_vector(3 downto 0); 53 | 54 | begin 55 | 56 | pci_gr0 : if PCICORE = simple_target generate 57 | pci0 : pci_gr 58 | generic map (PCI_DEVICE_ID, PCI_VENDOR_ID, 2) 59 | port map ( resetn, pcirst, clk, pciclk, pcii, pcio, 60 | ahbmi1, ahbmo1, ahbsi, ahbso, apbi, apbo); 61 | end generate; 62 | 63 | irq <= '0'; 64 | 65 | end ; 66 | 67 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/rstgen.vhd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ---------------------------------------------------------------------------- 6 | -- This file is a part of the LEON VHDL model 7 | -- Copyright (C) 1999 European Space Agency (ESA) 8 | -- 9 | -- This library is free software; you can redistribute it and/or 10 | -- modify it under the terms of the GNU Lesser General Public 11 | -- License as published by the Free Software Foundation; either 12 | -- version 2 of the License, or (at your option) any later version. 13 | -- 14 | -- See the file COPYING.LGPL for the full details of the license. 15 | 16 | 17 | ----------------------------------------------------------------------------- 18 | -- Entity: rstgen 19 | -- File: rstgen.vhd 20 | -- Author: Jiri Gaisler - ESA/ESTEC 21 | -- Description: Reset generation for both processor and PCI interface. Reset 22 | -- is generated for 4 extra clock after external reset has been 23 | -- de-asserted. 24 | 25 | ------------------------------------------------------------------------------ 26 | 27 | library IEEE; 28 | use IEEE.std_logic_1164.all; 29 | use work.config.all; 30 | use work.iface.all; 31 | 32 | entity rstgen is 33 | port ( 34 | rstin : in std_logic; 35 | pcirstin : in std_logic; 36 | clk : in clk_type; 37 | pciclk : in clk_type; 38 | rstout : out std_logic; 39 | pcirstout : out std_logic; 40 | cgo : in clkgen_out_type 41 | ); 42 | end; 43 | 44 | architecture rtl of rstgen is 45 | signal r, rin : std_logic_vector(4 downto 0); 46 | signal pcir, pcirin : std_logic_vector(4 downto 0); 47 | signal reset : std_logic; 48 | 49 | begin 50 | 51 | reset <= rstin and pcirstin when PCIEN and PCIRSTALL else rstin; 52 | 53 | -- processor reset generation 54 | 55 | 56 | reg1 : process (clk,reset) begin 57 | if reset = '0' then r <= "00000"; rstout <= '0'; 58 | elsif rising_edge(clk) then 59 | r <= r(3 downto 0) & cgo.clklock; 60 | rstout <= r(4) and r(3) and r(2); 61 | end if; 62 | end process; 63 | 64 | 65 | -- pci reset generation 66 | 67 | pr0 : if PCIEN generate 68 | reg2 : process (pciclk,pcirstin) begin 69 | if pcirstin = '0' then pcir <= "00000"; pcirstout <= '0'; 70 | elsif rising_edge(pciclk) then 71 | pcir <= pcir(3 downto 0) & cgo.pcilock; 72 | pcirstout <= pcir(4) and pcir(3) and pcir(2); 73 | end if; 74 | end process; 75 | end generate; 76 | 77 | end; 78 | 79 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/leon/transcript: -------------------------------------------------------------------------------- 1 | # vsim -c grfpc 2 | # Loading /usr/local/modeltech/bin/../linux/../std.standard 3 | # Loading /usr/local/modeltech/bin/../linux/../ieee.std_logic_1164(body) 4 | # Loading work.target 5 | # Loading /usr/local/modeltech/bin/../linux/../ieee.std_logic_arith(body) 6 | # Loading work.device 7 | # Loading /usr/local/modeltech/bin/../linux/../std.textio(body) 8 | # Loading work.config 9 | # Loading work.mmuconfig 10 | # Loading work.sparcv8 11 | # Loading work.iface 12 | # Loading work.grfpc(rtl) 13 | # ** Warning: (vsim-3473) Component 'grfpcw2_0' is not bound. 14 | # Time: 0 ps Iteration: 0 Region: /grfpc File: grfpc.vhd 15 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/pmon/Makefile: -------------------------------------------------------------------------------- 1 | 2 | # Make sure that TOP64K and MKPROMOPT reflect your hardware !! 3 | 4 | CC=gcc 5 | 6 | # Top 64 kbyte of ram, reserved for rdbmon stack and data 7 | TOP64K = 0x403f0000 8 | 9 | # mkprom options 10 | MKPROMOPT = -ramsize 4096 -romsize 512 -ramcs 2 -freq 24.576 -romws 1 -rmw \ 11 | -ramwidth 32 -baud 38400 12 | 13 | all: rom2vhdl bprom.vhd eprom.srec virtex_prom2048.mif 14 | 15 | bin2mif: bin2mif.c 16 | $(CC) bin2mif.c -o bin2mif 17 | 18 | rom2vhdl: rom2vhdl.c 19 | $(CC) rom2vhdl.c -o rom2vhdl 20 | 21 | bprom.vhd: rom2vhdl bin2mif bprom.c 22 | sparc-rtems-gcc -nostdlib -nostdinc -O2 -Ttext=0 bprom.c -o bprom.exe 23 | sparc-rtems-objcopy -O binary bprom.exe bprom.bin 24 | ./rom2vhdl bprom.bin -o bprom.vhd 25 | ./bin2mif < bprom.bin > virtex_prom256.mif 26 | 27 | eprom.srec: eprom.c 28 | sparc-rtems-gcc -nostdlib -nostdinc -O2 -Ttext=0 eprom.c -o eprom.exe 29 | sparc-rtems-objcopy -O srec eprom.exe eprom.srec 30 | 31 | virtex_prom2048.mif: lmon.o bin2mif 32 | sparc-rtems-gcc -O2 -qprom -Tdata=$(TOP64K) lmon.o -o lmon.exe 33 | mkprom $(MKPROMOPT) lmon.exe -o virtex_prom2048.exe 34 | sparc-rtems-objcopy -O binary virtex_prom2048.exe virtex_prom2048.bin 35 | ./bin2mif < virtex_prom2048.bin > virtex_prom2048.mif 36 | 37 | clean: 38 | -rm -f rom2vhdl bprom.vhd bprom bprom.bin eprom eprom.srec *.mif \ 39 | *.bin *.exe bin2mif virtex* prom.out 40 | 41 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/pmon/README.mon: -------------------------------------------------------------------------------- 1 | 2 | PMON simple S-record monitor, 3-2-2001 3 | ------------------------------------------- 4 | 5 | Introduction 6 | ------------ 7 | 8 | Pmon is a simple monitor that can be placed in an on-chip boot prom, 9 | external prom or cache memories (using the boot-cache configuration). 10 | Two versions are provided, one to be used for on-chip prom or caches 11 | (bprom.c) and one for external proms (eprom.c). The on-chip version 12 | automatically detects attached memory and configures the memory 13 | controller register (2). The external version (eprom.c) needs to 14 | be edited first to reflect the current board configuration. 15 | 16 | NOTE: this version must be compiled with an ELF-based compiler such 17 | as LECCS. 18 | 19 | Compilation 20 | ----------- 21 | 22 | First edit the board-specific parameters in the beging of eprom.c 23 | Then compile the monitors with: 24 | 25 | sparc-rtems-gcc -nostdlib -nostdinc -O2 -Ttext=0 eprom.c -o eprom 26 | sparc-rtems-gcc -nostdlib -nostdinc -O2 -Ttext=0 bprom.c -o bprom 27 | 28 | To generate a binary image to be used by rom2vhdl, convert as follows: 29 | 30 | sparc-rtems-objcopy -O binary bprom bprom.bin 31 | 32 | 33 | Conversion to your prom/cache format is left to the user. Note 34 | that you can use sparc-rtems-objcopy to convert PMON to S-records: 35 | 36 | sparc-rtems-objcopy -O srec eprom eprom.srec 37 | 38 | 39 | Usage 40 | ----- 41 | 42 | The monitor writes a boot message on UART1 transmitter and then 43 | waits for S-records to be downloaded on UART1 receiver. It 44 | recognises two types of S-records: memory contents and start 45 | address. A memory content S-record is saved to the appropriate 46 | address in memory, while a start address record will cause the 47 | monitor to jump to the indicated address. Applications 48 | compiled with LECCS (elf) can be converted to a suitable S-record 49 | stream with: 50 | 51 | sparc-rtems-objcopy -O srec app app.srec 52 | 53 | Good luck, Jiri. 54 | 55 | (jgais@gaisler.com) 56 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/pmon/README.romgen: -------------------------------------------------------------------------------- 1 | ROM2VHDL 2 | 3 | This is a simple ROM core generator. The produced cores are compatible 4 | with the Synplify tool from the Synplicity company. 5 | 6 | To install this utility just simply type make install. For uninstall 7 | procedure type make uninstall. It will creare (or remove) all directories 8 | you need. For details see Makefile. 9 | 10 | For help type rom2vhdl -h. For details about core template read the source 11 | code tmpl.vhdl. For the default template file place see the rom2vhdl source 12 | code in rom2vhdl.c. 13 | 14 | This code may be used under the terms of Version 2 of the GPL, 15 | read the file COPYING for details. 16 | 17 | NOTE: this version has been modifiedby Jiri Gaisler to provide 18 | boot-prom for LEON. Only the -a switch is still active, all 19 | other options are hardwired to LEON settings. 20 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/pmon/bin2mif.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | main() 5 | { 6 | int i = 0; 7 | unsigned char tc; 8 | int tmp; 9 | while (!feof(stdin)) { 10 | tc = getchar() & 0x0ff; 11 | tmp = (tmp << 8) | tc; 12 | i++; 13 | if (i == 4) { 14 | for (i=0; i<32; i++) { 15 | if (tmp < 0) putchar('1'); 16 | else putchar('0'); 17 | tmp <<= 1; 18 | } 19 | putchar('\n'); 20 | i = 0; 21 | } 22 | } 23 | exit(0); 24 | } 25 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/pmon/hello.c: -------------------------------------------------------------------------------- 1 | 2 | main() 3 | { 4 | printf("Hello world!\n"); 5 | } 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/pmon/lmon.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/pmon/lmon.o -------------------------------------------------------------------------------- /leon2-1.0.30-xst/pmon/tmpl.vhdl: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------- 2 | -- 3 | -- ROM core VHDL template. See the macro description included 4 | -- behind this frame. 5 | -- 6 | -- Copyright (C) 2000 Rudolf Matousek 7 | -- 8 | -- Modified by Jiri Gaisler for LEON boot prom. 9 | -- 10 | -- This code may be used under the terms of Version 2 of the GPL, 11 | -- read the file COPYING for details. 12 | -- 13 | -- 14 | ------------------------------------------------------------------------------- 15 | 16 | library ieee; 17 | use ieee.std_logic_1164.all; 18 | use ieee.std_logic_arith.all; 19 | 20 | entity gen_bprom is 21 | port( 22 | clk : in std_logic; 23 | csn : in std_logic; 24 | addr : in std_logic_vector (29 downto 0); 25 | data : out std_logic_vector (31 downto 0) 26 | ); 27 | end; 28 | 29 | architecture rtl of gen_bprom is 30 | signal raddr : std_logic_vector($a downto 0); 31 | signal d : std_logic_vector(31 downto 0); 32 | attribute syn_romstyle : string; 33 | attribute syn_romstyle of d : signal is "select_rom"; 34 | 35 | begin 36 | 37 | p : process(raddr) 38 | begin 39 | case raddr is 40 | $i 41 | when others => d <= (others => '-'); 42 | end case; 43 | end process; 44 | 45 | r : process (clk) 46 | begin 47 | if rising_edge(clk) then 48 | if csn = '0' then raddr <= addr($a downto 0); end if; 49 | end if; 50 | end process; 51 | 52 | data <= d; 53 | end rtl; 54 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/sim/modelsim/compile.do: -------------------------------------------------------------------------------- 1 | vlib leon/work 2 | vcom -quiet leon/amba.vhd 3 | vcom -quiet leon/target.vhd 4 | vcom -quiet leon/device.vhd 5 | vcom -quiet leon/config.vhd 6 | vcom -quiet leon/mmuconfig.vhd 7 | vcom -quiet leon/sparcv8.vhd 8 | vcom -quiet leon/iface.vhd 9 | vcom -quiet leon/macro.vhd 10 | vcom -quiet leon/debug.vhd 11 | vcom -quiet leon/ambacomp.vhd 12 | vcom -quiet leon/multlib.vhd 13 | vcom -quiet leon/tech_generic.vhd 14 | vcom -quiet leon/tech_proasic.vhd 15 | vcom -quiet leon/tech_axcel.vhd 16 | vcom -quiet leon/tech_atc18.vhd 17 | vcom -quiet leon/tech_tsmc25.vhd 18 | vcom -quiet leon/tech_atc35.vhd 19 | vcom -quiet leon/tech_atc25.vhd 20 | vcom -quiet leon/tech_atc18.vhd 21 | vcom -quiet leon/tech_umc18.vhd 22 | vcom -quiet leon/tech_fs90.vhd 23 | vcom -quiet leon/bprom.vhd 24 | vcom -quiet leon/tech_virtex.vhd 25 | vcom -quiet leon/tech_virtex2.vhd 26 | vcom -quiet leon/tech_map.vhd 27 | vcom -quiet leon/fpulib.vhd 28 | vcom -quiet leon/meiko.vhd 29 | vcom -quiet leon/fpu_lth.vhd 30 | vcom -quiet leon/fpu_core.vhd 31 | vcom -quiet leon/grfpc.vhd 32 | vcom -quiet leon/fp1eu.vhd 33 | vcom -quiet leon/mmu_icache.vhd 34 | vcom -quiet leon/mmu_dcache.vhd 35 | vcom -quiet leon/mmu_acache.vhd 36 | vcom -quiet leon/mmutlbcam.vhd 37 | vcom -quiet leon/mmulrue.vhd 38 | vcom -quiet leon/mmulru.vhd 39 | vcom -quiet leon/mmutlb.vhd 40 | vcom -quiet leon/mmutw.vhd 41 | vcom -quiet leon/mmu.vhd 42 | vcom -quiet leon/mmu_cache.vhd 43 | 44 | vcom -quiet leon/mul.vhd 45 | vcom -quiet leon/div.vhd 46 | vcom -quiet leon/rstgen.vhd 47 | vcom -quiet leon/iu.vhd 48 | vcom -quiet leon/icache.vhd 49 | vcom -quiet leon/dcache.vhd 50 | vcom -quiet leon/cachemem.vhd 51 | vcom -quiet leon/acache.vhd 52 | vcom -quiet leon/cache.vhd 53 | vcom -quiet leon/proc.vhd 54 | vcom -quiet leon/irqctrl2.vhd 55 | vcom -quiet leon/apbmst.vhd 56 | vcom -quiet leon/ahbarb.vhd 57 | vcom -quiet leon/ahbram.vhd 58 | vcom -quiet leon/lconf.vhd 59 | vcom -quiet leon/wprot.vhd 60 | vcom -quiet leon/ahbtest.vhd 61 | vcom -quiet leon/ahbstat.vhd 62 | vcom -quiet leon/timers.vhd 63 | vcom -quiet leon/irqctrl.vhd 64 | vcom -quiet leon/uart.vhd 65 | vcom -quiet leon/ioport.vhd 66 | vcom -quiet leon/sdmctrl.vhd 67 | vcom -quiet leon/mctrl.vhd 68 | vcom -quiet leon/ahbmst.vhd 69 | vcom -quiet leon/dcom_uart.vhd 70 | vcom -quiet leon/dcom.vhd 71 | vcom -quiet leon/dma.vhd 72 | vcom -quiet leon/dsu.vhd 73 | vcom -quiet leon/dsu_mem.vhd 74 | vlog -quiet +incdir+leon leon/ethermac.v 75 | vcom -quiet leon/pci_arb.vhd 76 | vcom -quiet leon/pci_gr.vhd 77 | vcom -quiet leon/pci.vhd 78 | vcom -quiet leon/eth_oc.vhd 79 | vcom -quiet leon/mcore.vhd 80 | vcom -quiet leon/leon.vhd 81 | vcom -quiet leon/leon_pci.vhd 82 | vcom -quiet leon/leon_eth_pci.vhd 83 | vcom -quiet leon/leon_eth.vhd 84 | 85 | vcom -quiet tbench/leonlib.vhd 86 | vcom -quiet tbench/iram.vhd 87 | vcom -quiet tbench/mt48lc16m16a2.vhd 88 | vcom -quiet tbench/testmod.vhd 89 | vcom -quiet tbench/mspram.vhd 90 | vcom -quiet tbench/bprom.vhd 91 | vcom -quiet tbench/tbgen.vhd 92 | vcom -quiet tbench/tblib.vhd 93 | vcom -quiet tbench/tbdef.vhd 94 | vcom -quiet tbench/tbleon.vhd 95 | vcom -quiet tbench/tb_msp.vhd 96 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/sim/modelsim/wave_msp.do: -------------------------------------------------------------------------------- 1 | onerror {resume} 2 | quietly WaveActivateNextPane {} 0 3 | add wave -noupdate -format Logic /tb_msp/clk 4 | add wave -noupdate -format Logic /tb_msp/rst 5 | add wave -noupdate -format Literal -radix hexadecimal /tb_msp/address 6 | add wave -noupdate -format Literal -radix hexadecimal /tb_msp/data 7 | add wave -noupdate -format Literal -expand /tb_msp/ramsn 8 | add wave -noupdate -format Literal /tb_msp/ramoen 9 | add wave -noupdate -format Literal /tb_msp/wrn 10 | add wave -noupdate -format Literal /tb_msp/romsn 11 | add wave -noupdate -format Logic /tb_msp/iosn 12 | add wave -noupdate -format Logic /tb_msp/oen 13 | add wave -noupdate -format Logic /tb_msp/read 14 | add wave -noupdate -format Logic /tb_msp/write 15 | add wave -noupdate -format Logic /tb_msp/brdyn 16 | add wave -noupdate -format Logic /tb_msp/bexcn 17 | add wave -noupdate -format Logic /tb_msp/error 18 | add wave -noupdate -format Logic /tb_msp/wdog 19 | add wave -noupdate -format Logic /tb_msp/dsuen 20 | add wave -noupdate -format Logic /tb_msp/dsutx 21 | add wave -noupdate -format Logic /tb_msp/dsurx 22 | add wave -noupdate -format Logic /tb_msp/dsubre 23 | add wave -noupdate -format Logic /tb_msp/dsuact 24 | add wave -noupdate -format Logic /tb_msp/test 25 | add wave -noupdate -format Literal /tb_msp/pio 26 | add wave -noupdate -format Logic /tb_msp/gnd 27 | add wave -noupdate -format Logic /tb_msp/vcc 28 | add wave -noupdate -format Logic /tb_msp/nc 29 | add wave -noupdate -format Literal /tb_msp/sdcke 30 | add wave -noupdate -format Literal /tb_msp/sdcsn 31 | add wave -noupdate -format Logic /tb_msp/sdwen 32 | add wave -noupdate -format Logic /tb_msp/sdrasn 33 | add wave -noupdate -format Logic /tb_msp/sdcasn 34 | add wave -noupdate -format Literal /tb_msp/sddqm 35 | add wave -noupdate -format Logic /tb_msp/sdclk 36 | add wave -noupdate -format Logic /tb_msp/plllock 37 | TreeUpdate [SetDefaultTree] 38 | WaveRestoreCursors {16290249 ps} 39 | WaveRestoreZoom {2007769 ps} {2759592 ps} 40 | configure wave -namecolwidth 150 41 | configure wave -valuecolwidth 100 42 | configure wave -justifyvalue left 43 | configure wave -signalnamewidth 0 44 | configure wave -snapdistance 10 45 | configure wave -datasetprefix 0 46 | configure wave -rowmargin 4 47 | configure wave -childrowmargin 2 48 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: 3 | 4 | clean: 5 | cd synopsys; make clean 6 | cd synplify; make clean 7 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/README: -------------------------------------------------------------------------------- 1 | 2 | LEON synthesis scripts 3 | ---------------------- 4 | 5 | The synthesis scripts are now placed in a sub-directory for 6 | each synthesis tool. The following tools are supported: 7 | 8 | synopsys : scripts for Synopsys DC and FC2 9 | 10 | synplify : scripts and project files for Synplify 11 | 12 | xst : scripts and project files for Xilinx ISE/XST 13 | 14 | In addition, templates for synthesis and place&route for a few 15 | fpga boards are available in the boards directory. 16 | 17 | NOTE: all LEON files are read from the standard leon source 18 | directory (../leon), MAKE SURE ../leon/device.vhd REFLECTS YOUR 19 | TARGET SETTINGS!!! 20 | 21 | Jiri. 22 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/ise/leon.xst: -------------------------------------------------------------------------------- 1 | elaborate -ifn ../../leon/amba.vhd -ifmt vhdl 2 | elaborate -ifn ../../leon/target.vhd -ifmt vhdl 3 | elaborate -ifn ../../leon/device.vhd -ifmt vhdl 4 | elaborate -ifn ../../leon/config.vhd -ifmt vhdl 5 | elaborate -ifn ../../leon/sparcv8.vhd -ifmt vhdl 6 | elaborate -ifn ../../leon/mmuconfig.vhd -ifmt vhdl 7 | elaborate -ifn ../../leon/iface.vhd -ifmt vhdl 8 | elaborate -ifn ../../leon/macro.vhd -ifmt vhdl 9 | elaborate -ifmt vhdl -ifn ../../leon/multlib.vhd 10 | elaborate -ifmt vhdl -ifn ../../leon/tech_generic.vhd 11 | elaborate -ifmt vhdl -ifn ../../leon/tech_proasic.vhd 12 | elaborate -ifmt vhdl -ifn ../../leon/tech_axcel.vhd 13 | elaborate -ifmt vhdl -ifn ../../leon/tech_atc18.vhd 14 | elaborate -ifmt vhdl -ifn ../../leon/tech_tsmc25.vhd 15 | elaborate -ifmt vhdl -ifn ../../leon/tech_atc35.vhd 16 | elaborate -ifmt vhdl -ifn ../../leon/tech_atc25.vhd 17 | elaborate -ifmt vhdl -ifn ../../leon/tech_atc18.vhd 18 | elaborate -ifmt vhdl -ifn ../../leon/tech_umc18.vhd 19 | elaborate -ifmt vhdl -ifn ../../leon/tech_fs90.vhd 20 | elaborate -ifmt vhdl -ifn ../../leon/bprom.vhd 21 | elaborate -ifmt vhdl -ifn ../../leon/tech_virtex.vhd 22 | elaborate -ifmt vhdl -ifn ../../leon/tech_virtex2.vhd 23 | elaborate -ifmt vhdl -ifn ../../leon/tech_map.vhd 24 | elaborate -ifmt vhdl -ifn ../../leon/mul.vhd 25 | elaborate -ifmt vhdl -ifn ../../leon/div.vhd 26 | elaborate -ifmt vhdl -ifn ../../leon/iu.vhd 27 | elaborate -ifmt vhdl -ifn ../../leon/fpulib.vhd 28 | elaborate -ifmt vhdl -ifn ../../leon/meiko.vhd 29 | elaborate -ifmt vhdl -ifn ../../leon/fpu_lth.vhd 30 | elaborate -ifmt vhdl -ifn ../../leon/fpu_core.vhd 31 | elaborate -ifmt vhdl -ifn ../../leon/grfpc.vhd 32 | elaborate -ifmt vhdl -ifn ../../leon/mmu_icache.vhd 33 | elaborate -ifmt vhdl -ifn ../../leon/mmu_dcache.vhd 34 | elaborate -ifmt vhdl -ifn ../../leon/mmu_acache.vhd 35 | elaborate -ifmt vhdl -ifn ../../leon/mmutlbcam.vhd 36 | elaborate -ifmt vhdl -ifn ../../leon/mmulrue.vhd 37 | elaborate -ifmt vhdl -ifn ../../leon/mmulru.vhd 38 | elaborate -ifmt vhdl -ifn ../../leon/mmutlb.vhd 39 | elaborate -ifmt vhdl -ifn ../../leon/mmutw.vhd 40 | elaborate -ifmt vhdl -ifn ../../leon/mmu.vhd 41 | elaborate -ifmt vhdl -ifn ../../leon/mmu_cache.vhd 42 | elaborate -ifmt vhdl -ifn ../../leon/cachemem.vhd 43 | elaborate -ifmt vhdl -ifn ../../leon/icache.vhd 44 | elaborate -ifmt vhdl -ifn ../../leon/dcache.vhd 45 | elaborate -ifmt vhdl -ifn ../../leon/acache.vhd 46 | elaborate -ifmt vhdl -ifn ../../leon/cache.vhd 47 | elaborate -ifmt vhdl -ifn ../../leon/rstgen.vhd 48 | elaborate -ifmt vhdl -ifn ../../leon/ambacomp.vhd 49 | elaborate -ifmt vhdl -ifn ../../leon/ahbram.vhd 50 | elaborate -ifmt vhdl -ifn ../../leon/lconf.vhd 51 | elaborate -ifmt vhdl -ifn ../../leon/wprot.vhd 52 | elaborate -ifmt vhdl -ifn ../../leon/ahbstat.vhd 53 | elaborate -ifmt vhdl -ifn ../../leon/ahbmst.vhd 54 | elaborate -ifmt vhdl -ifn ../../leon/apbmst.vhd 55 | elaborate -ifmt vhdl -ifn ../../leon/ahbarb.vhd 56 | elaborate -ifmt vhdl -ifn ../../leon/timers.vhd 57 | elaborate -ifmt vhdl -ifn ../../leon/irqctrl.vhd 58 | elaborate -ifmt vhdl -ifn ../../leon/irqctrl2.vhd 59 | elaborate -ifmt vhdl -ifn ../../leon/uart.vhd 60 | elaborate -ifmt vhdl -ifn ../../leon/ioport.vhd 61 | elaborate -ifmt vhdl -ifn ../../leon/sdmctrl.vhd 62 | elaborate -ifmt vhdl -ifn ../../leon/mctrl.vhd 63 | elaborate -ifmt vhdl -ifn ../../leon/ahbmst.vhd 64 | elaborate -ifmt vhdl -ifn ../../leon/dcom_uart.vhd 65 | elaborate -ifmt vhdl -ifn ../../leon/dcom.vhd 66 | elaborate -ifmt vhdl -ifn ../../leon/dma.vhd 67 | elaborate -ifmt vhdl -ifn ../../leon/dsu.vhd 68 | elaborate -ifmt vhdl -ifn ../../leon/dsu_mem.vhd 69 | elaborate -ifmt vhdl -ifn ../../leon/pci_arb.vhd 70 | elaborate -ifmt vhdl -ifn ../../leon/pci_gr.vhd 71 | elaborate -ifmt vhdl -ifn ../../leon/pci.vhd 72 | elaborate -ifmt vhdl -ifn ../../leon/eth_oc.vhd 73 | elaborate -ifmt vhdl -ifn ../../leon/proc.vhd 74 | elaborate -ifmt vhdl -ifn ../../leon/mcore.vhd 75 | 76 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/ise/route: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # route entity ucf-file device effort 3 | edif2ngd $1.edf 4 | ngdbuild $1.ngo -aul -uc $2 -p $3 5 | map -pr b -p $3 $1 6 | par -ol $4 -w $1 $1.ncd 7 | trce -v 25 $1.ncd $1.pcf 8 | bitgen $1 -l -m -w -f bitgen.ut 9 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/ise/route_ngc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # route entity ucf-file device effort 3 | ngdbuild $1.ngc -aul -uc $2 -p $3 4 | map -pr b -p $3 $1 5 | par -ol $4 -w $1 $1_xst.ncd 6 | trce -v 25 $1_xst.ncd $1.pcf 7 | bitgen $1_xst -l -d -m -w -f bitgen.ut 8 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/ise/xstmod: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # runxst top_entity verilog_file device 3 | echo run -fsm_extract no -rom_style distributed -top $1 -ifn $2 -ifmt verilog -p $3 -ofn $1 -iobuf no -bus_delimiter "()" 4 | 5 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/ise/xstrun: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # top-module file device 3 | echo run -iob true -fsm_extract no -rom_style distributed -ifn $2 -bus_delimiter "()" -ifmt vhdl -p $3 -ofn $1 $4 $5 4 | #echo run -resource_sharing no -iob true -ifn $2 -bus_delimiter "()" -ifmt vhdl -p $3 -ofn $1 $4 $5 5 | 6 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/leonardo/README: -------------------------------------------------------------------------------- 1 | 2 | The provided leon.tcl file can be used as a template for 3 | how to elaborate and analyse leon using leonardo. Target 4 | technology selection and optimisation of netlist is left 5 | to the user. Note that leonardo level-3 licensing is required 6 | to support the elaborate function. 7 | 8 | Mail improvements to jiri@gaisler.com 9 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/leonardo/leon.tcl: -------------------------------------------------------------------------------- 1 | 2 | read -dont_elaborate ../../leon/amba.vhd 3 | read -dont_elaborate ../../leon/target.vhd 4 | read -dont_elaborate ../../leon/device.vhd 5 | read -dont_elaborate ../../leon/config.vhd 6 | read -dont_elaborate ../../leon/sparcv8.vhd 7 | read -dont_elaborate../../leon/mmuconfig.vhd 8 | read -dont_elaborate ../../leon/iface.vhd 9 | read -dont_elaborate ../../leon/macro.vhd 10 | read -dont_elaborate ../../leon/bprom.vhd 11 | read -dont_elaborate ../../leon/multlib.vhd 12 | read -dont_elaborate ../../leon/ambacomp.vhd 13 | read -dont_elaborate ../../leon/tech_generic.vhd 14 | read -dont_elaborate ../../leon/tech_virtex.vhd 15 | read -dont_elaborate ../../leon/tech_virtex2.vhd 16 | read -dont_elaborate ../../leon/tech_atc18.vhd 17 | read -dont_elaborate ../../leon/tech_atc25.vhd 18 | read -dont_elaborate ../../leon/tech_atc35.vhd 19 | read -dont_elaborate ../../leon/tech_fs90.vhd 20 | read -dont_elaborate ../../leon/tech_umc18.vhd 21 | read -dont_elaborate ../../leon/tech_tsmc25.vhd 22 | read -dont_elaborate ../../leon/tech_proasic.vhd 23 | read -dont_elaborate ../../leon/tech_axcel.vhd 24 | read -dont_elaborate ../../leon/tech_map.vhd 25 | read -dont_elaborate ../../leon/mmu_icache.vhd 26 | read -dont_elaborate ../../leon/mmu_dcache.vhd 27 | read -dont_elaborate ../../leon/mmu_acache.vhd 28 | read -dont_elaborate ../../leon/mmutlbcam.vhd 29 | read -dont_elaborate ../../leon/mmulrue.vhd 30 | read -dont_elaborate ../../leon/mmulru.vhd 31 | read -dont_elaborate ../../leon/mmutlb.vhd 32 | read -dont_elaborate ../../leon/mmutw.vhd 33 | read -dont_elaborate ../../leon/mmu.vhd 34 | read -dont_elaborate ../../leon/mmu_cache.vhd 35 | read -dont_elaborate ../../leon/cachemem.vhd 36 | read -dont_elaborate ../../leon/icache.vhd 37 | read -dont_elaborate ../../leon/dcache.vhd 38 | read -dont_elaborate ../../leon/acache.vhd 39 | read -dont_elaborate ../../leon/cache.vhd 40 | read -dont_elaborate ../../leon/ahbmst.vhd 41 | read -dont_elaborate ../../leon/dcom_uart.vhd 42 | read -dont_elaborate ../../leon/dcom.vhd 43 | read -dont_elaborate ../../leon/dsu_mem.vhd 44 | read -dont_elaborate ../../leon/dsu.vhd 45 | read -dont_elaborate ../../leon/apbmst.vhd 46 | read -dont_elaborate ../../leon/ahbstat.vhd 47 | read -dont_elaborate ../../leon/ahbtest.vhd 48 | read -dont_elaborate ../../leon/ahbram.vhd 49 | read -dont_elaborate ../../leon/ahbarb.vhd 50 | read -dont_elaborate ../../leon/lconf.vhd 51 | read -dont_elaborate ../../leon/fpulib.vhd 52 | read -dont_elaborate ../../leon/ioport.vhd 53 | read -dont_elaborate ../../leon/irqctrl.vhd 54 | read -dont_elaborate ../../leon/irqctrl2.vhd 55 | read -dont_elaborate ../../leon/sdmctrl.vhd 56 | read -dont_elaborate ../../leon/mctrl.vhd 57 | read -dont_elaborate ../../leon/rstgen.vhd 58 | read -dont_elaborate ../../leon/timers.vhd 59 | read -dont_elaborate ../../leon/uart.vhd 60 | read -dont_elaborate ../../leon/mul.vhd 61 | read -dont_elaborate ../../leon/div.vhd 62 | read -dont_elaborate ../../leon/meiko.vhd 63 | read -dont_elaborate ../../leon/fpu_lth.vhd 64 | read -dont_elaborate ../../leon/fpu_core.vhd 65 | read -dont_elaborate ../../leon/iu.vhd 66 | read -dont_elaborate ../../leon/proc.vhd 67 | read -dont_elaborate ../../leon/wprot.vhd 68 | read -dont_elaborate ../../leon/mcore.vhd 69 | read -dont_elaborate ../../leon/leon.vhd 70 | elaborate leon -architecture rtl 71 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/synopsys/Makefile: -------------------------------------------------------------------------------- 1 | 2 | 3 | clean: 4 | -rm -rf WORK/* view_command.log command.log *.db *.sdf 5 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/synopsys/README: -------------------------------------------------------------------------------- 1 | 2 | 3 | This directory contains scripts to synthesise leon using Synopsys. 4 | The scripts should be used a templates, customise according to your needs. 5 | The following script are provided: 6 | 7 | leon.dcsh script for synopsys DC 8 | 9 | leon.fc2 script for synopsys fpga-compiler-II 10 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/synopsys/atc25setup.dcsh: -------------------------------------------------------------------------------- 1 | 2 | /* library setup for Atmel ATC25 */ 3 | 4 | search_path = {"." "c:/Synopsys/libraries/syn" "e:/Synopsys/libraries/syn"} 5 | target_library = "SClib+ind.db" 6 | link_library = "SClib+ind.db IO33lib+ind.db cb25_memory_max.db PCIlib+ind.db" 7 | link_library = "*" + link_library 8 | symbol_library = "IO33lib.sdb SClib.sdb generic.sdb" 9 | allow_newer_db_files = "true"; 10 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/synopsys/atc35setup.dcsh: -------------------------------------------------------------------------------- 1 | 2 | /* library setup for Atmel ATC35 */ 3 | 4 | search_path = {"." "c:/Synopsys/libraries/syn"} 5 | target_library = "ATC35_CELL_slow_3p0v_105c.db" 6 | link_library = "ATC35_CELL_slow_3p0v_105c.db ATC35_BUFFER_slow_3p0v_105c.db ATC35_MEMORY.db" 7 | link_library = "*" + link_library 8 | symbol_library = "ATC35_BUFFER.sdb ATC35_CELL.sdb ATC35_MEMORY.sdb generic.sdb" 9 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/synopsys/fs90cond.dcsh: -------------------------------------------------------------------------------- 1 | set_operating_conditions -library "fs90a_b" "WCIND" 2 | set_operating_conditions -library "ftcmacro" "WCIND" 3 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/synopsys/fs90setup.dcsh: -------------------------------------------------------------------------------- 1 | 2 | /* library setup for Atmel ATC35 */ 3 | 4 | search_path = {"." "c:/Synopsys/libraries/syn" "e:/Synopsys/libraries/syn"} 5 | target_library = "fs90a_b_syn.db" 6 | link_library = {"fs90a_b_syn.db" "ftcmacro.db"} 7 | link_library = "*" + link_library 8 | symbol_library = "fs90a_b.sdb generic.sdb" 9 | allow_newer_db_files = "true"; 10 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/synplify/.recordref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/syn/synplify/.recordref -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/synplify/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | 3 | clean: 4 | -rm -rf *.ngc *.bgn *.bld *.dly *.drc *.ll *.mrp *.msk *.ncd *.ngd \ 5 | *.ngm *.pad *.par *.pcf *.srp *.twr *.xpi *.nav *.lst *.scr *.bit \ 6 | xst *.tlg *.log *.srs *.srr *.plg *.fse *.vhm *.srm *.srd *.edf *.edn \ 7 | *.prd 8 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/synplify/ethermac.v: -------------------------------------------------------------------------------- 1 | `include "../../leon/device.v" 2 | `include "../../leon/eth_top.v" 3 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/synplify/leon.prj: -------------------------------------------------------------------------------- 1 | 2 | source "leon_files.tcl" 3 | add_file -constraint "leon.sdc" 4 | 5 | impl -add syn 6 | 7 | set_option -technology VIRTEX2 8 | set_option -part XC2V3000 9 | set_option -package FG676 10 | set_option -speed_grade -4 11 | 12 | set_option -default_enum_encoding onehot 13 | set_option -symbolic_fsm_compiler 0 14 | set_option -resource_sharing 0 15 | set_option -use_fsm_explorer 0 16 | set_option -top_module "leon" 17 | 18 | set_option -frequency 45.000 19 | set_option -fanout_limit 100 20 | set_option -disable_io_insertion 0 21 | set_option -pipe 1 22 | set_option -modular 0 23 | set_option -retiming 1 24 | 25 | set_option -write_verilog 0 26 | set_option -write_vhdl 1 27 | 28 | set_option -write_apr_constraint 0 29 | 30 | project -result_file "./leon.edf" 31 | 32 | set_option -compiler_compatible 0 33 | impl -active "syn" 34 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/synplify/leon.sdc: -------------------------------------------------------------------------------- 1 | 2 | define_clock -name {clk} -freq 50.0 -clockgroup default_clkgroup 3 | define_clock -name {pci_clk_in} -freq 40.000 -clockgroup pci_clkgroup 4 | define_clock -name {erx_clk} -freq 30.000 -clockgroup erx_clk_clkgroup 5 | define_clock -name {etx_clk} -freq 30.000 -clockgroup etx_clk_clkgroup 6 | 7 | define_output_delay -default 8.00 -ref clk:r 8 | define_input_delay -default 10.00 -ref clk:r 9 | define_output_delay -default 14.00 -ref pci_clk_in:r 10 | define_input_delay -default 18.00 -ref pci_clk_in:r 11 | define_output_delay -default 8.00 -ref erx_clk:r 12 | define_input_delay -default 10.00 -ref erx_clk:r 13 | define_output_delay -default 8.00 -ref etx_clk:r 14 | define_input_delay -default 10.00 -ref etx_clk:r 15 | 16 | define_global_attribute syn_useioff {1} 17 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/verilog/ethermac.v: -------------------------------------------------------------------------------- 1 | //`include "../../../xilinx/virtexe.v" 2 | `include "../../leon/device.v" 3 | `include "../../leon/eth_top.v" 4 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/xst/Makefile: -------------------------------------------------------------------------------- 1 | 2 | EFFORT=3 3 | DEVICE=xcv800-hq240-6 4 | 5 | all: 6 | xst -ifn leon.xst 7 | 8 | clean: 9 | -rm -rf *.ngc *.bgn *.bld *.dly *.drc *.ll *.mrp *.msk *.ncd *.ngd \ 10 | *.ngm *.pad *.par *.pcf *.srp *.twr *.xpi *.nav *.lst *.scr \ 11 | xst *.tlg *.log *.srs *.srr *.plg *.fse *.vhm *.srm *.srd *.edf *.edn \ 12 | *.prj *.prd *.ngo *.jhd __projnav* 13 | 14 | dist-clean: clean 15 | -rm -f *.bit 16 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/syn/xst/leon.npl: -------------------------------------------------------------------------------- 1 | JDF F 2 | // Created by Project Navigator ver 1.0 3 | PROJECT syn 4 | DESIGN leon Normal 5 | DEVFAM virtexe 6 | DEVFAMTIME 1041788708 7 | DEVICE xcv1000e 8 | DEVICETIME 1041788708 9 | DEVPKG fg1156 10 | DEVPKGTIME 1041788708 11 | DEVSPEED -6 12 | DEVSPEEDTIME 0 13 | FLOW XST VHDL 14 | FLOWTIME 1041788708 15 | MODULE ..\..\leon\ahbstat.vhd 16 | MODSTYLE ahbstat Normal 17 | MODULE ..\..\leon\dcom_uart.vhd 18 | MODSTYLE dcom_uart Normal 19 | MODULE ..\..\leon\cache.vhd 20 | MODSTYLE cache Normal 21 | MODULE ..\..\leon\fpu_lth.vhd 22 | MODSTYLE fpu_lth Normal 23 | MODULE ..\..\leon\irqctrl.vhd 24 | MODSTYLE irqctrl Normal 25 | MODULE ..\..\leon\irqctrl2.vhd 26 | MODSTYLE irqctrl2 Normal 27 | MODULE ..\..\leon\meiko.vhd 28 | MODSTYLE fpu Normal 29 | MODULE ..\..\leon\lconf.vhd 30 | MODSTYLE lconf Normal 31 | MODULE ..\..\leon\mcore.vhd 32 | MODSTYLE mcore Normal 33 | MODULE ..\..\leon\mctrl.vhd 34 | MODSTYLE mctrl Normal 35 | MODULE ..\..\leon\wprot.vhd 36 | MODSTYLE wprot Normal 37 | MODULE ..\..\leon\bprom.vhd 38 | MODSTYLE gen_bprom Normal 39 | MODULE ..\..\leon\div.vhd 40 | MODSTYLE div Normal 41 | MODULE ..\..\leon\dsu.vhd 42 | MODSTYLE dsu Normal 43 | MODULE ..\..\leon\mul.vhd 44 | MODSTYLE mul Normal 45 | MODULE ..\..\leon\ahbarb.vhd 46 | MODSTYLE ahbarb Normal 47 | MODULE ..\..\leon\dcache.vhd 48 | MODSTYLE dcache Normal 49 | MODULE ..\..\leon\icache.vhd 50 | MODSTYLE icache Normal 51 | MODULE ..\..\leon\acache.vhd 52 | MODSTYLE acache Normal 53 | MODULE ..\..\leon\cachemem.vhd 54 | MODSTYLE cachemem Normal 55 | MODULE ..\..\leon\fpu_core.vhd 56 | MODSTYLE fpu_core Normal 57 | MODULE ..\..\leon\grfpc.vhd 58 | MODSTYLE grfpc Normal 59 | MODULE ..\..\leon\timers.vhd 60 | MODSTYLE timers Normal 61 | MODULE ..\..\leon\ahbram.vhd 62 | MODSTYLE ahbram Normal 63 | MODULE ..\..\leon\rstgen.vhd 64 | MODSTYLE rstgen Normal 65 | MODULE ..\..\leon\ahbmst.vhd 66 | MODSTYLE ahbmst Normal 67 | MODULE ..\..\leon\dcom.vhd 68 | MODSTYLE dcom Normal 69 | MODULE ..\..\leon\proc.vhd 70 | MODSTYLE proc Normal 71 | MODULE ..\..\leon\uart.vhd 72 | MODSTYLE uart Normal 73 | MODULE ..\..\leon\apbmst.vhd 74 | MODSTYLE apbmst Normal 75 | MODULE ..\..\leon\ioport.vhd 76 | MODSTYLE ioport Normal 77 | MODULE ..\..\leon\iu.vhd 78 | MODSTYLE iu Normal 79 | MODULE ..\..\leon\dsu_mem.vhd 80 | MODSTYLE dsu_mem Normal 81 | MODULE ..\..\leon\sdmctrl.vhd 82 | MODSTYLE sdmctrl Normal 83 | MODULE ..\..\leon\leon.vhd 84 | MODSTYLE leon Normal 85 | LIBFILE ..\..\leon\tech_fs90.vhd work *** 86 | LIBFILE ..\..\leon\device.vhd work *** 87 | LIBFILE ..\..\leon\tech_axcel.vhd work *** 88 | LIBFILE ..\..\leon\config.vhd work *** 89 | LIBFILE ..\..\leon\mmuconfig.vhd work *** 90 | LIBFILE ..\..\leon\fpulib.vhd work *** 91 | LIBFILE ..\..\leon\target.vhd work *** 92 | LIBFILE ..\..\leon\iface.vhd work *** 93 | LIBFILE ..\..\leon\macro.vhd work *** 94 | LIBFILE ..\..\leon\tech_virtex2.vhd work *** 95 | LIBFILE ..\..\leon\amba.vhd work *** 96 | LIBFILE ..\..\leon\tech_tsmc25.vhd work *** 97 | LIBFILE ..\..\leon\tech_map.vhd work *** 98 | LIBFILE ..\..\leon\ambacomp.vhd work *** 99 | LIBFILE ..\..\leon\tech_generic.vhd work *** 100 | LIBFILE ..\..\leon\tech_proasic.vhd work *** 101 | LIBFILE ..\..\leon\tech_atc25.vhd work *** 102 | LIBFILE ..\..\leon\tech_atc35.vhd work *** 103 | LIBFILE ..\..\leon\tech_atc18.vhd work *** 104 | LIBFILE ..\..\leon\multlib.vhd work *** 105 | LIBFILE ..\..\leon\tech_virtex.vhd work *** 106 | LIBFILE ..\..\leon\sparcv8.vhd work *** 107 | LIBFILE ..\..\leon\tech_umc18.vhd work *** 108 | DEPASSOC leon leon_xst.ucf Normal 109 | [Normal] 110 | p_SimModelTarget=xstvhd, virtexe, VHDL.t_postMapSimModel, 1041792828, Modelsim_VHDL 111 | [STRATEGY-LIST] 112 | Normal=True 113 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tbench/Makefile: -------------------------------------------------------------------------------- 1 | 2 | VLIB = vlib 3 | VCOM = vcom -quiet 4 | SOURCES = iram.vhd mspram.vhd testmod.vhd leonlib.vhd bprom.vhd \ 5 | tbgen.vhd tb_msp.vhd tblib.vhd tbdef.vhd tbleon.vhd 6 | 7 | tags/%.tag : %.vhd 8 | $(VCOM) $< 9 | @touch $@ 10 | 11 | all: tags leonlib tbgen tbdef tb_msp tblib tbleon 12 | 13 | tags/iram.tag : ../leon/tags/leon.tag iram.vhd 14 | iram : tags/iram.tag 15 | tags/bprom.tag : tags/iram.tag bprom.vhd 16 | bprom : tags/bprom.tag 17 | tags/mspram.tag : ../leon/tags/leon.tag mspram.vhd 18 | mspram : tags/mspram.tag 19 | tags/testmod.tag : ../leon/tags/leon.tag testmod.vhd 20 | testmod : tags/testmod.tag 21 | tags/leonlib.tag : ../leon/tags/leon.tag leonlib.vhd 22 | leonlib : tags/leonlib.tag 23 | tags/tbgen.tag : tags/leonlib.tag tags/iram.tag tags/testmod.tag \ 24 | tags/mt48lc16m16a2.tag tbgen.vhd 25 | tbgen : tags/tbgen.tag 26 | tags/tb_msp.tag : tags/leonlib.tag tags/iram.tag tags/mspram.tag tb_msp.vhd 27 | tb_msp : tags/tb_msp.tag 28 | tags/tblib.tag : tags/tbgen.tag tblib.vhd 29 | tblib : tags/tblib.tag 30 | tags/tbdef.tag : tags tags/tblib.tag tbdef.vhd 31 | tbdef : tags/tbdef.tag 32 | tags/tbleon.tag : tags/tbdef.tag tbleon.vhd 33 | tbleon : tags/tbleon.tag 34 | tags/mt48lc16m16a2.tag : tags ../leon/tags/leon.tag mt48lc16m16a2.vhd 35 | mt48lc16m16a2 : tags/mt48lc16m16a2.tag 36 | 37 | tags : 38 | mkdir tags 39 | clean: 40 | -rm -rf tags vcx* 41 | 42 | vhdl : $(SOURCES) 43 | 44 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tbench/bprom.dat: -------------------------------------------------------------------------------- 1 | 2 | bootprom: file format a.out-sunos-big 3 | 4 | Contents of section .text: 5 | 0000 82102002 81904000 03000004 821060c0 .. ...@.......`. 6 | 0010 81886020 01000000 01000000 01000000 ..` ............ 7 | 0020 03000000 821062f8 dc004000 03200000 ......b...@.. .. 8 | 0030 c2006014 4000009a 9c23a040 91d02000 ..`.@....#.@.. . 9 | 0040 c60a0000 80a0e000 0280000c 13200000 ............. .. 10 | 0050 c4026074 8088a004 02bffffe 8408e0ff ..`t............ 11 | 0060 c4226070 90022001 c60a0000 80a0e000 ."`p.. ......... 12 | 0070 12bffff8 01000000 81c3e008 01000000 ................ 13 | 0080 13200000 c4026074 8088a001 02bffffe . ....`t........ 14 | 0090 01000000 c4026070 8608a0ff 80a0e00d ......`p........ 15 | 00a0 02800005 c42a0000 80a0e00a 32bffff6 .....*......2... 16 | 00b0 90022001 81c3e008 01000000 96100008 .. ............. 17 | 00c0 90102000 80a2000b 1680000d 94102000 .. ........... . 18 | 00d0 c40a400a 80a0a040 28800003 8400bfd0 ..@....@(....... 19 | 00e0 8400bfc9 872a2004 8408a0ff 9402a001 .....* ......... 20 | 00f0 80a2800b 06bffff7 9010c002 81c3e008 ................ 21 | 0100 01000000 9de3bf98 90102003 d0266008 .......... ..&`. 22 | 0110 d20e2001 90027fcf 900a20ff 80a22002 .. ....... ... . 23 | 0120 1880000a a0102000 90102001 7fffffe4 ...... ... ..... 24 | 0130 92062001 90022001 92102001 a12a2001 .. ... ... ..* . 25 | 0140 10800015 d2266008 90027fc9 900a20ff .....&`....... . 26 | 0150 80a22002 1880000a 90102001 7fffffd8 .. ....... ..... 27 | 0160 92062001 9410200b 94228008 92102002 .. ... ..".... . 28 | 0170 a12aa001 10800008 d2266008 900a60ff .*.......&`...`. 29 | 0180 80a22030 12800005 90100010 a0102004 .. 0.......... . 30 | 0190 c0266008 90100010 7fffffc9 92062004 .&`........... . 31 | 01a0 d0264000 90102002 7fffffc5 92062002 .&@... ....... . 32 | 01b0 912a2001 90220010 92042004 92060009 .* ..".... ..... 33 | 01c0 90023ffe d226600c d0266004 81c7e008 ..?..&`..&`..... 34 | 01d0 81e80000 00000001 73746172 74696e67 ........starting 35 | 01e0 2070726f 6772616d 3a200a00 9de3bf98 program: ...... 36 | 01f0 d0062008 80a22001 22800007 d0062004 .. ... ."..... . 37 | 0200 0a80001d 80a22002 22800016 e0060000 ...... ."....... 38 | 0210 30800019 a0102000 91322001 80a40008 0..... ..2 ..... 39 | 0220 1a800015 01000000 d406200c 932c2001 .......... .., . 40 | 0230 92028009 7fffffa2 90102002 d4060000 .......... ..... 41 | 0240 d02a8010 d2062004 a0042001 93326001 .*.... ... ..2`. 42 | 0250 80a40009 2abffff6 d406200c 30800006 ....*..... .0... 43 | 0260 11000000 7fffff77 901221d8 9fc40000 .......w..!..... 44 | 0270 01000000 81c7e008 81e80000 00000001 ................ 45 | 0280 4c454f4e 20532d52 65636f72 64206c6f LEON S-Record lo 46 | 0290 61646572 0a0a0d3e 20000000 9de3be80 ader...> ....... 47 | 02a0 40000017 01000000 11000000 7fffff65 @..............e 48 | 02b0 90122280 a207bef8 a007bee0 7fffff71 .."............q 49 | 02c0 90100011 d40fbef8 90100011 80a2a053 ...............S 50 | 02d0 02800005 92100010 80a2a073 12bffff8 ...........s.... 51 | 02e0 01000000 7fffff88 01000000 7fffffc0 ................ 52 | 02f0 90100010 30bffff2 403ffff0 11200000 ....0...@?... .. 53 | 0300 c4022014 8088a003 12800007 0500002a .. ............* 54 | 0310 81d82000 05000040 8410a00f c4222014 .. ....@....." . 55 | 0320 0500002a 8410a200 c42220a4 c0222090 ...*....." .." . 56 | 0330 c0222094 c0222098 84103fff c4222044 ." .." ...?.." D 57 | 0340 86102007 c6222048 c0222074 c0222084 .. .." H." t." . 58 | 0350 84102003 c4222078 c4222088 81c3e008 .. .." x." ..... 59 | 0360 01000000 00000001 00000001 00000001 ................ 60 | Contents of section .data: 61 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tbench/bprom.vhd: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | -- This file is a part of the LEON VHDL model 3 | -- Copyright (C) 1999 European Space Agency (ESA) 4 | -- 5 | -- This program is free software; you can redistribute it and/or modify 6 | -- it under the terms of the GNU General Public License as published by 7 | -- the Free Software Foundation; either version 2 of the License, or 8 | -- (at your option) any later version. 9 | -- 10 | -- See the file COPYING for the full details of the license. 11 | 12 | 13 | ----------------------------------------------------------------------------- 14 | -- Entity: bprom 15 | -- File: bprom.vhd 16 | -- Author: Jiri Gaisler - ESA/ESTEC 17 | -- Description: A behaviour architecture of a boot prom used to simulate 18 | -- the boot prom option. 19 | ------------------------------------------------------------------------------ 20 | 21 | library IEEE; 22 | use IEEE.std_logic_1164.all; 23 | 24 | architecture behav of virtex_prom256 is 25 | component iram 26 | generic (index : integer := 0; -- Byte lane (0 - 3) 27 | Abits: Positive := 10; -- Default 10 address bits (1 Kbyte) 28 | echk : integer := 0; -- Generate EDAC checksum 29 | tacc : integer := 10; -- access time (ns) 30 | fname : string := "ram.dat"); -- File to read from 31 | port ( 32 | A : in std_logic_vector; 33 | D : inout std_logic_vector(7 downto 0); 34 | CE1 : in std_logic; 35 | WE : in std_logic; 36 | OE : in std_logic 37 | 38 | ); end component; 39 | 40 | signal gnd : std_logic := '0'; 41 | signal vcc : std_logic := '1'; 42 | signal address : std_logic_vector(7 downto 0); 43 | signal data : std_logic_vector(31 downto 0); 44 | begin 45 | 46 | x : process(clk) 47 | begin 48 | if rising_edge(clk) then 49 | address <= addr; 50 | end if; 51 | end process; 52 | 53 | romarr : for i in 0 to 3 generate 54 | rom0 : iram 55 | generic map (index => i, abits => 8, echk => 0, tacc => 10, 56 | fname => "tsource/bprom.dat") 57 | port map (A => address(7 downto 0), 58 | D => data((31 - i*8) downto (24-i*8)), CE1 => gnd, 59 | WE => VCC, OE => gnd); 60 | end generate; 61 | 62 | do <= data; 63 | end; 64 | 65 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tbench/cds.lib: -------------------------------------------------------------------------------- 1 | include $CDS_INST_DIR/tools/inca/files/cds.lib 2 | DEFINE work ../leon/work 3 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tbench/compile.bat: -------------------------------------------------------------------------------- 1 | vcom -quiet leonlib.vhd 2 | vcom -quiet iram.vhd 3 | vcom -quiet mt48lc16m16a2.vhd 4 | vcom -quiet testmod.vhd 5 | vcom -quiet mspram.vhd 6 | vcom -quiet bprom.vhd 7 | vcom -quiet tbgen.vhd 8 | vcom -quiet tblib.vhd 9 | vcom -quiet tbdef.vhd 10 | vcom -quiet tbleon.vhd 11 | vcom -quiet tb_msp.vhd 12 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tbench/hdl.var: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/tbench/hdl.var -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tbench/tbdef.vhd: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | -- This file is a part of the LEON VHDL model 3 | -- Copyright (C) 1999 European Space Agency (ESA) 4 | -- 5 | -- This program is free software; you can redistribute it and/or modify 6 | -- it under the terms of the GNU General Public License as published by 7 | -- the Free Software Foundation; either version 2 of the License, or 8 | -- (at your option) any later version. 9 | -- 10 | -- See the file COPYING for the full details of the license. 11 | ----------------------------------------------------------------------------- 12 | -- Entity: tbdef 13 | -- File: tbdef.vhd 14 | -- Author: Jiri Gaisler - ESA/ESTEC 15 | -- Description: Default generic test bench 16 | ------------------------------------------------------------------------------ 17 | -- Version control: 18 | -- 17-09-1998: : First implemetation 19 | -- 26-09-1999: : Release 1.0 20 | ------------------------------------------------------------------------------ 21 | 22 | use work.tblib.all; 23 | 24 | -- standard testbench 25 | 26 | entity tbleon is end; 27 | architecture behav of tbleon is begin tb : tbgen; end; 28 | 29 | 30 | -- default config: 32-bit prom, 32-bit ram, EDAC, 0ws 31 | 32 | configuration tbdef of tbleon is 33 | for behav 34 | for all: 35 | tbgen use entity work.tbgen(behav); 36 | end for; 37 | end for; 38 | end tbdef; 39 | 40 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tbench/tblib.vhd: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | -- This file is a part of the LEON VHDL model 3 | -- Copyright (C) 1999 European Space Agency (ESA) 4 | -- 5 | -- This program is free software; you can redistribute it and/or modify 6 | -- it under the terms of the GNU General Public License as published by 7 | -- the Free Software Foundation; either version 2 of the License, or 8 | -- (at your option) any later version. 9 | -- 10 | -- See the file COPYING for the full details of the license. 11 | ----------------------------------------------------------------------------- 12 | -- Package: debug 13 | -- File: debug.vhd 14 | -- Author: Jiri Gaisler - ESA/ESTEC 15 | -- Description: Package with component declaration of tbgen. 16 | ------------------------------------------------------------------------------ 17 | -- Version control: 18 | -- 11-09-1998: : First implemetation 19 | -- 26-09-1999: : Release 1.0 20 | ------------------------------------------------------------------------------ 21 | 22 | LIBRARY ieee; 23 | use IEEE.std_logic_1164.all; 24 | use work.iface.all; 25 | 26 | package tblib is 27 | 28 | component tbgen 29 | end component; 30 | 31 | end tblib; 32 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tkconfig/Makefile: -------------------------------------------------------------------------------- 1 | 2 | CC=gcc 3 | CFLAGS=-g 4 | 5 | all: lconfig.tk 6 | 7 | xconfig: lconfig.tk 8 | wish -f lconfig.tk 9 | 10 | wconfig: lconfig.tk 11 | cygwish80 -f lconfig.tk 12 | 13 | dep: mkdevice lconfig.tk 14 | ./mkdevice < .config 15 | -cp device.vhd device.v ../leon/ 16 | 17 | tkparse.exe: tkparse.o tkcond.o tkgen.o 18 | $(CC) tkparse.o tkcond.o tkgen.o -o tkparse.exe 19 | 20 | mkdevice: mkdevice.o 21 | $(CC) mkdevice.o -o mkdevice 22 | 23 | lconfig.tk: leon.tk header.tk tail.tk 24 | cat header.tk leon.tk tail.tk > lconfig.tk 25 | chmod a+x lconfig.tk 26 | 27 | leon.tk : config.in tkparse.exe 28 | ./tkparse.exe < config.in > leon.tk 29 | 30 | clean: 31 | -rm lconfig.tk leon.tk test.tk *.o tkparse.exe mkdevice *.exe device.vhd device.v 32 | 33 | dist-clean: clean 34 | -rm .config .config.old 35 | cp defconfig .config 36 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tkconfig/defconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated make config: don't edit 3 | # 4 | CONFIG_PERI_LCONF=y 5 | 6 | # 7 | # Synthesis 8 | # 9 | CONFIG_SYN_GENERIC=y 10 | # CONFIG_SYN_ATC35 is not set 11 | # CONFIG_SYN_ATC25 is not set 12 | # CONFIG_SYN_ATC18 is not set 13 | # CONFIG_SYN_FS90 is not set 14 | # CONFIG_SYN_UMC018 is not set 15 | # CONFIG_SYN_TSMC025 is not set 16 | # CONFIG_SYN_PROASIC is not set 17 | # CONFIG_SYN_AXCEL is not set 18 | # CONFIG_SYN_VIRTEX is not set 19 | # CONFIG_SYN_VIRTEX2 is not set 20 | CONFIG_SYN_INFER_MULT=y 21 | CONFIG_SYN_RFTYPE=y 22 | 23 | # 24 | # Clock generation 25 | # 26 | # CONFIG_PCI_SYSCLK is not set 27 | 28 | # 29 | # Processor 30 | # 31 | 32 | # 33 | # Integer unit 34 | # 35 | CONFIG_IU_NWINDOWS=8 36 | # CONFIG_IU_V8MULDIV is not set 37 | CONFIG_IU_LDELAY=1 38 | CONFIG_IU_FASTJUMP=y 39 | CONFIG_IU_ICCHOLD=y 40 | CONFIG_IU_FASTDECODE=y 41 | CONFIG_IU_WATCHPOINTS=0 42 | 43 | # 44 | # Floating-point unit 45 | # 46 | # CONFIG_FPU_ENABLE is not set 47 | 48 | # 49 | # Co-processor 50 | # 51 | # CONFIG_CP_ENABLE is not set 52 | 53 | # 54 | # Cache system 55 | # 56 | 57 | # 58 | # Instruction cache 59 | # 60 | CONFIG_ICACHE_ASSO1=y 61 | # CONFIG_ICACHE_ASSO2 is not set 62 | # CONFIG_ICACHE_ASSO3 is not set 63 | # CONFIG_ICACHE_ASSO4 is not set 64 | # CONFIG_ICACHE_SZ1 is not set 65 | # CONFIG_ICACHE_SZ2 is not set 66 | CONFIG_ICACHE_SZ4=y 67 | # CONFIG_ICACHE_SZ8 is not set 68 | # CONFIG_ICACHE_SZ16 is not set 69 | # CONFIG_ICACHE_SZ32 is not set 70 | # CONFIG_ICACHE_SZ64 is not set 71 | # CONFIG_ICACHE_LZ16 is not set 72 | CONFIG_ICACHE_LZ32=y 73 | 74 | # 75 | # Data cache 76 | # 77 | CONFIG_DCACHE_ASSO1=y 78 | # CONFIG_DCACHE_ASSO2 is not set 79 | # CONFIG_DCACHE_ASSO3 is not set 80 | # CONFIG_DCACHE_ASSO4 is not set 81 | # CONFIG_DCACHE_SZ1 is not set 82 | # CONFIG_DCACHE_SZ2 is not set 83 | CONFIG_DCACHE_SZ4=y 84 | # CONFIG_DCACHE_SZ8 is not set 85 | # CONFIG_DCACHE_SZ16 is not set 86 | # CONFIG_DCACHE_SZ32 is not set 87 | # CONFIG_DCACHE_SZ64 is not set 88 | # CONFIG_DCACHE_LZ16 is not set 89 | CONFIG_DCACHE_LZ32=y 90 | # CONFIG_DCACHE_LRAM is not set 91 | 92 | # 93 | # MMU 94 | # 95 | # CONFIG_MMU_ENABLE is not set 96 | 97 | # 98 | # Debug support unit 99 | # 100 | # CONFIG_DSU_ENABLE is not set 101 | 102 | # 103 | # AMBA configuration 104 | # 105 | CONFIG_AHB_DEFMST=0 106 | # CONFIG_AHB_SPLIT is not set 107 | 108 | # 109 | # Memory controller 110 | # 111 | # CONFIG_MCTRL_8BIT is not set 112 | # CONFIG_MCTRL_16BIT is not set 113 | # CONFIG_PERI_WPROT is not set 114 | # CONFIG_MCTRL_WFB is not set 115 | # CONFIG_MCTRL_5CS is not set 116 | # CONFIG_MCTRL_SDRAM is not set 117 | 118 | # 119 | # Peripherals 120 | # 121 | CONFIG_PERI_LCONF=y 122 | # CONFIG_PERI_IRQ2 is not set 123 | # CONFIG_PERI_WDOG is not set 124 | # CONFIG_PERI_AHBSTAT is not set 125 | # CONFIG_AHBRAM_ENABLE is not set 126 | 127 | # 128 | # Ethernet interface 129 | # 130 | # CONFIG_ETH_ENABLE is not set 131 | 132 | # 133 | # PCI interface 134 | # 135 | # CONFIG_PCI_ENABLE is not set 136 | 137 | # 138 | # Boot options 139 | # 140 | CONFIG_BOOT_EXTPROM=y 141 | # CONFIG_BOOT_INTPROM is not set 142 | # CONFIG_BOOT_MIXPROM is not set 143 | 144 | # 145 | # VHDL Debugging 146 | # 147 | # CONFIG_DEBUG_UART is not set 148 | # CONFIG_DEBUG_IURF is not set 149 | # CONFIG_DEBUG_NOHALT is not set 150 | # CONFIG_DEBUG_PC32 is not set 151 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tkconfig/tail.tk: -------------------------------------------------------------------------------- 1 | # FILE: tail.tk 2 | # This file is boilerplate TCL/TK function definitions for 'make xconfig'. 3 | # 4 | # CHANGES 5 | # ======= 6 | # 7 | # 8 January 1998, Michael Elizabeth Chastain, 8 | # Arrange buttons in three columns for better screen fitting. 9 | # 10 | 11 | # 12 | # Read the user's settings from .config. These will override whatever is 13 | # in config.in. Don't do this if the user specified a -D to force 14 | # the defaults. 15 | # 16 | 17 | set defaults defconfig 18 | 19 | if { [file readable .config] == 1} then { 20 | if { $argc > 0 } then { 21 | if { [lindex $argv 0] != "-D" } then { 22 | read_config .config 23 | } 24 | else 25 | { 26 | read_config $defaults 27 | } 28 | } else { 29 | read_config .config 30 | } 31 | } else { 32 | read_config $defaults 33 | } 34 | 35 | update_define 1 $total_menus 0 36 | update_mainmenu 37 | 38 | button .f0.right.save -anchor w -text "Save and Exit" -underline 0\ 39 | -command { catch {exec cp -f .config .config.old}; \ 40 | writeconfig .config config.h; wrapup .wrap } 41 | 42 | button .f0.right.quit -anchor w -text "Quit Without Saving" -underline 0\ 43 | -command { maybe_exit .maybe } 44 | 45 | button .f0.right.load -anchor w -text "Load Configuration from File" \ 46 | -command { load_configfile .load "Load Configuration from file" read_config_file 47 | } 48 | 49 | button .f0.right.store -anchor w -text "Store Configuration to File" \ 50 | -command { load_configfile .load "Store Configuration to file" write_config_file } 51 | 52 | # 53 | # Now pack everything. 54 | # 55 | 56 | pack .f0.right.store .f0.right.load .f0.right.quit .f0.right.save \ 57 | -padx 0 -pady 0 -side bottom -fill x 58 | pack .f0.left .f0.middle .f0.right -side left -padx 5 -pady 0 -fill y 59 | pack .f0 -padx 5 -pady 5 60 | 61 | update idletasks 62 | set winy [expr 10 + [winfo reqheight .f0]] 63 | set scry [lindex [wm maxsize .] 1] 64 | set winx [expr 10 + [winfo reqwidth .f0]] 65 | set scrx [lindex [wm maxsize .] 0] 66 | if {$winx < $scrx} then {set maxx -1} else {set maxx $winx} 67 | if {$winy < $scry} then {set maxy -1} else {set maxy $winy} 68 | .f0 configure -width $winx -height $winy 69 | wm maxsize . $maxx $maxy 70 | 71 | # 72 | # If we cannot write our config files, disable the write button. 73 | # 74 | if { [file exists .config] == 1 } then { 75 | if { [file writable .config] == 0 } then { 76 | .f0.right.save configure -state disabled 77 | } 78 | } else { 79 | if { [file writable .] == 0 } then { 80 | .f0.right.save configure -state disabled 81 | } 82 | } 83 | 84 | #if { [file exists include/linux/autoconf.h] == 1 } then { 85 | # if { [file writable include/linux/autoconf.h] == 0 } then { 86 | # .f0.right.save configure -state disabled 87 | # } 88 | # } else { 89 | # if { [file writable include/linux/] == 0 } then { 90 | # .f0.right.save configure -state disabled 91 | # } 92 | # } 93 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tkconfig/tkparse: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galland/LEON2/1175cbb13defa50ffabac9ab93f48917f6174dc7/leon2-1.0.30-xst/tkconfig/tkparse -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tkconfig/tkparse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tkparse.h 3 | */ 4 | 5 | /* 6 | * Token types (mostly statement types). 7 | */ 8 | 9 | enum e_token 10 | { 11 | token_UNKNOWN, 12 | token_bool, 13 | token_choice_header, 14 | token_choice_item, 15 | token_comment, 16 | token_define_bool, 17 | token_define_hex, 18 | token_define_int, 19 | token_define_string, 20 | token_define_tristate, 21 | token_dep_bool, 22 | token_dep_mbool, 23 | token_dep_tristate, 24 | token_else, 25 | token_endmenu, 26 | token_fi, 27 | token_hex, 28 | token_if, 29 | token_int, 30 | token_mainmenu_name, 31 | token_mainmenu_option, 32 | token_source, 33 | token_string, 34 | token_then, 35 | token_tristate, 36 | token_unset, 37 | }; 38 | 39 | /* 40 | * Operator types for conditionals. 41 | */ 42 | 43 | enum operator 44 | { 45 | op_eq, 46 | op_neq, 47 | op_and, 48 | op_and1, 49 | op_or, 50 | op_bang, 51 | op_lparen, 52 | op_rparen, 53 | op_constant, 54 | op_variable, 55 | op_true, 56 | op_false, 57 | op_nuked 58 | }; 59 | 60 | /* 61 | * Conditions come in linked lists. 62 | * Some operators take strings: 63 | * 64 | * op_constant "foo" 65 | * op_variable "$ARCH", "$CONFIG_PMAC", "$CONFIG_EXPERIMENTAL" 66 | * 67 | * Most "$..." constructs refer to a variable which is defined somewhere 68 | * in the script. Note that it is legal to test variables which are never 69 | * defined, such as variables that are meaningful only on other architectures. 70 | */ 71 | 72 | struct condition 73 | { 74 | struct condition * next; 75 | enum operator op; 76 | const char * str; /* op_constant */ 77 | int nameindex; /* op_variable */ 78 | }; 79 | 80 | /* 81 | * Dependency list for dep_bool, dep_mbool, dep_tristate 82 | */ 83 | 84 | struct dependency 85 | { 86 | char * name; 87 | struct dependency * next; 88 | }; 89 | 90 | /* 91 | * A statement from a config.in file 92 | */ 93 | 94 | struct kconfig 95 | { 96 | struct kconfig * next; 97 | enum e_token token; 98 | int nameindex; 99 | char * label; 100 | char * value; 101 | struct condition * cond; 102 | struct dependency * depend; /* token_dep_tristate */ 103 | struct kconfig * cfg_parent; /* token_choice_item */ 104 | 105 | /* used only in tkgen.c */ 106 | int menu_number; 107 | int menu_line; 108 | struct kconfig * menu_next; 109 | }; 110 | 111 | struct variable 112 | { 113 | char * name; 114 | char defined; 115 | char global_written; 116 | }; 117 | 118 | extern struct variable vartable[]; 119 | extern int max_varnum; 120 | 121 | /* 122 | * Prototypes 123 | */ 124 | 125 | extern void fix_conditionals ( struct kconfig * scfg ); /* tkcond.c */ 126 | extern void dump_tk_script ( struct kconfig * scfg ); /* tkgen.c */ 127 | extern int get_varnum ( char * name ); /* tkparse.c */ 128 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/defs.h: -------------------------------------------------------------------------------- 1 | extern volatile int dexcn; 2 | 3 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/divtest.c: -------------------------------------------------------------------------------- 1 | #include "test.h" 2 | #include "leon.h" 3 | 4 | struct divcase { 5 | int num; 6 | int denom; 7 | int res; 8 | }; 9 | 10 | volatile struct divcase diva[] = { 11 | { 2, 3, 0}, { 3, -2, -1}, { 2, -3, 0}, { 0, 1, 0}, { 0, -1, 0}, { 1, -1, -1}, 12 | { -1, 1, -1}, { -2, 3, 0}, { -2, -3, 0}, {9, 7, 1}, 13 | { -9, 2, -4}, {-8, 2, -4}, {-8, -4, 2}, {8, -4, -2}, {-8, -8 , 1}, 14 | {-8, -9, 0}, {11, 2, 5}, {47, 2, 23}, 15 | { 12345, 679, 12345/679}, { -63636, 77, -63636/77}, 16 | { 12345, -679, -12345/679}, { -63636, -77, 63636/77}, 17 | { 145, -6079, 0}, { -636, -77777, 0}, { 63226, 7227777, 0}, 18 | { 0, 0, 0} 19 | }; 20 | 21 | struct udivcase { 22 | unsigned int num; 23 | unsigned int denom; 24 | unsigned int res; 25 | }; 26 | 27 | volatile struct udivcase udiva[] = { 28 | { 2, 3, 0}, { 0, 1, 0}, { 0xfffffffe, 3, 0xfffffffe/3}, 29 | { 0xfffffffe, 3, 0xfffffffe/3}, { 0x700ffffe, 7, 0x700ffffe/7}, 30 | { 0, 0, 0} 31 | }; 32 | 33 | divtest() 34 | { 35 | int i = 0; 36 | 37 | /* skip test if divider disabled */ 38 | if (!((lr->leonconf >> DIV_CONF_BIT) & 1)) return(0); 39 | 40 | report(DIV_TEST); 41 | while (diva[i].denom != 0) { 42 | if ((diva[i].num / diva[i].denom) != diva[i].res) fail(1); 43 | i++; 44 | } 45 | i = 0; 46 | while (udiva[i].denom != 0) { 47 | if ((udiva[i].num / udiva[i].denom) != udiva[i].res) fail(1); 48 | i++; 49 | } 50 | return(1); 51 | } 52 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/dsu.c: -------------------------------------------------------------------------------- 1 | #include "leon.h" 2 | #include "test.h" 3 | 4 | struct dsuregs { 5 | volatile unsigned int dsuctrl; 6 | volatile unsigned int tracectrl; 7 | volatile unsigned int timetag; 8 | volatile unsigned int ahbbreak1; 9 | volatile unsigned int ahbmask1; 10 | volatile unsigned int ahbbreak2; 11 | volatile unsigned int ahbmask2; 12 | }; 13 | 14 | struct tracebuf { 15 | volatile unsigned int buf[8192]; 16 | }; 17 | 18 | dsu_ram_test() 19 | { 20 | unsigned int ntrace, dsuen; 21 | int i; 22 | 23 | struct dsuregs *dsu = (struct dsuregs *) 0x90000000; 24 | struct tracebuf *tbuf = (struct tracebuf *) 0x90010000; 25 | 26 | if (!(lr->leonconf & 0x40000000)) return; 27 | dsu->dsuctrl = 0xfff00008; 28 | dsuen = dsu->dsuctrl & 8; 29 | ntrace = (dsu->dsuctrl >> 20 ) + 1; 30 | if (!dsuen) return; 31 | 32 | 33 | dsu->dsuctrl = dsu->dsuctrl | 1; 34 | if (!(dsu->dsuctrl & 1)) return; 35 | dsu->dsuctrl = dsu->dsuctrl & ~1; 36 | 37 | report(DSU_TEST); 38 | 39 | /* test trace buffer memory*/ 40 | 41 | 42 | buframfill(ntrace<<2, 0x90010000, 0x55555555, 0xaaaaaaaa); 43 | if (buframtest(ntrace<<2, 0x90010000, 0x55555555, 0xaaaaaaaa)) 44 | fail(1); 45 | buframfill(ntrace<<2, 0x90010000, 0xaaaaaaaa, 0x55555555); 46 | if (buframtest(ntrace<<2, 0x90010000, 0xaaaaaaaa, 0x55555555)) 47 | fail(2); 48 | 49 | } 50 | 51 | buframtest(int len, int buf, int patt1, int patt2) 52 | { 53 | asm (" 54 | mov %g0, %o5 55 | 1: 56 | sub %o0, 4, %o0 57 | ld [%o1+%o0], %o4 58 | subcc %o0, 4, %o0 59 | xor %o4, %o2, %o4 60 | or %o4, %o5, %o5 61 | ld [%o1+%o0], %o4 62 | xor %o4, %o3, %o4 63 | bg 1b 64 | or %o4, %o5, %o5 65 | mov %o5, %o0 66 | "); 67 | } 68 | 69 | buframfill(int len, int buf, int patt1, int patt2) 70 | { 71 | asm (" 72 | 1: 73 | sub %o0, 4, %o0 74 | st %o2, [%o1+%o0] 75 | subcc %o0, 4, %o0 76 | bg 1b 77 | st %o3, [%o1+%o0] 78 | "); 79 | 80 | } 81 | 82 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/extra.c: -------------------------------------------------------------------------------- 1 | #include "test.h" 2 | extra() 3 | { 4 | if (divTest() != 1) fail(1); 5 | if (divTest1() != 1) fail(1); 6 | if (divTest2() != 1) fail(1); 7 | if (divTest3() != 1) fail(1); 8 | } 9 | 10 | int dun2 [4] = {1,1,1,1}; 11 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/fpu.c: -------------------------------------------------------------------------------- 1 | #include "leon.h" 2 | #include "test.h" 3 | #include 4 | 5 | int __errno; 6 | fpu_init() 7 | { 8 | int tmp; 9 | 10 | tmp = getpsr(); 11 | setpsr(tmp | (1 << 12)); 12 | set_fsr(0); 13 | } 14 | 15 | fpu_test() 16 | { 17 | if (!((lr->leonconf>>FPU_CONF_BIT)&FPU_CONF_MASK)) return(0); 18 | report(FPU_TEST); 19 | 20 | fpu_init(); 21 | fpu_main(); 22 | } 23 | 24 | asm(" 25 | 26 | .global a1, a2 27 | .align 8 28 | a1: .word 0x48000001 29 | .word 0 30 | b1: .word 0x48000000 31 | .word 0 32 | c1: .word 0x46c00000 33 | .word 0 34 | "); 35 | 36 | fpu_main() 37 | { 38 | volatile double a,c; 39 | extern double a1,b1,c1; 40 | float b; 41 | int tmp; 42 | 43 | a = *(double *)&a1 - *(double *)&b1; 44 | if (a != c1) fail(1); 45 | a = sqrt(3.0); 46 | if (fabs((a * a) - 3.0) > 1E-15) fail(2); 47 | b = sqrt(3.0); 48 | if (fabs((b * b) - 3.0) > 1E-7) fail(3); 49 | tmp = fpu_pipe(); 50 | if (tmp) fail(tmp); 51 | } 52 | 53 | double sqrt(){}; 54 | double f1x = -1.0; 55 | double fq1[2]; 56 | int fsr1 = 0x80000000; 57 | int dummy2 = 2; 58 | int dummy3 = 2; 59 | 60 | fpu_pipe() 61 | { 62 | asm(" 63 | 64 | set fsr1, %o0 ! check ldfsr/stfsr interlock 65 | ld [%o0], %fsr 66 | st %g0, [%o0] 67 | ld [%o0], %fsr 68 | st %fsr, [%o0] 69 | ld [%o0], %o2 70 | subcc %g0, %o2, %g0 71 | bne,a fail 72 | mov 3, %o0 73 | 74 | set 0x0f800000, %o1 ! check ldfsr/fpop interlock 75 | st %o1, [%o0] 76 | ld [%o0], %fsr 77 | st %g0, [%o0] 78 | set f1x, %o2 79 | ld [%o2], %f0 80 | nop; nop 81 | ld [%o0], %fsr 82 | fsqrts %f0, %f1 83 | mov %tbr, %o3 84 | and %o3, 0x0ff0, %o3 85 | subcc %o3, 0x070, %g0 86 | be,a fail 87 | mov 4, %o0 88 | 89 | 90 | mov 0, %o0 91 | 92 | fail: 93 | nop 94 | 95 | "); 96 | } 97 | 98 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/ioport.c: -------------------------------------------------------------------------------- 1 | 2 | #include "leon.h" 3 | #include "test.h" 4 | 5 | int ioport_test() 6 | { 7 | 8 | /* report start of test */ 9 | report(PIO_TEST); 10 | 11 | /* initialise registers */ 12 | 13 | lr->piodata = 0; 14 | lr->piodir = 0; 15 | lr->pioirq = 0; 16 | lr->uartctrl1 = 0; 17 | lr->uartctrl2 = 0; 18 | 19 | 20 | /* check that port can be read & written */ 21 | lr->piodata = 0xaa55; 22 | lr->piodir = 0xffff; 23 | if ((lr->piodata & 0x0ffff) != 0xaa55) fail(1); 24 | lr->piodata = 0x55aa; 25 | if ((lr->piodata & 0x0ffff) != 0x55aa) fail(2); 26 | lr->piodata = 0x0; 27 | if ((lr->piodata & 0x0ffff) != 0) fail(3); 28 | lr->piodata = 0x1234; 29 | if ((lr->piodata & 0x0ffff) != 0x1234) fail(4); 30 | lr->piodata = ~0x1234; 31 | if ((lr->piodata & 0x0ffff) != (0xffff & ~0x1234)) fail(5); 32 | 33 | /* check pio[31:16] in case we are in 16-bit mode */ 34 | 35 | if (((lr->memcfg1 & 0x200) || (lr->memcfg2 & 0x4020)) == 0) { 36 | lr->memcfg1 &= ~(1<<28); 37 | lr->piodata = 0x12345678; 38 | lr->piodir = 0x3ffff; 39 | lr->piodir = 0x3ffff; /* artificial delay */ 40 | if (lr->piodata != 0x12345678) fail(6); 41 | lr->piodata = ~lr->piodata; 42 | lr->piodata = lr->piodata; /* artificial delay */ 43 | if (lr->piodata != ~0x12345678) fail(7); 44 | lr->memcfg1 |= (1<<28); 45 | } 46 | 47 | /* check port interrupts */ 48 | 49 | lr->piodata = 0; 50 | lr->irqclear = -1; /* clear all pending interrupts */ 51 | lr->pioirq = 0xe3c2a180; 52 | lr->irqclear = -1; 53 | if ((lr->irqpend & 0x0f0) != (1<<4)) fail(8); 54 | lr->piodata = -1; 55 | lr->piodata = -1; /* add delay */ 56 | if ((lr->irqpend & 0x0f0) != ((1<<7) | (1<<5) | (1<<4))) fail(9); 57 | lr->irqclear = -1; 58 | if ((lr->irqpend & 0x0f0) != (1<<5)) fail(10); 59 | lr->piodata = 0; 60 | lr->piodata = 0; 61 | if ((lr->irqpend & 0x0f0) != ((1<<6) | (1<<5) | (1<<4))) fail(11); 62 | lr->irqclear = -1; 63 | if ((lr->irqpend & 0x0f0) != (1<<4)) fail(12); 64 | lr->piodir = 0; 65 | lr->pioirq = 0; 66 | lr->irqclear = -1; 67 | 68 | 69 | } 70 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/irqctrl.c: -------------------------------------------------------------------------------- 1 | #include "leon.h" 2 | #include "test.h" 3 | 4 | irq_test() 5 | { 6 | extern volatile char irqtbl[]; 7 | int i, a, psr; 8 | volatile int marr[4]; 9 | volatile int larr[4]; 10 | 11 | report(IRQ_TEST); /* report test type */ 12 | lr->uartctrl1 = 0x0; /* clear uart1 ctrl */ 13 | lr->uartctrl2 = 0x0; /* clear uart2 ctrl */ 14 | lr->irqmask = 0x0; /* mask all interrupts */ 15 | lr->irqclear = -1; /* clear all pending interrupts */ 16 | irqtbl[0] = 1; /* init irqtable */ 17 | 18 | /* test that interrupts are properly prioritised */ 19 | 20 | lr->irqforce = 0x0fffe; /* force all interrupts */ 21 | if (lr->irqforce != 0x0fffe) fail(1); /* check force reg */ 22 | 23 | lr->irqmask = 0x0fffe; /* unmask all interrupts */ 24 | if (lr->irqmask != 0x0fffe) fail(2); /* check mask reg */ 25 | while (lr->irqforce) {}; /* wait until all iterrupts are taken */ 26 | 27 | /* check that all interrupts were take in right order */ 28 | if (irqtbl[0] != 16) fail(3); 29 | for (i=1;i<16;i++) { if (irqtbl[i] != (0x20 - i)) fail(4);} 30 | 31 | /* test priority of the two interrupt levels */ 32 | 33 | irqtbl[0] = 1; /* init irqtable */ 34 | lr->irqmask = 0xaaaafffe; /* odd irq -> level 1 */ 35 | if (lr->irqmask != 0xaaaafffe) fail(5); /* check mask reg */ 36 | lr->irqforce = 0x0fffe; /* force all interrupts */ 37 | while (lr->irqforce) {}; /* wait until all iterrupts are taken */ 38 | 39 | /* check that all interrupts were take in right order */ 40 | if (irqtbl[0] != 16) fail(6); 41 | for (i=1;i<8;i++) { if (irqtbl[i] != (0x20 - (i*2-1))) 42 | fail(7);} 43 | for (i=2;i<8;i++) { if (irqtbl[i+8] != (0x20 - (i*2))) 44 | fail(8);} 45 | 46 | /* check interrupts of multi-cycle instructions */ 47 | 48 | marr[0] = 1; marr[1] = marr[0]+1; marr[2] = marr[1]+1; 49 | a = marr[2]+1; marr[3] = a; larr[0] = 6; 50 | 51 | lr->irqmask = 0x0; /* mask all interrupts */ 52 | irqtbl[0] = 1; /* init irqtable */ 53 | lr->irqmask = 0x00002; /* unmask interrupt */ 54 | if (lr->leonconf & 0x100) { /* check for HW mul */ 55 | lr->irqforce = 0x00002; /* force interrupt */ 56 | asm(" 57 | nop; 58 | umul %g0, %g1, %g0 59 | umul %g0, %g1, %g0 60 | umul %g0, %g1, %g0 61 | "); 62 | } 63 | lr->irqforce = 0x00002; /* force interrupt */ 64 | asm("nop;"); 65 | larr[1] = larr[0]; 66 | if (larr[0] != 6) fail(10); 67 | lr->irqforce = 0x00002; /* force interrupt */ 68 | asm("nop;"); 69 | larr[1] = 0; 70 | if (larr[1] != 0) fail(11); 71 | 72 | while (lr->irqforce) {}; /* wait until all iterrupts are taken */ 73 | 74 | /* check number of interrupts */ 75 | if (lr->leonconf & 0x100) { if (irqtbl[0] != 4) fail(13);} 76 | else if (irqtbl[0] != 3) {fail(13);} 77 | 78 | lr->irqmask = 0x0; /* mask all interrupts */ 79 | 80 | /* check that PSR.PIL work properly */ 81 | 82 | lr->irqforce = 0x0fffe; /* force all interrupts */ 83 | irqtbl[0] = 1; /* init irqtable */ 84 | psr = getpsr() | (15 << 8); 85 | setpsr(psr); /* PIL = 15 */ 86 | lr->irqmask = -1; /* enable all interrupts */ 87 | while (!lr->irqmask); /* avoid compiler optimisation */ 88 | if (irqtbl[0] != 2) fail(14); 89 | if (irqtbl[1] != 0x1f) fail(15); 90 | setpsr(getpsr() - (1 << 8)); 91 | for (i=2;i<16;i++) { 92 | setpsr(getpsr() - (1 << 8)); 93 | if (irqtbl[0] != i+1) fail(14); 94 | if (irqtbl[i] != (0x20 - i)) fail(15); 95 | } 96 | 97 | /* test optional secondary interrupt controller */ 98 | /* 99 | lr->irqmask = 0x0; 100 | lr->imask2 = 0x0; 101 | lr->ipend2 = 0x0; 102 | lr->ipend2 = 0x1; 103 | if (!lr->ipend2) return; 104 | lr->ipend2 = -1; 105 | lr->imask2 = -1; 106 | for (i=lr->istat2 & 0x1f; i >=0; i--) { 107 | if ((lr->istat2 & 0x1f) != i) fail (17+i); 108 | lr->istat2 = (1 << i); 109 | lr->irqclear = -1; 110 | } 111 | if (lr->istat2 & 0x20) fail (33); 112 | if (lr->irqpend) fail (34); 113 | */ 114 | 115 | } 116 | 117 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/leon_full_test.c: -------------------------------------------------------------------------------- 1 | #include "leon.h" 2 | #include "test.h" 3 | 4 | leon_test() 5 | { 6 | 7 | report(SYS_TEST); 8 | 9 | report(RAM_INIT); 10 | ramfill(); 11 | ramtest(); 12 | dsu_ram_test(); 13 | report(REG_TEST); 14 | if (regtest() != 1) fail(1); 15 | multest(); 16 | divtest(); 17 | wp_test(); 18 | fpu_test(); 19 | memtest(); 20 | edac_test(); 21 | cache_test(); 22 | irq_test(); 23 | uart_test(); 24 | timer_test(); 25 | ioport_test(); 26 | report(TEST_END); 27 | } 28 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/leon_ram.c: -------------------------------------------------------------------------------- 1 | #include "leon.h" 2 | #include "test.h" 3 | 4 | leon_test() 5 | { 6 | 7 | report(SYS_TEST); 8 | 9 | report(RAM_INIT); 10 | ramfill(); 11 | ramtest(); 12 | report(REG_TEST); 13 | if (regtest() != 1) fail(1); 14 | dsu_ram_test(); 15 | report(TEST_END); 16 | } 17 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/leon_test.c: -------------------------------------------------------------------------------- 1 | #include "leon.h" 2 | #include "test.h" 3 | 4 | leon_test() 5 | { 6 | 7 | // report(RAM_INIT); 8 | // ramfill(); 9 | // ramtest(); 10 | // dsu_ram_test(); 11 | 12 | report(SYS_TEST); 13 | 14 | report(REG_TEST); 15 | if (regtest() != 1) fail(1); 16 | multest(); 17 | divtest(); 18 | wp_test(); 19 | fpu_test(); 20 | memtest(); 21 | edac_test(); 22 | cache_test(); 23 | irq_test(); 24 | uart_test(); 25 | timer_test(); 26 | ioport_test(); 27 | report(TEST_END); 28 | } 29 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/leon_test_mmu.c: -------------------------------------------------------------------------------- 1 | #include "leon.h" 2 | #include "test.h" 3 | 4 | leon_test() 5 | { 6 | 7 | // report(RAM_INIT); 8 | // ramfill(); 9 | // ramtest(); 10 | // dsu_ram_test(); 11 | 12 | report(SYS_TEST); 13 | 14 | report(REG_TEST); 15 | if (regtest() != 1) fail(1); 16 | mmu_test(); 17 | multest(); 18 | divtest(); 19 | wp_test(); 20 | fpu_test(); 21 | // memtest(); 22 | // edac_test(); 23 | // cache_test(); 24 | irq_test(); 25 | uart_test(); 26 | timer_test(); 27 | ioport_test(); 28 | report(TEST_END); 29 | } 30 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/linkboot: -------------------------------------------------------------------------------- 1 | /* 2 | *uncomment this if you want the linker to output srecords. 3 | OUTPUT_FORMAT(srec) 4 | * 5 | */ 6 | OUTPUT_ARCH(sparc) 7 | SEARCH_DIR(/usr/local/erc32/sparc-rtems-aout/lib) 8 | SEARCH_DIR(/usr/local/erc32/lib/gcc-lib/sparc-rtems/egcs-2.91.60) 9 | __DYNAMIC = 0; 10 | ENTRY(start) 11 | 12 | /* 13 | * The memory map looks like this: 14 | * +--------------------+ <- low memory 15 | * | .text | 16 | * | etext | 17 | * | ctor list | the ctor and dtor lists are for 18 | * | dtor list | C++ support 19 | * | _endtext | 20 | * +--------------------+ 21 | * | .data | initialized data goes here 22 | * | _sdata | 23 | * | _edata | 24 | * +--------------------+ 25 | * | .bss | 26 | * | __bss_start | start of bss, cleared by crt0 27 | * | _end | start of heap, used by sbrk() 28 | * +--------------------+ 29 | * | heap space | 30 | * | _ENDHEAP | 31 | * | stack space | 32 | * | __stack | top of stack 33 | * +--------------------+ <- high memory 34 | */ 35 | 36 | 37 | /* 38 | * User modifiable values: 39 | * 40 | * _CLOCK_SPEED in Mhz (used to program the counter/timers) 41 | * 42 | * _PROM_SIZE size of PROM (permissible values are 4K, 8K, 16K 43 | * 32K, 64K, 128K, 256K, and 512K) 44 | * _RAM_SIZE size of RAM (permissible values are 256K, 512K, 45 | * 1MB, 2Mb, 4Mb, 8Mb, 16Mb, and 32Mb) 46 | * 47 | * MAKE SURE THESE MATCH THE MEMORY DESCRIPTION SECTION!!! 48 | */ 49 | 50 | MEMORY 51 | { 52 | rom : ORIGIN = 0x00000000, LENGTH = 4M 53 | ram : ORIGIN = 0x40000000, LENGTH = 2M 54 | } 55 | 56 | /* 57 | * stick everything in ram (of course) 58 | */ 59 | SECTIONS 60 | { 61 | .text : 62 | { 63 | CREATE_OBJECT_SYMBOLS 64 | text_start = .; 65 | _text_start = .; 66 | *(.text) 67 | etext = ALIGN(0x10); 68 | _etext = .; 69 | *(.lit) 70 | *(.shdata) 71 | _endtext = .; 72 | } > rom 73 | .dynamic : { *(.dynamic) } >ram 74 | .got : { *(.got) } >ram 75 | .plt : { *(.plt) } >ram 76 | .hash : { *(.hash) } >ram 77 | .dynrel : { *(.dynrel) } >ram 78 | .dynsym : { *(.dynsym) } >ram 79 | .dynstr : { *(.dynstr) } >ram 80 | .hash : { *(.hash) } >ram 81 | .data : 82 | { 83 | data_start = .; 84 | _data_start = .; 85 | _sdata = . ; 86 | *(.data) 87 | edata = ALIGN(0x10); 88 | _edata = .; 89 | } > ram 90 | .shbss : 91 | { 92 | *(.shbss) 93 | } > ram 94 | .bss : 95 | { 96 | __bss_start = ALIGN(0x8); 97 | _bss_start = .; 98 | bss_start = .; 99 | *(.bss) 100 | *(COMMON) 101 | end = .; 102 | _end = ALIGN(0x8); 103 | __end = ALIGN(0x8); 104 | } > ram 105 | .stab . (NOLOAD) : 106 | { 107 | [ .stab ] 108 | } 109 | .stabstr . (NOLOAD) : 110 | { 111 | [ .stabstr ] 112 | } 113 | } 114 | 115 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/linkram: -------------------------------------------------------------------------------- 1 | /* 2 | *uncomment this if you want the linker to output srecords. 3 | OUTPUT_FORMAT(srec) 4 | * 5 | */ 6 | OUTPUT_ARCH(sparc) 7 | SEARCH_DIR(/usr/local/erc32/sparc-erc32-aout/lib) 8 | SEARCH_DIR(/usr/local/erc32/lib/gcc-lib/sparc-aout/2.7.2) 9 | __DYNAMIC = 0; 10 | ENTRY(start) 11 | 12 | /* 13 | * The memory map looks like this: 14 | * +--------------------+ <- low memory 15 | * | .text | 16 | * | etext | 17 | * | ctor list | the ctor and dtor lists are for 18 | * | dtor list | C++ support 19 | * | _endtext | 20 | * +--------------------+ 21 | * | .data | initialized data goes here 22 | * | _sdata | 23 | * | _edata | 24 | * +--------------------+ 25 | * | .bss | 26 | * | __bss_start | start of bss, cleared by crt0 27 | * | _end | start of heap, used by sbrk() 28 | * +--------------------+ 29 | * | heap space | 30 | * | _ENDHEAP | 31 | * | stack space | 32 | * | __stack | top of stack 33 | * +--------------------+ <- high memory 34 | */ 35 | 36 | 37 | /* 38 | * User modifiable values: 39 | * 40 | * _CLOCK_SPEED in Mhz (used to program the counter/timers) 41 | * 42 | * _PROM_SIZE size of PROM (permissible values are 4K, 8K, 16K 43 | * 32K, 64K, 128K, 256K, and 512K) 44 | * _RAM_SIZE size of RAM (permissible values are 256K, 512K, 45 | * 1MB, 2Mb, 4Mb, 8Mb, 16Mb, and 32Mb) 46 | * 47 | * MAKE SURE THESE MATCH THE MEMORY DESCRIPTION SECTION!!! 48 | */ 49 | 50 | MEMORY 51 | { 52 | rom : ORIGIN = 0x00000000, LENGTH = 4M 53 | ram : ORIGIN = 0x08000000, LENGTH = 2M 54 | } 55 | 56 | /* 57 | * stick everything in ram (of course) 58 | */ 59 | SECTIONS 60 | { 61 | .text : 62 | { 63 | CREATE_OBJECT_SYMBOLS 64 | text_start = .; 65 | _text_start = .; 66 | *(.text) 67 | etext = ALIGN(0x10); 68 | _etext = .; 69 | *(.lit) 70 | *(.shdata) 71 | _endtext = .; 72 | } > ram 73 | .dynamic : { *(.dynamic) } >ram 74 | .got : { *(.got) } >ram 75 | .plt : { *(.plt) } >ram 76 | .hash : { *(.hash) } >ram 77 | .dynrel : { *(.dynrel) } >ram 78 | .dynsym : { *(.dynsym) } >ram 79 | .dynstr : { *(.dynstr) } >ram 80 | .hash : { *(.hash) } >ram 81 | .data : 82 | { 83 | data_start = .; 84 | _data_start = .; 85 | _sdata = . ; 86 | *(.data) 87 | edata = ALIGN(0x10); 88 | _edata = .; 89 | } > ram 90 | .shbss : 91 | { 92 | *(.shbss) 93 | } > ram 94 | .bss : 95 | { 96 | __bss_start = ALIGN(0x8); 97 | _bss_start = .; 98 | bss_start = .; 99 | *(.bss) 100 | *(COMMON) 101 | end = .; 102 | _end = ALIGN(0x8); 103 | __end = ALIGN(0x8); 104 | } > ram 105 | .stab . (NOLOAD) : 106 | { 107 | [ .stab ] 108 | } 109 | .stabstr . (NOLOAD) : 110 | { 111 | [ .stabstr ] 112 | } 113 | } 114 | 115 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/misc.c: -------------------------------------------------------------------------------- 1 | #include "leon.h" 2 | struct lregs *lr = (struct lregs *) PREGS; 3 | unsigned char *msg = (unsigned char *) IOAREA; 4 | //unsigned char *msg = (unsigned char *) CRAM; 5 | unsigned short *msgh = (unsigned short *) IOAREA; 6 | unsigned int *msgw = (unsigned int *) IOAREA; 7 | unsigned long long *msgd = (unsigned long long *) IOAREA; 8 | int test ; 9 | int dummy[4] = {0,0,0,0}; 10 | 11 | fail(err) int err; { msg[test] = err; } 12 | report(test_case) int test_case; { test = test_case; msg[test] = 0; } 13 | 14 | int getpsr(void) { 15 | unsigned long retval; 16 | __asm__ __volatile__("rd %%psr, %0" : "=r" (retval)); 17 | return retval; 18 | } 19 | 20 | void setpsr(int psr) { 21 | __asm__ __volatile__( 22 | "wr %0, 0x0, %%psr\n\t" 23 | "nop; nop; nop\n" 24 | : : "r" (psr) 25 | : "memory", "cc"); 26 | } 27 | 28 | unsigned char inb(a) int a; { return(msg[a]); } 29 | outb(a,d) int a; char d; { msg[a] = d; } 30 | unsigned short inh(a) int a; { return(msgh[a]); } 31 | outh(a,d) int a; short d; { msgh[a] = d; } 32 | unsigned int inw(a) int a; { return(msgw[a]); } 33 | outw(a,d) int a; short d; { msgw[a] = d; } 34 | unsigned long long ind(a) int a; { return(msgd[a]); } 35 | outd(a,d) int a; short d; { msgd[a] = d; } 36 | 37 | asm(" 38 | .global _get_fsr, _set_fsr 39 | .global get_fsr, set_fsr 40 | .data 41 | fsrtmp: .word 0 42 | .text 43 | _get_fsr: 44 | get_fsr: 45 | set fsrtmp, %o0 46 | st %fsr, [%o0] 47 | retl 48 | ld [%o0], %o0 49 | _set_fsr: 50 | set_fsr: 51 | set fsrtmp, %o1 52 | st %o0, [%o1] 53 | retl 54 | ld [%o1], %fsr 55 | .global get_asr24 56 | get_asr24: 57 | retl; mov %asr24, %o0; 58 | .global get_asr25 59 | get_asr25: 60 | retl; mov %asr25, %o0; 61 | .global get_asr26 62 | get_asr26: 63 | retl; mov %asr26, %o0; 64 | .global get_asr27 65 | get_asr27: 66 | retl; mov %asr27, %o0; 67 | .global get_asr28 68 | get_asr28: 69 | retl; mov %asr28, %o0; 70 | .global get_asr29 71 | get_asr29: 72 | retl; mov %asr29, %o0; 73 | .global get_asr30 74 | get_asr30: 75 | retl; mov %asr30, %o0; 76 | .global get_asr31 77 | get_asr31: 78 | retl; mov %asr31, %o0; 79 | .global set_asr24 80 | set_asr24: 81 | retl; mov %o0, %asr24; 82 | .global set_asr25 83 | set_asr25: 84 | retl; mov %o0, %asr25; 85 | .global set_asr26 86 | set_asr26: 87 | retl; mov %o0, %asr26; 88 | .global set_asr27 89 | set_asr27: 90 | retl; mov %o0, %asr27; 91 | .global set_asr28 92 | set_asr28: 93 | retl; mov %o0, %asr28; 94 | .global set_asr29 95 | set_asr29: 96 | retl; mov %o0, %asr29; 97 | .global set_asr30 98 | set_asr30: 99 | retl; mov %o0, %asr30; 100 | .global set_asr31 101 | set_asr31: 102 | retl; mov %o0, %asr31; 103 | "); 104 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/mmu_asm.S: -------------------------------------------------------------------------------- 1 | #include "leon.h" 2 | #include "test.h" 3 | #include "mmu.h" 4 | 5 | .seg "text" 6 | .proc 0 7 | .align PAGE_SIZE 8 | .global mmu_func1 9 | mmu_func1: 10 | save %sp, -112, %sp 11 | ret 12 | restore 13 | 14 | 15 | /* SRMMU_TFAULT() SRMMU_DFAULT() 16 | * %l0 : %psr 17 | * %l1 = pc :set by trap 18 | * %l2 = npc :set by trap 19 | * %l3 : %wim 20 | * %l7 : 1 on inst, 0 on data 21 | */ 22 | .global srmmu_fault 23 | srmmu_fault: 24 | mov 0x400, %l5 25 | mov 0x300, %l4 26 | lda [%l5] ASI_M_MMUREGS, %l6 ! read sfar first 27 | lda [%l4] ASI_M_MMUREGS, %l5 ! read sfsr last 28 | 29 | set pth_addr,%l7 ! repair pth 30 | ld [%l7],%l7 31 | ld [%l7],%l4 32 | ld [%l7+4],%l5 33 | ld [%l7+8],%l6 34 | or %l6,0x0,%l6 ! one page 35 | sta %g0, [%l6] ASI_M_FLUSH_PROBE 36 | 37 | st %l5,[%l4] 38 | inc 12,%l7 39 | set pth_addr,%l5 40 | st %l7,[%l5] 41 | 42 | 43 | 44 | jmp %l1 ! reexecute command 45 | rett %l2 46 | 47 | .align 8 48 | .global pth_addr, pth_addr1 49 | pth_addr: .word 0 50 | .align 8 51 | pth_addr1: .word 0,0,0,0,0,0,0,0,0 52 | 53 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/multest.c: -------------------------------------------------------------------------------- 1 | #include "test.h" 2 | #include "leon.h" 3 | 4 | struct mulcase { 5 | int fac1; 6 | int fac2; 7 | int res; 8 | }; 9 | 10 | volatile struct mulcase mula[] = { { 2, 3, 6}, { 2, -3, -6}, { 0, 1, 0}, 11 | { 0, -1, 0}, { 1, -1, -1}, { -1, 1, -1}, { -2, 3, -6}, 12 | { -2, -3, 6}, { 0, 0, 9}}; 13 | 14 | static int mulscctmp = 0xfffff000; 15 | 16 | multest() 17 | { 18 | int i = 0; 19 | 20 | report(MUL_TEST); 21 | if (mulscc_test() != 0x123) fail(1); 22 | 23 | /* skip test if divider disabled */ 24 | if (!((lr->leonconf >> MUL_CONF_BIT) & 1)) return(0); 25 | 26 | while (mula[i].res != 9) { 27 | if ((mula[i].fac1 * mula[i].fac2) - mula[i].res) fail(1); 28 | i++; 29 | } 30 | if (!mulpipe()) fail(2); 31 | if (!((lr->leonconf >> MAC_CONF_BIT) & 1)) return(0); 32 | if (!macpipe()) fail(3); 33 | } 34 | 35 | mulscc_test () { 36 | asm (" 37 | .text 38 | 39 | addcc %g0, %g0, %g0 40 | set mulscctmp, %o2 41 | mov 0, %o0 42 | mov 0x246, %o1 43 | mov %g0, %y 44 | nop; nop; nop 45 | ld [%o2], %o0 46 | mulscc %o1, %o0, %o0 47 | retl 48 | nop 49 | "); 50 | } 51 | 52 | mulpipe () { 53 | asm (" 54 | .text 55 | 56 | mov %g0, %y 57 | set 1, %o0 58 | orcc %g0, 1, %g0 ! clear icc 59 | umulcc %g0, 1, %g0 ! set Z 60 | bne 1f 61 | nop 62 | umulcc %o0, -1, %g0 ! set N 63 | bge 1f 64 | nop 65 | smulcc %o0, -1, %g0 ! set N and Y 66 | mov %y, %o1 67 | subcc %o1, -1, %g0 68 | bne 1f 69 | nop 70 | umulcc %o0, -1, %g0 ! set N 71 | mov %psr, %o1 72 | srl %o1, 20, %o1 73 | and %o1, 0x0f, %o1 74 | subcc %o1, 8, %g0 75 | bne 1f 76 | nop 77 | 78 | retl 79 | or %g0, 1, %o0 80 | 81 | 1: 82 | retl 83 | mov %g0, %o0 84 | "); 85 | } 86 | 87 | macpipe () { 88 | asm (" 89 | .text 90 | 91 | set 0x55555555, %o1 ! test %asr18 92 | mov %o1, %asr18 93 | nop; nop; nop 94 | mov %asr18, %o2 95 | subcc %o1, %o2, %g0 96 | bne 1f 97 | nop 98 | not %o1 99 | mov %o1, %asr18 100 | nop; nop; nop 101 | mov %asr18, %o2 102 | subcc %o1, %o2, %g0 103 | bne 1f 104 | nop 105 | 106 | set 0xffff, %o0 107 | mov %g0, %asr18 108 | mov %g0, %y 109 | umac %o0, -1, %o1 110 | umac %o0, -1, %o1 111 | umac %o0, -1, %o1 112 | umac %o0, -1, %o1 113 | umac %o0, -1, %o1 114 | umac %o0, -1, %o1 115 | umac %o0, -1, %o1 116 | umac %o0, -1, %o1 117 | mov %y, %o4 118 | mov %asr18, %o3 119 | set 0xfff00008, %o2 120 | subcc %o1, %o2, %g0 121 | bne 1f 122 | subcc %o1, %o3, %g0 123 | bne 1f 124 | subcc %o4, 0x07, %g0 125 | bne 1f 126 | 127 | set 0xffff, %o0 128 | mov %g0, %asr18 129 | mov %g0, %y 130 | smac %o0, -1, %o1 131 | smac %o0, -1, %o1 132 | smac %o0, -1, %o1 133 | smac %o0, -1, %o1 134 | smac %o0, -1, %o1 135 | smac %o0, -1, %o1 136 | smac %o0, -1, %o1 137 | smac %o0, -1, %o1 138 | mov %y, %o4 139 | mov %asr18, %o3 140 | subcc %o1, 8, %g0 141 | bne 1f 142 | subcc %o1, 8, %g0 143 | bne 1f 144 | subcc %o4, 0, %g0 145 | bne 1f 146 | 147 | retl 148 | or %g0, 1, %o0 149 | 150 | 1: 151 | retl 152 | mov %g0, %o0 153 | 154 | "); 155 | } 156 | 157 | int ddd[8] = {0,0,0,0,0,0,0,0}; 158 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/rom.dat: -------------------------------------------------------------------------------- 1 | 2 | boot.exe: file format elf32-sparc 3 | 4 | Contents of section .text: 5 | 0000 81d82000 03000004 821060c0 81884000 .. .......`...@. 6 | 0010 81900000 81980000 81800000 01000000 ................ 7 | 0020 0f200000 03002040 8210600f c221e014 . .... @..`..!.. 8 | 0030 c201e008 82086100 85286001 82104002 ......a..(`...@. 9 | 0040 050003c0 82104002 c221e008 c201e000 ......@..!...... 10 | 0050 820863ff c221e000 82086300 c401e0a0 ..c..!....c..... 11 | 0060 8730a004 8608e003 82104003 07010200 .0........@..... 12 | 0070 8210c001 c221e000 8728a004 8208e070 .....!...(.....p 13 | 0080 8608a0c0 8730e004 8210c001 8730e002 .....0.......0.. 14 | 0090 8210c001 86102800 8210c001 8088a003 ......(......... 15 | 00a0 12800003 01000000 82006200 07354e10 ..........b..5N. 16 | 00b0 8210c001 c221e004 86103fff c021e00c .....!....?..!.. 17 | 00c0 c021e010 c021e01c c021e020 c621e064 .!...!...!. .!.d 18 | 00d0 c621e060 c021e048 c621e044 c621e040 .!.`.!.H.!.D.!.@ 19 | 00e0 c021e058 c621e054 c621e050 c621e07c .!.X.!.T.!.P.!.| 20 | 00f0 c621e078 c021e074 c621e08c c621e088 .!.x.!.t.!...!.. 21 | 0100 c021e084 c021e01c c021e020 c021e0a0 .!...!...!. .!.. 22 | 0110 c021e0a8 c021e098 c021e090 c021e094 .!...!...!...!.. 23 | 0120 c621e09c c021e0b0 c021e0b4 c621e0b8 .!...!...!...!.. 24 | 0130 c021e0b8 c401e008 8730a01e 8688e003 .!.......0...... 25 | 0140 02800003 01000000 a1800000 c401e024 ...............$ 26 | 0150 8730a014 8608e01f 88100000 8a100000 .0.............. 27 | 0160 8c100000 a0100000 a2100000 a4100000 ................ 28 | 0170 a6100000 a8100000 aa100000 ac100000 ................ 29 | 0180 ae100000 90100000 92100000 94100000 ................ 30 | 0190 96100000 98100000 9a100000 9c100000 ................ 31 | 01a0 9e100000 86a0e001 16bfffef 81e00000 ................ 32 | 01b0 8730a004 8088e003 02800015 07000000 .0.............. 33 | 01c0 8610e25c c108c000 c1180000 c5180000 ...\............ 34 | 01d0 c9180000 cd180000 d1180000 d5180000 ................ 35 | 01e0 d9180000 dd180000 e1180000 e5180000 ................ 36 | 01f0 e9180000 ed180000 f1180000 f5180000 ................ 37 | 0200 f9180000 10800002 fd180000 13100000 ................ 38 | 0210 15200000 17203c00 9612e3a7 d622a028 . ... <......".( 39 | 0220 82102002 81904000 03000004 821060e0 .. ...@.......`. 40 | 0230 81884000 01000000 01000000 01000000 ..@............. 41 | 0240 071000bf 8610e3f0 bc100003 9c20e060 ............. .` 42 | 0250 03100000 81c04000 01000000 00000000 ......@......... 43 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/romsd.dat: -------------------------------------------------------------------------------- 1 | 2 | bootsd.exe: file format elf32-sparc 3 | 4 | Contents of section .text: 5 | 0000 81d82000 03000004 821060c0 81884000 .. .......`...@. 6 | 0010 81900000 81980000 81800000 01000000 ................ 7 | 0020 0f200000 03000040 8210600f c221e014 . .....@..`..!.. 8 | 0030 c201e008 82086100 85286001 82104002 ......a..(`...@. 9 | 0040 050003c0 82104002 c221e008 c201e000 ......@..!...... 10 | 0050 820863ff c221e000 82086300 c401e0a0 ..c..!....c..... 11 | 0060 8730a004 8608e003 82104003 07030200 .0........@..... 12 | 0070 8610e0ff 8210c001 c221e000 8728a004 .........!...(.. 13 | 0080 8208e070 8608a0c0 8730e004 8210c001 ...p.....0...... 14 | 0090 8730e002 8210c001 86102800 8210c001 .0........(..... 15 | 00a0 8088a003 12800003 01000000 82006200 ..............b. 16 | 00b0 07398e18 8210c001 c221e004 86103fff .9.......!....?. 17 | 00c0 c021e00c c021e010 c021e01c c021e020 .!...!...!...!. 18 | 00d0 c621e064 c621e060 c021e048 c621e044 .!.d.!.`.!.H.!.D 19 | 00e0 c621e040 c021e058 c621e054 c621e050 .!.@.!.X.!.T.!.P 20 | 00f0 c621e07c c621e078 c021e074 c621e08c .!.|.!.x.!.t.!.. 21 | 0100 c621e088 c021e084 c021e01c c021e020 .!...!...!...!. 22 | 0110 c021e0a0 c021e0a8 c021e098 c021e090 .!...!...!...!.. 23 | 0120 c021e094 c621e09c c021e0b0 c021e0b4 .!...!...!...!.. 24 | 0130 c621e0b8 c021e0b8 c401e008 8730a01e .!...!.......0.. 25 | 0140 8688e003 02800003 01000000 a1800000 ................ 26 | 0150 c401e024 8730a014 8608e01f 88100000 ...$.0.......... 27 | 0160 8a100000 8c100000 a0100000 a2100000 ................ 28 | 0170 a4100000 a6100000 a8100000 aa100000 ................ 29 | 0180 ac100000 ae100000 90100000 92100000 ................ 30 | 0190 94100000 96100000 98100000 9a100000 ................ 31 | 01a0 9c100000 9e100000 86a0e001 16bfffef ................ 32 | 01b0 81e00000 8730a004 8088e003 02800015 .....0.......... 33 | 01c0 07000000 8610e270 c108c000 c1180000 .......p........ 34 | 01d0 c5180000 c9180000 cd180000 d1180000 ................ 35 | 01e0 d5180000 d9180000 dd180000 e1180000 ................ 36 | 01f0 e5180000 e9180000 ed180000 f1180000 ................ 37 | 0200 f5180000 f9180000 10800002 fd180000 ................ 38 | 0210 13100000 15200000 17203c00 9612e3a7 ..... ... <..... 39 | 0220 d622a028 1318ffff 921263f0 d6224000 .".(......c.."@. 40 | 0230 d6226010 82102002 81904000 03000004 ."`... ...@..... 41 | 0240 821060e0 81884000 01000000 01000000 ..`...@......... 42 | 0250 01000000 0711ffff 8610e3f0 bc100003 ................ 43 | 0260 9c20e060 03100000 81c04000 01000000 . .`......@..... 44 | 0270 00000000 01000000 01000000 01000000 ................ 45 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/romsdm.dat: -------------------------------------------------------------------------------- 1 | 2 | bootsdm.exe: file format elf32-sparc 3 | 4 | Contents of section .text: 5 | 0000 81d82000 03000004 821060c0 81884000 .. .......`...@. 6 | 0010 81900000 81980000 81800000 01000000 ................ 7 | 0020 0f200000 03000040 8210600f c221e014 . .....@..`..!.. 8 | 0030 c201e008 82086100 85286001 82104002 ......a..(`...@. 9 | 0040 050003c0 82104002 c221e008 c201e000 ......@..!...... 10 | 0050 820863ff c221e000 82086300 c401e0a0 ..c..!....c..... 11 | 0060 8730a004 8608e003 82104003 07030200 .0........@..... 12 | 0070 8210c001 c221e000 8728a004 8208e070 .....!...(.....p 13 | 0080 8608a0c0 8730e004 8210c001 8730e002 .....0.......0.. 14 | 0090 8210c001 86102800 8210c001 8088a003 ......(......... 15 | 00a0 12800003 01000000 82006200 07358e10 ..........b..5.. 16 | 00b0 8210c001 c221e004 86103fff c021e00c .....!....?..!.. 17 | 00c0 c021e010 c021e01c c021e020 c621e064 .!...!...!. .!.d 18 | 00d0 c621e060 c021e048 c621e044 c621e040 .!.`.!.H.!.D.!.@ 19 | 00e0 c021e058 c621e054 c621e050 c621e07c .!.X.!.T.!.P.!.| 20 | 00f0 c621e078 c021e074 c621e08c c621e088 .!.x.!.t.!...!.. 21 | 0100 c021e084 c021e01c c021e020 c021e0a0 .!...!...!. .!.. 22 | 0110 c021e0a8 c021e098 c021e090 c021e094 .!...!...!...!.. 23 | 0120 c621e09c c021e0b0 c021e0b4 c621e0b8 .!...!...!...!.. 24 | 0130 c021e0b8 c401e008 8730a01e 8688e003 .!.......0...... 25 | 0140 02800003 01000000 a1800000 c401e024 ...............$ 26 | 0150 8730a014 8608e01f 88100000 8a100000 .0.............. 27 | 0160 8c100000 a0100000 a2100000 a4100000 ................ 28 | 0170 a6100000 a8100000 aa100000 ac100000 ................ 29 | 0180 ae100000 90100000 92100000 94100000 ................ 30 | 0190 96100000 98100000 9a100000 9c100000 ................ 31 | 01a0 9e100000 86a0e001 16bfffef 81e00000 ................ 32 | 01b0 8730a004 8088e003 02800015 07000000 .0.............. 33 | 01c0 8610e26c c108c000 c1180000 c5180000 ...l............ 34 | 01d0 c9180000 cd180000 d1180000 d5180000 ................ 35 | 01e0 d9180000 dd180000 e1180000 e5180000 ................ 36 | 01f0 e9180000 ed180000 f1180000 f5180000 ................ 37 | 0200 f9180000 10800002 fd180000 13100000 ................ 38 | 0210 15200000 17203c00 9612e3a7 d622a028 . ... <......".( 39 | 0220 1318ffff 921263f0 d6224000 d6226010 ......c.."@.."`. 40 | 0230 82102002 81904000 03000004 821060e0 .. ...@.......`. 41 | 0240 81884000 01000000 01000000 01000000 ..@............. 42 | 0250 0719ffff 8610e3f0 bc100003 9c20e060 ............. .` 43 | 0260 03100000 81c04000 01000000 00000000 ......@......... 44 | 0270 01000000 01000000 01000000 01000000 ................ 45 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/test.h: -------------------------------------------------------------------------------- 1 | 2 | #define MSGAREA IOAREA 3 | 4 | #define PRINT(X) set MSGAREA, %o0; ld [%o0 + X*4], %g0 5 | #define FAIL(X) set MSGAREA, %o0; st %g0, [%o0 + X*4] 6 | #define SYS_TEST 0 7 | #define CACHE_TEST 1 8 | #define REG_TEST 2 9 | #define MUL_TEST 3 10 | #define DIV_TEST 4 11 | #define WATCH_TEST 5 12 | #define SNOOP_TEST 6 13 | #define FPU_TEST 7 14 | #define PCI_TEST 8 15 | #define RAM_INIT 9 16 | #define IRQ_TEST 10 17 | #define TIMER_TEST 11 18 | #define UART_TEST 12 19 | #define PIO_TEST 13 20 | #define EDAC_TEST 14 21 | #define DMA_TEST 15 22 | #define DPRAM_TEST 16 23 | #define CRAM_TEST 17 24 | #define MEM_TEST 18 25 | #define TEST_END 19 26 | #define WP_TEST 20 27 | #define DSU_TEST 21 28 | #define MMU_TEST 23 29 | 30 | #define ITAG_VALID_MASK ((1 << ILINESZ) -1) 31 | #define ITAG_MAX_ADDRESS ((1 << ITAG_BITS) -1) << (ILINEBITS + 2) 32 | #define DTAG_VALID_MASK ((1 << DLINESZ) -1) 33 | #define DTAG_MAX_ADDRESS ((1 << DTAG_BITS) -1) << (DLINEBITS + 2) 34 | 35 | #ifndef __ASSEMBLER__ 36 | extern struct lregs *lr; 37 | extern int test; 38 | #endif 39 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/timers.c: -------------------------------------------------------------------------------- 1 | #include "leon.h" 2 | #include "test.h" 3 | 4 | #define SCALERBITS 10 5 | #define SCALERMAX ((1<scalerload = -1; 20 | lr->scalerload = -1; 21 | if (lr->scalerload != SCALERMAX) fail(1); 22 | lr->scalercnt = -1; 23 | 24 | lr->irqmask = lr->irqforce = 0; /* mask interrupts */ 25 | lr->irqclear = -1; /* clear pending interrupts */ 26 | irqtbl[0] = 1; /* init irqtable */ 27 | 28 | /* timer 1 test */ 29 | 30 | lr->scalerload = 31; 31 | lr->scalercnt = 31; 32 | lr->timercnt1 = 0; 33 | lr->timercnt2 = 0; 34 | lr->timerload1 = 15; 35 | lr->timerload2 = 15; 36 | lr->timerctrl1 = 0x6; 37 | // lr->timerctrl2 = 0; 38 | if (lr->timercnt1 != 15) fail(3); 39 | lr->timerctrl1 = 0x7; 40 | for (i=14; i >= 0; i--) { while (lr->timercnt1 != i) {}} 41 | while (lr->timercnt1 != 15) {} 42 | 43 | if (!((lr->irqpend == 0x100) && (irqtbl[0] == 1))) fail(4); 44 | lr->irqclear = 0x100; /* clear pending timer interrupt */ 45 | if (lr->irqpend) fail(5); 46 | lr->timerctrl1 = 0x1; /* disable reload */ 47 | lr->scalerload = 2; 48 | lr->scalercnt = 2; 49 | while (lr->timerctrl1) {} 50 | if (!((lr->irqpend == 0x100) && (irqtbl[0] == 1))) fail(6); 51 | lr->irqclear = 0x100; /* clear pending timer interrupt */ 52 | 53 | /* timer 2 test */ 54 | 55 | lr->scalerload = 31; 56 | lr->scalercnt = 31; 57 | lr->timerload2 = 15; 58 | lr->timerctrl2 = 0x6; 59 | if (lr->timercnt2 != 15) fail(7); 60 | lr->timerctrl2 = 0x7; 61 | for (i=14; i >= 0; i--) { while (lr->timercnt2 != i) {}} 62 | while (lr->timercnt2 != 15) {} 63 | 64 | if (!((lr->irqpend == 0x200) && (irqtbl[0] == 1))) fail(8); 65 | lr->irqclear = 0x200; /* clear pending timer interrupt */ 66 | if (lr->irqpend) fail(9); 67 | lr->timerctrl2 = 0x1; /* disable reload */ 68 | lr->scalerload = 2; 69 | lr->scalercnt = 2; 70 | while (lr->timerctrl2) {} 71 | if (!((lr->irqpend == 0x200) && (irqtbl[0] == 1))) fail(10); 72 | lr->irqclear = 0x200; /* clear pending timer interrupt */ 73 | 74 | /* watchdog test */ 75 | 76 | if (lr->leonconf & 0x080) { 77 | lr->wdog = 128; 78 | if (!lr->wdog) fail(11); 79 | lr->wdog = 31; 80 | lr->piodir = 0; 81 | lr->piodir = 0; 82 | lr->piodir &= ~0x8; 83 | while (lr->piodata & 0x8) {} 84 | if (lr->wdog) fail(12); 85 | lr->wdog = -1; 86 | } 87 | 88 | /* power-down test */ 89 | 90 | lr->irqforce = 0; /* clear forced interrupts */ 91 | lr->irqclear = -1; /* clear pending interrupts */ 92 | lr->irqmask = 0x100; /* unmask timer 1 interrupt */ 93 | irqtbl[0] = 1; /* init irqtable */ 94 | lr->scalerload = 31; 95 | lr->scalercnt = 31; 96 | lr->timerload1 = 15; 97 | lr->timerctrl1 = 0x5; 98 | lr->timerctrl1 = 0x5; 99 | lr->powerdown = 0; 100 | lr->powerdown = 0; 101 | if (lr->timercnt1 != 0) fail(13); 102 | lr->irqclear = -1; /* clear pending interrupts */ 103 | lr->irqmask = 0; /* mask interrupts */ 104 | irqtbl[0] = 1; /* init irqtable */ 105 | 106 | lr->timerctrl1 = 0; /* turn off timers */ 107 | lr->timerctrl2 = 0; 108 | 109 | } 110 | -------------------------------------------------------------------------------- /leon2-1.0.30-xst/tsource/uart.c: -------------------------------------------------------------------------------- 1 | 2 | #include "leon.h" 3 | #include "test.h" 4 | 5 | #define RX_EN 1 6 | #define TX_EN 2 7 | #define RIRQ_EN 4 8 | #define TIRQ_EN 8 9 | #define EVENPAR 16 10 | #define PAR_EN 32 11 | #define FLOW_EN 64 12 | #define LOOPBACK 128 13 | 14 | 15 | int uart_test() 16 | { 17 | 18 | /* report start of test */ 19 | report(UART_TEST); 20 | 21 | /* enable UARTs */ 22 | 23 | lr->uartscaler1 = 0; 24 | lr->uartscaler2 = 0; 25 | lr->uartctrl1 = 0; 26 | lr->uartctrl2 = 0; 27 | lr->piodata = 0xaa00; 28 | lr->piodir = 0xaa00; 29 | 30 | /* test registers */ 31 | if (lr->uartctrl1) fail(1); 32 | if (lr->uartctrl2) fail(2); 33 | 34 | /* Check data transfer */ 35 | 36 | lr->uartctrl1 = (RX_EN | TX_EN); 37 | lr->uartctrl2 = (RX_EN | TX_EN); 38 | lr->uartdata1 = 0x55; 39 | lr->uartdata2 = 0x33; 40 | lr->uartscaler1 = 0; 41 | lr->uartscaler2 = 0; 42 | while(!(lr->uartstatus1 & 4)){} 43 | lr->uartdata1 = 0xAA; 44 | while(!(lr->uartstatus1 & 1)){} 45 | if (lr->uartdata1 != 0x33) fail(3); 46 | while(!(lr->uartstatus2 & 1)){} 47 | lr->uartdata2 = lr->uartdata2; 48 | while(!(lr->uartstatus2 & 1)){} 49 | lr->uartdata2 = lr->uartdata2; 50 | while(!(lr->uartstatus1 & 1)){} 51 | if (lr->uartdata1 != 0x55) fail(4); 52 | while(!(lr->uartstatus1 & 1)){} 53 | if (lr->uartdata1 != 0xAA) fail(5); 54 | 55 | /* Check flow control */ 56 | 57 | lr->uartctrl1 = (RX_EN | TX_EN | FLOW_EN); 58 | lr->uartctrl2 = (RX_EN | TX_EN | FLOW_EN); 59 | lr->uartdata1 = 0x11; 60 | while(!(lr->uartstatus1 & 4)){} 61 | lr->uartdata1 = 0x22; 62 | while((lr->uartstatus1 & 6) != 6){} 63 | lr->uartdata1 = 0x33; 64 | while(!(lr->uartstatus2 & 1)){} 65 | if (lr->uartdata2 != 0x11) fail(7); 66 | while(!(lr->uartstatus2 & 1)){} 67 | if (lr->uartdata2 != 0x22) fail(8); 68 | while(!(lr->uartstatus2 & 1)){} 69 | if (lr->uartdata2 != 0x33) fail(9); 70 | 71 | /* Loop-back */ 72 | 73 | lr->uartctrl1 = (RX_EN | TX_EN | FLOW_EN | LOOPBACK); 74 | lr->uartdata1 = 0x11; 75 | while (!(lr->uartstatus1 & 0x4)) {} 76 | lr->uartdata1 = 0x12; 77 | while (!(lr->uartstatus1 & 0x4)) {} 78 | lr->uartdata1 = 0x13; 79 | if (lr->uartstatus1 & 0x4) fail(10); 80 | if (lr->uartdata1 != 0x11) fail(11); 81 | while(!(lr->uartstatus1 & 1)){} 82 | if (lr->uartdata1 != 0x12) fail(12); 83 | while(!(lr->uartstatus1 & 1)){} 84 | if (lr->uartdata1 != 0x13) fail(13); 85 | if (!(lr->uartstatus1 & 0x4)) fail(14); 86 | 87 | /* To be tested: parity, frame-error, break, baud-rates */ 88 | } 89 | --------------------------------------------------------------------------------