PoC.mem.ddr2.mem2mig_adapter_Spartan6¶
Adapter between the PoC.Mem interface and the User Interface of the Xilinx MIG IP core for the Spartan-6 FPGA Memory Controller Block (MCB). The MCB can be configured to have multiple ports. One instance of this adapter is required for every port. The control signals for one port of the MIG IP core are prefixed by “cX_pY”, meaning port Y on controller X.
Simplifies the User Interface (“user”) of the Xilinx MIG IP core (UG388). The PoC.Mem interface provides single-cycle fully pipelined read/write access to the memory. All accesses are word-aligned. Always all bytes of a word are written to the memory. More details can be found here.
Generic parameters:
- D_BITS: Data bus width of the PoC.Mem and MIG / MCBinterface. Also size of one word in bits.
- MEM_A_BITS: Address bus width of the PoC.Mem interface.
- APP_A_BTIS: Address bus width of the MIG / MCB interface.
Containts only combinational logic.
Entity Declaration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | entity ddr2_mem2mig_adapter_Spartan6 is
generic (
D_BITS : positive;
MEM_A_BITS : positive;
APP_A_BITS : positive
);
port (
-- PoC.Mem interface
mem_req : in std_logic;
mem_write : in std_logic;
mem_addr : in unsigned(MEM_A_BITS-1 downto 0);
mem_wdata : in std_logic_vector(D_BITS-1 downto 0);
mem_wmask : in std_logic_vector(D_BITS/8-1 downto 0) := (others => '0');
mem_rdy : out std_logic;
mem_rstb : out std_logic;
mem_rdata : out std_logic_vector(D_BITS-1 downto 0);
-- Xilinx MIG IP Core interface
mig_calib_done : in std_logic;
mig_cmd_full : in std_logic;
mig_wr_full : in std_logic;
mig_rd_empty : in std_logic;
mig_rd_data : in std_logic_vector((D_BITS)-1 downto 0);
mig_cmd_instr : out std_logic_vector(2 downto 0);
mig_cmd_en : out std_logic;
mig_cmd_bl : out std_logic_vector(5 downto 0);
mig_cmd_byte_addr : out std_logic_vector(APP_A_BITS-1 downto 0);
mig_wr_data : out std_logic_vector((D_BITS)-1 downto 0);
mig_wr_mask : out std_logic_vector((D_BITS)/8-1 downto 0);
mig_wr_en : out std_logic;
mig_rd_en : out std_logic
);
end entity ddr2_mem2mig_adapter_Spartan6;
|