Skip to main content

Verilog-like bitvector slicing

Project description

Bitslice

Verilog-like bitslicing for Python.

Installation

Install the library from PyPI:

pip install bitslice

Quickstart

Bitslice is designed to behave as an integer value as much as possible. All operators defined on int should be supported.

Bitslice adds the ability to extract or set one or more bits of the value:

from bitslice import Bitslice
value = Bitslice(5, size=4)
value[3:1] - 1

See bitslice.py for more examples.

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

bitslice-0.2.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

bitslice-0.2.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file bitslice-0.2.1.tar.gz.

File metadata

  • Download URL: bitslice-0.2.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.4.0-42-generic

File hashes

Hashes for bitslice-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6abaef51f7f63a22a3c4bf2815aab81a5ec923137f5c730c069a2adf833275e7
MD5 a6f015878c997f0ee658f2ba6c15b4c3
BLAKE2b-256 58c908db524ed480c334e6cb2c49643b583cc03c12995ce8a4ef8789eacd7a03

See more details on using hashes here.

File details

Details for the file bitslice-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: bitslice-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.4.0-42-generic

File hashes

Hashes for bitslice-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f8dacd0bd2eae5cf44e88f5a458ac34d19fcd2c9ef62e784b241c6f027e2fed
MD5 581b07559423044fd38abfc39283eb70
BLAKE2b-256 63afc2ec3c234832c4d6a8e661cfa3fdf09b0f72c8791cc8beb406c345525ebc

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