data/full_repos/permissive/210250459/src/alu.v
1: b'%Error: data/full_repos/permissive/210250459/src/alu.v:4: Cannot find include file: const.v\n`include "const.v" \n         ^~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/210250459/src,data/full_repos/permissive/210250459/const.v\n             data/full_repos/permissive/210250459/src,data/full_repos/permissive/210250459/const.v.v\n             data/full_repos/permissive/210250459/src,data/full_repos/permissive/210250459/const.v.sv\n             const.v\n             const.v.v\n             const.v.sv\n             obj_dir/const.v\n             obj_dir/const.v.v\n             obj_dir/const.v.sv\n%Error: data/full_repos/permissive/210250459/src/alu.v:5: Cannot find include file: add.v\n`include "add.v" \n         ^~~~~~~\n%Error: Exiting due to 2 error(s)\n'
module ALU(out, zf, aluCtr, A, B);

output reg [31:0] out;
output reg zf;
input [31:0] A, B;
input [3:0] aluCtr;

always @(aluCtr, A, B) begin
    case (aluCtr)
    `ifdef _CUSTOM_GATE
        `ADD: Add32(out, carry, A, B, 1'b0)
    `else
        `ADD:   out = A + B;
        `MINUS: out = A - B;
        `MUL:   out = A * B;
        `DIV:   out = A / B;
        `AND:   out = A & B;
        `OR:    out = A | B;
    `endif
        default: out = 0;
    endcase
    if (out == 0) zf = 1;
    else zf = 0;
    $display($time, " [3 ALU] aluCtr = %b zf = %b A = %d B = %d ", aluCtr, zf, A, B);
end

endmodule
module ALU(out, zf, aluCtr, A, B);


output reg [31:0] out;
output reg zf;
input [31:0] A, B;
input [3:0] aluCtr;

always @(aluCtr, A, B) begin
    case (aluCtr)
    `ifdef _CUSTOM_GATE
        `ADD: Add32(out, carry, A, B, 1'b0)
    `else
        `ADD:   out = A + B;
        `MINUS: out = A - B;
        `MUL:   out = A * B;
        `DIV:   out = A / B;
        `AND:   out = A & B;
        `OR:    out = A | B;
    `endif
        default: out = 0;
    endcase
    if (out == 0) zf = 1;
    else zf = 0;
    $display($time, " [3 ALU] aluCtr = %b zf = %b A = %d B = %d ", aluCtr, zf, A, B);
end

endmodule