There are two ways to generate data:1.Pre-run generation2.On-the-fly generation

Pre-Run Generation

-Specman Elite solves the constraints for each field under sys and randomly generates values for them when the ‚~@~XTest‚~@~Y command is issued.-Pre-run generation is automatic for every struct and unit whose instance is under sys.-Structs and units generated in this way are static in nature.-User can also suppress pre-run generation using ‚~@~\!‚~@~] (do not generate)-Advantage: Quickly shows what the generator will produce

On-The-Fly Generation

-Is activated explicitly using gen action.-Can be used to generate fields or method variables.-Saves memory when generated structs are disposable.-Is recommended for generating stimulus data structs.-Cannot be used to generate units.-On-the-fly generation is done with the gen action, which can be called from methods or TCMs. gen expression [keeping {constraint-block}]; -Lets the generator react to the DUT current state