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

litedram_gen: Don't block user port with no CPU #292

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion litedram/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,13 @@ def __init__(self, platform, core_config, **kwargs):

# User ports -------------------------------------------------------------------------------
user_enable = Signal()
self.sync += user_enable.eq(self.ddrctrl.init_done.storage & ~self.ddrctrl.init_error.storage)
if cpu_type is not None:
# block user port access until ready
self.sync += user_enable.eq(self.ddrctrl.init_done.storage & ~self.ddrctrl.init_error.storage)
else:
# memtest without CPU uses the user port, so don't block
self.comb += user_enable.eq(1)

self.comb += [
platform.request("user_clk").eq(ClockSignal()),
platform.request("user_rst").eq(ResetSignal()),
Expand Down