anchor.diff:  	 if (cond1) begin
   	    //$display("load_ctxt_b cond1");
   	    outs1[loadIdx] <= False;
  -	    cmdBuf.deq(truncate(loadIdx));
   	 end
   	 else begin
   	    let new_cmd = MemengineCmd{sglId:cmd.sglId, base:cmd.base+extend(cmd.burstLen), 
   				       burstLen:cmd.burstLen, len:cmd.len-extend(cmd.burstLen), tag:cmd.tag};
  -	    cmdBuf.upd_head(truncate(loadIdx),new_cmd);
  +	    cmdRegs[loadIdx] <= new_cmd;
   	 end
         end
      endrule
  
positive.code:       rule store_cmd if (!outs1[idx]);
  	 let cmd <- toGet(cmds_in[idx]).get();
  	 outs1[idx] <= True;
  	 cmdBuf.enq(fromInteger(idx),cmd);
  	 if (verbose) $display("mkMemreadEngineBuff::store_cmd %d %d", idx, buffCap[idx].read);
        endrule
     
     rule load_ctxt_a (!load_in_progress);
        if (outs1[loadIdx]) begin
  	 load_in_progress <= True;
  	 cmdBuf.first_req(truncate(loadIdx));
  	 if (verbose) $display("mkMemreadEngineBuff::load_ctxt_a %d", loadIdx);
        end
        else begin
  
negative.code:    endrule
  
     rule load_ctxt_b if (load_in_progress);
        let unused <- toGet(cmdFifo).get();
        let cmd = cmdRegs[loadIdx];
        let cond0 <- buffCap[loadIdx].maybeDecrement(unpack(extend(cmd.burstLen>>beat_shift)));
        let cond1 = cmd.len <= extend(cmd.burstLen);
        loadf_b.enq(tuple3(cmd,cond0,cond1));
  