当前位置: 首页>>代码示例>>Python>>正文


Python Group.is_bias_connected方法代码示例

本文整理汇总了Python中group.Group.is_bias_connected方法的典型用法代码示例。如果您正苦于以下问题:Python Group.is_bias_connected方法的具体用法?Python Group.is_bias_connected怎么用?Python Group.is_bias_connected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在group.Group的用法示例。


在下文中一共展示了Group.is_bias_connected方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: find_special_groups

# 需要导入模块: from group import Group [as 别名]
# 或者: from group.Group import is_bias_connected [as 别名]
def find_special_groups(forceOptimizer, debug):
    new_groups = []
    new_level = 0
    for group in forceOptimizer.groups:
        if len(group.blocks):

            bias_blocks = []
            in_blocks = []

            for block in group.blocks:

                for pin in block.pins.values():
                    if pin.net.startswith("vbias"):

                        bias_blocks.append(block)
                        break
                    if pin.net.startswith("in"):
                        in_blocks.append(block)

            '''
            if len(bias_blocks) < len(group.blocks) and len(bias_blocks):
                new_group_id = group.group_id[:]
                new_group_id.append(len(group.childs))

                new_group = Group(new_group_id)
                if new_group not in new_groups:
                    new_level = len(new_group_id)
                    new_groups.append(new_group)
                    new_group.parent = group
                    group.childs.append(new_group)
                    new_group.is_bias_connected = True

                    for block in bias_blocks:
                        block.groups = new_group_id
                        group.blocks.remove(block)
                        new_group.blocks.add(block)

            if len(in_blocks) and len(in_blocks)< len(group.blocks):
                new_group_id = group.group_id[:]
                new_group_id.append(len(group.childs))

                new_group = Group(new_group_id)
                if new_group not in new_groups:
                    new_level = len(new_group_id)
                    new_groups.append(new_group)
                    new_group.parent = group
                    group.childs.append(new_group)

                    for block in in_blocks:
                        block.groups = new_group_id
                        group.blocks.remove(block)
                        new_group.blocks.add(block)
            '''
            if len(bias_blocks) < len(group.blocks) and len(bias_blocks):
                new_group_id = group.parent.group_id[:]
                new_group_id.append(len(group.parent.childs))

                new_group = Group(new_group_id)
                if new_group not in new_groups:
                    new_groups.append(new_group)
                    new_group.parent = group.parent
                    group.parent.childs.append(new_group)
                    new_group.is_bias_connected = True

                    for block in bias_blocks:
                        block.groups = new_group_id
                        group.blocks.remove(block)
                        new_group.blocks.add(block)

            if len(in_blocks) and len(in_blocks)< len(group.blocks):
                new_group_id = group.parent.group_id[:]
                new_group_id.append(len(group.parent.childs))

                new_group = Group(new_group_id)
                if new_group not in new_groups:
                    new_groups.append(new_group)
                    new_group.parent = group.parent
                    group.parent.childs.append(new_group)
                    new_group.is_bias_connected = True

                    for block in in_blocks:
                        block.groups = new_group_id
                        group.blocks.remove(block)
                        new_group.blocks.add(block)

    if new_level:
        for group in forceOptimizer.groups:
            if len(group.group_id) == new_level - 1:





                if len(group.blocks):

                    new_group_id = group.group_id[:]
                    new_group_id.append(len(group.childs))
                    new_group = Group(new_group_id)

                    if new_group not in new_groups:
#.........这里部分代码省略.........
开发者ID:daringer,项目名称:schemmaker,代码行数:103,代码来源:build_step.py


注:本文中的group.Group.is_bias_connected方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。