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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zcb: Code Size Reduction Extension #3362
base: dev
Are you sure you want to change the base?
Zcb: Code Size Reduction Extension #3362
Changes from all commits
e160e98
b943cfb
face7de
323d57d
4a67839
98064d1
0ebed64
05ee78a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zcb should be populated with conditions
For example,
c.zext.b
should be added only whenusingBitManip
, andc.mul
should be populated only whenusingMulDiv
,zext.w
should be added only when RV64. This could save a tiny bit of area.Other insts like
c.lbu
andc.not
will always be added asI
orE
are always present. This default behavior will add area overhead for end users as they may not use it. I think we provide an option likeusingCompressedBitManip
to control this behavior. Asking @jerryz123 for advice.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A mistake. Should @jerryz123.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameters to the RVCDecode object should be added that disable the Zcb/Zcmp/Zcmt extensions if not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jerryz123 , @ZenithalHourlyRate
In order to enable/disable Zcb,
usingCompressedSuiteB
parameter is added and routed (along withusingMulDiv
andusingBitManip
) to RVCDecoder to apply the condition on the corresponding instructions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes currently for rocket when fpu.nonEmpty F-ext will always be enabled
rocket-chip/src/main/scala/tile/FPU.scala
Lines 162 to 166 in 47f7b71
But the consistency is not kept everywhere, e.g. misa has a different way
rocket-chip/src/main/scala/tile/BaseTile.scala
Line 103 in bd3276d
rocket-chip/src/main/scala/rocket/CSR.scala
Line 597 in bd3276d
To reduce such inconsistency, I believe we should finish this TODO? Are you interested in this TODO? If so, things should be done in another PR.
rocket-chip/src/main/scala/tile/BaseTile.scala
Line 98 in bd3276d