anchor.diff:  
   module mkMetaGenChannel#(Integer id)(MetaGenChannel);
      `PRINT_DEBUG_MSG
  -   StreamInChannel host <- mkStreamInChannel(0);
  +   StreamInChannel host <- mkStreamInChannel(id);
      Reg#(Bit#(32)) rg_iter <- mkReg(0);
  -   Reg#(Bit#(32)) rg_freq <- mkReg(1);
  +   Reg#(Bit#(32)) rg_gap <- mkReg(1);
      Reg#(Bit#(32)) freq_cnt <- mkReg(0);
      Reg#(Bool) bstart <- mkReg(False);
      PulseWire w_send_meta <- mkPulseWire;
  
positive.code:    mkConnection(toGet(host.next), toPut(meta_in_ff));
  
     rule rl_freq_ctrl if (bstart && meta_in_ff.notEmpty);
        if (freq_cnt < rg_freq) begin
           freq_cnt <= freq_cnt + 1;
        end
        else begin
           w_send_meta.send();
        end
     endrule
  
negative.code: 
     // frequency N means send a metadata once every n cycles
     method Action start(Bit#(32) iter, Bit#(32) freq);
        $display("(%0d) metagen start %d gap %d", $time, iter, freq);
        rg_iter <= iter;
        rg_gap <= freq;
        bstart <= True;
     endmethod
     method Action stop();
        $display("(%0d) metagen stop", $time);
        rg_iter <= 0;
        rg_gap <= 0;
        freq_cnt <= 0;
        bstart <= False;
     endmethod
  