GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - fkhaidari/uhdi: Unified Hardware Debug Info: a debug-info format for Chisel/CIRCT, with converters to hgdb, HGLDD and PDG

BranchesTags
Open more actions menu

Latest commit

 

History

129 Commits
129 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
bench
bench
 
 
converter
converter
 
 
demo
demo
 
 
docs
docs
 
 
tools
tools
 
 
.gitignore
.gitignore
 
 
.markdownlint-cli2.jsonc
.markdownlint-cli2.jsonc
 
 
.scalafmt.conf
.scalafmt.conf
 
 
README.md
README.md
 
 
REPRODUCE_REPORT.md
REPRODUCE_REPORT.md
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

uhdi

Unified Hardware Debug Info -- reference implementation and thesis deliverables.

This repository hosts the out-of-tree pieces of the uhdi work:

  • converter/ -- uhdi-converter: uhdi_common shared base (BaseContext, refs, diff, validate, Backend registry, CLI scaffold) plus four backends: uhdi_to_hgldd, uhdi_to_hgdb (SQLite), uhdi_to_hgdb_json (the JSON shape hgdb-circt's firtool --hgdb emits), and uhdi_to_pdg (chiseltrace's Program Dependency Graph format -- third arm of the Sec.15 projection trio, with optional --derive-dataflow pass for inputs that omit Sec.10). JSON Schemas extracted from the spec ship with uhdi_common.
  • bench/ -- uhdi-bench: integration harness Scala/Chisel -> FIR -> UHDI -> projection -> diff vs native. Test matrix per (fixture x target) over targets tywaves, hgdb_circt, hgdb_firrtl for thesis chapter 5.
  • demo/ -- five standalone Chisel projects (gcd, fsm, fifo, pipeline, bus) wired end-to-end through firtool --emit-uhdi + the converters. Copy any one out and use it as a starter template; see demo/README.md.
  • docs/ -- format specification (uhdi-spec.md) and action plan (uhdi-action-plan.md).
  • tools/ -- consumer-side installer (install.sh / install.nu) that pulls firtool, hgdb-py, tywaves, and chiseltrace from a GitHub Release and provisions a shared cli-venv with the upstream hgdb console (hgdb-debugger), the libhgdb runtime tools (hgdb-replay, hgdb-db), and the in-tree uhdi-converter (uhdi-to-hgldd, uhdi-to-hgdb, uhdi-to-pdg); bench-side toolchain Docker image (ghcr.io/fkhaidari/uhdi-tools) recipe pinned via tools/versions.env; per-component release scripts in tools/release/.

The compiler side (CIRCT passes and EmitUHDI.cpp) lives in the sibling circt/ fork on branch fk-sc/uhdi-pool, not here.

Layout

uhdi/
+- converter/       # uhdi-converter: format + projections
|   +- pyproject.toml
|   +- src/
|   |   +- uhdi_common/
|   |   |   `- schemas/        # JSON Schemas (sec.3-12 of the spec)
|   |   +- uhdi_to_hgldd/      # tywaves projection
|   |   +- uhdi_to_hgdb/       # hgdb SQLite projection
|   |   +- uhdi_to_hgdb_json/  # hgdb JSON projection
|   |   `- uhdi_to_pdg/        # chiseltrace PDG projection
|   `- test/                   # unit + golden tests (~340 tests, no toolchain)
+- bench/           # uhdi-bench: Scala -> FIR -> UHDI -> diff vs native
|   +- pyproject.toml
|   +- manifest.toml           # per-fixture allowed deltas
|   +- fixtures/               # Chisel sources
|   +- src/uhdi_bench/
|   `- test/
+- demo/            # standalone Chisel demos (gcd, fsm, fifo, pipeline, bus)
+- docs/            # format spec + action plan
+- tools/           # installer + uhdi-tools image recipe + release scripts
+- pyproject.toml   # workspace root: ruff / mypy / coverage configs
`- .github/workflows/ci.yml

Each subproject has its own pyproject.toml (with [project], deps, pytest config); the root holds shared linter / type / coverage configuration so rules are uniform across the codebase.

Setup

# Install both packages editable in one venv:
uv venv .venv && source .venv/bin/activate
uv pip install -e ./converter -e ./bench --index-url https://pypi.org/simple --no-config

--no-config / --index-url bypass any site-wide artifactory proxy.

For tools/install.sh (firtool / hgdb-py / tywaves / chiseltrace download from GitHub Releases), export a GITHUB_TOKEN first -- otherwise the anonymous api.github.com limit (60 req/h) is exhausted after a few asset lookups:

export GITHUB_TOKEN=$(gh auth token)   # or any personal-access token with public_repo read
tools/install.sh all --prefix ~/.local/uhdi-tools

Quick reference

# Converter CLIs (three ship as console scripts; hgdb_json runs as a
# module since hgdb-circt's JSON shape is bench-only today).
uhdi-to-hgldd                 input.uhdi.json -o input.dd
uhdi-to-hgdb                  input.uhdi.json -o input.db
uhdi-to-pdg                   input.uhdi.json -o input.pdg.json
python -m uhdi_to_hgdb_json   input.uhdi.json -o input.json

# Tests
( cd converter && pytest )       # ~300 tests, no toolchain deps
( cd bench     && pytest )       # bench cells, skip if toolchains absent

# Run the bench with prebuilt toolchains (no local builds needed)
TAG=$(cat tools/docker/image-tag.txt)
docker run --rm -v "$PWD":/work -w /work \
    ghcr.io/fkhaidari/uhdi-tools:$TAG \
    bash -c 'pip install --break-system-packages -e ./converter -e "./bench[dev]" \
             && cd bench && pytest -v'

# Lint / type / coverage (from workspace root)
ruff check converter/src converter/test bench/src bench/test
mypy converter/src/uhdi_common
coverage run --branch -m pytest converter/test/ bench/test/ && coverage report

See bench/README.md, demo/README.md, and tools/README.md for subproject-specific docs (adding fixtures, registering new backends, toolchain config, demo walkthrough).

About

Unified Hardware Debug Info: a debug-info format for Chisel/CIRCT, with converters to hgdb, HGLDD and PDG

Topics

chiselcirctdebug-infofirrtlhardware-debuggingmlirrtl

Resources

Readme
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.