mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 00:55:32 +00:00
Merge pull request #812 from ucb-bar/arrayhierarchyfixes
Define basic_cell_type() function and use it to derive the cell type …
This commit is contained in:
commit
c118f9a377
3 changed files with 108 additions and 11 deletions
59
tests/various/hierarchy.sh
Normal file
59
tests/various/hierarchy.sh
Normal file
|
@ -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
|
|
@ -1,6 +1,14 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
for x in *.ys; do
|
||||
echo "Running $x.."
|
||||
../../yosys -ql ${x%.ys}.log $x
|
||||
done
|
||||
# Run any .sh files in this directory (with the exception of the file - run-test.sh
|
||||
shell_tests=$(echo *.sh | sed -e 's/run-test.sh//')
|
||||
if [ "$shell_tests" ]; then
|
||||
for s in $shell_tests; do
|
||||
echo "Running $s.."
|
||||
bash $s
|
||||
done
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue