fix: order of IPv6 header fields

This commit is contained in:
Luca 2024-12-29 17:38:38 +01:00
parent 7edebda159
commit 9f8a31306e
1 changed files with 6 additions and 6 deletions

View File

@ -45,10 +45,10 @@ module pingxelflut #(
localparam IGNORE = 7'b0011111; localparam IGNORE = 7'b0011111;
localparam VERSION = 7'b0100000; localparam TRAFFIC_CLASS_0 = 7'b0100000;
localparam TRAFFIC_CLASS_0 = 7'b0100001; localparam VERSION = 7'b0100001;
localparam TRAFFIC_CLASS_1 = 7'b0100010; localparam FLOW_LABEL_0 = 7'b0100010;
localparam FLOW_LABEL_0 = 7'b0100011; localparam TRAFFIC_CLASS_1 = 7'b0100011;
localparam FLOW_LABEL_1 = 7'b0100100; localparam FLOW_LABEL_1 = 7'b0100100;
localparam FLOW_LABEL_2 = 7'b0100101; localparam FLOW_LABEL_2 = 7'b0100101;
localparam FLOW_LABEL_3 = 7'b0100110; localparam FLOW_LABEL_3 = 7'b0100110;
@ -105,8 +105,8 @@ module pingxelflut #(
always @(posedge rx_clk) begin always @(posedge rx_clk) begin
if (rx_dv && ~rx_er) begin if (rx_dv && ~rx_er) begin
if (state >= DEST_0 && state < ETHER_TYPE_3 || state >= VERSION && state < PADDING_HIGH) state <= state + 1; 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 <= VERSION; else if (state == ETHER_TYPE_3) state <= TRAFFIC_CLASS_0;
else if (state == PADDING_HIGH) state <= IGNORE; else if (state == PADDING_HIGH) state <= IGNORE;
broadcast <= maybe_broadcast; broadcast <= maybe_broadcast;