- `flush
- if (!in1_r_ && in1_a) in1_a <= 0;
- if (!in2_r_ && in2_a) in2_a <= 0;
- if (!inOp_r_ && inOp_a) inOp_a <= 0;
- if (out_r && out_a) begin
- out_r <= 0;
- inOp_a <= 1;
-
- if (inOp_d==0) in1_a <= 1;
- else if (inOp_d==1) in2_a <= 1;
- else if (inOp_d==9 && both_negative) begin in1_a <= 1; in2_a <= 1; end
- else if (inOp_d==4 && greater) in1_a <= 1;
- else if (inOp_d==5 && greater) in2_a <= 1;
- else if (inOp_d==9 && greater) in1_a <= 1;
- else if (inOp_d==4 && !greater) in2_a <= 1;
- else if (inOp_d==5 && !greater) in1_a <= 1;
- else if (inOp_d==9 && !greater) in2_a <= 1;
+ `cleanup
+ if (out_draining && `out_empty) begin
+ `drain_inOp
+ out_draining <= 0;
+ if (inOp_d_trunc==0) `drain_in1
+ else if (inOp_d_trunc==1) `drain_in2
+ else if (inOp_d_trunc==7) `drain_in1
+ else if (inOp_d_trunc==8) `drain_in2
+ else if (inOp_d_trunc==9 && both_negative) begin `drain_in1 `drain_in2 end
+ else if (inOp_d_trunc==4 && greater) `drain_in1
+ else if (inOp_d_trunc==5 && greater) `drain_in2
+ else if (inOp_d_trunc==9 && greater) `drain_in1
+ else if (inOp_d_trunc==4 && !greater) `drain_in2
+ else if (inOp_d_trunc==5 && !greater) `drain_in1
+ else if (inOp_d_trunc==9 && !greater) `drain_in2