// -p dead-cell-removal import "primitives/std.lib"; component add(left: 32, right: 32) -> (out: 32) { cells { adder = std_add(32); outpt = std_reg(32); } wires { group do_add { adder.left = left; adder.right = right; outpt.in = adder.out; outpt.write_en = 1'd1; do_add[done] = outpt.done; } } control { seq { do_add; } } } component main() -> () { cells { used_reg = std_reg(32); used_le = std_le(1); unused_reg = std_reg(32); my_add = add(); add_input = std_reg(32); } wires { used_reg.in = used_le.out ? 32'd10; } control { invoke my_add(left = add_input.out, right = add_input.out)(); } }