projects
/
yosys.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1897 from YosysHQ/dave/bram-rejection-fix
[yosys.git]
/
techlibs
/
efinix
/
synth_efinix.cc
diff --git
a/techlibs/efinix/synth_efinix.cc
b/techlibs/efinix/synth_efinix.cc
index 3f17bafa3a6056840396fe911a06d3f3d3d86209..f9a7ef8654bdb8e06cccf2b9a56a5af77a0a02ac 100644
(file)
--- a/
techlibs/efinix/synth_efinix.cc
+++ b/
techlibs/efinix/synth_efinix.cc
@@
-58,7
+58,10
@@
struct SynthEfinixPass : public ScriptPass
log(" do not flatten design before synthesis\n");
log("\n");
log(" -retime\n");
log(" do not flatten design before synthesis\n");
log("\n");
log(" -retime\n");
- log(" run 'abc' with -dff option\n");
+ log(" run 'abc' with '-dff -D 1' options\n");
+ log("\n");
+ log(" -nobram\n");
+ log(" do not use EFX_RAM_5K cells in output netlist\n");
log("\n");
log("\n");
log("The following commands are executed by this synthesis command:\n");
log("\n");
log("\n");
log("The following commands are executed by this synthesis command:\n");
@@
-67,7
+70,7
@@
struct SynthEfinixPass : public ScriptPass
}
string top_opt, edif_file, json_file;
}
string top_opt, edif_file, json_file;
- bool flatten, retime;
+ bool flatten, retime
, nobram
;
void clear_flags() YS_OVERRIDE
{
void clear_flags() YS_OVERRIDE
{
@@
-76,6
+79,7
@@
struct SynthEfinixPass : public ScriptPass
json_file = "";
flatten = true;
retime = false;
json_file = "";
flatten = true;
retime = false;
+ nobram = false;
}
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
}
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
@@
-114,6
+118,10
@@
struct SynthEfinixPass : public ScriptPass
retime = true;
continue;
}
retime = true;
continue;
}
+ if (args[argidx] == "-nobram") {
+ nobram = true;
+ continue;
+ }
break;
}
extra_args(args, argidx, design);
break;
}
extra_args(args, argidx, design);
@@
-150,19
+158,30
@@
struct SynthEfinixPass : public ScriptPass
run("synth -run coarse");
}
run("synth -run coarse");
}
- if (check_label("fine"))
+ if (!nobram || check_label("map_bram", "(skip if -nobram)"))
+ {
+ run("memory_bram -rules +/efinix/brams.txt");
+ run("techmap -map +/efinix/brams_map.v");
+ run("setundef -zero -params t:EFX_RAM_5K");
+ }
+
+ if (check_label("map_ffram"))
{
run("opt -fast -mux_undef -undriven -fine");
run("memory_map");
run("opt -undriven -fine");
{
run("opt -fast -mux_undef -undriven -fine");
run("memory_map");
run("opt -undriven -fine");
+ }
+
+ if (check_label("map_gates"))
+ {
run("techmap -map +/techmap.v -map +/efinix/arith_map.v");
run("techmap -map +/techmap.v -map +/efinix/arith_map.v");
+ run("opt -fast");
if (retime || help_mode)
if (retime || help_mode)
- run("abc -dff", "(only if -retime)");
+ run("abc -dff
-D 1
", "(only if -retime)");
}
if (check_label("map_ffs"))
{
}
if (check_label("map_ffs"))
{
- run("dffsr2dff");
run("techmap -D NO_LUT -map +/efinix/cells_map.v");
run("dffinit -strinit SET RESET -ff AL_MAP_SEQ q REGSET -noreinit");
run("opt_expr -mux_undef");
run("techmap -D NO_LUT -map +/efinix/cells_map.v");
run("dffinit -strinit SET RESET -ff AL_MAP_SEQ q REGSET -noreinit");
run("opt_expr -mux_undef");
@@
-184,9
+203,10
@@
struct SynthEfinixPass : public ScriptPass
if (check_label("map_gbuf"))
{
run("efinix_gbuf");
if (check_label("map_gbuf"))
{
run("efinix_gbuf");
+ run("efinix_fixcarry");
run("clean");
}
run("clean");
}
-
+
if (check_label("check"))
{
run("hierarchy -check");
if (check_label("check"))
{
run("hierarchy -check");