data/full_repos/permissive/429737743/sources_1/new/NPC.v
data/verilator_xmls/8da737de-dfdf-4902-9c6e-744ae991f4b0.xml
module NPC(
    npc, enable, 
    pc, imm, c_mux3, c_mux4, ans
);
output [31 : 0] npc; reg [31 : 0] npc;
input [31 : 0] pc, imm, ans;

input c_mux3, c_mux4, enable;
always @(*) begin
    if (enable) begin
        if (c_mux3 == 0) begin
            npc = pc + 4;
            if (c_mux4 == 0) begin
                npc = npc;
            end
            else begin
                npc = ans;
            end
        end
        else begin
            npc = pc + imm;
            if (c_mux4 == 0) begin
                npc = npc;
            end
            else begin
                npc = ans;
            end
        end
    end
    
end
endmodule
module NPC(
    npc, enable, 
    pc, imm, c_mux3, c_mux4, ans
);

output [31 : 0] npc; reg [31 : 0] npc;
input [31 : 0] pc, imm, ans;

input c_mux3, c_mux4, enable;
always @(*) begin
    if (enable) begin
        if (c_mux3 == 0) begin
            npc = pc + 4;
            if (c_mux4 == 0) begin
                npc = npc;
            end
            else begin
                npc = ans;
            end
        end
        else begin
            npc = pc + imm;
            if (c_mux4 == 0) begin
                npc = npc;
            end
            else begin
                npc = ans;
            end
        end
    end
    
end
endmodule