Jump to content
  • 0

Simulating ram2ddrxadc - endless wait for mem_init_calib_complete


Anding

Question

Hello,

I am now simulating the ram2ddrxadc component in Vivado.  The simulation runs fine but in investigating why I'm not having success in writing to the module I have found that the mem_init_calib_complete signal from the MIG7 is never going high. 

Could anyone suggest what I should be looking at to try and resolve this?

The project is here https://github.com/Anding/Nexys4-DDR-testing.git and My Mig7 settings are pasted below.

 

Vivado Project Options:
   Target Device                   : xc7a100t-csg324
   Speed Grade                     : -1
   HDL                             : verilog
   Synthesis Tool                  : VIVADO

If any of the above options are incorrect, please click on "Cancel", change the CORE Generator Project Options, and restart MIG.

MIG Output Options:
   Module Name                     : ddr
   No of Controllers               : 1
   Selected Compatible Device(s)   : --

FPGA Options:
   System Clock Type               : No Buffer
   Reference Clock Type            : Use System Clock
   Debug Port                      : OFF
   Internal Vref                   : enabled
   IO Power Reduction              : ON
   XADC instantiation in MIG       : Enabled

Extended FPGA Options:
   DCI for DQ,DQS/DQS#,DM          : enabled
   Internal Termination (HR Banks) : 50 Ohms
    
/*******************************************************/
/*                  Controller 0                       */
/*******************************************************/
Controller Options :
   Memory                        : DDR2_SDRAM
   Interface                     : NATIVE
   Design Clock Frequency        : 3333 ps (  0.00 MHz)
   Phy to Controller Clock Ratio : 2:1
   Input Clock Period            : 4999 ps
   CLKFBOUT_MULT (PLL)           : 6
   DIVCLK_DIVIDE (PLL)           : 1
   VCC_AUX IO                    : 1.8V
   Memory Type                   : Components
   Memory Part                   : MT47H64M16HR-25E
   Equivalent Part(s)            : --
   Data Width                    : 16
   ECC                           : Disabled
   Data Mask                     : enabled
   ORDERING                      : Strict

AXI Parameters :
   Data Width                    : 64
   Arbitration Scheme            : RD_PRI_REG
   Narrow Burst Support          : 0
   ID Width                      : 4

Memory Options:
   Burst Length (MR0[1:0])          : 8
   CAS Latency (MR0[6:4])           : 5
   Output Drive Strength (MR1[5,1]) : Fullstrength
   Controller CS option             : Enable
   Rtt_NOM - ODT (MR1[9,6,2])       : 50ohms
   Memory Address Mapping           : BANK_ROW_COLUMN


Bank Selections:

System_Control: 
	SignalName: sys_rst
		PadLocation: No connect  Bank: Select Bank
	SignalName: init_calib_complete
		PadLocation: No connect  Bank: Select Bank
	SignalName: tg_compare_error
		PadLocation: No connect  Bank: Select Bank

 

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

Hello,

Your MIG settings look correct...

To be clear, is init_calib_complete not going high in simulation, or is it not going high when you run the design on your board?

To test that the DDR2 on your board is functioning, try running the project found here: https://reference.digilentinc.com/nexys4-ddr:userdemo .If you can record audio from the microphone and play it back on an attached speaker/headphones, then your DDR2 is working properly.This will rule out a problem with your board.

edit: Also, I don't see the IP core or HDL for your clocking wizard. What are the settings you are using? You might consider inverting the LOCKED signal from the clocking wizard and using it to drive RESET, in order to make sure the MIG hardware is properly initialized.

Link to comment
Share on other sites

Dear sbobrowicz,
 
Thanks for taking a look.  This is a simulation only project.  I don not presently have the DDR board.
 
By way of background,  I have a much larger project that runs on the Nexys4 that I wish to migrate to the Nexys4-DDR.  I'll need to use the MIG in AXI4 format to do that as my own project includes a bespoke AXI4 CellularRAM controller that will need to be replaced.  To maximize my chance of success with the migration I'm starting with simulation first and looking to make a simple "known-good" design as a kind of reference point.  Once everything works in simulation I can of course get the new board :-)
 
I noticed that in the ram2ddrxadc the state machine requires men_init_calib_complete to go high before it will undertake a write command.  Hence the issue.
 
Here are my current CLOCKGEN settings.  Thank you for the excellent idea to use RESET <= not LOCKED. I will give it a try.
//----------------------------------------------------------------------------
//  Output     Output      Phase    Duty Cycle   Pk-to-Pk     Phase
//   Clock     Freq (MHz)  (degrees)    (%)     Jitter (ps)  Error (ps)
//----------------------------------------------------------------------------
// CLK_OUT1___200.000______0.000______50.0______114.829_____98.575
//
//----------------------------------------------------------------------------
// Input Clock   Freq (MHz)    Input Jitter (UI)
//----------------------------------------------------------------------------
// __primary_________100.000____________0.010

`timescale 1ps/1ps

(* CORE_GENERATION_INFO = "CLOCKGEN,clk_wiz_v5_2_1,{component_name=CLOCKGEN,use_phase_alignment=true,use_min_o_jitter=false,use_max_i_jitter=false,use_dyn_phase_shift=false,use_inclk_switchover=false,use_dyn_reconfig=false,enable_axi=0,feedback_source=FDBK_AUTO,PRIMITIVE=MMCM,num_out_clk=1,clkin1_period=10.0,clkin2_period=10.0,use_power_down=false,use_reset=false,use_locked=false,use_inclk_stopped=false,feedback_type=SINGLE,CLOCK_MGR_TYPE=NA,manual_override=false}" *)

module CLOCKGEN 
 (
 // Clock in ports
  input         CLK_IN1,
  // Clock out ports
  output        CLK_OUT1
 );

  CLOCKGEN_clk_wiz inst
  (
 // Clock in ports
  .CLK_IN1(CLK_IN1),
  // Clock out ports  
  .CLK_OUT1(CLK_OUT1)              
  );

 

Link to comment
Share on other sites

I'm posting the log from the simulation run as well.  There is a warning that design.txt is not available.

WARNING: file design.txt could not be opened
 *** Warning: The analog data file design.txt for XADC instance Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.temp_mon_enabled.u_tempmon.xadc_supplied_temperature.XADC_inst was not found. Use the SIM_MONITOR_FILE parameter to specify the analog data file name or use the default name: design.txt.

############# Write Clocks PLLE2_ADV Parameters #############

nCK_PER_CLK      =       2
CLK_PERIOD       =    4999
CLKIN1_PERIOD    =   4.999
DIVCLK_DIVIDE    =       1
CLKFBOUT_MULT    =       6
VCO_PERIOD       =   833.0
CLKOUT0_DIVIDE_F =       2
CLKOUT1_DIVIDE   =       4
CLKOUT2_DIVIDE   =      64
CLKOUT3_DIVIDE   =       8
CLKOUT0_PERIOD   =    1666
CLKOUT1_PERIOD   =    3332
CLKOUT2_PERIOD   =   53312
CLKOUT3_PERIOD   =    6664
CLKOUT4_PERIOD   =    6664
############################################################

############# MMCME2_ADV Parameters #############

MMCM_MULT_F           =           7
MMCM_VCO_FREQ (MHz)   = 1200.000
MMCM_VCO_PERIOD       = 833.333
#################################################

Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : BYTE_LANES_B0 = f BYTE_LANES_B1 = 0 DATA_CTL_B0 = 5 DATA_CTL_B1 = 0
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : HIGHEST_LANE =           4 HIGHEST_LANE_B0 =           4 HIGHEST_LANE_B1 =           0
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : HIGHEST_BANK =           1
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : FREQ_REF_PERIOD         = 1666.00 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : DDR_TCK                 = 3333 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PO_S2_TAPS_SIZE         = 13.02 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PO_CIRC_BUF_EARLY       = 1 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PO_CIRC_BUF_OFFSET      = 1783.43 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PO_CIRC_BUF_META_ZONE   = 200.00 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PO_STG2_FINE_INTR_DLY   = 944.72 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PO_STG2_COARSE_INTR_DLY = 604.85 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PO_STG2_INTRINSIC_DELAY = 1549.57 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PO_CIRC_BUF_DELAY       = 60 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PO_INTRINSIC_DELAY      = 1549.57 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PO_DELAY                = 2330.51 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PO_OCLK_DELAY           = 0 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : L_PHY_0_PO_FINE_DELAY   = 60 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PI_STG1_INTRINSIC_DELAY = 0.00 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PI_STG2_INTRINSIC_DELAY = 919.47 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PI_INTRINSIC_DELAY      = 919.47 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PI_MAX_STG2_DELAY       = 819.98 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PI_OFFSET               = 212.00 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : PI_STG2_DELAY           = 212.00 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy :PI_STG2_DELAY_CAND       = 212.00 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : DEFAULT_RCLK_DELAY      = 16 
Board_testbench.uut.inst_ram2ddrxadc.Inst_DDR.u_ddr_mig.u_memc_ui_top_std.mem_intfc0.ddr_phy_top0.u_ddr_mc_phy_wrapper.u_ddr_mc_phy : RCLK_SELECT_EDGE        = 111 
run: Time (s): cpu = 00:00:00 ; elapsed = 00:00:06 . Memory (MB): peak = 786.746 ; gain = 0.000
xsim: Time (s): cpu = 00:00:04 ; elapsed = 00:00:08 . Memory (MB): peak = 786.746 ; gain = 0.000
INFO: [USF-XSim-96] XSim completed. Design snapshot 'Board_testbench_behav' loaded.
INFO: [USF-XSim-97] XSim simulation ran for 1000ns
launch_simulation: Time (s): cpu = 00:00:10 ; elapsed = 00:01:26 . Memory (MB): peak = 786.746 ; gain = 0.000

 

Link to comment
Share on other sites

Yes, I used the Micron simulation models from their website.  There are a number of files but the necessary ones for simulating the Nexys4 seemed to be ddr2.v and ddr_parameters.vh.  I added the following code to the beginning of ddr_parameters.vh to complete the setup. 

`define sg25
`define x16
`define MAX_MEM

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...