Hi All,
On the code side I have almost finished a polymorphic RISC-V decoder generator (intend to finish over Easter).
A new branch of riscv-opcodes is here:
https://github.com/michaeljclark/riscv-mc/blob/master/riscv-opcodes/
It looks very difference to the current riscv-opcodes however there are only minor semantic differences:
– added ISA extension membership
– shift instructions are duplicately defined due to RV64, RV128 encoding differences
– some reformatting and reordering of instructions to more closely match the specification
– modified section titles to match the ISA specification titles
– added decoder class which is a flattened namespace of distinct encodings
– parse-opcodes can ignore any of this additional meta data
– merger of opcodes, opcodes-pseudo, opcodes-rvc and opcodes-rvc-pseudo
– complete metadata for the compressed instruction set arguments
– removal or ignore opcode space placeholders which are ignored by parse-opcodes
– we are developing a tool to reflect on the opcode space so “ignore" may be redundant
– we may need to add back some @ symbols for the pseudo instructions to work with the chisel generator
It will be exhaustively tested before I consider making a pull request. i.e. boot linux and run the test suite on a decoder generated from these opcode files and check that the Chisel output is the same.
I have also added an additional <args> file that uses a notation similar to the specification so that the instruction metadata can be reflected on in any language (C++, C, JavaScript, Haskell, OCaml, Python, etc).
Please take a look and give me any feedback. I am almost about to finish working on C/C++ encode/decode generator. I can consider LaTeX generation. We could for instance annotate args with descriptions we want to appear in the documentation. We can make ASCII art, or even work on a RISC-V ISA Quick-Reference Guide. This would require us to extract concise one line descriptions of each instruction.
~mc