aboutsummaryrefslogtreecommitdiff
path: root/parse.py
AgeCommit message (Collapse)AuthorFilesLines
12 daysInclude rs1 values in Go instruction opcodes. (#254)Joel Sing1-1/+3
Some of the instructions in the V extension encode part of the opcode in the rs1 field. These values are not currently included in the Go instruction opcodes - fix this by adding an rs1 field and populating it with the relevant values.
2024-05-15Fix typos in parse.py (#247)Patrick Yingxi Pan1-3/+3
Signed-off-by: Patrick Yingxi Pan <patrick-yingxi-pan@users.noreply.github.com>
2024-05-01Correctly detect overlapping encodingsAndrew Waterman1-11/+34
A regression introduced a few years ago prevented detecting partially overlapping encodings; instead, we only detected exact matches. Now, we detect the partial cases. We now need to maintain two allowlists (overlapping_extensions and overlapping_instructions) for the cases that extensions and/or instructions overlap by design.
2024-05-01Remove RV128 for nowAndrew Waterman1-3/+1
It is highly speculative at this point, but it adds maintenance burden.
2023-05-02Merge pull request #167 from Lucas-Wye/masterNeel Gala1-2/+28
change decode generation part of chisel
2023-05-01Support for Zvk, Vector Cryptography ExtensionsEric Gouriou1-4/+1
Add encodings for all instructions in the Zvk extensions: - Zvbb, Vector Bit-manipulation instructions used in Cryptography, - Zvbc, Vector Carryless Multiplication - Zvkg, Vector GCM/GMAC instruction for Cryptography, - Zvkned, NIST Suite: Vector AES Encryption & Decryption (Single Round), - Zvknha, Zvknhb, NIST Suite: Vector SHA-2, - Zvksed, ShangMi Suite: SM4 Block Cipher Instructions - Zvkssh, ShangMi Suite: SM3 Hash Function Instructions Add two "shorthand" extensions: - Zvkn: NIST Suite, imports Zvbb, Zvbc, Zvkned, and Zvknh - Zvks: ShangMi Suite, imports Zvbb, Zvbc, Zvksed, and Zvksh Three new fields are listed in constants.py: - 'zimm5', used to encode round constants (Zvkns, Zvksed, Zvksh), and 5-bit shift constant (vwsll.vi in Zvbb) - 'zimm6hi, zimm6lo', used to encode the 6 bits rotate amount in vror.vi. The Zvk instructions – with the exception of Zvbb, Zvbc – reside in the P opcode space. Some encodings conflict with proposed instructions in the P extension (packed SIMD). Zvk and P are exclusive of each other, no implementation will implement both. Conflicting P instructions are marked as pseudo of the Zvk instructions. The encodings match the current documentation of the specification at <https://github.com/riscv/riscv-crypto/tree/master/doc/vector>, at Version v0.9.1, 25 April, 2023 (Freeze Candidate). Co-authored-by: Eric Gouriou <ego@rivosinc.com> Co-authored-by: Stanislaw Kardach <kda@semihalf.com> Co-authored-by: Kornel Duleba <mindal@semihalf.com> Co-authored-by: Raghav Gupta <rgupta@rivosinc.com> Signed-off-by: Eric Gouriou <ego@rivosinc.com>
2023-04-07Fix merging of instructions with the same namedramforever1-6/+8
Fixes generation of 'extension' field for instr_dict.yaml
2023-03-17use val instead of defLucas-Wye1-5/+1
2023-03-10change the generation part of chiselLucas-Wye1-2/+32
2023-01-26Update encoding.h.out's copyright year.Aaron Durbin1-1/+1
It's a new year. Make the copyright clause reflect 2023.
2023-01-14indenting logs for better readabilityNeel Gala1-2/+2
2023-01-14fix regex fpr pseudo op lookup to ensure that we don't hit on substringsNeel Gala1-1/+1
2023-01-12Emit SLLI_RV128 etc. (and SLLI_RV32 etc. while we're at it)Andrew Waterman1-1/+4
2023-01-04Update READMEBabu P S1-2/+2
2022-10-05support import parse.py from other python script.Jiuyang Liu1-14/+16
This PR changes opcodes_dir to the REAL path of parse.py. It helps python scripts which depends on parse.py can be stored in other place, using PYTHONPAT or sys.path to import from riscv-opcodes/parse.
2022-08-28Make path to encoding.h relative to script (#141)Florian Zaruba1-1/+1
That allows for running the script out-of-tree. Signed-off-by: Florian Zaruba <florian@zaruba.email> Signed-off-by: Florian Zaruba <florian@zaruba.email>
2022-08-23Add copyright holder to the generated file (#140)Antonio Borneo1-0/+2
The BSD-3-Clause license mentions a copyright notice that has to be retained while redistributing the source code. Copy the copyright notice from LICENSE file to the script, so it get in the generated file. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-18Change to BSD-3-Clause license, and copyright holder. (#139)Tim Newsome1-1/+1
This removes the language about patents that was added in #133. Change copyright holder to RISC-V International.
2022-08-04fix extension merge and add name and encoding conflict checking (#116)Lehua Ding1-5/+33
* fix extension merge and add name and encoding conflict checking * fix comments * uniform code's indentation
2022-07-22Move the SPDX tag to the first line (#137)Antonio Borneo1-4/+6
Linux kernel coding style requires the SPDX tag to be placed in the very first line of the generated file. See kernel file Documentation/process/license-rules.rst at chapter 'License identifier syntax', '1. Placement:'. Move the SPDX tag in the python script. While there, adjust also the style of the multi-line comment. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-10Fix incorrect encoding output in instr_dict.yaml. (#127)Kieran Siek1-1/+1
Making a shallow copy of the list prevents updating the final encoding output when checking for field overlap. Incorrect: encoding: 0000000rs2rs2rs2rs2rs2rs1rs1rs1rs1rs1000rdrdrdrdrd0110011 Correct: encoding: 0000000----------000-----0110011
2022-06-09provide a list of pseudo ops that need to be included in the instruction dictNeel Gala1-4/+10
specifically done to handle encoding.out.h that is being used by spike
2022-06-09improve logging statementsNeel Gala1-3/+3
2022-06-09sort the filenames in reverse-alphabetical orderNeel Gala1-1/+1
This is to ensure that pseudo instructions like slli are added from rv64i instead of rv32i
2022-06-09Check for overlaps between different fields (#122)Pavel I. Kryukov1-5/+10
2022-06-09update Go generator (#124)Meng Zhuo1-2/+18
2022-05-23Remove duplicate code (#121)Pavel I. Kryukov1-36/+14
* Remove duplicate code * Fix unit test
2022-05-18Check for overlapping fields (#120)Pavel I. Kryukov1-0/+9
* Check for overlapping fields * Enable unit test
2022-05-17Test error inputs handling, fix few bugs (#119)Pavel I. Kryukov1-15/+18
* Test error inputs handling * Add mask tests * Apply code review fix
2022-05-10Dump masks to C output (#113)Pavel I. Kryukov1-1/+9
* Dump masks to C output * Use `INSN_FIELD_` for masks
2022-05-03adding support for Go code generationNeel Gala1-1/+51
2022-05-02Remove blank lines before #endif in encoding.out.hAndrew Waterman1-8/+4
2022-05-02Remove trailing whitespaceAndrew Waterman1-33/+33
2022-05-02Improve formatting of generated LaTeXAndrew Waterman1-8/+8
2022-05-02adding support for spinalhdl code generationNeel Gala1-3/+13
2022-04-08pass only fence_tso and pause to rv32i latex tableNeel Gala1-1/+2
2022-04-08updated python script, Makefile and README to process new filesNeel Gala1-0/+872
- the python file is well commented - the README provides a brief overview of how the python script works and the various artifacts it can generate