#
|
#
|
# Makefile for building SpaceWire AMBA testbench.
|
# Makefile for building SpaceWire AMBA testbench.
|
#
|
#
|
|
|
|
|
# Change this to your local GRLIB directory.
|
# Change this to your local GRLIB directory.
|
GRLIB = /data/leon3/grlib-gpl-1.1.0-b4104
|
GRLIB = /data/leon3/grlib-gpl-1.2.2-b4123
|
|
|
|
|
RTLDIR = ../../rtl/vhdl
|
RTLDIR = ../../rtl/vhdl
|
TBDIR = ../../bench/vhdl
|
TBDIR = ../../bench/vhdl
|
SWDIR = ../../sw/spwamba_test
|
SWDIR = ../../sw/spwamba_test
|
|
|
SWDEFS = -DTXCLKFREQ=40 -DDESCTABLESIZE=5 -DQUEUEFILL=700 -DLOOPBACKSWITCH=1
|
SWDEFS = -DTXCLKFREQ=40 -DDESCTABLESIZE=5 -DQUEUEFILL=700 -DLOOPBACKSWITCH=1
|
|
|
TOP = spwamba_tb
|
TOP = spwamba_tb
|
VHDLSIMFILES = \
|
VHDLSIMFILES = \
|
$(RTLDIR)/spwpkg.vhd \
|
$(RTLDIR)/spwpkg.vhd \
|
$(RTLDIR)/spwlink.vhd \
|
$(RTLDIR)/spwlink.vhd \
|
$(RTLDIR)/spwrecv.vhd \
|
$(RTLDIR)/spwrecv.vhd \
|
$(RTLDIR)/spwxmit.vhd \
|
$(RTLDIR)/spwxmit.vhd \
|
$(RTLDIR)/spwxmit_fast.vhd \
|
$(RTLDIR)/spwxmit_fast.vhd \
|
$(RTLDIR)/spwrecvfront_generic.vhd \
|
$(RTLDIR)/spwrecvfront_generic.vhd \
|
$(RTLDIR)/spwrecvfront_fast.vhd \
|
$(RTLDIR)/spwrecvfront_fast.vhd \
|
$(RTLDIR)/syncdff.vhd \
|
$(RTLDIR)/syncdff.vhd \
|
$(RTLDIR)/spwram.vhd \
|
$(RTLDIR)/spwram.vhd \
|
$(RTLDIR)/spwambapkg.vhd \
|
$(RTLDIR)/spwambapkg.vhd \
|
$(RTLDIR)/spwamba.vhd \
|
$(RTLDIR)/spwamba.vhd \
|
$(RTLDIR)/spwahbmst.vhd \
|
$(RTLDIR)/spwahbmst.vhd \
|
$(TBDIR)/ahbram_loadfile.vhd \
|
$(TBDIR)/ahbram_loadfile.vhd \
|
spwamba_tb.vhd
|
spwamba_tb.vhd
|
|
|
TECHLIBS = inferred
|
TECHLIBS = inferred
|
LIBSKIP = contrib cypress eth fmf gleichmann gsi hynix micron openchip opencores spansion spw
|
LIBSKIP = contrib cypress eth fmf gleichmann gsi hynix micron openchip opencores spansion spw
|
DIRSKIP = ata can ddr greth spacewire
|
DIRSKIP = ata can ddr greth spacewire
|
FILESKIP = i2cmst.vhd i2cmst_gen.vhd ahbtrace_mb.vhd
|
FILESKIP = i2cmst.vhd i2cmst_gen.vhd ahbtrace_mb.vhd
|
|
|
include $(GRLIB)/bin/Makefile
|
include $(GRLIB)/bin/Makefile
|
|
|
all:
|
all:
|
@echo " specific information for SPWAMBA:"
|
@echo " specific information for SPWAMBA:"
|
@echo
|
@echo
|
@echo " make ghdl : compile test bench with GHDL"
|
@echo " make ghdl : compile test bench with GHDL"
|
@echo " make spwamba_test.srec : compile test software (requires sparc-elf-4.4.2)"
|
@echo " make spwamba_test.srec : compile test software (requires sparc-elf-4.4.2)"
|
@echo " make ghdl-launch : run test software in test bench"
|
@echo " make ghdl-launch : run test software in test bench"
|
@echo
|
@echo
|
|
|
spwamba_test.srec: spwamba_test.elf
|
spwamba_test.srec: spwamba_test.elf
|
sparc-elf-objcopy -O srec $< $@
|
sparc-elf-objcopy -O srec $< $@
|
|
|
spwamba_test.elf: init_sys.o spwamba_test.o
|
spwamba_test.elf: init_sys.o spwamba_test.o
|
sparc-elf-gcc -msoft-float -s $^ -o $@
|
sparc-elf-gcc -msoft-float -s $^ -o $@
|
|
|
spwamba_test.o: $(SWDIR)/spwamba_test.c
|
spwamba_test.o: $(SWDIR)/spwamba_test.c
|
sparc-elf-gcc -msoft-float -Wall -Os -I$(SWDIR) $(SWDEFS) -c $<
|
sparc-elf-gcc -msoft-float -Wall -Os -I$(SWDIR) $(SWDEFS) -c $<
|
|
|
init_sys.o: $(SWDIR)/init_sys.S
|
init_sys.o: $(SWDIR)/init_sys.S
|
sparc-elf-gcc -c $<
|
sparc-elf-gcc -c $<
|
|
|
.PHONY: my-clean
|
.PHONY: my-clean
|
clean: my-clean
|
clean: my-clean
|
my-clean:
|
my-clean:
|
$(RM) spwamba_test.o init_sys.o spwamba_test.elf
|
$(RM) spwamba_test.o init_sys.o spwamba_test.elf
|
|
|
|
|