Repository navigation
Keep EEPROM chunks within the requested data range - #312
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 can process more bytes than the caller requests. An initial unaligned chunk ignores the remaining length. The write helper also sends a later final byte, then advances its recursive buffer/address by the full length instead of the transmitted half.
Return immediately for zero length. Bound each read/write chunk by the remaining request and its FIFO-aligned boundary. Advance by the actual transmitted length. Send contiguous write data in half-FIFO chunks without the recursive skip.
Keep control-byte encoding, STOP flags, and completion waits unchanged. Those issues are independent contributions.
Validation used official Cheshire
6c6dd5e834347f72c7be31cd6c41021ec293c5b9and its locked actual I2C DIFcd3153de2783abd3d03d0595e6c4b32413c62f14. The same host test compiled and executed the real HAL and DIF with their instrumented MMIO boundary.-std=gnu11 -O2 -Wall -Wextra -Werror: no warnings.Public commands and test adapters are in
sw/tests/host/EEPROM_CHUNKS.md. The test supplies scripted FIFO responses and a CLINT callback. It checks software progress only. It does not claim EEPROM/controller RTL, STOP completion, or physical timing verification. No EEPROM model is included.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.