Home

Awesome

yosys2digitaljs

This program converts JSON netlist output generated by Yosys circuit synthesis software (Github repo here) for use with the DigitalJS graphical circuit simulator.

Usage

You need to have Yosys installed to run yosys2digitaljs. For example, in Debian/Ubuntu, run:

apt install yosys

Clone the repository and install dependencies using npm:

git clone https://github.com/tilk/yosys2digitaljs.git
cd yosys2digitaljs
npm install

Now you can run yosys2digitaljs on your Verilog or SystemVerilog files:

./process.js file.v file.sv ...

The generated JSON is printed on standard output.

API

Yosys2digitaljs can be used as a library. The API is promise (or async/await) based. Available functions are:

The functions return a promise, which fulfills with an object value with following keys:

For bigger example, see the online app demo.