| # | |
| # //------------------------------------------------------------// | |
| # // 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 ?= ../.. | |
| MAKE_CMD = $(MAKE) -f Makefile.questa | |
| TRACE_OPT= | |
| ifdef TRACE | |
| TRACE_OPT=+UVMC_COMMAND_TRACE | |
| endif | |
| help: | |
| @echo " -----------------------------------------------------------------"; | |
| @echo "| UVM COMMAND EXAMPLES |"; | |
| @echo " -----------------------------------------------------------------"; | |
| @echo "| |"; | |
| @echo "| Usage: |"; | |
| @echo "| |"; | |
| @echo "| make [UVM_HOME=path] [UVMC_HOME=path] [TRACE=1] <example> |"; | |
| @echo "| |"; | |
| @echo "| where <example> is one of |"; | |
| @echo "| |"; | |
| @echo "| config : shows usage of the UVMC set/get config API |"; | |
| @echo "| |"; | |
| @echo "| reporting : shows how to issue and filter UVM standard |"; | |
| @echo "| reports |"; | |
| @echo "| |"; | |
| @echo "| factory : shows how to set type and instance overrides and |"; | |
| @echo "| dump factory state and perform factory debug |"; | |
| @echo "| |"; | |
| @echo "| topology : illusrates how (and when) to dump UVM topology |"; | |
| @echo "| |"; | |
| @echo "| phasing : show how SC can wait for any UVM phase state |"; | |
| @echo "| and raise/drop objections to control their |"; | |
| @echo "| progression |"; | |
| @echo "| |"; | |
| @echo "| UVM_HOME and UVMC_HOME, if specified, will override any |"; | |
| @echo "| environment variables by the same name. If the UVM_HOME env |"; | |
| @echo "| variable is not defined, you must specify UVM_HOME on the |"; | |
| @echo "| command line. If you are running these examples outside the |"; | |
| @echo "| the UVMC directory tree you must either define the UVMC_HOME |"; | |
| @echo "| environment variable or specify UVMC_HOME on the command line. |"; | |
| @echo "| |"; | |
| @echo "| If TRACE=1 is used, UVM command tracing is enabled (try it!) |"; | |
| @echo "| |"; | |
| @echo "| Other options: |"; | |
| @echo "| |"; | |
| @echo "| all : Run all examples after cleaning. |"; | |
| @echo "| clean : Remove simulation files and directories |"; | |
| @echo "| help : Print this help information |"; | |
| @echo "| |"; | |
| @echo "| |"; | |
| @echo " -----------------------------------------------------------------"; | |
| include $(UVMC_HOME)/examples_ovm/Makefile.questa | |
| all: topology factory reporting config phasing | |
| config: | |
| $(MAKE_CMD) EXAMPLE=ex_config ARGS="+CONFIG_ON +TRANS_ON" run | |
| reporting: | |
| $(MAKE_CMD) EXAMPLE=ex_reporting run | |
| factory: | |
| $(MAKE_CMD) EXAMPLE=ex_factory run | |
| topology: | |
| $(MAKE_CMD) EXAMPLE=ex_print_topology run | |
| phasing: | |
| $(MAKE_CMD) EXAMPLE=ex_phase_control ARGS=+PHASING_ON run | |
| clean: | |
| rm -rf work *.log vsim* transcript *.out *.vstf | |
| run: | |
| -rm -rf work | |
| vlib work | |
| $(VLOG) sv_main.sv | |
| $(SCCOM) $(EXAMPLE).cpp | |
| $(LINK) | |
| $(VSIM) $(TRACE_OPT) $(ARGS) sc_main sv_main | |
| $(CHECK) | |