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

Subversion Repositories ion

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

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 49 ja_rd
SIM_LENGTH = 20000
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
hello:
22
        $(AS_MIPS) -o boot.o $(SRC_DIR)/common/boot.s
23
        $(GCC_MIPS) -o no_os.o $(SRC_DIR)/common/no_os.c
24
        $(GCC_MIPS) -o hello.o hello.c
25 66 ja_rd
        $(LD_MIPS) $(LFLAGS) -Map hello.map -s -N -o hello.axf boot.o hello.o no_os.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
# Create VHDL file for simulation test bench using TB2 template
34 34 ja_rd
hello_sim: hello
35
        $(TO_VHDL) --code hello.code --data hello.data \
36 49 ja_rd
                --code_size $(CODE_BRAM_SIZE) --data_size $(XRAM_SIZE) \
37
                -s $(SIM_LENGTH) -v $(SRC_DIR)\\mips_tb2_template.vhdl \
38
                -o $(TB_DIR)\\mips_tb2.vhdl -e mips_tb2
39 2 ja_rd
 
40 49 ja_rd
 
41 2 ja_rd
# Create VHDL file for hardware demo
42 34 ja_rd
hello_demo: hello
43
        $(TO_VHDL) --code hello.code --data hello.data \
44 49 ja_rd
        --code_size $(CODE_BRAM_SIZE) --data_size $(XRAM_SIZE) \
45
        -v $(SRC_DIR)/mips_mpu1_template.vhdl \
46
        -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.