Skip to content

Commit

Permalink
cxxrtl: failing test: unconnected blackbox outputs don't compile.
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed May 26, 2024
1 parent 5579685 commit 66a1eef
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/cxxrtl/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 24 additions & 0 deletions tests/cxxrtl/test_unconnected_output.v
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 66a1eef

Please sign in to comment.