From 76d286ebe47162ff2acd7b9e4da436230eacf550 Mon Sep 17 00:00:00 2001 From: Muxianesty Date: Sun, 1 Mar 2026 00:41:01 +0300 Subject: [PATCH] tribuf: added techmap/tribuf.ys tests. --- tests/techmap/tribuf.ys | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/techmap/tribuf.ys diff --git a/tests/techmap/tribuf.ys b/tests/techmap/tribuf.ys new file mode 100644 index 000000000..8640b4ba2 --- /dev/null +++ b/tests/techmap/tribuf.ys @@ -0,0 +1,15 @@ +read_verilog << EOT +module tribuf_nested_simple(input [3:0] in1, input [3:0] in2, input [3:0] in3, input sel1, input sel2, input sel3, output [3:0] out1); + assign out1 = (sel1) ? in1 : ((sel2) ? in2 : 4'bzzzz); + assign out1 = (sel3) ? in3 : 4'bzzzz; +endmodule + +EOT + +opt_clean +tribuf -merge -nested + +# -assert ensures that we won't have +# multiple drivers (as the first mux is recognized correctly). +check -assert +