Radical Computer Technologies
Primitives / entity

radhdl_xilinx_ram

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

Xilinx RAM wrapper. XPM imports stay isolated here so portable cores can select this wrapper without directly depending on the XPM library.

Use Cases

Block Diagram

radhdl_xilinx_ram radhdl entity clka rsta a_addr a_din a_we clkb rstb b_addr b_din b_we a_dout b_dout
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_xilinx_ram is
  generic (
    DATA_WIDTH : positive := 18;
    ADDR_WIDTH : positive := 10;
    DEPTH : positive := 1024;
    MEMORY_STYLE : string := "block";
    CLOCKING_MODE : string := "common_clock";
    MEMORY_INIT_FILE : string := "none";
    USE_MEM_INIT : integer := 0
  );
  port (
    clka : in std_logic;
    rsta : in std_logic;
    a_addr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
    a_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
    a_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0);
    a_we : in std_logic;
    clkb : in std_logic;
    rstb : in std_logic;
    b_addr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
    b_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
    b_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0);
    b_we : in std_logic
  );
end component;

Direct Entity Instantiation

u_radhdl_xilinx_ram : entity radhdl.radhdl_xilinx_ram
  generic map (
    DATA_WIDTH       => 18,
    ADDR_WIDTH       => 10,
    DEPTH            => 1024,
    MEMORY_STYLE     => "block",
    CLOCKING_MODE    => "common_clock",
    MEMORY_INIT_FILE => "none",
    USE_MEM_INIT     => 0
  )
  port map (
    clka   => <clka_signal>,
    rsta   => <rsta_signal>,
    a_addr => <a_addr_signal>,
    a_din  => <a_din_signal>,
    a_dout => <a_dout_signal>,
    a_we   => <a_we_signal>,
    clkb   => <clkb_signal>,
    rstb   => <rstb_signal>,
    b_addr => <b_addr_signal>,
    b_din  => <b_din_signal>,
    b_dout => <b_dout_signal>,
    b_we   => <b_we_signal>
  );

Generics

NameTypeDefaultDescription
DATA_WIDTHpositive18
ADDR_WIDTHpositive10
DEPTHpositive1024
MEMORY_STYLEstring"block"
CLOCKING_MODEstring"common_clock"
MEMORY_INIT_FILEstring"none"
USE_MEM_INITinteger0

Ports

NameDirectionTypeDescription
clkainstd_logic
rstainstd_logic
a_addrinstd_logic_vector(ADDR_WIDTH - 1 downto 0)
a_dininstd_logic_vector(DATA_WIDTH - 1 downto 0)
a_doutoutstd_logic_vector(DATA_WIDTH - 1 downto 0)
a_weinstd_logic
clkbinstd_logic
rstbinstd_logic
b_addrinstd_logic_vector(ADDR_WIDTH - 1 downto 0)
b_dininstd_logic_vector(DATA_WIDTH - 1 downto 0)
b_doutoutstd_logic_vector(DATA_WIDTH - 1 downto 0)
b_weinstd_logic

Testbenches

No directly associated testbench was found.

Sources