This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from edwin7026/riscv-opcode-plugin
Add Riscv-opcode plugin.
- Loading branch information
Showing
15 changed files
with
1,166 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
include LICENSE.incore | ||
include README.rst | ||
include riscv_isac/requirements.txt | ||
recursive-include riscv_isac/data/* | ||
|
||
recursive-exclude * __pycache__ | ||
recursive-exclude * *.py[co] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.. _rvopcodes: | ||
|
||
Using the encodings from riscv-opcodes | ||
====================================== | ||
|
||
The `rvopcodesdecoder` is a decoder plugin for RISCV-ISAC, dependent on the official `riscv-opcodes <https://github.com/riscv/riscv-opcodes>`_ repository. The `rvopcodesdecoder` plugin automatically builds the decode tree and decodes instructions based on the encodings specified in the repository. The plugin will support any instruction/extension as long as it is specified in the format adhereing to the official repository. | ||
|
||
Usage | ||
~~~~~ | ||
|
||
Initial Setup | ||
************* | ||
- **Standard version**: This use case is intended for users who want to use the rvopcodes repo as | ||
is from `riscv/riscv-opcodes <https://github.com/riscv/riscv-opcodes>`_. The command generates a | ||
``rvop-plugin`` folder with all the necessary files needed for the plugin. This path will have to | ||
be passed via the CLI while running coverage. :: | ||
|
||
riscv_isac setup --plugin-path ./rvop-plugin | ||
|
||
- **Custom Version**: This use case is intended for users who have a custom/modified version of the | ||
rvopcodes encodings locally. The ``<path-to-rvopcodes>`` in the following command should point to | ||
the path on the system where the custom/modified ``riscv-opcodes`` repository contents are located. | ||
The command generates a symlink to the path inside the plugin folder and hence all changes to | ||
the encodings are picked up automatically. To add an extension, the user has to create a file | ||
with the ``rv<xlen>`` prefix followed by the extension name. The file can then be populated with | ||
the instruction encodings in the appropriate format. Similar steps can be followed for updating | ||
existing extensions too. :: | ||
|
||
riscv_isac setup --plugin-path ./rvop-plugin --rvop-path <path-to-rvopcodes> | ||
|
||
Using the decoder with ISAC for coverage | ||
**************************************** | ||
|
||
To use `rvopcodesdecoder` as the decoder in RISCV-ISAC, ``rvopcodesdecoder`` should be supplied as argument for ``--decoder-name`` option with the ``--decoder-path`` set to the path of ``rvop-plugin`` generated in the previous step.. For example, :: | ||
|
||
riscv_isac --verbose info coverage --decoder-name rvopcodesdecoder --decoder-path ./rvop-plugin -t trace.log --parser-name spike -o coverage.rpt -e add-01.out -c rv64i.cgf -x 64 | ||
.. note:: Pseudo instructions are always decoded into the mnemonics of the base instruction in this plugin. For example, `zext.h` is always decoded as `pack` only. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
|
||
__author__ = """InCore Semiconductors Pvt Ltd""" | ||
__email__ = '[email protected]' | ||
__version__ = '0.10.2' | ||
__version__ = '0.11.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.