Skip to content

pzbcm_fifo

Taichi Ishitani edited this page Dec 26, 2022 · 3 revisions

pzbcm_fifo

https://github.com/pezy-computing/pzbcm/tree/master/pzbcm_fifo

Overview

This module implements a configurable FIFO.

Parameters

name type/width default value
WIDTH int 8
TYPE type logic[WIDTH-1:0]
DEPTH int 8
THRESHOLD int DEPTH
FLAG_FF_OUT 1 1
DATA_FF_OUT 1 1
RESET_RAM 1 0
CLEAR_DATA 1 0
  • WIDTH/TYPE
    • Width/Type of the input/output data.
  • DEPTH
    • Specify entries of the FIFO.
  • THRESHOLD
    • Specify the threshold value for the almost full status.
  • FLAG_FF_OUT
    • The output status flags (o_empty/o_almost_full/o_full) are output from FF if this value is set to 1.
  • DATA_FF_OUT
    • The output data is output from FF if this value is set to 1.
  • RESET_RAM
    • If this value is set to 1 the internal RAM is reset when the input reset port is asserted.
  • CLEAR_DATA
    • If this value is set to 1 internal RAM and FF for the output data is cleared when the input clear port is asserted.

IO ports

name direction type/width note
i_clk input 1 clock
i_rst_n input 1 reset (async/active low)
i_clear input 1 the internal state is cleared when this port is asserted
o_empty output 1 indicate no FIFO entries are not used
o_almost_full output 1 indicate almost all FIFO entries are used
o_full output 1 indicate all FIFO entries are used
o_word_count output $clog2(DEPTH + 1) indicate how many fifo entries are used
i_push input 1 i_data is pushed into the FIFO when this port is asserted
i_data input TYPE input data
i_pop input 1 o_data is popped from the FIFO when this port is asserted
o_data output TYPE output data
  • i_push is valid only when the FIFO is not full.
  • i_pop is valid only when the FIFO is not empty.