data/full_repos/permissive/180413071/nonpipelined/sources/hardware/floatingpoint/fpu.v
None: at end of input
1: b'%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/floatingpoint/fpu.v:2: Cannot find include file: constants.vh\n`include "constants.vh" \n         ^~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/180413071/nonpipelined/sources/hardware/floatingpoint,data/full_repos/permissive/180413071/constants.vh\n             data/full_repos/permissive/180413071/nonpipelined/sources/hardware/floatingpoint,data/full_repos/permissive/180413071/constants.vh.v\n             data/full_repos/permissive/180413071/nonpipelined/sources/hardware/floatingpoint,data/full_repos/permissive/180413071/constants.vh.sv\n             constants.vh\n             constants.vh.v\n             constants.vh.sv\n             obj_dir/constants.vh\n             obj_dir/constants.vh.v\n             obj_dir/constants.vh.sv\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/floatingpoint/fpu.v:22: Define or directive not defined: \'`FPU_SUB\'\n        .b(fpu_op == `FPU_SUB ? {~b[31], b[30:0]} : b[31:0]),\n                     ^~~~~~~~\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/floatingpoint/fpu.v:22: syntax error, unexpected \'?\', expecting TYPE-IDENTIFIER\n        .b(fpu_op == `FPU_SUB ? {~b[31], b[30:0]} : b[31:0]),\n                              ^\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/floatingpoint/fpu.v:36: Define or directive not defined: \'`FPU_ADD\'\n            `FPU_ADD, `FPU_SUB: \n            ^~~~~~~~\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/floatingpoint/fpu.v:36: syntax error, unexpected \',\', expecting endcase\n            `FPU_ADD, `FPU_SUB: \n                    ^\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/floatingpoint/fpu.v:36: Define or directive not defined: \'`FPU_SUB\'\n            `FPU_ADD, `FPU_SUB: \n                      ^~~~~~~~\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/floatingpoint/fpu.v:38: Define or directive not defined: \'`FPU_MUL\'\n            `FPU_MUL:\n            ^~~~~~~~\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/floatingpoint/fpu.v:40: Define or directive not defined: \'`FPU_DIV\'\n            `FPU_DIV:\n            ^~~~~~~~\n%Error: Cannot continue\n'
module fpu(
    input      [63:0] a,
    input      [63:0] b,
    input      [2:0]  fpu_op,
    input             double,
    output reg [63:0] result
);

    wire [31:0] adds_out;
    wire [63:0] addd_out;
    wire [31:0] muls_out;
    wire [63:0] muld_out;
    wire [31:0] divs_out;
    wire [63:0] divd_out;

    fadders fadders(
        .a(a[31:0]),
        .b(fpu_op == `FPU_SUB ? {~b[31], b[30:0]} : b[31:0]),
        .out(adds_out)
    );
    

    
    always @* begin
        casez(fpu_op)
            `FPU_ADD, `FPU_SUB: 
                result <= double ? addd_out : {32'b0, adds_out};
            `FPU_MUL:
                result <= double ? muld_out : {32'b0, muls_out};
            `FPU_DIV:
                result <= double ? divd_out : {32'b0, divs_out};
        endcase
    end

endmodule
module fpu(
    input      [63:0] a,
    input      [63:0] b,
    input      [2:0]  fpu_op,
    input             double,
    output reg [63:0] result
);


    wire [31:0] adds_out;
    wire [63:0] addd_out;
    wire [31:0] muls_out;
    wire [63:0] muld_out;
    wire [31:0] divs_out;
    wire [63:0] divd_out;

    fadders fadders(
        .a(a[31:0]),
        .b(fpu_op == `FPU_SUB ? {~b[31], b[30:0]} : b[31:0]),
        .out(adds_out)
    );
    

    
    always @* begin
        casez(fpu_op)
            `FPU_ADD, `FPU_SUB: 
                result <= double ? addd_out : {32'b0, adds_out};
            `FPU_MUL:
                result <= double ? muld_out : {32'b0, muls_out};
            `FPU_DIV:
                result <= double ? divd_out : {32'b0, divs_out};
        endcase
    end

endmodule