Why is this an issue?

A module should have a single and well-defined responsibility. Such a module is easier to understand, change, maintain, test and reuse. Too many ports is an indication that the module has too many responsibilities.

Interfaces and programs are also checked by this rule.

How to fix it

Code examples

Noncompliant code example

With default maximum number of ports: 6

module too_many_responsibilities(
  input logic clk1,
  input logic clk2,
  input logic rst1,
  input logic rst2,
  input logic i1,
  input logic i2,
  output logic o1,
  output logic o2
);
  ...
endmodule

Compliant solution

With default maximum number of ports: 6

entity single_responsibility(
  input logic clk,
  input logic rst,
  input logic data_in,
  output logic data_out
);
  ...
endmodule