design: add test
authorEddie Hung <eddie@fpgeh.com>
Thu, 16 Apr 2020 19:48:40 +0000 (12:48 -0700)
committerEddie Hung <eddie@fpgeh.com>
Thu, 16 Apr 2020 19:48:40 +0000 (12:48 -0700)
tests/various/design.ys
tests/various/design1.ys [new file with mode: 0644]

index f13ad817167f9d024ddd35d0c19eb44f5219252f..a64430dc73ede980d00bd9eb8f56814cafaed784 100644 (file)
@@ -1,9 +1,17 @@
 read_verilog <<EOT
+(* blackbox *)
+module bb(input i, output o);
+endmodule
+
+(* whitebox *)
+module wb(input i, output o);
+assign o = ~i;
+endmodule
+
 module top(input i, output o);
-assign o = i;
+assign o = ~i;
 endmodule
 EOT
-design -stash foo
-design -delete foo
-logger -expect error "No saved design 'foo' found!" 1
-design -delete foo
+
+design -stash gate
+design -import gate -as gate
diff --git a/tests/various/design1.ys b/tests/various/design1.ys
new file mode 100644 (file)
index 0000000..f13ad81
--- /dev/null
@@ -0,0 +1,9 @@
+read_verilog <<EOT
+module top(input i, output o);
+assign o = i;
+endmodule
+EOT
+design -stash foo
+design -delete foo
+logger -expect error "No saved design 'foo' found!" 1
+design -delete foo