Skip to content

Commit

Permalink
Add new DFF types, and added "-nodffe" option
Browse files Browse the repository at this point in the history
  • Loading branch information
mmicko committed Apr 29, 2024
1 parent 0e62bad commit f306b98
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions techlibs/nanoxplore/synth_nanoxplore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ struct SynthNanoXplorePass : public ScriptPass
log(" -nocy\n");
log(" do not map adders to CY cells\n");
log("\n");
log(" -nodffe\n");
log(" do not use flipflops with L in output netlist\n");
log("\n");
log(" -norfram\n");
log(" do not use Register File RAM cells in output netlist\n");
log("\n");
Expand All @@ -97,7 +100,7 @@ struct SynthNanoXplorePass : public ScriptPass
}

string top_opt, json_file, family;
bool flatten, abc9, nocy, norfram, nobram, nodsp, iopad, no_rw_check;
bool flatten, abc9, nocy, nodffe, norfram, nobram, nodsp, iopad, no_rw_check;
std::string postfix;

void clear_flags() override
Expand All @@ -108,6 +111,7 @@ struct SynthNanoXplorePass : public ScriptPass
flatten = true;
abc9 = false;
nocy = false;
nodffe = false;
norfram = false;
nobram = false;
nodsp = false;
Expand Down Expand Up @@ -160,6 +164,10 @@ struct SynthNanoXplorePass : public ScriptPass
nocy = true;
continue;
}
if (args[argidx] == "-nodffe") {
nodffe = true;
continue;
}
if (args[argidx] == "-norfram") {
norfram = true;
continue;
Expand Down Expand Up @@ -294,7 +302,14 @@ struct SynthNanoXplorePass : public ScriptPass

if (check_label("map_ffs"))
{
run("dfflegalize -cell $_DFF_?P?_ 0 -cell $_SDFF_?P?_ 0 -cell $_DLATCH_?_ x"); //-cell $_ALDFF_?P_ 0
std::string dfflegalize_args = " -cell $_DFF_?_ 0 -cell $_DFF_?P?_ 0 -cell $_SDFF_?P?_ 0";
if (help_mode) {
dfflegalize_args += " [-cell $_DFFE_PP_ 0 -cell $_DFFE_NN_ 0 -cell $_DFFE_?P?P_ 0 -cell $_SDFFE_?P?P_ 0]";
} else if (!nodffe) {
dfflegalize_args += " -cell $_DFFE_PP_ 0 -cell $_DFFE_NN_ 0 -cell $_DFFE_?P?P_ 0 -cell $_SDFFE_?P?P_ 0";
}
dfflegalize_args += " -cell $_DLATCH_?_ x";
run("dfflegalize" + dfflegalize_args,"($_*DFFE_* only if not -nodffe)");
run("techmap -map +/nanoxplore/latches_map.v");
run("techmap -map +/nanoxplore/cells_map.v");
run("opt_expr -undriven -mux_undef");
Expand Down

0 comments on commit f306b98

Please sign in to comment.