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
|