aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-06-09 20:55:40 +0000
committerwhitequark <whitequark@whitequark.org>2020-06-09 20:55:40 +0000
commit970ec34e7053704fb748fdc80b9ebaf277bce98d (patch)
tree7889f6b5de4430928cc46f5e563d9610064dfe9a
parentba11060e59fcd43e072802c5666c7095df01e5d2 (diff)
downloadyosys-970ec34e7053704fb748fdc80b9ebaf277bce98d.tar.gz
yosys-970ec34e7053704fb748fdc80b9ebaf277bce98d.tar.bz2
yosys-970ec34e7053704fb748fdc80b9ebaf277bce98d.zip
cxxrtl: order -On levels as localize, elide instead of the reverse.
Historically, elision was implemented before localization, so levels with elision are lower than corresponding levels with localization. This is unfortunate for two reasons: 1. Elision is a logical subset of localization, since it equals to not giving a name to a temporary. 2. "Localize" currently actually means "unbuffer and localize", and it would be useful to split those steps (at least for public wires) for improved design visibility.
-rw-r--r--backends/cxxrtl/cxxrtl_backend.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/backends/cxxrtl/cxxrtl_backend.cc b/backends/cxxrtl/cxxrtl_backend.cc
index 0ab8352c2..b1d89a7c2 100644
--- a/backends/cxxrtl/cxxrtl_backend.cc
+++ b/backends/cxxrtl/cxxrtl_backend.cc
@@ -2490,16 +2490,16 @@ struct CxxrtlBackend : public Backend {
log(" no optimization.\n");
log("\n");
log(" -O1\n");
- log(" elide internal wires if possible.\n");
+ log(" localize internal wires if possible.\n");
log("\n");
log(" -O2\n");
- log(" like -O1, and localize internal wires if possible.\n");
+ log(" like -O1, and elide internal wires if possible.\n");
log("\n");
log(" -O3\n");
- log(" like -O2, and elide public wires not marked (*keep*) if possible.\n");
+ log(" like -O2, and localize public wires not marked (*keep*) if possible.\n");
log("\n");
log(" -O4\n");
- log(" like -O3, and localize public wires not marked (*keep*) if possible.\n");
+ log(" like -O3, and elide public wires not marked (*keep*) if possible.\n");
log("\n");
log(" -g <level>\n");
log(" set the debug level. the default is -g%d. higher debug levels provide\n", DEFAULT_DEBUG_LEVEL);
@@ -2568,16 +2568,16 @@ struct CxxrtlBackend : public Backend {
switch (opt_level) {
// the highest level here must match DEFAULT_OPT_LEVEL
case 4:
- worker.localize_public = true;
+ worker.elide_public = true;
YS_FALLTHROUGH
case 3:
- worker.elide_public = true;
+ worker.localize_public = true;
YS_FALLTHROUGH
case 2:
- worker.localize_internal = true;
+ worker.elide_internal = true;
YS_FALLTHROUGH
case 1:
- worker.elide_internal = true;
+ worker.localize_internal = true;
YS_FALLTHROUGH
case 0:
break;