【问题标题】:What is this syntax for in Verilog?Verilog 中的这种语法是什么?
【发布时间】:2011-12-19 03:25:01
【问题描述】:

module exmaple(input a, b, input in[2:0], output d, e, output out[5:0])

我是 Verilog 的新手,想了解 input in[2:0] 的含义?

【问题讨论】:

    标签: verilog system-verilog


    【解决方案1】:

    这不是有效的 Verilog(IEEE-1364),它是 SystemVerilog(IEEE-1800)。 SV 允许将端口声明为多维数组,因此在这种情况下,in 被声明为单个位线数组。

    一般来说,如果你想要一个端口的向量,你会使用input [2:0] in,它在 Verilog 和 SystemVerilog 中都有效。但是,如果您的端口类型不能是向量,例如integer 或time,则需要使用此方法。

    【讨论】:

      猜你喜欢
      • 2015-09-24
      • 1970-01-01
      • 2016-01-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多