data/full_repos/permissive/157101210/jumpTest.v
data/verilator_xmls/658f93a5-eea0-4ea4-b69c-2943c61c9dde.xml
module jumpTest (
	input[31:0] instruction,
	input[31:0] programCounter,
	output reg[31:0] jumpAddress,
	output reg doesJump
);

reg[5:0] opcode;

always @(instruction) begin
	opcode = instruction[31:26];
	case (opcode)
		`LW_OP:   begin doesJump=0; end
		`SW_OP:   begin doesJump=0; end
		`J_OP:    begin doesJump=1; end
		`JAL_OP:  begin doesJump=1; end
		`BEQ_OP:  begin doesJump=0; end
		`BNE_OP:  begin doesJump=0; end
		`XORI_OP: begin doesJump=0; end
		`ADDI_OP: begin doesJump=0; end
		`RTYPE_OP: begin doesJump=0;
		end
		default: $display("Error in jump test: Invalid opcode. OPCODE: %b", opcode);
	endcase

	jumpAddress = {programCounter[29:26], instruction[25:0],2'b00};
end

endmodule
module jumpTest (
	input[31:0] instruction,
	input[31:0] programCounter,
	output reg[31:0] jumpAddress,
	output reg doesJump
);


reg[5:0] opcode;

always @(instruction) begin
	opcode = instruction[31:26];
	case (opcode)
		`LW_OP:   begin doesJump=0; end
		`SW_OP:   begin doesJump=0; end
		`J_OP:    begin doesJump=1; end
		`JAL_OP:  begin doesJump=1; end
		`BEQ_OP:  begin doesJump=0; end
		`BNE_OP:  begin doesJump=0; end
		`XORI_OP: begin doesJump=0; end
		`ADDI_OP: begin doesJump=0; end
		`RTYPE_OP: begin doesJump=0;
		end
		default: $display("Error in jump test: Invalid opcode. OPCODE: %b", opcode);
	endcase

	jumpAddress = {programCounter[29:26], instruction[25:0],2'b00};
end

endmodule