log(" -noflatten\n");
log(" do not flatten design before synthesis\n");
log("\n");
+ log(" -noiopad\n");
+ log(" do not insert IO buffers\n");
+ log("\n");
log(" -vpr\n");
log(" generate an output netlist (and BLIF file) suitable for VPR\n");
log(" (this feature is experimental and incomplete)\n");
}
string top_opt, blif_file, edif_file, json_file;
- bool flatten, vpr;
+ bool flatten, vpr, noiopad;
void clear_flags() override
{
json_file = "";
flatten = true;
vpr = false;
+ noiopad = false;
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
flatten = false;
continue;
}
+ if (args[argidx] == "-noiopad") {
+ noiopad = true;
+ continue;
+ }
if (args[argidx] == "-vpr") {
vpr = true;
continue;
{
if (check_label("begin"))
{
- run("read_verilog -lib +/machxo2/cells_sim.v");
+ run("read_verilog -lib -icells +/machxo2/cells_sim.v");
run(stringf("hierarchy -check %s", help_mode ? "-top <top>" : top_opt.c_str()));
}
if (check_label("flatten", "(unless -noflatten)"))
{
- if (flatten) {
+ if (flatten || help_mode) {
run("proc");
run("flatten");
run("tribuf -logic");
run("opt -fast");
}
+ if (check_label("map_ios", "(unless -noiopad)"))
+ {
+ if (!noiopad || help_mode)
+ {
+ run("iopadmap -bits -outpad $__FACADE_OUTPAD I:O -inpad $__FACADE_INPAD O:I -toutpad $__FACADE_TOUTPAD OE:I:O -tinoutpad $__FACADE_TINOUTPAD OE:O:I:B A:top");
+ run("attrmvcp -attr src -attr LOC t:$__FACADE_OUTPAD %x:+[O] t:$__FACADE_TOUTPAD %x:+[O] t:$__FACADE_TINOUTPAD %x:+[B]");
+ run("attrmvcp -attr src -attr LOC -driven t:$__FACADE_INPAD %x:+[I]");
+ }
+ }
+
if (check_label("map_ffs"))
{
run("dfflegalize -cell $_DFF_P_ 0");