w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
migui_nexys4d_gsim.vhd
Go to the documentation of this file.
1-- $Id: migui_nexys4d_gsim.vhd 1201 2019-08-10 16:51:22Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2018- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: migui_nexys4d - sim
7-- Description: MIG generated for nexys4d - simple simulator
8--
9-- Dependencies: bplib/mig/migui_core_gsim
10-- Test bench: tb_tst_sram_nexys4d
11-- Target Devices: arty board
12-- Tool versions: viv 2017.2; ghdl 0.34
13--
14-- Revision History:
15-- Date Rev Version Comment
16-- 2018-12-30 1099 1.0 Initial version (cloned from arty)
17--
18------------------------------------------------------------------------------
19
20library ieee;
21use ieee.std_logic_1164.all;
22use ieee.numeric_std.all;
23
24use work.slvtypes.all;
25use work.miglib.all;
26use work.miglib_nexys4d.all;
27
28entity migui_nexys4d is -- MIG generated for nexys4d
29 port (
30 DDR2_DQ : inout slv16; -- dram: data in/out
31 DDR2_DQS_P : inout slv2; -- dram: data strobe (diff-p)
32 DDR2_DQS_N : inout slv2; -- dram: data strobe (diff-n)
33 DDR2_ADDR : out slv13; -- dram: address
34 DDR2_BA : out slv3; -- dram: bank address
35 DDR2_RAS_N : out slbit; -- dram: row addr strobe (act.low)
36 DDR2_CAS_N : out slbit; -- dram: column addr strobe (act.low)
37 DDR2_WE_N : out slbit; -- dram: write enable (act.low)
38 DDR2_CK_P : out slv1; -- dram: clock (diff-p)
39 DDR2_CK_N : out slv1; -- dram: clock (diff-n)
40 DDR2_CKE : out slv1; -- dram: clock enable
41 DDR2_CS_N : out slv1; -- dram: chip select (act.low)
42 DDR2_DM : out slv2; -- dram: data input mask
43 DDR2_ODT : out slv1; -- dram: on-die termination
44 APP_ADDR : in slv(mig_mawidth-1 downto 0); -- MIGUI address
45 APP_CMD : in slv3; -- MIGUI command
46 APP_EN : in slbit; -- MIGUI command enable
47 APP_WDF_DATA : in slv(mig_dwidth-1 downto 0);-- MIGUI write data
48 APP_WDF_END : in slbit; -- MIGUI write end
49 APP_WDF_MASK : in slv(mig_mwidth-1 downto 0); -- MIGUI write mask
50 APP_WDF_WREN : in slbit; -- MIGUI data write enable
51 APP_RD_DATA : out slv(mig_dwidth-1 downto 0); -- MIGUI read data
52 APP_RD_DATA_END : out slbit; -- MIGUI read end
53 APP_RD_DATA_VALID : out slbit; -- MIGUI read valid
54 APP_RDY : out slbit; -- MIGUI ready for cmd
55 APP_WDF_RDY : out slbit; -- MIGUI ready for data write
56 APP_SR_REQ : in slbit; -- MIGUI reserved (tie to 0)
57 APP_REF_REQ : in slbit; -- MIGUI refresh request
58 APP_ZQ_REQ : in slbit; -- MIGUI ZQ calibrate request
59 APP_SR_ACTIVE : out slbit; -- MIGUI reserved (ignore)
60 APP_REF_ACK : out slbit; -- MIGUI refresh acknowledge
61 APP_ZQ_ACK : out slbit; -- MIGUI ZQ calibrate acknowledge
62 UI_CLK : out slbit; -- MIGUI clock
63 UI_CLK_SYNC_RST : out slbit; -- MIGUI reset
64 INIT_CALIB_COMPLETE : out slbit; -- MIGUI inital calibration complete
65 SYS_CLK_I : in slbit; -- MIGUI system clock
66 CLK_REF_I : in slbit; -- MIGUI reference clock
67 DEVICE_TEMP_I : in slv12; -- MIGUI xadc temperature
68 SYS_RST : in slbit -- MIGUI system reset
69 );
71
72
73architecture sim of migui_nexys4d is
74
75begin
76
77 -- On Nexys4 we have
78 -- SYS_CLK_I 100 Mhz
79 -- controller 300 MHz
80 -- UI_CLK 75 MHz (4:1)
81 -- therefore for simulation
82 -- f_vco 1200 MHz
83 -- --> mul 12 (f_vco/SYS_CLK)
84 -- --> div 16 (f_vco/UI_CLK)
85
86 MIG_SIM : migui_core_gsim
87 generic map (
88 BAWIDTH => mig_bawidth,
89 MAWIDTH => mig_mawidth,
90 SAWIDTH => 24,
91 CLKMUI_MUL => 12,
92 CLKMUI_DIV => 16)
93 port map (
96 UI_CLK => UI_CLK,
100 APP_EN => APP_EN,
101 APP_CMD => APP_CMD,
115 );
116
117 DDR2_DQ <= (others=>'Z');
118 DDR2_DQS_P <= (others=>'Z');
119 DDR2_DQS_N <= (others=>'Z');
120 DDR2_ADDR <= (others=>'0');
121 DDR2_BA <= (others=>'0');
122 DDR2_RAS_N <= '1';
123 DDR2_CAS_N <= '1';
124 DDR2_WE_N <= '1';
125 DDR2_CK_P <= (others=>'0');
126 DDR2_CK_N <= (others=>'1');
127 DDR2_CKE <= (others=>'0');
128 DDR2_CS_N <= (others=>'1');
129 DDR2_DM <= (others=>'0');
130 DDR2_ODT <= (others=>'0');
131
132 APP_SR_ACTIVE <= '0';
133
134end sim;
MAWIDTH positive := 28
out APP_RDY slbit
out APP_RD_DATA_VALID slbit
out APP_REF_ACK slbit
out APP_RD_DATA_END slbit
in APP_WDF_MASK slv(( 2** BAWIDTH)- 1 downto 0)
CLKMUI_MUL positive := 6
SAWIDTH positive := 24
in APP_WDF_DATA slv( 8*( 2** BAWIDTH)- 1 downto 0)
in APP_WDF_END slbit
out INIT_CALIB_COMPLETE slbit
out APP_RD_DATA slv( 8*( 2** BAWIDTH)- 1 downto 0)
in APP_REF_REQ slbit
out APP_ZQ_ACK slbit
out APP_WDF_RDY slbit
in APP_ZQ_REQ slbit
CLKMUI_DIV positive := 12
in APP_WDF_WREN slbit
in APP_ADDR slv( MAWIDTH- 1 downto 0)
BAWIDTH positive := 4
out UI_CLK_SYNC_RST slbit
out APP_RD_DATA slv( mig_dwidth- 1 downto 0)
out APP_RD_DATA_VALID slbit
out APP_REF_ACK slbit
out APP_RD_DATA_END slbit
out DDR2_RAS_N slbit
inout DDR2_DQS_P slv2
inout DDR2_DQS_N slv2
in APP_WDF_MASK slv( mig_mwidth- 1 downto 0)
in DEVICE_TEMP_I slv12
inout DDR2_DQ slv16
out INIT_CALIB_COMPLETE slbit
out DDR2_WE_N slbit
out DDR2_CAS_N slbit
out APP_ZQ_ACK slbit
out DDR2_ADDR slv13
out APP_WDF_RDY slbit
in APP_WDF_WREN slbit
out APP_SR_ACTIVE slbit
in APP_ADDR slv( mig_mawidth- 1 downto 0)
in APP_WDF_DATA slv( mig_dwidth- 1 downto 0)
out UI_CLK_SYNC_RST slbit
std_logic_vector( 12 downto 0) slv13
Definition: slvtypes.vhd:45
std_logic_vector( 11 downto 0) slv12
Definition: slvtypes.vhd:44
std_logic_vector( 2 downto 0) slv3
Definition: slvtypes.vhd:35
std_logic_vector( 0 downto 0) slv1
Definition: slvtypes.vhd:33
std_logic_vector( 15 downto 0) slv16
Definition: slvtypes.vhd:48
std_logic slbit
Definition: slvtypes.vhd:30
std_logic_vector( 1 downto 0) slv2
Definition: slvtypes.vhd:34
std_logic_vector slv
Definition: slvtypes.vhd:31