Skip to main content

sphinx-pss

Sphinx support for autodocumenting Accellera PSS (Portable Test and Stimulus Standard) source.

sphinx-pss documents PSS the way sphinx.ext.autodoc documents Python: declarations and doc comments are pulled directly from PSS source via pssparser, and rendered through a custom pss Sphinx domain.

Beyond declarations, it renders the structure that is specific to PSS and that no general-purpose documentation tool can produce — flow-object producer / consumer relationships, activity graphs, component instance trees, and extend provenance.

Programming steps

A /// Step: <title> comment in a function body or exec block marks a step of a device-programming procedure. pss:steps renders the steps as a numbered table, the way a vendor programming guide lists them. Conditions and loops appear as rows, and a called function's steps nest under the step that calls it. Numbers are generated, in decimal (1, 1.1) or outline (1, a), i.) style. :format: flowchart draws the same steps as a flowchart, with Graphviz or Mermaid. For a codebase that already writes // Step: …, an opt-in pssparser checker (SPSS001) lists the comments to convert.

.. pss:steps:: eth_pkg::init_eth
   :numbering: outline
   :format: both

See docs/usage/steps.md and docs/usage/diagrams.md.

Activity diagrams

pss:activity-diagram draws an action's activity as a UML activity diagram, with forks and joins for parallel, decisions for select, if and match, frames for loops, and each traversal linked to the action it runs. :activity-diagram: on autopssaction puts it in the action's entry. Programming steps marked in the activity become labelled regions of it.

.. pss:activity-diagram:: xfer_pkg::dma_c::xfer
   :depth: 2

See docs/usage/activities.md.

Status

Early development. See design/ for the design and the phased implementation plan.

Requirements

  • Python 3.10+
  • Sphinx 8+
  • pssparser 3.1.0 or later, a PSS 3.1 parser (a C++/Cython extension — prebuilt wheels are published for common platforms; otherwise it must be built)
  • pygments-pss, installed automatically — it provides the pss Pygments lexer

Syntax highlighting

PSS code blocks highlight with no configuration: pygments-pss registers the pss lexer through a pygments.lexers entry point, so Pygments finds it everywhere it looks. That includes pygmentize, MkDocs and plain docutils, not only Sphinx — a project that wants highlighting and nothing else can depend on pygments-pss alone.

Quick start

# conf.py
extensions = ["sphinx_pss"]

pss_source_dirs = ["../model"]
pss_doc_style = "native"
.. autopsspackage:: dma_pkg
   :members:

License

Apache-2.0. See LICENSE.

Metadata

Release files for sphinx-pss 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-pss 0.1.0
File Size Uploaded
sphinx_pss-0.1.0.tar.gz 133.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-pss 0.1.0
File Interpreter ABI Platform
sphinx_pss-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 275.4 kB

Release files / sphinx_pss-0.1.0.tar.gz

Download URL sphinx_pss-0.1.0.tar.gz
Size 133.7 kB
Tags Source
SHA-256 checksum
How to use checksums
add034adbc5e117dd476496d223e767ffd12beb0a39025caa148f4ac277e209d
BLAKE2b-256 checksum
How to use checksums
8c9b4d132ae883728755f879ee8649d10717e922cefbbef049f74313b769370f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / sphinx_pss-0.1.0-py3-none-any.whl

Download URL sphinx_pss-0.1.0-py3-none-any.whl
Size 141.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57ad489293577fc67ce834ab88ba4fceea405e6b981e940a830dd3918861d497
BLAKE2b-256 checksum
How to use checksums
5c8f80e173eec036fd71e9c47944b7ce6612f8f119929002e63a21e96090ccfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page