Home

Awesome

SVase

SVase is a source-to-source pre-elaborator for SystemVerilog (IEEE 1800-2017) single-unit designs.

It is developed as part of the PULP project, a joint effort between ETH Zurich and the University of Bologna.

It leverages the best-in-class FOSS tool Slang to parse and compile a design and then rewrite constructs unsupported by fundamental open EDA tools using the provided compile-time information. Most notably, SVase

This completely uncouples instances and modules from each other, fully qualifying hierarchical parameters and types: any resulting unique module can be processed and synthesized out of context. Unlike Slang itself, SVase outputs a fully-compliant 1800-2017 source that may be fed into any next tool with limited SV support as-is.

Disclaimer

This project is still considered to be in early development; some parts may not yet be functional, and existing interfaces and conventions may be broken without prior notice. We target a formal release in the near future.

Using SVase

Currently there is no way to run select passes or give multiple input files. The only way to use SVase is shown below:

# svase top_module output.sv input.sv
svase test out.sv test/assign/assign.sv

Example: SystemVerilog to Verilog flow

A popular tool to convert from SystemVerilog to Verilog is sv2v but it does not support all SystemVerilog constructs as can be seen on the sv-tests website.

By adding SVase into the flow, it is possible to get a wider coverage of SystemVerilog constructs.

svase top_module intermediate.sv input.sv
sv2v --verbose --write output.sv intermediate.sv

Getting SVase

Releases

You can get SVase binaries from the Releases page on Github. It should work properly on most Linux distros. If it does not, please open an Issue.

Build it yourself

Requirements

The build requirements for SVase are mostly dicated by the Slang build requirements. The following requirements should be sufficient:

The only tested configuration is GCC 11.2.0 with CMake 3.20.2 and Python 3.6. Depending on where/how you installed the compiler, CMake may not find the correct one. In this case you can manually specify a compiler, scripts/svase.env provides and example for this.

Build

One-liner:

make build

Step-by-step:

# edit and source svase.env if necessary
# source scripts/svase.env

# build dependencies
cd deps
make
cd ..

# build SVase
mkdir build && cd build
cmake ..
make

If everything went well, you can find SVase at build/svase.

Running Tests

make run-tests

Development

Format to match linter

make format

V1.0.0 ToDo list

User Interface

Preprocessing

Rewrite support

Postprocessing

Cleanup

Hardening

License

Unless specified otherwise in the respective file headers, all code checked into this repository is made available under a permissive license. All software sources are licensed under Apache 2.0.