eth: Ensure header pointer is wide enough to clear the entire header before halting

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich
2025-04-26 19:31:51 -07:00
parent be7016991a
commit 3dc7e4821d
6 changed files with 20 additions and 20 deletions

View File

@@ -179,7 +179,7 @@ logic input_start_d1 = 1'b0;
logic frame_oversize_reg = 1'b0, frame_oversize_next;
logic pre_ok_reg = 1'b0, pre_ok_next;
logic [0:0] hdr_ptr_reg = '0, hdr_ptr_next;
logic [1:0] hdr_ptr_reg = '0, hdr_ptr_next;
logic is_mcast_reg = 1'b0, is_mcast_next;
logic is_bcast_reg = 1'b0, is_bcast_next;
logic is_8021q_reg = 1'b0, is_8021q_next;
@@ -368,11 +368,11 @@ always_comb begin
end
case (hdr_ptr_reg)
1'd0: begin
2'd0: begin
is_mcast_next = input_data_d1[0];
is_bcast_next = &input_data_d1[47:0];
end
1'd1: is_8021q_next = {input_data_d1[39:32], input_data_d1[47:40]} == 16'h8100;
2'd1: is_8021q_next = {input_data_d1[39:32], input_data_d1[47:40]} == 16'h8100;
default: begin
// do nothing
end