A system and method for compensating for differences between a recovered receive
clock and an internal transmit clock in an elastic buffer and thereby preventing
corruption of data. In one embodiment, the system comprises a circularly accessed
buffer coupled to read and write logic. The read and write logic read and write
to locations within the circular buffer as indicated by respective read and write
pointers. The system further comprises control logic which compares the pointers
to determine whether the buffer is approaching an underflow or overflow condition
and adds or deletes fill words between frames of data to compensate for the underflow
or overflow condition. In one embodiment, the system includes fill word logic which
is configured to add a fill word bit to each received word and to set or clear
the fill word bit to indicate whether or not the corresponding word is a fill word.