anchor.diff:     Stmt parse_ethernet =
      seq
      action // parse_ethernet
  -      //let data <- toGet(packet_in_fifo).get;
         let data = packet_in_wire;
         Vector#(128, Bit#(1)) dataVec = unpack(data);
         let ethernet = extrace_ethernet(pack(takeAt(0, dataVec)));
  
positive.code:    rule load_unparsed_in;
        let data_delayed <- toGet(unparsed_in_fifo).get;
        unparsed_in_fifo_vlan0.enq(data_delayed);
        unparsed_in_fifo_vlan1.enq(data_delayed);
        if (verbose) $display(fshow(cycle) + fshow("load unparsed in"));
     endrule
  
     mkConnection(nextStateArbiter.outToFSM, toPipeIn(next_state_fifo));
  
     Stmt parse_vlan =
     par
        // VLAN
        seq
        action
           let data_delayed <- toGet(unparsed_in_fifo_vlan0).get;
           let data_current = packet_in_wire;
           $display("VLAN %x", data_current);
           Bit#(144) data = {data_current, data_delayed};
           Vector#(144, Bit#(1)) dataVec = unpack(data);
           let vlan0 = extract_vlan(pack(takeAt(0, dataVec)));
           let nextState0 = compute_next_state(vlan0.etherType);
           let residue0 = takeAt(32, dataVec);
           if (nextState0 == S3) begin
              if (verbose) $display(fshow(cycle) + fshow("Vlan etherType=") + fshow(vlan0.etherType));
              unparsed_out_parse_vlan0_fifo.enq(pack(residue0));
              nextStateArbiter.in[0].enq(nextState0);
           end
        endaction
        endseq
        // VLAN|VLAN
        seq
        action
           let data_delayed <- toGet(unparsed_in_fifo_vlan1).get;
           let data_current = packet_in_wire;
           $display("VLAN|VLAN %x", data_current);
           Bit#(144) data = {data_current, data_delayed};
           Vector#(144, Bit#(1)) dataVec = unpack(data);
           let vlan0 = extract_vlan(pack(takeAt(0, dataVec)));
           let nextState0 = compute_next_state(vlan0.etherType);
           let residue0 = takeAt(32, dataVec);
           let vlan1 = extract_vlan(pack(takeAt(32, dataVec)));
           let nextState1 = compute_next_state(vlan1.etherType);
           let residue1 = takeAt(64, dataVec);
           if (nextState0 == S2 && nextState1 == S3) begin
              if (verbose) $display(fshow(cycle) + fshow("Vlan etherType=") + fshow(vlan0.etherType));
              if (verbose) $display(fshow(cycle) + fshow("Vlan etherType=") + fshow(vlan1.etherType));
              unparsed_out_parse_vlan1_fifo.enq(pack(residue1));
              nextStateArbiter.in[1].enq(nextState1);
           end
        endaction
        endseq
     endpar;
  
     FSM fsm_parse_vlan <- mkFSMWithPred(parse_vlan, True);
     //Once once_parse_vlan <- mkOnce(fsm_parse_vlan.start);
  
     //method Action start = once_parse_vlan.start;
     method Action start = fsm_parse_vlan.start;
     method Action clear;
        //once_parse_vlan.clear;
        fsm_parse_vlan.abort;
        //packet_in_fifo.clear;
     endmethod
     interface packetIn = toPipeIn(packet_in_fifo);
     interface unparsedIn = toPipeIn(unparsed_in_fifo);
     interface unparsedOutVlan0 = toPipeOut(unparsed_out_parse_vlan0_fifo);
     interface unparsedOutVlan1 = toPipeOut(unparsed_out_parse_vlan1_fifo);
     interface parsedOut = toPipeOut(parsed_out_fifo);
     interface nextState = toPipeOut(next_state_fifo);
  endmodule
  
negative.code:    Reg#(Bool) started <- mkReg(False);
  
     rule start_fsm (curr_state == S0 && data_in_fifo.notEmpty);
        if (!started) begin
           parse_ethernet.start;
           parse_vlan.start;
  