Home Methodologies AVM Tutorial Environment
Main Menu
Home
System Verilog
Verilog
Methodologies
    - OVM Tutorial
    - OVM Example
    - UVM
    - VMM
    - VMM RAL
    - VMM Example
    - AVM Tutorial
        -- Introduction
        -- AVM Components
        -- Analysis Port export
        -- TLM In AVM
        -- Analysis Port
        -- TLM Channels
        -- Components
        -- Transaction
        -- Transactor
        -- Environment
        -- Messaging
Open Vera
Digital Concepts
Verification Basics
Protocols
Scripting
Articles
Videos
Interview Questions
Computer Architechture
C and C++
Blog/Article
AsicGuru Blog
Tags Cloud
Ads
Usefull Sites
Know Your IP/Location
Local Information India
Buy Car/Inverter Batteries
Real Estate India
Sports Accessories India
AVM environment class
Share This Articale:

AVM Environment Class :

Base avm_env class controls the environment
Constructor instantiates and ‘new’s all components
virtual do_test() method controls building and execution
Connects all components, virtual interfaces, etc.
Configures components and DUT
Starts all avm_verification_components
Runs the test
Reports results
Stops everything and exits
User defines all application-specific behavior by extending the avm_env class and defining the method bodies

 

virtual class avm_env;
    virtual task do_test;
    // connect up exports first ( bottom up )
    avm_named_component::export_top_level_connections;
    // then connect "my" children's ports to their siblings' exports
    connect();

    // then propagate port connections down through the
    // hierarchy ( top down )
    avm_named_component::import_top_level_connections;
    configure;

    // execution phases
    avm_verification_component::run_all;
    execute;

    // finish
    report;
    avm_named_component::report_all;
    avm_verification_component::kill_all;
    Endtask

// connect must be overloaded in any subclass. It connects
    // up the top level objects of the testbench.
    pure virtual function void connect;
        // configure is a function - ie no interaction with the
        // scheduler is allowed.
    virtual function void configure;
        return;
    endfunction

    // The execute task is where stimulus generation is
    // started and stopped, and scoreboards and coverage
    // objects are examined from within the testbench, if this
    // is required.
    pure virtual task execute; // execute phase
   
    // The report function is used to report on the status of
    // the avm_env subclass at the end of simulation.
    virtual function void report;
        avm_report_message("avm_env" , "Finished Test");
        return;
    endfunction
endclass

This Articles is written/submitted by puneet (Puneet Aggarwal). You can also contribute to Asicguru.com. Click here to start


Prev << Transactor

Next >> Messaging

 
Login/Register
Register
Sign In
Login with :-
gmail-yahoo-twitter-facebook
| | |  
  •  
  • Bookmark
    ADS