Spyglass:在batch/shell模式下运行目标的顶层是什么?

相关阅读

Spyglasshttps://blog.csdn.net/weixin_45791458/category_12828934.html?spm=1001.2014.3001.5482


除了可以在图形用户界面(GUI)中运行目标外,使用Batch模式或Shell模式也可以运行目标,如下面的命令所示。

复制代码
% spyglass -project test.prj -batch -goal lint/lint_rtl

但是有一点确是不明确的,尽管运行的目标是明确的,但这个目标属于哪个顶层模块,也就是以什么模块作为顶层模块?首先来看下面的项目文件中的节选。

复制代码
##Goal Setup Section
current_methodology $SPYGLASS_HOME/GuideWare/latest/block/rtl_handoff

current_goal lint/lint_rtl -alltop
set_parameter check_parameter no

current_goal lint/lint_rtl -top comparator
set_parameter check_parameter yes

可以看到,两条set_parameter命令分别设置了同一个目标的参数,但它们属于不同的顶层模块,-alltop选项表示将以Spyglass自动识别未被例化过的模块作为顶层模块,而-top选项则显式指定了一个顶层模块。

它们是不一样的,观察执行current_goal命令时的终端输出可以发现区别,如下所示。

复制代码
current_goal lint/lint_rtl -alltop
输出:current_goal: info: loading goal `lint/lint_rtl' (in progress)

current_goal lint/lint_rtl -top comparator
输出:current_goal: info: loading goal `lint/lint_rtl' with top `comparator' (in progress)

通过目标运行后结果报告的保存位置也可以发现区别,如下所示。

复制代码
current_goal lint/lint_rtl -alltop
报告保存位置:<project-working-directory>/<project-name>/lint/lint_rtl/spyglass_reports

current_goal lint/lint_rtl -top comparator
报告保存位置:<project-working-directory>/<project-name>/comparator/lint/lint_rtl/spyglass_reports

既然如此,那它们的参数设置也是独立的,对于属于alltop的目标来说check_parameter选项被设置为了no,而对于属于comparator模块的目标来说check_parameter参数被设置为了yes。

那么最开始的命令,究竟是运行了哪个目标?这取决于项目文件中是否使用set_option top命令进行了设置,下面给出了几种情况并对其进行分析。

情况一

复制代码
##Common Options Section

##Goal Setup Section
current_methodology $SPYGLASS_HOME/GuideWare/latest/block/rtl_handoff

current_goal lint/lint_rtl -alltop
set_parameter check_parameter no

current_goal lint/lint_rtl -top comparator
set_parameter check_parameter yes

在情况一中,没有使用set_option top命令进行设置,在这种情况下,属于alltop的目标被运行,该目标的check_parameter参数为no。

情况二

复制代码
##Common Options Section
set_option top comparator

##Goal Setup Section
current_methodology $SPYGLASS_HOME/GuideWare/latest/block/rtl_handoff

current_goal lint/lint_rtl -alltop
set_parameter check_parameter no

current_goal lint/lint_rtl -top comparator
set_parameter check_parameter yes

在情况二中,使用了set_option top命令进行设置,在这种情况下,属于comparator模块的目标被运行,该目标的check_parameter参数为yes。

情况三

复制代码
##Common Options Section
set_option top comparator

##Goal Setup Section
current_methodology $SPYGLASS_HOME/GuideWare/latest/block/rtl_handoff

current_goal lint/lint_rtl -alltop
set_parameter check_parameter no

current_goal lint/lint_rtl
set_parameter check_parameter yes

在情况三中,使用了set_option top命令进行设置,在这种情况下,属于comparator模块的目标被运行,但是第二条current_goal命令没有指定-alltop选项或-top选项,在这种情况下,默认使用-top选项并使用set_option top命令设置的模块作为顶层模块,因此该目标的check_parameter参数为yes。

情况四

复制代码
##Common Options Section

##Goal Setup Section
current_methodology $SPYGLASS_HOME/GuideWare/latest/block/rtl_handoff

current_goal lint/lint_rtl
set_parameter check_parameter no

current_goal lint/lint_rtl -top comparator
set_parameter check_parameter yes

在情况四中,没有使用set_option top命令进行设置,在这种情况下,属于alltop的目标被运行,但是第一条current_goal命令没有指定-alltop选项或-top选项,在这种情况下,默认使用-alltop选项,因此该目标的check_parameter参数为no。

相关推荐
美好的事情总会发生21 小时前
高速PCB设计中圆弧布线是否必要
嵌入式硬件·硬件工程·智能硬件
Moonnnn.4 天前
2023年电赛C题——电感电容测量装置
笔记·学习·硬件工程
赛卡4 天前
基于 AUTOSAR 的域控产品软件开发:从 CP 到 AP 的跨越
嵌入式硬件·车载系统·c#·自动驾驶·硬件工程·智能硬件
三块石头1014 天前
终结电源反接与压降损耗:理想二极管控制器深度解析
车载系统·硬件架构·硬件工程
项目管理打工人5 天前
高端装备制造企业如何选择适配的项目管理系统提升项目执行效率?附选型案例
大数据·人工智能·驱动开发·科技·硬件工程·团队开发·制造
逼子格6 天前
硬件工程师笔记——运算放大电路Multisim电路仿真实验汇总
笔记·嵌入式硬件·硬件工程·硬件工程师·滤波器·硬件工程师真题·multisim电路仿真
猫头虎9 天前
什么是 WPF 技术?什么是 WPF 样式?下载、安装、配置、基本语法简介教程
驱动开发·fpga开发·硬件架构·wpf·硬件工程·dsp开发·材料工程
XINVRY-FPGA11 天前
XC7A200T-2FFG1156I FPGA AMD Xilinx Artix-7
5g·ai·fpga开发·云计算·硬件工程·fpga
小幽余生不加糖11 天前
2025深圳国际无人机展深度解析:看点、厂商与创新亮点
笔记·学习·硬件工程·无人机
hfdz_004211 天前
PID简单项目-PCB设计
硬件工程·pcb设计·pcb工艺·altium designer