Skip to content

Verilua: An Open Source Versatile Framework for Efficient Hardware Verification and Analysis Using LuaJIT

License

Notifications You must be signed in to change notification settings

cyril0124/verilua

Repository files navigation

Verilua

Verilua is a versatile simulation framework for Hardware Verification based on LuaJIT. It can be used as a Hardwave Verification Language (HVL) to write testbenches and simulate hardware designs. Or it can be used as a Hardware Script Engine (HSE) to embed Lua scripts into the simulation. It can also can be used as a Waveform Analysis Language(WAL) to analyze the provided waveform files(VCD, FST, FSDB, etc).

Requirements

  • xmake: we use xmake to build verilua, so you need to install xmake first.
  • conan: xmake will use conan to manage dependencies, so you need to install conan. It is fine if you dont't manually install conan. It will will be automatically installed once you install verilua.

Install verilua(with nix)(Recommended)

If you have nix installed, you can simply run the following command to install verilua:

xmake install -v verilua-nix

After the installation is complete, you can run the following command to verify the installation:

setup_verilua -v

If you see the version information, it means that the installation is successful.

setup_verilua is used to set up the runtime environment variables for verilua. Make sure to source it before using verilua.

source setup_verilua

To make this easier, you can add source setup_verilua to your .bashrc or .zshrc file.

-q option is used to suppress the output of the setup_verilua command.

.bashrc/.zshrc:

source $(which setup_verilua) -q

Notice: If you want to use verilator in your simulation and verilua is installed by nix, you need to install verilator by nix too. We recommend you to install the verilator package using nix/verilator-clang.nix:

nix-env -f ./nix/verilator-clang.nix -i

Install verilua(without nix)

If you don't have nix installed, you can run the following command to install verilua:

xmake install verilua

And to build the shared libraries, run the following command:

xmake -y -P .

Usage

We provide some examples to show how to use verilua. The example is located in the examples directory.

There is a test target in xmake.lua file, you can run the following command to run the test:

xmake run test

About

Verilua: An Open Source Versatile Framework for Efficient Hardware Verification and Analysis Using LuaJIT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published