Repository navigation
Encode EEPROM block and chip-select bits in the control byte - #311
Open
lionelZhaowy wants to merge 1 commit into
Open
lionelZhaowy wants to merge 1 commit into
lionelZhaowy wants to merge 1 commit into
Conversation
AI assistance: OpenAI Codex assisted implementation and validation.
This branch has not been deployed
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.
The EEPROM HAL calculates the control byte with shifts that place the block and chip-select bits above bit 7. Passing that value to the byte-wide DIF discards them. Reads in higher 64 KiB blocks therefore address block zero instead.
Map logical address bit 16 to B0 and bits 17/18 to the device-select bits. The one-line change follows the Microchip 24FC1025 Device Addressing format:
1010 B0 A1 A0 R/W.Validation used official Cheshire
6c6dd5e834347f72c7be31cd6c41021ec293c5b9and its locked opentitan_peripherals DIFcd3153de2783abd3d03d0595e6c4b32413c62f14. The host test compiles the actual HAL and DIF, then instruments their existing MMIO boundary. Ten one-byte reads cover all eight block/device selections and two boundary addresses. A literal table supplies independent expected control bytes.-std=gnu11 -O2 -Wall -Wextra -Werror: no warnings.Commands and explicit adapters are in
sw/tests/host/EEPROM_CONTROL.md. The test aliases the initializer's MMIO field token for the instrumented host type. It supplies a CLINT callback and scripted FIFO responses. It does not use an EEPROM model or claim RTL, STOP, page-write, or timing verification. Other EEPROM HAL defects remain separate.AI assistance: OpenAI Codex assisted implementation, test, and validation. A separate AI review checked the actual changes and results. This was not a human review.