Your Ad Here

Wednesday, April 8, 2009

specman elite possible ways of generating fields

Specman Elite e-language supports three possible ways of generating the fields.

· Random generation

· Directed-Random generation

· Directed generation

Random generation:

The Random generation is not supported by constraints.

Ex: address: int (bits: 32);

Directed-Random generation:

The Directed-Random generation supports the generation by constraining to a range of values. Here, even though the generation is random it is been restricted within the Range of 1000 to 2000 address locations.

Ex: keep address in [0x1000..0x2000];

Directed generation:

The Directed generation supports the generation by constraining to a specific value.Here, the generation of address value is specified to the location of 1245.

Ex: keep address = = 0x1245;


Soft Constraints

For constraints that might need to be overridden, we use soft constraints. Basically, Soft constraints are obeyed if not contradicted by hard constraints.
The last loaded soft constraint prevails if there is a contradiction with other soft constraints.

Syntax :

keep soft Boolean-expression;

Ex: keep soft length = = 64;

· Soft constraints are used to define the default range of values of fields:

Ex: keep soft packet_length in [60..100];

· The test writer has the option to ignore the soft constraint by using predefined method reset_soft().

Ex: keep packet_length.reset_soft ();

· Soft constraints are used to set initial settings for tests

Ex: keep soft errors = = FALSE;

No comments:

Post a Comment