@@ -1028,6 +1028,9 @@ struct TechmapPass : public Pass {
10281028 log (" map file. Note that the Verilog frontend is also called with the\n " );
10291029 log (" '-nooverwrite' option set.\n " );
10301030 log (" \n " );
1031+ log (" -dont_map <celltype>\n " );
1032+ log (" leave the given cell type unmapped by ignoring any mapping rules for it\n " );
1033+ log (" \n " );
10311034 log (" When a module in the map file has the 'techmap_celltype' attribute set, it will\n " );
10321035 log (" match cells with a type that match the text value of this attribute. Otherwise\n " );
10331036 log (" the module name will be used to match the cell. Multiple space-separated cell\n " );
@@ -1159,6 +1162,7 @@ struct TechmapPass : public Pass {
11591162 simplemap_get_mappers (worker.simplemap_mappers );
11601163
11611164 std::vector<std::string> map_files;
1165+ std::vector<RTLIL::IdString> dont_map;
11621166 std::string verilog_frontend = " verilog -nooverwrite -noblackbox" ;
11631167 int max_iter = -1 ;
11641168
@@ -1200,6 +1204,10 @@ struct TechmapPass : public Pass {
12001204 worker.ignore_wb = true ;
12011205 continue ;
12021206 }
1207+ if (args[argidx] == " -dont_map" && argidx+1 < args.size ()) {
1208+ dont_map.push_back (RTLIL::escape_id (args[++argidx]));
1209+ continue ;
1210+ }
12031211 break ;
12041212 }
12051213 extra_args (args, argidx, design);
@@ -1256,6 +1264,11 @@ struct TechmapPass : public Pass {
12561264 celltypeMap[module_name].insert (module ->name );
12571265 }
12581266 }
1267+
1268+ // Erase any rules disabled with a -dont_map argument
1269+ for (auto type : dont_map)
1270+ celltypeMap.erase (type);
1271+
12591272 log_debug (" Cell type mappings to use:\n " );
12601273 for (auto &i : celltypeMap) {
12611274 i.second .sort (RTLIL::sort_by_id_str ());
0 commit comments