anchor.diff:  import LinkHost::*;
   import FIFOF::*;
   import Vector::*;
  -
  -/* This is a serial to parallel converter for messages of type a
  - * The data register is assumed to always be available, so an arriving
  - * message must be removed ASAP or be overwritten 
  - */
   
   typedef struct {
   	Bit#(4) address;
  
positive.code:    
     FIFOF#(DataMessage) ew <- mkSizedFIFOF(4);
     FIFOF#(DataMessage) we <- mkSizedFIFOF(4);
     FIFOF#(DataMessage) eh <- mkSizedFIFOF(4);
     FIFOF#(DataMessage) wh <- mkSizedFIFOF(4);
     
     
     
     // sort host messages to proper queue
     
  
negative.code: 	 move(lhost.tonet, he);
     endrule
     
     // arbiter to send data messages to w
     
     Bit#(1) owselect <- mkReg(0);
     
     rule genow;
        outputarbitrate(ew, hw, owselect, low);
     endrule
     
     // arbiter to send data messages to e
     
     Bit#(1) oeselect <- mkReg(0);
  
     rule genoe;
        outputarbitrate(we, he, oeselect, loe);
     endrule
  