topstitch 0.9.0

Stitch together Verilog modules with Rust
docs.rs failed to build topstitch-0.9.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: topstitch-0.76.0

topstitch

Stitch together Verilog modules with Rust.

Note: the API is currently under development and is subject to frequent changes.

Installation

Install Rust if you don't have it already:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then clone this repository:

git clone https://github.com/xlsynth/topstitch.git

Demo

A basic demo of hierarchy, multiple instantiation, and connection is in examples/demo.rs.

Run the demo with:

cargo run --example demo

This produces output in examples/output/top.sv. Note: the first time that you build this project, it might take several minutes to build dependencies.

If you want to simulate the Verilog code that is produced, first install Icarus Verilog if you don't have it already (via Homebrew, apt, etc.). Then cd into examples/tb and run:

./demo.sh

This will produce the following output:

 597
demo.sv:16: $finish called at 0 (1s)

The output 597 is expected, as this is the sum of inputs 121, 212, and 222, along with a constant 42.