anchor.diff:  
      Vector#(n, Reg#(Vector#(n, a))) matrix <- replicateM(mkRegU);
      Reg#(Bit#(cntBits)) count              <- mkReg(0);
  -   Reg#(Bool) dir                         <- mkConfigReg(False);
      Reg#(Bool) startOutput                 <- mkConfigReg(False);
   
      rule shift_input(isValid(rw_inp.wget));
         let x = fromMaybe(?, rw_inp.wget);
  +      let dir = msb(count);
   
  -      if (!dir) begin
  +      if (dir == 0) begin
            // Row shift
            for(Integer i = 0; i < valueOf(n) - 1; i = i + 1) begin
               matrix[i] <= matrix[i + 1];
  
positive.code: module mkTranspose(ITranspose#(n,a))
     provisos(
        Bits#(Vector#(n,a), __a),
        Log#(n, cntBits)
     );
  
     RWire#(Vector#(n, a)) rw_inp           <- mkRWire;
  
negative.code:    rule do_start;
        if (count == '1) begin
           startOutput <= True;
        end
     endrule
  
  