当前位置: 首页 > java >正文

SDC命令详解:使用get_nets命令进行查询

相关阅读

SDC命令详解https://blog.csdn.net/weixin_45791458/category_12931432.html?spm=1001.2014.3001.5482


        get_nets命令用于创建一个线网对象集合,关于设计对象和集合的更详细介绍,可以参考下面的博客。需要注意的是,在有些工具中还存在get_net命令,它们没有任何差别。

Synopsys:设计对象https://chenzhang.blog.csdn.net/article/details/147015140?spm=1001.2014.3001.5502        本文针对Design Compiler,但该命令同样存在于PrimeTime、IC Compiler等工具中,它们大致相同,略有差别。get_nets命令的BNF范式(有关BNF范式,可以参考以往文章)为:

get_nets[-quiet][-regexp | -exact][-nocase][-filter expression][-hierarchical][-top_net_of_hierarchical_group][-segments][-all][-boundary_type upper | lower | both][-rtl][patterns | -of_objects objects]

指定静默

        -quiet选项用于指定静默输出,如果尝试匹配的线网对象不存在,不会报错或警告(不过语法错误仍会报错),如例1所示。

// 例1
dc_shell> get_nets a
Warning: Can't find net 'a' in design 'top_module'. (UID-95)
dc_shell> get_nets -quiet a
dc_shell> 

指定使用正则表达式

        -regexp选项用于指定使用正则表达式,patterns参数将被视为正则表达式,而不是通配符模式串(默认),如例2所示。该选项还会修改-filter选项的expression过滤表达式中=~和!~的行为,使其使用正则表达式,而不是通配符模式串。

        需要注意的是,正则表达式默认是开头和结尾“锚定”的:即表达式被假定为从对象名称的开头开始匹配,并在对象名称的结尾结束匹配,可以通过在表达式的开头或结尾添加".*"来扩大匹配范围。

        -regexp选项和-exact选项是互斥的,只能使用其中一个。

// 例2
dc_shell> get_nets -regexp {in1}
{in1}
dc_shell> get_nets -regexp {in}
Warning: Can't find net 'in' in design 'top_module'. (UID-95)
dc_shell> get_nets -regexp {n1}
Warning: Can't find net 'n1' in design 'top_module'. (UID-95)
dc_shell> get_nets -regexp {.*n1}
{in1}
dc_shell> get_nets -regexp {in.*}
{in1 in2 in3}

指定精确匹配

        -exact选项用于指定精确匹配,patterns参数将不被视为正则表达式或通配符模式串(默认),如例3所示。该选项还会修改-filter选项的expression过滤表达式中=~和!~的行为,使其不被视为正则表达式或通配符模式串。

        -regexp选项和-exact选项是互斥的,只能使用其中一个。

// 例3
dc_shell> get_nets in*
{in1 in2 in3}
dc_shell> get_nets -exact in*
Warning: Can't find net 'in*' in design 'top_module'. (UID-95)

 

指定大小写不敏感

        -nocase选项用于指定patterns参数和-filter选项的expression过滤表达式中==、=~和!~不区分大小写,如例4所示。

// 例4
dc_shell> get_nets IN1
Warning: Can't find net 'IN1' in design 'top_module'. (UID-95)
dc_shell> get_nets -nocase IN1
{in1}

指定过滤

        -filter选项指定基于线网属性对得到的线网对象集合进行过滤,如例5所示。类似于filter_collection命令那样,可以使用==、!=、>、<、>=、<=、=~、!~构成布尔表达式,其中=~和!~支持在布尔表达式右端使用正则表达式或通配符。使用list_attributes -class net -application命令可以列出一个线网可以拥有的属性(Attribute)。

// 例5
dc_shell> set_ideal_net in1
1
dc_shell> get_nets -filter "ideal_net==true"
{in1}
dc_shell> get_nets -filter "ideal_net==false"
{in2 in3 out}

指定跨层次

        -hierarchical选项用于指定跨层次搜索,patterns参数应与层次线网的最后一级匹配且/不再被视为层次分隔符,如例6所示。此外,-hierarchical选项不能与-of_objects选项一起使用。

// 例6
dc_shell> get_nets
{in1 in2 in3 out}
dc_shell> get_nets -hierarchical
{in1 in2 in3 out u_middle/x1 u_middle/x2 u_middle/x3 u_middle/z u_middle/temp u_middle/u_leaf/a u_middle/u_leaf/b u_middle/u_leaf/y}
dc_shell> get_nets -hierarchical a
{u_middle/u_leaf/a}
dc_shell> get_nets -hierarchical z
{u_middle/z}

 

指定只保存线网组中的顶层线网

        线网组指的是一组直接连接的层次线网,以图1为例,其中的线网in1、u_middle/x1和u_middle/u_leaf/a属于一个线网组。-top_net_of_hierarchical_group选项指定,只在原始线网对象集合中保留一个线网组中最接近顶层的线网,如例7所示,如果这样的线网有多个,则优先保留字典序靠前的线网。

图1 线网组的概念

// 例7
dc_shell> get_nets "in1 u_middle/x1 u_middle/u_leaf/a"
{in1 u_middle/x1 u_middle/u_leaf/a}
dc_shell> get_nets -top_net_of_hierarchical_group "in1 u_middle/x1 u_middle/u_leaf/a"
{in1}
dc_shell> get_nets -top_net_of_hierarchical_group "u_middle/x1 u_middle/u_leaf/a"
{u_middle/x1}

指定将线网拓展为整个线网组

        -segments选项用于指定将原始线网对象集合拓展为其线网组,如例8所示。配合-top_net_of_hierarchical_group选项使用,可以根据一个线网找到其线网组的最接近顶层的线网。

// 例8
dc_shell> get_nets -segments "in1"
{in1 u_middle/u_leaf/a u_middle/x1}
dc_shell> get_nets -segments "u_middle/x1"
{u_middle/x1 u_middle/u_leaf/a in1}
dc_shell> get_nets -segments "u_middle/u_leaf/a"
{u_middle/u_leaf/a in1 u_middle/x1}
dc_shell> get_nets -segments -top_net_of_hierarchical_group "u_middle/u_leaf/a"
{in1}

指定包含电源线网、地线网和连接到常量的线网

        -all选项用于指定包含电源线网、地线网和连接到常量的线网。

指定线网的边界类型

        -boundary_type选项用于指定在获取连接到层次单元的引脚的线网时,选择哪一侧的线网,如例9所示。此选项只能与of_objects选项一起使用,且设计对象必须是层次引脚(Hierarchical Pin)或抽象块(Block Abstraction)的引脚。

        它的参数可以是upper(默认)、lower和both中的一个。upper表示选择层次单元外部的线网;lower表示选择层次单元内部的线网;both表示同时选择层次单元外部和内部的线网。

// 例9
dc_shell> get_nets -boundary_type upper -of_objects "u_middle/x1"
{in1}
dc_shell> get_nets -boundary_type lower -of_objects "u_middle/x1"
{u_middle/x1}
dc_shell> get_nets -boundary_type both -of_objects "u_middle/x1"
{u_middle/x1 in1}

指定包含object_rtl_name属性

        -rtl选项用于指定线网对象集合中的线网包含object_rtl_name属性。

指定patterns参数

        patterns参数用于指定一个字符串,根据-regexp选项和-exact选项的指定情况,作为正则表达式或通配符模式串或普通字符串。该字符串中可以包含层次分隔符/和通配符*与?,需要注意的是,通配符不能匹配层次分隔符/。

        patterns参数和-of_objects选项是互斥的,只能使用其中一个。如果没有使用这两个选项中的任何一个,则会以当前实例中的所有线网(如果使用-hierarchical选项,则包括层次线网)创建线网对象集合(即以*为默认patterns参数),关于当前实例的详细解释,参考下面的博客。

SDC命令详解:使用相对路径访问设计对象(current_instance命令)https://chenzhang.blog.csdn.net/article/details/147156354?spm=1001.2014.3001.5502

指定设计对象

        -of_objects选项用于指定设计对象,创建与这些设计对象相联系的线网对象集合。对象可以是引脚(Pin)、端口(Port)和单元(Cell),如例10所示。

        patterns参数和-of_objects选项是互斥的,只能使用其中一个。如果没有使用这两个选项中的任何一个,则会以当前实例中的所有线网(如果使用-hierarchical选项,则包括层次线网)创建线网对象集合(即以*为默认patterns参数)。此外,-hierarchical选项不能与-of_objects选项一起使用。

// 例10
dc_shell> get_nets -of_objects [get_ports in1]
{in1}
dc_shell> get_nets -of_objects [get_cells u_middle/u_leaf/C7]
{u_middle/u_leaf/a u_middle/u_leaf/b u_middle/u_leaf/y}
http://www.xdnf.cn/news/2986.html

相关文章:

  • windows如何使用cmd命令翻转屏幕
  • 多源数据整合与数据虚拟化:构建灵活、高效的数据架构
  • RPG2.设置角色摄像机
  • js day9
  • 按键精灵安卓ios辅助工具脚本:实用的文件插件(lua开源)
  • 解决ktransformers v0.3 docker镜像中 operator torchvision::nms does not exist 问题
  • Redis入门到实战——基础篇
  • JavaSE第12篇:接口interface
  • Shopify网上商店GraphQL Admin接口查询实战
  • keep-alive具体使用方法
  • 我心中的现代前端大厦
  • LabVIEW模板之温度监测应用
  • dx11 龙宝书 第五 六章 流水线
  • leetcode 2962. 统计最大元素出现至少 K 次的子数组 中等
  • 规范编码策略以及AST的应用的学习
  • 如何使用 Nacos 对 Python 服务进行服务发现与注册
  • 【Dify系列教程重置精品版】第三章:Dify平台的本地化部署
  • Idea 如何配合 grep console过滤并分析文件
  • 关于浏览器对于HTML实体编码,urlencode,Unicode解析
  • Janus-1B评测
  • vue 优化策略,大白话版本
  • 一页概览:统一数据保护方案
  • Discord多账号注册登录:如何同时管理多个账户?
  • 全球667629个流域90m分辨率数据(流域参数含:面积、长度、宽度、纵横比、坡度和高程等)
  • 借助Spring AI实现智能体代理模式:从理论到实践
  • 案例解析:基于量子计算的分子对接-QDOCK(Quantum Docking)
  • 2025年深圳软件开发公司推荐
  • Laravel+API 接口
  • Mybatis-plus代码生成器的创建使用与详细解释
  • 环境-疲劳载荷综合试验系统