我来自 Verilog-95 背景,我正试图弄清楚我不必再跳过哪些 Verilog-95 箍。
在 Verilog-95 中编写带有异步设置和复位的触发器的明显方法是:
always @(posedge clk or negedge resetb or negedge setb) begin
if (!resetb) q <= 0;
else if (!setb) q <= 1;
else q <= d;
end
这适用于综合。但是,如果我们同时断言 resetb 和 setb,然后在取消断言 setb 之前取消断言 resetb,这在模拟中不起作用,因为这些信号中的任何一个都没有姿势触发。我们需要添加以下内容(取决于您的综合工具),以使模拟与综合相匹配:
// synopsys translate_off
always @(resetb or setb)
if (resetb && !setb) force q = 1;
else release q;
// synopsys translate_on
是否有一个 SystemVerilog 结构可以让您在没有这些额外垃圾的情况下做到这一点?更好的是,在 Verilog-95 中是否有一种直接的方法?