mirror of
https://github.com/YosysHQ/yosys
synced 2026-06-03 15:47:58 +00:00
gatemate: add option to create 'scopename' attributes when flattening the netlist
This commit is contained in:
parent
94ec78b6e8
commit
1d86b3cd6e
1 changed files with 11 additions and 2 deletions
|
|
@ -56,6 +56,9 @@ struct SynthGateMatePass : public ScriptPass
|
||||||
log(" -noflatten\n");
|
log(" -noflatten\n");
|
||||||
log(" do not flatten design before synthesis.\n");
|
log(" do not flatten design before synthesis.\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
|
log(" -scopename\n");
|
||||||
|
log(" create 'scopename' attributes when flattening the netlist.\n");
|
||||||
|
log("\n");
|
||||||
log(" -nobram\n");
|
log(" -nobram\n");
|
||||||
log(" do not use CC_BRAM_20K or CC_BRAM_40K cells in output netlist.\n");
|
log(" do not use CC_BRAM_20K or CC_BRAM_40K cells in output netlist.\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
|
|
@ -94,7 +97,7 @@ struct SynthGateMatePass : public ScriptPass
|
||||||
}
|
}
|
||||||
|
|
||||||
string top_opt, vlog_file, json_file;
|
string top_opt, vlog_file, json_file;
|
||||||
bool noflatten, nobram, noaddf, nomult, nomx4, nomx8, luttree, dff, retime, noiopad, noclkbuf, abc_new;
|
bool noflatten, scopename, nobram, noaddf, nomult, nomx4, nomx8, luttree, dff, retime, noiopad, noclkbuf, abc_new;
|
||||||
|
|
||||||
void clear_flags() override
|
void clear_flags() override
|
||||||
{
|
{
|
||||||
|
|
@ -102,6 +105,7 @@ struct SynthGateMatePass : public ScriptPass
|
||||||
vlog_file = "";
|
vlog_file = "";
|
||||||
json_file = "";
|
json_file = "";
|
||||||
noflatten = false;
|
noflatten = false;
|
||||||
|
scopename = false;
|
||||||
nobram = false;
|
nobram = false;
|
||||||
noaddf = false;
|
noaddf = false;
|
||||||
nomult = false;
|
nomult = false;
|
||||||
|
|
@ -147,6 +151,10 @@ struct SynthGateMatePass : public ScriptPass
|
||||||
noflatten = true;
|
noflatten = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (args[argidx] == "-scopename") {
|
||||||
|
scopename = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (args[argidx] == "-nobram") {
|
if (args[argidx] == "-nobram") {
|
||||||
nobram = true;
|
nobram = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -220,7 +228,8 @@ struct SynthGateMatePass : public ScriptPass
|
||||||
run("proc");
|
run("proc");
|
||||||
if (!noflatten) {
|
if (!noflatten) {
|
||||||
run("check");
|
run("check");
|
||||||
run("flatten");
|
std::string flatten_args = scopename ? " -scopename" : "";
|
||||||
|
run("flatten" + flatten_args);
|
||||||
}
|
}
|
||||||
run("tribuf -logic");
|
run("tribuf -logic");
|
||||||
run("deminout");
|
run("deminout");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue