DC基础学习(五)Verilog语言结构到门级的映射1

本文介绍了Design Compiler工具将Verilog语言结构综合为门级网表的过程,重点讲解了always、if和case语句的综合,并通过实例分析了如何避免产生Locks,提高电路性能。强调了编写综合友好型Verilog代码的原则。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

    Design Compiler(以下简称DC)是Synopsys公司用于做电路综合的核心工具,可以将HDL描述的电路转换为基于工艺库的门级网表。本系列主要介绍综合相关的知识以及DC工具的使用。


 

    Verilog编码效率的高低是综合后电路性能高低的决定性因素,两种不同风格的编码,即使它们所表达的逻辑功能一下,也会产生出大不一样的综合结果。就算综合工具运用的再好,也不能完全依赖它把一段编码很差的代码综合出一个像样的电路来。本节将通过大量的实例介绍综合时Verilog的各种语言结构(always、if、case、loop等等)到门级的映射。这些语言结构是在编写Verilog代码的时候经常用到的一些基本结构,希望通过分析他们与门级网表之间的对应关系,大家能够对什么样的语句能生成什么样的具体电路有个初步的认识。

    编写用于综合的HDL代码的三个原则:

①编写代码的时候注意代码综合后大概的硬件结构,不写不可综合的语句;

②编写代码的时候注意多用同步逻辑,并将异步和同步逻辑分开处理;

③编写代码的时候注意代码的抽象层次,多用RTL级的描述。

 

1、always语句的综合

    always语句用来描述电路的过程行为(procedural behavior), 表示当事件列表中的状态发生变化时,执行语句体中的语句。下面是一个包含过程赋值的always语句的例子。

图片

    电路综合后的网表如下图所示:

图片

    使用always语句描述组合电路要注意的是:在该语句中读入的所有变量都需要出现在事件列表中(对Verilog语言而言是指”@”符号之后的信号),否则可能会得不到用户期望的结果。

 

 

2、If语句的综合

    if 语句用于描述受条件控制的电路,下面是一个例子:

iscas2spice spice netlist generation tool -- version 2.2 by Jingye Xu @ VLSI Group, Dept. of ECE, UIC, June, 2008 This tool reads the ISCAS85 benchmark circuit "*.bench" file and translate the file into SPICE netlist using the given technology and the standard cell library. platform: linux x86 sytem Input: ISCAS85 benchmark circuit: *.bench; standard cell library: stdcells.sclb; standard cell models: stdcells.lib; interconnect paramaters: *.int; Output: SPICE netlist: out.sp The whole procedure of the tools can be divided into several steps: 1. Gate replacement: replace the gates that can't be found in the with the gates in the standard cell lib. (break.pl) Output: *.bench, *.bench.bak 2. Generate the GSRC files: generate the GSRC files for the fengshui placer. (gsrcgen.pl) Output: gsrcfile/iscas.* 3. Placement: using the fengshui placement tool to perform the component placement. (fs50) Output: gsrcfile/iscas_fs50.pl 4. Generate ISPD file: tanslate the placement results into ISPD98 format file that can be used as the input of the global router. (gsrc2ispd.pl) Output: gsrcfile/iscas.laby.txt 5. Perform the routing: use the labyrinth global router to perform the routing. (mazeRoute) Output: gsrcfile/output 6. Generate the SPICE netlist: use all the available information to generate the final SPICE netlist. (spicegen.pl) Output: out.sp Usage: iscas2spice.pl Iscas85BenchmarkFile [-C/L/N] options: -C :default value, use the RC model for interconnect -L :use the RLC model for interconnect -N :treat interconnect as short circuit wire This package used the fengshui placement tools and labyrinth global routing tools, for information regarding these two free tools, please vist: http://www.ece.ucsb.edu/~kastner/labyrinth/ http://vlsicad.cs.binghamton.edu/software.html For information regarding this software itself please visit: http://wave.ece.uic.edu/~iscas2spice Many thanks to my advisor Masud H. Chowdhury for his support!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值