ice40_opt to ignore (* keep *) -ed cells
authorEddie Hung <eddie@fpgeh.com>
Tue, 3 Dec 2019 22:48:39 +0000 (14:48 -0800)
committerEddie Hung <eddie@fpgeh.com>
Tue, 3 Dec 2019 22:48:39 +0000 (14:48 -0800)
techlibs/ice40/ice40_opt.cc

index ea56d3f4d1fed16ef14bdad9e98b524d3fa4cae5..aa5c436491d38e4d0c883b878621299c946ff563 100644 (file)
@@ -41,6 +41,11 @@ static void run_ice40_opts(Module *module)
 
        for (auto cell : module->selected_cells())
        {
+               if (!cell->type.in("\\SB_LUT4", "\\SB_CARRY", "$__ICE40_CARRY_WRAPPER"))
+                       continue;
+               if (cell->has_keep_attr())
+                       continue;
+
                if (cell->type == "\\SB_LUT4")
                {
                        sb_lut_cells.push_back(cell);