anchor.diff:     function Action matchtable_write(Bit#(id) v, Bit#(ksz) key, Bit#(vsz) data);
   endtypeclass
   
  -module mkMatchTable(MatchTable#(id, depth, keySz, actionSz))
  +module mkMatchTable#(String name)(MatchTable#(id, depth, keySz, actionSz))
      provisos(Mul#(c__, 256, d__),
               Add#(c__, 7, TLog#(depth)),
               Log#(d__, TLog#(depth)),
  
positive.code:    endinterface
  endmodule
  
  module mkMatchTableBluesim(MatchTable#(id, depth, keySz, actionSz))
     provisos (MatchTable::MatchTableSim#(id, keySz, actionSz),
               Log#(depth, depthSz));
     let verbose = True;
  
     FIFO#(Tuple2#(Bit#(keySz), Bit#(actionSz))) writeReqFifo <- mkFIFO;
     FIFO#(Bit#(keySz)) readReqFifo <- mkFIFO;
     FIFO#(Maybe#(Bit#(actionSz))) readDataFifo <- mkFIFO;
  
     Reg#(Bool)      isInitialized   <- mkReg(False);
  
     rule do_read (isInitialized);
        let v <- toGet(readReqFifo).get;
  
negative.code:          readDataFifo.enq(tagged Invalid);
     endrule
  
     Reg#(Bit#(8)) fsmIndex <- mkReg(0);
  
     rule do_init (fsmIndex < fromInteger(List::length(entryList)));
        $display("insert entry ", fromInteger(List::length(entryList)));
        Bit#(keySz) key = tpl_1(entryList[fsmIndex]);
        Bit#(actionSz) v = tpl_2(entryList[fsmIndex]);
        Bit#(id) tid = 0;
        matchtable_write(tid, key, v);
        fsmIndex <= fsmIndex + 1;
        $display("finished insert entry ", fromInteger(List::length(entryList)));
     endrule
  
     rule finish_init(fsmIndex == fromInteger(List::length(entryList)));
        isInitialized <= True;
     endrule
  
     interface Server lookupPort;
  