2019-09-20 19:58:51 -05:00
|
|
|
# https://github.com/YosysHQ/yosys/issues/1381
|
2019-09-20 19:49:26 -05:00
|
|
|
read_verilog <<EOT
|
2019-09-20 19:58:51 -05:00
|
|
|
module sub(input i, output o, (* techmap_autopurge *) input j);
|
2019-09-20 19:49:26 -05:00
|
|
|
foobar f(i, o, j);
|
|
|
|
endmodule
|
|
|
|
EOT
|
|
|
|
design -stash techmap
|
|
|
|
|
|
|
|
read_verilog <<EOT
|
|
|
|
(* blackbox *)
|
|
|
|
module sub(input i, output o, input j);
|
|
|
|
endmodule
|
|
|
|
|
|
|
|
(* blackbox *)
|
|
|
|
module foobar(input i, output o, input j);
|
|
|
|
endmodule
|
|
|
|
|
|
|
|
module top(input i, output o);
|
|
|
|
sub s0(i, o);
|
|
|
|
endmodule
|
|
|
|
EOT
|
|
|
|
|
|
|
|
techmap -map %techmap
|
|
|
|
hierarchy
|
|
|
|
check -assert
|
|
|
|
|
2019-09-20 19:58:51 -05:00
|
|
|
# https://github.com/YosysHQ/yosys/issues/1391
|
|
|
|
design -reset
|
|
|
|
read_verilog <<EOT
|
|
|
|
module sub(input i, output o, (* techmap_autopurge *) input [1:0] j);
|
|
|
|
foobar f(i, o, j);
|
|
|
|
endmodule
|
|
|
|
EOT
|
|
|
|
design -stash techmap
|
|
|
|
|
|
|
|
read_verilog <<EOT
|
2019-09-20 19:49:26 -05:00
|
|
|
(* blackbox *)
|
|
|
|
module sub(input i, output o, input j);
|
|
|
|
endmodule
|
|
|
|
|
|
|
|
(* blackbox *)
|
|
|
|
module foobar(input i, output o, input j);
|
|
|
|
endmodule
|
|
|
|
|
2019-09-20 19:58:51 -05:00
|
|
|
module top(input i, output o);
|
|
|
|
sub s0(i, o);
|
|
|
|
endmodule
|
|
|
|
EOT
|
|
|
|
|
|
|
|
techmap -map %techmap
|
|
|
|
hierarchy
|
|
|
|
check -assert
|
|
|
|
|
|
|
|
read_verilog -overwrite <<EOT
|
2019-09-20 19:49:26 -05:00
|
|
|
module top(input i, output o);
|
|
|
|
wire j;
|
|
|
|
sub s0(i, o, j);
|
|
|
|
endmodule
|
|
|
|
EOT
|
|
|
|
|
|
|
|
techmap -map %techmap
|
|
|
|
hierarchy
|