3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-26 21:16:03 +00:00

synth_quicklogic: add -noflatten option

This commit is contained in:
N. Engelhardt 2024-11-11 11:22:05 +01:00
parent c5d096b7b8
commit 15d24bf2e6

View file

@ -78,7 +78,7 @@ struct SynthQuickLogicPass : public ScriptPass {
}
string top_opt, blif_file, edif_file, family, currmodule, verilog_file, lib_path;
bool abc9, inferAdder, nobram, bramTypes, dsp, ioff;
bool abc9, inferAdder, nobram, bramTypes, dsp, ioff, flatten;
void clear_flags() override
{
@ -95,6 +95,7 @@ struct SynthQuickLogicPass : public ScriptPass {
lib_path = "+/quicklogic/";
dsp = true;
ioff = true;
flatten = true;
}
void set_scratchpad_defaults(RTLIL::Design *design) {
@ -163,6 +164,10 @@ struct SynthQuickLogicPass : public ScriptPass {
ioff = false;
continue;
}
if (args[argidx] == "-noflatten") {
flatten = false;
continue;
}
break;
}
extra_args(args, argidx, design);
@ -207,7 +212,8 @@ struct SynthQuickLogicPass : public ScriptPass {
if (check_label("prepare")) {
run("proc");
run("flatten");
if (flatten)
run("flatten", "(unless -noflatten)");
if (help_mode || family == "pp3") {
run("tribuf -logic", " (for pp3)");
}