Skip to content

sharc-lab/LightningSim

Repository files navigation

⚡ LightningSim

DOI GitHub Workflow Status

Welcome to the LightningSim project!

LightningSim is a fast, accurate trace-based simulator for High-Level Synthesis. It is developed and maintained by Rishov Sarkar from Sharc Lab at Georgia Tech.

System requirements

LightningSim has been tested on a server with a 64-core Intel Xeon Gold 6226R CPU and 502 GiB of RAM running RHEL Server 7.9. However, we expect it to run on most 64-bit x86 systems running a modern Linux distribution.

LightningSim expects AMD/Xilinx Vitis HLS (a part of the Vitis Unified Software Platform) to be present on the machine it is running on. This includes setting up the environment, as described in the Vitis HLS documentation.

All testing has been performed using Vitis HLS 2021.1, though we expect any recent version of Vitis HLS to work.

Conda is required to install LightningSim. Conda may be installed following the instructions at this link. (We recommend using the Miniconda installer.)

Installation

Create a new conda environment and install LightningSim using the following command, replacing $ENV_NAME with the name of the environment you wish to create:

conda create --yes --name $ENV_NAME --channel https://sharc-lab.github.io/LightningSim/repo --channel conda-forge lightningsim

Usage

If not already activated, activate the conda environment you created when installing LightningSim:

conda activate $ENV_NAME

Then, simply run the lightningsim command with the path to a Vitis HLS solution directory as the first argument. For example:

lightningsim /path/to/vitis_hls_project/solution1

Warning

Please note that LightningSim is expecting the path to a solution directory, not a project directory. The solution directory resides directly under the project directory, alongside the file hls.app, and is usually named solution1.

By default, the LightningSim web server interface will start on http://127.0.0.1:8080/. You can change the port number by passing the --port argument to the lightningsim command.

Note

If running LightningSim on a remote server, you may need to tunnel the web server port to your local machine in order to view the web interface.

For example, if you are running LightningSim on a server with hostname server.example.com, you can tunnel the default LightningSim port 8080 to your local machine using the following command:

ssh -L 8080:127.0.0.1:8080 server.example.com

This will make the web interface available on your local machine at http://127.0.0.1:8080/.

By default, LightningSim will wait for Vitis HLS to start its next C synthesis run before starting simulation. This is indicated on the web interface by the status message “Waiting for next C synthesis run…” alongside a link labeled “(skip),” which can be clicked to start simulation immediately using the results of the last C synthesis run.

You can also start simulation immediately by passing the --skip-wait-for-synthesis argument to the lightningsim command.

All available command-line options can be viewed by running lightningsim --help.

About

A fast, accurate trace-based simulator for High-Level Synthesis.

Resources

License

Stars

Watchers

Forks

Packages

No packages published