3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-06 03:10:26 +00:00

Added ice40 SB_CARRY support

This commit is contained in:
Clifford Wolf 2015-04-18 09:33:08 +02:00
parent faa95dd845
commit f78fa718be
3 changed files with 81 additions and 2 deletions

View file

@ -66,7 +66,7 @@ struct SynthIce40Pass : public Pass {
log(" opt -fast -mux_undef -undriven -fine\n");
log(" memory_map\n");
log(" opt -undriven -fine\n");
log(" techmap\n");
log(" techmap -map +/techmap.v -map +/ice40/arith_map.v\n");
log(" opt -fast\n");
log("\n");
log(" map_ffs:\n");
@ -95,6 +95,7 @@ struct SynthIce40Pass : public Pass {
{
std::string top_opt = "-auto-top";
std::string run_from, run_to;
bool nocarry = false;
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++)
@ -111,6 +112,10 @@ struct SynthIce40Pass : public Pass {
run_to = args[argidx].substr(pos+1);
continue;
}
if (args[argidx] == "-nocarry") {
nocarry = true;
continue;
}
break;
}
extra_args(args, argidx, design);
@ -139,7 +144,10 @@ struct SynthIce40Pass : public Pass {
Pass::call(design, "opt -fast -mux_undef -undriven -fine");
Pass::call(design, "memory_map");
Pass::call(design, "opt -undriven -fine");
Pass::call(design, "techmap");
if (nocarry)
Pass::call(design, "techmap");
else
Pass::call(design, "techmap -map +/techmap.v -map +/ice40/arith_map.v");
Pass::call(design, "opt -fast");
}