我没有太多关于系统verilog的知识,我有以下问题。
据我所知,如果在always块的灵敏度列表中触发了复位信号的边沿,那么该复位信号的复位类型是‘异步’我需要知道,always_latch的复位信号的复位类型是什么?
module test (input in_1,in_2,rst,clk,sig, output reg out_1,out_2,out_3);
always_latch
begin
if(~rst) // what is the reset type of this reset signal.?
out_3 <= 0;
else if(~sig)
out_3 <= in_1;
end
wire x,x2;
second uu(x, x2, rst, clk, sig, out_1);
endmodule
module second(input i_1,i_2,r,c,sig, output reg o_1);
reg z,zz;
always@(negedge c or negedge r)
begin
if(~r) // asynchronous reset type
z <= 0;
else
z <= i_1;
end
always@(posedge c or negedge r)
begin
if(~r) // asynchronous reset type
zz <= 0;
else
zz <= i_1;
end
endmodule发布于 2021-06-15 14:39:32
这两个重置都是异步的。您不能在锁存器中进行同步复位,因为没有时钟。示例中的always_latch结构创建一个隐式敏感度列表
always @(rst or sig or in_1)always敏感度列表具有negedge r的原因是过滤掉r上升沿上的变化。如果您没有该滤波器,r的上升沿将触发该块,并被视为与时钟沿相同。
https://stackoverflow.com/questions/67980239
复制相似问题