A first-in, first-out buffer for transmitting a data block from a data producer to a data consumer, the first-in, first-out buffer comprising:
- a plurality of entries, each of the plurality of entries for temporarily storing at least a portion of the data block and a variable threshold value;
- a write counter for providing a write pointer value for determining a current entry of the plurality of entries in which to write data and the variable threshold value;
- a read counter for providing a read pointer value for determining a current entry of the plurality of entries from which to read data and the variable threshold value;
- and
- a read comparator for determining that a difference between the read pointer value and the write pointer value is greater than or equal to the variable threshold value, and in response, causing the at least a portion of the data block to be read from the plurality of entries, wherein the variable threshold value is determined based on an input data rate and an output data rate of the first-in, first-out buffer, and a size of the data block to be transmitted through the first-in, first-out buffer.