Skip to main content

Seal5 Project

Project description

Seal5

pypi package readthedocs GitHub license

demo workflow

TODO: Summary

Prerequisites

To be able to run the examples, make sure to clone the Seal5 repo using the --recursive flag. Otherwise run the following command to fetch (and update) the referenced submodules.

git submodule update --init --recursive

Ubuntu Packages

First, a set of APT packages needs to be installed:

sudo apt install python3-pip python3-venv cmake make ninja-build

Python Requirements

First, setup a virtual environment with Python v3.8 or newer.

Install all required python packages using the follow8n* command:

pip install -r requirements.txt.

For development (linting, packaging,...) there are a few more dependencies which can be installed via:

pip install -r requirements_dev.txt.

Installation

Warning: It is highly recommended to install seal5 into a new virtual environment. Follow these steps to initialize and enter a venv in your seal5 repo directory:

# alternative: python3 -m venv venv
virtualenv -p python3.8 venv
source venv/bin/activate

From PyPI

TODO: Publish after open-source release.

Local Development Version

First prepare your shell by executing export PYTHONPATH=$(pwd):$PYTHONPATH inside the seal5 repository. Then you should be able to use Seal5 without needing to reinstall it.

Alternatively you should be able to use pip install -e ..

Usage

Python API

The flow can be sketched as follows (see Example below for functional code!):

# Create flow
seal5_flow = Seal5Flow(...)
# Initialize LLVM repo and .seal5 directories
seal5_flow.initialize(...)
# Optional: remove artifacts from previous builds
seal5_flow.reset(...)
# Install Seal5 dependencies (CDSL2LLVM/PatternGen)
seal5_flow.setup(...)
# Load CoreDSL2+CFG files (Git config, filters,...)
seal5_flow.load(...)
# Transform Seal5 model (Extract side effects, operands,...)
seal5_flow.transform(...)
# Generate patches based on Seal5 model (ISel patterns, RISC-V features,...)
seal5_flow.generate(...)
# Apply generated (and manual) patches to LLVM codebase
seal5_flow.patch(...)
# Build patches LLVM (This will take a while)
seal5_flow.build(...)
# Run LLVM+Seal5 tests to verify functionality
seal5_flow.test(...)
# Combine patches and install LLVM
seal5_flow.deploy(...)
# Archive final LLVM (optionally inclusing logs, reports,...)
seal5_flow.export(...)
# Optional: Cleanup all artifacts
seal5_flow.cleanup(...)

Command-Line Interface

TODO: Not yet implemented...

Examples

See examples/demo.py for example of end-to-end flow!

Documentation

TODO: Sphinx Documentation / GitHub Pages

Limitations

See here.

CI/CD Flow

We added a (manual) CI job to run the examples/demo.py script via GitHub actions.

Contributions

Seal5 issue tracker: https://github.com/tum-ei-eda/seal5/issues

CoreDSL2LLVM/PatternGen issue tracker: https://github.com/mathis-s/CoreDSL2LLVM/issues

References

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

seal5-0.1.1.dev0.tar.gz (76.5 kB view details)

Uploaded Source

Built Distribution

seal5-0.1.1.dev0-py3-none-any.whl (136.4 kB view details)

Uploaded Python 3

File details

Details for the file seal5-0.1.1.dev0.tar.gz.

File metadata

  • Download URL: seal5-0.1.1.dev0.tar.gz
  • Upload date:
  • Size: 76.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.10

File hashes

Hashes for seal5-0.1.1.dev0.tar.gz
Algorithm Hash digest
SHA256 46bd608c5ed321a78e4f84762c38509b0bef701b0b5e7ebe59e791d8f82ecff3
MD5 23f80cded2c6e23a45e479fed9af77e5
BLAKE2b-256 f6325093f9d9bade6bd23974f28cd4273badc1775232963333387c2ec4f706a9

See more details on using hashes here.

Provenance

File details

Details for the file seal5-0.1.1.dev0-py3-none-any.whl.

File metadata

  • Download URL: seal5-0.1.1.dev0-py3-none-any.whl
  • Upload date:
  • Size: 136.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.10

File hashes

Hashes for seal5-0.1.1.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 72bb085d72f3557201e5ef56e8b32b4d9016516c6fce2658905a35e67efe022c
MD5 f4b417eac6c2cb8def0f0b30fb6168ed
BLAKE2b-256 d008f1fb860506eda81695a5029eb9c62527dbe94993334e29ad3ab52f3cc4c9

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page