Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
tech_ddr.vhd 3.22 KiB
--------------------------------------------------------------------------------
--
-- Copyright (C) 2014
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
-- JIVE (Joint Institute for VLBI in Europe) <http://www.jive.nl/>
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
--
--------------------------------------------------------------------------------

-- Purpose: Technology independent component for DDR memory access.
-- Description:
--   The component also supports different types of DDR, so DDR3 and DDR4.
-- Remark:

LIBRARY IEEE, common_lib, technology_lib;
USE IEEE.STD_LOGIC_1164.ALL;
USE common_lib.common_mem_pkg.ALL;
USE technology_lib.technology_pkg.ALL;
USE technology_lib.technology_select_pkg.ALL;
USE work.tech_ddr_pkg.ALL;

ENTITY tech_ddr IS
  GENERIC (
    g_technology           : NATURAL := c_tech_select_default;
    g_tech_ddr             : t_c_tech_ddr
  );
  PORT (
    -- PLL reference clock
    ref_clk           : IN    STD_LOGIC;
    ref_rst           : IN    STD_LOGIC;

    -- Controller user interface
    ctlr_gen_clk      : OUT   STD_LOGIC;
    ctlr_gen_rst      : OUT   STD_LOGIC;
    ctlr_gen_clk_2x   : OUT   STD_LOGIC;
    ctlr_gen_rst_2x   : OUT   STD_LOGIC;

    ctlr_mosi         : IN    t_mem_ctlr_mosi;
    ctlr_miso         : OUT   t_mem_ctlr_miso;

    term_ctrl_out     : OUT   t_tech_ddr3_phy_terminationcontrol;
    term_ctrl_in      : IN    t_tech_ddr3_phy_terminationcontrol := c_tech_ddr3_phy_terminationcontrol_rst;

    -- DDR3 PHY interface
    phy3_in            : IN    t_tech_ddr3_phy_in := c_tech_ddr3_phy_in_x;
    phy3_io            : INOUT t_tech_ddr3_phy_io;
    phy3_ou            : OUT   t_tech_ddr3_phy_ou;
    
    -- DDR4 PHY interface
    phy4_in            : IN    t_tech_ddr4_phy_in := c_tech_ddr4_phy_in_x;
    phy4_io            : INOUT t_tech_ddr4_phy_io;
    phy4_ou            : OUT   t_tech_ddr4_phy_ou
  );
END tech_ddr;


ARCHITECTURE str OF tech_ddr IS