data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib/MULT_.v
1: b"%Error: data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib/MULT_.v:13: Cannot find file containing module: 'TwosComplement'\n TwosComplement #(.N(N)) TwosComplement_A( \n ^~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib,data/full_repos/permissive/486954482/TwosComplement\n             data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib,data/full_repos/permissive/486954482/TwosComplement.v\n             data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib,data/full_repos/permissive/486954482/TwosComplement.sv\n             TwosComplement\n             TwosComplement.v\n             TwosComplement.sv\n             obj_dir/TwosComplement\n             obj_dir/TwosComplement.v\n             obj_dir/TwosComplement.sv\n%Error: data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib/MULT_.v:18: Cannot find file containing module: 'MUX'\n  MUX #(.N(N)) MUX_A(\n  ^~~\n%Error: data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib/MULT_.v:25: Cannot find file containing module: 'TwosComplement'\n TwosComplement #(.N(M)) TwosComplement_B( \n ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib/MULT_.v:30: Cannot find file containing module: 'MUX'\n  MUX #(.N(M)) MUX_B(\n  ^~~\n%Error: data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib/MULT_.v:37: Cannot find file containing module: 'MULT'\n MULT #(.N(N), .M(M)) MULT ( \n ^~~~\n%Error: data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib/MULT_.v:43: Cannot find file containing module: 'TwosComplement'\n TwosComplement #(.N(N+M)) TwosComplement_O( \n ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/486954482/TinyGarble/circuit_synthesis/syn_lib/MULT_.v:48: Cannot find file containing module: 'MUX'\n  MUX #(.N(N+M)) MUX_O(\n  ^~~\n%Error: Exiting due to 7 error(s)\n"
module MULT_ #( parameter N = 8, M = N )( 
	input  [N-1:0] A,
	input  [M-1:0] B,
	output [N+M-1:0] O
);

	wire  [N-1:0] A_, A__;
	wire  [M-1:0] B_, B__;
	wire	[N+M-1:0] O_, O__;
	
	TwosComplement #(.N(N)) TwosComplement_A( 
		.A(A),
		.O(A_)
    );
	 
	 MUX #(.N(N)) MUX_A(
		.A(A),
		.B(A_),
		.S(A[N-1]),
		.O(A__)
	);
	
	TwosComplement #(.N(M)) TwosComplement_B( 
		.A(B),
		.O(B_)
    );
	 
	 MUX #(.N(M)) MUX_B(
		.A(B),
		.B(B_),
		.S(B[M-1]),
		.O(B__)
	);
	
	MULT #(.N(N), .M(M)) MULT ( 
		.A(A__),
		.B(B__),
		.O(O_)
	);
	
	TwosComplement #(.N(N+M)) TwosComplement_O( 
		.A(O_),
		.O(O__)
    );
	 
	 MUX #(.N(N+M)) MUX_O(
		.A(O_),
		.B(O__),
		.S(A[N-1]^B[M-1]),
		.O(O)
	);

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


	wire  [N-1:0] A_, A__;
	wire  [M-1:0] B_, B__;
	wire	[N+M-1:0] O_, O__;
	
	TwosComplement #(.N(N)) TwosComplement_A( 
		.A(A),
		.O(A_)
    );
	 
	 MUX #(.N(N)) MUX_A(
		.A(A),
		.B(A_),
		.S(A[N-1]),
		.O(A__)
	);
	
	TwosComplement #(.N(M)) TwosComplement_B( 
		.A(B),
		.O(B_)
    );
	 
	 MUX #(.N(M)) MUX_B(
		.A(B),
		.B(B_),
		.S(B[M-1]),
		.O(B__)
	);
	
	MULT #(.N(N), .M(M)) MULT ( 
		.A(A__),
		.B(B__),
		.O(O_)
	);
	
	TwosComplement #(.N(N+M)) TwosComplement_O( 
		.A(O_),
		.O(O__)
    );
	 
	 MUX #(.N(N+M)) MUX_O(
		.A(O_),
		.B(O__),
		.S(A[N-1]^B[M-1]),
		.O(O)
	);

endmodule