assign Zero =(ALUOut==0);//Zero is true if ALUOut is 0always@(ALUctl, A, B)begin//reevaluate if these changecase(ALUctl)0: ALUOut <= A & B;1: ALUOut <= A | B;2: ALUOut <= A + B;6: ALUOut <= A - B;7: ALUOut <= A < B ?1:0;12: ALUOut <=~(A | B);// result is nordefault: ALUOut <=0;endcaseend
Zero <= '1' when(ALUOut =0)else '0';process(ALUctl, A, B)begincase ALUctl iswhen0=> ALUOut <= A AND B;
....
whenothers=> ALUOut <= '0';endcase;endprocess;
Though you'll likely need some type conversions depending on how everything is defined.