Support for abstract modules in chparam
authorClifford Wolf <clifford@clifford.at>
Mon, 21 Mar 2016 15:30:55 +0000 (16:30 +0100)
committerClifford Wolf <clifford@clifford.at>
Mon, 21 Mar 2016 15:37:35 +0000 (16:37 +0100)
passes/cmds/setattr.cc

index 75c738b6d844fb4cab5609bdcea5daa92c892ae4..9b05ae32fb406daf7b5bc0935860e0553255c27f 100644 (file)
@@ -215,6 +215,12 @@ struct ChparamPass : public Pass {
                        }
                        break;
                }
+
+               for (int i = argidx; i < GetSize(args); i++)
+                       if (design->module("$abstract\\" + args[i]) != nullptr &&
+                                       design->module(RTLIL::escape_id(args[i])) == nullptr)
+                               args[i] = "$abstract\\" + args[i];
+
                extra_args(args, argidx, design);
 
                do_setunset(new_parameters, setunset_list);