anchor.diff:        let fac = facTbl[modeX][cnt1];
   
         // Prediction
  -      Vector#(32, Bit#(13)) xm;
  -      Vector#(32, Bit#(13)) xn;
  -      xm[0] = (fromInteger(32 - fac) * zeroExtend(y0[0]));
  -      xn[0] = (fromInteger(     fac) * zeroExtend(y0[1]));
  -      for(Integer i = 1; i < 32; i = i + 1) begin
  -         //xm[i] = (fromInteger(32 - fac) * zeroExtend(y0[i    ]));
  -         xm[i] = zeroExtend(y0[i]) * 32 - xn[i - 1];
  -         xn[i] = (fromInteger(     fac) * zeroExtend(y0[i + 1]));
  -      end
  -      
  -      if (cnt1 != 0) begin
  -         stage1.enq(vec(xm, xn));
  -      end
  +      stage1.enq(tuple3(modeX, take(y0), drop(y0)));
   
         // next row
         cnt1 <= cnt1 + 1;
  
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:    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#(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;
  