Skip to main content

A configurable TUI for post-processing and filtering EDA tool logs

Project description

Sawmill - Cutting through EDA logs

Sawmill

A terminal-based log analysis tool for EDA engineers

InstallationQuick StartFeaturesPluginsCI Integration


Sawmill helps you filter, analyze, and understand complex log files from EDA tools like Vivado. Through a plugin architecture, it provides tool-specific intelligence while remaining extensible to any log format.

Features

  • Smart Parsing - Plugins understand tool-specific message formats, multi-line grouping, and file references
  • Summary Views - Quick overview of errors and warnings by severity and message ID
  • Flexible Grouping - Group messages by severity, ID, file, category, or plugin-defined fields
  • Regex Filtering - Include or exclude messages with powerful pattern matching
  • CI Integration - Exit codes and waiver system for build pipeline integration
  • Extensible - Write plugins for any log format with full customization

Installation

# Install from source
pip install -e .

# With development dependencies
pip install -e ".[dev]"

Quick Start

# Analyze a log file (auto-detects format)
sawmill vivado.log

# Show summary by severity with ID breakdown
sawmill vivado.log --summary

# Group messages by ID, file, or category
sawmill vivado.log --group-by id
sawmill vivado.log --group-by file
sawmill vivado.log --group-by category

# Filter by severity level (name or number)
sawmill vivado.log --severity warning
sawmill vivado.log --severity 1  # Same as above

# List available severity levels for a plugin
sawmill --list-severity --plugin vivado

# Filter with regex pattern
sawmill vivado.log --filter "timing"

# Exclude messages by pattern or ID
sawmill vivado.log --suppress "Synth 8-7129"
sawmill vivado.log --suppress-id "Synth 8-7129"

CLI Options

Option Description
--summary Show summary counts by severity and message ID
--group-by Group output by severity, id, file, or category
--top N Limit messages per group (default: 5, 0 = no limit)
--severity Filter to severity level and above (name or number)
--list-severity List available severity levels from the plugin
--filter Regex pattern to include messages
--suppress Regex pattern to exclude messages
--suppress-id Exclude specific message IDs
--format Output format: text, json, or count
--ci CI mode: exit 1 on errors/critical warnings
--waivers Path to waiver TOML file

Plugins

Sawmill uses a plugin architecture to support different log formats. Plugins are auto-detected based on log content.

Built-in Plugins

Plugin Description
vivado Xilinx Vivado synthesis and implementation logs

External Plugins

Plugins can be installed separately and auto-register with sawmill:

# List available plugins
sawmill --list-plugins

# List available severity levels
sawmill --list-severity --plugin vivado

# List available grouping fields
sawmill --list-groupings --plugin vivado

Writing Plugins

Plugins implement the SawmillPlugin interface with hooks for:

  • can_handle(path) - Detect if plugin can parse a file
  • load_and_parse(path) - Parse file into Message objects
  • get_filters() - Provide pre-defined filter definitions
  • get_severity_levels() - Define severity ordering and styling
  • get_grouping_fields() - Declare available grouping dimensions

CI Integration

Sawmill can be used in CI pipelines to fail builds on errors:

# Exit 1 if errors or critical warnings found
sawmill vivado.log --ci

# Also fail on regular warnings
sawmill vivado.log --ci --strict

# Use waivers to allow known issues
sawmill vivado.log --ci --waivers waivers.toml

Waiver Files

Waiver files are TOML files that specify known issues to ignore:

[[waiver]]
id = "Synth 8-7129"
reason = "Expected warning for RAM inference"
expires = "2025-12-31"

[[waiver]]
pattern = "timing.*slack"
reason = "Timing constraints not finalized"

Development

# Run tests
pytest tests/ -v

# Run tests with coverage
pytest tests/ --cov=sawmill

# Check linting
ruff check sawmill/

License

MIT

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

sawmill_parser-0.1.0.tar.gz (243.4 kB view details)

Uploaded Source

Built Distribution

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

sawmill_parser-0.1.0-py3-none-any.whl (64.9 kB view details)

Uploaded Python 3

File details

Details for the file sawmill_parser-0.1.0.tar.gz.

File metadata

  • Download URL: sawmill_parser-0.1.0.tar.gz
  • Upload date:
  • Size: 243.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sawmill_parser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 744a3a7a3c54f6afa4edc113170b0292ead0ca54c071cb816e2959cdcf7b11cf
MD5 9cfa843a927c15c6f096273fa156ead3
BLAKE2b-256 77d03520debbe06bbda447bc2b80872efcbd9ff0b182e5db6f4653e194e0f2c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for sawmill_parser-0.1.0.tar.gz:

Publisher: publish.yml on sjalloq/sawmill

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sawmill_parser-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sawmill_parser-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 64.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sawmill_parser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d6f0c7f88e62cae7487b84f2c6ef169bfe966c8fd271bf2f0f2457bc8b009f4
MD5 6d8a9a142543ca5209d4559073c8edf9
BLAKE2b-256 df6475a5f2d5770b873af5f3ede7e5c06898c453c102b58ec0e577e8064e84aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for sawmill_parser-0.1.0-py3-none-any.whl:

Publisher: publish.yml on sjalloq/sawmill

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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