Sphinx "bitfield" extension
Project description
A Sphinx extension to generate bit field diagrams with the bit_field Python package.
Installation
pip install sphinxcontrib-bitfield
To install with LaTeX support:
pip install sphinxcontrib-bitfield[LaTeX]
Enable Extension
Add sphinxcontrib.bitfield in extensions of conf.py:
extensions = ['sphinxcontrib.bitfield']
Usage
Use directive bitfield with the description of the bitfield in JSON format:
.. bitfield:: :bits: 32 :lanes: 2 [ { "name": "IPO", "bits": 8, "attr": "RO" }, { "bits": 7 }, { "name": "BRK", "bits": 5, "attr": "RW", "type": 4 }, { "name": "CPK", "bits": 1 }, { "name": "Clear", "bits": 3 }, { "bits": 8 } ]
- The bitfield directive accepts the following options:
- vspace:
vertical space - default 80
- hspace:
horizontal space - default 640
- lanes:
rectangle lanes - default 2
- bits:
overall bitwidth - default 32
- fontfamily:
default sans-serif
- fontweight:
default normal
- fontsize:
default 14
- strokewidth:
default 1
- compact:
compact rendering mode
- hflip:
horizontal flip
- vflip:
vertical flip
- uneven:
uneven lanes
- trim:
trim long bitfield names, must provide the horizontal space available for a single character
- legend:
space separated list of name and type optionally enclosed in quotes
For more details, see the bit_field package.
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
Built Distribution
File details
Details for the file sphinxcontrib-bitfield-1.0.0.tar.gz
.
File metadata
- Download URL: sphinxcontrib-bitfield-1.0.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 308afb114377d0363f43428aff176371cb4246adaecce93de82a6dd872041f62 |
|
MD5 | 22360a24f280c9dfb9b77c463f2ab543 |
|
BLAKE2b-256 | 26fe039fce7015761fdc1f483bbbfd9112e9592737d523eca59493c4b328e9b0 |
File details
Details for the file sphinxcontrib_bitfield-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: sphinxcontrib_bitfield-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f2e6bef121b1df98f87d3eefbd37c67c99d764b27d69674b99825ccb65060c2 |
|
MD5 | 3151611ad705573f99b2ad604bc44de7 |
|
BLAKE2b-256 | a4a3798c560a7bb341d588f89e6a04d3b1fe3e6eef6fd2a2249914bfa5e00ae4 |