Verilog行为模型中的“->”是什么?

What is "->" in a Verilog behavioral model?

提问人:Luxien Zhang 提问时间:11/17/2023 最后编辑:toolicLuxien Zhang 更新时间:11/17/2023 访问量:46

问:

我正在编写一个 i2c 主模块,并且我有 Microchip 提供的 Verilog AT24C02D模型,用于测试平台。我在代码中看到一些“->”;那是什么意思?

编号: https://ww1.microchip.com/downloads/aemDocuments/documents/MPD/ProductDocuments/BoardDesignFiles/AT24C02D.v

//************************************************************************
//********************* S_START and S_STOP conditions ********************
//************************************************************************

// Start trigger allows latency between start condition and falling edge
// of SCL. If stop occurs in this interval the machine ignores the start
// condition and awaits a subsequent start condition.

  // START Condition Detection

  always @ (negedge SDA_in)
  if(SCL == 1) begin
    if (VERBOSE) $display("START condition detected", $time);
    S_STOP = 0;
    S_START = 1;
    -> START_condition;    // Start condition event

    if (VERBOSE) $display ("Got START condtion event");

    @(STOP_condition or negedge SCL)
    if (SCL == 0) begin
      if (VERBOSE) $display ("First negedge of SCL after START", $time);
      Valid_Address_flag = 0;
      if(VERBOSE) $display("START event triggered");
      -> START_trigger;    // Start trigger event
  @ (posedge SCL) S_START = 0;  // Waits until cycle ends
    end
    else begin    // STOP condition detected under same clock
      if (VERBOSE) $display ("STOP under same clock as START");
      S_START = 0;
      S_STOP = 1;
    end
  end

我成功地编译了文件。iverilog

维里洛格

评论


答:

1赞 toolic 11/17/2023 #1

在您链接中的文件中,我搜索并发现了第 535 行的以下声明:AT24C02D.vSTART_conditionevent

event START_condition;

该语法用于触发事件。事件在零时间内触发; 不会是具有任何持续时间的信号脉冲。->START_condition

该文件中没有其他用途;也许代码作者将其添加为波形调试辅助工具。某些波形查看器将允许您直观地查看事件的触发时间。START_condition

请参阅 IEEE Std 1800-2017 第 6.17 节事件数据类型