├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── README.md ├── .gitignore ├── DEVIATIONS.md ├── LICENSE.txt ├── NOTICE.txt ├── README.md ├── docs └── html │ ├── doc_src │ └── overviews │ │ ├── intro.txt │ │ └── legal.txt │ ├── files │ ├── base │ │ ├── uvm_callback-svh.html │ │ ├── uvm_cmdline_processor-svh.html │ │ ├── uvm_component-svh.html │ │ ├── uvm_config_db-svh.html │ │ ├── uvm_copier-svh.html │ │ ├── uvm_coreservice-svh.html │ │ ├── uvm_factory-svh.html │ │ ├── uvm_globals-svh.html │ │ ├── uvm_object_globals-svh.html │ │ ├── uvm_packer-svh.html │ │ ├── uvm_port_base-svh.html │ │ ├── uvm_printer-svh.html │ │ ├── uvm_recorder-svh.html │ │ ├── uvm_registry-svh.html │ │ ├── uvm_report_catcher-svh.html │ │ ├── uvm_report_server-svh.html │ │ ├── uvm_resource-svh.html │ │ ├── uvm_resource_base-svh.html │ │ ├── uvm_resource_db-svh.html │ │ ├── uvm_resource_db_options-svh.html │ │ ├── uvm_root-svh.html │ │ ├── uvm_text_tr_database-svh.html │ │ └── uvm_text_tr_stream-svh.html │ ├── macros │ │ ├── uvm_packer_defines-svh.html │ │ └── uvm_recorder_defines-svh.html │ ├── seq │ │ ├── uvm_sequence_base-svh.html │ │ └── uvm_sequencer_base-svh.html │ └── tlm2 │ │ └── uvm_tlm2_generic_payload-svh.html │ ├── files2 │ └── overviews │ │ └── intro-txt.html │ ├── images │ ├── bg_column_green.gif │ ├── bg_column_green_grey.gif │ ├── bg_feature.jpg │ ├── bg_h3_roundcorners.gif │ ├── bg_main.gif │ ├── bg_masthead.jpg │ ├── bg_navbar.gif │ ├── bg_roundcorners2.gif │ ├── bg_tableheader.gif │ ├── bg_thick_grey_bar.gif │ └── bullet_GreenOnGrey.gif │ ├── index.html │ ├── index │ ├── Classes.html │ ├── Files.html │ ├── General.html │ ├── Macros.html │ ├── Methods.html │ ├── Types.html │ └── Variables.html │ ├── javascript │ ├── main.js │ └── searchdata.js │ ├── logo.html │ ├── menu.html │ ├── search │ ├── ClassesU.html │ ├── FilesU.html │ ├── GeneralA.html │ ├── GeneralC.html │ ├── GeneralD.html │ ├── GeneralE.html │ ├── GeneralF.html │ ├── GeneralG.html │ ├── GeneralI.html │ ├── GeneralM.html │ ├── GeneralN.html │ ├── GeneralNumbers.html │ ├── GeneralP.html │ ├── GeneralR.html │ ├── GeneralS.html │ ├── GeneralSymbols.html │ ├── GeneralT.html │ ├── GeneralU.html │ ├── GeneralV.html │ ├── GeneralW.html │ ├── MacrosU.html │ ├── MethodsC.html │ ├── MethodsD.html │ ├── MethodsG.html │ ├── MethodsI.html │ ├── MethodsN.html │ ├── MethodsP.html │ ├── MethodsR.html │ ├── MethodsS.html │ ├── MethodsT.html │ ├── MethodsU.html │ ├── MethodsW.html │ ├── NoResults.html │ ├── TypesU.html │ ├── VariablesE.html │ ├── VariablesP.html │ ├── VariablesR.html │ ├── VariablesS.html │ └── VariablesSymbols.html │ └── styles │ └── main.css └── src ├── base ├── uvm_barrier.svh ├── uvm_base.svh ├── uvm_bottomup_phase.svh ├── uvm_callback.svh ├── uvm_cmdline_processor.svh ├── uvm_common_phases.svh ├── uvm_comparer.svh ├── uvm_component.svh ├── uvm_config_db.svh ├── uvm_copier.svh ├── uvm_coreservice.svh ├── uvm_domain.svh ├── uvm_event.svh ├── uvm_event_callback.svh ├── uvm_factory.svh ├── uvm_field_op.svh ├── uvm_globals.svh ├── uvm_heartbeat.svh ├── uvm_links.svh ├── uvm_misc.svh ├── uvm_object.svh ├── uvm_object_globals.svh ├── uvm_objection.svh ├── uvm_packer.svh ├── uvm_phase.svh ├── uvm_policy.svh ├── uvm_pool.svh ├── uvm_port_base.svh ├── uvm_printer.svh ├── uvm_queue.svh ├── uvm_recorder.svh ├── uvm_registry.svh ├── uvm_report_catcher.svh ├── uvm_report_handler.svh ├── uvm_report_message.svh ├── uvm_report_object.svh ├── uvm_report_server.svh ├── uvm_resource.svh ├── uvm_resource_base.svh ├── uvm_resource_db.svh ├── uvm_resource_db_options.svh ├── uvm_resource_specializations.svh ├── uvm_root.svh ├── uvm_run_test_callback.svh ├── uvm_runtime_phases.svh ├── uvm_spell_chkr.svh ├── uvm_task_phase.svh ├── uvm_text_tr_database.svh ├── uvm_text_tr_stream.svh ├── uvm_topdown_phase.svh ├── uvm_tr_database.svh ├── uvm_tr_stream.svh ├── uvm_transaction.svh ├── uvm_traversal.svh └── uvm_version.svh ├── comps ├── uvm_agent.svh ├── uvm_algorithmic_comparator.svh ├── uvm_comps.svh ├── uvm_driver.svh ├── uvm_env.svh ├── uvm_in_order_comparator.svh ├── uvm_monitor.svh ├── uvm_pair.svh ├── uvm_policies.svh ├── uvm_push_driver.svh ├── uvm_random_stimulus.svh ├── uvm_scoreboard.svh ├── uvm_subscriber.svh └── uvm_test.svh ├── dap ├── uvm_dap.svh ├── uvm_get_to_lock_dap.svh ├── uvm_set_before_get_dap.svh ├── uvm_set_get_dap_base.svh └── uvm_simple_lock_dap.svh ├── deprecated ├── macros │ ├── uvm_object_defines.svh │ └── uvm_sequence_defines.svh └── readme.important ├── dpi ├── uvm_common.c ├── uvm_dpi.cc ├── uvm_dpi.h ├── uvm_dpi.svh ├── uvm_hdl.c ├── uvm_hdl.svh ├── uvm_hdl_questa.c ├── uvm_hdl_vcs.c ├── uvm_hdl_xcelium.c ├── uvm_regex.cc ├── uvm_regex.svh ├── uvm_svcmd_dpi.c └── uvm_svcmd_dpi.svh ├── macros ├── uvm_callback_defines.svh ├── uvm_comparer_defines.svh ├── uvm_copier_defines.svh ├── uvm_global_defines.svh ├── uvm_message_defines.svh ├── uvm_object_defines.svh ├── uvm_packer_defines.svh ├── uvm_phase_defines.svh ├── uvm_printer_defines.svh ├── uvm_recorder_defines.svh ├── uvm_reg_defines.svh ├── uvm_resource_defines.svh ├── uvm_sequence_defines.svh ├── uvm_tlm_defines.svh ├── uvm_undefineall.svh └── uvm_version_defines.svh ├── reg ├── sequences │ ├── uvm_mem_access_seq.svh │ ├── uvm_mem_walk_seq.svh │ ├── uvm_reg_access_seq.svh │ ├── uvm_reg_bit_bash_seq.svh │ ├── uvm_reg_hw_reset_seq.svh │ ├── uvm_reg_mem_built_in_seq.svh │ ├── uvm_reg_mem_hdl_paths_seq.svh │ └── uvm_reg_mem_shared_access_seq.svh ├── uvm_mem.svh ├── uvm_mem_mam.svh ├── uvm_reg.svh ├── uvm_reg_adapter.svh ├── uvm_reg_backdoor.svh ├── uvm_reg_block.svh ├── uvm_reg_cbs.svh ├── uvm_reg_field.svh ├── uvm_reg_fifo.svh ├── uvm_reg_file.svh ├── uvm_reg_indirect.svh ├── uvm_reg_item.svh ├── uvm_reg_map.svh ├── uvm_reg_model.svh ├── uvm_reg_predictor.svh ├── uvm_reg_sequence.svh ├── uvm_vreg.svh └── uvm_vreg_field.svh ├── seq ├── uvm_push_sequencer.svh ├── uvm_seq.svh ├── uvm_sequence.svh ├── uvm_sequence_base.svh ├── uvm_sequence_item.svh ├── uvm_sequence_library.svh ├── uvm_sequencer.svh ├── uvm_sequencer_analysis_fifo.svh ├── uvm_sequencer_base.svh └── uvm_sequencer_param_base.svh ├── tlm1 ├── uvm_analysis_port.svh ├── uvm_exports.svh ├── uvm_imps.svh ├── uvm_ports.svh ├── uvm_sqr_connections.svh ├── uvm_sqr_ifs.svh ├── uvm_tlm.svh ├── uvm_tlm_fifo_base.svh ├── uvm_tlm_fifos.svh ├── uvm_tlm_ifs.svh ├── uvm_tlm_imps.svh └── uvm_tlm_req_rsp.svh ├── tlm2 ├── uvm_tlm2.svh ├── uvm_tlm2_defines.svh ├── uvm_tlm2_exports.svh ├── uvm_tlm2_generic_payload.svh ├── uvm_tlm2_ifs.svh ├── uvm_tlm2_imps.svh ├── uvm_tlm2_ports.svh ├── uvm_tlm2_sockets.svh ├── uvm_tlm2_sockets_base.svh └── uvm_tlm_time.svh ├── uvm.sv ├── uvm_macros.svh └── uvm_pkg.sv /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | This repo does not accept issues to modify base UVM support. Please 2 | contact [Accellera](https://www.accellera.org) to suggest UVM changes. 3 | 4 | If you are having issues with tools that use this library, please 5 | file issues under that tool's issue tracker. 6 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | This repo does not accept pull requests to modify base UVM support. Please 2 | contact [Accellera](https://www.accellera.org) to suggest UVM changes. 3 | -------------------------------------------------------------------------------- /.github/README.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | This repository contains all versions of the the Accellera Standard 4 | Universal Verification Methodology, for use as a submodule by projects 5 | requiring UVM for any simulator including Verilator. 6 | 7 | For installation etc, please see the [Accelera README](../README.md). 8 | 9 | # Purpose 10 | 11 | This is intended for use by: 12 | 13 | 1. Any project desiring UVM as a submodule. 14 | 15 | 2. All projects using UVM with [Verilator](https://verilator.org). Note 16 | Verilator UVM support is still in development. 17 | 18 | 3. The [SymbiFlow sv-tests](https://github.com/SymbiFlow/sv-tests) project. 19 | 20 | # Source Material 21 | 22 | This repository is hosted at https://github.com/chipsalliance/uvm-verilator. 23 | 24 | The repository code was downloaded from [Accellera Standard Universal 25 | Verification Methodology 26 | Downloads](https://www.accellera.org/downloads/standards/uvm). 27 | 28 | It also contains modifications for [Verilator](https://verilator.org). All 29 | such modifications have appropriate `ifdef annotations, and once proven are 30 | expected to be fed upstream into future new Accellera releases. 31 | 32 | # Tags 33 | 34 | GIT tags may be used to select the UVM version of interest: 35 | 36 | - master: default branch. Includes "stable" plus any released but potentially unstable features. 37 | - stable: most recent stable release. Currently points to "v2017-1.0". 38 | - standard: most recent Accellera standard release. Currently points to "v2017-1.0". 39 | - v2017-1.0: Accellera release 2018-11. 40 | - v2017-0.9: Accellera release 2018-06. 41 | - v1.2: Accellera release 2014-06. 42 | - v1.1d: Accellera release 2013-03. 43 | - v1.1c: Accellera release 2012-11. 44 | - v1.1b: Accellera release 2012-05. 45 | - v1.1a: Accellera release 2011-12. 46 | - v1.0p1: Accellera release 2011-02. 47 | 48 | # License 49 | 50 | SPDX-License-Identifier: Apache-2.0 51 | 52 | Copyright 2011-2017 Accellera 53 | 54 | Licensed under the Apache License, Version 2.0 (the "License"); you may not 55 | use this file except in compliance with the License. You may obtain a copy 56 | of the License at http://www.apache.org/licenses/LICENSE-2.0 57 | 58 | Unless required by applicable law or agreed to in writing, software 59 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 60 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 61 | License for the specific language governing permissions and limitations 62 | under the License. 63 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | core.* 3 | *.[oa] 4 | *.patch 5 | *.orig 6 | *.tar.gz 7 | *.diff 8 | *.BACKUP.* 9 | *.LOCAL.* 10 | *.REMOTE.* 11 | *.BASE.* 12 | *.d 13 | .ida* 14 | *.shm 15 | .lock 16 | 17 | 18 | # ius results are not for the vc 19 | irun.log 20 | INCA_libs 21 | .simvision 22 | irun.key 23 | xrun.log 24 | xcelium.d 25 | 26 | 27 | # created by flow 28 | *.fails 29 | qa 30 | *.post 31 | *.df 32 | .cmd.* 33 | .stderr.* 34 | .output.* 35 | .nfs* 36 | *.history 37 | 38 | 39 | 40 | # vcs results are not for the vc 41 | csrc 42 | simv* 43 | vc_hdrs.h 44 | ucli.key 45 | *.err 46 | 47 | # editor tmp / save files 48 | *.orig 49 | *.swp 50 | *.swo 51 | 52 | # questa results are not for the vc 53 | vsim.wlf 54 | wlf* 55 | questa.tops 56 | questa.fails* 57 | work 58 | *.vstf 59 | *.log 60 | transcript 61 | *.out 62 | 63 | # ND proj files 64 | uvm_ref/nd/Proj/Data/ 65 | uvm_ref/nd/Proj/Languages.txt 66 | uvm_ref/nd/Proj/LastCrash.txt 67 | uvm_ref/nd/Proj/Menu_Backup.txt 68 | uvm_ref/nd/Proj/Menu_save.txt 69 | uvm_ref/nd/Proj/Topics.txt 70 | 71 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | ========================================================================= 2 | == NOTICE file corresponding to section 4(d) of the Apache License, == 3 | == Version 2.0, in this case for the Apache Geronimo distribution. == 4 | ========================================================================= 5 | 6 | --- 7 | Portions of the UVM Reference Library were developed by: 8 | 9 | UVM Paradigm Works Notice 10 | Copyright 2010-2012 Paradigm Works. All rights reserved. 11 | --- 12 | Portions of the UVM Reference Library were developed by: 13 | 14 | UVM Aldec Notice 15 | Copyright 2012 Aldec. All rights reserved. 16 | --- 17 | Portions of the UVM Reference Library were developed by: 18 | 19 | UVM Mentor Graphics Corporation Notice 20 | Copyright 2007-2018 Mentor Graphics Corporation. All rights reserved. 21 | --- 22 | Portions of the UVM Reference Library were developed by: 23 | 24 | UVM Qualcomm, Inc. Notice 25 | Copyright 2018 Qualcomm, Inc.. All rights reserved. 26 | --- 27 | Portions of the UVM Reference Library were developed by: 28 | 29 | UVM Intel Corporation Notice 30 | Copyright 2014-2018 Intel Corporation. All rights reserved. 31 | --- 32 | Portions of the UVM Reference Library were developed by: 33 | 34 | UVM Analog Devices, Inc. Notice 35 | Copyright 2015 Analog Devices, Inc.. All rights reserved. 36 | --- 37 | Portions of the UVM Reference Library were developed by: 38 | 39 | UVM Semifore Notice 40 | Copyright 2011-2014 Semifore. All rights reserved. 41 | --- 42 | Portions of the UVM Reference Library were developed by: 43 | 44 | UVM Synopsys, Inc. Notice 45 | Copyright 2004-2018 Synopsys, Inc.. All rights reserved. 46 | --- 47 | Portions of the UVM Reference Library were developed by: 48 | 49 | UVM Cadence Design Systems, Inc. Notice 50 | Copyright 2007-2018 Cadence Design Systems, Inc.. All rights reserved. 51 | --- 52 | Portions of the UVM Reference Library were developed by: 53 | 54 | UVM Verilab Notice 55 | Copyright 2013 Verilab. All rights reserved. 56 | --- 57 | Portions of the UVM Reference Library were developed by: 58 | 59 | UVM AMD Notice 60 | Copyright 2010-2018 AMD. All rights reserved. 61 | --- 62 | Portions of the UVM Reference Library were developed by: 63 | 64 | UVM NVIDIA Corporation Notice 65 | Copyright 2012-2018 NVIDIA Corporation. All rights reserved. 66 | --- 67 | Portions of the UVM Reference Library were developed by: 68 | 69 | UVM Cisco Systems, Inc. Notice 70 | Copyright 2012-2018 Cisco Systems, Inc.. All rights reserved. 71 | --- 72 | Portions of the UVM Reference Library were developed by: 73 | 74 | UVM Cypress Semiconductor Corp. Notice 75 | Copyright 2011-2012 Cypress Semiconductor Corp.. All rights reserved. 76 | --- 77 | Portions of the UVM Reference Library were developed by: 78 | 79 | UVM Accellera Systems Initiative Notice 80 | Copyright 2012 Accellera Systems Initiative. All rights reserved. 81 | --- 82 | Portions of the UVM Reference Library were developed by: 83 | 84 | UVM Verific Notice 85 | Copyright 2017-2018 Verific. All rights reserved. 86 | -------------------------------------------------------------------------------- /docs/html/doc_src/overviews/intro.txt: -------------------------------------------------------------------------------- 1 | 2 | Title: UVM 1800.2-2017 Class Reference 3 | 4 | This library implements the API as documented in the IEEE 1800.2-2017 standard. Documentation for that API is in the standard. In addition, this library also implements user-facing APIs that go beyond the standard. 5 | 6 | These APIs are documented here and include both APIs that are being considered for contribution to the IEEE by Accellera and APIs that are provided for debug purposes and not being considered for contribution to the IEEE. 7 | 8 | The documentation uses the tags "@uvm-contrib" and "@uvm-accellera" to differentiate between the two sets of APIs. 9 | 10 | An additional note, certain terms in the documentation may be surrounded by less than/greater than symbols, such as "". This is an indication that the documentation is referring to a construct defined in the 1800.2 LRM. 11 | -------------------------------------------------------------------------------- /docs/html/doc_src/overviews/legal.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chipsalliance/uvm-verilator/795b5f263c5d440c26e6d3598b406d44dd23fbd9/docs/html/doc_src/overviews/legal.txt -------------------------------------------------------------------------------- /docs/html/files/base/uvm_object_globals-svh.html: -------------------------------------------------------------------------------- 1 | uvm_core_state 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 |

uvm_core_state

Implementation of the uvm_core_state enumeration, as defined in section F.2.10 of 1800.2-2017.

Note: In addition to the states defined in section F.2.10, this implementation includes the following additional states.

UVM_CORE_PRE_INITThe uvm_init method has been invoked at least once, however the core service has yet to be determined/assigned.  Additional calls to uvm_init while in this state will result in a fatal message being generated, as the library can not determine the correct core service.
UVM_CORE_INITIALIZINGThe uvm_init method has been called at least once, and the core service has been determined.  Once in this state, it is safe to query <uvm_coreservice_t::get>.
UVM_CORE_POST_INITIncluded for consistency, this is equivalent to UVM_CORE_INITIALIZED in 1800.2-2017.

@uvm-contrib Potential contribution to 1800.2

22 | 23 | 24 |
Summary
25 | 26 | 27 | 28 |
uvm_core_state
Implementation of the uvm_core_state enumeration, as defined in section F.2.10 of 1800.2-2017.
29 |
30 | 31 |
32 | 33 | 34 | 35 | 36 |
Implementation of uvm_init, as defined in section F.3.1.3 in 1800.2-2017.
37 | 38 | -------------------------------------------------------------------------------- /docs/html/files/macros/uvm_packer_defines-svh.html: -------------------------------------------------------------------------------- 1 | Packing Macros 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 |

Packing Macros

The packing macros are implemented as described in section B.2.4 of the 1800.2 specification.

The Accellera implementation adds an additional PACKER argument to these macros with a default value of ‘packer’.  This allows the macros to be used in environments with alternative packer names.

For example, <`uvm_pack_intN> is defined in the LRM as

`define uvm_pack_intN(VAR,SIZE)

Whereas the implementation is

`define uvm_pack_intN(VAR,SIZE,PACKER=packer)

This allows for usage such as

function void pack_foo( uvm_packer other_packer );
22 |   `uvm_pack_intN(foo, 32, other_packer)
23 | endfunction : pack_foo

@uvm-contrib This API is being considered for potential contribution to 1800.2

24 | 25 | 26 |
Summary
27 | 28 | 29 | 30 |
Packing Macros
The packing macros are implemented as described in section B.2.4 of the 1800.2 specification.
31 |
32 | 33 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /docs/html/files/macros/uvm_recorder_defines-svh.html: -------------------------------------------------------------------------------- 1 | Recording Macros 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 |

Recording Macros

The recording macros are implemented as described in section B.2.3 of the 1800.2 specification.

The Accellera implementation adds an additional RECORDER argument to these macros with a default value of ‘recorder’.  This allows the macros to be used in environments with alternative recorder names.

For example, <`uvm_record_string> is defined in the LRM as

`define uvm_record_string(NAME,VALUE)

Whereas the implementation is

`define uvm_record_string(NAME,VALUE,RECORDER=recorder)

This allows for usage such as

function void record_foo( uvm_packer other_recorder );
22 |   `uvm_record_string("foo", foo, other_recorder)
23 | endfunction : record_foo

@uvm-contrib This API is being considered for potential contribution to 1800.2

24 | 25 | 26 |
Summary
27 | 28 | 29 | 30 |
Recording Macros
The recording macros are implemented as described in section B.2.3 of the 1800.2 specification.
31 |
32 | 33 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /docs/html/files/seq/uvm_sequence_base-svh.html: -------------------------------------------------------------------------------- 1 | uvm_sequence_base 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 |

uvm_sequence_base

Implementation of uvm_sequence_base, as defined in section 14.2.1 of 1800.2-2017.

22 | 23 | 24 |
Summary
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
uvm_sequence_base
Implementation of uvm_sequence_base, as defined in section 14.2.1 of 1800.2-2017.
Methods
do_killImplementation of the do_kill method, as described in P1800.2-2017 section 14.2.6.12.
35 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |

do_kill

Implementation of the do_kill method, as described in P1800.2-2017 section 14.2.6.12.

NOTE: do_kill is documented in error in the P1800.2-2017 LRM as a non-virtual function, whereas it is implemented as a virtual function

virtual function void do_kill()

@uvm-contrib This API is being considered for potential contribution to 1800.2

48 | 49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /docs/html/files2/overviews/intro-txt.html: -------------------------------------------------------------------------------- 1 | UVM 1800.2-2017 Class Reference 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 |

UVM 1800. 2-2017 Class Reference

This library implements the API as documented in the IEEE 1800.2-2017 standard.  Documentation for that API is in the standard.  In addition, this library also implements user-facing APIs that go beyond the standard.

These APIs are documented here and include both APIs that are being considered for contribution to the IEEE by Accellera and APIs that are provided for debug purposes and not being considered for contribution to the IEEE.

The documentation uses the tags “@uvm-contrib” and “@uvm-accellera” to differentiate between the two sets of APIs.

An additional note, certain terms in the documentation may be surrounded by less than/greater than symbols, such as “<uvm_object>”.  This is an indication that the documentation is referring to a construct defined in the 1800.2 LRM.

22 | 23 | 24 |
Summary
25 | 26 | 27 | 28 |
UVM 1800. 2-2017 Class Reference
This library implements the API as documented in the IEEE 1800.2-2017 standard.
29 |
30 | 31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /docs/html/images/bg_column_green.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chipsalliance/uvm-verilator/795b5f263c5d440c26e6d3598b406d44dd23fbd9/docs/html/images/bg_column_green.gif -------------------------------------------------------------------------------- /docs/html/images/bg_column_green_grey.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chipsalliance/uvm-verilator/795b5f263c5d440c26e6d3598b406d44dd23fbd9/docs/html/images/bg_column_green_grey.gif -------------------------------------------------------------------------------- /docs/html/images/bg_feature.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chipsalliance/uvm-verilator/795b5f263c5d440c26e6d3598b406d44dd23fbd9/docs/html/images/bg_feature.jpg -------------------------------------------------------------------------------- /docs/html/images/bg_h3_roundcorners.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chipsalliance/uvm-verilator/795b5f263c5d440c26e6d3598b406d44dd23fbd9/docs/html/images/bg_h3_roundcorners.gif -------------------------------------------------------------------------------- /docs/html/images/bg_main.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chipsalliance/uvm-verilator/795b5f263c5d440c26e6d3598b406d44dd23fbd9/docs/html/images/bg_main.gif -------------------------------------------------------------------------------- /docs/html/images/bg_masthead.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chipsalliance/uvm-verilator/795b5f263c5d440c26e6d3598b406d44dd23fbd9/docs/html/images/bg_masthead.jpg -------------------------------------------------------------------------------- /docs/html/images/bg_navbar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chipsalliance/uvm-verilator/795b5f263c5d440c26e6d3598b406d44dd23fbd9/docs/html/images/bg_navbar.gif -------------------------------------------------------------------------------- /docs/html/images/bg_roundcorners2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chipsalliance/uvm-verilator/795b5f263c5d440c26e6d3598b406d44dd23fbd9/docs/html/images/bg_roundcorners2.gif -------------------------------------------------------------------------------- /docs/html/images/bg_tableheader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chipsalliance/uvm-verilator/795b5f263c5d440c26e6d3598b406d44dd23fbd9/docs/html/images/bg_tableheader.gif -------------------------------------------------------------------------------- /docs/html/images/bg_thick_grey_bar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chipsalliance/uvm-verilator/795b5f263c5d440c26e6d3598b406d44dd23fbd9/docs/html/images/bg_thick_grey_bar.gif -------------------------------------------------------------------------------- /docs/html/images/bullet_GreenOnGrey.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chipsalliance/uvm-verilator/795b5f263c5d440c26e6d3598b406d44dd23fbd9/docs/html/images/bullet_GreenOnGrey.gif -------------------------------------------------------------------------------- /docs/html/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | This documentation was designed for use with frames. However, you can still use it by 27 | <a href="menu.html">starting from the menu page</a>. 28 | <script language=JavaScript><!-- 29 | 30 | location.href="menu.html"; 31 | 32 | // --></script> 33 | 34 | -------------------------------------------------------------------------------- /docs/html/index/Files.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | File Index 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
File Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
19 |
U
 uvm_component.svh
 uvm_globals.svh
 uvm_printer
20 | 21 | 22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/html/index/Macros.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Macro Index 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Macro Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
19 |
U
 UVM_DISABLE_AUTO_ITEM_RECORDING
20 | 21 |
Performs the same function as the 1800.2 define UVM_DISABLE_RECORDING, globally turning off automatic item recording when defined by the user.
22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/html/index/Types.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Type Index 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Type Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
19 |
U
 uvm_core_state
20 | 21 |
Implementation of the uvm_core_state enumeration, as defined in section F.2.10 of 1800.2-2017.
22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/html/logo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Menu - 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 20 |
21 | 22 | 23 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/FilesU.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 |
Searching...
No Matches
27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/html/search/GeneralA.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 |
Searching...
No Matches
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/GeneralC.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 | 22 |
Searching...
No Matches
28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/html/search/GeneralE.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 |
Searching...
No Matches
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/GeneralF.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 |
Searching...
No Matches
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/GeneralI.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 | 22 |
Searching...
No Matches
28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/html/search/GeneralN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 |
Searching...
No Matches
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/GeneralNumbers.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 |
Searching...
No Matches
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/GeneralP.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 | 22 | 23 | 24 | 25 |
Searching...
No Matches
31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/html/search/GeneralR.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
Searching...
No Matches
33 | 34 | 35 | -------------------------------------------------------------------------------- /docs/html/search/GeneralS.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 | 22 | 23 | 24 | 25 |
Searching...
No Matches
31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/html/search/GeneralSymbols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 | 22 | 23 |
Searching...
No Matches
29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/GeneralT.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 |
Searching...
No Matches
26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/html/search/GeneralV.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 |
Searching...
No Matches
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/GeneralW.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 |
Searching...
No Matches
27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/html/search/MacrosU.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 |
Searching...
No Matches
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/MethodsC.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 |
Searching...
No Matches
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/MethodsI.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 |
Searching...
No Matches
26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/html/search/MethodsN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 |
Searching...
No Matches
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/MethodsP.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 | 22 |
Searching...
No Matches
28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/html/search/MethodsR.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 | 22 | 23 |
Searching...
No Matches
29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/MethodsS.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 | 22 | 23 |
Searching...
No Matches
29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/MethodsT.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 |
Searching...
No Matches
26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/html/search/MethodsU.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 | 22 | 23 |
Searching...
No Matches
29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/MethodsW.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 |
Searching...
No Matches
27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/html/search/NoResults.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
No Matches
19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/html/search/TypesU.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 |
Searching...
No Matches
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/VariablesE.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 |
Searching...
No Matches
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/VariablesP.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 |
Searching...
No Matches
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/VariablesR.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 |
Searching...
No Matches
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/html/search/VariablesS.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 |
Searching...
No Matches
26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/html/search/VariablesSymbols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Search Results
Loading...
19 | 20 | 21 | 22 | 23 |
Searching...
No Matches
29 | 30 | 31 | -------------------------------------------------------------------------------- /src/base/uvm_base.svh: -------------------------------------------------------------------------------- 1 | // 2 | //---------------------------------------------------------------------- 3 | // Copyright 2007-2018 Cadence Design Systems, Inc. 4 | // Copyright 2007-2011 Mentor Graphics Corporation 5 | // Copyright 2010-2012 AMD 6 | // Copyright 2013-2018 NVIDIA Corporation 7 | // Copyright 2017 Cisco Systems, Inc. 8 | // Copyright 2011 Cypress Semiconductor Corp. 9 | // Copyright 2010-2018 Synopsys, Inc. 10 | // All Rights Reserved Worldwide 11 | // 12 | // Licensed under the Apache License, Version 2.0 (the 13 | // "License"); you may not use this file except in 14 | // compliance with the License. You may obtain a copy of 15 | // the License at 16 | // 17 | // http://www.apache.org/licenses/LICENSE-2.0 18 | // 19 | // Unless required by applicable law or agreed to in 20 | // writing, software distributed under the License is 21 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 22 | // CONDITIONS OF ANY KIND, either express or implied. See 23 | // the License for the specific language governing 24 | // permissions and limitations under the License. 25 | //---------------------------------------------------------------------- 26 | 27 | `ifndef UVM_BASE_SVH 28 | `define UVM_BASE_SVH 29 | 30 | typedef class uvm_cmdline_processor; 31 | 32 | 33 | 34 | // Miscellaneous classes and functions. uvm_void is defined in uvm_misc, 35 | // along with some auxillary functions that UVM needs but are not really 36 | // part of UVM. 37 | `include "base/uvm_version.svh" 38 | `include "base/uvm_object_globals.svh" 39 | `include "base/uvm_misc.svh" 40 | 41 | `include "base/uvm_coreservice.svh" 42 | `include "base/uvm_globals.svh" 43 | 44 | 45 | // The base object element. Contains data methods (, etc) and 46 | // factory creation methods (). Also includes control classes. 47 | `include "base/uvm_object.svh" 48 | 49 | `include "base/uvm_factory.svh" 50 | `include "base/uvm_registry.svh" 51 | 52 | `include "base/uvm_pool.svh" 53 | `include "base/uvm_queue.svh" 54 | 55 | 56 | // Resources/configuration facility 57 | `include "base/uvm_spell_chkr.svh" 58 | `include "base/uvm_resource_base.svh" 59 | `include "base/uvm_resource.svh" 60 | `include "base/uvm_resource_specializations.svh" 61 | `include "base/uvm_resource_db.svh" 62 | `include "base/uvm_resource_db_options.svh" 63 | `include "base/uvm_config_db.svh" 64 | 65 | 66 | // Policies 67 | `include "base/uvm_policy.svh" 68 | `include "base/uvm_field_op.svh" 69 | `include "base/uvm_copier.svh" 70 | `include "base/uvm_printer.svh" 71 | `include "base/uvm_comparer.svh" 72 | `include "base/uvm_packer.svh" 73 | `include "base/uvm_links.svh" 74 | `include "base/uvm_tr_database.svh" 75 | `include "base/uvm_text_tr_database.svh" 76 | `include "base/uvm_tr_stream.svh" 77 | `include "base/uvm_text_tr_stream.svh" 78 | `include "base/uvm_recorder.svh" 79 | 80 | // Event interface 81 | `include "base/uvm_event_callback.svh" 82 | `include "base/uvm_event.svh" 83 | `include "base/uvm_barrier.svh" 84 | 85 | // Callback interface 86 | `include "base/uvm_callback.svh" 87 | 88 | // Reporting interface 89 | `include "base/uvm_report_message.svh" 90 | `include "base/uvm_report_catcher.svh" 91 | `include "base/uvm_report_server.svh" 92 | `include "base/uvm_report_handler.svh" 93 | `include "base/uvm_report_object.svh" 94 | 95 | // Base transaction object 96 | `include "base/uvm_transaction.svh" 97 | 98 | // The phase declarations 99 | `include "base/uvm_phase.svh" 100 | `include "base/uvm_domain.svh" 101 | `include "base/uvm_bottomup_phase.svh" 102 | `include "base/uvm_topdown_phase.svh" 103 | `include "base/uvm_task_phase.svh" 104 | `include "base/uvm_common_phases.svh" 105 | `include "base/uvm_runtime_phases.svh" 106 | 107 | `include "base/uvm_run_test_callback.svh" 108 | `include "base/uvm_component.svh" 109 | 110 | // Objection interface 111 | `include "base/uvm_objection.svh" 112 | `include "base/uvm_heartbeat.svh" 113 | 114 | 115 | // Command Line Processor 116 | `include "base/uvm_cmdline_processor.svh" 117 | 118 | // traversal utilities 119 | `include "base/uvm_traversal.svh" 120 | 121 | `endif // UVM_BASE_SVH 122 | -------------------------------------------------------------------------------- /src/base/uvm_bottomup_phase.svh: -------------------------------------------------------------------------------- 1 | // 2 | //---------------------------------------------------------------------- 3 | // Copyright 2007-2018 Cadence Design Systems, Inc. 4 | // Copyright 2007-2011 Mentor Graphics Corporation 5 | // Copyright 2011 AMD 6 | // Copyright 2015 NVIDIA Corporation 7 | // All Rights Reserved Worldwide 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the 10 | // "License"); you may not use this file except in 11 | // compliance with the License. You may obtain a copy of 12 | // the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in 17 | // writing, software distributed under the License is 18 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 19 | // CONDITIONS OF ANY KIND, either express or implied. See 20 | // the License for the specific language governing 21 | // permissions and limitations under the License. 22 | //---------------------------------------------------------------------- 23 | 24 | //------------------------------------------------------------------------------ 25 | // 26 | // Class -- NODOCS -- uvm_bottomup_phase 27 | // 28 | //------------------------------------------------------------------------------ 29 | // Virtual base class for function phases that operate bottom-up. 30 | // The pure virtual function execute() is called for each component. 31 | // This is the default traversal so is included only for naming. 32 | // 33 | // A bottom-up function phase completes when the method 34 | // has been called and returned on all applicable components 35 | // in the hierarchy. 36 | 37 | // @uvm-ieee 1800.2-2017 auto 9.5.1 38 | virtual class uvm_bottomup_phase extends uvm_phase; 39 | 40 | 41 | // @uvm-ieee 1800.2-2017 auto 9.5.2.1 42 | function new(string name); 43 | super.new(name,UVM_PHASE_IMP); 44 | endfunction 45 | 46 | 47 | 48 | // @uvm-ieee 1800.2-2017 auto 9.5.2.2 49 | virtual function void traverse(uvm_component comp, 50 | uvm_phase phase, 51 | uvm_phase_state state); 52 | string name; 53 | uvm_domain phase_domain =phase.get_domain(); 54 | uvm_domain comp_domain = comp.get_domain(); 55 | 56 | if (comp.get_first_child(name)) 57 | do 58 | traverse(comp.get_child(name), phase, state); 59 | while(comp.get_next_child(name)); 60 | 61 | if (m_phase_trace) 62 | `uvm_info("PH_TRACE",$sformatf("bottomup-phase phase=%s state=%s comp=%s comp.domain=%s phase.domain=%s", 63 | phase.get_name(), state.name(), comp.get_full_name(),comp_domain.get_name(),phase_domain.get_name()), 64 | UVM_DEBUG) 65 | 66 | if (phase_domain == uvm_domain::get_common_domain() || 67 | phase_domain == comp_domain) begin 68 | case (state) 69 | UVM_PHASE_STARTED: begin 70 | comp.m_current_phase = phase; 71 | comp.m_apply_verbosity_settings(phase); 72 | comp.phase_started(phase); 73 | end 74 | UVM_PHASE_EXECUTING: begin 75 | uvm_phase ph = this; 76 | if (comp.m_phase_imps.exists(this)) 77 | ph = comp.m_phase_imps[this]; 78 | ph.execute(comp, phase); 79 | end 80 | UVM_PHASE_READY_TO_END: begin 81 | comp.phase_ready_to_end(phase); 82 | end 83 | UVM_PHASE_ENDED: begin 84 | comp.phase_ended(phase); 85 | comp.m_current_phase = null; 86 | end 87 | default: 88 | `uvm_fatal("PH_BADEXEC","bottomup phase traverse internal error") 89 | endcase 90 | end 91 | endfunction 92 | 93 | 94 | 95 | // @uvm-ieee 1800.2-2017 auto 9.5.2.3 96 | virtual function void execute(uvm_component comp, 97 | uvm_phase phase); 98 | // reseed this process for random stability 99 | process proc = process::self(); 100 | proc.srandom(uvm_create_random_seed(phase.get_type_name(), comp.get_full_name())); 101 | 102 | comp.m_current_phase = phase; 103 | exec_func(comp,phase); 104 | endfunction 105 | 106 | endclass 107 | -------------------------------------------------------------------------------- /src/base/uvm_event_callback.svh: -------------------------------------------------------------------------------- 1 | // 2 | //------------------------------------------------------------------------------ 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2007-2018 Cadence Design Systems, Inc. 5 | // Copyright 2013-2018 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //------------------------------------------------------------------------------ 22 | 23 | typedef class uvm_object; 24 | typedef class uvm_event; 25 | typedef class uvm_callback; 26 | typedef class uvm_callbacks; 27 | 28 | //------------------------------------------------------------------------------ 29 | // 30 | // CLASS -- NODOCS -- uvm_event_callback 31 | // 32 | // The uvm_event_callback class is an abstract class that is used to create 33 | // callback objects which may be attached to s. To use, you 34 | // derive a new class and override any or both and . 35 | // 36 | // Callbacks are an alternative to using processes that wait on events. When a 37 | // callback is attached to an event, that callback object's callback function 38 | // is called each time the event is triggered. 39 | // 40 | //------------------------------------------------------------------------------ 41 | 42 | // @uvm-ieee 1800.2-2017 auto 10.2.1 43 | virtual class uvm_event_callback#(type T=uvm_object) extends uvm_callback; 44 | 45 | // Function -- NODOCS -- new 46 | // 47 | // Creates a new callback object. 48 | 49 | // @uvm-ieee 1800.2-2017 auto 10.2.2.1 50 | function new (string name=""); 51 | super.new(name); 52 | endfunction 53 | 54 | 55 | // Function -- NODOCS -- pre_trigger 56 | // 57 | // This callback is called just before triggering the associated event. 58 | // In a derived class, override this method to implement any pre-trigger 59 | // functionality. 60 | // 61 | // If your callback returns 1, then the event will not trigger and the 62 | // post-trigger callback is not called. This provides a way for a callback 63 | // to prevent the event from triggering. 64 | // 65 | // In the function, ~e~ is the that is being triggered, and ~data~ 66 | // is the optional data associated with the event trigger. 67 | 68 | // @uvm-ieee 1800.2-2017 auto 10.2.2.2 69 | virtual function bit pre_trigger (uvm_event#(T) e, T data); 70 | return 0; 71 | endfunction 72 | 73 | 74 | // Function -- NODOCS -- post_trigger 75 | // 76 | // This callback is called after triggering the associated event. 77 | // In a derived class, override this method to implement any post-trigger 78 | // functionality. 79 | // 80 | // 81 | // In the function, ~e~ is the that is being triggered, and ~data~ 82 | // is the optional data associated with the event trigger. 83 | 84 | // @uvm-ieee 1800.2-2017 auto 10.2.2.3 85 | virtual function void post_trigger (uvm_event#(T) e, T data); 86 | return; 87 | endfunction 88 | 89 | 90 | virtual function uvm_object create (string name=""); 91 | return null; 92 | endfunction 93 | 94 | endclass 95 | -------------------------------------------------------------------------------- /src/base/uvm_resource_db_options.svh: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2018 Cadence Design Systems, Inc. 3 | // Copyright 2018 NVIDIA Corporation 4 | // Copyright 2017 Cisco Systems, Inc. 5 | // All Rights Reserved Worldwide 6 | // 7 | // Licensed under the Apache License, Version 2.0 (the 8 | // "License"); you may not use this file except in 9 | // compliance with the License. You may obtain a copy of 10 | // the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in 15 | // writing, software distributed under the License is 16 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 17 | // CONDITIONS OF ANY KIND, either express or implied. See 18 | // the License for the specific language governing 19 | // permissions and limitations under the License. 20 | //---------------------------------------------------------------------- 21 | 22 | //---------------------------------------------------------------------- 23 | // Title -- NODOCS -- UVM Resource Database 24 | // 25 | // Topic: Intro 26 | // 27 | // The class provides a convenience interface for 28 | // the resources facility. In many cases basic operations such as 29 | // creating and setting a resource or getting a resource could take 30 | // multiple lines of code using the interfaces in or 31 | // . The convenience layer in 32 | // reduces many of those operations to a single line of code. 33 | // 34 | // If the run-time ~+UVM_RESOURCE_DB_TRACE~ command line option is 35 | // specified, all resource DB accesses (read and write) are displayed. 36 | //---------------------------------------------------------------------- 37 | 38 | 39 | 40 | //---------------------------------------------------------------------- 41 | // Class: uvm_resource_db_options 42 | // 43 | // This class contains static functions for manipulating and 44 | // retrieving options that control the behavior of the 45 | // resources DB facility. 46 | // 47 | // @uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2 48 | //---------------------------------------------------------------------- 49 | class uvm_resource_db_options; 50 | 51 | static local bit ready; 52 | static local bit tracing; 53 | 54 | // Function: turn_on_tracing 55 | // 56 | // Turn tracing on for the resource database. This causes all 57 | // reads and writes to the database to display information about 58 | // the accesses. Tracing is off by default. 59 | // 60 | // This method is implicitly called by the ~+UVM_RESOURCE_DB_TRACE~. 61 | // 62 | // @uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2 63 | 64 | 65 | static function void turn_on_tracing(); 66 | if (!ready) init(); 67 | tracing = 1; 68 | endfunction 69 | 70 | // Function: turn_off_tracing 71 | // 72 | // Turn tracing off for the resource database. 73 | // 74 | // @uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2 75 | 76 | 77 | static function void turn_off_tracing(); 78 | if (!ready) init(); 79 | tracing = 0; 80 | endfunction 81 | 82 | // Function: is_tracing 83 | // 84 | // Returns 1 if the tracing facility is on and 0 if it is off. 85 | // 86 | // @uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2 87 | 88 | 89 | static function bit is_tracing(); 90 | if (!ready) init(); 91 | return tracing; 92 | endfunction 93 | 94 | 95 | static local function void init(); 96 | uvm_cmdline_processor clp; 97 | string trace_args[$]; 98 | 99 | clp = uvm_cmdline_processor::get_inst(); 100 | 101 | if (clp.get_arg_matches("+UVM_RESOURCE_DB_TRACE", trace_args)) begin 102 | tracing = 1; 103 | end 104 | 105 | ready = 1; 106 | endfunction 107 | 108 | endclass 109 | -------------------------------------------------------------------------------- /src/base/uvm_topdown_phase.svh: -------------------------------------------------------------------------------- 1 | // 2 | //---------------------------------------------------------------------- 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2007-2018 Cadence Design Systems, Inc. 5 | // Copyright 2011 AMD 6 | // Copyright 2015 NVIDIA Corporation 7 | // All Rights Reserved Worldwide 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the 10 | // "License"); you may not use this file except in 11 | // compliance with the License. You may obtain a copy of 12 | // the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in 17 | // writing, software distributed under the License is 18 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 19 | // CONDITIONS OF ANY KIND, either express or implied. See 20 | // the License for the specific language governing 21 | // permissions and limitations under the License. 22 | //---------------------------------------------------------------------- 23 | 24 | //------------------------------------------------------------------------------ 25 | // 26 | // Class -- NODOCS -- uvm_topdown_phase 27 | // 28 | //------------------------------------------------------------------------------ 29 | // Virtual base class for function phases that operate top-down. 30 | // The pure virtual function execute() is called for each component. 31 | // 32 | // A top-down function phase completes when the method 33 | // has been called and returned on all applicable components 34 | // in the hierarchy. 35 | 36 | // @uvm-ieee 1800.2-2017 auto 9.7.1 37 | virtual class uvm_topdown_phase extends uvm_phase; 38 | 39 | 40 | 41 | // @uvm-ieee 1800.2-2017 auto 9.7.2.1 42 | function new(string name); 43 | super.new(name,UVM_PHASE_IMP); 44 | endfunction 45 | 46 | 47 | 48 | // @uvm-ieee 1800.2-2017 auto 9.7.2.2 49 | virtual function void traverse(uvm_component comp, 50 | uvm_phase phase, 51 | uvm_phase_state state); 52 | string name; 53 | uvm_domain phase_domain = phase.get_domain(); 54 | uvm_domain comp_domain = comp.get_domain(); 55 | 56 | if (m_phase_trace) 57 | `uvm_info("PH_TRACE",$sformatf("topdown-phase phase=%s state=%s comp=%s comp.domain=%s phase.domain=%s", 58 | phase.get_name(), state.name(), comp.get_full_name(),comp_domain.get_name(),phase_domain.get_name()), 59 | UVM_DEBUG) 60 | 61 | if (phase_domain == uvm_domain::get_common_domain() || 62 | phase_domain == comp_domain) begin 63 | case (state) 64 | UVM_PHASE_STARTED: begin 65 | comp.m_current_phase = phase; 66 | comp.m_apply_verbosity_settings(phase); 67 | comp.phase_started(phase); 68 | end 69 | UVM_PHASE_EXECUTING: begin 70 | if (!(phase.get_name() == "build" && comp.m_build_done)) begin 71 | uvm_phase ph = this; 72 | comp.m_phasing_active++; 73 | if (comp.m_phase_imps.exists(this)) 74 | ph = comp.m_phase_imps[this]; 75 | ph.execute(comp, phase); 76 | comp.m_phasing_active--; 77 | end 78 | end 79 | UVM_PHASE_READY_TO_END: begin 80 | comp.phase_ready_to_end(phase); 81 | end 82 | UVM_PHASE_ENDED: begin 83 | comp.phase_ended(phase); 84 | comp.m_current_phase = null; 85 | end 86 | default: 87 | `uvm_fatal("PH_BADEXEC","topdown phase traverse internal error") 88 | endcase 89 | end 90 | if(comp.get_first_child(name)) 91 | do 92 | traverse(comp.get_child(name), phase, state); 93 | while(comp.get_next_child(name)); 94 | endfunction 95 | 96 | 97 | 98 | // @uvm-ieee 1800.2-2017 auto 9.7.2.3 99 | virtual function void execute(uvm_component comp, 100 | uvm_phase phase); 101 | // reseed this process for random stability 102 | process proc = process::self(); 103 | proc.srandom(uvm_create_random_seed(phase.get_type_name(), comp.get_full_name())); 104 | 105 | comp.m_current_phase = phase; 106 | exec_func(comp,phase); 107 | endfunction 108 | 109 | endclass 110 | -------------------------------------------------------------------------------- /src/base/uvm_version.svh: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2012 Paradigm Works 3 | // Copyright 2007-2013 Mentor Graphics Corporation 4 | // Copyright 2010-2011 Synopsys, Inc. 5 | // Copyright 2007-2018 Cadence Design Systems, Inc. 6 | // Copyright 2010 AMD 7 | // Copyright 2013-2018 NVIDIA Corporation 8 | // Copyright 2017 Cisco Systems, Inc. 9 | // Copyright 2011-2012 Cypress Semiconductor Corp. 10 | // All Rights Reserved Worldwide 11 | // 12 | // Licensed under the Apache License, Version 2.0 (the 13 | // "License"); you may not use this file except in 14 | // compliance with the License. You may obtain a copy of 15 | // the License at 16 | // 17 | // http://www.apache.org/licenses/LICENSE-2.0 18 | // 19 | // Unless required by applicable law or agreed to in 20 | // writing, software distributed under the License is 21 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 22 | // CONDITIONS OF ANY KIND, either express or implied. See 23 | // the License for the specific language governing 24 | // permissions and limitations under the License. 25 | //---------------------------------------------------------------------- 26 | 27 | `ifndef UVM_VERSION_SVH 28 | `define UVM_VERSION_SVH 29 | 30 | parameter string UVM_VERSION_STRING = "Accellera:1800.2-2017:UVM:1.0"; 31 | 32 | `ifdef UVM_ENABLE_DEPRECATED_API 33 | parameter string uvm_revision = UVM_VERSION_STRING; 34 | `endif // UVM_ENABLE_DEPRECATED_API 35 | 36 | function string uvm_revision_string(); 37 | return UVM_VERSION_STRING; 38 | endfunction 39 | 40 | `endif // UVM_VERSION_SVH 41 | -------------------------------------------------------------------------------- /src/comps/uvm_comps.svh: -------------------------------------------------------------------------------- 1 | // 2 | //------------------------------------------------------------------------------ 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2010 Synopsys, Inc. 5 | // Copyright 2007-2018 Cadence Design Systems, Inc. 6 | // Copyright 2010 AMD 7 | // Copyright 2017 Cisco Systems, Inc. 8 | // All Rights Reserved Worldwide 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the 11 | // "License"); you may not use this file except in 12 | // compliance with the License. You may obtain a copy of 13 | // the License at 14 | // 15 | // http://www.apache.org/licenses/LICENSE-2.0 16 | // 17 | // Unless required by applicable law or agreed to in 18 | // writing, software distributed under the License is 19 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 20 | // CONDITIONS OF ANY KIND, either express or implied. See 21 | // the License for the specific language governing 22 | // permissions and limitations under the License. 23 | //------------------------------------------------------------------------------ 24 | 25 | `include "comps/uvm_pair.svh" 26 | `include "comps/uvm_policies.svh" 27 | `include "comps/uvm_in_order_comparator.svh" 28 | `include "comps/uvm_algorithmic_comparator.svh" 29 | `ifdef UVM_ENABLE_DEPRECATED_API 30 | `include "comps/uvm_random_stimulus.svh" 31 | `endif 32 | `include "comps/uvm_subscriber.svh" 33 | 34 | `include "comps/uvm_monitor.svh" 35 | `include "comps/uvm_driver.svh" 36 | `include "comps/uvm_push_driver.svh" 37 | `include "comps/uvm_scoreboard.svh" 38 | `include "comps/uvm_agent.svh" 39 | `include "comps/uvm_env.svh" 40 | `include "comps/uvm_test.svh" 41 | -------------------------------------------------------------------------------- /src/comps/uvm_driver.svh: -------------------------------------------------------------------------------- 1 | // 2 | //------------------------------------------------------------------------------ 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2013 Synopsys, Inc. 5 | // Copyright 2007-2018 Cadence Design Systems, Inc. 6 | // Copyright 2015-2018 NVIDIA Corporation 7 | // Copyright 2012 Accellera Systems Initiative 8 | // All Rights Reserved Worldwide 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the 11 | // "License"); you may not use this file except in 12 | // compliance with the License. You may obtain a copy of 13 | // the License at 14 | // 15 | // http://www.apache.org/licenses/LICENSE-2.0 16 | // 17 | // Unless required by applicable law or agreed to in 18 | // writing, software distributed under the License is 19 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 20 | // CONDITIONS OF ANY KIND, either express or implied. See 21 | // the License for the specific language governing 22 | // permissions and limitations under the License. 23 | //------------------------------------------------------------------------------ 24 | 25 | typedef class uvm_sequence_item; 26 | 27 | //------------------------------------------------------------------------------ 28 | // 29 | // CLASS -- NODOCS -- uvm_driver #(REQ,RSP) 30 | // 31 | // The base class for drivers that initiate requests for new transactions via 32 | // a uvm_seq_item_pull_port. The ports are typically connected to the exports of 33 | // an appropriate sequencer component. 34 | // 35 | // This driver operates in pull mode. Its ports are typically connected to the 36 | // corresponding exports in a pull sequencer as follows: 37 | // 38 | //| driver.seq_item_port.connect(sequencer.seq_item_export); 39 | //| driver.rsp_port.connect(sequencer.rsp_export); 40 | // 41 | // The ~rsp_port~ needs connecting only if the driver will use it to write 42 | // responses to the analysis export in the sequencer. 43 | // 44 | //------------------------------------------------------------------------------ 45 | 46 | // @uvm-ieee 1800.2-2017 auto 13.7.1 47 | class uvm_driver #(type REQ=uvm_sequence_item, 48 | type RSP=REQ) extends uvm_component; 49 | 50 | `uvm_component_param_utils(uvm_driver#(REQ,RSP)) 51 | // TODO: Would it be useful to change this to: 52 | //| `uvm_type_name_decl($sformatf("uvm_driver #(%s,%s)", REQ::type_name(), RSP::type_name())) 53 | `uvm_type_name_decl("uvm_driver #(REQ,RSP)") 54 | 55 | // Port -- NODOCS -- seq_item_port 56 | // 57 | // Derived driver classes should use this port to request items from the 58 | // sequencer. They may also use it to send responses back. 59 | 60 | uvm_seq_item_pull_port #(REQ, RSP) seq_item_port; 61 | 62 | uvm_seq_item_pull_port #(REQ, RSP) seq_item_prod_if; // alias 63 | 64 | // Port -- NODOCS -- rsp_port 65 | // 66 | // This port provides an alternate way of sending responses back to the 67 | // originating sequencer. Which port to use depends on which export the 68 | // sequencer provides for connection. 69 | 70 | uvm_analysis_port #(RSP) rsp_port; 71 | 72 | REQ req; 73 | RSP rsp; 74 | 75 | // Function -- NODOCS -- new 76 | // 77 | // Creates and initializes an instance of this class using the normal 78 | // constructor arguments for : ~name~ is the name of the 79 | // instance, and ~parent~ is the handle to the hierarchical parent, if any. 80 | 81 | function new (string name, uvm_component parent); 82 | super.new(name, parent); 83 | seq_item_port = new("seq_item_port", this); 84 | rsp_port = new("rsp_port", this); 85 | seq_item_prod_if = seq_item_port; 86 | endfunction // new 87 | 88 | virtual function void end_of_elaboration_phase(uvm_phase phase); 89 | if(seq_item_port.size<1) 90 | `uvm_warning("DRVCONNECT","the driver is not connected to a sequencer via the standard mechanisms enabled by connect()") 91 | endfunction 92 | endclass 93 | -------------------------------------------------------------------------------- /src/comps/uvm_env.svh: -------------------------------------------------------------------------------- 1 | // 2 | //------------------------------------------------------------------------------ 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2007-2018 Cadence Design Systems, Inc. 5 | // Copyright 2015-2018 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //------------------------------------------------------------------------------ 22 | 23 | //------------------------------------------------------------------------------ 24 | // 25 | // CLASS -- NODOCS -- uvm_env 26 | // 27 | // The base class for hierarchical containers of other components that 28 | // together comprise a complete environment. The environment may 29 | // initially consist of the entire testbench. Later, it can be reused as 30 | // a sub-environment in even larger system-level environments. 31 | //------------------------------------------------------------------------------ 32 | 33 | // @uvm-ieee 1800.2-2017 auto 13.3.1 34 | virtual class uvm_env extends uvm_component; 35 | 36 | `uvm_component_abstract_utils(uvm_env) 37 | 38 | // Function -- NODOCS -- new 39 | // 40 | // Creates and initializes an instance of this class using the normal 41 | // constructor arguments for : ~name~ is the name of the 42 | // instance, and ~parent~ is the handle to the hierarchical parent, if any. 43 | 44 | // @uvm-ieee 1800.2-2017 auto 13.3.2 45 | function new (string name="env", uvm_component parent=null); 46 | super.new(name,parent); 47 | endfunction 48 | 49 | endclass 50 | -------------------------------------------------------------------------------- /src/comps/uvm_monitor.svh: -------------------------------------------------------------------------------- 1 | // 2 | //----------------------------------------------------------------------------- 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2007-2018 Cadence Design Systems, Inc. 5 | // Copyright 2015-2018 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //----------------------------------------------------------------------------- 22 | 23 | //----------------------------------------------------------------------------- 24 | // CLASS -- NODOCS -- uvm_monitor 25 | // 26 | // This class should be used as the base class for user-defined monitors. 27 | // 28 | // Deriving from uvm_monitor allows you to distinguish monitors from generic 29 | // component types inheriting from uvm_component. Such monitors will 30 | // automatically inherit features that may be added to uvm_monitor in the future. 31 | // 32 | //----------------------------------------------------------------------------- 33 | 34 | // @uvm-ieee 1800.2-2017 auto 13.5.1 35 | virtual class uvm_monitor extends uvm_component; 36 | 37 | `uvm_component_abstract_utils(uvm_monitor) 38 | 39 | // Function -- NODOCS -- new 40 | // 41 | // Creates and initializes an instance of this class using the normal 42 | // constructor arguments for : ~name~ is the name of the 43 | // instance, and ~parent~ is the handle to the hierarchical parent, if any. 44 | 45 | // @uvm-ieee 1800.2-2017 auto 13.5.2 46 | function new (string name, uvm_component parent); 47 | super.new(name, parent); 48 | endfunction 49 | 50 | endclass 51 | -------------------------------------------------------------------------------- /src/comps/uvm_push_driver.svh: -------------------------------------------------------------------------------- 1 | // 2 | //------------------------------------------------------------------------------ 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2007-2018 Cadence Design Systems, Inc. 5 | // Copyright 2015-2018 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //------------------------------------------------------------------------------ 22 | 23 | //------------------------------------------------------------------------------ 24 | // 25 | // CLASS -- NODOCS -- uvm_push_driver #(REQ,RSP) 26 | // 27 | // Base class for a driver that passively receives transactions, i.e. does not 28 | // initiate requests transactions. Also known as ~push~ mode. Its ports are 29 | // typically connected to the corresponding ports in a push sequencer as follows: 30 | // 31 | //| push_sequencer.req_port.connect(push_driver.req_export); 32 | //| push_driver.rsp_port.connect(push_sequencer.rsp_export); 33 | // 34 | // The ~rsp_port~ needs connecting only if the driver will use it to write 35 | // responses to the analysis export in the sequencer. 36 | // 37 | //------------------------------------------------------------------------------ 38 | 39 | // @uvm-ieee 1800.2-2017 auto 13.8.1 40 | class uvm_push_driver #(type REQ=uvm_sequence_item, 41 | type RSP=REQ) extends uvm_component; 42 | 43 | `uvm_component_param_utils(uvm_push_driver#(REQ,RSP)) 44 | `uvm_type_name_decl("uvm_push_driver #(REQ,RSP)") 45 | 46 | // Port -- NODOCS -- req_export 47 | // 48 | // This export provides the blocking put interface whose default 49 | // implementation produces an error. Derived drivers must override ~put~ 50 | // with an appropriate implementation (and not call super.put). Ports 51 | // connected to this export will supply the driver with transactions. 52 | 53 | uvm_blocking_put_imp #(REQ, uvm_push_driver #(REQ,RSP)) req_export; 54 | 55 | // Port -- NODOCS -- rsp_port 56 | // 57 | // This analysis port is used to send response transactions back to the 58 | // originating sequencer. 59 | 60 | uvm_analysis_port #(RSP) rsp_port; 61 | 62 | REQ req; 63 | RSP rsp; 64 | 65 | // Function -- NODOCS -- new 66 | // 67 | // Creates and initializes an instance of this class using the normal 68 | // constructor arguments for : ~name~ is the name of the 69 | // instance, and ~parent~ is the handle to the hierarchical parent, if any. 70 | 71 | function new (string name, uvm_component parent); 72 | super.new(name, parent); 73 | req_export = new("req_export", this); 74 | rsp_port = new("rsp_port", this); 75 | endfunction 76 | 77 | function void check_port_connections(); 78 | if (req_export.size() != 1) 79 | uvm_report_fatal("Connection Error", 80 | $sformatf("Must connect to seq_item_port(%0d)", 81 | req_export.size()), UVM_NONE); 82 | endfunction 83 | 84 | virtual function void end_of_elaboration_phase(uvm_phase phase); 85 | super.end_of_elaboration_phase(phase); 86 | check_port_connections(); 87 | endfunction 88 | 89 | virtual task put(REQ item); 90 | uvm_report_fatal("UVM_PUSH_DRIVER", "Put task for push driver is not implemented", UVM_NONE); 91 | endtask 92 | 93 | endclass 94 | -------------------------------------------------------------------------------- /src/comps/uvm_scoreboard.svh: -------------------------------------------------------------------------------- 1 | // 2 | //----------------------------------------------------------------------------- 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2007-2018 Cadence Design Systems, Inc. 5 | // Copyright 2015-2018 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //----------------------------------------------------------------------------- 22 | 23 | //------------------------------------------------------------------------------ 24 | // 25 | // CLASS -- NODOCS -- uvm_scoreboard 26 | // 27 | // The uvm_scoreboard virtual class should be used as the base class for 28 | // user-defined scoreboards. 29 | // 30 | // Deriving from uvm_scoreboard will allow you to distinguish scoreboards from 31 | // other component types inheriting directly from uvm_component. Such 32 | // scoreboards will automatically inherit and benefit from features that may be 33 | // added to uvm_scoreboard in the future. 34 | //------------------------------------------------------------------------------ 35 | 36 | // @uvm-ieee 1800.2-2017 auto 13.6.1 37 | virtual class uvm_scoreboard extends uvm_component; 38 | 39 | `uvm_component_abstract_utils(uvm_scoreboard) 40 | 41 | // Function -- NODOCS -- new 42 | // 43 | // Creates and initializes an instance of this class using the normal 44 | // constructor arguments for : ~name~ is the name of the 45 | // instance, and ~parent~ is the handle to the hierarchical parent, if any. 46 | 47 | function new (string name, uvm_component parent); 48 | super.new(name, parent); 49 | endfunction 50 | 51 | endclass 52 | -------------------------------------------------------------------------------- /src/comps/uvm_subscriber.svh: -------------------------------------------------------------------------------- 1 | // 2 | //------------------------------------------------------------------------------ 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2007-2018 Cadence Design Systems, Inc. 5 | // Copyright 2015 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //------------------------------------------------------------------------------ 22 | 23 | //------------------------------------------------------------------------------ 24 | // 25 | // CLASS -- NODOCS -- uvm_subscriber 26 | // 27 | // This class provides an analysis export for receiving transactions from a 28 | // connected analysis export. Making such a connection "subscribes" this 29 | // component to any transactions emitted by the connected analysis port. 30 | // 31 | // Subtypes of this class must define the write method to process the incoming 32 | // transactions. This class is particularly useful when designing a coverage 33 | // collector that attaches to a monitor. 34 | //------------------------------------------------------------------------------ 35 | 36 | // @uvm-ieee 1800.2-2017 auto 13.9.1 37 | virtual class uvm_subscriber #(type T=int) extends uvm_component; 38 | 39 | typedef uvm_subscriber #(T) this_type; 40 | 41 | // Port -- NODOCS -- analysis_export 42 | // 43 | // This export provides access to the write method, which derived subscribers 44 | // must implement. 45 | 46 | uvm_analysis_imp #(T, this_type) analysis_export; 47 | 48 | // Function -- NODOCS -- new 49 | // 50 | // Creates and initializes an instance of this class using the normal 51 | // constructor arguments for : ~name~ is the name of the 52 | // instance, and ~parent~ is the handle to the hierarchical parent, if any. 53 | 54 | function new (string name, uvm_component parent); 55 | super.new(name, parent); 56 | analysis_export = new("analysis_imp", this); 57 | endfunction 58 | 59 | // Function -- NODOCS -- write 60 | // 61 | // A pure virtual method that must be defined in each subclass. Access 62 | // to this method by outside components should be done via the 63 | // analysis_export. 64 | 65 | // @uvm-ieee 1800.2-2017 auto 13.9.3.2 66 | pure virtual function void write(T t); 67 | 68 | endclass 69 | -------------------------------------------------------------------------------- /src/comps/uvm_test.svh: -------------------------------------------------------------------------------- 1 | // 2 | //------------------------------------------------------------------------------ 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2007-2018 Cadence Design Systems, Inc. 5 | // Copyright 2015-2018 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //------------------------------------------------------------------------------ 22 | 23 | //------------------------------------------------------------------------------ 24 | // 25 | // CLASS -- NODOCS -- uvm_test 26 | // 27 | // This class is the virtual base class for the user-defined tests. 28 | // 29 | // The uvm_test virtual class should be used as the base class for user-defined 30 | // tests. Doing so provides the ability to select which test to execute using 31 | // the UVM_TESTNAME command line or argument to the task. 32 | // 33 | // For example 34 | // 35 | //| prompt> SIM_COMMAND +UVM_TESTNAME=test_bus_retry 36 | // 37 | // The global run_test() task should be specified inside an initial block 38 | // such as 39 | // 40 | //| initial run_test(); 41 | // 42 | // Multiple tests, identified by their type name, are compiled in and then 43 | // selected for execution from the command line without need for recompilation. 44 | // Random seed selection is also available on the command line. 45 | // 46 | // If +UVM_TESTNAME=test_name is specified, then an object of type 'test_name' 47 | // is created by factory and phasing begins. Here, it is presumed that the 48 | // test will instantiate the test environment, or the test environment will 49 | // have already been instantiated before the call to run_test(). 50 | // 51 | // If the specified test_name cannot be created by the , then a 52 | // fatal error occurs. If run_test() is called without UVM_TESTNAME being 53 | // specified, then all components constructed before the call to run_test will 54 | // be cycled through their simulation phases. 55 | // 56 | // Deriving from uvm_test will allow you to distinguish tests from other 57 | // component types that inherit from uvm_component directly. Such tests will 58 | // automatically inherit features that may be added to uvm_test in the future. 59 | // 60 | //------------------------------------------------------------------------------ 61 | 62 | // @uvm-ieee 1800.2-2017 auto 13.2.1 63 | virtual class uvm_test extends uvm_component; 64 | 65 | `uvm_component_abstract_utils(uvm_test) 66 | 67 | // Function -- NODOCS -- new 68 | // 69 | // Creates and initializes an instance of this class using the normal 70 | // constructor arguments for : ~name~ is the name of the 71 | // instance, and ~parent~ is the handle to the hierarchical parent, if any. 72 | 73 | // @uvm-ieee 1800.2-2017 auto 13.2.2 74 | function new (string name, uvm_component parent); 75 | super.new(name,parent); 76 | endfunction 77 | 78 | endclass 79 | -------------------------------------------------------------------------------- /src/dap/uvm_dap.svh: -------------------------------------------------------------------------------- 1 | // 2 | //------------------------------------------------------------------------------ 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2010-2011 Synopsys, Inc. 5 | // Copyright 2007-2018 Cadence Design Systems, Inc. 6 | // Copyright 2010 AMD 7 | // Copyright 2013 NVIDIA Corporation 8 | // All Rights Reserved Worldwide 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the 11 | // "License"); you may not use this file except in 12 | // compliance with the License. You may obtain a copy of 13 | // the License at 14 | // 15 | // http://www.apache.org/licenses/LICENSE-2.0 16 | // 17 | // Unless required by applicable law or agreed to in 18 | // writing, software distributed under the License is 19 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 20 | // CONDITIONS OF ANY KIND, either express or implied. See 21 | // the License for the specific language governing 22 | // permissions and limitations under the License. 23 | //------------------------------------------------------------------------------ 24 | 25 | `ifndef UVM_DAP_SVH 26 | `define UVM_DAP_SVH 27 | 28 | // Set/Get DAPS 29 | `include "dap/uvm_set_get_dap_base.svh" 30 | `include "dap/uvm_simple_lock_dap.svh" 31 | `include "dap/uvm_get_to_lock_dap.svh" 32 | `include "dap/uvm_set_before_get_dap.svh" 33 | 34 | `endif // UVM_DAP_SVH 35 | -------------------------------------------------------------------------------- /src/dap/uvm_set_get_dap_base.svh: -------------------------------------------------------------------------------- 1 | // 2 | //------------------------------------------------------------------------------ 3 | // Copyright 2007-2009 Mentor Graphics Corporation 4 | // Copyright 2007-2018 Cadence Design Systems, Inc. 5 | // Copyright 2013-2015 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //------------------------------------------------------------------------------ 22 | 23 | // Class -- NODOCS -- uvm_set_get_dap_base 24 | // Provides the 'set' and 'get' interface for Data Access Policies (DAPs) 25 | // 26 | // The 'Set/Get' base class simply provides a common interface for 27 | // the various DAPs to implement. This provides a mechanism for 28 | // consistent implementations of similar DAPs. 29 | // 30 | 31 | virtual class uvm_set_get_dap_base#(type T=int) extends uvm_object; 32 | 33 | // Used for self references 34 | typedef uvm_set_get_dap_base#(T) this_type; 35 | 36 | // Function -- NODOCS -- new 37 | // Constructor 38 | function new(string name="unnamed-uvm_set_get_dap_base#(T)"); 39 | super.new(name); 40 | endfunction : new 41 | 42 | // Group -- NODOCS -- Set/Get Interface 43 | // 44 | // All implementations of the ~uvm_set_get_dap_base~ class must 45 | // provide an implementation of the four basic "Set and Get" 46 | // accessors. 47 | // 48 | 49 | // Function -- NODOCS -- set 50 | // Sets the value contained within the resource. 51 | // 52 | // Depending on the DAP policies, an error may be reported if 53 | // it is illegal to 'set' the value at this time. 54 | pure virtual function void set(T value); 55 | 56 | // Function -- NODOCS -- try_set 57 | // Attempts to set the value contained within the resource. 58 | // 59 | // If the DAP policies forbid setting at this time, then 60 | // the method will return 0, however no errors will be 61 | // reported. Otherwise, the method will return 1, and 62 | // will be treated like a standard call. 63 | pure virtual function bit try_set(T value); 64 | 65 | // Function -- NODOCS -- get 66 | // Retrieves the value contained within the resource. 67 | // 68 | // Depending on the DAP policies, an error may be reported 69 | // if it is illegal to 'get' the value at this time. 70 | pure virtual function T get(); 71 | 72 | // Function -- NODOCS -- try_get 73 | // Attempts to retrieve the value contained within the resource. 74 | // 75 | // If the DAP policies forbid retrieving at this time, then 76 | // the method will return 0, however no errors will be 77 | // reported. Otherwise, the method will return 1, and will 78 | // be treated like a standard call. 79 | pure virtual function bit try_get(output T value); 80 | 81 | endclass : uvm_set_get_dap_base 82 | -------------------------------------------------------------------------------- /src/deprecated/readme.important: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2011 Mentor Graphics Corporation 3 | // Copyright 2010-2011 Synopsys, Inc. 4 | // Copyright 2010-2018 Cadence Design Systems, Inc. 5 | // Copyright 2010 AMD 6 | // Copyright 2018 NVIDIA Corporation 7 | // All Rights Reserved Worldwide 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the 10 | // "License"); you may not use this file except in 11 | // compliance with the License. You may obtain a copy of 12 | // the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in 17 | // writing, software distributed under the License is 18 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 19 | // CONDITIONS OF ANY KIND, either express or implied. See 20 | // the License for the specific language governing 21 | // permissions and limitations under the License. 22 | //---------------------------------------------------------------------- 23 | 24 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 25 | PLEASE NOTE: 26 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 27 | 28 | Files and Types, Classes, Functions etc within this directory are considered as 29 | deprecated. By default, they are not included with the reference implementation. 30 | 31 | These files can be included by compiling with UVM_ENABLE_DEPRECATED_API defined. 32 | 33 | Usage of these files is not recommended, as: 34 | 35 | - they might be changed without any further notice in future versions of UVM 36 | - they might be removed entirely in future versions of UVM 37 | - they are not part of the UVM standard 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/dpi/uvm_common.c: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2010-2011 Mentor Graphics Corporation 3 | // Copyright 2010-2013 Synopsys, Inc. 4 | // Copyright 2010-2018 Cadence Design Systems, Inc. 5 | // Copyright 2010 AMD 6 | // Copyright 2013 NVIDIA Corporation 7 | // All Rights Reserved Worldwide 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the 10 | // "License"); you may not use this file except in 11 | // compliance with the License. You may obtain a copy of 12 | // the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in 17 | // writing, software distributed under the License is 18 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 19 | // CONDITIONS OF ANY KIND, either express or implied. See 20 | // the License for the specific language governing 21 | // permissions and limitations under the License. 22 | //---------------------------------------------------------------------- 23 | 24 | // Implementation of common methods for DPI 25 | 26 | extern void m__uvm_report_dpi(int,const char*,const char*,int,const char*, int); 27 | 28 | #if defined(XCELIUM) || defined(NCSC) 29 | const static char* uvm_package_scope_name = "uvm_pkg::"; 30 | #else 31 | const static char* uvm_package_scope_name = "uvm_pkg"; 32 | #endif 33 | 34 | void m_uvm_report_dpi( int severity, 35 | char* id, 36 | char* message, 37 | int verbosity, 38 | char* file, 39 | int linenum) { 40 | svScope old_scope = svSetScope(svGetScopeFromName(uvm_package_scope_name)); 41 | m__uvm_report_dpi(severity, id, message, verbosity, file, linenum); 42 | svSetScope(old_scope); 43 | } 44 | 45 | 46 | int int_str_max ( int radix_bits ) { 47 | int val = INT_MAX; 48 | int ret = 1; 49 | while ((val = (val /radix_bits))) 50 | ret++; 51 | return ret; 52 | } 53 | -------------------------------------------------------------------------------- /src/dpi/uvm_dpi.cc: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2010-2017 Mentor Graphics Corporation 3 | // Copyright 2010-2013 Synopsys, Inc. 4 | // Copyright 2010-2018 Cadence Design Systems, Inc. 5 | // Copyright 2013 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //---------------------------------------------------------------------- 22 | 23 | // 24 | // Top-level file that includes all of the C/C++ files required 25 | // by UVM 26 | // 27 | // The C code may be compiled by compiling this top file only, 28 | // or by compiling individual files then linking them together. 29 | // 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #include 36 | #include "uvm_dpi.h" 37 | 38 | // Avoid -Wmissing-definitions 39 | int uvm_re_match(const char * re, const char *str); 40 | const char * uvm_glob_to_re(const char *glob); 41 | int uvm_hdl_check_path(char *path); 42 | int uvm_hdl_read(char *path, p_vpi_vecval value); 43 | int uvm_hdl_deposit(char *path, p_vpi_vecval value); 44 | int uvm_hdl_force(char *path, p_vpi_vecval value); 45 | int uvm_hdl_release_and_read(char *path, p_vpi_vecval value); 46 | int uvm_hdl_release(char *path); 47 | void push_data(int lvl,char *entry, int cmd); 48 | void walk_level(int lvl, int argc, char**argv,int cmd); 49 | const char *uvm_dpi_get_next_arg_c (int init); 50 | extern char* uvm_dpi_get_tool_name_c (); 51 | extern char* uvm_dpi_get_tool_version_c (); 52 | extern regex_t* uvm_dpi_regcomp (char* pattern); 53 | extern int uvm_dpi_regexec (regex_t* re, char* str); 54 | extern void uvm_dpi_regfree (regex_t* re); 55 | 56 | #include "uvm_common.c" 57 | #include "uvm_regex.cc" 58 | #include "uvm_hdl.c" 59 | #include "uvm_svcmd_dpi.c" 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | -------------------------------------------------------------------------------- /src/dpi/uvm_dpi.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2010-2017 Mentor Graphics Corporation 3 | // Copyright 2010 Synopsys, Inc. 4 | // Copyright 2010-2018 Cadence Design Systems, Inc. 5 | // Copyright 2013 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //---------------------------------------------------------------------- 22 | 23 | // 24 | // Top level header filke that wraps all requirements which 25 | // are common to the various C/C++ files in UVM. 26 | // 27 | 28 | #ifndef UVM_DPI__H 29 | #define UVM_DPI__H 30 | 31 | #include 32 | #include "vpi_user.h" 33 | #include "veriuser.h" 34 | #include "svdpi.h" 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | 41 | // The following consts and method call are for 42 | // internal usage by the UVM DPI implementation, 43 | // and are not intended for public use. 44 | static const int M_UVM_INFO = 0; 45 | static const int M_UVM_WARNING = 1; 46 | static const int M_UVM_ERROR = 2; 47 | static const int M_UVM_FATAL = 3; 48 | 49 | static const int M_UVM_NONE = 0; 50 | static const int M_UVM_LOW = 100; 51 | static const int M_UVM_MEDIUM = 200; 52 | static const int M_UVM_HIGH = 300; 53 | static const int M_UVM_FULL = 400; 54 | static const int M_UVM_DEBUG = 500; 55 | 56 | void m_uvm_report_dpi(int severity, 57 | char* id, 58 | char* message, 59 | int verbosity, 60 | char* file, 61 | int linenum); 62 | 63 | int int_str_max( int ); 64 | 65 | int uvm_re_match(const char * re, const char *str); 66 | const char * uvm_glob_to_re(const char *glob); 67 | 68 | int uvm_hdl_check_path(char *path); 69 | int uvm_hdl_read(char *path, p_vpi_vecval value); 70 | int uvm_hdl_deposit(char *path, p_vpi_vecval value); 71 | int uvm_hdl_force(char *path, p_vpi_vecval value); 72 | int uvm_hdl_release_and_read(char *path, p_vpi_vecval value); 73 | int uvm_hdl_release(char *path); 74 | 75 | void push_data(int lvl,char *entry, int cmd); 76 | void walk_level(int lvl, int argc, char**argv,int cmd); 77 | const char *uvm_dpi_get_next_arg_c (int init); 78 | extern char* uvm_dpi_get_tool_name_c (); 79 | extern char* uvm_dpi_get_tool_version_c (); 80 | extern regex_t* uvm_dpi_regcomp (char* pattern); 81 | extern int uvm_dpi_regexec (regex_t* re, char* str); 82 | extern void uvm_dpi_regfree (regex_t* re); 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /src/dpi/uvm_dpi.svh: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2010-2011 Mentor Graphics Corporation 3 | // Copyright 2010 Synopsys, Inc. 4 | // Copyright 2010-2018 Cadence Design Systems, Inc. 5 | // Copyright 2010 AMD 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //---------------------------------------------------------------------- 22 | 23 | `ifndef UVM_DPI_SVH 24 | `define UVM_DPI_SVH 25 | 26 | // 27 | // Top-level file for DPI subroutines used by UVM. 28 | // 29 | // Tool-specific distribution overlays may be required. 30 | // 31 | // To use UVM without any tool-specific overlay, use +defin+UVM_NO_DPI 32 | // 33 | 34 | `ifdef UVM_NO_DPI 35 | `define UVM_HDL_NO_DPI 36 | `define UVM_REGEX_NO_DPI 37 | `define UVM_CMDLINE_NO_DPI 38 | `endif 39 | 40 | `include "dpi/uvm_hdl.svh" 41 | `include "dpi/uvm_svcmd_dpi.svh" 42 | `include "dpi/uvm_regex.svh" 43 | 44 | `endif // UVM_DPI_SVH 45 | -------------------------------------------------------------------------------- /src/dpi/uvm_hdl.c: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2009-2011 Mentor Graphics Corporation 3 | // Copyright 2010-2011 Synopsys, Inc. 4 | // Copyright 2007-2018 Cadence Design Systems, Inc. 5 | // Copyright 2013 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //---------------------------------------------------------------------- 22 | 23 | // hdl vendor backends are defined for VCS,QUESTA,XCELIUM 24 | #if defined(VCS) || defined(VCSMX) 25 | #include "uvm_hdl_vcs.c" 26 | #else 27 | #ifdef QUESTA 28 | #include "uvm_hdl_questa.c" 29 | #else 30 | #if defined(XCELIUM) || defined(NCSC) 31 | #include "uvm_hdl_xcelium.c" 32 | #else 33 | #error "hdl vendor backend is missing" 34 | #endif 35 | #endif 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /src/dpi/uvm_regex.svh: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2010-2012 Mentor Graphics Corporation 3 | // Copyright 2010-2018 Cadence Design Systems, Inc. 4 | // All Rights Reserved Worldwide 5 | // 6 | // Licensed under the Apache License, Version 2.0 (the 7 | // "License"); you may not use this file except in 8 | // compliance with the License. You may obtain a copy of 9 | // the License at 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in 14 | // writing, software distributed under the License is 15 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 16 | // CONDITIONS OF ANY KIND, either express or implied. See 17 | // the License for the specific language governing 18 | // permissions and limitations under the License. 19 | //---------------------------------------------------------------------- 20 | 21 | 22 | 23 | `ifndef UVM_REGEX_NO_DPI 24 | import "DPI-C" context function int uvm_re_match(string re, string str); 25 | import "DPI-C" context function string uvm_glob_to_re(string glob); 26 | 27 | `else 28 | 29 | // The Verilog only version does not match regular expressions, 30 | // it only does glob style matching. 31 | function int uvm_re_match(string re, string str); 32 | int e, es, s, ss; 33 | string tmp; 34 | e = 0; s = 0; 35 | es = 0; ss = 0; 36 | 37 | if(re.len() == 0) 38 | return 0; 39 | 40 | // The ^ used to be used to remove the implicit wildcard, but now we don't 41 | // use implicit wildcard so this character is just stripped. 42 | if(re[0] == "^") 43 | re = re.substr(1, re.len()-1); 44 | 45 | //This loop is only needed when the first character of the re may not 46 | //be a *. 47 | while (s != str.len() && re.getc(e) != "*") begin 48 | if ((re.getc(e) != str.getc(s)) && (re.getc(e) != "?")) 49 | return 1; 50 | e++; s++; 51 | end 52 | 53 | while (s != str.len()) begin 54 | if (re.getc(e) == "*") begin 55 | e++; 56 | if (e == re.len()) begin 57 | return 0; 58 | end 59 | es = e; 60 | ss = s+1; 61 | end 62 | else if (re.getc(e) == str.getc(s) || re.getc(e) == "?") begin 63 | e++; 64 | s++; 65 | end 66 | else begin 67 | e = es; 68 | s = ss++; 69 | end 70 | end 71 | while (e < re.len() && re.getc(e) == "*") 72 | e++; 73 | if(e == re.len()) begin 74 | return 0; 75 | end 76 | else begin 77 | return 1; 78 | end 79 | endfunction 80 | 81 | function string uvm_glob_to_re(string glob); 82 | return glob; 83 | endfunction 84 | 85 | `endif 86 | -------------------------------------------------------------------------------- /src/dpi/uvm_svcmd_dpi.c: -------------------------------------------------------------------------------- 1 | // 2 | //------------------------------------------------------------------------------ 3 | // Copyright 2011-2014 Mentor Graphics Corporation 4 | // Copyright 2011-2018 Cadence Design Systems, Inc. 5 | // Copyright 2010-2012 AMD 6 | // Copyright 2013 NVIDIA Corporation 7 | // All Rights Reserved Worldwide 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the 10 | // "License"); you may not use this file except in 11 | // compliance with the License. You may obtain a copy of 12 | // the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in 17 | // writing, software distributed under the License is 18 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 19 | // CONDITIONS OF ANY KIND, either express or implied. See 20 | // the License for the specific language governing 21 | // permissions and limitations under the License. 22 | //------------------------------------------------------------------------------ 23 | 24 | #include "uvm_dpi.h" 25 | #include 26 | 27 | #define ARGV_STACK_PTR_SIZE 32 28 | 29 | // the total number of arguments (minus the -f/-F minus associated filenames) 30 | int argc_total; 31 | // the ptr to the array of ptrs to the args 32 | char** argv_stack=NULL; 33 | 34 | char ** argv_ptr=NULL; 35 | 36 | 37 | void push_data(int lvl,char *entry, int cmd) { 38 | if(cmd==0) 39 | argc_total++; 40 | else 41 | *argv_ptr++=entry; 42 | } 43 | 44 | // walk one level (potentially recursive) 45 | void walk_level(int lvl, int argc, char**argv,int cmd) { 46 | int idx; 47 | for(idx=0; ((lvl==0) && idx0) && (*argv));idx++,argv++) { 48 | if(strcmp(*argv, "-f") && strcmp(*argv, "-F")) { 49 | push_data(lvl,*argv,cmd); 50 | } else { 51 | argv++; 52 | idx++; 53 | char **n=(char**) *argv; 54 | walk_level(lvl+1,argc,++n,cmd); 55 | } 56 | } 57 | } 58 | 59 | const char *uvm_dpi_get_next_arg_c (int init) { 60 | s_vpi_vlog_info info; 61 | static int idx=0; 62 | 63 | if(init==1) 64 | { 65 | // free if necessary 66 | free(argv_stack); 67 | argc_total=0; 68 | 69 | vpi_get_vlog_info(&info); 70 | walk_level(0,info.argc,info.argv,0); 71 | 72 | argv_stack = (char**) malloc (sizeof(char*)*argc_total); 73 | argv_ptr=argv_stack; 74 | walk_level(0,info.argc,info.argv,1); 75 | idx=0; 76 | argv_ptr=argv_stack; 77 | } 78 | 79 | if(idx++>=argc_total) 80 | return NULL; 81 | 82 | return *argv_ptr++; 83 | } 84 | 85 | extern char* uvm_dpi_get_tool_name_c () 86 | { 87 | s_vpi_vlog_info info; 88 | vpi_get_vlog_info(&info); 89 | return info.product; 90 | } 91 | 92 | extern char* uvm_dpi_get_tool_version_c () 93 | { 94 | s_vpi_vlog_info info; 95 | vpi_get_vlog_info(&info); 96 | return info.version; 97 | } 98 | 99 | extern regex_t* uvm_dpi_regcomp (char* pattern) 100 | { 101 | regex_t* re = (regex_t*) malloc (sizeof(regex_t)); 102 | int status = regcomp(re, pattern, REG_NOSUB|REG_EXTENDED); 103 | if(status) 104 | { 105 | const char * err_str = "uvm_dpi_regcomp : Unable to compile regex: |%s|, Element 0 is: %c"; 106 | char buffer[strlen(err_str) + strlen(pattern) + 1]; 107 | sprintf(buffer, err_str, pattern, pattern[0]); 108 | m_uvm_report_dpi(M_UVM_ERROR, 109 | (char*)"UVM/DPI/REGCOMP", 110 | &buffer[0], 111 | M_UVM_NONE, 112 | (char*) __FILE__, 113 | __LINE__); 114 | regfree(re); 115 | free (re); 116 | return NULL; 117 | } 118 | return re; 119 | } 120 | 121 | extern int uvm_dpi_regexec (regex_t* re, char* str) 122 | { 123 | if(!re ) 124 | { 125 | return 1; 126 | } 127 | return regexec(re, str, (size_t)0, NULL, 0); 128 | } 129 | 130 | extern void uvm_dpi_regfree (regex_t* re) 131 | { 132 | if(!re) return; 133 | regfree(re); 134 | free (re); 135 | } 136 | -------------------------------------------------------------------------------- /src/dpi/uvm_svcmd_dpi.svh: -------------------------------------------------------------------------------- 1 | // 2 | //------------------------------------------------------------------------------ 3 | // Copyright 2010-2011 Mentor Graphics Corporation 4 | // Copyright 2013-2018 Cadence Design Systems, Inc. 5 | // Copyright 2010-2012 AMD 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //------------------------------------------------------------------------------ 22 | 23 | // Import DPI functions used by the interface to generate the 24 | // lists. 25 | 26 | `ifndef UVM_CMDLINE_NO_DPI 27 | import "DPI-C" function string uvm_dpi_get_next_arg_c (int init); 28 | import "DPI-C" function string uvm_dpi_get_tool_name_c (); 29 | import "DPI-C" function string uvm_dpi_get_tool_version_c (); 30 | 31 | function string uvm_dpi_get_next_arg(int init=0); 32 | return uvm_dpi_get_next_arg_c(init); 33 | endfunction 34 | 35 | function string uvm_dpi_get_tool_name(); 36 | return uvm_dpi_get_tool_name_c(); 37 | endfunction 38 | 39 | function string uvm_dpi_get_tool_version(); 40 | return uvm_dpi_get_tool_version_c(); 41 | endfunction 42 | 43 | import "DPI-C" function chandle uvm_dpi_regcomp(string regex); 44 | import "DPI-C" function int uvm_dpi_regexec(chandle preg, string str); 45 | import "DPI-C" function void uvm_dpi_regfree(chandle preg); 46 | 47 | `else 48 | function string uvm_dpi_get_next_arg(int init=0); 49 | return ""; 50 | endfunction 51 | 52 | function string uvm_dpi_get_tool_name(); 53 | return "?"; 54 | endfunction 55 | 56 | function string uvm_dpi_get_tool_version(); 57 | return "?"; 58 | endfunction 59 | 60 | 61 | function chandle uvm_dpi_regcomp(string regex); return null; endfunction 62 | function int uvm_dpi_regexec(chandle preg, string str); return 0; endfunction 63 | function void uvm_dpi_regfree(chandle preg); endfunction 64 | 65 | `endif 66 | -------------------------------------------------------------------------------- /src/macros/uvm_copier_defines.svh: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2018 Qualcomm, Inc. 3 | // Copyright 2018 Cadence Design Systems, Inc. 4 | // Copyright 2018 NVIDIA Corporation 5 | // All Rights Reserved Worldwide 6 | // 7 | // Licensed under the Apache License, Version 2.0 (the 8 | // "License"); you may not use this file except in 9 | // compliance with the License. You may obtain a copy of 10 | // the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in 15 | // writing, software distributed under the License is 16 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 17 | // CONDITIONS OF ANY KIND, either express or implied. See 18 | // the License for the specific language governing 19 | // permissions and limitations under the License. 20 | //---------------------------------------------------------------------- 21 | 22 | //------------------------------------------------------------------------------ 23 | // 24 | // MACROS for uvm_copier usage 25 | // 26 | // Provides a set of comparison macros that will call appropriate methods 27 | // inside of a uvm_copier object. 28 | // 29 | //------------------------------------------------------------------------------ 30 | 31 | `ifndef UVM_COPIER_DEFINES_SVH 32 | `define UVM_COPIER_DEFINES_SVH 33 | 34 | // uvm_copy_object 35 | 36 | `define uvm_copy_object(LVALUE, RVALUE, POLICY=UVM_DEFAULT_POLICY, COPIER=copier) \ 37 | if (LVALUE != RVALUE) begin \ 38 | if ((RVALUE == null) || \ 39 | (POLICY == UVM_REFERENCE) || \ 40 | ((POLICY == UVM_DEFAULT_POLICY) && \ 41 | (COPIER.get_recursion_policy() == UVM_REFERENCE))) begin \ 42 | LVALUE = RVALUE; \ 43 | end \ 44 | else begin \ 45 | uvm_object lvalue_ref__; \ 46 | if (!COPIER.get_first_copy(RVALUE,lvalue_ref__) || !$cast(LVALUE,lvalue_ref__)) begin \ 47 | uvm_recursion_policy_enum prev_pol__ = COPIER.get_recursion_policy(); \ 48 | uvm_recursion_policy_enum curr_pol__; \ 49 | if (POLICY != UVM_DEFAULT_POLICY) \ 50 | COPIER.set_recursion_policy(POLICY); \ 51 | curr_pol__ = COPIER.get_recursion_policy(); \ 52 | if (LVALUE == null) begin \ 53 | if (($cast(LVALUE, RVALUE.create(RVALUE.get_name())) == 0) || \ 54 | (LVALUE == null)) begin \ 55 | `uvm_fatal("UVM/COPY/NULL_CREATE", \ 56 | {"Could not create '", RVALUE.get_full_name(), \ 57 | "' of type '", RVALUE.get_type_name(), \ 58 | "', into '", `"LVALUE`", "'."}) \ 59 | end \ 60 | else begin \ 61 | COPIER.copy_object(LVALUE, RVALUE); \ 62 | end \ 63 | end \ 64 | else begin \ 65 | if (COPIER.object_copied(LVALUE, RVALUE, curr_pol__) == uvm_policy::STARTED) begin \ 66 | `uvm_warning("UVM/COPY/LOOP", \ 67 | {"Loop detected in copy operation (LHS:'", \ 68 | LVALUE.get_full_name(), \ 69 | "', RHS:'", \ 70 | RVALUE.get_full_name(), \ 71 | "')"}) \ 72 | end \ 73 | else begin \ 74 | COPIER.copy_object(LVALUE, RVALUE); \ 75 | end \ 76 | end \ 77 | if (POLICY != UVM_DEFAULT_POLICY) \ 78 | COPIER.set_recursion_policy(prev_pol__); \ 79 | end \ 80 | end \ 81 | end 82 | 83 | `define uvm_copy_aa_object(LVALUE, RVALUE, POLICY=UVM_DEFAULT_POLICY, COPIER=copier) \ 84 | if ((POLICY == UVM_REFERENCE) || !RVALUE.size()) \ 85 | LVALUE = RVALUE; \ 86 | else begin \ 87 | LVALUE.delete(); \ 88 | foreach(RVALUE[i]) \ 89 | `uvm_copy_object(LVALUE[i], RVALUE[i], POLICY, COPIER) \ 90 | end 91 | 92 | 93 | `define uvm_copier_get_function(FUNCTION) \ 94 | function int get_``FUNCTION``_copy(uvm_object rhs, ref uvm_object lhs); \ 95 | if (m_recur_states.exists(rhs)) \ 96 | return m_recur_states[rhs].FUNCTION(lhs); \ 97 | return 0; \ 98 | endfunction : get_``FUNCTION``_copy 99 | 100 | `endif // UVM_COPIER_DEFINES_SVH 101 | -------------------------------------------------------------------------------- /src/macros/uvm_global_defines.svh: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // Copyright 2014 Synopsys, Inc. 3 | // Copyright 2010-2018 Cadence Design Systems, Inc. 4 | // Copyright 2015 NVIDIA Corporation 5 | // All Rights Reserved Worldwide 6 | // 7 | // Licensed under the Apache License, Version 2.0 (the 8 | // "License"); you may not use this file except in 9 | // compliance with the License. You may obtain a copy of 10 | // the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in 15 | // writing, software distributed under the License is 16 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 17 | // CONDITIONS OF ANY KIND, either express or implied. See 18 | // the License for the specific language governing 19 | // permissions and limitations under the License. 20 | //------------------------------------------------------------------------------ 21 | `ifndef UVM_GLOBAL_DEFINES_SVH 22 | `define UVM_GLOBAL_DEFINES_SVH 23 | 24 | // 25 | // Title -- NODOCS -- Global Macros 26 | //------------------------ 27 | // Group -- NODOCS -- Global object Macro definitions can be used in multiple locations 28 | //------------------------ 29 | // 30 | // MACRO -- NODOCS -- `UVM_MAX_STREAMBITS 31 | // 32 | // Defines the maximum bit vector size for integral types. 33 | // Used to set uvm_bitstream_t 34 | 35 | `ifndef UVM_MAX_STREAMBITS 36 | // @uvm-ieee 1800.2-2017 auto 16.2.3.8 37 | // @uvm-ieee 1800.2-2017 auto 16.4.6.1 38 | // @uvm-ieee 1800.2-2017 auto 16.5.4.8 39 | // @uvm-ieee 1800.2-2017 auto B.6.2 40 | `define UVM_MAX_STREAMBITS 4096 41 | `endif 42 | 43 | 44 | // MACRO -- NODOCS -- `UVM_PACKER_MAX_BYTES 45 | // 46 | // Defines the maximum bytes to allocate for packing an object using 47 | // the . Default is <`UVM_MAX_STREAMBITS>, in ~bytes~. 48 | 49 | `ifndef UVM_PACKER_MAX_BYTES 50 | `define UVM_PACKER_MAX_BYTES `UVM_MAX_STREAMBITS 51 | `endif 52 | 53 | //------------------------ 54 | // Group -- NODOCS -- Global Time Macro definitions that can be used in multiple locations 55 | //------------------------ 56 | 57 | // MACRO -- NODOCS -- `UVM_DEFAULT_TIMEOUT 58 | // 59 | // The default timeout for simulation, if not overridden by 60 | // or 61 | // 62 | 63 | `define UVM_DEFAULT_TIMEOUT 9200s 64 | 65 | `endif // `ifndef UVM_GLOBAL_DEFINES_SVH 66 | -------------------------------------------------------------------------------- /src/macros/uvm_reg_defines.svh: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2010-2011 Mentor Graphics Corporation 3 | // Copyright 2010-2018 Cadence Design Systems, Inc. 4 | // Copyright 2010 AMD 5 | // Copyright 2014-2015 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //---------------------------------------------------------------------- 22 | 23 | //------------------------ 24 | // File -- NODOCS -- Register Defines 25 | //------------------------ 26 | 27 | // Macro -- NODOCS -- `UVM_REG_ADDR_WIDTH 28 | // 29 | // Maximum address width in bits 30 | // 31 | // Default value is 64. Used to define the type. 32 | // 33 | `ifndef UVM_REG_ADDR_WIDTH 34 | // @uvm-ieee 1800.2-2017 auto B.6.4 35 | `define UVM_REG_ADDR_WIDTH 64 36 | `endif 37 | 38 | 39 | // Macro -- NODOCS -- `UVM_REG_DATA_WIDTH 40 | // 41 | // Maximum data width in bits 42 | // 43 | // Default value is 64. Used to define the type. 44 | // 45 | `ifndef UVM_REG_DATA_WIDTH 46 | // @uvm-ieee 1800.2-2017 auto B.6.5 47 | `define UVM_REG_DATA_WIDTH 64 48 | `endif 49 | 50 | 51 | // Macro -- NODOCS -- `UVM_REG_BYTENABLE_WIDTH 52 | // 53 | // Maximum number of byte enable bits 54 | // 55 | // Default value is one per byte in <`UVM_REG_DATA_WIDTH>. 56 | // Used to define the type. 57 | // 58 | `ifndef UVM_REG_BYTENABLE_WIDTH 59 | `define UVM_REG_BYTENABLE_WIDTH ((`UVM_REG_DATA_WIDTH-1)/8+1) 60 | `endif 61 | 62 | 63 | // Macro -- NODOCS -- `UVM_REG_CVR_WIDTH 64 | // 65 | // Maximum number of bits in a coverage model set. 66 | // 67 | // Default value is 32. 68 | // 69 | `ifndef UVM_REG_CVR_WIDTH 70 | // @uvm-ieee 1800.2-2017 auto B.6.7 71 | `define UVM_REG_CVR_WIDTH 32 72 | `endif 73 | -------------------------------------------------------------------------------- /src/macros/uvm_undefineall.svh: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2007-2011 Mentor Graphics Corporation 3 | // Copyright 2010 Synopsys, Inc. 4 | // Copyright 2007-2018 Cadence Design Systems, Inc. 5 | // All Rights Reserved Worldwide 6 | // 7 | // Licensed under the Apache License, Version 2.0 (the 8 | // "License"); you may not use this file except in 9 | // compliance with the License. You may obtain a copy of 10 | // the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in 15 | // writing, software distributed under the License is 16 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 17 | // CONDITIONS OF ANY KIND, either express or implied. See 18 | // the License for the specific language governing 19 | // permissions and limitations under the License. 20 | //---------------------------------------------------------------------- 21 | // This file undefs all macros that are defined by the UVM library. This can 22 | // be used to load uvm into multiple scopes using a single compilation. 23 | 24 | `undef UVM_BLOCKING_GET_IMP 25 | `undef UVM_BLOCKING_GET_IMP_SFX 26 | `undef UVM_BLOCKING_GET_PEEK_IMP 27 | `undef UVM_BLOCKING_PEEK_IMP 28 | `undef UVM_BLOCKING_PEEK_IMP_SFX 29 | `undef UVM_BLOCKING_PUT_IMP 30 | `undef UVM_BLOCKING_PUT_IMP_SFX 31 | `undef UVM_BLOCKING_TRANSPORT_IMP 32 | `undef UVM_BLOCKING_TRANSPORT_IMP_SFX 33 | `undef DODEEPCOPY 34 | `undef DOREFERENCECOPY 35 | `undef DOSHALLOWCOPY 36 | `undef UVM_FUNCTION_ERROR 37 | `undef UVM_GET_IMP 38 | `undef UVM_GET_PEEK_IMP 39 | `undef M_RESIZE_QUEUE_COPY 40 | `undef M_RESIZE_QUEUE_NOCOPY 41 | `undef M_RESIZE_QUEUE_OBJECT_COPY 42 | `undef M_RESIZE_QUEUE_OBJECT_NOCOPY 43 | `undef m_uvm_record_any_object 44 | `undef m_uvm_record_array_int 45 | `undef m_uvm_record_array_object 46 | `undef m_uvm_record_array_string 47 | `undef m_uvm_record_int 48 | `undef m_uvm_record_object 49 | `undef m_uvm_record_qda_enum 50 | `undef m_uvm_record_string 51 | `undef UVM_NONBLOCKING_GET_IMP 52 | `undef UVM_NONBLOCKING_GET_IMP_SFX 53 | `undef UVM_NONBLOCKING_GET_PEEK_IMP 54 | `undef UVM_NONBLOCKING_PEEK_IMP 55 | `undef UVM_NONBLOCKING_PEEK_IMP_SFX 56 | `undef UVM_NONBLOCKING_PUT_IMP 57 | `undef UVM_NONBLOCKING_PUT_IMP_SFX 58 | `undef UVM_NONBLOCKING_TRANSPORT_IMP 59 | `undef UVM_NONBLOCKING_TRANSPORT_IMP_SFX 60 | `undef UVM_PEEK_IMP 61 | `undef print_enum_field 62 | `undef print_integral_field 63 | `undef _protected 64 | `undef UVM_PUT_IMP 65 | `undef UVM_SEQ_ITEM_FUNCTION_ERROR 66 | `undef UVM_SEQ_ITEM_GET_MASK 67 | `undef UVM_SEQ_ITEM_GET_NEXT_ITEM_MASK 68 | `undef UVM_SEQ_ITEM_HAS_DO_AVAILABLE_MASK 69 | `undef UVM_SEQ_ITEM_ITEM_DONE_MASK 70 | `undef UVM_SEQ_ITEM_PEEK_MASK 71 | `undef UVM_SEQ_ITEM_PULL_IMP 72 | `undef UVM_SEQ_ITEM_PULL_MASK 73 | `undef UVM_SEQ_ITEM_PUSH_MASK 74 | `undef UVM_SEQ_ITEM_PUT_MASK 75 | `undef UVM_SEQ_ITEM_PUT_RESPONSE_MASK 76 | `undef UVM_SEQ_ITEM_TASK_ERROR 77 | `undef UVM_SEQ_ITEM_TRY_NEXT_ITEM_MASK 78 | `undef UVM_SEQ_ITEM_UNI_PULL_MASK 79 | `undef UVM_SEQ_ITEM_WAIT_FOR_SEQUENCES_MASK 80 | `undef UVM_TASK_ERROR 81 | `undef UVM_TRANSPORT_IMP 82 | `undef _UVM_CB_MSG_NO_CBS 83 | `undef _UVM_CB_MSG_NOT_REG 84 | `undef _UVM_CB_MSG_NULL_CB 85 | `undef _UVM_CB_MSG_NULL_OBJ 86 | `undef UVM_XCELIUM 87 | -------------------------------------------------------------------------------- /src/macros/uvm_version_defines.svh: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2011-2012 Paradigm Works 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2010-2013 Synopsys, Inc. 5 | // Copyright 2007-2018 Cadence Design Systems, Inc. 6 | // Copyright 2010 AMD 7 | // Copyright 2014-2015 NVIDIA Corporation 8 | // Copyright 2017 Cisco Systems, Inc. 9 | // All Rights Reserved Worldwide 10 | // 11 | // Licensed under the Apache License, Version 2.0 (the 12 | // "License"); you may not use this file except in 13 | // compliance with the License. You may obtain a copy of 14 | // the License at 15 | // 16 | // http://www.apache.org/licenses/LICENSE-2.0 17 | // 18 | // Unless required by applicable law or agreed to in 19 | // writing, software distributed under the License is 20 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 21 | // CONDITIONS OF ANY KIND, either express or implied. See 22 | // the License for the specific language governing 23 | // permissions and limitations under the License. 24 | //---------------------------------------------------------------------- 25 | 26 | `ifndef UVM_VERSION_DEFINES_SVH 27 | `define UVM_VERSION_DEFINES_SVH 28 | 29 | `define UVM_VERSION 2016 30 | 31 | 32 | // Title --NODOCS-- UVM Version Defines 33 | 34 | // Group --NODOCS-- UVM Version Ladder 35 | // The following defines are provided as an indication of 36 | // how this implementation release relates to previous UVM 37 | // implementation releases from Accellera. 38 | 39 | `ifdef UVM_ENABLE_DEPRECATED_API 40 | // Macro --NODOCS-- UVM_POST_VERSION_1_1 41 | // Indicates that this version of the UVM came after the 42 | // 1.1 versions, including the various 1.1 fix revisions. 43 | `define UVM_POST_VERSION_1_1 44 | `endif // UVM_ENABLE_DEPRECATED_API 45 | 46 | `endif // UVM_VERSION_DEFINES_SVH 47 | -------------------------------------------------------------------------------- /src/seq/uvm_push_sequencer.svh: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // Copyright 2007-2011 Mentor Graphics Corporation 3 | // Copyright 2018 Synopsys, Inc. 4 | // Copyright 2007-2018 Cadence Design Systems, Inc. 5 | // Copyright 2014-2018 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //------------------------------------------------------------------------------ 22 | 23 | 24 | //------------------------------------------------------------------------------ 25 | // 26 | // CLASS -- NODOCS -- uvm_push_sequencer #(REQ,RSP) 27 | // 28 | //------------------------------------------------------------------------------ 29 | 30 | // @uvm-ieee 1800.2-2017 auto 15.6.1 31 | class uvm_push_sequencer #(type REQ=uvm_sequence_item, RSP=REQ) 32 | extends uvm_sequencer_param_base #(REQ, RSP); 33 | 34 | typedef uvm_push_sequencer #( REQ , RSP) this_type; 35 | 36 | // Port -- NODOCS -- req_port 37 | // 38 | // The push sequencer requires access to a blocking put interface. 39 | // A continuous stream of sequence items are sent out this port, based on 40 | // the list of available sequences loaded into this sequencer. 41 | // 42 | uvm_blocking_put_port #(REQ) req_port; 43 | 44 | 45 | 46 | // @uvm-ieee 1800.2-2017 auto 15.6.3.2 47 | function new (string name, uvm_component parent=null); 48 | super.new(name, parent); 49 | req_port = new ("req_port", this); 50 | endfunction 51 | 52 | 53 | // Task -- NODOCS -- run_phase 54 | // 55 | // The push sequencer continuously selects from its list of available 56 | // sequences and sends the next item from the selected sequence out its 57 | // using req_port.put(item). Typically, the req_port would be 58 | // connected to the req_export on an instance of a 59 | // , which would be responsible for 60 | // executing the item. 61 | // 62 | task run_phase(uvm_phase phase); 63 | REQ t; 64 | int selected_sequence; 65 | 66 | fork 67 | super.run_phase(phase); 68 | forever 69 | begin 70 | m_select_sequence(); 71 | m_req_fifo.get(t); 72 | req_port.put(t); 73 | m_wait_for_item_sequence_id = t.get_sequence_id(); 74 | m_wait_for_item_transaction_id = t.get_transaction_id(); 75 | end 76 | join 77 | endtask 78 | 79 | protected virtual function int m_find_number_driver_connections(); 80 | return req_port.size(); 81 | endfunction 82 | 83 | endclass 84 | -------------------------------------------------------------------------------- /src/seq/uvm_seq.svh: -------------------------------------------------------------------------------- 1 | // 2 | //------------------------------------------------------------------------------ 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2010 Synopsys, Inc. 5 | // Copyright 2007-2018 Cadence Design Systems, Inc. 6 | // Copyright 2010 AMD 7 | // Copyright 2017 NVIDIA Corporation 8 | // All Rights Reserved Worldwide 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the 11 | // "License"); you may not use this file except in 12 | // compliance with the License. You may obtain a copy of 13 | // the License at 14 | // 15 | // http://www.apache.org/licenses/LICENSE-2.0 16 | // 17 | // Unless required by applicable law or agreed to in 18 | // writing, software distributed under the License is 19 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 20 | // CONDITIONS OF ANY KIND, either express or implied. See 21 | // the License for the specific language governing 22 | // permissions and limitations under the License. 23 | //------------------------------------------------------------------------------ 24 | 25 | `include "seq/uvm_sequence_item.svh" 26 | `include "seq/uvm_sequencer_base.svh" 27 | `include "seq/uvm_sequencer_analysis_fifo.svh" 28 | `include "seq/uvm_sequencer_param_base.svh" 29 | `include "seq/uvm_sequencer.svh" 30 | `include "seq/uvm_push_sequencer.svh" 31 | `include "seq/uvm_sequence_base.svh" 32 | `include "seq/uvm_sequence.svh" 33 | `include "seq/uvm_sequence_library.svh" 34 | 35 | typedef uvm_sequence #(uvm_sequence_item, uvm_sequence_item) uvm_default_sequence_type; 36 | typedef uvm_sequencer #(uvm_sequence_item, uvm_sequence_item) uvm_default_sequencer_type; 37 | typedef uvm_driver #(uvm_sequence_item, uvm_sequence_item) uvm_default_driver_type; 38 | typedef uvm_sequencer_param_base #(uvm_sequence_item, uvm_sequence_item) uvm_default_sequencer_param_type; 39 | -------------------------------------------------------------------------------- /src/seq/uvm_sequencer_analysis_fifo.svh: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2007-2011 Mentor Graphics Corporation 3 | // Copyright 2010 Synopsys, Inc. 4 | // Copyright 2007-2018 Cadence Design Systems, Inc. 5 | // All Rights Reserved Worldwide 6 | // 7 | // Licensed under the Apache License, Version 2.0 (the 8 | // "License"); you may not use this file except in 9 | // compliance with the License. You may obtain a copy of 10 | // the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in 15 | // writing, software distributed under the License is 16 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 17 | // CONDITIONS OF ANY KIND, either express or implied. See 18 | // the License for the specific language governing 19 | // permissions and limitations under the License. 20 | //---------------------------------------------------------------------- 21 | 22 | 23 | class uvm_sequencer_analysis_fifo #(type RSP = uvm_sequence_item) extends uvm_tlm_fifo #(RSP); 24 | 25 | uvm_analysis_imp #(RSP, uvm_sequencer_analysis_fifo #(RSP)) analysis_export; 26 | uvm_sequencer_base sequencer_ptr; 27 | 28 | function new (string name, uvm_component parent = null); 29 | super.new(name, parent, 0); 30 | analysis_export = new ("analysis_export", this); 31 | endfunction 32 | 33 | function void write(input RSP t); 34 | if (sequencer_ptr == null) 35 | uvm_report_fatal ("SEQRNULL", "The sequencer pointer is null when attempting a write", UVM_NONE); 36 | sequencer_ptr.analysis_write(t); 37 | endfunction // void 38 | endclass 39 | -------------------------------------------------------------------------------- /src/tlm1/uvm_sqr_connections.svh: -------------------------------------------------------------------------------- 1 | // 2 | //----------------------------------------------------------------------------- 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2010-2013 Synopsys, Inc. 5 | // Copyright 2007-2018 Cadence Design Systems, Inc. 6 | // Copyright 2011 AMD 7 | // Copyright 2015-2018 NVIDIA Corporation 8 | // Copyright 2012 Accellera Systems Initiative 9 | // All Rights Reserved Worldwide 10 | // 11 | // Licensed under the Apache License, Version 2.0 (the 12 | // "License"); you may not use this file except in 13 | // compliance with the License. You may obtain a copy of 14 | // the License at 15 | // 16 | // http://www.apache.org/licenses/LICENSE-2.0 17 | // 18 | // Unless required by applicable law or agreed to in 19 | // writing, software distributed under the License is 20 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 21 | // CONDITIONS OF ANY KIND, either express or implied. See 22 | // the License for the specific language governing 23 | // permissions and limitations under the License. 24 | //----------------------------------------------------------------------------- 25 | 26 | //----------------------------------------------------------------------------- 27 | // Title -- NODOCS -- Sequence Item Pull Ports 28 | // 29 | // This section defines the port, export, and imp port classes for 30 | // communicating sequence items between and 31 | // . 32 | //----------------------------------------------------------------------------- 33 | 34 | //----------------------------------------------------------------------------- 35 | // 36 | // Class -- NODOCS -- uvm_seq_item_pull_port #(REQ,RSP) 37 | // 38 | // UVM provides a port, export, and imp connector for use in sequencer-driver 39 | // communication. All have standard port connector constructors, except that 40 | // uvm_seq_item_pull_port's default min_size argument is 0; it can be left 41 | // unconnected. 42 | // 43 | //----------------------------------------------------------------------------- 44 | 45 | // @uvm-ieee 1800.2-2017 auto 15.2.2.1 46 | class uvm_seq_item_pull_port #(type REQ=int, type RSP=REQ) 47 | extends uvm_port_base #(uvm_sqr_if_base #(REQ, RSP)); 48 | `UVM_SEQ_PORT(`UVM_SEQ_ITEM_PULL_MASK, "uvm_seq_item_pull_port") 49 | `UVM_SEQ_ITEM_PULL_IMP(this.m_if, REQ, RSP, t, t) 50 | 51 | bit print_enabled; 52 | 53 | endclass 54 | 55 | 56 | //----------------------------------------------------------------------------- 57 | // 58 | // Class -- NODOCS -- uvm_seq_item_pull_export #(REQ,RSP) 59 | // 60 | // This export type is used in sequencer-driver communication. It has the 61 | // standard constructor for exports. 62 | // 63 | //----------------------------------------------------------------------------- 64 | 65 | // @uvm-ieee 1800.2-2017 auto 15.2.2.2 66 | class uvm_seq_item_pull_export #(type REQ=int, type RSP=REQ) 67 | extends uvm_port_base #(uvm_sqr_if_base #(REQ, RSP)); 68 | `UVM_EXPORT_COMMON(`UVM_SEQ_ITEM_PULL_MASK, "uvm_seq_item_pull_export") 69 | `UVM_SEQ_ITEM_PULL_IMP(this.m_if, REQ, RSP, t, t) 70 | endclass 71 | 72 | 73 | //----------------------------------------------------------------------------- 74 | // 75 | // Class -- NODOCS -- uvm_seq_item_pull_imp #(REQ,RSP,IMP) 76 | // 77 | // This imp type is used in sequencer-driver communication. It has the 78 | // standard constructor for imp-type ports. 79 | // 80 | //----------------------------------------------------------------------------- 81 | 82 | // @uvm-ieee 1800.2-2017 auto 15.2.2.3 83 | class uvm_seq_item_pull_imp #(type REQ=int, type RSP=REQ, type IMP=int) 84 | extends uvm_port_base #(uvm_sqr_if_base #(REQ, RSP)); 85 | // Function -- NODOCS -- new 86 | `UVM_IMP_COMMON(`UVM_SEQ_ITEM_PULL_MASK, "uvm_seq_item_pull_imp",IMP) 87 | `UVM_SEQ_ITEM_PULL_IMP(m_imp, REQ, RSP, t, t) 88 | 89 | endclass 90 | -------------------------------------------------------------------------------- /src/tlm1/uvm_tlm.svh: -------------------------------------------------------------------------------- 1 | // 2 | //---------------------------------------------------------------------- 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2010 Synopsys, Inc. 5 | // Copyright 2007-2018 Cadence Design Systems, Inc. 6 | // Copyright 2010 AMD 7 | // All Rights Reserved Worldwide 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the 10 | // "License"); you may not use this file except in 11 | // compliance with the License. You may obtain a copy of 12 | // the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in 17 | // writing, software distributed under the License is 18 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 19 | // CONDITIONS OF ANY KIND, either express or implied. See 20 | // the License for the specific language governing 21 | // permissions and limitations under the License. 22 | //---------------------------------------------------------------------- 23 | 24 | `include "tlm1/uvm_tlm_ifs.svh" 25 | `include "tlm1/uvm_sqr_ifs.svh" 26 | `include "base/uvm_port_base.svh" 27 | 28 | `include "tlm1/uvm_tlm_imps.svh" 29 | 30 | `include "tlm1/uvm_imps.svh" 31 | `include "tlm1/uvm_ports.svh" 32 | `include "tlm1/uvm_exports.svh" 33 | `include "tlm1/uvm_analysis_port.svh" 34 | 35 | `include "tlm1/uvm_tlm_fifo_base.svh" 36 | `include "tlm1/uvm_tlm_fifos.svh" 37 | `include "tlm1/uvm_tlm_req_rsp.svh" 38 | 39 | `include "tlm1/uvm_sqr_connections.svh" 40 | -------------------------------------------------------------------------------- /src/tlm2/uvm_tlm2.svh: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2010-2011 Mentor Graphics Corporation 3 | // Copyright 2010-2017 Synopsys, Inc. 4 | // Copyright 2010-2018 Cadence Design Systems, Inc. 5 | // All Rights Reserved Worldwide 6 | // 7 | // Licensed under the Apache License, Version 2.0 (the 8 | // "License"); you may not use this file except in 9 | // compliance with the License. You may obtain a copy of 10 | // the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in 15 | // writing, software distributed under the License is 16 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 17 | // CONDITIONS OF ANY KIND, either express or implied. See 18 | // the License for the specific language governing 19 | // permissions and limitations under the License. 20 | //---------------------------------------------------------------------- 21 | 22 | `include "tlm2/uvm_tlm2_defines.svh" 23 | `include "tlm2/uvm_tlm_time.svh" 24 | `include "tlm2/uvm_tlm2_generic_payload.svh" 25 | `include "tlm2/uvm_tlm2_ifs.svh" 26 | `include "tlm2/uvm_tlm2_imps.svh" 27 | `include "tlm2/uvm_tlm2_ports.svh" 28 | `include "tlm2/uvm_tlm2_exports.svh" 29 | `include "tlm2/uvm_tlm2_sockets_base.svh" 30 | `include "tlm2/uvm_tlm2_sockets.svh" 31 | -------------------------------------------------------------------------------- /src/tlm2/uvm_tlm2_defines.svh: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2010-2011 Mentor Graphics Corporation 3 | // Copyright 2010 Synopsys, Inc. 4 | // Copyright 2010-2018 Cadence Design Systems, Inc. 5 | // Copyright 2014-2015 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //---------------------------------------------------------------------- 22 | 23 | //---------------------------------------------------------------------- 24 | // Title -- NODOCS -- Interface Masks 25 | // 26 | // Each of the following macros is a mask that identifies which 27 | // interfaces a particular port requires or export provides. The 28 | // interfaces are identified by bit position and can be OR'ed together 29 | // for combination ports/exports. The mask is used to do run-time 30 | // interface type checking of port/export connections. 31 | //---------------------------------------------------------------------- 32 | 33 | // MACRO -- NODOCS -- `UVM_TLM_NB_FW_MASK 34 | // 35 | // Define Non blocking Forward mask onehot assignment = 'b001 36 | `define UVM_TLM_NB_FW_MASK (1<<0) 37 | 38 | // MACRO -- NODOCS -- `UVM_TLM_NB_BW_MASK 39 | // 40 | // Define Non blocking backward mask onehot assignment = 'b010 41 | `define UVM_TLM_NB_BW_MASK (1<<1) 42 | 43 | // MACRO -- NODOCS -- `UVM_TLM_B_MASK 44 | // 45 | // Define blocking mask onehot assignment = 'b100 46 | `define UVM_TLM_B_MASK (1<<2) 47 | -------------------------------------------------------------------------------- /src/tlm2/uvm_tlm2_exports.svh: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2010-2011 Mentor Graphics Corporation 3 | // Copyright 2010-2018 Synopsys, Inc. 4 | // Copyright 2010-2018 Cadence Design Systems, Inc. 5 | // Copyright 2015-2018 NVIDIA Corporation 6 | // All Rights Reserved Worldwide 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the 9 | // "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of 11 | // the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in 16 | // writing, software distributed under the License is 17 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 18 | // CONDITIONS OF ANY KIND, either express or implied. See 19 | // the License for the specific language governing 20 | // permissions and limitations under the License. 21 | //---------------------------------------------------------------------- 22 | 23 | //---------------------------------------------------------------------- 24 | // Title -- NODOCS -- UVM TLM 2 Export Classes 25 | // 26 | // This section defines the export classes for connecting TLM2 27 | // interfaces. 28 | //---------------------------------------------------------------------- 29 | 30 | 31 | // Class -- NODOCS -- uvm_tlm_b_transport_export 32 | // 33 | // Blocking transport export class. 34 | 35 | // @uvm-ieee 1800.2-2017 auto 12.3.7.1 36 | class uvm_tlm_b_transport_export #(type T=uvm_tlm_generic_payload) 37 | extends uvm_port_base #(uvm_tlm_if #(T)); 38 | `UVM_EXPORT_COMMON(`UVM_TLM_B_MASK, "uvm_tlm_b_transport_export") 39 | `UVM_TLM_B_TRANSPORT_IMP(this.m_if, T, t, delay) 40 | endclass 41 | 42 | 43 | 44 | // Class -- NODOCS -- uvm_tlm_nb_transport_fw_export 45 | // 46 | // Non-blocking forward transport export class 47 | 48 | // @uvm-ieee 1800.2-2017 auto 12.3.7.2 49 | class uvm_tlm_nb_transport_fw_export #(type T=uvm_tlm_generic_payload, 50 | type P=uvm_tlm_phase_e) 51 | extends uvm_port_base #(uvm_tlm_if #(T,P)); 52 | `UVM_EXPORT_COMMON(`UVM_TLM_NB_FW_MASK, "uvm_tlm_nb_transport_fw_export") 53 | `UVM_TLM_NB_TRANSPORT_FW_IMP(this.m_if, T, P, t, p, delay) 54 | endclass 55 | 56 | 57 | 58 | // Class -- NODOCS -- uvm_tlm_nb_transport_bw_export 59 | // 60 | // Non-blocking backward transport export class 61 | 62 | // @uvm-ieee 1800.2-2017 auto 12.3.7.3 63 | class uvm_tlm_nb_transport_bw_export #(type T=uvm_tlm_generic_payload, 64 | type P=uvm_tlm_phase_e) 65 | extends uvm_port_base #(uvm_tlm_if #(T,P)); 66 | // Function -- NODOCS -- new 67 | `UVM_EXPORT_COMMON(`UVM_TLM_NB_BW_MASK, "uvm_tlm_nb_transport_bw_export") 68 | `UVM_TLM_NB_TRANSPORT_BW_IMP(this.m_if, T, P, t, p, delay) 69 | endclass 70 | -------------------------------------------------------------------------------- /src/tlm2/uvm_tlm2_ports.svh: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright 2010-2011 Mentor Graphics Corporation 3 | // Copyright 2010-2018 Synopsys, Inc. 4 | // Copyright 2010-2018 Cadence Design Systems, Inc. 5 | // Copyright 2015-2018 NVIDIA Corporation 6 | // Copyright 2014 Cisco Systems, Inc. 7 | // All Rights Reserved Worldwide 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the 10 | // "License"); you may not use this file except in 11 | // compliance with the License. You may obtain a copy of 12 | // the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in 17 | // writing, software distributed under the License is 18 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 19 | // CONDITIONS OF ANY KIND, either express or implied. See 20 | // the License for the specific language governing 21 | // permissions and limitations under the License. 22 | //---------------------------------------------------------------------- 23 | 24 | //---------------------------------------------------------------------- 25 | // Title -- NODOCS -- UVM TLM 2 ports 26 | // 27 | // The following defines UVM TLM 2 port classes. 28 | // 29 | //---------------------------------------------------------------------- 30 | 31 | // class -- NODOCS -- uvm_tlm_b_transport_port 32 | // 33 | // Class providing the blocking transport port. 34 | // The port can be bound to one export. 35 | // There is no backward path for the blocking transport. 36 | 37 | // @uvm-ieee 1800.2-2017 auto 12.3.6.1 38 | class uvm_tlm_b_transport_port #(type T=uvm_tlm_generic_payload) 39 | extends uvm_port_base #(uvm_tlm_if #(T)); 40 | `UVM_PORT_COMMON(`UVM_TLM_B_MASK, "uvm_tlm_b_transport_port") 41 | `UVM_TLM_B_TRANSPORT_IMP(this.m_if, T, t, delay) 42 | endclass 43 | 44 | 45 | // class -- NODOCS -- uvm_tlm_nb_transport_fw_port 46 | // 47 | // Class providing the non-blocking backward transport port. 48 | // Transactions received from the producer, on the forward path, are 49 | // sent back to the producer on the backward path using this 50 | // non-blocking transport port. 51 | // The port can be bound to one export. 52 | // 53 | 54 | // @uvm-ieee 1800.2-2017 auto 12.3.6.2 55 | class uvm_tlm_nb_transport_fw_port #(type T=uvm_tlm_generic_payload, 56 | type P=uvm_tlm_phase_e) 57 | extends uvm_port_base #(uvm_tlm_if #(T,P)); 58 | `UVM_PORT_COMMON(`UVM_TLM_NB_FW_MASK, "uvm_tlm_nb_transport_fw_port") 59 | `UVM_TLM_NB_TRANSPORT_FW_IMP(this.m_if, T, P, t, p, delay) 60 | endclass 61 | 62 | // class -- NODOCS -- uvm_tlm_nb_transport_bw_port 63 | // 64 | // Class providing the non-blocking backward transport port. 65 | // Transactions received from the producer, on the forward path, are 66 | // sent back to the producer on the backward path using this 67 | // non-blocking transport port 68 | // The port can be bound to one export. 69 | // 70 | 71 | // @uvm-ieee 1800.2-2017 auto 12.3.6.3 72 | class uvm_tlm_nb_transport_bw_port #(type T=uvm_tlm_generic_payload, 73 | type P=uvm_tlm_phase_e) 74 | extends uvm_port_base #(uvm_tlm_if #(T,P)); 75 | 76 | // Function -- NODOCS -- new 77 | `UVM_PORT_COMMON(`UVM_TLM_NB_BW_MASK, "uvm_tlm_nb_transport_bw_port") 78 | `UVM_TLM_NB_TRANSPORT_BW_IMP(this.m_if, T, P, t, p, delay) 79 | endclass 80 | -------------------------------------------------------------------------------- /src/uvm.sv: -------------------------------------------------------------------------------- 1 | // 2 | //---------------------------------------------------------------------- 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2010-2011 Synopsys, Inc. 5 | // Copyright 2007-2018 Cadence Design Systems, Inc. 6 | // Copyright 2010 AMD 7 | // Copyright 2013-2018 NVIDIA Corporation 8 | // All Rights Reserved Worldwide 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the 11 | // "License"); you may not use this file except in 12 | // compliance with the License. You may obtain a copy of 13 | // the License at 14 | // 15 | // http://www.apache.org/licenses/LICENSE-2.0 16 | // 17 | // Unless required by applicable law or agreed to in 18 | // writing, software distributed under the License is 19 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 20 | // CONDITIONS OF ANY KIND, either express or implied. See 21 | // the License for the specific language governing 22 | // permissions and limitations under the License. 23 | //---------------------------------------------------------------------- 24 | 25 | `include "uvm_pkg.sv" -------------------------------------------------------------------------------- /src/uvm_macros.svh: -------------------------------------------------------------------------------- 1 | // 2 | //---------------------------------------------------------------------- 3 | // Copyright 2007-2013 Mentor Graphics Corporation 4 | // Copyright 2010-2014 Synopsys, Inc. 5 | // Copyright 2007-2018 Cadence Design Systems, Inc. 6 | // Copyright 2010-2018 AMD 7 | // Copyright 2013-2018 NVIDIA Corporation 8 | // All Rights Reserved Worldwide 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the 11 | // "License"); you may not use this file except in 12 | // compliance with the License. You may obtain a copy of 13 | // the License at 14 | // 15 | // http://www.apache.org/licenses/LICENSE-2.0 16 | // 17 | // Unless required by applicable law or agreed to in 18 | // writing, software distributed under the License is 19 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 20 | // CONDITIONS OF ANY KIND, either express or implied. See 21 | // the License for the specific language governing 22 | // permissions and limitations under the License. 23 | //---------------------------------------------------------------------- 24 | 25 | `ifndef UVM_MACROS_SVH 26 | `define UVM_MACROS_SVH 27 | 28 | // 29 | // Any vendor specific defines go here. 30 | // 31 | 32 | `ifdef MODEL_TECH 33 | `ifndef QUESTA 34 | `define QUESTA 35 | `endif 36 | `endif 37 | 38 | `ifndef UVM_USE_STRING_QUEUE_STREAMING_PACK 39 | `define UVM_STRING_QUEUE_STREAMING_PACK(q) uvm_pkg::m_uvm_string_queue_join(q) 40 | `endif 41 | 42 | `ifndef QUESTA 43 | `define uvm_typename(X) $typename(X) 44 | `else 45 | `define uvm_typename(X) $typename(X,39) 46 | `endif 47 | 48 | `ifdef VCS 49 | `endif 50 | 51 | 52 | // cadence simulators xcelium/inca 53 | `ifndef XCELIUM 54 | `ifdef INCA 55 | `define UVM_XCELIUM 56 | `define UVM_USE_PROCESS_CONTAINER 57 | `endif 58 | `endif 59 | `ifdef XCELIUM 60 | `define UVM_XCELIUM 61 | `define DPI_COMPATIBILITY_VERSION_1800v2005 62 | `endif 63 | 64 | `define uvm_delay(TIME) #(TIME); 65 | 66 | 67 | `include "macros/uvm_version_defines.svh" 68 | `include "macros/uvm_global_defines.svh" 69 | `include "macros/uvm_message_defines.svh" 70 | `include "macros/uvm_phase_defines.svh" 71 | `include "macros/uvm_printer_defines.svh" 72 | `include "macros/uvm_comparer_defines.svh" 73 | `include "macros/uvm_recorder_defines.svh" 74 | `include "macros/uvm_resource_defines.svh" 75 | `include "macros/uvm_packer_defines.svh" 76 | `include "macros/uvm_copier_defines.svh" 77 | `ifdef UVM_ENABLE_DEPRECATED_API 78 | `include "deprecated/macros/uvm_object_defines.svh" 79 | `else 80 | `include "macros/uvm_object_defines.svh" 81 | `endif 82 | `include "macros/uvm_tlm_defines.svh" 83 | `include "macros/uvm_sequence_defines.svh" 84 | `include "macros/uvm_callback_defines.svh" 85 | `include "macros/uvm_reg_defines.svh" 86 | 87 | `ifdef UVM_ENABLE_DEPRECATED_API 88 | `include "deprecated/macros/uvm_sequence_defines.svh" 89 | `endif 90 | 91 | `endif 92 | -------------------------------------------------------------------------------- /src/uvm_pkg.sv: -------------------------------------------------------------------------------- 1 | // 2 | //---------------------------------------------------------------------- 3 | // Copyright 2007-2011 Mentor Graphics Corporation 4 | // Copyright 2011 Synopsys, Inc. 5 | // Copyright 2007-2018 Cadence Design Systems, Inc. 6 | // Copyright 2013 NVIDIA Corporation 7 | // All Rights Reserved Worldwide 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the 10 | // "License"); you may not use this file except in 11 | // compliance with the License. You may obtain a copy of 12 | // the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in 17 | // writing, software distributed under the License is 18 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 19 | // CONDITIONS OF ANY KIND, either express or implied. See 20 | // the License for the specific language governing 21 | // permissions and limitations under the License. 22 | //---------------------------------------------------------------------- 23 | `ifndef UVM_PKG_SV 24 | `define UVM_PKG_SV 25 | 26 | `include "uvm_macros.svh" 27 | 28 | package uvm_pkg; 29 | 30 | `include "dpi/uvm_dpi.svh" 31 | `include "base/uvm_base.svh" 32 | `include "dap/uvm_dap.svh" 33 | `include "tlm1/uvm_tlm.svh" 34 | `include "comps/uvm_comps.svh" 35 | `include "seq/uvm_seq.svh" 36 | `include "tlm2/uvm_tlm2.svh" 37 | `include "reg/uvm_reg_model.svh" 38 | 39 | endpackage 40 | 41 | `endif 42 | --------------------------------------------------------------------------------