From 9f8a31306ef17c3605aaa7f051478925cd2b2a03 Mon Sep 17 00:00:00 2001 From: Luca Date: Sun, 29 Dec 2024 17:38:38 +0100 Subject: [PATCH] fix: order of IPv6 header fields --- pingxelflut.v | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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;