OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 542 julius
 
2
# First we get a list of modules in the RTL path of the board's path.
3
# Next we check which modules not in the board's RTL path are in the root RTL
4
# path (modules which can be commonly instantiated, but over which board
5
# build-specific versions take precedence.)
6
 
7
# Also generate list of verilog source files
8
 
9
# Paths under board/***/rtl/verilog we wish to exclude when getting modules
10
BOARD_VERILOG_MODULES_EXCLUDE += include
11
BOARD_VERILOG_MODULES_EXCLUDE += $(GATELEVEL_MODULES)
12
BOARD_VERILOG_MODULES_DIR_LIST=$(shell ls $(BOARD_RTL_VERILOG_DIR))
13 563 olof
BOARD_EXT_MODULES_DIR_LIST=$(shell ls $(BOARD_EXT_MODULES_DIR))
14 542 julius
# Apply exclude to list of modules
15
BOARD_RTL_VERILOG_MODULES=$(filter-out $(BOARD_VERILOG_MODULES_EXCLUDE),$(BOARD_VERILOG_MODULES_DIR_LIST))
16 563 olof
BOARD_EXT_MODULES=$(filter-out $(BOARD_VERILOG_MODULES_EXCLUDE),$(BOARD_EXT_MODULES_DIR_LIST))
17 542 julius
 
18
# Now get list of modules that we don't have a version of in the board path
19
COMMON_VERILOG_MODULES_EXCLUDE += include
20
COMMON_VERILOG_MODULES_EXCLUDE += $(BOARD_RTL_VERILOG_MODULES)
21 563 olof
COMMON_VERILOG_MODULES_EXCLUDE += $(BOARD_EXT_MODULES)
22 542 julius
COMMON_VERILOG_MODULES_EXCLUDE += $(GATELEVEL_MODULES)
23
 
24
COMMON_RTL_VERILOG_MODULES_DIR_LIST=$(shell ls $(COMMON_RTL_VERILOG_DIR))
25
COMMON_RTL_VERILOG_MODULES=$(filter-out $(COMMON_VERILOG_MODULES_EXCLUDE), $(COMMON_RTL_VERILOG_MODULES_DIR_LIST))
26
 
27
# List of verilog source files (only .v files!)
28
# Board RTL modules first
29
RTL_VERILOG_SRC=$(shell for module in $(BOARD_RTL_VERILOG_MODULES); do if [ -d $(BOARD_RTL_VERILOG_DIR)/$$module ]; then ls $(BOARD_RTL_VERILOG_DIR)/$$module/*.v; fi; done)
30 563 olof
 
31
# External modules
32
RTL_VERILOG_SRC +=$(shell for module in $(BOARD_EXT_MODULES); do if [ -d $(BOARD_EXT_MODULES_DIR)/$$module/rtl/verilog ]; then ls $(BOARD_EXT_MODULES_DIR)/$$module/rtl/verilog/*.v; fi; done)
33
 
34 542 julius
# Common RTL module source
35
RTL_VERILOG_SRC +=$(shell for module in $(COMMON_RTL_VERILOG_MODULES); do if [ -d $(COMMON_RTL_VERILOG_DIR)/$$module ]; then ls $(COMMON_RTL_VERILOG_DIR)/$$module/*.v; fi; done)
36
 
37
# List of verilog includes from board RTL path - only for rule sensitivity
38
RTL_VERILOG_INCLUDES=$(shell ls $(BOARD_RTL_VERILOG_INCLUDE_DIR)/*.*)
39
 
40
# Debugging rules
41
 
42
print-board-modules:
43
        @echo echo; echo "\t### Board verilog modules ###"; echo
44
        @echo $(BOARD_RTL_VERILOG_MODULES)
45 563 olof
        @echo echo "\t### External verilog modules ###"; echo
46
        @echo $(BOARD_EXT_MODULES)
47 542 julius
 
48
print-common-modules-exclude:
49
        @echo echo; echo "\t### Common verilog modules being excluded due to board versions ###"; echo
50
        @echo "$(COMMON_VERILOG_MODULES_EXCLUDE)"
51
 
52
print-common-modules:
53
        @echo echo; echo "\t###  Verilog modules from common RTL dir ###"; echo
54
        @echo $(COMMON_RTL_VERILOG_MODULES)
55
 
56
print-verilog-src:
57
        @echo echo; echo "\t### Verilog source ###"; echo
58
        @echo $(RTL_VERILOG_SRC)
59 558 julius
 
60
 
61
ifeq ($(HAVE_VHDL), 1)
62
# We have some VHDL we should include.
63
 
64
# Currently only supported for board builds - no common VHDL included at present
65
BOARD_RTL_VHDL_DIR=$(BOARD_RTL_DIR)/vhdl
66
BOARD_RTL_VHDL_MODULES=$(shell ls $(BOARD_RTL_VHDL_DIR))
67
 
68
#
69
# VHDL DUT source variables
70
#
71
VHDL_FILE_EXT=vhd
72
 
73
RTL_VHDL_SRC=$(shell for module in $(BOARD_RTL_VHDL_MODULES); do if [ -d $(BOARD_RTL_VHDL_DIR)/$$module ]; then ls $(BOARD_RTL_VHDL_DIR)/$$module/*.$(VHDL_FILE_EXT); fi; done)
74
 
75
 
76
# Rule for debugging this script
77
print-vhdl-modules:
78
        @echo echo; echo "\t### Board VHDL modules ###"; echo
79
        @echo $(BOARD_RTL_VHDL_MODULES)
80
 
81
print-vhdl-src:
82
        @echo echo; echo "\t### VHDL modules and source ###"; echo
83
        @echo "modules: "; echo $(BOARD_RTL_VHDL_MODULES); echo
84
        @echo "file extension: "$(VHDL_FILE_EXT)
85
        @echo "source: "$(RTL_VHDL_SRC)
86
 
87
 
88
endif

powered by: WebSVN 2.1.0

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