Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / fnx / runsim / makefiles / Makefile.defs
CommitLineData
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
41grp_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
48SPEW_START = @$(echo) "----------------- Building $(lib)/$(@F) -----------------"
49SPEW_END = @$(echo) "----------------- Done $(lib)/$(@F) ------------------\n"
50
51#-------------------------------------------------------------------------------
52# Select tool versions, set _HOME variables as required
53#-------------------------------------------------------------------------------
54
55export csrtool = csrtool
56export 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++
61export cc = gcc
62export cpp = g++
63export ld = g++
64export gcc = gcc
65export 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
71denali_dir = $(DENALI)
72
73RM = /bin/rm -f
74cp = /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
82export basename = /bin/basename
83export bsub = /import/camelot/exe/csub
84export cat = /bin/cat
85export CC = cc
86export chmod = /bin/chmod -f
87export echo = /bin/echo
88export egrep = /usr/xpg4/bin/egrep
89export find = /usr/bin/find
90export gzip = /usr/dist/exe/gzip # ENV{GZIP} is used by the gzip program. be careful
91export link = ln -sf
92export mkdir = /usr/bin/mkdir
93export rm = $(RM)
94export sed = /bin/sed
95export tee = /bin/tee
96export test = /bin/test
97export touch = /usr/bin/touch
98export tr = /usr/ucb/tr
99export zgrep = /usr/dist/exe/zgrep
100
101sh_it = /bin/sh
102perl_path = $(DV_ROOT)/tools/perl-5.8.0/bin/perl
103check_regression = $(perl_path) $(grp_tools_bin_dir)/check_regression.pl
104no_comment = $(sh_it) $(grp_tools_bin_dir)/no_comment.pl
105pass_or_fail = $(grp_tools_bin_dir)/pass_or_fail.pl
106regman_waitfor = $(sh_it) $(grp_tools_bin_dir)/regman-waitfor
107runsim_aid = $(grp_tools_bin_dir)/runsim_aid.pl
108export make_lib_depends = $(perl_path) $(grp_tools_bin_dir)/make_lib_depends3.pl
109
110gen_csr_input = $(grp_tools_bin_dir)/gen_csr_input.pl
111fix_csr_output = $(grp_tools_bin_dir)/fix_csr_output.pl
112vrhfix = $(sh_it) $(grp_tools_bin_dir)/vrhfix.pl
113export reggie = $(grp_dir)/runsim/reggie/reggie.pl
114register_logfile = register-logfile
115
116#----------------------------------------------------------------
117# Useful variables for dump task generation and runtime dump generation
118#----------------------------------------------------------------
119dump_vh_template = $(grp_tools_inc_dir)/dump_vh_template.vh
120create_dump_vsrc = $(sed) -e 's/_this_here_dut_/$(dump_scope)/g' \
121 -e 's/_powertheater_dut_/$(powertheater_dut)/g' \
122 $(dump_vh_template) > $(@)
123dump_vsrc = dump.v
124default_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
132make_absolute = $(filter /%,$(1)) $(addprefix $(2)/,$(filter-out /%,$(1)))
133
134testbench_home_dir = $(shell pwd)
135dconf = rtl
136sim_type = plain
137results = .
138
139# Absolute path for build directory
140abs_build_dir = $(testbench_home_dir)/$(build_dir)
141
142#-------------------------------------------------------------------------------
143# Project Level Timestamp Definitions
144#-------------------------------------------------------------------------------
145proj_timestamps = $(proj_report_timestamp) $(proj_csr_timestamp)
146
147export proj_report_timestamp = $(proj_verif_common_vlib_dir)/report/report_timestamp
148proj_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
166runsim_dir = $(grp_dir)/runsim
167export grp_tools_bin_dir = $(grp_dir)/runsim/bin
168grp_tools_inc_dir = $(grp_dir)/runsim/include
169grp_tools_lib_dir = $(grp_dir)/runsim/lib
170export 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
183proj_common_inc_dir = $(csrtool_vsrc_incdir)
184
185proj_design_src_dir = $(project_dir)/design
186proj_design_common_src_dir =
187proj_design_common_inc_dir =
188proj_design_wrapper_src_dir = $(proj_design_src_dir)/wrappers
189proj_design_generated_src_dir = $(proj_design_src_dir)/generated
190proj_design_interface_src_dir = $(proj_design_src_dir)/interface
191
192proj_verif_src_dir = $(project_dir)/verif
193proj_bfm_dir = $(proj_verif_src_dir)/bfm
194proj_verif_common_dir = $(proj_verif_src_dir)/common
195
196proj_tools_dir = $(project_dir)/ops/tools
197export 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).
201export proj_tools_src_dir = $(grp_tools_src_dir)
202export proj_verif_common_vlib_dir = $(grp_vlib_dir)
203export proj_verif_common_clib_dir = $(vlsi_dir)/ops/verif/clib
204export 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#-------------------------------------------------------------------------------
210proj_libvrl = $(proj_report_libvrl)
211proj_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)
219proj_design_common_vsrc = $(proj_report_include)
220#----------------------------------------------------------------------------
221#----------------------------------------------------------------------------
222# Make the `force' dependency work
223#----------------------------------------------------------------------------
224.PHONY: force
225force :
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.
232NULLSTRING :=
233SPACE := $(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)
240NOW := $(shell /usr/bin/date +"$(_FORMAT)")
241
242#============================= The End =================================