data/full_repos/permissive/440575220/ALU.v
1: b'%Error: data/full_repos/permissive/440575220/ALU.v:2: Cannot find include file: miriscv_defines.v\n`include "miriscv_defines.v" \n         ^~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/440575220,data/full_repos/permissive/440575220/miriscv_defines.v\n             data/full_repos/permissive/440575220,data/full_repos/permissive/440575220/miriscv_defines.v.v\n             data/full_repos/permissive/440575220,data/full_repos/permissive/440575220/miriscv_defines.v.sv\n             miriscv_defines.v\n             miriscv_defines.v.v\n             miriscv_defines.v.sv\n             obj_dir/miriscv_defines.v\n             obj_dir/miriscv_defines.v.v\n             obj_dir/miriscv_defines.v.sv\n%Error: data/full_repos/permissive/440575220/ALU.v:13: Define or directive not defined: \'`ALU_ADD\'\n        `ALU_ADD: begin\n        ^~~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:13: syntax error, unexpected \':\', expecting endcase\n        `ALU_ADD: begin\n                ^\n%Error: data/full_repos/permissive/440575220/ALU.v:17: Define or directive not defined: \'`ALU_SUB\'\n        `ALU_SUB: begin\n        ^~~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:17: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_SUB: begin\n                  ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:21: Define or directive not defined: \'`ALU_SLL\'\n        `ALU_SLL: begin\n        ^~~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:21: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_SLL: begin\n                  ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:25: Define or directive not defined: \'`ALU_SLTS\'\n        `ALU_SLTS: begin\n        ^~~~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:25: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_SLTS: begin\n                   ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:29: Define or directive not defined: \'`ALU_SLTU\'\n        `ALU_SLTU: begin\n        ^~~~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:29: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_SLTU: begin\n                   ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:33: Define or directive not defined: \'`ALU_XOR\'\n        `ALU_XOR: begin\n        ^~~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:33: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_XOR: begin\n                  ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:37: Define or directive not defined: \'`ALU_SRL\'\n        `ALU_SRL: begin\n        ^~~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:37: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_SRL: begin\n                  ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:41: Define or directive not defined: \'`ALU_SRA\'\n        `ALU_SRA: begin\n        ^~~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:41: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_SRA: begin\n                  ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:45: Define or directive not defined: \'`ALU_OR\'\n        `ALU_OR: begin\n        ^~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:45: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_OR: begin\n                 ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:49: Define or directive not defined: \'`ALU_AND\'\n        `ALU_AND: begin\n        ^~~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:49: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_AND: begin\n                  ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:53: Define or directive not defined: \'`ALU_EQ\'\n        `ALU_EQ: begin\n        ^~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:53: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_EQ: begin\n                 ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:57: Define or directive not defined: \'`ALU_NE\'\n        `ALU_NE: begin\n        ^~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:57: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_NE: begin\n                 ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:61: Define or directive not defined: \'`ALU_LTS\'\n        `ALU_LTS: begin\n        ^~~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:61: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_LTS: begin\n                  ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:65: Define or directive not defined: \'`ALU_GES\'\n        `ALU_GES: begin\n        ^~~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:65: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_GES: begin\n                  ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:69: Define or directive not defined: \'`ALU_LTU\'\n        `ALU_LTU: begin\n        ^~~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:69: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_LTU: begin\n                  ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:73: Define or directive not defined: \'`ALU_GEU\'\n        `ALU_GEU: begin\n        ^~~~~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:73: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n        `ALU_GEU: begin\n                  ^~~~~\n%Error: data/full_repos/permissive/440575220/ALU.v:77: syntax error, unexpected endcase\n      endcase  \n      ^~~~~~~\n%Error: Cannot continue\n'
module ALU(
           input [31:0]      A,
           input [31:0]      B,
           input [4:0]       ALUOp,
           output reg [31:0] Result,
           output reg Flag
           );
   always @(*) begin
      case(ALUOp)
        `ALU_ADD: begin
           Result <= A + B;
           Flag <= 0;
        end
        `ALU_SUB: begin
           Result <= A + ~B + 1;
           Flag <= 0;
        end
        `ALU_SLL: begin
           Result <= A << B;
           Flag <= 0;
        end
        `ALU_SLTS: begin
           Result <= $signed(A) < $signed(B);
           Flag <= 0;
        end
        `ALU_SLTU: begin
           Result <= (A < B);
           Flag <= 0;
        end
        `ALU_XOR: begin
           Result <= A ^ B;
           Flag <= 0;
        end
        `ALU_SRL: begin
           Result <= A >> B;
           Flag <= 0;
        end
        `ALU_SRA: begin
           Result <= $signed(A) >>> $signed (B);
           Flag <= 0;
        end
        `ALU_OR: begin
           Result <= A | B;
           Flag <= 0;
        end
        `ALU_AND: begin
           Result <= A & B;
           Flag <= 0;
        end
        `ALU_EQ: begin
           Result <= A == B;
           Flag <= A == B;
        end
        `ALU_NE: begin
           Result <= A != B;
           Flag <= A != B;
        end
        `ALU_LTS: begin
           Result <= ($signed(A) < $signed(B));
           Flag <= ($signed(A) < $signed(B));
        end
        `ALU_GES: begin
           Result <= ($signed(A) >= $signed(B));
           Flag <= ($signed(A) >= $signed(B));
        end
        `ALU_LTU: begin
           Result <= (A < B);
           Flag <= (A < B);
        end
        `ALU_GEU: begin
           Result <= (A >= B);
           Flag <= (A >= B);
        end
      endcase
   end
endmodule
module ALU(
           input [31:0]      A,
           input [31:0]      B,
           input [4:0]       ALUOp,
           output reg [31:0] Result,
           output reg Flag
           );

   always @(*) begin
      case(ALUOp)
        `ALU_ADD: begin
           Result <= A + B;
           Flag <= 0;
        end
        `ALU_SUB: begin
           Result <= A + ~B + 1;
           Flag <= 0;
        end
        `ALU_SLL: begin
           Result <= A << B;
           Flag <= 0;
        end
        `ALU_SLTS: begin
           Result <= $signed(A) < $signed(B);
           Flag <= 0;
        end
        `ALU_SLTU: begin
           Result <= (A < B);
           Flag <= 0;
        end
        `ALU_XOR: begin
           Result <= A ^ B;
           Flag <= 0;
        end
        `ALU_SRL: begin
           Result <= A >> B;
           Flag <= 0;
        end
        `ALU_SRA: begin
           Result <= $signed(A) >>> $signed (B);
           Flag <= 0;
        end
        `ALU_OR: begin
           Result <= A | B;
           Flag <= 0;
        end
        `ALU_AND: begin
           Result <= A & B;
           Flag <= 0;
        end
        `ALU_EQ: begin
           Result <= A == B;
           Flag <= A == B;
        end
        `ALU_NE: begin
           Result <= A != B;
           Flag <= A != B;
        end
        `ALU_LTS: begin
           Result <= ($signed(A) < $signed(B));
           Flag <= ($signed(A) < $signed(B));
        end
        `ALU_GES: begin
           Result <= ($signed(A) >= $signed(B));
           Flag <= ($signed(A) >= $signed(B));
        end
        `ALU_LTU: begin
           Result <= (A < B);
           Flag <= (A < B);
        end
        `ALU_GEU: begin
           Result <= (A >= B);
           Flag <= (A >= B);
        end
      endcase
   end
endmodule