In the first chapter of the specman tutorial, we saw the 'e' verification components. All the 'e' verification components - Generator, Driver, Collector, Data checker and Monitor - were directly instantiated under 'sys'. As the verification environment that is designed for a module level will be needed at the chip level, this is going to be a problematic. All the 'e' verification components discussed in this tutorial should be automatically transported to a different level of verification. Therefore, instead of directly instantiating all these components under 'sys', it is better to create an intermediate level of hierarchy called 'env' under 'sys'. All the verification components are instantiated under 'env'. Thus one can transport 'env' to any level of hierarchy without having to transport each individual components.
Execution Flow
To understand how 'e' code are executed, it is necessary to understand the execution phases. Upon issuance of 'test' command, Specman Elite goes through five execution phases. Each execution phase is called in a specific order and is represented by a pre-defined method in Specman Elite.
Test Phases
Initialization - General Preparations and Configurations
The initialization phase calls the sys.setup() method. Any 'e' simulator configuration options are specified by the extension of sys.setup() method in this phase. For example, the seed value for the generation is set and the coverage mode is also set by the extension of this method call.
extend sys {
setup() is also {
set_config(cover, mode, on); // Turn On the coverage
set_config(print, scale, ns); // To scale the time portion of the message to ns
};
};
Pre Run Generation - Memory allocation, Instantiation and Generation of data elements
Each of these methods can be extended to include the method calls. Any computations that are done - after the generation of data elements - must be done by the extension of post_generate() method.
Simulation Run - Actual Simulation Occurrence
Any TCMs are executed in this phase. The pre-defined run() method is called for every struct and unit in the 'sys' hierarchy. One can initiate the simulation time activity by starting a TCM from the run() method of a struct or unit. For any simulation, at least one main TCM must be started from run() method of a top level unit. Since, run() method is not a TCM, you can't call a TCM from run(), instead you can only start a TCM. This main TCM then starts/calls other TCMs to control the execution.
Post Run Check - Preparation for Checking & Performs Checking
Finalization - Simulation Clean up, Coverage and Reporting
Execution Flow
To understand how 'e' code are executed, it is necessary to understand the execution phases. Upon issuance of 'test' command, Specman Elite goes through five execution phases. Each execution phase is called in a specific order and is represented by a pre-defined method in Specman Elite.
Test Phases
Initialization - General Preparations and Configurations
The initialization phase calls the sys.setup() method. Any 'e' simulator configuration options are specified by the extension of sys.setup() method in this phase. For example, the seed value for the generation is set and the coverage mode is also set by the extension of this method call.
extend sys {
setup() is also {
set_config(cover, mode, on); // Turn On the coverage
set_config(print, scale, ns); // To scale the time portion of the message to ns
};
};
Pre Run Generation - Memory allocation, Instantiation and Generation of data elements
- The Pre-Run generation phase calls the init() and pre_generate() methods for every struct instance under 'sys'.
- Then the generation of data elements occurs.
- The Pre-Run generation phase calls post_generate() method for every struct instance under 'sys'.
Each of these methods can be extended to include the method calls. Any computations that are done - after the generation of data elements - must be done by the extension of post_generate() method.
Simulation Run - Actual Simulation Occurrence
Any TCMs are executed in this phase. The pre-defined run() method is called for every struct and unit in the 'sys' hierarchy. One can initiate the simulation time activity by starting a TCM from the run() method of a struct or unit. For any simulation, at least one main TCM must be started from run() method of a top level unit. Since, run() method is not a TCM, you can't call a TCM from run(), instead you can only start a TCM. This main TCM then starts/calls other TCMs to control the execution.
Post Run Check - Preparation for Checking & Performs Checking
Finalization - Simulation Clean up, Coverage and Reporting
1 comment:
elaborate on the post-run check phase.........
Thank You,.....
Post a Comment