Skip to main content

takes a list of instruction names, opcodes, and arguments and turns it into a 32-column spreadsheet, with each column representing a bit

Project description

This package was created to create simple spreadsheets of opcodes as part of the RISC V Architecture.

Using this package is relatively straightforward:

  1. Open opcode-formats in a text editor
  2. Place any args you want to add under ##ARGLUTS. Bear in mind they must follow the format of a dictionary in Python (arglut['argname'] = (n, n)). The bit range must be expressed as a tuple. 2a. If an arglut appears is formatted differently than its name implies, you must also add to the arglut_format dictionary. The key is the name of the arg while the value is the item this code will actually parse. A "|" represents a break, while ":" colon separates a range. So for example 'imm[20|10:1|11|19:12]' takes up bits 20, 10 to 1, 11, and 19 to 12.
  3. Make sure there is an empty line separating the argluts/arglut_formats and ##OPCODES. The code will not function otherwise.
  4. Place any opcodes you want to add under ##OPCODES, separated by newlines (enter/return). The format is hard to describe, but just follow what's already written
  5. Run main, if all goes well, an excel spreadsheet will appear in the parse folder. You can then open that up and format it to whatever you want.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parse_opcodes-2.0.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parse_opcodes-2.0.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file parse_opcodes-2.0.0.tar.gz.

File metadata

  • Download URL: parse_opcodes-2.0.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for parse_opcodes-2.0.0.tar.gz
Algorithm Hash digest
SHA256 45caa45b8278e8e62749a76e17211135710cc11cba75b945b09b34f7ceef261f
MD5 2198871c322ab4e17d280ed097cae755
BLAKE2b-256 a7fdc28d8e81528f3cc95d66a82a2cc370960f5e9338853457652d1e0ddb304d

See more details on using hashes here.

File details

Details for the file parse_opcodes-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: parse_opcodes-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for parse_opcodes-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad7a72abaf8fbdfab862fbdd6baecc00d4819bbb392e9d6aaa0fd06d41df3281
MD5 d1ba87c74154349c6458783c2b1ab263
BLAKE2b-256 3002220f12e352f7ce967f100a0944528f01ba06aa2f9524c52b6215bba1b35f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page