anchor.diff:     Vector#(numIndications, Bool) readyBits = map(pipeOutNotEmpty, portal.indications);
      Bool      interruptStatus = False;
      Bit#(16)  readyChannel = -1;
  -   for (Integer i = 0; i < valueOf(numIndications); i = i + 1) begin
  +   for (Integer i = valueOf(numIndications) - 1; i >= 0; i = i - 1) begin
         if (readyBits[i]) begin
            interruptStatus = True;
            readyChannel = fromInteger(i);
  
positive.code:       writeEngine.dataPipe.enq(pack(v));
     endrule
     rule sendHeader if (indState == SendHeader && interruptStatus);
        Bit#(16) numWords = portal.messageSize(readyChannel) >> 5;
        Bit#(16) totalWords = numWords + 1;
        if (numWords[0] == 0)
  	 totalWords = numWords + 2;
        Bit#(32) hdr = extend(readyChannel) << 16 | extend(totalWords);
        $display("sendHeader hdr=%h numWords=%d", hdr, numWords);
  
        indHeadReg <= indHeadReg + totalWords;
        messageWordsReg <= numWords;
  
negative.code:    Waiting,
     SendHeader,
     SendMessage,
     SendPadding,
     Stop
     } SharedMemoryPortalState deriving (Bits,Eq);
  
  