| # |
| # //------------------------------------------------------------// |
| # // Copyright 2012 Mentor Graphics Corp // |
| # // 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 = ../.. |
| |
| help: |
| @echo " -----------------------------------------------------------------"; |
| @echo "| UVMC EXAMPLES - CONVERTERS |"; |
| @echo " -----------------------------------------------------------------"; |
| @echo "| |"; |
| @echo "| Usage: |"; |
| @echo "| |"; |
| @echo "| make [UVM_HOME=path] [UVMC_HOME=path] <example> |"; |
| @echo "| |"; |
| @echo "| where <example> is one or more of: |"; |
| @echo "| |"; |
| @echo "| ex01 : SV conversion done in UVM transaction |"; |
| @echo "| SC conversion done in macro-generated converter class |"; |
| @echo "| |"; |
| @echo "| ex02 : SV conversion done in UVM transaction |"; |
| @echo "| SC conversion done in separate converter class |"; |
| @echo "| |"; |
| @echo "| ex03 : SV conversion done in UVM transaction |"; |
| @echo "| SC conversion done in transaction |"; |
| @echo "| |"; |
| @echo "| ex04 : SV conversion done in UVM transaction via field macros |"; |
| @echo "| SC conversion done in macro-generated converter class |"; |
| @echo "| |"; |
| @echo "| ex05 : SV conversion done in UVM transaction via field macros |"; |
| @echo "| SC conversion done in separate converter class |"; |
| @echo "| |"; |
| @echo "| ex06 : SV conversion done in UVM transaction via field macros |"; |
| @echo "| SC conversion done in transaction |"; |
| @echo "| |"; |
| @echo "| ex07 : SV conversion done in separate converter class; |"; |
| @echo "| transaction is not based on uvm_object |"; |
| @echo "| SC conversion done in macro-generated converter class |"; |
| @echo "| |"; |
| @echo "| ex08 : SV conversion done in separate converter class; |"; |
| @echo "| transaction is not based on uvm_object |"; |
| @echo "| SC conversion done in separate converter class |"; |
| @echo "| |"; |
| @echo "| ex09 : SV conversion done in separate converter class; |"; |
| @echo "| transaction is not based on uvm_object |"; |
| @echo "| SC conversion done in transaction |"; |
| @echo "| |"; |
| @echo "| ex10 : SV conversion done in UVM transaction |"; |
| @echo "| SC-side implements converter that converts and adapts |"; |
| @echo "| to an otherwise incompatible transaction type |"; |
| @echo "| |"; |
| @echo "| ex11 : SV conversion done in UVM transaction via field macros |"; |
| @echo "| SC-side implements converter that converts and adapts |"; |
| @echo "| to an otherwise incompatible transaction type |"; |
| @echo "| |"; |
| @echo "| ex12 : SV-side implements converter in separate class; |"; |
| @echo "| transaction is not based on uvm_object |"; |
| @echo "| SC-side implements converter that converts and adapts |"; |
| @echo "| to an otherwise incompatible transaction type |"; |
| @echo "| |"; |
| @echo "| UVM_HOME and UVMC_HOME specify the location of the source |"; |
| @echo "| headers and macro definitions needed by the examples. You must |"; |
| @echo "| specify their locations via UVM_HOME and UVMC_HOME environment |"; |
| @echo "| variables or make command line options. Command line options |"; |
| @echo "| override any envrionment variable settings. |"; |
| @echo "| |"; |
| @echo "| The UVM and UVMC libraries must be compiled prior to running |"; |
| @echo "| any example. If the libraries are not at their default location |"; |
| @echo "| (UVMC_HOME/lib) then you must specify their location via the |"; |
| @echo "| UVM_LIB and/or UVMC_LIB environment variables or make command |"; |
| @echo "| line options. Make command line options take precedence. |"; |
| @echo "| |"; |
| @echo "| Other options: |"; |
| @echo "| |"; |
| @echo "| all : Run all examples |"; |
| @echo "| clean : Remove simulation files and directories |"; |
| @echo "| help : Print this help information |"; |
| @echo "| |"; |
| @echo "| |"; |
| @echo " -----------------------------------------------------------------"; |
| |
| include $(UVMC_HOME)/examples/Makefile.ius |
| |
| |
| ex01: |
| $(MAKE) -f Makefile.ius LOG=$@ \ |
| SV_FILE=sv_converter_trans.sv \ |
| SC_FILE=sc_converter_macros.cpp \ |
| run |
| |
| ex02: |
| $(MAKE) -f Makefile.ius LOG=$@ \ |
| SV_FILE=sv_converter_trans.sv \ |
| SC_FILE=sc_converter_class.cpp \ |
| run |
| |
| ex03: |
| $(MAKE) -f Makefile.ius LOG=$@ \ |
| SV_FILE=sv_converter_trans.sv \ |
| SC_FILE=sc_converter_trans.cpp \ |
| run |
| |
| ex04: |
| $(MAKE) -f Makefile.ius LOG=$@ \ |
| SV_FILE=sv_converter_trans_field_macros.sv \ |
| SC_FILE=sc_converter_macros.cpp \ |
| run |
| |
| ex05: |
| $(MAKE) -f Makefile.ius LOG=$@ \ |
| SV_FILE=sv_converter_trans_field_macros.sv \ |
| SC_FILE=sc_converter_class.cpp \ |
| run |
| |
| ex06: |
| $(MAKE) -f Makefile.ius LOG=$@ \ |
| SV_FILE=sv_converter_trans_field_macros.sv \ |
| SC_FILE=sc_converter_trans.cpp \ |
| run |
| |
| ex07: |
| $(MAKE) -f Makefile.ius LOG=$@ \ |
| SV_FILE=sv_converter_class.sv \ |
| SC_FILE=sc_converter_macros.cpp \ |
| run |
| |
| ex08: |
| $(MAKE) -f Makefile.ius LOG=$@ \ |
| SV_FILE=sv_converter_class.sv \ |
| SC_FILE=sc_converter_class.cpp \ |
| run |
| |
| ex09: |
| $(MAKE) -f Makefile.ius LOG=$@ \ |
| SV_FILE=sv_converter_class.sv \ |
| SC_FILE=sc_converter_trans.cpp \ |
| run |
| |
| ex10: |
| $(MAKE) -f Makefile.ius LOG=$@ \ |
| SV_FILE=sv_converter_trans.sv \ |
| SC_FILE=sc_converter_adapter.cpp \ |
| run |
| |
| ex11: |
| $(MAKE) -f Makefile.ius LOG=$@ \ |
| SV_FILE=sv_converter_trans_field_macros.sv \ |
| SC_FILE=sc_converter_adapter.cpp \ |
| run |
| |
| ex12: |
| $(MAKE) -f Makefile.ius LOG=$@ \ |
| SV_FILE=sv_converter_class.sv \ |
| SC_FILE=sc_converter_adapter.cpp \ |
| run |
| |
| |
| all: ex01 ex02 ex03 ex04 ex05 ex06 ex07 ex08 ex09 ex10 ex11 ex12 |
| |
| |
| run: |
| $(IUS) -sc_main $(SC_FILE) $(SV_FILE) $(ARGS) 2>&1 | tee $(LOG).log |
| $(CHECK) |
| |
| |
| |