data/full_repos/permissive/146975244/BranchControl.v
1: b'%Warning-WIDTH: data/full_repos/permissive/146975244/BranchControl.v:14: Operator ASSIGN expects 11 bits on the Assign RHS, but Assign RHS\'s VARREF \'IMM26\' generates 26 bits.\n                                                                       : ... In instance BranchControl\n   PCValue = IMM26;\n           ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/146975244/BranchControl.v:17: Operator ADD expects 32 or 16 bits on the LHS, but LHS\'s VARREF \'PCValue\' generates 11 bits.\n                                                                       : ... In instance BranchControl\n   PCValue = PCValue + IMM16 - 1;\n                     ^\n%Warning-WIDTH: data/full_repos/permissive/146975244/BranchControl.v:17: Operator ASSIGN expects 11 bits on the Assign RHS, but Assign RHS\'s SUB generates 32 or 16 bits.\n                                                                       : ... In instance BranchControl\n   PCValue = PCValue + IMM16 - 1;\n           ^\n%Error: Exiting due to 3 warning(s)\n'
module BranchControl(halt, j, branch, PCIn, zero, IMM16, IMM26, clock, PCOut, OK);
input halt,j,branch, zero, clock, OK;
input [15:0] IMM16;
input [25:0] IMM26;
input [10:0]PCIn;
reg[10:0] PCValue;
output [10:0]PCOut;


always @ (*) begin
	PCValue =PCIn + 1;
	if (halt == 1'b0) begin
		if(j == 1) begin
			PCValue = IMM26;
		end
		else if(branch ==1 & zero == 1) begin
			PCValue = PCValue + IMM16 - 1;
		end
	end
	
	else if(halt ==1'b1 && OK == 1'b0) begin
		PCValue =PCIn;
	end	
	
end

assign PCOut = PCValue;

endmodule
module BranchControl(halt, j, branch, PCIn, zero, IMM16, IMM26, clock, PCOut, OK);

input halt,j,branch, zero, clock, OK;
input [15:0] IMM16;
input [25:0] IMM26;
input [10:0]PCIn;
reg[10:0] PCValue;
output [10:0]PCOut;


always @ (*) begin
	PCValue =PCIn + 1;
	if (halt == 1'b0) begin
		if(j == 1) begin
			PCValue = IMM26;
		end
		else if(branch ==1 & zero == 1) begin
			PCValue = PCValue + IMM16 - 1;
		end
	end
	
	else if(halt ==1'b1 && OK == 1'b0) begin
		PCValue =PCIn;
	end	
	
end

assign PCOut = PCValue;

endmodule