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 hashes)