cxxrtl: failing test: unconnected blackbox outputs don't compile.

This commit is contained in:
Asherah Connor 2024-05-26 18:21:45 +03:00
parent b056e8c0ba
commit dc69365258
2 changed files with 28 additions and 0 deletions

View File

@ -11,3 +11,7 @@ run_subtest () {
run_subtest value
run_subtest value_fuzz
# Compile-only test.
../../yosys -p "read_verilog test_unconnected_output.v; proc; clean; write_cxxrtl cxxrtl-test-unconnected_output.cc"
${CC:-gcc} -std=c++11 -c -o cxxrtl-test-unconnected_output -I../../backends/cxxrtl/runtime cxxrtl-test-unconnected_output.cc

View File

@ -0,0 +1,24 @@
(* cxxrtl_blackbox *)
module blackbox(...);
(* cxxrtl_edge = "p" *)
input clk;
(* cxxrtl_sync *)
output [7:0] out1;
(* cxxrtl_sync *)
output [7:0] out2;
endmodule
module unconnected_output(
input clk,
in,
output out
);
blackbox bb (
.clock (clock),
.in (in),
.out1 (out),
.out2 (/* unconnected */),
);
endmodule