select: add test for not selecting inside black/white boxes
authorEddie Hung <eddie@fpgeh.com>
Thu, 16 Apr 2020 19:45:04 +0000 (12:45 -0700)
committerEddie Hung <eddie@fpgeh.com>
Thu, 16 Apr 2020 19:45:04 +0000 (12:45 -0700)
tests/select/blackboxes.ys [new file with mode: 0644]

diff --git a/tests/select/blackboxes.ys b/tests/select/blackboxes.ys
new file mode 100644 (file)
index 0000000..0031de1
--- /dev/null
@@ -0,0 +1,21 @@
+read_verilog -specify <<EOT
+module top(input a, b, output o);
+assign o = a & b;
+endmodule
+
+(* blackbox *)
+module bb(input a, b, output o);
+assign o = a | b;
+specify
+       (a => o) = 1;
+endspecify
+endmodule
+
+(* whitebox *)
+module wb(input a, b, output o);
+assign o = a ^ b;
+endmodule
+EOT
+
+select -assert-count 1 c:*
+select -assert-none t:* t:$and %d