Languages/UVM/Definition

From UIT
Revision as of 11:27, 21 March 2012 by Guo (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Naming conventions

Naming conventions used at HES-SO Valais Wallis:

  • lower case letters with words separated by _ (underscore)
  • macros and constants can be upper case
  • following markers shall be used:
Suffix Construct
_h Handle
_t Type
_if Interface
_vi Virtual Interface
_sb Scoreboard
_env Environment
_tf Transfer
_port Port
_aport Analysis Port
_eport Export
_c Constant
_p Parameter
_cnt Counter

How to use UVM in Questa

The easiest approach is to import the UVM package with:

//add this line to your SV code
import uvm_pkg::*;

And that's it! This will use the built-in UVM class library. If you need to change this to UVM 1.1, then you can remap mtiUvm to the pre-compiled UVM 1.1 class library.

vmap mtiUvm \$MODEL_TECH/../uvm

Another approach is to compile the UVM package to your work library:

vlog +incdir+\$MODEL_TECH/../verilog_src/uvm-2.0.1/src \$MODEL_TECH/../verilog_src/uvm-2.0.1/src/uvm_pkg.sv

or...

vlog +incdir \$MODEL_TECH/../verilog_src/uvm-1.1/src \$MODEL_TECH/../verilog_src/uvm-1.1/src/uvm_pkg.sv

A more general approach which is portable between different compilators and therefore should be used is the following:

`ifdef INCA 
  // Cadence IUS
  `include "uvm.svh"
`else
  // Synopsys VCS and Mentor Questa
  import uvm_pkg::*;
`endif

Reporting

Verbosity

Any report whose verbosity exceeds the verbosity level of the reporter will be ignored.

Default values defined in uvm_report_defines.svh:

UVM_NONE 0
UVM_LOW 100
UVM_MEDIUM 200
UVM_HIGH 300
UVM_FULL 400
UVM_DEBUG 500

Default values for the different report functions defined in uvm_report_global.svh:

uvm_report_info UVM_MEDIUM
uvm_report_warning UVM_MEDIUM
uvm_report_error UVM_LOW
uvm_report_fatal UVM_NONE

Verbosity is ignored for warnings, errors, and fatals to ensure users do not inadvertently filter them out. It remains in the methods for backward compatibility.

Agent

Contains Driver, Sequencer and Monitor.

Active

Drives DUT signals. Driver, Sequencer and Monitor instantiated.

Passive

Checking and coverage. Only Monitor instantiated.

Driver

Converts a stream of transactions into pin activity.

Monitor

Monitors pin activity and converts it to a stream of transactions.

Sequencer

Produces sequence of transactions/transfers (sequence_items).

Sequence

Is data which changes dynamically over time, executed on a Sequencer. Has body() task, which generates stream of sequence_items.

Virtual Sequencer

Is not linked to a driver. Is used to coordinate the execution of sequences, not on sequence items, on other sequencers.

Virtual Sequence

Has no data items. Runs on virtual sequencer.

Personal tools
Namespaces
Variants
Actions
Navigation
Browse
Toolbox