Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
359 views12 pages

Leon3 Simulation Guide 0 2

Cygwin for makefiles we simulate a system which boots from prom and copy application into ram we simulate with external vhdl prom and vhl ram models. Make sure that you have at least one uart enabled enable the option "Accelerated uart tracing" in the "VHDL debugging" menu.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
359 views12 pages

Leon3 Simulation Guide 0 2

Cygwin for makefiles we simulate a system which boots from prom and copy application into ram we simulate with external vhdl prom and vhl ram models. Make sure that you have at least one uart enabled enable the option "Accelerated uart tracing" in the "VHDL debugging" menu.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

How to setup LEON3 VHDL simulation with Modelsim

Version 0.1 18.10.2007 Simulate a real system which boots from prom and copy application into ram A nice VHDL simulation guide for leon3 By [email protected] Note:
This guide should be updated, comments are welcome! we use cygwin for makefiles we simulate a system which boots from prom and copy application into ram we simulate with external vhdl prom and vhdl ram models (use leon3mp as template)

1. 2.

make xconfig Compile 1.1. 1.2. 1.3. gcc hello.c mkprom objcopy

2 3 3 3 3 4 4 5 6 6 6 6 7 10 10 12

2.

Simulation results 2.1. 2.2. Simulation results (with nocomp in mkprom) Simulation results (with compression)

3.

make makes 2.3. 2.4. 2.5. 2.6. make ahbrom make scripts make soft make vsim

4.

prom simulation model 2.11. 2.12. PROM init / Simulation mit S-record format ASCII Table

1. make xconfig
make xconfig to edit/change the config.vhd file and the LEON3 configuration make sure that you have at least one uart enabled enable the option "Accelerated uart tracing" in the "VHDL debugging" menu. dont use ahbrom (internal prom) => address conflicts with memory ctrl => many non documented work around

make xconfig:

Xconfig:

In Processor:

In Debug Link:

In VHDL Debugging:

For VHDL simulation accelerate UART

2. Compile
1.1. gcc hello.c
$ sparc-elf-gcc -msoft-float -O2 hello.c -o hello.exe

1.2. mkprom
Uncompressed (-nocomp ) for VHDL simulation NOTE: ca. 2 minutes real simulation time!
$ sparc-elf-mkprom.exe -rmw -nocomp -msoft-float -v -ramsize 1024 hello.exe LEON MKPROM prom builder for BCC v1.0.24 Copyright Gaisler Research 2004, all rights reserved. section: .text at 0x40000000, size 19600 bytes section: .data at 0x40004c90, size 2796 bytes creating LEON3 boot prom: prom.out /opt/sparc-elf-3.2.3/bin/sparc-elf-gcc.exe -qprom -O2 -g -N -Tlinkprom -Ttext=0x0 dump.s -lmkprom3 -o prom.out msoft-float

Compressed for hardware NOTE: ca. 9 minutes real simulation time!


$ sparc-elf-mkprom.exe -rmw -msoft-float -v -ramsize 1024 hello.exe LEON MKPROM prom builder for BCC v1.0.24 Copyright Gaisler Research 2004, all rights reserved. section: .text at 0x40000000, size 19600 bytes Uncoded stream length: 19600 bytes Coded stream length: 10134 bytes Compression Ratio: 1.934 section: .data at 0x40004c90, size 2796 bytes Uncoded stream length: 2796 bytes Coded stream length: 812 bytes Compression Ratio: 3.443 creating LEON3 boot prom: prom.out /opt/sparc-elf-3.2.3/bin/sparc-elf-gcc.exe -qprom -O2 -g -N -Tlinkprom -Ttext=0x0 dump.s -lmkprom3 -o prom.out msoft-float

1.3. objcopy
sparc-elf-objcopy -O srec prom.out prom.srec

2. Simulation results
2.1. Simulation results (with nocomp in mkprom)
Time: 2069653 ns (ca. 2 minutes real simulation time) run -all # LEON3 MP Demonstration design # GRLIB Version 1.0.10, build 1615 # Target technology: virtex , memory library: inferred # ahbctrl: AHB arbiter/multiplexer rev 1 # ahbctrl: Common I/O area disabled # ahbctrl: AHB masters: 2, AHB slaves: 8 # ahbctrl: Configuration area at 0xfffff000, 4 kbyte # ahbctrl: mst0: Gaisler Research Leon3 SPARC V8 Processor # ahbctrl: mst1: Gaisler Research AHB Debug UART # ahbctrl: slv0: European Space Agency Leon2 Memory Controller # ahbctrl: memory at 0x00000000, size 512 Mbyte, cacheable, prefetch # ahbctrl: memory at 0x20000000, size 512 Mbyte # ahbctrl: memory at 0x40000000, size 1024 Mbyte, cacheable, prefetch # ahbctrl: slv1: Gaisler Research AHB/APB Bridge # ahbctrl: memory at 0x80000000, size 1 Mbyte # apbctrl: APB Bridge at 0x80000000 rev 1 # apbctrl: slv0: European Space Agency Leon2 Memory Controller # apbctrl: I/O ports at 0x80000000, size 256 byte # apbctrl: slv1: Gaisler Research Generic UART # apbctrl: I/O ports at 0x80000100, size 256 byte # apbctrl: slv2: Gaisler Research Multi-processor Interrupt Ctrl. # apbctrl: I/O ports at 0x80000200, size 256 byte # apbctrl: slv3: Gaisler Research Modular Timer Unit # apbctrl: I/O ports at 0x80000300, size 256 byte # apbctrl: slv7: Gaisler Research AHB Debug UART # apbctrl: I/O ports at 0x80000700, size 256 byte # apbctrl: slv11: Gaisler Research General Purpose I/O port # apbctrl: I/O ports at 0x80000b00, size 256 byte # grgpio11: 12-bit GPIO Unit rev 0 # gptimer3: GR Timer Unit rev 0, 8-bit scaler, 2 32-bit timers, irq 8 # irqmp: Multi-processor Interrupt Controller rev 3, #cpu 1 # apbuart1: Generic UART rev 1, fifo 4, irq 2 # ahbuart7: AHB Debug UART rev 0 # leon3_0: LEON3 SPARC V8 processor rev 0 # leon3_0: icache 1*2 kbyte, dcache 1*2 kbyte # # MkProm LEON boot loader v2.0 # Copyright Gaisler Research - all right reserved # system clock : 50.0 MHz # baud rate : 19171 baud # prom : 512 K, (2/2) ws (r/w) # sram : 1024 K, 1 bank(s), 0/0 ws (r/w) # # loading .text # loading .data # # starting hello.exe # # # # # Hello LEON3 World!!! # # # # Simulation will now be halted through error mode... # # # # ** Failure: *** IU in error mode, simulation halted *** # Time: 2069653 ns Iteration: 0 Process: /testbench/iuerr File: testbench.vhd # Break at testbench.vhd line 393

2.2. Simulation results (with compression)


Time:13484433 ns (ca. 9 minutes real simulation time) run -all # LEON3 MP Demonstration design # GRLIB Version 1.0.10, build 1615 # Target technology: virtex , memory library: inferred # ahbctrl: AHB arbiter/multiplexer rev 1 # ahbctrl: Common I/O area disabled # ahbctrl: AHB masters: 2, AHB slaves: 8 # ahbctrl: Configuration area at 0xfffff000, 4 kbyte # ahbctrl: mst0: Gaisler Research Leon3 SPARC V8 Processor # ahbctrl: mst1: Gaisler Research AHB Debug UART # ahbctrl: slv0: European Space Agency Leon2 Memory Controller # ahbctrl: memory at 0x00000000, size 512 Mbyte, cacheable, prefetch # ahbctrl: memory at 0x20000000, size 512 Mbyte # ahbctrl: memory at 0x40000000, size 1024 Mbyte, cacheable, prefetch # ahbctrl: slv1: Gaisler Research AHB/APB Bridge # ahbctrl: memory at 0x80000000, size 1 Mbyte # apbctrl: APB Bridge at 0x80000000 rev 1 # apbctrl: slv0: European Space Agency Leon2 Memory Controller # apbctrl: I/O ports at 0x80000000, size 256 byte # apbctrl: slv1: Gaisler Research Generic UART # apbctrl: I/O ports at 0x80000100, size 256 byte # apbctrl: slv2: Gaisler Research Multi-processor Interrupt Ctrl. # apbctrl: I/O ports at 0x80000200, size 256 byte # apbctrl: slv3: Gaisler Research Modular Timer Unit # apbctrl: I/O ports at 0x80000300, size 256 byte # apbctrl: slv7: Gaisler Research AHB Debug UART # apbctrl: I/O ports at 0x80000700, size 256 byte # apbctrl: slv11: Gaisler Research General Purpose I/O port # apbctrl: I/O ports at 0x80000b00, size 256 byte # grgpio11: 12-bit GPIO Unit rev 0 # gptimer3: GR Timer Unit rev 0, 8-bit scaler, 2 32-bit timers, irq 8 # irqmp: Multi-processor Interrupt Controller rev 3, #cpu 1 # apbuart1: Generic UART rev 1, fifo 4, irq 2 # ahbuart7: AHB Debug UART rev 0 # leon3_0: LEON3 SPARC V8 processor rev 0 # leon3_0: icache 1*2 kbyte, dcache 1*2 kbyte # # MkProm LEON boot loader v2.0 # Copyright Gaisler Research - all right reserved # system clock : 50.0 MHz # baud rate : 19171 baud # prom : 512 K, (2/2) ws (r/w) # sram : 1024 K, 1 bank(s), 0/0 ws (r/w) # # decompressing .text to 0x40000000 # decompressing .data to 0x40004c90 # # starting hello.exe # # # # # Hello LEON3 World!!! # # # # Simulation will now be halted through error mode... # # # # ** Failure: *** IU in error mode, simulation halted *** # Time: 13484433 ns Iteration: 0 Process: /testbench/iuerr File: testbench.vhd # Break at testbench.vhd line 393

3. make makes
2.3. make ahbrom
$ make ahbrom.vhd FILE=prom.out sparc-elf-objcopy -O binary prom.out ahbrom.bin ./ahbrom ahbrom.bin ahbrom.vhd Creating ahbrom.vhd : file size: 23792 bytes, address bits 15

2.4. make scripts


$ make scripts leon3mp_synplify.prj leon3mp.dc leon3mp.rc leon3mp.xst Scanning libraries grlib apa apa3 axcelerator altera_mf atmel ihp25 ec synplify umc virage unisim techmap fpu opencores gaisler esa gleichmann cypress micron openchip work testbench.mpf leon3mp.ise

2.5. make soft


$ make soft sparc-elf-gcc -c -I. prom.S sparc-elf-gcc -nostdlib -Tlinkprom -N -L./ -Ttext=0 -nostartfiles -o prom.exe prom.o sparc-elf-objcopy -O srec prom.exe prom.srec sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/report_device.c sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/apbuart.c sparc-elf-gcc -O2 -c -mv8 ../../software/leon3/divtest.c sparc-elf-gcc -O2 -c -mv8 ../../software/leon3/multest.c sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/regtest.S sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/cache.c sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/gpio.c sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/ramfill.c sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/ramtest.c sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/irqmp.c sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/leon3_test.c sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/gptimer.c sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/mulasm.S sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/cacheasm.S sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/spwtest.c sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/mptest.c sparc-elf-gcc -ffast-math -O3 -c ../../software/leon3/fpu.c sparc-elf-gcc -O2 -g -msoft-float -c ../../software/leon3/base_test.c sparc-elf-ar -cr lib3tests.a report_device.o apbuart.o divtest.o multest.o regtest.o cache.o gpio.o ramfill.o ramtest.o irqmp.o leon3_test.o gptimer.o mulasm.o cacheasm.o spwtest.o mptest.o fpu.o spwtest.o mptest.o base_test.o sparc-elf-gcc -O2 -g -msoft-float systest.c -L./ lib3tests.a -o systest.exe sparc-elf-objcopy -O srec systest.exe sram.srec sparc-elf-objcopy -O srec systest.exe sdram.srec

2.6. make vsim


Reading C:/Programme/Modeltech_6.1d/tcl/vsim/pref.tcl # 6.1d # do libs.do # quit make[1]: Entering directory `/home/but5693/leon3/grlib-gpl-1.0.10-b1615/designs/leon3-at697_mezz' vcom -quiet -93 -work grlib ../../lib/grlib/stdlib/version.vhd vcom -quiet -93 -work grlib ../../lib/grlib/stdlib/stdlib.vhd vcom -quiet -93 -work grlib ../../lib/grlib/stdlib/stdio.vhd vcom -quiet -93 -work grlib ../../lib/grlib/util/util.vhd vcom -quiet -93 -work grlib ../../lib/grlib/sparc/sparc.vhd vcom -quiet -93 -work grlib ../../lib/grlib/sparc/sparc_disas.vhd vcom -quiet -93 -work grlib ../../lib/grlib/sparc/cpu_disas.vhd vcom -quiet -93 -work grlib ../../lib/grlib/modgen/multlib.vhd vcom -quiet -93 -work grlib ../../lib/grlib/modgen/leaves.vhd vcom -quiet -93 -work grlib ../../lib/grlib/amba/amba.vhd vcom -quiet -93 -work grlib ../../lib/grlib/amba/devices.vhd vcom -quiet -93 -work grlib ../../lib/grlib/amba/defmst.vhd vcom -quiet -93 -work grlib ../../lib/grlib/amba/apbctrl.vhd vcom -quiet -93 -work grlib ../../lib/grlib/amba/ahbctrl.vhd vcom -quiet -93 -work grlib ../../lib/grlib/amba/ahbctrl_mb.vhd vcom -quiet -93 -work apa ../../lib/tech/actel/apa/components/apa.vhd vcom -quiet -93 -work apa3 ../../lib/tech/actel/apa3/components/proasic3.vhd vcom -quiet -93 -work axcelerator ../../lib/tech/actel/axcelerator/components/axcelerator_components.vhd vcom -quiet -93 -work axcelerator ../../lib/tech/actel/axcelerator/components/axcelerator_vtables.vhd vcom -quiet -93 -work axcelerator ../../lib/tech/actel/axcelerator/components/axcelerator.vhd vcom -quiet -93 -work altera_mf ../../lib/tech/altera/altera_mf/simprims/altera_mf_components.vhd vcom -quiet -93 -work altera_mf ../../lib/tech/altera/altera_mf/simprims/altera_mf.vhd vcom -quiet -93 -work atmel ../../lib/tech/atmel/components/atmel_components.vhd vcom -quiet -93 -work atmel ../../lib/tech/atmel/components/atmel_simprims.vhd vcom -quiet -93 -work ihp25 ../../lib/tech/ihp25/components/ihp25_components.vhd vcom -quiet -93 -work ec ../../lib/tech/lattice/ec/orca/orcacomp.vhd vcom -quiet -93 -work ec ../../lib/tech/lattice/ec/orca/global.vhd vcom -quiet -93 -work ec ../../lib/tech/lattice/ec/orca/orca.vhd vcom -quiet -93 -work ec ../../lib/tech/lattice/ec/orca/orca_ecmem.vhd vcom -quiet -93 -work synplify ../../lib/tech/synplify/sim/synplify.vhd vcom -quiet -93 -work synplify ../../lib/tech/synplify/sim/synattr.vhd vcom -quiet -93 -work umc ../../lib/tech/umc/components/umc_components.vhd vcom -quiet -93 -work umc ../../lib/tech/umc/components/umc_simprims.vhd vcom -quiet -93 -work virage ../../lib/tech/virage/vcomponents/virage_vcomponents.vhd vcom -quiet -93 -work virage ../../lib/tech/virage/simprims/virage_simprims.vhd vcom -quiet -93 -work unisim ../../lib/tech/xilinx/unisim/vcomponents/xilinx_vcomponents.vhd vcom -quiet -93 -work unisim ../../lib/tech/xilinx/unisim/simprims/xilinx_simprims.vhd vcom -quiet -93 -work unisim ../../lib/tech/xilinx/unisim/simprims/xilinx_mem.vhd vcom -quiet -93 -work techmap ../../lib/techmap/gencomp/gencomp.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/allmem.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/mem_gen_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/mem_altera_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/mem_apa_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/mem_apa3_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/mem_axcelerator_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/mem_lattice_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/mem_umc_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/mem_virage_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/mem_xilinx_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/syncram.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/syncram64.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/syncram_2p.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/syncram_dp.vhd vcom -quiet -93 -work techmap ../../lib/techmap/memory/regfile_3p.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/allpads.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/pad_actel_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/pad_atc18_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/pad_rhumc_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/pad_xilinx_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/inpad.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/iodpad.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/iopad.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/odpad.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/outpad.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/toutpad.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/clkpad.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/inpad_ds.vhd vcom -quiet -93 -work techmap ../../lib/techmap/pads/outpad_ds.vhd

vcom -quiet -93 -work techmap ../../lib/techmap/buffers/clkbuf_xilinx.vhd vcom -quiet -93 -work techmap ../../lib/techmap/buffers/clkbuf_actel.vhd vcom -quiet -93 -work techmap ../../lib/techmap/buffers/techbuf.vhd vcom -quiet -93 -work techmap ../../lib/techmap/clocks/libclk.vhd vcom -quiet -93 -work techmap ../../lib/techmap/clocks/clkgen_actel.vhd vcom -quiet -93 -work techmap ../../lib/techmap/clocks/clkgen_altera.vhd vcom -quiet -93 -work techmap ../../lib/techmap/clocks/clkgen_xilinx.vhd vcom -quiet -93 -work techmap ../../lib/techmap/clocks/clkgen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/tap/libtap.vhd vcom -quiet -93 -work techmap ../../lib/techmap/tap/tap_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/tap/tap_xilinx_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/tap/tap.vhd vcom -quiet -93 -work techmap ../../lib/techmap/ddr/libddr.vhd vcom -quiet -93 -work techmap ../../lib/techmap/ddr/ddr_lattice.vhd vcom -quiet -93 -work techmap ../../lib/techmap/ddr/ddr_xilinx.vhd vcom -quiet -93 -work techmap ../../lib/techmap/ddr/ddr_gen.vhd vcom -quiet -93 -work techmap ../../lib/techmap/ddr/ddr_ireg.vhd vcom -quiet -93 -work techmap ../../lib/techmap/ddr/ddr_oreg.vhd vcom -quiet -93 -work fpu ../../lib/fpu/libfpu/libfpu.vhd vcom -quiet -93 -work opencores ../../lib/opencores/can/cancomp.vhd vcom -quiet -93 -work opencores ../../lib/opencores/can/can_top.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/arith/arith.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/arith/mul32.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/arith/div32.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/memctrl/memctrl.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/memctrl/sdctrl.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/memctrl/sdmctrl.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/memctrl/srctrl.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/leon3.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/mmuconfig.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/mmuiface.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/libmmu.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/libiu.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/libcache.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/libproc3.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/cachemem.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/mmu_icache.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/mmu_dcache.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/mmu_acache.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/mmutlbcam.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/mmulrue.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/mmulru.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/mmutlb.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/mmutw.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/mmu.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/mmu_cache.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/acache.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/dcache.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/icache.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/cache.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/cpu_disasx.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/iu3.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/grfpwx.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/mfpwx.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/grlfpwx.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/tbufmem.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/dsu3.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/proc3.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/leon3s.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/leon3/irqmp.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/can/can.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/can/can_mod.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/can/can_oc.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/can/can_mc.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/misc/misc.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/misc/rstgen.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/misc/gptimer.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/misc/ahbram.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/misc/ahbtrace.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/misc/ahbmst.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/misc/grgpio.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/misc/ahbstat.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/misc/logan.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/misc/apbps2.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/misc/charrom_package.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/misc/charrom.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/misc/apbvga.vhd

vcom -quiet -93 -work gaisler ../../lib/gaisler/ambatest/ambatest.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ambatest/ahb_tbfunct.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ambatest/ahbslv_em.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ambatest/ahbmst_em.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/net/net.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/net/eth_arb.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pci.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pcilib.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pciahbmst.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pcitrace.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pci_target.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pci_mt.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/dmactrl.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pci_mtf.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pcipads.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pcidma.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pcitb.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pci_tbfunct.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pcitb_clkgen.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pcitb_monitor.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pcitb_arb.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pcitb_master.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/pci/pcitb_target.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/uart/uart.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/uart/libdcom.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/uart/apbuart.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/uart/dcom.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/uart/dcom_uart.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/uart/ahbuart.vhd vlog -quiet -work gaisler ../../lib/gaisler/sim/ata_device.v vcom -quiet -93 -work gaisler ../../lib/gaisler/sim/sim.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/sim/sram.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/sim/sram16.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/sim/phy.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/jtag/jtag.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/jtag/libjtagcom.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/jtag/jtagcom.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/jtag/ahbjtag.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/b1553/b1553.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/greth/ethernet_mac.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/greth/eth_ahb_mst.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/greth/greth.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/spacewire/spacewire.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/usb/usb.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ddr/ddrrec.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ddr/hs.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ddr/ahb_slv.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ddr/ddrctrl.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ata/ata.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ata/atahost_amba_slave.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ata/ud_cnt.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ata/ro_cnt.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ata/atahost_pio_tctrl.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ata/atahost_pio_actrl.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ata/atahost_controller.vhd vcom -quiet -93 -work gaisler ../../lib/gaisler/ata/atactrl.vhd vcom -quiet -93 -work esa ../../lib/esa/devices/devices_esa.vhd vcom -quiet -93 -work esa ../../lib/esa/memoryctrl/memoryctrl.vhd vcom -quiet -93 -work esa ../../lib/esa/memoryctrl/mctrl.vhd vcom -quiet -93 -work esa ../../lib/esa/pci/pcicomp.vhd vcom -quiet -93 -work esa ../../lib/esa/pci/pci_arb_pkg.vhd vcom -quiet -93 -work esa ../../lib/esa/pci/pci_arb.vhd vcom -quiet -93 -work esa ../../lib/esa/pci/pciarb.vhd vcom -quiet -93 -work esa ../../lib/esa/misc/l2uart.vhd vcom -quiet -93 -work esa ../../lib/esa/misc/misc_esa.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/ahb2hpi/hpi.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/ahb2hpi/ahb2hpi.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/ahb2hpi/ahb2hpi2.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/ahb2hpi/hpi_ram.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/spi/spi.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/spi/spi_xmit.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/i2c/i2c.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/i2c/partoi2s.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/dac/dac.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/dac/dac_sigdelt.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/dac/dac_ahb.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/miscellaneous/miscellaneous.vhd

vcom -quiet -93 -work gleichmann ../../lib/gleichmann/miscellaneous/clockgenerator.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/multiio/MultiIO.vhd vcom -quiet -93 -work gleichmann ../../lib/gleichmann/multiio/MultiIO_APB.vhd vcom -quiet -93 -work cypress ../../lib/cypress/ssram/components.vhd vcom -quiet -93 -work cypress ../../lib/cypress/ssram/package_utility.vhd vcom -quiet -93 -work cypress ../../lib/cypress/ssram/cy7c1354b.vhd vcom -quiet -93 -work micron ../../lib/micron/sdram/components.vhd vcom -quiet -93 -work micron ../../lib/micron/sdram/mt48lc16m16a2.vhd vcom -quiet -93 -work micron ../../lib/micron/ddr/mt46v16m16.vhd vcom -quiet -93 -work openchip ../../lib/openchip/gpio/gpio.vhd vcom -quiet -93 -work openchip ../../lib/openchip/gpio/apbgpio.vhd vcom -quiet -93 -work openchip ../../lib/openchip/charlcd/charlcd.vhd vcom -quiet -93 -work openchip ../../lib/openchip/charlcd/apbcharlcd.vhd vcom -quiet -93 -work openchip ../../lib/openchip/sui/sui.vhd vcom -quiet -93 -work openchip ../../lib/openchip/sui/apbsui.vhd vcom -quiet -93 -work work ../../lib/work/debug/debug.vhd vcom -quiet -93 -work work ../../lib/work/debug/grtestmod.vhd vcom -quiet -93 -work work ../../lib/work/debug/cpu_disas.vhd vcom -quiet -93 -work work config.vhd vcom -quiet -93 -work work ahbrom.vhd vcom -quiet -93 -work work leon3mp.vhd vcom -quiet -93 -work work testbench.vhd make[1]: Leaving directory `/home/but5693/leon3/grlib-gpl-1.0.10-b1615/designs/leon3-at697_mezz' make[1]: Entering directory `/home/but5693/leon3/grlib-gpl-1.0.10-b1615/designs/leon3-at697_mezz' make.work:320: *** multiple target patterns. Stop. make[1]: Leaving directory `/home/but5693/leon3/grlib-gpl-1.0.10-b1615/designs/leon3-at697_mezz' make: *** [vsim] Error 2

4. prom simulation model


prom.srec is loaded for your simulation by the prom model in testbench. It has now following functions: 2.7. The register files of IU and FPU (if present) 1. are initialized. 2.8. The LEON control, waitstate and memory configuration registers are set according to the specified options. 2.9. The application is decompressed and installed into RAM 2.10. Finally, the application hello.exe is started, setting the stack pointer to the top of ram.

2.11. PROM init / Simulation mit S-record format


The command to compile your program in a s-record file are the following one: sparc-rtems-objcopy -O srec filename.out filename.srec Motorola S-records are an industry-standard format for transmitting binary files to target systems and PROM programmers. LSI Logic have extended this standard to include an S4-record containing an address and a symbol. The extended S-record standard is as follows:
S<type><length><address><data....><checksum> S4<length><address><name>,<checksum> Where: type is the record type. Where: 0 starting record (optional) 1 data record with 16-bit address 2 data record with 24-bit address 3 data record with 32-bit address 4 symbol record (LSI extension) 5 number of data records in preceeding block 6 unused 7 ending record for S3 records 8 ending record for S2 records 9 ending record for S1 records length is two hex characters. This defines the length of the record in bytes (not characters). It includes the address field, the data field, and the checksum field.

10

address is 4, 6, or 8 characters. Corresponding to a 16-, 24-, or 32-bit address. The address field for S4 records is always 32 bits. data Are the data bytes. Each pair of hex characters represent one byte in memory. name Is the symbol name. The symbol is terminated by a ','. checksum Is the one's complement of the 8-bit checksum. Example S0030000FC . . S325000004403C0880018D08DD900000000011000026000000003C0880012508DC50C50000B401 S32500000460C50100B8C50200BCC50300C0C50400C4C50500C8C50600CCC50700D0C50800D4FA S32500000480C50900D8C50A00DCC50B00E0C50C00E4C50D00E8C50E00ECC50F00F0C51000F49A S325000004A0C51100F8C51200FCC5130100C5140104C5150108C516010CC5170110C518011434 . . S70500000000FA

The S0 record starts the file. The S3 records contain the data. The S7 record contains the entry address and terminates the download. NAME srec - S-record file and record format DESCRIPTION An S-record file consists of a sequence of specially formatted ASCII character strings. An S-record will be less than or equal to 78 bytes in length. The order of S-records within a file is of no significance and no particular order may be assumed. The general format of an S-record follows: +-------------------//------------------//-----------------------+ | type | count | address | data | checksum | +-------------------//------------------//-----------------------+ type -- A char[2] field. These characters describe the type of record (S0, S1, S2, S3, S5, S7, S8, or S9). count -- A char[2] field. These characters when paired and interpreted as a hexadecimal value, display the count of remaining character pairs in the record. address -- A char[4,6, or 8] field. These characters grouped and interpreted as a hexadecimal value, display the address at which the data field is to be loaded into memory. The length of the field depends on the number of bytes necessary to hold the address. A 2-byte address uses 4 characters, a 3-byte address uses 6 characters, and a 4-byte address uses 8 characters. data -- A char [0-64] field. These characters when paired and interpreted as hexadecimal values represent the memory loadable data or descriptive information. checksum -- A char[2] field. These characters when paired and interpreted as a hexadecimal value display the least significant byte of the ones complement of the sum of the byte values represented by the pairs of characters making up the count, the address, and the data fields. Each record is terminated with a line feed. If any additional or different record terminator(s) or delay characters are needed during transmission to the target system it is the responsibility of the transmitting program to provide them. S0 Record. The type of record is 'S0' (0x5330). The address field is unused and will be filled with zeros (0x0000). The header information within the data field is divided into the following subfields. mname is char[20] and is the module name. ver is char[2] and is the version number. rev is char[2] and is the revision number. description is char[0-36] and is a text comment. Each of the subfields is composed of ASCII bytes whose associated characters, when paired, represent one byte hexadecimal values in the case of the version and revision numbers, or represent the hexadecimal values of the ASCII characters comprising the module name and description. S3 Record. The type of record field is 'S3' (0x5333). The address field is intrepreted as a 4-byte address. The data field is composed of memory loadable data. S7 Record. The type of record field is 'S7' (0x5337). The address field contains the starting execution address and is intrepreted as 4byte address. There is no data field.

11

2.12. ASCII Table

12

You might also like