mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-28 19:35:53 +00:00
machxo2: Initial support for carry chains (CCU2D)
This commit is contained in:
parent
53c0a6b780
commit
6e12da3956
4 changed files with 127 additions and 5 deletions
|
@ -69,6 +69,9 @@ struct SynthMachXO2Pass : public ScriptPass
|
|||
log(" -noiopad\n");
|
||||
log(" do not insert IO buffers\n");
|
||||
log("\n");
|
||||
log(" -ccu2\n");
|
||||
log(" use CCU2 cells in output netlist\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");
|
||||
|
@ -80,7 +83,7 @@ struct SynthMachXO2Pass : public ScriptPass
|
|||
}
|
||||
|
||||
string top_opt, blif_file, edif_file, json_file;
|
||||
bool nobram, nolutram, flatten, vpr, noiopad;
|
||||
bool ccu2, nobram, nolutram, flatten, vpr, noiopad;
|
||||
|
||||
void clear_flags() override
|
||||
{
|
||||
|
@ -88,6 +91,7 @@ struct SynthMachXO2Pass : public ScriptPass
|
|||
blif_file = "";
|
||||
edif_file = "";
|
||||
json_file = "";
|
||||
ccu2 = false;
|
||||
nobram = false;
|
||||
nolutram = false;
|
||||
flatten = true;
|
||||
|
@ -147,6 +151,10 @@ struct SynthMachXO2Pass : public ScriptPass
|
|||
noiopad = true;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-ccu2") {
|
||||
ccu2 = true;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-vpr") {
|
||||
vpr = true;
|
||||
continue;
|
||||
|
@ -204,14 +212,17 @@ struct SynthMachXO2Pass : public ScriptPass
|
|||
|
||||
if (check_label("fine"))
|
||||
{
|
||||
run("opt -fast -mux_undef -undriven -fine");
|
||||
run("memory_map");
|
||||
run("opt -full");
|
||||
run("techmap -map +/techmap.v");
|
||||
run("opt -fast");
|
||||
run("opt -undriven -fine");
|
||||
}
|
||||
|
||||
if (check_label("map_ios", "(unless -noiopad)"))
|
||||
if (check_label("map_gates", "(unless -noiopad)"))
|
||||
{
|
||||
if (!ccu2)
|
||||
run("techmap");
|
||||
else
|
||||
run("techmap -map +/techmap.v -map +/machxo2/arith_map.v");
|
||||
if (!noiopad || help_mode)
|
||||
{
|
||||
run("iopadmap -bits -outpad OB I:O -inpad IB O:I -toutpad OBZ ~T:I:O -tinoutpad BB ~T:O:I:B A:top", "(only if '-iopad')");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue