required entries:
-
settypestring, the name of the Instruction Set, currently unused -
widthtypeinteger, the width of an instruction defined by the set, in bits, used by the decoder to filter which set to search for a valid instruction in -
formatstypemapnamestypelist, list of all different output format names that are contained in the file, given asstringpartstypelist, list of all parts that may appear in a type. Each part is alistitself, with the entries, the last marked as optional: name, bitwidth, type[, format]- name is a
string - bitwidth is an
integer - type is a
stringand can be"boolean", "char", "i8", "i16", "i32", "i64", "u8", "u16", "u32", "u64", "isize", "usize", "f32", "f64"or the slightly special type"VInt", which is an unsigned or signed number of 128 bit size, depending on an argument in the instructions section later on All other type names are also accepted (as long as they do not contain the reserved character.), but are treated as custom Mappings that must be defined in the toml itself - the optional value of format is of type
stringand can be any of the following:"", "decimal", "dec", "d", "10"for decoding as a base 10 number,"hexadecimal", "hex", "h", "x", "0x", "16"for decoding as a base 16 number,"Octal", "oct", "o", "0o", "8"for decoding as a base 8 number and"Binary", "bin", "b", "0b", "2"for decoding as a base 2 number. Since""is included in base 10, leaving out the format value implies base 10
- name is a
-
typestypemapnamestypelist, list of all different type names that are contained in the file, given asstring<name>of typelist, one exists for each type named intype.nameswith<name>being replaced with the value from the list The parts are also listed in the exact order they appear in the instruction type that is to be decoded, from MSB to LSB Each entry in the list is of typemapwith the following values:namename of the part (typestring), corresponding to the name from thetypes.partslisttoptop bit index of the part (typeinteger) that is being mapped onto the instructionbotbottom bit index of the part (typeinteger) that is being mapped onto the instruction- [
extend_top] optional, typeinteger, value for how many extra bits the top bit should be extended for, absence implies 0
-
mappingstypemapnamestypelist, a list of strings which define all custom mappings in the file<name>of typelistormap(where all keys need to be numbers, either in decimal format or in number prefix form, eg 0x10) If the type islist, then the index of the element is used for the mapping, and if an index that would be out of range were to appear, it would cause an error If the type ismap, then the key would be used for mapping, and if the key does not exist, it will not cause an error, but instead just print out the unmapped value
-
<format-name>typemap, one for every entry in the format names listtypetypestring, corresponds to the type used to parse the instruction, which will directly impact what parts are available to use for the formatinstructionstypemap<name-of-instruction>typemap, one for every instruction hat should be represented by the formatmaskthe value that is applied to an incoming instruction via an AND operationmatchthe value that the incoming instruction & mask should be, if the incoming instruction should be decoded as this one- [
unsigned] typeboolean, True if allVIntparts in the type should be decoded as unsigned. If the entry is missing, it implies False, and thus allVIntwill be signed
reprtypemapdefaultfor representing the default formatting- the format string works in the way, that it replaces certain parts of the string, i.e.
%<name_of_part>%with the corresponding decoded value of the part in the type, as well as$name$with the name of the instruction
- the format string works in the way, that it replaces certain parts of the string, i.e.
<name-of-instruction>for overriding the formatting for single instructions