3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-03-23 12:59:15 +00:00
This commit is contained in:
Muxianesty 2026-03-19 10:12:03 +01:00 committed by GitHub
commit a6ca92dc6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 151 additions and 3 deletions

15
tests/techmap/tribuf.ys Normal file
View file

@ -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