data/full_repos/permissive/210844779/lab3/3.2/alu.v
 line:12: before: "assign"
1: b"%Error: data/full_repos/permissive/210844779/lab3/3.2/alu.v:12: syntax error, unexpected '{', expecting TYPE-IDENTIFIER\n  0 : assign {Carry,C}= A+B;\n             ^\n%Error: data/full_repos/permissive/210844779/lab3/3.2/alu.v:13: syntax error, unexpected '{', expecting TYPE-IDENTIFIER\n  1 : assign {Borrow,C}= A-B;\n             ^\n%Error: Exiting due to 2 error(s)\n"
module alu(A,B,sel,Borrow,Carry,Equal,less,more,C);
  
  input [7:0]A,B;
  input [2:0]sel;
  output reg [7:0]C;
  output reg Borrow,Carry,Equal,less,more;
  reg [7:0]temp,temp1;  
  always@(*)
   
  case (sel)  
  
  0 : assign {Carry,C}= A+B;
  1 : assign {Borrow,C}= A-B;
  2 : C=A ^ B;
  3 : C=A & B;
  4 : begin
      temp=A|B;
      C=~temp;
    end
  5 : begin
      temp1=A & B;
      C=~temp1;
    end
  6 : begin         
      if (A>B)
      begin
      less=1'b0;
      more=1'b1;
      Equal=1'b0;    
    end
    else if (A<B)
    begin
      less=1'b1;
      more=1'b0;
      Equal=1'b0;      
    end
    else
      begin
      less=1'b0;
      more=1'b0;  
      Equal=1'b1;
    end  
  end  
  default: $display("invalid choice");

endcase

endmodule
module alu(A,B,sel,Borrow,Carry,Equal,less,more,C);

  
  input [7:0]A,B;
  input [2:0]sel;
  output reg [7:0]C;
  output reg Borrow,Carry,Equal,less,more;
  reg [7:0]temp,temp1;  
  always@(*)
   
  case (sel)  
  
  0 : assign {Carry,C}= A+B;
  1 : assign {Borrow,C}= A-B;
  2 : C=A ^ B;
  3 : C=A & B;
  4 : begin
      temp=A|B;
      C=~temp;
    end
  5 : begin
      temp1=A & B;
      C=~temp1;
    end
  6 : begin         
      if (A>B)
      begin
      less=1'b0;
      more=1'b1;
      Equal=1'b0;    
    end
    else if (A<B)
    begin
      less=1'b1;
      more=1'b0;
      Equal=1'b0;      
    end
    else
      begin
      less=1'b0;
      more=1'b0;  
      Equal=1'b1;
    end  
  end  
  default: $display("invalid choice");

endcase

endmodule