In Verilog, undeclared identifiers are considered implicit wire declarations in most cases. Since f_o was not declared, the compiler considers it wired, not variable. This makes the compiler complain about all the assignments.
To fix this, you can declare a variable or declare both a port and a variable.
module ca2 (a_i,f_o); input [2:0] a_i; output [2:0] f_o; reg [2:0] f_o; module ca2 (a_i,f_o); input [2:0] a_i; output reg [2:0] f_o;
user597225
source share