Add look ahead interface for working COMPRESSED_ISA #65
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.
I played a bit with
examples/soc_ecp5_evnand could not get theCOMPRESSED_ISAoption working for non trivial programs (conditional jump destinations got garbled in some situations).
By enabling
debug()inpicorv32.vI could see that a 4-byte instruction at e.g.0x0x0102got bits [31:16] from
0x0x100. The root cause is that the current example does NOT use themem_la_*interface.That is fine when
COMPRESSED_ISAis disabled, but when it is enabled picorv32 sometimes uses theread data already in the next cycle, when it is not yet available. Adding and using the
mem_la_*interface fixes this.I also wondered why
debug()did not showDECODEwhenENABLE_IRQwas enabled, but that was caused byirqbeing set to32'hxbecause it was not used inattosoc.v. I addedirq/eoito the used interface.Some additional changes are (I could create a new PR if you don't like these):
Expand memory to 64K.
Add simple start.S with minimal trap handler
(partially copied from https://github.com/cliffordwolf/picorv32/blob/master/firmware/start.S)
Add printf from https://github.com/mpaland/printf and use it in
firmware.cUse
SITE "L19"for UART output, because I use the ECP5-EVN board in the default factory setting without adding 0-ohm bridges to route UART to the FTDI chip. I use a standard USB-serial adapter to read the output fromL19instead.