aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/sf2/synth_sf2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'techlibs/sf2/synth_sf2.cc')
-rw-r--r--techlibs/sf2/synth_sf2.cc23
1 files changed, 15 insertions, 8 deletions
diff --git a/techlibs/sf2/synth_sf2.cc b/techlibs/sf2/synth_sf2.cc
index 34a7e68be..a0061ebd0 100644
--- a/techlibs/sf2/synth_sf2.cc
+++ b/techlibs/sf2/synth_sf2.cc
@@ -29,7 +29,7 @@ struct SynthSf2Pass : public ScriptPass
{
SynthSf2Pass() : ScriptPass("synth_sf2", "synthesis for SmartFusion2 and IGLOO2 FPGAs") { }
- void help() YS_OVERRIDE
+ void help() override
{
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
log("\n");
@@ -78,7 +78,7 @@ struct SynthSf2Pass : public ScriptPass
string top_opt, edif_file, vlog_file, json_file;
bool flatten, retime, iobs, clkbuf;
- void clear_flags() YS_OVERRIDE
+ void clear_flags() override
{
top_opt = "-auto-top";
edif_file = "";
@@ -90,7 +90,7 @@ struct SynthSf2Pass : public ScriptPass
clkbuf = false;
}
- void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
+ void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
string run_from, run_to;
clear_flags();
@@ -153,7 +153,7 @@ struct SynthSf2Pass : public ScriptPass
log_pop();
}
- void script() YS_OVERRIDE
+ void script() override
{
if (check_label("begin"))
{
@@ -187,6 +187,7 @@ struct SynthSf2Pass : public ScriptPass
if (check_label("map_ffs"))
{
+ run("dfflegalize -cell $_DFFE_PN?P_ x -cell $_SDFFCE_PN?P_ x -cell $_DLATCH_PN?_ x");
run("techmap -D NO_LUT -map +/sf2/cells_map.v");
run("opt_expr -mux_undef");
run("simplemap");
@@ -209,10 +210,16 @@ struct SynthSf2Pass : public ScriptPass
if (check_label("map_iobs"))
{
- if (help_mode)
- run("sf2_iobs [-clkbuf]", "(unless -noiobs)");
- else if (iobs)
- run(clkbuf ? "sf2_iobs -clkbuf" : "sf2_iobs");
+ if (help_mode || iobs) {
+ if (help_mode) {
+ run("clkbufmap -buf CLKINT Y:A [-inpad CLKBUF Y:PAD]", "(unless -noiobs, -inpad only passed if -clkbuf)");
+ } else if (clkbuf) {
+ run("clkbufmap -buf CLKINT Y:A -inpad CLKBUF Y:PAD");
+ } else {
+ run("clkbufmap -buf CLKINT Y:A");
+ }
+ run("iopadmap -bits -inpad INBUF Y:PAD -outpad OUTBUF D:PAD -toutpad TRIBUFF E:D:PAD -tinoutpad BIBUF E:Y:D:PAD", "(unless -noiobs");
+ }
run("clean");
}