anchor.diff:        let masked_data = pack(buff_data) & pack(curr_mask);
         let curr_data = masked_data | pack(curr_meta);
         let nextState = compute_next_state(ipv4_meta.first.protocol);
  -      $display("(%0d) compute_next_state ", $time, fshow(ipv4_meta.first.protocol));
  +      $display("(%0d) compute_next_state protocol", $time, fshow(ipv4_meta.first.protocol));
         $display("(%0d) Goto ", $time, fshow(nextState));
  +      data_this_cycle.data = {pack(unchanged), curr_data};
  +      dataout.enq(data_this_cycle);
         ipv4_meta.deq;
         ipv4_mask.deq;
         state <= nextState;
  
positive.code:     clear_wire.send();
    endmethod
    interface parse_ipv4 = toGet(unparsed_parse_ipv4_fifo);
  
  endmodule
  
  interface ParseIpv4;
    interface Put#(Bit#(16)) parse_ethernet;
  
    method Action start;
    method Action stop;
  endinterface
  module mkStateParseIpv4#(Reg#(ParserState) state, FIFOF#(EtherData) datain)(ParseIpv4);
    let verbose = True;
    FIFOF#(Bit#(16)) unparsed_parse_ethernet_fifo <- mkBypassFIFOF;
  
    FIFOF#(Bit#(144)) internal_fifo_144 <- mkSizedFIFOF(1);
  
    Wire#(Bit#(128)) packet_in_wire <- mkDWire(0);
  
negative.code:     let data_this_cycle = packet_in_wire;
      Vector#(128, Bit#(1)) dataVec = unpack(data_this_cycle);
      let hdr = extract_EthernetT(pack(takeAt(0, dataVec)));
      Vector#(16, Bit#(1)) unparsed = takeAt(0, dataVec);
      let nextState = compute_next_state(hdr.etherType);
      $display("(%0d) ethernetType %x", $time, hdr.etherType);
      if (verbose) $display("Goto state ", nextState);
      if (nextState == StateParseIpv4) begin
        unparsed_parse_ipv4_fifo.enq(pack(unparsed));
      end
      parsed_etherType_fifo.enq(hdr.etherType);
      next_state_wire[0] <= tagged Valid nextState;
    endaction
    endseq;
  