2011年6月16日 星期四

UVM Sequence再了解(六)

UVM初始的三個Sequence(0,1,2)

















UVM初始的三個Sequence


uvm_random_sequence :

This sequence randomly selects and executes a sequence from the sequencer sequence library, excluding uvm_random_sequence itself, and uvm_exhaustive_sequence. From the above image, from sequence id 2 to till the last sequence, all the sequences are executed randomly. If the "count" variable of the sequencer is set to 0, then non of the sequence is executed. If the "count" variable of the sequencer is set to -1, then some random number of sequences from 0 to "max_random_count" are executed. By default "max_random_count" is set to 10. "Count" and "max_random_count" can be changed using set_config_int().

The sequencer when automatically started executes the sequence which is point by default_sequence. By default default_sequence variable points to uvm_random_sequence.

uvm_exhaustive_sequence:

This sequence randomly selects and executes each sequence from the sequencers sequence library once in a randc style, excluding itself and uvm_random_sequence.

uvm_simple_sequence:

This sequence simply executes a single sequence item.


注意事項

一.
Setting the count config property, using uvm_config_int(, “count”,
) will result in a deprecation warning. This variable is only used for
controlling the string-based “default_sequence” and the built-in random
sequence, so it can safely be removed if the alternative default sequence in 1 is
used (and random sequence is not being used). A count setting of 0 may be
safely removed because the uvm_random_sequence is no longer started by default
if the user does not specify a default sequence.

二.
Message: “count config parameter is deprecated and not part of the UVM
standard"
Reason: The max_random_count configuration parameter was used in a set_config_int
call in order control the number of iterations of the uvm_random_sequence (the old
default sequence if no user default sequence was set).
Example:
function void mytest::build();
//設定uvm_random_sequence的執行數目
set_config_int(“agent.seqr”, “max_random_count”, 10);

endfunction
Resolution: A sequence library object should be used to generate the random
sequence; the sequence library object can be set as the run phase’s default sequence
with an appropriate setting for the number of iterations.

三.
Message: “max_random_depth config parameter is deprecated and not part of the
UVM standard"
Reason: The max_random_depth configuration parameter was used in a set_config_int
call in order control the maximum sequence depth when uvm_random_sequence is
being used (e.g. the number of times that a random sequence is itself allowed to create
a uvm_random_sequence as a sub sequence).
Example:
function void mytest::build();
set_config_int(“agent.seqr”, “max_random_depth”, 3);

endfunction
Resolution: A sequence library object should be used to generate the random
sequence; the sequence library object can be set as the run phase’s default sequence
with an appropriate settings to contain the subsequence depth.


沒有留言: