Bitsy is a modern hardware description language.
$ git clone https://github.com/bitsy-lang/bitsy
$ cd bitsy
$ cargo install --path bitsy
Installed package `bitsy v0.2.0 (/home/auser/bitsy/bitsy)` (executable `bitsy`)
$ cat bitsy/examples/passthrough.bitsy
mod Passthrough {
incoming in of Word[8];
outgoing out of Word[8];
out := in;
}
$ bitsy -c bitsy/examples/passthrough.bitsy | tee passthrough.mlir
hw.module @Passthrough(
in %_clock : !seq.clock,
in %_reset : i1,
in %in : i8,
out out : i8
) {
hw.output %in : i8
}
$ firtool --format=mlir passthrough.mlir
module Passthrough(
input _clock,
_reset,
input [7:0] in,
output [7:0] out
);
assign out = in;
endmodule