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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [scripts/] [make/] [Makefile-board-icarus.inc] - Blame information for rev 661

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 661 paknick
# Icarus script generation, compile and run rules for board simulations
2
 
3
# If VCD dump is desired, tell Modelsim not to optimise
4
# away everything.
5
ifeq ($(VCD), 1)
6
VVP_ARGS="-vcd"
7
endif
8
 
9
 
10
# VPI debugging interface set up
11
VPI_SRC_C_DIR=$(COMMON_BENCH_VERILOG_DIR)/vpi/c
12
VPI_SRCS=$(shell ls $(VPI_SRC_C_DIR)/*.[ch])
13
 
14
 
15
icarus_script.scr : $(BOARD_BACKEND_VERILOG_SRC) $(RTL_VERILOG_SRC) \
16
                    $(RTL_VERILOG_INCLUDES) $(BOOTROM_VERILOG) \
17
                    $(BOARD_BENCH_VERILOG_SRC) $(COMMON_BENCH_VERILOG_SRC) $(TECHNOLOGY_BACKEND_VERILOG_DIR)
18
#       $(Q)echo "+incdir+"$(TECHNOLOGY_BACKEND_VERILOG_DIR) >> $@;
19
        $(Q)echo "+incdir+"$(BOARD_BACKEND_VERILOG_DIR) >> $@;
20
        $(Q)echo "+incdir+"$(BOARD_BENCH_VERILOG_DIR) >> $@;
21
        $(Q)echo "-y " $(TECHNOLOGY_LIBRARY_VERILOG_DIR) >> $@;
22
        $(Q)echo "+incdir+"$(BOARD_RTL_VERILOG_INCLUDE_DIR) >> $@;
23
        $(Q)echo "+incdir+"$(BOOTROM_SW_DIR) >> $@;
24
        $(Q)echo "+incdir+"$(BOARD_BENCH_VERILOG_INCLUDE_DIR) >> $@;
25
        $(Q)for module in $(BOARD_RTL_VERILOG_MODULES); do if [ -d $(BOARD_RTL_VERILOG_DIR)/$$module ]; then echo "-y " $(BOARD_RTL_VERILOG_DIR)/$$module >> $@; fi; done
26
        $(Q)for module in $(COMMON_RTL_VERILOG_MODULES); do if [ -d $(COMMON_RTL_VERILOG_DIR)/$$module ]; then echo "-y " $(COMMON_RTL_VERILOG_DIR)/$$module >> $@; fi; done
27
        $(Q)echo "-y " $(BOARD_BACKEND_VERILOG_DIR) >> $@;
28
        $(Q)echo "+incdir+"$(BOARD_RTL_VERILOG_INCLUDE_DIR) >> $@;
29
        $(Q)echo "+incdir+"$(BOARD_BENCH_VERILOG_INCLUDE_DIR) >> $@;
30
        $(Q)echo "+incdir+"$(COMMON_BENCH_VERILOG_INCLUDE_DIR) >> $@;
31
        $(Q)for path in $(BENCH_VERILOG_SUBDIRS); do echo "+incdir+"$$path >> $@; done
32
        $(Q)for path in $(BENCH_VERILOG_SUBDIRS); do echo "-y "$$path >> $@; done
33
        $(Q)echo "+incdir+"$(BOARD_RTL_VERILOG_INCLUDE_DIR) >> $@;
34
        $(Q)echo "+libext+.v" >> $@;
35
        $(Q)for vsrc in $(BACKEND_TECHNOLOGY_VERILOG_SRC); do echo $$vsrc >> $@; done
36
        $(Q)for vsrc in $(BOARD_BACKEND_VERILOG_SRC); do echo $$vsrc >> $@; done
37
        $(Q)for vsrc in $(BOARD_BENCH_VERILOG_SRC); do echo $$vsrc >> $@; done
38
        $(Q)for vsrc in $(COMMON_BENCH_VERILOG_SRC); do echo $$vsrc >> $@; done
39
        $(Q)echo "../../rtl/verilog/versatile_library/versatile_library_ordbcycloneiv.v" >> $@;
40
        $(Q)echo >> $@
41
 
42
 
43
#IVERILOG_ARGS="-Wno-implicit -Wno-portbind -Wno-select-range -Wno-timescale -Wno-infloop -Wno-sensitivity-entire-vector -Wno-sensitivity-entire-array"
44
IVERILOG_ARGS=""
45
 
46
.PHONY : $(ICARUS)
47
 
48
ifeq ($(FPGA_VENDOR), altera)
49
$(ICARUS): icarus_script.scr
50
        $(Q)echo; echo "\t### Compiling testbench ###"; echo
51
        $(Q)echo; echo ">>iverilog $(IVERILOG_ARGS) -o tb -c $< -s orpsoc_testbench $(BENCH_TOP_FILE)"; echo
52
        $(Q)iverilog -o orpsoc_testbench -c $< -s orpsoc_testbench $(IVERILOG_ARGS) $(BENCH_TOP_FILE)
53
        $(Q)echo; echo "\t### Launching simulation ###"; echo
54
        $(Q)vvp -l ../out/icarus-sim.log orpsoc_testbench $(VVP_ARGS)
55
endif

powered by: WebSVN 2.1.0

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