# VERILOG2082: Port direction should be set to "inout" when port is both read and written ## Summary ```{raw} html

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
--LOWIntentionality | Clear5minsynthesis, vscode, linter, simulation
``` ## Description ```{raw} html

Noncompliant code example

module fly(input wire a, output b);
  assign a = 1;
endmodule

module top;
  wire b;
  fly fly1(1, b);
  assign b = 1;
endmodule

Compliant solution

module fly(inout wire a, inout b);
  assign a = 1;
endmodule

module top;
  wire b;
  wire c = 1:
  fly fly1(c, b);
  assign b = 1;
endmodule

An input net port has been coerced to 'inout' direction because it is assigned to in the instance body. Alternatively, an output net port has been coerced to 'inout' direction because it is assigned externally to the instance. Update direction in source code accordingly.

``` ## Parameters No parameters. ```{raw} html ```