Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ZCU104 board #47

Merged
merged 1 commit into from
Feb 27, 2020
Merged

Conversation

piotr-binkowski
Copy link
Contributor

This adds basic support for the ZCU104 board, DDR4 configuration is currently untested.

self.add_csr("ddrphy")
self.add_constant("USDDRPHY", None)
# FIXME: Use correct DDR4 module
sdram_module = EDY4016A(sys_clk_freq, "1:4")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did play with LiteX on the ZCU104 a while ago, never got round to something upstreamable in the end due to other priorities. But this DDR config worked daveshah1/litedram@f08cfe6#diff-bc9fdc9a0f1aa798161b2333f66733b7R450 and this was my board file https://github.com/daveshah1/litex-boards/blob/6d7eb0df09d7c886fa93b26f6d763dc78082408c/litex_boards/community/platforms/zcu104.py

]
self.specials += [
Instance("IDELAYCTRL", p_SIM_DEVICE="ULTRASCALE",
i_REFCLK=ClockSignal("clk200"), i_RST=ic_reset,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I didn't realise at the time and 200MHz worked fine; officially the UltraScale+ requires 300MHz minimum for IDELAYCTRLs, this may matter if pushing the DDR4 clock higher and needing finer delay control.

return VivadoProgrammer()

def do_finalize(self, fragment):
XilinxPlatform.do_finalize(self, fragment)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From memory, I needed these lines here for reliable DDR4:

        self.add_platform_command("set_property INTERNAL_VREF {{0.84}} [get_iobanks 65]")
        self.add_platform_command("set_property INTERNAL_VREF {{0.84}} [get_iobanks 66]")

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, it will not work without it.

@piotr-binkowski
Copy link
Contributor Author

@daveshah1 thanks for the links

@enjoy-digital
Copy link
Member

Thanks @piotr-binkowski for the PR, @daveshah1 for the feedback. I'll have a closer look for the minimum IDELAYCTRL frequency.

@piotr-binkowski can you use similar IO settings than 9d2ca50? I just did some comparisons with the Xilinx's MIG and updated the settings. (The ZCU104 should use similar settings, but if you want to check, you can download the MIG example for the ZCU104 board and compare the IO settings between Xilinx's MIG and your desgin in the IO report .rpt file).

@piotr-binkowski
Copy link
Contributor Author

I will try to use the settings you mentioned, at the moment I've managed to get the LiteDRAM partially working - I can use only half of the data bus width because the other half seems to fail during read leveling phase. I've also modified the design to use 500MHz clock for IDELAYCTRL (I couldn't get 300MHz output to work with current PLL setup so I'm using 500MHz for now)

@piotr-binkowski
Copy link
Contributor Author

This now depends on enjoy-digital/litedram#154

@enjoy-digital
Copy link
Member

@piotr-binkowski: Do you want to merge it now and open an issue for the remaining things to look at or wait everything is fixed before merging?

@piotr-binkowski
Copy link
Contributor Author

@enjoy-digital I think we can merge it now and create an issue for the remaining things

@piotr-binkowski piotr-binkowski changed the title [WIP] Add support for ZCU104 board Add support for ZCU104 board Feb 27, 2020
@enjoy-digital enjoy-digital merged commit 22b0449 into litex-hub:master Feb 27, 2020
@piotr-binkowski piotr-binkowski deleted the zcu104 branch February 27, 2020 09:33
@enjoy-digital
Copy link
Member

enjoy-digital commented Feb 27, 2020

Thanks, this has been merged. I did a few changes:

  • added copyrights with 8ecfb13.
  • created 2 ddram definitions: ddram_32 and ddram_64 to ease switching between both: d87b8b3.
  • added the PRE_EMPHASIS/EQUALIZATION settings: 58f588f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants