anchor.diff:              Add#(2, g__, TLog#(depth)),
               Add#(4, h__, TLog#(depth)),
   `ifdef SIMULATION
  -            MatchTableSim#(keySz, actionSz),
  +            MatchTableSim#(id, keySz, actionSz),
   `endif
               Add#(TAdd#(TLog#(c__), 4), i__, TLog#(depth)));
   
  -   MatchTable#(depth, keySz, actionSz) ret_ifc;
  +   MatchTable#(id, depth, keySz, actionSz) ret_ifc;
   `ifdef SIMULATION
      ret_ifc <- mkMatchTableBluesim();
   `else
  
positive.code:    endinterface
  endmodule
  
  module mkMatchTableBluesim(MatchTable#(depth, keySz, actionSz))
     provisos (MatchTableSim#(keySz, actionSz),
               Log#(depth, depthSz));
     let verbose = True;
  
  
negative.code: import Bcam::*;
  import BcamTypes::*;
  
  interface MatchTable#(numeric type id, numeric type depth, numeric type keySz, numeric type actionSz);
     interface Server#(Bit#(keySz), Maybe#(Bit#(actionSz))) lookupPort;
     interface Put#(Tuple2#(Bit#(keySz), Bit#(actionSz))) add_entry;
     interface Put#(Bit#(TLog#(depth))) delete_entry;
     interface Put#(Tuple2#(Bit#(TLog#(depth)), Bit#(actionSz))) modify_entry;
  endinterface
  
  typeclass MatchTableSim#(numeric type id, numeric type ksz, numeric type vsz);
     function ActionValue#(Bit#(vsz)) matchtable_read(Bit#(id) v, Bit#(ksz) key);
     function Action matchtable_write(Bit#(id) v, Bit#(ksz) key, Bit#(vsz) data);
  endtypeclass
  
  module mkMatchTable(MatchTable#(id, depth, keySz, actionSz))
     provisos(Mul#(c__, 256, d__),
              Add#(c__, 7, TLog#(depth)),
              Log#(d__, TLog#(depth)),
  