A method of processing data input to a first-in first-out memory is
disclosed. The method comprises steps of receiving input data words from
a pipeline stage at an input of the first-in first-out memory; receiving
data valid bits associated with the pipeline stage; generating a count
associated with the data valid bits; and coupling the count to the
first-in first-out memory. The step of generating a count associated with
the data valid bits may comprise encoding the data valid bits to generate
a valid data word representing the number of pipeline stages having valid
data. The method of further comprises a step of generating an almost full
signal based upon the count, and in particular generating an almost full
signal when a read pointer incremented by the count of valid bits in the
pipeline stages equals a write pointer. A circuit for processing data is
also disclosed.