Formality:黑盒(black box)
相关阅读Formalityhttps://blog.csdn.net/weixin_45791458/category_12841971.html?spm1001.2014.3001.5482简介在使用Formality时黑盒(black box)的概念很重要指的是一个其功能未知的设计。黑盒通常用于设计中不可综合的组件包括RAM、ROM、模拟电路和硬核IP等。它也是需要匹配的对象之一必须确保参考设计和实现设计之间存在一一对应的映射黑盒输入引脚被视为比较点而黑盒输出引脚被视为普通匹配点关于这两者的概念详见下面这篇博客。Formality匹配(match)是如何进行的https://chenzhang.blog.csdn.net/article/details/144404964哪些情况会产生黑盒只有端口定义而没有其他定义的设计或者说STUB模块例1所示的设计black_box只有端口定义因此被认为是黑盒设计这种黑盒拥有完整的引脚定义名字和方向。// 例1 module black_box ( input wire clk, input wire reset, input wire [7:0] data_in, output wire [7:0] data_out ); endmodule module top_module ( input wire clk, input wire reset, input wire [7:0] data_in, output wire [7:0] data_out ); black_box u_black_box ( .clk(clk), .reset(reset), .data_in(data_in), .data_out(data_out) ); endmodule下面是使用report_black_boxes命令进行报告的结果。Formality (setup) report_black_boxes ************************************************** Report : black_boxes Reference : r:/WORK/top_module Implementation : None Version : W-2024.09-SP2 Date : Thu Jan 30 22:59:54 2025 ************************************************** Information: Implementation design is not set. (FM-149) Information: Reporting black boxes for current reference design. (FM-184) ___________________________________________________ | | | Legend: | | Black Box Attributes | | s Set with set_black_box command | | i Module read with -interface_only | | u Unresolved design module | | e Empty design module | | * Unlinked design module | | ut Unread tech cells pins | | L Linked to non-black box design | | cp Cutpoint blackbox | | ir Internal rounded blackbox | | f Formality Power Model | | m Technology Macro cell (.db) | |___________________________________________________| ################################################################## #### DESIGN LIBRARY - r:/WORK ################################################################## Type Design Name ---- ---------- e black_box Instances : 1 of 1 ------------------------ r:/WORK/top_module/u_black_box功能信息不包含库文件(.db)中的设计以存储器为例Memory Compiler会生成含引脚和时序信息的.lib文件而经过Library Compiler编译后的.db文件中一般只含有一个存储器宏单元且不包含功能信息如下报告所示其中的b属性代表该宏单元没有功能信息。lc_shell report_lib ram4x32_max ram4x32 **************************************** Report : library Library: ram4x32_max Version: O-2018.06-SP1 Date : Mon Jan 27 23:04:54 2025 **************************************** Library Type : Technology Tool Created : W-2004.12 Date Created : .18-Dec-2001 Library Version : .1.0 Comments : Unit Area representation 6.0516 sq.micron Components: Attributes: af - active falling ah - active high al - active low ar - active rising b - black box (function unknown) Cell Footprint Attributes ------------------------------------------- ram4x32 ram4x32 b, d, mo, s, u例2所示的设计ram4x32是来自逻辑库的宏单元因此被认为是黑盒设计这种黑盒拥有完整的引脚定义名字和方向。// 例2 module ram4x32_top( input wire CE1, input wire CE2, input wire OEB1, input wire OEB2, input wire CSB1, input wire CSB2, input wire WEB1, input wire WEB2, input wire [4:0] A1, input wire [4:0] A2, input wire [3:0] I1, input wire [3:0] I2, output wire [3:0] O1, output wire [3:0] O2 ); ram4x32 U_ram4x32 ( .CE1(CE1), .CE2(CE2), .OEB1(OEB1), .OEB2(OEB2), .CSB1(CSB1), .CSB2(CSB2), .WEB1(WEB1), .WEB2(WEB2), .A1(A1), .A2(A2), .I1(I1), .I2(I2), .O1(O1), .O2(O2) ); endmodule下面是使用report_black_boxes命令进行报告的结果。Formality (setup) report_black_boxes ************************************************** Report : black_boxes Reference : r:/WORK/ram4x32_top Implementation : None Version : W-2024.09-SP2 Date : Thu Jan 30 22:55:14 2025 ************************************************** Information: Implementation design is not set. (FM-149) Information: Reporting black boxes for current reference design. (FM-184) ___________________________________________________ | | | Legend: | | Black Box Attributes | | s Set with set_black_box command | | i Module read with -interface_only | | u Unresolved design module | | e Empty design module | | * Unlinked design module | | ut Unread tech cells pins | | L Linked to non-black box design | | cp Cutpoint blackbox | | ir Internal rounded blackbox | | f Formality Power Model | | m Technology Macro cell (.db) | |___________________________________________________| ################################################################## #### TECH LIBRARY - r:/RAM4X32_MAX ################################################################## Type Design Name ---- ---------- m ram4x32 Instances : 1 of 1 ------------------------ r:/WORK/ram4x32_top/U_ram4x32变量hdlin_unresolved_modules定义为black_box时未解析的设计当设计的所有定义都缺失时默认情况下即变量hdlin_unresolved_modules定义为error时在使用set_top命令进行展开时会报错“Error: Unresolved references detected during link.”。如果将变量hdlin_unresolved_modules定义为black_box则会将所有未解析的设计当做黑盒设并提示“Warning: 1 blackbox designs were created for missing references.”。如果使用命名端口连接则该黑盒设计拥有引脚名字的定义而没有引脚方向的定义如例3所示。// 例3 module top_module ( input wire clk, input wire reset, input wire [7:0] data_in, output wire [7:0] data_out ); black_box u_black_box ( .clk(clk), .reset(reset), .data_in(data_in), .data_out(data_out) ); endmodule如果使用位置端口连接则该设计没有引脚名字和引脚方向的定义如例4所示。// 例4 module top_module ( input wire clk, input wire reset, input wire [7:0] data_in, output wire [7:0] data_out ); black_box u_black_box ( clk, reset, data_in, data_out, ); endmodule对于引脚名字未定义的情况Formality会使用默认的引脚名(p1、p2、p3...)对于引脚方向未定义的情况Formality会尝试根据连接关系和局部几何结构智能地、保守地猜测引脚方向并提示“Warning: 19 black-box pins of unknown direction found; see formality.log for list”。如果工具无法确定引脚方向它会假设该引脚是双向的这可能会导致多驱动线网。此外可以使用set_direction命令来显式定义引脚方向。下面是使用report_black_boxes命令进行报告的结果。Formality (setup) report_black_boxes ************************************************** Report : black_boxes Reference : r:/WORK/top_module Implementation : None Version : W-2024.09-SP2 Date : Thu Jan 30 23:02:29 2025 ************************************************** Information: Implementation design is not set. (FM-149) Information: Reporting black boxes for current reference design. (FM-184) ___________________________________________________ | | | Legend: | | Black Box Attributes | | s Set with set_black_box command | | i Module read with -interface_only | | u Unresolved design module | | e Empty design module | | * Unlinked design module | | ut Unread tech cells pins | | L Linked to non-black box design | | cp Cutpoint blackbox | | ir Internal rounded blackbox | | f Formality Power Model | | m Technology Macro cell (.db) | |___________________________________________________| ################################################################## #### TECH LIBRARY - r:/FM_BBOX ################################################################## Type Design Name ---- ---------- u black_box Instances : 1 of 1 ------------------------ r:/WORK/top_module/u_black_box使用变量hdlin_interface_only定义的设计在读取设计文件时变量hdlin_interface_only指定的设计将被当做黑盒设计这种黑盒拥有完整的引脚定义名字和方向如例5所示如果变量hdlin_interface_only设置时该设计已经读取但还未使用set_top命令进行展开其也会被当做黑盒设计但此时report_black_boxes命令的结果将不被标记为i而是e。// 例5 // 在使用set_top命令前设置变量hdlin_interface_only为black_box module black_box ( input wire clk, input wire reset, input wire [7:0] data_in, output reg [7:0] data_out ); always (posedge clk or posedge reset) begin if (reset) data_out 8b0; else data_out data_in; end endmodule module top_module ( input wire clk, input wire reset, input wire [7:0] data_in, output wire [7:0] data_out ); black_box u_black_box ( .clk(clk), .reset(reset), .data_in(data_in), .data_out(data_out) ); endmodule下面是使用report_black_boxes命令进行报告的结果。Formality (setup) report_black_boxes ************************************************** Report : black_boxes Reference : r:/WORK/top_module Implementation : None Version : W-2024.09-SP2 Date : Thu Jan 30 23:13:27 2025 ************************************************** Information: Implementation design is not set. (FM-149) Information: Reporting black boxes for current reference design. (FM-184) ___________________________________________________ | | | Legend: | | Black Box Attributes | | s Set with set_black_box command | | i Module read with -interface_only | | u Unresolved design module | | e Empty design module | | * Unlinked design module | | ut Unread tech cells pins | | L Linked to non-black box design | | cp Cutpoint blackbox | | ir Internal rounded blackbox | | f Formality Power Model | | m Technology Macro cell (.db) | |___________________________________________________| ################################################################## #### DESIGN LIBRARY - r:/WORK ################################################################## Type Design Name ---- ---------- i black_box Instances : 1 of 1 ------------------------ r:/WORK/top_module/u_black_box使用set_black_box命令指定的设计使用set_black_box命令可以将一个设计设置为黑盒设计无论此时是否已使用set_top命令进行展开这种黑盒拥有完整的引脚定义名字和方向如例6所示。// 例6 // 使用set_black_box命令设置black_box设计为黑盒 module black_box ( input wire clk, input wire reset, input wire [7:0] data_in, output reg [7:0] data_out ); always (posedge clk or posedge reset) begin if (reset) data_out 8b0; else data_out data_in; end endmodule module top_module ( input wire clk, input wire reset, input wire [7:0] data_in, output wire [7:0] data_out ); black_box u_black_box ( .clk(clk), .reset(reset), .data_in(data_in), .data_out(data_out) ); endmodule下面是使用report_black_boxes命令进行报告的结果。Formality (setup) report_black_boxes ************************************************** Report : black_boxes Reference : r:/WORK/top_module Implementation : None Version : W-2024.09-SP2 Date : Thu Jan 30 23:20:41 2025 ************************************************** Information: Implementation design is not set. (FM-149) Information: Reporting black boxes for current reference design. (FM-184) ___________________________________________________ | | | Legend: | | Black Box Attributes | | s Set with set_black_box command | | i Module read with -interface_only | | u Unresolved design module | | e Empty design module | | * Unlinked design module | | ut Unread tech cells pins | | L Linked to non-black box design | | cp Cutpoint blackbox | | ir Internal rounded blackbox | | f Formality Power Model | | m Technology Macro cell (.db) | |___________________________________________________| ################################################################## #### DESIGN LIBRARY - r:/WORK ################################################################## Type Design Name ---- ---------- s black_box Instances : 1 of 1 ------------------------ r:/WORK/top_module/u_black_box使用create_cutpoint_blackbox命令创建的设计// 例7 // 使用create_cutpoint_blackbox命令创建cut-point黑盒 // create_cutpoint_blackbox cut_blackbox [get_pins r:/WORK/top_module/u_black_box/data_in[6]] module black_box ( input wire clk, input wire reset, input wire [7:0] data_in, output reg [7:0] data_out ); always (posedge clk or posedge reset) begin if (reset) data_out 8b0; else data_out data_in; end endmodule module top_module ( input wire clk, input wire reset, input wire [7:0] data_in, output wire [7:0] data_out ); black_box u_black_box ( .clk(clk), .reset(reset), .data_in(data_in), .data_out(data_out) ); endmodule下面是使用report_black_boxes命令进行报告的结果。Formality (setup) report_black_boxes ************************************************** Report : black_boxes Reference : r:/WORK/top_module Implementation : None Version : W-2024.09-SP2 Date : Thu Jan 30 23:20:41 2025 ************************************************** Information: Implementation design is not set. (FM-149) Information: Reporting black boxes for current reference design. (FM-184) ___________________________________________________ | | | Legend: | | Black Box Attributes | | s Set with set_black_box command | | i Module read with -interface_only | | u Unresolved design module | | e Empty design module | | * Unlinked design module | | ut Unread tech cells pins | | L Linked to non-black box design | | cp Cutpoint blackbox | | ir Internal rounded blackbox | | f Formality Power Model | | m Technology Macro cell (.db) | |___________________________________________________| ################################################################## #### DESIGN LIBRARY - r:/WORK ################################################################## Type Design Name ---- ---------- cp black_box Instances : 1 of 1 ------------------------ r:/WORK/top_module/cut_blackbox使用create_power_model命令创建的设计

相关新闻

OpenClaw浏览器自动化卡死与数据提取失败排查指南

OpenClaw浏览器自动化卡死与数据提取失败排查指南

1. 项目概述:当OpenClaw“罢工”时如果你正在用OpenClaw做浏览器自动化,比如自动抓取商品信息、批量填写表单,或者模拟客服对话,那么最让人头疼的瞬间,莫过于脚本运行到一半突然卡住不动,或者明明页面元素就…

2026/10/7 6:19:21 阅读更多 →
Simple USB Terminal高级应用:如何利用前台服务实现后台数据缓冲

Simple USB Terminal高级应用:如何利用前台服务实现后台数据缓冲

Simple USB Terminal高级应用:如何利用前台服务实现后台数据缓冲 【免费下载链接】SimpleUsbTerminal Android terminal app for devices with a serial / UART interface connected with a USB-to-serial-converter 项目地址: https://gitcode.com/gh_mirrors/si…

2026/9/26 5:46:21 阅读更多 →
如何使用PESecurity快速检测EXE/DLL安全属性?5分钟上手教程

如何使用PESecurity快速检测EXE/DLL安全属性?5分钟上手教程

如何使用PESecurity快速检测EXE/DLL安全属性?5分钟上手教程 【免费下载链接】PESecurity PowerShell module to check if a Windows binary (EXE/DLL) has been compiled with ASLR, DEP, SafeSEH, StrongNaming, and Authenticode. 项目地址: https://gitcode.co…

2026/10/8 2:04:11 阅读更多 →

最新新闻

未来五年财务人必须掌握的两大核心能力:数据分析与业财融合

未来五年财务人必须掌握的两大核心能力:数据分析与业财融合

财务行业的游戏规则,正在以很多人没有察觉的速度发生变化。我身边不少做财务的朋友,去年还在讨论 Excel 函数怎么写得再快一点、合并报表怎么对平,今年已经开始焦虑一件事:如果核算工作被系统替代,自己还能做什么&…

2026/10/14 4:48:57 阅读更多 →
基于Python和LSTM的股票预测系统设计与毕设实现全解析

基于Python和LSTM的股票预测系统设计与毕设实现全解析

做了几年毕业设计指导,也带过不少学生从开题一路走到答辩现场。要说计算机毕设里最经典也最“容易上手但做精难”的题目,基于Python的股票预测软件绝对排得上号。这个标题一眼看穿了三件事:大数据背景、深度学习建模、软件工程实现。也就是说…

2026/10/14 4:48:57 阅读更多 →
AI运维落地实践:异常检测、告警收敛与根因定位指南

AI运维落地实践:异常检测、告警收敛与根因定位指南

简介:《人工智能在运维中的实践》聚焦金融行业智能运维转型,系统梳理了从纯人力运维、自动化运维、脚本化运维到智能化运维(AIOps)的演进路径,面向运维工程师、架构师、技术管理者及对智能运维感兴趣的决策者。资源包内…

2026/10/14 4:48:57 阅读更多 →
终端安全管理系统白皮书解读:三层架构部署与策略下发链路实战

终端安全管理系统白皮书解读:三层架构部署与策略下发链路实战

简介:这份资源是奇安信天擎终端安全管理系统V10.2.0.1200的产品白皮书公开版,面向企业IT运维、安全管理员及终端安全方案选型人员,用于系统了解该企业级终端防护平台的功能架构与部署思路。白皮书围绕实时监控、威胁检测、防护策略制定、安全…

2026/10/14 4:48:57 阅读更多 →
JAR包反编译实战:从字节码到Java源码的工具与避坑指南

JAR包反编译实战:从字节码到Java源码的工具与避坑指南

搞Java开发的人,几乎都遇到过这种情况:接手一个老项目,源码丢了,或者要排查某个依赖JAR里的逻辑问题,只给你一个编译好的class文件,硬着头皮看字节码。这时候,JAR包反编译就是必须掌握的技能。我…

2026/10/14 4:48:57 阅读更多 →
构建数学解题Agent:从LLM局限到工具调用与验证优先架构

构建数学解题Agent:从LLM局限到工具调用与验证优先架构

1. 从“让模型直接做数学”到“让模型组织数学”写这篇的时候,我翻了下前面三篇的留言,发现问得最多的不是某一个具体提示词怎么写,而是一类带着困惑的问题:为什么我让大模型算个积分、解个方程,它经常一本正经地给我一…

2026/10/14 4:47:57 阅读更多 →

日新闻

AnyPS5通用适配层设计:兼容性与性能的工程取舍

AnyPS5通用适配层设计:兼容性与性能的工程取舍

1. 从"AnyPS5"这个名字说起:它到底想解决什么问题第一次看到"AnyPS5"这个标题,我脑子里冒出来的第一个念头是:这大概率是一个围绕"跨平台运行"或者"通用适配"做文章的项目。名字里的"Any"…

2026/10/14 0:00:41 阅读更多 →
Flutter跨平台开发实战:二手交易应用与HarmonyOS适配

Flutter跨平台开发实战:二手交易应用与HarmonyOS适配

1. 项目概述:Flutter跨平台二手交易应用开发作为一名长期从事移动应用开发的工程师,我最近完成了一个基于Flutter框架的二手物品交易平台项目。这个项目最吸引我的地方在于它完美结合了Flutter的跨平台优势与HarmonyOS的生态特性,实现了"…

2026/10/14 0:00:41 阅读更多 →
DFS算法解决飞机降落调度问题实战

DFS算法解决飞机降落调度问题实战

1. 项目背景与核心思路飞机降落问题是一个经典的调度优化场景,也是算法竞赛和面试中的高频题目。这个题目要求我们合理安排多架飞机的降落顺序和时间,确保所有飞机都能安全着陆而不发生冲突。在实际航空管制中,这类问题直接关系到飞行安全和机…

2026/10/14 0:00:41 阅读更多 →

周新闻

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

简介:基于 ARIMA、LSTM、Transformer 等模型的流感时间序列预测 Python 源码,面向计算机相关专业课程设计与期末大作业学生,以及项目实战学习者。内容覆盖预处理、平稳性检验、定阶、残差分析、多模型对比预测的完整时序建模流程,…

2026/10/14 3:30:28 阅读更多 →
影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别 做影刀RPA自动化,十个新手有八个栽在"往输入框里填东西"这件事上:要么填不进去,要么填了一半,要么直接把原来内容追加在后面。这背后的根因&…

2026/10/13 16:22:04 阅读更多 →
影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容 1. 认识影刀:什么场景该用RPA采小说数据 起点中文网的页面结构相对稳定——分类榜单、书籍详情、章节内容三块独立页面,跳转链路清晰。这种场景非常适合影刀自动化&#x…

2026/10/14 3:29:58 阅读更多 →

月新闻

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/13 22:01:27 阅读更多 →
Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/13 14:57:39 阅读更多 →
黑夜航拍船只数据集训练YOLOV5模型全流程解析

黑夜航拍船只数据集训练YOLOV5模型全流程解析

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/12 18:11:17 阅读更多 →