Instructions and Extensions
In order to analyze the complete ISA (Instruction Set Architecture) the tool parses the instr_dict.json provided by RISCV.
A default copy is provided with the install, however the user can override with a local copy:
avl-riscv-coverage --ref <PATH TO instr_dict.json>
Once parsed all available instruction encodings are available in the _isa.ISA dict.
This is indexed by the string mnemonic of the instruction encoding and in the _isa.Encoding format. The _isa.Encoding class provides the function to extract the exact instruction, including operands, from a given encoding value.
Initially all possible encodings are captured, for all extensions and bases. However, once the elf has been parsed this is reduced to the available set compiled for the given application. This is to reduce the scope, allowing the user to generate coverage specific to the subset of extensions for their given implementation.