data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib/ADD_.v
1: b"%Error: data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib/ADD_.v:19: Cannot find file containing module: 'MUX'\n  MUX #(.N(1)) MUX(\n  ^~~\n        ... Looked in:\n             data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib,data/full_repos/permissive/486954482/MUX\n             data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib,data/full_repos/permissive/486954482/MUX.v\n             data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib,data/full_repos/permissive/486954482/MUX.sv\n             MUX\n             MUX.v\n             MUX.sv\n             obj_dir/MUX\n             obj_dir/MUX.v\n             obj_dir/MUX.sv\n%Error: data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib/ADD_.v:27: Cannot find file containing module: 'ADD'\n ADD #(.N(N)) ADD(\n ^~~\n%Error: Exiting due to 2 error(s)\n"
module ADD_ #(parameter N = 8, M = N)(
	input [N-1:0] A,
	input [M-1:0] B,
	output [N:0] O
    );
	 
	 wire [N-1:0] BB;
	 wire CO;
	 
	 generate
		if (N > M)
			assign BB = {{(N-M){B[M-1]}}, B};
		else
			assign BB = B;
	 endgenerate
	 
	 MUX #(.N(1)) MUX(
		.A(CO),
		.B(O[N-1]),
		.S(A[N-1]^B[M-1]),
		.O(O[N])
	);
		 
	 
	ADD #(.N(N)) ADD(
		.A(A),
		.B(BB),
		.CI(1'b0),
		.S(O[N-1:0]), 
		.CO(CO)
);

endmodule
module ADD_ #(parameter N = 8, M = N)(
	input [N-1:0] A,
	input [M-1:0] B,
	output [N:0] O
    );

	 
	 wire [N-1:0] BB;
	 wire CO;
	 
	 generate
		if (N > M)
			assign BB = {{(N-M){B[M-1]}}, B};
		else
			assign BB = B;
	 endgenerate
	 
	 MUX #(.N(1)) MUX(
		.A(CO),
		.B(O[N-1]),
		.S(A[N-1]^B[M-1]),
		.O(O[N])
	);
		 
	 
	ADD #(.N(N)) ADD(
		.A(A),
		.B(BB),
		.CI(1'b0),
		.S(O[N-1:0]), 
		.CO(CO)
);

endmodule