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

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [sim/] [scripts/] [Makefile] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mballance
 
2
include $(PACKAGES_DIR)/packages.mk
3
include $(PACKAGES_DIR)/simscripts/mkfiles/plusargs.mk
4
 
5
MK_INCLUDES += $(FWRISC)/ve/fwrisc/tests/fwrisc_tests.mk
6
 
7
RUN_PRE_TARGETS += ram.hex regs.hex
8
 
9
SRC_DIRS += $(FWRISC)/ve/fwrisc/tb
10
 
11
TB_MODULES_HDL=fwrisc_tb_hdl
12
 
13
SW_IMAGES := $(foreach img,$(call get_plusarg,SW_IMAGE,$(PLUSARGS)),$(subst $(BUILD_DIR)/esw/,,$(img)))
14
SW_IMAGE := $(firstword $(SW_IMAGES))
15
 
16
ifeq (zephyr.elf,$(notdir $(SW_IMAGE)))
17
  SW_IMAGE := $(subst $(BUILD_DIR)/esw/,,$(SW_IMAGE))
18
else
19
  SW_IMAGE := $(notdir $(SW_IMAGE))
20
endif
21
 
22
ifneq (,$(SW_IMAGES))
23
  BUILD_PRECOMPILE_TARGETS += embedded_sw
24
endif
25
 
26
 
27
ifeq (vl,$(SIM))
28
  VL_TB_OBJS_LIBS += libfwrisc_tests.o libgoogletest-vl.o libgoogletest.o
29
  CXXFLAGS += -I$(BUILDDIR)/obj_dir
30
endif
31
 
32
include $(PACKAGES_DIR)/simscripts/mkfiles/common_sim.mk
33
 
34
regs.hex : $(FWRISC)/rtl/regs.hex
35
        $(Q)cp $(FWRISC)/rtl/regs.hex .
36
 
37
ifneq (,$(SW_IMAGE))
38
ram.hex : $(BUILD_DIR)/esw/$(SW_IMAGE)
39
        $(Q)riscv32-unknown-elf-objcopy $^ -O verilog ram.vlog
40
        $(Q)perl $(MEMORY_PRIMITIVES)/bin/objcopyvl2vl.pl \
41
                -width 32 -offset 0x80000000 -le ram.vlog ram.hex
42
else # No software image
43
ram.hex :
44
        $(Q)echo "00000000" > $@
45
        $(Q)echo "00000000" >> $@
46
        $(Q)echo "00000000" >> $@
47
        $(Q)echo "00000000" >> $@
48
        $(Q)echo "00000000" >> $@
49
        $(Q)echo "00000000" >> $@
50
        $(Q)echo "00000000" >> $@
51
        $(Q)echo "00000000" >> $@
52
endif
53
 
54
embedded_sw :
55
        $(Q)echo SW_IMAGES=$(SW_IMAGES) SW_IMAGE=$(SW_IMAGE)
56
        $(Q)if test ! -d esw; then mkdir -p esw; fi
57
        $(Q)$(MAKE) -C esw VERBOSE=$(VERBOSE) \
58
                -f $(SIM_DIR)/scripts/embedded.mk $(SW_IMAGES)
59
 
60
include $(PACKAGES_DIR)/packages.mk
61
 

powered by: WebSVN 2.1.0

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