Radical Computer Technologies
Primitives / entity

radhdl_ram

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

Public vendor-neutral RAM primitive. This is the stable RadHDL RAM boundary; vendor-specific primitive wrappers stay below it.

Use Cases

Block Diagram

radhdl_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_ram is
  generic (
    VENDOR : string := "xilinx";
    DEVICE_FAMILY : string := "7series";
    MODE : string := "tdp";
    MEMORY_KIND : string := "bram";
    DATA_WIDTH : positive := 18;
    ADDR_WIDTH : positive := 10;
    DEPTH : positive := 1024;
    CLOCKING_MODE : string := "common_clock";
    MEMORY_INIT_FILE : string := "none";
    USE_MEM_INIT : integer := 0;
    SIMULATION : boolean := false
  );
  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_ram : entity radhdl.radhdl_ram
  generic map (
    VENDOR           => "xilinx",
    DEVICE_FAMILY    => "7series",
    MODE             => "tdp",
    MEMORY_KIND      => "bram",
    DATA_WIDTH       => 18,
    ADDR_WIDTH       => 10,
    DEPTH            => 1024,
    CLOCKING_MODE    => "common_clock",
    MEMORY_INIT_FILE => "none",
    USE_MEM_INIT     => 0,
    SIMULATION       => false
  )
  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
VENDORstring"xilinx"
DEVICE_FAMILYstring"7series"
MODEstring"tdp"
MEMORY_KINDstring"bram"
DATA_WIDTHpositive18
ADDR_WIDTHpositive10
DEPTHpositive1024
CLOCKING_MODEstring"common_clock"
MEMORY_INIT_FILEstring"none"
USE_MEM_INITinteger0
SIMULATIONbooleanfalse

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

tb_radhdl_ram_vendor interface timing diagram

Source: common/hdl/testbenches/tb_radhdl_ram_vendor.vhd

No testbench description has been written yet.

Interface Timing Diagram

Source: common/hdl/testbenches/tb_radhdl_ram_vendor.vhd

clka
clkb
rsta
rstb
a_addr
b_addr
a_din
a_dout
a_we
b_din
b_dout
b_we

Sources