[source]

Entity fifo_cc_got_tempgot

D_BITSMIN_DEPTHDATA_REGSTATE_REGOUTPUT_REGESTATE_WR_BITSFSTATE_RD_BITSrststd_logicclkstd_logicputstd_logicdin[D_BITS - 1 downto 0]std_logic_vectorgotstd_logiccommitstd_logicrollbackstd_logicfullstd_logicestate_wrstd_logic_vector[imax ( 0 , ESTATE_WR_BITS - 1 ) downto 0]doutstd_logic_vector[D_BITS - 1 downto 0]validstd_logicfstate_rdstd_logic_vector[imax ( 0 , FSTATE_RD_BITS - 1 ) downto 0]

Block Diagram of fifo_cc_got_tempgot

The specified depth (MIN_DEPTH) is rounded up to the next suitable value.

As uncommitted reads occupy FIFO space that is not yet available for writing, an instance of this FIFO can, indeed, report full and not vld at the same time. While a commit would eventually make space available for writing (not ful), a rollback would re-iterate data for reading (vld).

commit and rollback are inclusive and apply to all reads (got) since the previous commit or rollback up to and including a potentially simultaneous read.

The FIFO state upon a simultaneous assertion of commit and rollback is undefined!

*STATE_*_BITS defines the granularity of the fill state indicator *state_*. fstate_rd is associated with the read clock domain and outputs the guaranteed number of words available in the FIFO. estate_wr is associated with the write clock domain and outputs the number of words that is guaranteed to be accepted by the FIFO without a capacity overflow. Note that both these indicators cannot replace the full or valid outputs as they may be implemented as giving pessimistic bounds that are minimally off the true fill state.

If a fill state is not of interest, set *STATE_*_BITS = 0.

fstate_rd and estate_wr are combinatorial outputs and include an address comparator (subtractor) in their path.

Examples:

  • FSTATE_RD_BITS = 1:

    • fstate_rd == 0 => 0/2 full

    • fstate_rd == 1 => 1/2 full (half full)

  • FSTATE_RD_BITS = 2:

    • fstate_rd == 0 => 0/4 full

    • fstate_rd == 1 => 1/4 full

    • fstate_rd == 2 => 2/4 full

    • fstate_rd == 3 => 3/4 full

Generics

Name

Type

Default

Description

D_BITS

positive

Data Width

MIN_DEPTH

positive

Minimum FIFO Depth

DATA_REG

boolean

false

Store Data Content in Registers

STATE_REG

boolean

false

Registered Full/Empty Indicators

OUTPUT_REG

boolean

false

Registered FIFO Output

ESTATE_WR_BITS

natural

0

Empty State Bits

FSTATE_RD_BITS

natural

0

Full State Bits

Ports

Name

Type

Direction

Description

rst

std_logic

in

Global Reset and Clock

clk

std_logic

in

put

std_logic

in

Writing Interface Write Request

din

std_logic_vector

in

Input Data

full

std_logic

out

estate_wr

std_logic_vector

out

got

std_logic

in

Reading Interface Read Completed

dout

std_logic_vector

out

Output Data

valid

std_logic

out

fstate_rd

std_logic_vector

out

commit

std_logic

in

rollback

std_logic

in