diff options
author | Jim Lawson <ucbjrl@berkeley.edu> | 2019-02-25 16:04:20 -0800 |
---|---|---|
committer | Jim Lawson <ucbjrl@berkeley.edu> | 2019-02-25 16:04:20 -0800 |
commit | 81abb2517c3d6e8fd2b31ff6d9d019d956a6bc14 (patch) | |
tree | c64df65f19414b166128231218f0f595d93fa58a /tests/various/hierarchy.sh | |
parent | 970f854c2ad271098b841e61b1d37a61cd04e252 (diff) | |
parent | c258b99040c8414952a3aceae874dc47563540dc (diff) | |
download | yosys-81abb2517c3d6e8fd2b31ff6d9d019d956a6bc14.tar.gz yosys-81abb2517c3d6e8fd2b31ff6d9d019d956a6bc14.tar.bz2 yosys-81abb2517c3d6e8fd2b31ff6d9d019d956a6bc14.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'tests/various/hierarchy.sh')
-rw-r--r-- | tests/various/hierarchy.sh | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/tests/various/hierarchy.sh b/tests/various/hierarchy.sh new file mode 100644 index 000000000..d33a247be --- /dev/null +++ b/tests/various/hierarchy.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +# Simple test of hierarchy -auto-top. + +set -e + +echo -n " TOP first - " +../../yosys -s - <<- EOY | grep "Automatically selected TOP as design top module" + read_verilog << EOV + module TOP(a, y); + input a; + output [31:0] y; + + aoi12 p [31:0] (a, y); + endmodule + + module aoi12(a, y); + input a; + output y; + assign y = ~a; + endmodule + EOV + hierarchy -auto-top +EOY + +echo -n " TOP last - " +../../yosys -s - <<- EOY | grep "Automatically selected TOP as design top module" + read_verilog << EOV + module aoi12(a, y); + input a; + output y; + assign y = ~a; + endmodule + + module TOP(a, y); + input a; + output [31:0] y; + + aoi12 foo (a, y); + endmodule + EOV + hierarchy -auto-top +EOY + +echo -n " no explicit top - " +../../yosys -s - <<- EOY | grep "Automatically selected noTop as design top module." + read_verilog << EOV + module aoi12(a, y); + input a; + output y; + assign y = ~a; + endmodule + + module noTop(a, y); + input a; + output [31:0] y; + endmodule + EOV + hierarchy -auto-top +EOY |