KS152JB Universal Communications Controller
Technical Specifications
Kawasaki LSI USA, Inc. Page 45 of 120 Ver. 0.9 KS152JB2
Random Backoff
In either of the random algorithms, the first thing that happens after a collision is detected is that a
I gets shifted into the TCDCNT (Transmit Collision Detect Count) register, from the right.
Thus if the software cleared TCDCNT before telling the GSC to transmit, then TCDCNT keeps
track of how many times the transmission had to be aborted because of collisions:
TCDCNT = 00000000 first attempt
00000001 first collision
00000011 second collision
00000111 third collision
00001111 fourth collision
......................................
11111111 eighth collision
After TCDCNT gets a 1 shifted into it, the logical AND of TCDCNT and PRBS is loaded into a
countdown timer named BKOFF. PRBS is the name of an SFR which contains the output of a
pseudo-random binary sequence generator. Its function is to provide a random number for use in
the backoff algorithm.
Thus on the first collision BKOFF gets loaded randomly with either 00000000 or 00000001. If
there is a second collision it gets loaded with the random selection of 00000000, 00000001,
00000010, or 00000011. On the third collision there will be a random selection among 8 possible
numbers. On the fourth, among 16, etc. Figure below shows the logical arrangement of PRBS,
TCDCNT, and BKOFF.
PRBS TCDCNT
AND
BKOFF
COMP
MYSLOT
BKOFF = 0
SLOT
CLOCK
LOAD
BKOFF 8
6
6BKOFF= MYSLOT