URL
https://opencores.org/ocsvn/ion/ion/trunk
[/] [ion/] [trunk/] [src/] [opcodes/] [makefile] - Blame information for rev 232
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
2 |
ja_rd |
|
2 |
|
|
# Get common makefile stuff (toolchain & system config)
|
3 |
|
|
include ../common/makefile
|
4 |
|
|
|
5 |
66 |
ja_rd |
# We'll run the simulation for long enough for the program to finish
|
6 |
148 |
ja_rd |
SIM_LENGTH = 140000
|
7 |
66 |
ja_rd |
|
8 |
|
|
# FPGA Block RAM parameters
|
9 |
|
|
BRAM_START = 0xbfc00000
|
10 |
229 |
ja_rd |
CODE_BRAM_SIZE = 4096
|
11 |
66 |
ja_rd |
# External RAM parameters (size in words)
|
12 |
|
|
XRAM_SIZE = 1024
|
13 |
|
|
XRAM_START = 0x00000000
|
14 |
2 |
ja_rd |
|
15 |
66 |
ja_rd |
LFLAGS = -Ttext $(BRAM_START) -Tdata $(XRAM_START) -eentry -I elf32-big
|
16 |
|
|
|
17 |
189 |
ja_rd |
#-- Targets & rules ------------------------------------------------------------
|
18 |
2 |
ja_rd |
|
19 |
|
|
opcodes:
|
20 |
189 |
ja_rd |
$(AS) -o opcode_emu.o $(SRC_DIR)/common/opcode_emu.s
|
21 |
|
|
$(AS) -defsym XRAM_BASE=$(XRAM_START) -mips32r2 -o opcodes.o opcodes.s
|
22 |
|
|
$(LD) $(LFLAGS) -Map opcodes.map -s -N -o opcodes.axf opcodes.o opcode_emu.o
|
23 |
|
|
-@$(DUMP) -I elf32-big --disassemble opcodes.axf > opcodes.lst
|
24 |
34 |
ja_rd |
# Dump only text segment, no .rodata on this program
|
25 |
189 |
ja_rd |
# $(COPY) -I elf32-big -j .text -O binary opcodes.axf opcodes.bin
|
26 |
34 |
ja_rd |
# Dump data segment to file; will be empty but the TB2 template needs it
|
27 |
189 |
ja_rd |
# $(COPY) -I elf32-big -j .data -O binary opcodes.axf opcodes.data
|
28 |
|
|
$(COPY) -I elf32-big -O binary opcodes.axf opcodes.bin
|
29 |
|
|
$(COPY) -I elf32-big -j.data -j.bss -O binary opcodes.axf opcodes.data
|
30 |
66 |
ja_rd |
|
31 |
229 |
ja_rd |
#-- Create VHDL package with data and parameters for simulation
|
32 |
189 |
ja_rd |
sim: opcodes
|
33 |
229 |
ja_rd |
$(VHDL_OBJ_PKG) --project="Opcode tester" \
|
34 |
|
|
--package sim_params_pkg \
|
35 |
|
|
--bin opcodes.bin --name obj_code --bram_size $(CODE_BRAM_SIZE) \
|
36 |
|
|
--bin opcodes.data --name sram_init --xram_size $(XRAM_SIZE) \
|
37 |
|
|
--name prom_init --flash_size 0 \
|
38 |
|
|
--output $(TB_DIR)/sim_params_pkg.vhdl \
|
39 |
|
|
-s $(SIM_LENGTH) --log_trigger=0xbfc00000 \
|
40 |
189 |
ja_rd |
|
41 |
|
|
|
42 |
|
|
#-- And now the usual housekeeping stuff ---------------------------------------
|
43 |
|
|
|
44 |
|
|
.PHONY: clean
|
45 |
|
|
|
46 |
|
|
clean:
|
47 |
|
|
-$(RM) *.o *.obj *.map *.lst *.hex *.exe *.axf *.code *.data *.bin
|
48 |
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.