Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | # ========== Copyright Header Begin ========================================== |
2 | # | |
3 | # OpenSPARC T2 Processor File: Makefile.defs | |
4 | # Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved | |
5 | # 4150 Network Circle, Santa Clara, California 95054, U.S.A. | |
6 | # | |
7 | # * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
8 | # | |
9 | # This program is free software; you can redistribute it and/or modify | |
10 | # it under the terms of the GNU General Public License as published by | |
11 | # the Free Software Foundation; version 2 of the License. | |
12 | # | |
13 | # This program is distributed in the hope that it will be useful, | |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | # GNU General Public License for more details. | |
17 | # | |
18 | # You should have received a copy of the GNU General Public License | |
19 | # along with this program; if not, write to the Free Software | |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 | # | |
22 | # For the avoidance of doubt, and except that if any non-GPL license | |
23 | # choice is available it will apply instead, Sun elects to use only | |
24 | # the General Public License version 2 (GPLv2) at this time for any | |
25 | # software where a choice of GPL license versions is made | |
26 | # available with the language indicating that GPLv2 or any later version | |
27 | # may be used, or where a choice of which version of the GPL is applied is | |
28 | # otherwise unspecified. | |
29 | # | |
30 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
31 | # CA 95054 USA or visit www.sun.com if you need additional information or | |
32 | # have any questions. | |
33 | # | |
34 | # ========== Copyright Header End ============================================ | |
35 | # -*-Makefile-*- tell emacs what mode to use | |
36 | ||
37 | # This make file is to be included by all the makefiles for | |
38 | # each sub modules. This should not be edited unless it is absolutely | |
39 | # necessary. | |
40 | ||
41 | grp_dir = $(DV_ROOT)/verif/env/fnx | |
42 | ||
43 | #------------------------------------------------------------------------------- | |
44 | # If you want to see the entire build process define `verbose_make' like so: | |
45 | # verbose_make = 1 | |
46 | #------------------------------------------------------------------------------- | |
47 | ||
48 | SPEW_START = @$(echo) "----------------- Building $(lib)/$(@F) -----------------" | |
49 | SPEW_END = @$(echo) "----------------- Done $(lib)/$(@F) ------------------\n" | |
50 | ||
51 | #------------------------------------------------------------------------------- | |
52 | # Select tool versions, set _HOME variables as required | |
53 | #------------------------------------------------------------------------------- | |
54 | ||
55 | export csrtool = csrtool | |
56 | export vera = vera | |
57 | ||
58 | #export cc = /net/suntools/export/tools/sparc/bin/gcc | |
59 | #export cpp = /net/suntools/export/tools/sparc/bin/g++ | |
60 | #export ld = /net/suntools/export/tools/sparc/bin/g++ | |
61 | export cc = gcc | |
62 | export cpp = g++ | |
63 | export ld = g++ | |
64 | export gcc = gcc | |
65 | export ar = /usr/ccs/bin/ar | |
66 | #VCS_HOME = /import/vcs-release/vcs$(shell configsrch vcs $(TRE_ENTRY)) | |
67 | #VERA_HOME = /import/vcs-release/vera,$(shell configsrch vera $(TRE_ENTRY))/5.x | |
68 | #denali_dir = /net/inandout/export/home2/corpcad/tools/commercial/denali/v14/denali | |
69 | #denali_dir = /net/cadcombo1/export/home3/corpcad/tools/commercial/denali/pcie,v1.0_23 | |
70 | #denali_dir = /import/cadist/pkgs/denali/pcie,v1.0_23/5.x | |
71 | denali_dir = $(DENALI) | |
72 | ||
73 | RM = /bin/rm -f | |
74 | cp = /bin/cp | |
75 | ||
76 | #------------------------------------------------------------------------------- | |
77 | # Perl scripts and other executables. Define the complete path so everyone | |
78 | # uses the same versions. Bsub and lsmake are left alone since they are | |
79 | # links through mwtool. SHELL defaults to the right thing (/bin/sh). | |
80 | #------------------------------------------------------------------------------- | |
81 | ||
82 | export basename = /bin/basename | |
83 | export bsub = /import/camelot/exe/csub | |
84 | export cat = /bin/cat | |
85 | export CC = cc | |
86 | export chmod = /bin/chmod -f | |
87 | export echo = /bin/echo | |
88 | export egrep = /usr/xpg4/bin/egrep | |
89 | export find = /usr/bin/find | |
90 | export gzip = /usr/dist/exe/gzip # ENV{GZIP} is used by the gzip program. be careful | |
91 | export link = ln -sf | |
92 | export mkdir = /usr/bin/mkdir | |
93 | export rm = $(RM) | |
94 | export sed = /bin/sed | |
95 | export tee = /bin/tee | |
96 | export test = /bin/test | |
97 | export touch = /usr/bin/touch | |
98 | export tr = /usr/ucb/tr | |
99 | export zgrep = /usr/dist/exe/zgrep | |
100 | ||
101 | sh_it = /bin/sh | |
102 | perl_path = $(DV_ROOT)/tools/perl-5.8.0/bin/perl | |
103 | check_regression = $(perl_path) $(grp_tools_bin_dir)/check_regression.pl | |
104 | no_comment = $(sh_it) $(grp_tools_bin_dir)/no_comment.pl | |
105 | pass_or_fail = $(grp_tools_bin_dir)/pass_or_fail.pl | |
106 | regman_waitfor = $(sh_it) $(grp_tools_bin_dir)/regman-waitfor | |
107 | runsim_aid = $(grp_tools_bin_dir)/runsim_aid.pl | |
108 | export make_lib_depends = $(perl_path) $(grp_tools_bin_dir)/make_lib_depends3.pl | |
109 | ||
110 | gen_csr_input = $(grp_tools_bin_dir)/gen_csr_input.pl | |
111 | fix_csr_output = $(grp_tools_bin_dir)/fix_csr_output.pl | |
112 | vrhfix = $(sh_it) $(grp_tools_bin_dir)/vrhfix.pl | |
113 | export reggie = $(grp_dir)/runsim/reggie/reggie.pl | |
114 | register_logfile = register-logfile | |
115 | ||
116 | #---------------------------------------------------------------- | |
117 | # Useful variables for dump task generation and runtime dump generation | |
118 | #---------------------------------------------------------------- | |
119 | dump_vh_template = $(grp_tools_inc_dir)/dump_vh_template.vh | |
120 | create_dump_vsrc = $(sed) -e 's/_this_here_dut_/$(dump_scope)/g' \ | |
121 | -e 's/_powertheater_dut_/$(powertheater_dut)/g' \ | |
122 | $(dump_vh_template) > $(@) | |
123 | dump_vsrc = dump.v | |
124 | default_dump_levels = 0 | |
125 | ||
126 | ||
127 | #------------------------------------------------------------------------------ | |
128 | # directory variables controlling simulator build directories | |
129 | #------------------------------------------------------------------------------ | |
130 | # Utility function that can add a prefix selectively to a list of | |
131 | # files in order to make them absolute | |
132 | make_absolute = $(filter /%,$(1)) $(addprefix $(2)/,$(filter-out /%,$(1))) | |
133 | ||
134 | testbench_home_dir = $(shell pwd) | |
135 | dconf = rtl | |
136 | sim_type = plain | |
137 | results = . | |
138 | ||
139 | # Absolute path for build directory | |
140 | abs_build_dir = $(testbench_home_dir)/$(build_dir) | |
141 | ||
142 | #------------------------------------------------------------------------------- | |
143 | # Project Level Timestamp Definitions | |
144 | #------------------------------------------------------------------------------- | |
145 | proj_timestamps = $(proj_report_timestamp) $(proj_csr_timestamp) | |
146 | ||
147 | export proj_report_timestamp = $(proj_verif_common_vlib_dir)/report/report_timestamp | |
148 | proj_csr_timestamp = $(addsuffix /csr_timestamp, $(csrtool_list)) | |
149 | ||
150 | ||
151 | #------------------------------------------------------------------------------- | |
152 | # common directory variabes, group | |
153 | #------------------------------------------------------------------------------- | |
154 | #runsim_dir = $(grp_dir)/tools/runsim | |
155 | #export grp_tools_bin_dir = $(grp_dir)/tools/runsim/bin | |
156 | #grp_tools_inc_dir = $(grp_dir)/tools/runsim/include | |
157 | #grp_tools_lib_dir = $(grp_dir)/tools/runsim/lib | |
158 | #export grp_tools_src_dir = $(grp_dir)/tools/runsim/pli_src | |
159 | #grp_vsrc_common_dir = $(grp_dir)/rtl/common | |
160 | #grp_bfm_dir = $(grp_dir)/verif/bfm | |
161 | #export grp_verif_common_dir = $(grp_dir)/verif/common | |
162 | ||
163 | #vlsi_dir = /vobs/vlsi | |
164 | #export grp_vlib_dir = $(vlsi_dir)/ops/verif/vlib | |
165 | ||
166 | runsim_dir = $(grp_dir)/runsim | |
167 | export grp_tools_bin_dir = $(grp_dir)/runsim/bin | |
168 | grp_tools_inc_dir = $(grp_dir)/runsim/include | |
169 | grp_tools_lib_dir = $(grp_dir)/runsim/lib | |
170 | export grp_tools_src_dir = $(grp_dir)/runsim/pli_src | |
171 | #grp_vsrc_common_dir = $(grp_dir)/rtl/common | |
172 | #grp_bfm_dir = $(grp_dir)/verif/bfm | |
173 | #export grp_verif_common_dir = $(grp_dir)/verif/common | |
174 | ||
175 | #vlsi_dir = /vobs/vlsi | |
176 | #export grp_vlib_dir = $(vlsi_dir)/ops/verif/vlib | |
177 | ||
178 | #------------------------------------------------------------------------------ | |
179 | # common directory variabes, project | |
180 | #------------------------------------------------------------------------------ | |
181 | ||
182 | # csrtool includes are needed by both design and verif code | |
183 | proj_common_inc_dir = $(csrtool_vsrc_incdir) | |
184 | ||
185 | proj_design_src_dir = $(project_dir)/design | |
186 | proj_design_common_src_dir = | |
187 | proj_design_common_inc_dir = | |
188 | proj_design_wrapper_src_dir = $(proj_design_src_dir)/wrappers | |
189 | proj_design_generated_src_dir = $(proj_design_src_dir)/generated | |
190 | proj_design_interface_src_dir = $(proj_design_src_dir)/interface | |
191 | ||
192 | proj_verif_src_dir = $(project_dir)/verif | |
193 | proj_bfm_dir = $(proj_verif_src_dir)/bfm | |
194 | proj_verif_common_dir = $(proj_verif_src_dir)/common | |
195 | ||
196 | proj_tools_dir = $(project_dir)/ops/tools | |
197 | export proj_vlib_dir = $(project_dir)/ops/verif/vlib | |
198 | ||
199 | # Some variables needed by report tool, using HESE naming conventions | |
200 | # (proj/asic instead of grp/proj). | |
201 | export proj_tools_src_dir = $(grp_tools_src_dir) | |
202 | export proj_verif_common_vlib_dir = $(grp_vlib_dir) | |
203 | export proj_verif_common_clib_dir = $(vlsi_dir)/ops/verif/clib | |
204 | export proj_design_common_dir = $(vlsi_dir)/ops/rtl | |
205 | ||
206 | #------------------------------------------------------------------------------- | |
207 | # Project level libvrl files. You will have to add a target to build these | |
208 | # unless they are built via the `timestamps'. | |
209 | #------------------------------------------------------------------------------- | |
210 | proj_libvrl = $(proj_report_libvrl) | |
211 | proj_lib_dir_list = $(proj_report_lib_dir) | |
212 | ||
213 | ||
214 | #------------------------------------------------------------------------------ | |
215 | # This is stuff that must be included across all builds for this project | |
216 | # (like top level defines and such.) These are verilog source that are not | |
217 | # explicitly included in design makefile.includes andn that will not be | |
218 | # found when searching libraries. (e.g. addr.vh, itool_defines.vh) | |
219 | proj_design_common_vsrc = $(proj_report_include) | |
220 | #---------------------------------------------------------------------------- | |
221 | #---------------------------------------------------------------------------- | |
222 | # Make the `force' dependency work | |
223 | #---------------------------------------------------------------------------- | |
224 | .PHONY: force | |
225 | force : | |
226 | ||
227 | #---------------------------------------------------------------- | |
228 | # Don't mess with NULLSTRING or SPACE. These enable insertion of spaces | |
229 | # (ascii 0x20) into macro definitions. The space between `$(NULLSTRING)' | |
230 | # and the `#' in the SPACE definition is the actual value of the SPACE | |
231 | # macro. | |
232 | NULLSTRING := | |
233 | SPACE := $(NULLSTRING) # keep that space. | |
234 | ||
235 | # What time is it? | |
236 | _HOUR = "%H" | |
237 | _MIN = "%M" | |
238 | _SEC = "%S" | |
239 | _FORMAT = "%Y%h%d."$(_HOUR)$(_MIN)$(_SEC) | |
240 | NOW := $(shell /usr/bin/date +"$(_FORMAT)") | |
241 | ||
242 | #============================= The End ================================= |