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

Implement Wishbone Burst Support for Memory Controller #151

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

occheung
Copy link
Contributor

@occheung occheung commented Oct 10, 2024

Description

Burst access is handled as the following:

  • Memory controller waits for DFI to confirm read success before ack back.
    • while waiting from the main memory, the controller read the next address unless the page boundary is found/end of burst.
  • Write bursts are always ack'd immediately, once a DFI instruction is issued.
  • Address are pre-emptively incremented after issuing each DFI instruction, without inputs from the bus master.
  • Burst will not cross page boundary. The controller always return the state back to IDLE.
  • Memory controller issues refresh instruction if a burst may cause an un-timely refresh. No need to do this now.

To support burst access, the wishbone arbiter shall not release grant to masters during a burst.

@sbourdeauducq
Copy link
Member

Memory controller issues refresh instruction if a burst may cause an un-timely refresh.

Is this really necessary? AFAIK SDRAM only cares about the average refresh rate and can tolerate considerable jitter. Did you check the datasheet or JEDEC standard?

)
fsm.act("INVALIDATE-READ",
# Invalidate responses by deasserting ACK
# The last legitimiate word was sent out by the end of BURST-READ
Copy link
Member

Choose a reason for hiding this comment

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

legitimate

@occheung
Copy link
Contributor Author

occheung commented Oct 25, 2024

Memory controller issues refresh instruction if a burst may cause an un-timely refresh.

Is this really necessary? AFAIK SDRAM only cares about the average refresh rate and can tolerate considerable jitter. Did you check the datasheet or JEDEC standard?

The timer does not reset until a refresh is issued. If we have very long burst consistently (page size burst would take 1us), then the state machine may be issuing a refresh too late with the timer not being compensated. The frequency will be significantly off.

What about we let the timer underflow back to reset, and simply have a flag that records the underflow. Trigger a refresh from IDLE if the flag was set, and reset the flag after refresh. We are assuming maximum burst time << refresh period in this case.

Otherwise a pending refresh count with a suitable bit width should do.

@sbourdeauducq
Copy link
Member

What about we let the timer underflow back to reset, and simply have a flag that records the underflow.

Yes, that would be the right way of doing this. I thought it was like that already but I may be mistaken.

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.

2 participants