anchor.diff:  typedef struct {
  -    Bit#(8) in_port;
  -} CpuHeaderT deriving (Bits, Eq);
  -
  -instance DefaultValue#(CpuHeaderT);
  +    Bit#(4) version;
  +    Bit#(8) trafficClass;
  +    Bit#(20) flowLabel;
  +    Bit#(16) payloadLen;
  +    Bit#(8) nextHdr;
  +    Bit#(8) hopLimit;
  +    Bit#(128) srcAddr;
  +    Bit#(128) dstAddr;
  +} Ipv6T deriving (Bits, Eq);
  +
  +instance DefaultValue#(Ipv6T);
   defaultValue=
  -CpuHeaderT {
  -    in_port: 0
  -};
  -endinstance
  -
  -instance FShow#(CpuHeaderT);
  -    function Fmt fshow(CpuHeaderT p);
  -        return $format("CpuHeaderT: in_port=%h" , p.in_port);
  -    endfunction
  -endinstance
  -
  -function CpuHeaderT extract_cpu_header(Bit#(8) data);
  -    Vector#(8, Bit#(1)) dataVec=unpack(data);
  -    Vector#(8, Bit#(1)) in_port = takeAt(0, dataVec);
  -    CpuHeaderT cpu_header_t = defaultValue;
  -    cpu_header_t.in_port = pack(in_port);
  -    return cpu_header_t;
  +Ipv6T {
  +    version: 0,
  +    trafficClass: 0,
  +    flowLabel: 0,
  +    payloadLen: 0,
  +    nextHdr: 0,
  +    hopLimit: 0,
  +    srcAddr: 0,
  +    dstAddr: 0};
  +endinstance
  +
  +instance FShow#(Ipv6T);
  +    function Fmt fshow(Ipv6T p);
  +        return $format("Ipv6T: version=%h, trafficClass=%h, flowLabel=%h, payloadLen=%h, nextHdr=%h, hopLimit=%h, srcAddr=%h, dstAddr=%h" , p.version, p.trafficClass, p.flowLabel, p.payloadLen, p.nextHdr, p.hopLimit, p.srcAddr, p.dstAddr);
  +    endfunction
  +endinstance
  +
  +function Ipv6T extract_ipv6(Bit#(320) data);
  +    Vector#(320, Bit#(1)) dataVec=unpack(data);
  +    Vector#(4, Bit#(1)) version = takeAt(0, dataVec);
  +    Vector#(8, Bit#(1)) trafficClass = takeAt(4, dataVec);
  +    Vector#(20, Bit#(1)) flowLabel = takeAt(12, dataVec);
  +    Vector#(16, Bit#(1)) payloadLen = takeAt(32, dataVec);
  +    Vector#(8, Bit#(1)) nextHdr = takeAt(48, dataVec);
  +    Vector#(8, Bit#(1)) hopLimit = takeAt(56, dataVec);
  +    Vector#(128, Bit#(1)) srcAddr = takeAt(64, dataVec);
  +    Vector#(128, Bit#(1)) dstAddr = takeAt(192, dataVec);
  +    Ipv6T ipv6_t = defaultValue;
  +    ipv6_t.version = pack(version);
  +    ipv6_t.trafficClass = pack(trafficClass);
  +    ipv6_t.flowLabel = pack(flowLabel);
  +    ipv6_t.payloadLen = pack(payloadLen);
  +    ipv6_t.nextHdr = pack(nextHdr);
  +    ipv6_t.hopLimit = pack(hopLimit);
  +    ipv6_t.srcAddr = pack(srcAddr);
  +    ipv6_t.dstAddr = pack(dstAddr);
  +    return ipv6_t;
   endfunction
   
   typedef struct {
  
positive.code:     endmethod
      interface parse_ethernet = toPut(unparsed_parse_ethernet_fifo);
  endmodule
  interface ParseCpuHeader;
      interface Put#(Bit#(112)) parse_ipv4;
      method Action start;
      method Action clear;
  endinterface
  module mkStateParseCpuHeader#(Reg#(ParserState) state, FIFOF#(EtherData) datain)(ParseCpuHeader);
      FIFOF#(Bit#(112)) unparsed_parse_ipv4_fifo <- mkBypassFIFOF;
      Wire#(Bit#(128)) packet_in_wire <- mkDWire(0);
      Vector#(1, Wire#(Maybe#(ParserState))) next_state_wire <- replicateM(mkDWire(tagged Invalid));
      PulseWire start_wire <- mkPulseWire();
      PulseWire clear_wire <- mkPulseWire();
      (* fire_when_enabled *)
      rule arbitrate_outgoing_state if (state == StateParseCpuHeader);
          Vector#(1, Bool) next_state_valid = replicate(False);
          Bool stateSet = False;
          for (Integer port=0; port<1; port=port+1) begin
              next_state_valid[port] = isValid(next_state_wire[port]);
              if (!stateSet && next_state_valid[port]) begin
                  stateSet = True;
                  ParserState next_state = fromMaybe(?, next_state_wire[port]);
                  state <= next_state;
              end
          end
      endrule
      
      rule load_packet if (state == StateParseCpuHeader);
          let data_current <- toGet(datain).get;
          packet_in_wire <= data_current.data;
      endrule
      Stmt parse_cpu_header =
      seq
      action
          let data = packet_in_wire;
          Vector#(128, Bit#(1)) dataVec = unpack(data);
          let nextState = StateStart; 
          next_state_wire[0] <= tagged Valid nextState;
      endaction
      endseq;
      FSM fsm_parse_cpu_header <- mkFSM(parse_cpu_header);
      rule start_fsm if (start_wire);
          fsm_parse_cpu_header.start;
      endrule
      rule clear_fsm if (clear_wire);
          fsm_parse_cpu_header.abort;
      endrule
      method Action start();
          start_wire.send();
      endmethod
      method Action clear();
          clear_wire.send();
      endmethod
      interface parse_ipv4 = toPut(unparsed_parse_ipv4_fifo);
  endmodule
  interface ParseUdp;
      interface Put#(Bit#(112)) parse_ipv4;
      interface Get#(Bit#(176)) parse_paxos;
  
negative.code: endmodule
  interface ParsePaxos;
      interface Put#(Bit#(176)) parse_udp;
      interface Get#(Bit#(16)) parsedOut_paxos_msgtype;
      method Action start;
      method Action clear;
  endinterface
  module mkStateParsePaxos#(Reg#(ParserState) state, FIFOF#(EtherData) datain, FIFOF#(ParserState) parseStateFifo)(ParsePaxos);
      FIFOF#(Bit#(304)) internal_fifo <- mkSizedFIFOF(1);
      FIFOF#(Bit#(176)) unparsed_parse_udp_fifo <- mkBypassFIFOF;
      FIFOF#(Bit#(16)) parsed_paxos_fifo <- mkFIFOF;
      Wire#(Bit#(128)) packet_in_wire <- mkDWire(0);
      Vector#(1, Wire#(Maybe#(ParserState))) next_state_wire <- replicateM(mkDWire(tagged Invalid));
      PulseWire start_wire <- mkPulseWire();
  