PR: R4 format support — EncodingLayout and field-to-bit mapping #17#22
Open
metasmile wants to merge 6 commits into
Open
PR: R4 format support — EncodingLayout and field-to-bit mapping #17#22metasmile wants to merge 6 commits into
metasmile wants to merge 6 commits into
Conversation
3182558 to
c33a426
Compare
…R4, fix IDX_undef in C assembly #17
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.
Summary
Add proper EncodingLayout to VerificationSpec for RISC-V instruction encoding format support. R-type and R4 formats are now first-class concepts with explicit field-to-bit-position mappings.
Changes
spec.rs: AddedEncodingLayoutstruct withfield_map: BTreeMap<String, FieldBitMapping>— format-agnostic field-to-bit mappingspec.rs: Addedencoding: Option<EncodingLayout>toVerificationSpecxif.rs: YAML parser supportsencoding: r(R-type, default) andencoding: r4(R4 with func2)xif.rs: Built-in default layouts for R-type and R4cva6_xif_ref.xif.yaml: Addedfunc2field,encoding: r4, updated cross constraintsR4 format layout:
{rs3[4:0], func2[1:0], rs2[4:0], rs1[4:0], funct3[2:0], rd[4:0], opcode[6:0]}Verification
cargo test --release: 14/14 pass, no regressionscva6_xif_ref: 262,144 total, 1,280 pass, 260,864 failCloses #17