blob: acca8f7af3f0cf9c53dbdd77c53912b9330376f4 [file] [log] [blame] [edit]
#
# //------------------------------------------------------------//
# // Copyright 2009-2012 Mentor Graphics Corporation //
# // All Rights Reserved Worldwid //
# // //
# // Licensed under the Apache License, Version 2.0 (the //
# // "License"); you may not use this file except in //
# // compliance with the License. You may obtain a copy of //
# // the License at //
# // //
# // http://www.apache.org/licenses/LICENSE-2.0 //
# // //
# // Unless required by applicable law or agreed to in //
# // writing, software distributed under the License is //
# // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR //
# // CONDITIONS OF ANY KIND, either express or implied. See //
# // the License for the specific language governing //
# // permissions and limitations under the License. //
# //------------------------------------------------------------//
UVMC_HOME ?= ..
UVM_LIB ?= $(UVMC_HOME)/lib/uvmc_lib
UVMC_LIB ?= $(UVMC_HOME)/lib/uvmc_lib
OPT_C ?= # SystemVerilog compiler arguments
OPT_SC ?= # SystemC compiler arguments
OPT_L ?= # SystemC linker arguments
OPT_R ?= # Simulator (Run-time) arguments
BITS ?= 32
LOG ?= questa
VLOG = vlog -$(BITS) $(OPT_C) -sv +incdir+$(UVM_HOME)/src -L $(UVM_LIB) -L $(UVMC_LIB) +define+QUESTA
SCCOM = sccom -$(BITS) $(OPT_SC) -DSC_INCLUDE_DYNAMIC_PROCESSES -DQUESTA -I$(UVMC_HOME)/src/connect/sc
LINK = sccom -$(BITS) $(OPT_L) -link -DSC_INCLUDE_DYNAMIC_PROCESSES -lib $(UVMC_LIB) -lib work
VSIM = vsim -$(BITS) $(OPT_R) -c -do "run -all; quit -f" -t 1ps -L $(UVM_LIB) -L $(UVMC_LIB) -l $(LOG).log
# Internal use
# ------------
# for checking simulation results
N_FATALS = 0
N_ERRS = 0
TEST_CMD ?= test
CHECK_LOG ?= $(LOG).log
SC_CHECK = \
@$(TEST_CMD) \( `grep -ci 'ERROR' $(CHECK_LOG)` -eq 0 \) -a \
\( `grep -ci 'FATAL' $(CHECK_LOG)` -eq 0 \)
CHECK = \
@$(TEST_CMD) \( `grep -c 'UVM_ERROR : $(N_ERRS)' $(CHECK_LOG)` -eq 1 \) -a \
\( `grep -c 'UVM_FATAL : $(N_FATALS)' $(CHECK_LOG)` -eq 1 \)