小编Hir*_*ani的帖子

隐式网络类型声明和`default-nettype

我对 SystemVerilog 的“default_nettype 指令”有疑问。

默认情况下,下面的代码是可以的。

module m1 (
   input  logic i1,
   output logic o1
   );

   logic  l1;
   assign l1 = i1;
   assign o1 = l1;
endmodule
Run Code Online (Sandbox Code Playgroud)

但是,当我将默认网络类型更改为none

`default_nettype none
Run Code Online (Sandbox Code Playgroud)

只有 i1 会导致错误:

ERROR: [VRFC 10-1103] net type must be explicitly specified for i1 when default_nettype is none ...
Run Code Online (Sandbox Code Playgroud)

我的问题是为什么只会input logic i1导致错误并需要明确的wire,但output logic o1不会logic l1

system-verilog

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

system-verilog ×1