virtual sequence 和virtual sequencer
时间: 2023-12-17 19:41:57 浏览: 136
Virtual sequence和virtual sequencer是在测试平台体系结构中添加的一层。它们不是UVM中的预定义类,而是对现有UVM类的扩展。默认情况下,uvm_sequence类有一个名为m_sequencer的句柄,其类型为uvm_sequencer base。从uvm_sequence类扩展的类也是如此。而virtual sequencer类将具有物理sequencer的句柄,用于指向环境build phase构建阶段的物理sequencer。而virtual sequence具有物理sequencer和virtual sequencer的句柄。\[1\]
在使用virtual sequence时,需要将泛型m_sequencer指向virtual sequencer,并调用virtual sequence的body方法。由于m_sequencer是父类型,而virtual sequencer是子类型,为了访问子类的内容,需要使用另一个子类句柄,并将m_sequencer动态转换为本地子句柄。这就是为什么在virtual sequence中需要virtual sequencer的本地句柄。\[2\]
需要注意的是,虽然virtual sequence和virtual sequencer在测试平台中起到了重要的作用,但它们只是对现有UVM类的扩展,并没有单独的virtual sequence或virtual sequencer类。\[3\]
#### 引用[.reference_title]
- *1* *2* *3* [virtual sequence 和virtual sequencer](https://blog.csdn.net/weixin_46076353/article/details/127015624)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文