OpenCores
URL https://opencores.org/ocsvn/ion/ion/trunk

Subversion Repositories ion

[/] [ion/] [trunk/] [src/] [opcodes/] [makefile] - Blame information for rev 189

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
CODE_BRAM_SIZE = 2048
11
# 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
# Create VHDL file for simulation test bench from TB2 template
32 189 ja_rd
sim: opcodes
33 90 ja_rd
        $(TO_VHDL) --code opcodes.bin --data opcodes.data --log_trigger=0xbfc00000 \
34 34 ja_rd
                --code_size $(CODE_BRAM_SIZE) --data_size $(DATA_BRAM_SIZE) \
35
                -s $(SIM_LENGTH) -v $(SRC_DIR)\\mips_tb2_template.vhdl \
36
                -o $(TB_DIR)\\mips_tb2.vhdl -e mips_tb2
37 189 ja_rd
 
38
 
39
#-- And now the usual housekeeping stuff ---------------------------------------
40
 
41
.PHONY: clean
42
 
43
clean:
44
        -$(RM) *.o *.obj *.map *.lst *.hex *.exe *.axf *.code *.data *.bin
45
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.