我正在构建UART验证环境。我有 2 个序列:
- 用于驱动 DUT UART 配置 -
vr_ad_sequence
- 用于将帧驱动到 DUT UART Rx -
uart_sequence
两个序列、它们的驱动程序和 BFM 都可以正常工作。但是,当我创建一个仅使用配置序列的简单测试时,DUT UART Rx 由验证环境驱动(也没有扩展MAIN uart_sequence
)!测试看起来像这样:
// The test that drives ALSO uart_sequence
extend MAIN vr_ad_sequence { // Configuration sequence
body()@driver.clock is only {
// Configuration logic
};
};
我成功阻止 Rx 被驱动的唯一方法是“覆盖” MAIN uart_sequence body()
:
// The test that does not drives UART Rx
extend MAIN uart_sequence { // Rx sequence
body() @driver.clock is only {
};
};
extend MAIN vr_ad_sequence { // Configuration sequence
body()@driver.clock is only {
// Configuration logic
};
};
以下是在验证环境中定义 UART Rx 序列、驱动程序和 BFM 的方式:
sequence uart_sequence using
item = uart_frame_s,
created_driver = uart_driver_u;
extend uart_driver_u {
event clock is only rise(port_clk$) @sim;
};
extend uart_rx_agent_u {
driver: uart_driver_u is instance;
};
extend uart_rx_agent_u {
uart_monitor : uart_rx_monitor_u is instance; // like uvm_monitor
uart_bfm : uart_rx_bfm_u is instance; // like uvm_bfm
};
extend uart_rx_bfm_u {
!cur_frame: uart_frame_s;
run() is also {
start execute_items();
};
execute_items() @rx_clk is {
while (TRUE) do{
cur_frame = p_agent.driver.get_next_item();
drive_frame(cur_frame);
};
};
drive_frame(cur_frame : uart_frame_s) @rx_clk is {
// Drive frame logic
};
};
你知道为什么uart_sequence
即使它MAIN
没有被扩展,为什么还要驱动它的 BFM?谢谢您的帮助