Skip to content

Latest commit

 

History

147 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Veristone

Minecraft Verilog synthesizer

Example

module full_add(a, b, cin, sum, cout);
  input a, b, cin;
  output sum, cout;
  wire x, y, z;

  half_add h1(.a(a), .b(b), .s(x), .c(y));
  half_add h2(.a(x), .b(cin), .s(sum), .c(z));
  or o1(cout, y, z);
endmodule : full_add

module half_add(a,b,s,c);
  input a, b;
  output s, c;

  xor x1(s, a, b);
  and a1(c, a, b);
endmodule : half_add

Synthesized Rust Graph

Adder circuit graph IR

Placed & Routed Redstone Circuit

Adder ciruit in Minecraft

Usage

cargo build

# Run each step separately
cargo run --bin make_blif -- -s res/verilog/adder.v
cargo run --bin read_blif -- -b res/blif/adder.blif

# Run the whole pipeline
cargo run --bin veristone -- -s res/verilog/adder.v

Setup

Debian/Ubuntu (+ other Linux; your package manager probably has these too)

Install yosys for processing verilog files (+ ICARUS Verilog for SystemVerilog support), and graphviz for generating graph views of circuits:

sudo apt-get install iverilog yosys graphviz

Install Rust:

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

Windows

  • Install Rust.
  • Install MSYS2 and the MinGW-64 compiler pipeline if you haven't already (these are dependencies for Rust compilation).
  • Install graphviz.
  • Extract the OSS CAD Suite to its own folder in this repo. Run one of the start scripts to setup your path each time you want to use yosys:
    • Add environment variables to current shell:
    oss-cad-suite\environment.bat
    • Create new shell with vars:
    oss-cad-suite\start.bat

Pipeline Structure

Resources

Rust

Placement Algorithm(TimberWorf)

Verilog & Yosys

Minecraft

Previous Projects

qmn

Verilog/Yosys notes

Basic usage of Icarus Verilog:

(g2012 enables systemverilog)

iverilog -g2012 adder.v -o adder

Links for generating BLIF netlists with Yosys:

About

Verilog place-and-route tool for Minecraft redstone

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages