data/full_repos/permissive/511902453/alu_control.v
1: b"%Error: data/full_repos/permissive/511902453/alu_control.v:17: Define or directive not defined: '`sltu'\n assign branchop=(func3[2] & func3[1])? `sltu : (func3[2] ^ func3[1])? `slt : `sub;\n                                        ^~~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:17: syntax error, unexpected ':', expecting TYPE-IDENTIFIER\n assign branchop=(func3[2] & func3[1])? `sltu : (func3[2] ^ func3[1])? `slt : `sub;\n                                              ^\n%Error: data/full_repos/permissive/511902453/alu_control.v:17: Define or directive not defined: '`slt'\n assign branchop=(func3[2] & func3[1])? `sltu : (func3[2] ^ func3[1])? `slt : `sub;\n                                                                       ^~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:17: Define or directive not defined: '`sub'\n assign branchop=(func3[2] & func3[1])? `sltu : (func3[2] ^ func3[1])? `slt : `sub;\n                                                                              ^~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:23: Define or directive not defined: '`sub'\n     riop=`sub;\n          ^~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:23: syntax error, unexpected ';', expecting TYPE-IDENTIFIER\n     riop=`sub;\n              ^\n%Error: data/full_repos/permissive/511902453/alu_control.v:25: Define or directive not defined: '`add'\n     riop=`add;\n          ^~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:25: syntax error, unexpected ';', expecting TYPE-IDENTIFIER\n     riop=`add;\n              ^\n%Error: data/full_repos/permissive/511902453/alu_control.v:26: Define or directive not defined: '`sll'\n   3'b001: riop=`sll;\n                ^~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:26: syntax error, unexpected ';', expecting TYPE-IDENTIFIER\n   3'b001: riop=`sll;\n                    ^\n%Error: data/full_repos/permissive/511902453/alu_control.v:27: Define or directive not defined: '`slt'\n   3'b010: riop=`slt;\n                ^~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:27: syntax error, unexpected ';', expecting TYPE-IDENTIFIER\n   3'b010: riop=`slt;\n                    ^\n%Error: data/full_repos/permissive/511902453/alu_control.v:28: Define or directive not defined: '`sltu'\n   3'b011: riop=`sltu;\n                ^~~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:28: syntax error, unexpected ';', expecting TYPE-IDENTIFIER\n   3'b011: riop=`sltu;\n                     ^\n%Error: data/full_repos/permissive/511902453/alu_control.v:29: Define or directive not defined: '`xor'\n   3'b100: riop=`xor;\n                ^~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:29: syntax error, unexpected ';', expecting TYPE-IDENTIFIER\n   3'b100: riop=`xor;\n                    ^\n%Error: data/full_repos/permissive/511902453/alu_control.v:31: Define or directive not defined: '`sra'\n     riop=`sra;\n          ^~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:31: syntax error, unexpected ';', expecting TYPE-IDENTIFIER\n     riop=`sra;\n              ^\n%Error: data/full_repos/permissive/511902453/alu_control.v:33: Define or directive not defined: '`srl'\n     riop=`srl;\n          ^~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:33: syntax error, unexpected ';', expecting TYPE-IDENTIFIER\n     riop=`srl;\n              ^\n%Error: data/full_repos/permissive/511902453/alu_control.v:34: Define or directive not defined: '`or'\n   3'b110: riop=`or;\n                ^~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:34: syntax error, unexpected ';', expecting TYPE-IDENTIFIER\n   3'b110: riop=`or;\n                   ^\n%Error: data/full_repos/permissive/511902453/alu_control.v:35: Define or directive not defined: '`and'\n   3'b111: riop=`and;\n                ^~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:35: syntax error, unexpected ';', expecting TYPE-IDENTIFIER\n   3'b111: riop=`and;\n                    ^\n%Error: data/full_repos/permissive/511902453/alu_control.v:36: Define or directive not defined: '`add'\n   default:riop=`add;\n                ^~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:36: syntax error, unexpected ';', expecting TYPE-IDENTIFIER\n   default:riop=`add;\n                    ^\n%Error: data/full_repos/permissive/511902453/alu_control.v:40: Define or directive not defined: '`add'\n assign aluctl=(aluop[1]^aluop[0])? riop:(aluop[1]&aluop[0])?branchop:`add;\n                                                                      ^~~~\n%Error: data/full_repos/permissive/511902453/alu_control.v:40: syntax error, unexpected ';', expecting TYPE-IDENTIFIER\n assign aluctl=(aluop[1]^aluop[0])? riop:(aluop[1]&aluop[0])?branchop:`add;\n                                                                          ^\n%Error: Exiting due to 28 error(s)\n"
module alu_control(
	aluop,
	func3,
	func7,
	aluctl
    );
	input [1:0]aluop;
	input [2:0]func3;
	input func7;
	output [3:0]aluctl;
	
	wire [3:0]branchop;
	reg  [3:0]riop;
	
	
	
	assign branchop=(func3[2] & func3[1])? `sltu : (func3[2] ^ func3[1])? `slt : `sub;
	
	always@(*)
	begin
		case(func3)
			3'b000: if(aluop[1] & func7)
					riop=`sub;
					else
					riop=`add;
			3'b001: riop=`sll;
			3'b010: riop=`slt;
			3'b011: riop=`sltu;
			3'b100: riop=`xor;
			3'b101: if(func7)
					riop=`sra;
					else
					riop=`srl;
			3'b110: riop=`or;
			3'b111: riop=`and;
			default:riop=`add;
		endcase
	end
	
	assign aluctl=(aluop[1]^aluop[0])? riop:(aluop[1]&aluop[0])?branchop:`add;

endmodule
module alu_control(
	aluop,
	func3,
	func7,
	aluctl
    );

	input [1:0]aluop;
	input [2:0]func3;
	input func7;
	output [3:0]aluctl;
	
	wire [3:0]branchop;
	reg  [3:0]riop;
	
	
	
	assign branchop=(func3[2] & func3[1])? `sltu : (func3[2] ^ func3[1])? `slt : `sub;
	
	always@(*)
	begin
		case(func3)
			3'b000: if(aluop[1] & func7)
					riop=`sub;
					else
					riop=`add;
			3'b001: riop=`sll;
			3'b010: riop=`slt;
			3'b011: riop=`sltu;
			3'b100: riop=`xor;
			3'b101: if(func7)
					riop=`sra;
					else
					riop=`srl;
			3'b110: riop=`or;
			3'b111: riop=`and;
			default:riop=`add;
		endcase
	end
	
	assign aluctl=(aluop[1]^aluop[0])? riop:(aluop[1]&aluop[0])?branchop:`add;

endmodule