Professional Documents
Culture Documents
OVM Methodology
OVM Methodology
OVM Methodology
March09
What is OVM??
Open Verification Methodology is combine effort from Mentor Graphics (AVM) and Cadence (URM).
OVM Features
Provides reusable components (base class libraries) Use TLM interface communication between different components Data Design : Infrastructure for class property abstracting and
simplifying the user code for setting, getting, and printing (text and gui) property variables
OVM Features
Coverage Driven Verification Provide base classes for each functional aspect of verification environment. Provides inbuilt report properties for unified reporting and messages. Implements OOP Factory method.
Can be randomized and constrained. Ovm_sequence_item inherits from ovm_transaction Adds a property other than inherited one Sequencers and Drivers use ovm_sequence_item
Driver (ovm_driver)
Drivers role is to drive the data items to the bus following interface protocol Gets transactions from sequencer. Derive pins at the DUT (using interface) and based on the transaction received.
Sequencer (ovm_sequencer)
Advanced stimulus generator, controls the data items that are provided to driver By default, is a simple stimulus generator that provide random data transaction to driver a sequencer captures important randomization requirements outof-the-box
Monitor (ovm_monitor)
Is a passive entity that samples the DUT signals. Can includes coverage information and protocol checkers. Creates a trancation and send it to other components (scoreboard, coverage collectors etc) Check status information and events
Agent (ovm_agent)
Encapsulate driver, monitor and sequencer. Has an active mode and passive mode (is_active). Passive agent only monitors DUT. Should be configurable so that they can be made active/passive
Environment (ovm_env)
Encapsulates a number of drivers, monitors, agents, scoreboards. Has properties to customize its components behavior (eg changing an agent from active to passive) Environments can be hierarchical and contain more env.
TLM
Defines Semantics/Behaviors for communicating transaction between components. Provides Transfer of Transactions thru standard interfaces
Ports: Defines the set of Methods (API) to be used for a particular connection . Export: Supplies the implementation of those methods. Imp: Provides implementations of the methods in tlm_if_base to Ports and exports if they require it.
TLM
TLM Components
ovm_port_base
ovm_*_export
ovm_*_port
ovm_*_imp
tlm_fifo
tlm_req_resp_channel
analysis_fifo
tlm_transport_channel
TLM
Uni-directional Interfaces
Bi-directional Interfaces
Channels
TLM example
Producer
tlm_fifo
Consumer
class producer extends ovm_component; ovm_blocking_put_port #( int ) put_port; task run(); for( int i = 0; i < 10; i++ ) begin $display("about to put %d",i); put_port.put( i ); end endtask; endclass
class consumer extends ovm_component; ovm_blocking_get_port #( int ) get_port; task run(); for( int i = 0; i < 10; i++ ) begin $display(Just got %d",i); get_port.get( i ); end endtask; endclass
TLM example
class env; producer p = new; consumer c = new; tlm_fifo #( int ) f = new; function void connect; p.put_port = f.blocking_put_export; c.get_port = f.blocking_get_export; endfunction endclass
ovm_test
Individual test-cases inherit from this class. Each test-case instantiates environments and configures them. Top level TB instantiates interfaces that connect to DUT. Instantiate DUT Call run_test()
Test-Bench
+OVM_TESTNAME = (select which ovm_test class to instantiate and run Run_test() is a method from ovm_root that is automatically instantiated.