anchor.diff:  import ClientServer::*;
   import Gearbox::*;
   import MIFO::*;
  +import DefaultValue::*;
  +import MIMO::*;
   import Pipe::*;
   import Portal::*;
   import MemTypes::*;
  
positive.code:       state <= MessageHeaderRequested;
     endrule
  
     rule demuxwords if (state != HeadRequested && state != TailRequested && readMifo.enqReady());
        let v <- toGet(readEngine.data).get();
        Vector#(2,Bit#(32)) dvec = unpack(v.data);
        let enqCount = 2;
        Vector#(4,Bit#(32)) dvec4;
        dvec4[0] = dvec[0];
        dvec4[1] = dvec[1];
        dvec4[2] = 0;
        dvec4[3] = 0;
        readMifo.enq(enqCount, dvec4);
     endrule
  
     rule receiveMessageHeader if (state == MessageHeaderRequested);
        let vec <- toGet(readMifo).get();
        let hdr = vec[0];
        let methodId = hdr[31:16];
        let messageWords = hdr[15:0];
  
negative.code:    endrule
  
     rule drain if (state == Drain);
        let vec <- toGet(readMimo).get();
        if (countReg == 1)
           state <= UpdateTail;
        countReg <= countReg - 1;
     endrule
  
     rule receiveMessage if (state == MessageRequested);
        let vec <- toGet(toPipeOut(readMimo)).get();
        let data = vec[0];
        if (verbose)
           $display("receiveMessage data=%x messageWords=%d wordCount=%d", data, messageWordsReg, countReg);
  