# Pastebin 5VgFStvK // Run: yosys -p "script -scriptwire top/runme; prep -top top; opt_clean -purge; show top" scriptwire.v module submod_and(input i0, i1, output o); assign o = i0 & i1; endmodule module submod_or(input i0, i1, output o); assign o = i0 | i1; endmodule module top(input a, b, output q); parameter operation = "submod_or"; submod_and submod_i(.i0(a), .i1(b), .o(q)); wire [2047:0] runme = {"chtype -set ", operation, " submod_i"}; endmodule