Repository navigation
DDR2: use Micron DDR2-800 datasheet timings, fix tRPA and auto-precharge burst spacing - #8
Open
samirbhattarai135 wants to merge 2 commits into
Conversation
The DDR2 timing parameters matched the DDR3-1600 values on every shared key. Replace them with the values for the Micron MT47H64M16 -25E part (1Gb, x16, DDR2-800, CL = 5, tCK = 2.5 ns) from the Micron 1Gb DDR2 SDRAM datasheet, Rev. Y 02/14, Table 12.
PRECHARGE ALL uses tRPA = tRP + tCK on 8-bank devices (datasheet note 36), not tRP. The old tRP of 10 hid this. Only a READ or WRITE without auto precharge can be interrupted 2 tCK later (Figs. 49, 61). After RDA or WRA the next READ or WRITE to another bank needs BL/2 (Tables 42, 43). There was no WRA-to-WR rule at all, so a WR one cycle after a WRA was accepted.
jan-o-e
self-requested a review
November 26, 2026 09:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR replaces the DDR2 timing values with the datasheet values for one real part, and fixes three rules the datasheet disagrees with.
Vendor datasheet: Micron, 1Gb: x4, x8, x16 DDR2 SDRAM, 1GbDDR2.pdf Rev. Y 02/14 (136 pages). The part is the MT47H64M16 (x16, 8 banks) in speed grade -25E, which is DDR2-800 at CL = 5 and tCK = 2.5 ns. It is the DDR2 part on the Digilent Nexys A7 board. Each value is ns / tCK, taken from Table 12 (pp. 35-41) and p. 86 (RL = AL + CL, WL = RL - 1). Every line in
timing_params/ddr2.pyhas a comment that gives its source value.Commit 1: values only
Before this commit,
timing_params/ddr2.pyandtiming_params/ddr3.pyshared 18 keys, and every one of them had the same value.These keys do not change: tPD 3 (tCKE), tXSRD 200, tXARD 2, tAL 0, tRTRS 1 and tCK 1.
Commit 2: rules
This commit is separate, so you can take the values without it.
tRPA= tRP + tCK = 6. Note 36 gives this value for 8-bank devices. The old tRP of 10 covered the gap. If a memspec has notRPA,create_standardraises aTypeError; it does not build a net with a silent bound.Testing
pytest: 10 passed on each commit.example_ddr3.pyalso runs.can_fire_transition:Left unchanged, as questions
nbrOfBanksstays at 2. Every memspec in the repo uses 2, so I took it to be a deliberate limit on state space. The real part has 8, and with 2 banks tFAW can never bind.DDR2_800C_1GBstays. The -25E part reaches tCK = 2.5 ns only at CL 5 or above (Table 12), so the letter in the name may not match this part.Other disagreements with the datasheet
I can send these as separate PRs if you agree with how I read them:
tXARDS = 6 - ALis the DDR2-400/533 value, and -25E needs 8 - AL (p. 41). A fix needs a slow-exit (MR12) flag in the memspec.I found these by running the net as an RTL bus monitor alongside
can_fire_transition: https://github.com/samirbhattarai135/ddr2-timing-monitor (each case is intools/audit.py).