data/full_repos/permissive/160510184/ProgramCounter.v
data/verilator_xmls/9729ff73-d60c-475c-93df-9745611b1f35.xml
module ProgramCounter (NextPC, CurrentPC, SignExt, Branch, ALUZero, Clk, Rst);

input [63:0] CurrentPC;
input [63:0] SignExt;  

input Rst;
input Clk;         
input Branch;
input ALUZero;

output reg [63:0] NextPC;

always @ (posedge Clk)
begin
    if(Rst == 1)
        NextPC <= 0;
    else if (Branch)
    begin			    
	 if(ALUZero)       
        	NextPC = CurrentPC + (SignExt << 2);
    	 else
		NextPC = CurrentPC + 4;
    end
    else
        NextPC <= CurrentPC + 4;
end
endmodule
module ProgramCounter (NextPC, CurrentPC, SignExt, Branch, ALUZero, Clk, Rst);


input [63:0] CurrentPC;
input [63:0] SignExt;  

input Rst;
input Clk;         
input Branch;
input ALUZero;

output reg [63:0] NextPC;

always @ (posedge Clk)
begin
    if(Rst == 1)
        NextPC <= 0;
    else if (Branch)
    begin			    
	 if(ALUZero)       
        	NextPC = CurrentPC + (SignExt << 2);
    	 else
		NextPC = CurrentPC + 4;
    end
    else
        NextPC <= CurrentPC + 4;
end
endmodule