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

Subversion Repositories ion

[/] [ion/] [trunk/] [src/] [hello/] [makefile] - Blame information for rev 154

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 24 ja_rd
# We'll run the simulation for 2000 clock cycles
6 111 ja_rd
SIM_LENGTH = 90000
7 2 ja_rd
 
8 66 ja_rd
# 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
 
15
 
16
LFLAGS = -Ttext $(BRAM_START) -Tdata $(XRAM_START) -eentry -I elf32-big
17
 
18 2 ja_rd
clean:
19
        -$(RM) *.o *.obj *.map *.lst *.hex *.exe *.axf *.code *.data
20
 
21 90 ja_rd
hello: hello.c
22 92 ja_rd
        $(AS_MIPS) -o startup.o --defsym RUN_FROM_BRAM=1 $(SRC_DIR)/common/startup.s
23
        $(GCC_MIPS) $(CFLAGS) -DRUN_FROM_BRAM -o baremetal.o $(SRC_DIR)/common/baremetal.c
24 2 ja_rd
        $(GCC_MIPS) -o hello.o hello.c
25 90 ja_rd
        $(LD_MIPS) $(LFLAGS) -Map hello.map -s -N -o hello.axf startup.o hello.o baremetal.o
26 2 ja_rd
        -@$(DUMP_MIPS) -m mips --disassemble hello.axf > hello.lst
27 66 ja_rd
# Extract object code to be placed in code space
28 49 ja_rd
        $(COPY_MIPS) -I elf32-big -O binary hello.axf hello.code
29 66 ja_rd
# Extract object code to be placed in data space
30 49 ja_rd
        $(COPY_MIPS) -I elf32-big -j.data -j.bss -O binary hello.axf hello.data
31 2 ja_rd
 
32 49 ja_rd
 
33 123 ja_rd
 
34 49 ja_rd
# Create VHDL file for simulation test bench using TB2 template
35 34 ja_rd
hello_sim: hello
36
        $(TO_VHDL) --code hello.code --data hello.data \
37 154 ja_rd
                --code_size $(CODE_BRAM_SIZE) --data_size $(XRAM_SIZE) --log_trigger=0xbfc00000 \
38 49 ja_rd
                -s $(SIM_LENGTH) -v $(SRC_DIR)\\mips_tb2_template.vhdl \
39
                -o $(TB_DIR)\\mips_tb2.vhdl -e mips_tb2
40 2 ja_rd
 
41 123 ja_rd
# Create VHDL file for simulation test bench using TB0 template
42
hello_sim_bram: hello
43
        $(TO_VHDL) --code hello.code --data hello.data \
44
                --code_size $(CODE_BRAM_SIZE) --data_size $(XRAM_SIZE) \
45
                -s $(SIM_LENGTH) -v $(SRC_DIR)\\mips_tb0_template.vhdl \
46
                -o $(TB_DIR)\\mips_tb2.vhdl -e mips_tb2
47 49 ja_rd
 
48 123 ja_rd
 
49 2 ja_rd
# Create VHDL file for hardware demo
50 34 ja_rd
hello_demo: hello
51
        $(TO_VHDL) --code hello.code --data hello.data \
52 49 ja_rd
        --code_size $(CODE_BRAM_SIZE) --data_size $(XRAM_SIZE) \
53
        -v $(SRC_DIR)/mips_mpu1_template.vhdl \
54
        -o $(DEMO_DIR)/mips_mpu.vhdl -e mips_mpu

powered by: WebSVN 2.1.0

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