squence由data item组成, 不同的组合可以产生不同的transaction, 所以便可以产生不同的激励。如下图所示:
下面是使用sequence的步骤:
- 创建一个自定义的sequence, 派生自[uvm_sequence]。 用factory机制注册, 并且创建new函数:
1 | // my_sequence is user-given name for this class that has been derived from "uvm_sequence" |
- 申明默认的sequencer来执行sequence的transaction:
1 | // [Optional] my_sequencer is a pre-defined custom sequencer before this sequence definition |
- 定义body
1 | // [Recommended] Make this task "virtual" so that child classes can override this task definition |