anchor.diff:     rule do_start;
         if (count == '1) begin
            startOutput <= True;
  -         dir <= !dir;
         end
      endrule
   
  
positive.code: 
     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);
  
        if (!dir) begin
           // Row shift
           for(Integer i = 0; i < valueOf(n) - 1; i = i + 1) begin
              matrix[i] <= matrix[i + 1];
  
negative.code: module mkTranspose(ITranspose#(n,a))
     provisos(
        Bits#(Vector#(n,a), __a),
        Add#(1, TLog#(n), cntBits)
     );
  
     RWire#(Vector#(n, a)) rw_inp           <- mkRWire;
  