Example #1
0
 bool already_processed(analog_net_t n)
 {
     // no need to process rail nets - these are known variables
     if (n.is_rail_net())
     {
         return(true);
     }
     // if it's already processed - no need to continue
     foreach (var grp in groups)
     {
         if (plib.container.contains(grp, n))
         {
             return(true);
         }
     }
     return(false);
 }
Example #2
0
            bool check_if_processed_and_join(analog_net_t n)
            {
                // no need to process rail nets - these are known variables
                if (n.is_rail_net())
                {
                    return(true);
                }

                // First check if it is in a previous group.
                // In this case we need to merge this group into the current group
                if (groupspre.size() > 1)
                {
                    for (size_t i = 0; i < groupspre.size() - 1; i++)
                    {
                        if (plib.container.contains(groupspre[i], n))
                        {
                            // copy all nets
                            foreach (var cn in groupspre[i])
                            {
                                if (!plib.container.contains(groupspre.back(), cn))
                                {
                                    groupspre.back().push_back(cn);
                                }
                            }

                            // clear
                            groupspre[i].clear();
                            return(true);
                        }
                    }
                }

                // if it's already processed - no need to continue
                if (!groupspre.empty() && plib.container.contains(groupspre.back(), n))
                {
                    return(true);
                }

                return(false);
            }