我正在构建UART验证环境。我有两个顺序:
vr_ad_sequenceuart_sequence这两个序列,他们的驱动程序和BFMs工作正常。但是,当我创建一个只使用配置序列的简单测试时,DUT是由验证环境驱动的(而且没有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吗?谢谢你的帮助
发布于 2017-12-14 11:58:16
在Specman文档中有一个例子,解释说:
主序列创建任意类型的计数序列,从当前加载的序列中随机选择。
MAIN序列也在它自己的部分中描述:
主序列子类型直接定义在序列驱动程序下面,默认情况下启动。它是整个序列树的根。
它的代码是:
extend MAIN sequence_name {
count: uint;
!sequence: sequence_name;
keep soft count > 0;
keep soft count <= MAX_RANDOM_COUNT;
keep sequence.kind not in [RANDOM, MAIN];
body() @driver.clock is only {
for i from 1 to count do {
do sequence;
};
};
};通过扩展它并覆盖它的body(),您将禁用自动生成的启动随机序列的代码。
还可以通过在UART序列驱动程序中约束MAIN序列来禁用gen_and_start_main序列。
https://stackoverflow.com/questions/47809464
复制相似问题