Author Topic: DDR3 initialization sequence issue  (Read 30050 times)

0 Members and 2 Guests are viewing this topic.

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #625 on: October 17, 2021, 03:55:54 am »
All 'i_user_data_address' assignment logic are in the same always block.

And it is an input to the submodule.

I have commented out main_state inside the if-statement which might be the cause for clock domain conflict, but not helping.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 6073
  • Country: ca
Re: DDR3 initialization sequence issue
« Reply #626 on: October 17, 2021, 05:38:58 am »
Maybe it is 'clk_serdes' on line '351'.
How is 'clk_serdes' generated?
__________
BrianHG.
 

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #627 on: October 17, 2021, 06:39:37 am »
'clk_serdes' is generated from ALT_PLL core.

Note: The github version is targeted at Xilinx platform, so you might need to turn on the ifdef ALTERA option manually for code debugging purpose.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 6073
  • Country: ca
Re: DDR3 initialization sequence issue
« Reply #628 on: October 17, 2021, 12:27:44 pm »
Well, the ifdef in circuit will be ignored is not selected.

The modelsim which came with altera knows how to properly simulated altera IP like it's ALTPLL and DDRIO.  If you select CycloneIV as an FPGA, it can be setup to simulate with actual true IO timing.

Have you tried changing which default Verilog version Quartus uses?
In 'Assignment Settings / Compiler Settings / Verilog HDL Input', you may choose:
Verilog 1995
Verilog 2005
SystemVerilog

If this does work, it will not tell you what you have done which made your code not work with for example 'Verilog 1995'.  (Well maybe you will see a 'warning' in the system messages window during compile which might offer a better clue.)  It will be then up to you whether you want to further hunt down the issue.

Warning about Cyclone IV/V and Max10, they use different types of DDR ip and Quartus may compile Cyclone's DDR ip when generating a Max10 FPGA, but, it will not work on silicon and there is no warning.  I did complain on Intel's forum, but not much came of it.
« Last Edit: October 17, 2021, 12:33:26 pm by BrianHG »
__________
BrianHG.
 

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #629 on: October 17, 2021, 12:31:36 pm »
Modelsim will not launch unless Quartus had finished the synthesis process.

I am using systemverilog for the file type if that is what you are asking.

I am really stucked here with ISE tool not being able to simulate Micron simulation model in systemverilog, Vivado tool not being able to get past fseek() error, and Quartus tool with multiple driver synthesis error.

Let me also change the DDR IP as you had suggested for Max10 and see if this helps with the synthesis error.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 6073
  • Country: ca
Re: DDR3 initialization sequence issue
« Reply #630 on: October 17, 2021, 12:43:18 pm »
Modelsim will not launch unless Quartus had finished the synthesis process.

I am using systemverilog for the file type if that is what you are asking.

I am really stucked here with ISE tool not being able to simulate Micron simulation model in systemverilog, Vivado tool not being able to get past fseek() error, and Quartus tool with multiple driver synthesis error.

Let me also change the DDR IP as you had suggested for Max10 and see if this helps with the synthesis error.

Yes, Altera modelsim will launch without Quartus, just click on it's icon.  You just need to know the setup commands and how to include project files in the transcript window.  In fact, I now go to Quartus last as working in Modelsim alone only takes around 1-2 seconds to completely re-compile a build.  The instructions are in my DDR3 build, in the simulation instructions on my setup_****.do and run_****.do script files.  They have the library includes for the altera IP on the 'vsim' line while the vlog's I use to include my project source files.  If you want full timing simulations, yes it must first completely compile for a FPGA in Quartus.
__________
BrianHG.
 
The following users thanked this post: promach

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #631 on: October 17, 2021, 01:11:50 pm »
Ok, it seems that the multiple driver synthesis error might be originating from the generate for loop
 

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #632 on: October 17, 2021, 01:35:05 pm »
I have solved the multiple driver synthesis error in Quartus.

May I know where I could find tri-state buffer primitive for Altera MAX10 ?

I tried to search for keyword "buf" inside the IP catalog, but nothing came up.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 6073
  • Country: ca
Re: DDR3 initialization sequence issue
« Reply #633 on: October 17, 2021, 01:54:19 pm »
Functions to look at in attached images.
The Max10 has everything squished into their GPIO.
Run the wizard and let it generate sample verilog code for you.
__________
BrianHG.
 
The following users thanked this post: promach

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 6073
  • Country: ca
Re: DDR3 initialization sequence issue
« Reply #634 on: October 17, 2021, 01:58:17 pm »
As for a simple tristate anywhere, there is always:

inout  iopin,

reg iopin_oe;
reg iopin_outdata;
assign iopin = iopin_oe ? iopin_outdata : 1'bz ;

...
readback_iopin <= iopin ;

__________
BrianHG.
 

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #635 on: October 17, 2021, 02:54:15 pm »
I tried to search for more information about MAX 10 GPIO , but there is not much info about tri-state buffer ?
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 6073
  • Country: ca
Re: DDR3 initialization sequence issue
« Reply #636 on: October 17, 2021, 03:31:36 pm »
The tristate is an input to the GPIO.
Run the megawizard and read and look at the example generated verilog code.
ok just use the verilog code example 2 posts up.
« Last Edit: October 17, 2021, 03:36:04 pm by BrianHG »
__________
BrianHG.
 
The following users thanked this post: promach

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #637 on: October 17, 2021, 03:54:18 pm »
the simple verilog code example is not enough for double-data-rate purpose.

Anything wrong with the following setting for DQS tri-state buffer ?

 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 6073
  • Country: ca
Re: DDR3 initialization sequence issue
« Reply #638 on: October 17, 2021, 04:09:18 pm »
the simple verilog code example is not enough for double-data-rate purpose.

Anything wrong with the following setting for DQS tri-state buffer ?


Disable open-drain output.
Open-drain means it will not drive a high, only low or open.

The rest is functional.
The DQ and DM should be the same except for the use-differential.

Disabling the the open-drain may allow the use of a register to drive the OE at the IO buffer.
You can verify your code with my choice here:
https://github.com/BrianHGinc/BrianHG-DDR3-Controller/blob/75a3d5fe0ef248d7826fdf5fab9c369686c6aa2f/BrianHG_DDR3/BrianHG_DDR3_IO_PORT_ALTERA.sv#L278

Except for parameter 'INVERT_INPUT_CLOCK' as you may be using a separate PLL phase to drive the clock input depending on your design.
« Last Edit: October 17, 2021, 04:12:56 pm by BrianHG »
__________
BrianHG.
 
The following users thanked this post: promach

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #639 on: October 17, 2021, 04:30:00 pm »
May I know why you set ENABLE_OE_PORT , INVERT_INPUT_CLOCK , USE_ONE_REG_TO_DRIVE_OE , USE_DDIO_REG_TO_DRIVE_OE , USE_ADVANCED_DDR_FEATURES_FOR_INPUT_ONLY to TRUE ?
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 6073
  • Country: ca
__________
BrianHG.
 
The following users thanked this post: promach

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 6073
  • Country: ca
Re: DDR3 initialization sequence issue
« Reply #641 on: October 17, 2021, 04:51:38 pm »
The end result of my parameter selection is a DDR buffer which functions identically to altera Cyclone's altddio_bidir buffer with the following settings:

https://github.com/BrianHGinc/BrianHG-DDR3-Controller/blob/75a3d5fe0ef248d7826fdf5fab9c369686c6aa2f/BrianHG_DDR3/BrianHG_DDR3_IO_PORT_ALTERA.sv#L390

Now, the 1 piece of code I made will operate identically for Max10 and Cyclone V/IV/III.
« Last Edit: October 17, 2021, 05:11:55 pm by BrianHG »
__________
BrianHG.
 

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #642 on: October 18, 2021, 04:24:08 pm »
I do not understand why you use .din( 2'b10 )
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 6073
  • Country: ca
Re: DDR3 initialization sequence issue
« Reply #643 on: October 18, 2021, 04:47:27 pm »
Since it is a 1 bit DDR buffer, and that is the SDR input -to- DDR data output which will be fed out, a 0 will be sent when the DDR_CLK goes high, and a 1 will be sent when the DDR_CLK goes low.
__________
BrianHG.
 
The following users thanked this post: promach

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #644 on: October 18, 2021, 05:03:29 pm »
 

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #645 on: October 20, 2021, 03:03:38 pm »
Why does a simple tri-state buffer require clock to gate the data signals ?  I suppose it is the job of OE (output enable) signal to do this ?
 

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #646 on: October 24, 2021, 03:46:19 pm »
As for the fseek() issue, it seems that row = row_pipeline[0]; contains the XXX value.
But I am not sure what causes this.

Note: According to the simulation waveform, there is no XXX value in any of the DDR command inputs signals

 

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #647 on: October 26, 2021, 01:53:36 pm »
I have gotten around the fseek() issue by exporting Vivado simulation libraries to Modelsim.  It seems that it is due to Vivado internal issue, not related to any of the user application coding.

Modelsim waveform using SOFTWARE PLL approach




Modelsim waveform using HARDWARE PLL approach

« Last Edit: October 26, 2021, 01:55:34 pm by promach »
 

Offline promach

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: DDR3 initialization sequence issue
« Reply #648 on: October 31, 2021, 09:56:30 am »
What causes the col address to follow this order : 5, 6, 7, 4, 1, 2, 3, 0 ?

« Last Edit: October 31, 2021, 03:06:40 pm by promach »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf