From 33bfc9d19cc34ee25df127eab1d2cdad057a1dad Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Mon, 10 Mar 2025 12:56:21 +0100 Subject: [PATCH] opt_merge: test more kinds of cells --- tests/opt/opt_merge_basic.ys | 104 +++++++++++++++++++++++++++++++++-- 1 file changed, 98 insertions(+), 6 deletions(-) diff --git a/tests/opt/opt_merge_basic.ys b/tests/opt/opt_merge_basic.ys index 082fdb0b8..9de320aaa 100644 --- a/tests/opt/opt_merge_basic.ys +++ b/tests/opt/opt_merge_basic.ys @@ -19,7 +19,7 @@ module top(A, B, C, X, Y); input [7:0] A, B, C; output [7:0] X, Y; assign X = A + B; -assign Y = A + C; +assign Y = A + C; // <- look here endmodule EOT # Reject on a different input @@ -45,10 +45,9 @@ select -assert-count 1 t:$reduce_xor design -reset read_verilog -icells < B; +assign Y = A > B; +endmodule +EOT +# Exercise the general case in hash_cell_inputs - accept +opt_expr +select -assert-count 2 t:$gt +equiv_opt -assert opt_merge +design -load postopt +select -assert-count 1 t:$gt + +design -reset +read_verilog < B; +assign Y = A > C; // <- look here +endmodule +EOT +# Exercise the general case in hash_cell_inputs - reject +opt_expr +select -assert-count 2 t:$gt +opt_merge +select -assert-count 2 t:$gt