mirror of https://github.com/YosysHQ/yosys.git
Address requested changes - don't require non-$ name.
Suppress warning if name does begin with a `$`. Fix hierachy tests so they have something to grep. Announce hierarchy test types.
This commit is contained in:
parent
5c4a72c43e
commit
71bcc4c644
|
@ -525,14 +525,14 @@ int find_top_mod_score(Design *design, Module *module, dict<Module*, int> &db)
|
||||||
celltype = basic_cell_type(celltype);
|
celltype = basic_cell_type(celltype);
|
||||||
}
|
}
|
||||||
// Is this cell a module instance?
|
// Is this cell a module instance?
|
||||||
if (celltype[0] != '$') {
|
auto instModule = design->module(celltype);
|
||||||
auto instModule = design->module(celltype);
|
// If there is no instance for this, issue a warning.
|
||||||
// If there is no instance for this, issue a warning.
|
if (instModule == NULL) {
|
||||||
if (instModule == NULL) {
|
// but only if we're sure it is a reference to a module.
|
||||||
|
if (celltype[0] != '$')
|
||||||
log_warning("find_top_mod_score: no instance for %s.%s\n", celltype.c_str(), cell->name.c_str());
|
log_warning("find_top_mod_score: no instance for %s.%s\n", celltype.c_str(), cell->name.c_str());
|
||||||
} else {
|
} else {
|
||||||
score = max(score, find_top_mod_score(design, instModule, db) + 1);
|
score = max(score, find_top_mod_score(design, instModule, db) + 1);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
db[module] = score;
|
db[module] = score;
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
../../yosys -q -s - <<- EOY 2>&1 | grep "Automatically selected TOP as design top module"
|
echo -n " TOP first - "
|
||||||
|
../../yosys -s - <<- EOY | grep "Automatically selected TOP as design top module"
|
||||||
read_verilog << EOV
|
read_verilog << EOV
|
||||||
module TOP(a, y);
|
module TOP(a, y);
|
||||||
input a;
|
input a;
|
||||||
|
@ -21,7 +22,8 @@ set -e
|
||||||
hierarchy -auto-top
|
hierarchy -auto-top
|
||||||
EOY
|
EOY
|
||||||
|
|
||||||
../../yosys -q -s - <<- EOY 2>&1 | grep "Automatically selected TOP as design top module"
|
echo -n " TOP last - "
|
||||||
|
../../yosys -s - <<- EOY | grep "Automatically selected TOP as design top module"
|
||||||
read_verilog << EOV
|
read_verilog << EOV
|
||||||
module aoi12(a, y);
|
module aoi12(a, y);
|
||||||
input a;
|
input a;
|
||||||
|
@ -39,7 +41,8 @@ EOY
|
||||||
hierarchy -auto-top
|
hierarchy -auto-top
|
||||||
EOY
|
EOY
|
||||||
|
|
||||||
../../yosys -q -s - <<- EOY 2>&1 | grep "Automatically selected noTop as design top module."
|
echo -n " no explicit top - "
|
||||||
|
../../yosys -s - <<- EOY | grep "Automatically selected noTop as design top module."
|
||||||
read_verilog << EOV
|
read_verilog << EOV
|
||||||
module aoi12(a, y);
|
module aoi12(a, y);
|
||||||
input a;
|
input a;
|
||||||
|
|
|
@ -9,6 +9,6 @@ shell_tests=$(echo *.sh | sed -e 's/run-test.sh//')
|
||||||
if [ "$shell_tests" ]; then
|
if [ "$shell_tests" ]; then
|
||||||
for s in $shell_tests; do
|
for s in $shell_tests; do
|
||||||
echo "Running $s.."
|
echo "Running $s.."
|
||||||
bash $s >& ${s%.sh}.log
|
bash $s
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue