always_latch 的复位信号的复位类型是什么?

What is the reset type of the reset signal of an always_latch .?

我对system verilog了解不多,有以下问题。

据我所知,如果在 always 块的敏感列表中触发了复位信号的边沿,则该复位信号的复位类型为 'asynchronous' 我需要知道,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

两次重置都是异步的。由于没有时钟,您不能在锁存器中进行同步复位。您示例中的 always_latch 构造创建了一个隐式敏感度列表

always @(rst or sig or in_1)

always 敏感列表之所以有 negedge r 是为了过滤掉 r 上升沿的变化。如果您没有该过滤器,r 的上升沿将触发块并被视为与时钟边沿相同。