anchor.diff:     Reg#(Bit#(6))                                mode     <- mkReg(0);            // 0-Mode2, 1-Mode3..., 15-Mode17, 16-Mode34, 17-Mode33..., 32-Mode18
      Reg#(Bit#(6))                                moded1   <- mkRegU;
      Reg#(Maybe#(Vector#(64, Bit#(8))))           stage0   <- mkReg(tagged Invalid);
  -   FIFOF#(Vector#(2, (Vector#(32, Bit#(13)))))  stage1   <- mkPipelineFIFOF;
  -   Reg#(Vector#(32, Bit#(13)))                  sum1     <- mkRegU;              // (32 - F) * X
  +   FIFOF#(Tuple3#(Bit#(4), Vector#(32, Bit#( 8)), Vector#(32, Bit#( 8)))) stage1 <- mkPipelineFIFOF;
  +   FIFOF#(Vector#(2, (Vector#(32, Bit#(13)))))  stage2   <- mkPipelineFIFOF;
  +   Reg#(Vector#(32, Bit#(8)))                   rowd1    <- mkRegU;
      Reg#(Bit#(6))                                cnt1     <- mkReg(0);
   
      Integer chen_debug = 0;
  
positive.code: 
     rule do_stage2;
        let x = stage1.first;
        Vector#(32, Bit#(8)) y;
        for(Integer i = 0; i < 32; i = i + 1) begin
           y[i] = roundN((x[0][i] + x[1][i]), 5);
  
negative.code:       end
  
        // Prediction
        rowd1 <= y;
        
        if (cnt1 != 0) begin
           stage1.enq(tuple3(modeX, rowd1, y));
        end
  
        // next row
  