mirror of https://github.com/YosysHQ/yosys.git
emit $scopeinfo cells by default
This commit is contained in:
parent
dab7905cbe
commit
77b28442a5
|
@ -193,8 +193,6 @@ struct JsonWriter
|
||||||
for (auto c : module->cells()) {
|
for (auto c : module->cells()) {
|
||||||
if (use_selection && !module->selected(c))
|
if (use_selection && !module->selected(c))
|
||||||
continue;
|
continue;
|
||||||
// Eventually we will want to emit $scopeinfo, but currently this
|
|
||||||
// will break JSON netlist consumers like nextpnr
|
|
||||||
if (!scopeinfo_mode && c->type == ID($scopeinfo))
|
if (!scopeinfo_mode && c->type == ID($scopeinfo))
|
||||||
continue;
|
continue;
|
||||||
f << stringf("%s\n", first ? "" : ",");
|
f << stringf("%s\n", first ? "" : ",");
|
||||||
|
@ -357,8 +355,8 @@ struct JsonBackend : public Backend {
|
||||||
log(" -selected\n");
|
log(" -selected\n");
|
||||||
log(" output only select module\n");
|
log(" output only select module\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
log(" -scopeinfo\n");
|
log(" -noscopeinfo\n");
|
||||||
log(" include $scopeinfo cells in the output\n");
|
log(" don't include $scopeinfo cells in the output\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
log("The general syntax of the JSON output created by this command is as follows:\n");
|
log("The general syntax of the JSON output created by this command is as follows:\n");
|
||||||
|
@ -605,7 +603,7 @@ struct JsonBackend : public Backend {
|
||||||
bool aig_mode = false;
|
bool aig_mode = false;
|
||||||
bool compat_int_mode = false;
|
bool compat_int_mode = false;
|
||||||
bool use_selection = false;
|
bool use_selection = false;
|
||||||
bool scopeinfo_mode = false;
|
bool scopeinfo_mode = true;
|
||||||
|
|
||||||
size_t argidx;
|
size_t argidx;
|
||||||
for (argidx = 1; argidx < args.size(); argidx++)
|
for (argidx = 1; argidx < args.size(); argidx++)
|
||||||
|
@ -622,8 +620,8 @@ struct JsonBackend : public Backend {
|
||||||
use_selection = true;
|
use_selection = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (args[argidx] == "-scopeinfo") {
|
if (args[argidx] == "-noscopeinfo") {
|
||||||
scopeinfo_mode = true;
|
scopeinfo_mode = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -657,8 +655,8 @@ struct JsonPass : public Pass {
|
||||||
log(" emit 32-bit or smaller fully-defined parameter values directly\n");
|
log(" emit 32-bit or smaller fully-defined parameter values directly\n");
|
||||||
log(" as JSON numbers (for compatibility with old parsers)\n");
|
log(" as JSON numbers (for compatibility with old parsers)\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
log(" -scopeinfo\n");
|
log(" -noscopeinfo\n");
|
||||||
log(" include $scopeinfo cells in the output\n");
|
log(" don't include $scopeinfo cells in the output\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
log("See 'help write_json' for a description of the JSON format used.\n");
|
log("See 'help write_json' for a description of the JSON format used.\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
|
@ -668,7 +666,7 @@ struct JsonPass : public Pass {
|
||||||
std::string filename;
|
std::string filename;
|
||||||
bool aig_mode = false;
|
bool aig_mode = false;
|
||||||
bool compat_int_mode = false;
|
bool compat_int_mode = false;
|
||||||
bool scopeinfo_mode = false;
|
bool scopeinfo_mode = true;
|
||||||
|
|
||||||
size_t argidx;
|
size_t argidx;
|
||||||
for (argidx = 1; argidx < args.size(); argidx++)
|
for (argidx = 1; argidx < args.size(); argidx++)
|
||||||
|
@ -685,8 +683,8 @@ struct JsonPass : public Pass {
|
||||||
compat_int_mode = true;
|
compat_int_mode = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (args[argidx] == "-scopeinfo") {
|
if (args[argidx] == "-noscopeinfo") {
|
||||||
scopeinfo_mode = true;
|
scopeinfo_mode = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -26,13 +26,13 @@ flatten -scopename
|
||||||
prep
|
prep
|
||||||
|
|
||||||
write_json json_scopeinfo.out
|
write_json json_scopeinfo.out
|
||||||
!grep -qvF '$scopeinfo' json_scopeinfo.out
|
|
||||||
|
|
||||||
write_json -scopeinfo json_scopeinfo.out
|
|
||||||
!grep -qF '$scopeinfo' json_scopeinfo.out
|
!grep -qF '$scopeinfo' json_scopeinfo.out
|
||||||
|
|
||||||
|
write_json -noscopeinfo json_scopeinfo.out
|
||||||
|
!grep -qvF '$scopeinfo' json_scopeinfo.out
|
||||||
|
|
||||||
json -o json_scopeinfo.out
|
json -o json_scopeinfo.out
|
||||||
!grep -qvF '$scopeinfo' json_scopeinfo.out
|
|
||||||
|
|
||||||
json -scopeinfo -o json_scopeinfo.out
|
|
||||||
!grep -qF '$scopeinfo' json_scopeinfo.out
|
!grep -qF '$scopeinfo' json_scopeinfo.out
|
||||||
|
|
||||||
|
json -noscopeinfo -o json_scopeinfo.out
|
||||||
|
!grep -qvF '$scopeinfo' json_scopeinfo.out
|
||||||
|
|
Loading…
Reference in New Issue