Radical Computer Technologies
Primitives / entity

radhdl_fifo_bram_sync

Documentation version: 0.2.2-beta.1 / Subpackage: primitive_fifo / Source package: radprimitive

RAD synchronous FIFO built from explicit vendor RAM wrappers plus local pointer/count logic. This is used for FPGA families such as ECP5 that expose BRAM primitives but no separate FIFO hard macro in the open-source flow.

Use Cases

Block Diagram

radhdl_fifo_bram_sync radhdl entity clk rst wr_en rd_en din dout empty full data_valid count_o
VHDL Include And Instantiation Template

File Header

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

library radhdl;
-- Direct entity instantiation below does not require importing the entity name.

Component Declaration

component radhdl_fifo_bram_sync is
  generic (
    VENDOR : string := "generic";
    DEVICE_FAMILY : string := "generic";
    DATA_WIDTH : positive := 32;
    ADDR_WIDTH : positive := 4;
    DEPTH : positive := 16;
    SIMULATION : boolean := false
  );
  port (
    clk : in std_logic;
    rst : in std_logic;
    wr_en : in std_logic;
    rd_en : in std_logic;
    din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
    dout : out std_logic_vector(DATA_WIDTH - 1 downto 0);
    empty : out std_logic;
    full : out std_logic;
    data_valid : out std_logic;
    count_o : out unsigned(ADDR_WIDTH downto 0)
  );
end component;

Direct Entity Instantiation

u_radhdl_fifo_bram_sync : entity radhdl.radhdl_fifo_bram_sync
  generic map (
    VENDOR        => "generic",
    DEVICE_FAMILY => "generic",
    DATA_WIDTH    => 32,
    ADDR_WIDTH    => 4,
    DEPTH         => 16,
    SIMULATION    => false
  )
  port map (
    clk        => <clk_signal>,
    rst        => <rst_signal>,
    wr_en      => <wr_en_signal>,
    rd_en      => <rd_en_signal>,
    din        => <din_signal>,
    dout       => <dout_signal>,
    empty      => <empty_signal>,
    full       => <full_signal>,
    data_valid => <data_valid_signal>,
    count_o    => <count_o_signal>
  );

Generics

NameTypeDefaultDescription
VENDORstring"generic"
DEVICE_FAMILYstring"generic"
DATA_WIDTHpositive32
ADDR_WIDTHpositive4
DEPTHpositive16
SIMULATIONbooleanfalse

Ports

NameDirectionTypeDescription
clkinstd_logic
rstinstd_logic
wr_eninstd_logic
rd_eninstd_logic
dininstd_logic_vector(DATA_WIDTH - 1 downto 0)
doutoutstd_logic_vector(DATA_WIDTH - 1 downto 0)
emptyoutstd_logic
fulloutstd_logic
data_validoutstd_logic
count_ooutunsigned(ADDR_WIDTH downto 0)

Register Interfaces

No fixed register map was found; this section documents the exposed register/control interface ports.

InterfaceDirectionsSignalsRepresentative ports
Register control/statusin2wr_en, rd_en

Testbenches

No directly associated testbench was found.

Sources