URL
https://opencores.org/ocsvn/ion/ion/trunk
[/] [ion/] [trunk/] [src/] [memtest/] [makefile] - Blame information for rev 97
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
50 |
ja_rd |
# External memory test -- build simulation and execution VHDL modules
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
# Get common makefile stuff (toolchain & system config)
|
5 |
|
|
include ..\\common\\makefile
|
6 |
|
|
|
7 |
|
|
# We'll run the simulation for long enough to complete the test
|
8 |
90 |
ja_rd |
SIM_LENGTH = 30000
|
9 |
66 |
ja_rd |
|
10 |
|
|
# FPGA Block RAM parameters
|
11 |
|
|
BRAM_START = 0xbfc00000
|
12 |
50 |
ja_rd |
CODE_BRAM_SIZE = 2048
|
13 |
66 |
ja_rd |
# External RAM parameters (size in words)
|
14 |
50 |
ja_rd |
XRAM_SIZE = 1024
|
15 |
90 |
ja_rd |
XRAM_START = 0x00000000
|
16 |
50 |
ja_rd |
|
17 |
66 |
ja_rd |
|
18 |
|
|
LFLAGS = -Ttext $(BRAM_START) -Tdata $(XRAM_START) -eentry -I elf32-big
|
19 |
50 |
ja_rd |
|
20 |
66 |
ja_rd |
|
21 |
50 |
ja_rd |
clean:
|
22 |
|
|
-$(RM) *.o *.obj *.map *.lst *.hex *.exe *.axf *.code *.data
|
23 |
|
|
|
24 |
|
|
memtest:
|
25 |
66 |
ja_rd |
$(AS_MIPS) -defsym XRAM_BASE=$(XRAM_START) -o memtest.o memtest.s
|
26 |
|
|
$(LD_MIPS) $(LFLAGS) -Map memtest.map -s -N -o memtest.axf memtest.o
|
27 |
50 |
ja_rd |
-@$(DUMP_MIPS) -I elf32-big --disassemble memtest.axf > memtest.lst
|
28 |
|
|
# Dump code and data to separate binaries (data binary will be empty but TB2 needs it)
|
29 |
|
|
$(COPY_MIPS) -I elf32-big -j .text -j .rodata -O binary memtest.axf memtest.code
|
30 |
|
|
$(COPY_MIPS) -I elf32-big -j .sbss -j .data -j .bss -O binary memtest.axf memtest.data
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
# Create VHDL file for simulation test bench using TB2 template
|
35 |
|
|
memtest_sim: memtest
|
36 |
|
|
$(TO_VHDL) --code memtest.code --data memtest.data \
|
37 |
78 |
ja_rd |
--flash flash.bin --flash_size 128 \
|
38 |
50 |
ja_rd |
--code_size $(CODE_BRAM_SIZE) --data_size $(XRAM_SIZE) \
|
39 |
|
|
-s $(SIM_LENGTH) -v $(SRC_DIR)\\mips_tb2_template.vhdl \
|
40 |
|
|
-o $(TB_DIR)\\mips_tb2.vhdl -e mips_tb2
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
# Create VHDL file for hardware demo
|
44 |
|
|
memtest_demo: memtest
|
45 |
|
|
$(TO_VHDL) --code memtest.code --data memtest.data \
|
46 |
|
|
--code_size $(CODE_BRAM_SIZE) --data_size $(XRAM_SIZE) \
|
47 |
|
|
-v $(SRC_DIR)/mips_mpu1_template.vhdl \
|
48 |
|
|
-o $(DEMO_DIR)/mips_mpu.vhdl -e mips_mpu
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.