All the input signals of a low-level module should be registered.
Note that the following input signals are not checked by this rule:
module top (
input clk,
input a, b, c,
output reg o
);
sub sub_i1 (
.clk(clk),
.a(a),
.b(b),
.c(c),
.o(o)
);
endmodule
module sub (
input clk, // Not checked: Clock signal
input a, // Noncompliant: Directly connected to OR cell (o <= a | b)
input b, // Noncompliant: Directly connected to OR cell (o <= a | b)
input c, // Not checked: Not connected
output reg o
);
always @(posedge clk) begin
o <= a | b;
end
endmodule
module top (
input clk,
input a, b, c,
output reg o
);
sub sub_i1 (
.clk(clk),
.a(a),
.b(b),
.c(c),
.o(o)
);
endmodule
module sub (
input clk, // Not checked: Clock signal
input a, // Compliant
input b, // Compliant
input c, // Not checked: Not connected
output reg o
);
reg a_reg, b_reg;
always @(posedge clk) begin
a_reg <= a;
b_reg <= b;
o <= a_reg | b_reg;
end
endmodule