Skip to content

Commit 8f062f7

Browse files
committed
fix for data beyond end of packet
1 parent a2f3846 commit 8f062f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

littletoe/tcp.v

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module Tcp
6363
localparam [6:0] sETH_TYPE_ERR = 6'd020;
6464
localparam [6:0] sETH_TYPE_ARP_0 = 6'd021;
6565
localparam [6:0] sETH_TYPE_IPV6 = 6'd022;
66-
66+
6767
// IPV4 handing
6868
localparam [6:0] sIPV4_VER_SZ = 6'd030;
6969
localparam [6:0] sIPV4_DSCP = 6'd031;
@@ -524,6 +524,7 @@ module Tcp
524524
pos <= (tcpData != 1) ? sTCP_DATA : sIDLE; // 1 if this is last byte
525525
outDataValid <= tcp_matches;
526526
outData <= data;
527+
tcpData <= tcpData - 1;
527528
outnewpkt <= 0;
528529
end
529530
endcase

0 commit comments

Comments
 (0)