相关阅读Design Compilerhttps://blog.csdn.net/weixin_45791458/category_12738116.html?spm1001.2014.3001.5482目录read_file命令读取参数化设计举例说明等价表示写在最后Design Compiler可以使用read_file读取RTL设计不建议建议使用analyze/elaborate命令本文将对此进行详细阐述。read_file命令使用read_file命令不同于analyze/elaborate命令默认不会产生中间文件(.syn、.pvl、.mr文件)而是直接将设计读取进内存。read_file -format verilog/sverilog/vhdl **以下是支持的RTL格式Verilog源代码格式以及gzip压缩格式SystemVerilog源代码格式以及gzip压缩格式VHDL源代码格式以及gzip压缩格式虽然推荐始终使用-format选项指定格式但如果未指定该选项则会尝试根据文件扩展名自动推断格式以下是支持的RTL文件拓展名不区分大小写Verilog拓展名.v、.verilog、.v.gz、.verilog.gzSystemVerilog拓展名.sv、.sverilog、.sv.gz、.sverilog.gzVHDL拓展名.vhd、.vhdl、.vhd.gz、.vhdl.gz如果文件扩展名不属于已知类型工具会默认使用ddc格式。需要注意的是ddc文件压缩后不支持使用read_file命令读取因为这种文件已经是压缩格式了。尽管read_file命令会执行隐式链接隐式链接会在读取类命令、综合类命令、报告类命令、约束类命令等大部分命令时执行强烈建议在使用读取命令后执行link命令因为如果设计存在链接问题显式执行link命令可以帮助设计者发现并修正这些问题笔者发现隐式链接在某些情况下并不会按照link_path的从左到右的顺序进行链接而是优先使用最先读取的设计进行链接。link命令将会搜索link_path以及search_path并尝试解析引用最后尝试在默认设计库WORK中解析引用。关于默认设计库参考下面这篇博客。Design Compiler使用analyze/elaborate命令读取RTL设计https://blog.csdn.net/weixin_45791458/article/details/144949582?sharetypeblogdetailsharerId144949582sharereferPCsharesourceweixin_45791458spm1011.2480.3001.8118关于link_path以及search_path的详细信息参考下面这篇博客。Design Compiler目标(target)库、链接(link)库、符号(symbol)库、综合(synthetic)库和物理(physical)库的详细解析https://blog.csdn.net/weixin_45791458/article/details/143029536?ops_request_misc%257B%2522request%255Fid%2522%253A%2522502d65d2eef7fed72c9e2e11697448a3%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257Drequest_id502d65d2eef7fed72c9e2e11697448a3biz_id0utm_mediumdistribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-3-143029536-null-null.nonecaseutm_termlinkspm1018.2226.3001.4450读取参数化设计当使用read_file命令读取参数化设计时可能会出现问题如下例所示。// 文件adder.v module adder #( parameter WIDTH 8 )( input wire [WIDTH-1:0] a, input wire [WIDTH-1:0] b, output wire [WIDTH-1:0] sum ); assign sum a b; endmodule // 文件top.v module top ( input wire [7:0] a8, b8, input wire [15:0] a16, b16, input wire [3:0] a4, b4, output wire [7:0] sum8, output wire [15:0] sum16, output wire [3:0] sum4 ); adder #(.WIDTH(8)) u_adder8 ( .a(a8), .b(b8), .sum(sum8) ); adder #(.WIDTH(16)) u_adder16 ( .a(a16), .b(b16), .sum(sum16) ); adder #(.WIDTH(4)) u_adder4 ( .a(a4), .b(b4), .sum(sum4) ); endmodule首先使用read_file命令读取设计文件。dc_shell read_file -format verilog top.v adder.v当使用link命令尝试链接时却出现了错误如下所示。dc_shell link Linking design top Using the following designs and libraries: -------------------------------------------------------------------------- Information: Building the design adder instantiated from design top with the parameters WIDTH16. (HDL-193) Warning: Cannot find the design adder in the library WORK. (LBR-1) Information: Building the design adder instantiated from design top with the parameters WIDTH4. (HDL-193) Warning: Cannot find the design adder in the library WORK. (LBR-1) Warning: Unable to resolve reference adder in top. (LINK-5)警告显示除了默认的WIDTH参数为8的情况另外两个设计尝试在默认设计库WORK中读取失败了。这是因为读取参数化设计时需要中间文件而read_file命令默认不产生中间文件使用analyze/elaborate命令读取时不存在该问题需要将hdlin_auto_save_templates变量默认值为false设置为true允许保存中间文件。dc_shell set_app_var hdlin_auto_save_templates true举例说明下面是三个分属于三个文件的模块其中顶层模块top定义在top.v文件中其中例化了adder模块而adder模块定义在ADDER.v和adder.v文件中。// 文件adder.v module adder( input wire [7:0] a, input wire [7:0] b, output wire [7:0] sum ); assign sum a * b; endmodule // 文件ADDER.v module adder( input wire [7:0] a, input wire [7:0] b, output wire [7:0] sum ); assign sum a b; endmodule // 文件top.v module top( input wire [7:0] in_a, input wire [7:0] in_b, output wire [7:0] out_sum ); adder u_adder ( .a(in_a), .b(in_b), .sum(out_sum) ); endmodule假设已经将ADDER.v保存为ADDER.ddc文件并且在link_library中指定了该文件而adder模块来自adder.v文件在默认设计库WORK中read_file命令读取top模块后会优先使用该.ddc文件而不是设计库中的adder模块来自adder.v文件如下脚本所示。define_design_lib -path ./work/ WORK analyze -format verilog adder.v set_app_var link_library ADDER.ddc read_file -format verilog top.v // 使用ADDER.ddc而不是WORK库中的adder.vread_file不仅能读取RTL设计还可以读取Verilog网表。当指定-netlist选项时Design Compiler将启动网表读取器并出现以下提示如果此时指定文件中包含高级Verilog结构则会报错*** Verilog netlist reader terminated with 1 errors. ***。Running DC verilog reader Performing read command. Verilog netlist reader completed successfully.当指定-rtl选项时Design Compiler将启动RTL读取器即HDL Compiler并出现以下提示即使指定文件中有网表也不会报错。Running PRESTO HDLC Presto compilation completed successfully.如果不指定这两个选项Design Compiler将对文件内容进行自动检测和读取并出现以下提示。Detecting input file type automatically (-rtl or -netlist). Running DC verilog reader Performing read command. Verilog netlist reader completed successfully. Detecting input file type automatically (-rtl or -netlist). Reading with Presto HDL Compiler (equivalent to -rtl option). Running PRESTO HDLC Presto compilation completed successfully.等价表示read_file -format verilog命令相当于read_verilog命令read_file -format sverilog命令相当于read_sverilog命令read_file -format vhdl命令相当于read_vhdl命令read_file -format ddc命令相当于read_ddc命令read_file -format db命令相当于read_db命令。需要注意的是对于Fusion Compiler或IC Compiler II而言read_verilog命令只能用于读取Verilog网表而不能包含任何高级Verilog结构如always块对于PrimeTime而言read_verilog命令提供了-hdl_compiler选项用于调用HDL Compiler读取RTL设计。写在最后不建议使用read_file命令以及其等价表示读取RTL设计.ddc格式的设计和网表除外使用analyze/elaborate命令读取RTL设计更稳妥功能也更加强大。Design Compiler使用analyze/elaborate命令读取RTL设计https://blog.csdn.net/weixin_45791458/article/details/144949582?ops_request_misc%257B%2522request%255Fid%2522%253A%2522c5dbc40c5cdd020929332522dc608988%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257Drequest_idc5dbc40c5cdd020929332522dc608988biz_id0utm_mediumdistribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-4-144949582-null-null.nonecaseutm_termDesignspm1018.2226.3001.4450
企业数字化 ERP 产品动态
相关推荐
中科曙光服务器培训全解析:从硬件选型到系统部署与排障 /* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views … · 2026/9/24 14:00:45
Unity引擎底层揭秘:mono_add_internal_call如何打通C#与C++ 一次很普通的反编译。 你想看看 Transform.position 到底怎么实现的,用 dnSpy 打开 UnityEngine.CoreModule.dll: public Vector3 position
{get{get_position_Injected(out Vector3 result);return result · 2026/9/24 14:00:39
Python | PyCharm一键无脑安装 /* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views … · 2026/9/24 14:00:39
SDR++ 软件定义无线电实战手册:从一根 SDR 棒到第一路 FM 广播 SDR 软件定义无线电实战手册:从一根 SDR 棒到第一路 FM 广播 【免费下载链接】SDRPlusPlus Cross-Platform SDR Software 项目地址: https://gitcode.com/GitHub_Trending/sd/SDRPlusPlus
如果你一直想在电脑里调出 FM 电台,亲眼看信号强度在瀑布… · 2026/9/24 14:28:16
React Native Debugger 快速上手:安装、连接调试器与 Redux DevTools 实战指南 开发工具移动开发桌面应用 【免费下载链接】react-native-debugger The standalone app based on official debugger of React Native, and includes React Inspector / Redux DevTools 项目地址: https://gitcode.com/gh_mirrors/re/react-native-debugger 点击查看… · 2026/9/24 14:28:16
我是标题哈哈 今天星期无哈哈 · 2026/9/24 14:28:10
基于YOLOv8的渔船作业监控系统:从环境搭建到边缘部署全流程 简介:这是一套面向计算机、人工智能、自动化等专业学生与教师的毕业设计级项目资源,围绕YOLOv8实现渔船作业监控系统,可用于毕设、课程设计、大作业或项目立项演示。压缩包共97个文件,约24.21MB,以70个Python源码文件为… · 2026/9/24 0:00:13
1D-CNN时间序列建模实战:从Conv1d原理到工业落地 简介:面向时间序列数据建模的一维卷积神经网络完整实现,适合深度学习入门者及需要快速验证时序模型的研究者,能够从音频、文本、传感器或股价等序列中挖掘局部特征与时间依赖。压缩包体积很小,只有3KB,内含3个Python脚… · 2026/9/24 0:00:26
柔软的L:汉语语流中被忽视的舌肌张力控制 1. 这个“L”不是字母表里的L,而是舌尖上的L最近在几个方言群和语音教学社群里,反复看到有人发一句:“也说字母L:柔软的长舌”。初看以为是英语发音课笔记,点开才发现全是方言爱好者、播音系学生、语言康复师甚至戏曲演… · 2026/9/24 0:00:44