diff --git a/pingxelflut.v b/pingxelflut.v index b81b6e0..be2fabd 100644 --- a/pingxelflut.v +++ b/pingxelflut.v @@ -45,10 +45,10 @@ module pingxelflut #( localparam IGNORE = 7'b0011111; - localparam VERSION = 7'b0100000; - localparam TRAFFIC_CLASS_0 = 7'b0100001; - localparam TRAFFIC_CLASS_1 = 7'b0100010; - localparam FLOW_LABEL_0 = 7'b0100011; + localparam TRAFFIC_CLASS_0 = 7'b0100000; + localparam VERSION = 7'b0100001; + localparam FLOW_LABEL_0 = 7'b0100010; + localparam TRAFFIC_CLASS_1 = 7'b0100011; localparam FLOW_LABEL_1 = 7'b0100100; localparam FLOW_LABEL_2 = 7'b0100101; localparam FLOW_LABEL_3 = 7'b0100110; @@ -105,8 +105,8 @@ module pingxelflut #( always @(posedge rx_clk) begin if (rx_dv && ~rx_er) begin - if (state >= DEST_0 && state < ETHER_TYPE_3 || state >= VERSION && state < PADDING_HIGH) state <= state + 1; - else if (state == ETHER_TYPE_3) state <= VERSION; + if (state >= DEST_0 && state < ETHER_TYPE_3 || state >= TRAFFIC_CLASS_0 && state < PADDING_HIGH) state <= state + 1; + else if (state == ETHER_TYPE_3) state <= TRAFFIC_CLASS_0; else if (state == PADDING_HIGH) state <= IGNORE; broadcast <= maybe_broadcast;