-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
chisel decoder. #2
base: main
Are you sure you want to change the base?
Conversation
src/main/scala/Constants.scala
Outdated
val INST_I = Value((1 << 0).U) | ||
val INST_S = Value((1 << 1).U) | ||
val INST_B = Value((1 << 2).U) | ||
val INST_U = Value((1 << 3).U) | ||
val INST_J = Value((1 << 4).U) | ||
val INST_Z = Value((1 << 5).U) | ||
val INST_R = Value((1 << 6).U) | ||
val IN_ERR = Value((1 << 7).U) |
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.
From the RTL designer's review, your usage in decoder module needs a OH encoding which saves the extract comparing logic: (not (or (xor a b)))
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.
This is great... with chipsalliance/chisel#2261 it will be even better :)
src/main/scala/Decoder.scala
Outdated
0.U, // padding for InstructionType | ||
0.U // padding for InstructionType |
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.
Actually these padding are useless, in your future design, my suggestion is splitting instruction error out of this type and remove INST_R here.
I tried it out but got the error:
Any idea what cou be wrong? |
This is a strange bug: |
Hey @sequencer ... just a reminder to catch-up on this whenever we can :) |
Sorry for the delay again! |
Hey Jiuyang, I've rebased and fixed my decode pattern but now I'm getting:
I expect the Instruction type in the output but currently it's a UInt. Also I'm seeing lots of debug messages looking for "espresso" in my path. |
Just cast it(I know it's dirty, we should have a better name in the future)
It's available from https://github.com/chipsalliance/espresso |
…atch timing by removing useless Mux.
Thanks Jiuyang! It worked perfectly :D I've cast like: But I'm getting:
What's the right way to do without the warning? Other than that... I think we need some nicer way to avoid all casts and etc... :) It's a kinda complex and hard to remember pattern :) |
This is pretty neat, as an example I synthesized for ECP5 FPGA:
Saved about 300 LEs and gained about 3.5Mhz! |
Would you mind benchmark QMC vs espresso. I'm also curious to this. |
You mean by having
A bit more LEs but faster clock. |
switch to decoder, recode InstructionType uop to OneHot, improve dispatch timing by removing useless Mux.
(just a prototype, not guarantee the correctness ;p)