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-1.0.2.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-1.0.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file parse-opcodes-1.0.2.tar.gz.

File metadata

  • Download URL: parse-opcodes-1.0.2.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-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f9c5acc9138c85fd44694cdaf91091e35dc407aeb2627a7b627fa5ab49032282
MD5 e2127232452b695002dbf7ca89a0efc1
BLAKE2b-256 9a6753e8bedaf0a45fd6cfca2bce1713600796e82d304c9f39e229f732047ca0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: parse_opcodes-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eb4b96059e017b92615b0afd63d21d12eaa8207ae1473a43bbb12f24443ca08c
MD5 992ff1bdf891c5c61e8decc2a0acc86e
BLAKE2b-256 55b66e018b26af8ecd2c00ecdc64731c638da2e99b0c13a7a213b6f8a5a03124

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