Implementing TCP 2MSL timer in Verilog

K

kb33

Guest
Hi,

I am designing a TCP state machine in verilog, whereby the TCP states
are determined based on the TCP flags that I get from the TCP header
(over the Ethernet Interface). However, once a particular connection is
in the TIME_WAIT state, it can come out of it only after the expiration
of the 2MSL timer (ignoring any TCP flags). My problem is this : do I
need to maintain a counter for each existing TCP connection that starts
running once the connection enters into the 2MSL state, and stops after
the 2MSL period is over? This would undoubtedly need at least 32 bits
per counter (considering that I am using a 150 MHz clk and the 2MSL
timer is 1 minute). Or is there a more efficient way of resetting the
connection in hardware once the 2MSL period is over?

Thanks
kb33
 
kb33 <kanchan.devarakonda@gmail.com> wrote:

I am designing a TCP state machine in verilog, whereby the TCP states
are determined based on the TCP flags that I get from the TCP header
(over the Ethernet Interface). However, once a particular connection is
in the TIME_WAIT state, it can come out of it only after the expiration
of the 2MSL timer (ignoring any TCP flags). My problem is this : do I
need to maintain a counter for each existing TCP connection that starts
running once the connection enters into the 2MSL state, and stops after
the 2MSL period is over? This would undoubtedly need at least 32 bits
per counter (considering that I am using a 150 MHz clk and the 2MSL
timer is 1 minute). Or is there a more efficient way of resetting the
connection in hardware once the 2MSL period is over?
You could break it up into one free-running counter that divides
your clock by some convenient amount (say, 15000 to give you
a 10-msec timer), and per-connection timers that use this.

S.
 

Welcome to EDABoard.com

Sponsor

Back
Top