svt_dynamic_ms_scenario_election Class Reference

Inheritance diagram for class svt_dynamic_ms_scenario_election:

List of all members.


Detailed Description

This class implements a multi-stream scenario election class which avoids disabled scenarios. It is designed to be used with svt_dynamic_ms_scenario instances.



Public Member Functions

function void  new ( bit use_round_robin = 1 )
function void  post_randomize ( )
function void  pre_randomize ( )

Public Attributes

bit  scenario_set_enabled [$] 

Constraints

constraint  random_next  ( )


Member Function Documentation

  function void
 svt_dynamic_ms_scenario_election::new

 (  bit use_round_robin = 1  ) 


CONSTRUCTOR: In addition to constructing the objects, controls whether the randomization relies on the VMM 'round_robin' constraint to choose the next scenario, or if it simply picks a random next scenario.

use_round_robin - Indicates whether the next scenario should be chosen via round_robin (1) or purely via randomization (0). Defaults to 1 since that is the VMM default.

  function void
 svt_dynamic_ms_scenario_election::post_randomize

 (   ) 


Watch out for disabled scenarios. Move forward to an enabled one.

  function void
 svt_dynamic_ms_scenario_election::pre_randomize

 (   ) 


Setup scenario_set_enabled for use by randomization and post_randomize.

Member Attribute Documentation

 bit  attribute
 svt_dynamic_ms_scenario_election::scenario_set_enabled[$]


Flags indicating whether the scenario_sets have been enabled/disabled, populated in pre_randomize.

Member Constraint Documentation

  constraint
 svt_dynamic_ms_scenario_election::random_next


Constraint that causes select to be chosen randomly while insuring that the selected scenario is enabled.

constraint random_next {
    foreach (scenario_set_enabled[scen_ix]) {
      (scen_ix != select) ||
      (scenario_set_enabled[scen_ix] != 0);
    }
  }