mirror of https://github.com/YosysHQ/yosys.git
synth_sf2: add -discard-ffinit option to discard ff initial value
sf2 ff have no initial values, but some IP cores use initial values. In order to use those cores on sf2, it is required to discard the initial value (to be carefully used).
This commit is contained in:
parent
7117817dbe
commit
4543751a77
|
@ -66,6 +66,9 @@ struct SynthSf2Pass : public ScriptPass
|
|||
log(" -clkbuf\n");
|
||||
log(" insert direct PAD->global_net buffers\n");
|
||||
log("\n");
|
||||
log(" -discard-ffinit\n");
|
||||
log(" discard FF init value instead of emitting an error\n");
|
||||
log("\n");
|
||||
log(" -retime\n");
|
||||
log(" run 'abc' with '-dff -D 1' options\n");
|
||||
log("\n");
|
||||
|
@ -76,7 +79,7 @@ struct SynthSf2Pass : public ScriptPass
|
|||
}
|
||||
|
||||
string top_opt, edif_file, vlog_file, json_file;
|
||||
bool flatten, retime, iobs, clkbuf;
|
||||
bool flatten, retime, iobs, clkbuf, discard_ffinit;
|
||||
|
||||
void clear_flags() override
|
||||
{
|
||||
|
@ -88,6 +91,7 @@ struct SynthSf2Pass : public ScriptPass
|
|||
retime = false;
|
||||
iobs = true;
|
||||
clkbuf = false;
|
||||
discard_ffinit = false;
|
||||
}
|
||||
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) override
|
||||
|
@ -138,6 +142,10 @@ struct SynthSf2Pass : public ScriptPass
|
|||
clkbuf = true;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-discard-ffinit") {
|
||||
discard_ffinit = true;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
extra_args(args, argidx, design);
|
||||
|
@ -171,6 +179,8 @@ struct SynthSf2Pass : public ScriptPass
|
|||
|
||||
if (check_label("coarse"))
|
||||
{
|
||||
if (discard_ffinit || help_mode)
|
||||
run("attrmap -remove init", "(only if -discard-ffinit)");
|
||||
run("synth -run coarse");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue