Fix reading and writing to mtimeh/mtimecmph on 64b Fabrics#15
Open
heshamelmatary wants to merge 2 commits intobluespec:masterfrom
Open
Fix reading and writing to mtimeh/mtimecmph on 64b Fabrics#15heshamelmatary wants to merge 2 commits intobluespec:masterfrom
heshamelmatary wants to merge 2 commits intobluespec:masterfrom
Conversation
Example: li s0, (CLINT_BASE + MTIMEH_OFFSET) // 0x_xxxx_bffc lw t0, 4(s0) t0 won't get the correct value mkNear_Mem_IO.rl_process_rd_req properly puts the value in the low 4-bytes of rdata, however, MMU_Cache.rl_io_near_mem_read_rsp uses fn_extract_and_extend_bytes which extracts the upper 4-bytes of the returned rdata (assuming a 64-bit aligned AXI rdata is returned). The commit properly composes a read reponse as mkNear_Mem_IO.rl_process_rd_req expects.
Example: li s0, (CLINT_BASE + MTIMECMPH_OFFSET) // 0x_xxxx_4004 sw t0, 4(s0) MMU_Cache.fn_to_fabric_write_fields composes a 64-bit wdata assuming the waddr is always gonna be 64-bit aligned, and thus puts the requested_wdata in the upper 4-bytes of word64 with the corresponding 0xf0 strobe. mkNear_Mem_IO.rl_process_wr_req however, handles writes to 0xxxx_bffc/0xxxx_4004, expecting the wdata to contain the value in the LSB (lower 4 bytes). The commit fixes mkNear_Mem_IO.rl_process_wr_req to handle "SW" writes on 64b fabrics by extracting the upper 4-bytes set by MMU_Cache.fn_to_fabric_write_fields.
f5b6c8b to
517b2c6
Compare
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.
No description provided.