Skip to content
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

Q) How to fetch & decode compressed instructions #215

Open
mbaykenar opened this issue Mar 18, 2022 · 0 comments
Open

Q) How to fetch & decode compressed instructions #215

mbaykenar opened this issue Mar 18, 2022 · 0 comments

Comments

@mbaykenar
Copy link

I wonder how compressed instructions are reside inside memory? I know their lengths are 16-bit instead of 32-bit.
A memory can be looked like this:

Each line is an instruction | x is 4-bit
xxxx
xxxxxxxx
xxxx
xxxx
xxxxxxxx
xxxxxxxx
xx

I tried to follow RTL code and understand it but if some of my questions below are answered then I understand it better:

Q1) How to know how many bits to be fetched from instruction memory? If it is a compressed instruction and cpu fetches 4 bytes, then what happened to the next cycle? Maybe the next instruction is 32-bit?

Q2) I saw that inside picorv32.v module the there is COMPRESSED_ISA parameter but couldn't follow what exactly happens if COMPRESSED_ISE is 1?
So after decoding the increment value is determined according to the result of the decode operation ?

Please you can also direct me to the lines inside the modules where these kind of fetch & decode of compressed instructions are handled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant