北理工数集实验报告(共27页)_第1页
北理工数集实验报告(共27页)_第2页
北理工数集实验报告(共27页)_第3页
北理工数集实验报告(共27页)_第4页
北理工数集实验报告(共27页)_第5页
已阅读5页,还剩24页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、精选优质文档-倾情为你奉上本科实验报告实验名称: 数字集成电路实验 课程名称:数字集成电路设计实验时间:任课教师:实验地点:实验教师:实验类型: 原理验证 综合设计 自主创新学生姓名:学号/班级:组 号:学 院:信息与电子学院同组搭档:无专 业:成 绩:实验1门级电路的设计仿真一、实验内容在CMOS工艺下,利用Virtuoso工具设计非门、两输入、四输入的与非门和或非门,并对其性能进行仿真和分析。二、实验目的深入理解与非门、或非门、非门特性,掌握与非门、或非门、非门的设计方法和性能分析方法。三、实验要求设计符合下列要求的反相器,两输入的与非门、或非门,四输入的与非门和或非门。技术指标要求:负载

2、电容为5pF,信号高电平为VDD(1.8V),低电平为GND(0V)。输入信号的上升时间、下降时间均为200ps,门电路时延<1ns。四、实验结果1.两输入与非门1.1两输入与非门的电路图1.2MOS管子参数表PM0PM1NM0NM1w100u100u100u100ul180n180n180n180n1.3仿真结果及延时1.4改变nmos管和pmos管宽度的扫描仿真简单的设PMOS和NMOS的宽度为l,在不改变MOS管沟道长度的情况下,对MOS管的宽度进行扫描。参数l从1u到100u,步进频率为5u进行扫描,并对扫描出的宽度和延迟的曲线进行分析。其中,延迟曲线来源于上1.3仿真中的t1-

3、1、t1-2。1.4.1扫描仿真结果1.4.2扫描结果分析从上图1中可以看出,随着管子宽度的增加,与非门的延时在减少。这是因为增加管子的尺寸可以增加管子的驱动能力,减小开启电阻,而逻辑门的延时与开启电阻一般是成正比的,所以可以通过增加管子尺寸来减小延时。但是这样做也会使逻辑门本身的电容增大,增加上一级的负载,而且本身电容增加,会使输入信号与输出信号产生耦合效应,影响输出电压。从上图2延迟曲线,可以看出,同样的管子宽度,t1-1比t1-2的延迟大。故对t1-1取点,使其延迟恰好等于要求的最大延迟1ns,可读出此时的管子宽度为14.15u。可近似得出结论,管子宽度大于15u时,可保证延迟小于1ns

4、。2.两输入或非门2.1两输入或非门的电路图2.2MOS管子参数表PM0PM1NM0NM1W100u100u100u100uL180n180n180n180n2.3仿真结果及延时2.4改变nmos管和pmos管宽度的扫描仿真简单的设PMOS和NMOS的宽度为l,在不改变MOS管沟道长度的情况下,对MOS管的宽度进行扫描。参数l从1u到100u,步进频率为5u进行扫描,并对扫描出的宽度和延迟的曲线进行分析。其中,延迟曲线来源于上2.3仿真中的t2-1、t2-2。2.4.1扫描仿真结果2.4.2扫描结果分析管子宽度对门电路延迟的影响跟二输入与非门大致相同,即宽长比越大,延迟越小。但从图1还可以看出

5、,MOS管的宽度变化,对输出波形上升沿的影响较大,对于输出的下降沿影响要小许多。 从上图2延迟曲线,可以看出, t2-1和t2-2的延迟相近。故对t2-2取点,使其延迟恰好等于要求的最大延迟1ns,可读出此时的管子宽度为17.5u。可近似得出结论,管子宽度大于17.5u时,可保证延迟小于1ns。3.四输入或非门3.1四输入或非门的电路图3.2四输入或非门MOS管参数PM0PM1PM2PM3w100u100u100u100ul180n180n180n180n NM0NM1NM2NM3w100u100u100u100ul180n180n180n180n3.3仿真结果和延时3.4延迟结果分析由于四输

6、入与非门的四个输入端造成的延时不同,但最大延时要么出现在离输出最近的端口,要么出现在离输出最远的端口,所以t3-1输入与t3-4输入都符合要求,则延时符合实验要求。t3-4的延迟明显大于其他三个输入端口的延迟。4四输入与非门4.1四输入与非门的电路图4.2MOS管子参数PM0PM1PM2PM3w100u100u100u100ul180n180n180n180nNM0NM1NM2NM3w100u100u100u100ul180n180n180n180n4.3仿真结果和延时4.4延迟结果分析由于四输入与非门的四个输入端造成的延时不同,但最大延时要么出现在离输出最近的端口,要么出现在离输出最远的端口

7、,所以t4-1输入与t4-4输入都符合要求,则延时符合实验要求。五、讨论改变负载电容的扫描仿真改变负载电容的大小,观察不同负载条件下逻辑门延时的变化情况。晶体管自身参数以及负载变化对时序、功耗的影响。以二输入或非门为例,改变负载电容,仿真结果如下:扫描仿真结果扫描结果分析从上图中可以看出,随着负载电容的的减小,或非门的延时在减少。这是因为减小负载电容可以减小充放电时间来减小延时。从实验结果可发现电容越大,延时也越大,这是因为当输出负载增大时,时间常数RC也越大,所以充放电时间也随之增大,所以延时也变大。将晶体管管子放大可以减小延时时间,但功耗会变大。实验2平方根进位选择加法器仿真和综合一、实验

8、内容使用VHDL语言设计一个平方根进位选择加法器,并进行功能仿真以验证VHDL代码的正确性。然后进行综合和网表仿真。二、实验目的深入理解VHDL语言和平方根进位选择加法器的原理,熟悉和掌握数字集成电路分析与设计的基本知识,了解和掌握数字集成电路设计的基本流程。三、实验要求设计符合下列要求的平方根进位选择加法器。技术指标要求:加法器的位宽不低于64位,综合时的最低时钟约束为100MHz,输出负载电容为1pF。四、实验原理平方根进位选择加法器是将输入分成几个子模块,每个子模块的位宽都不同,从低到高呈递增排列,每一模块都将进位为0和1分别提前相加好,待上一级的进位信号到来时选择正确的输出送入输出端。

9、最后将子模块级联,就构成了平方根进位选择加法器。五、实验流程1.首先编写平方根进位选择加法器的代码,分为三个文件,分别是全加器,选择加法器的子模块,选择加法器的顶层文件。为了仿真还要编写一个测试文件。2.之后对代码进行仿真,仿真结果正确后编写一个脚本文件,对代码进行综合,并产生网表文件。3对网表文件进行后仿,验证结果是否正确。上图是网表文件反正的结果波形图之一,可以看到加法器最终输出和real result结果是一致的。上图是用tb文件仿真的结果图,所有的测试用例都是right,证明加法器设计成功。六、实验总结和分析在后仿中,由于测试用例里将两组测试用例之间的刷新时间设置的太小,而在脚本文件中

10、我设定的延时约束大于测试用例的时间,所以会有在加法器还未计算完的情况下就进行测试比对,所以会有许多wrong的测试用例。后来修改了测试用例的刷新时间,将时间改大,使加法器有充足的时间进行计算,最后结果也正确了。七、几种加法器结构的不同特性1.简单加法器链:由简单全加器级联而成,每一级都需要等进位信号到来才能计算,因此延时比较高,与进位位数成正比2.直接进位加法器:在简单加法器链上多了一条进位通路,就是当输入信号P(P=A+B)全为1时,输出的进位信号Cout等于输入的进位信号Cin,所以在计算前多一步判断,可以节省延时时间。延时与NM+2M成正比(N为总位宽,M为每组的位宽)。这种加法器在N较

11、大时性能优于简单加法器链。3.线性进位选择加法器:这种加法器是先将输入等分成子模块,每组子模块单独运算,模块之间用进位信号通信。每个子模块提前将上级进位为1和进位为0的结果都计算出来,待上一级进位信号到来的时候直接选择正确的结果即可,这样做可以有效节省延时。它的延时与NM+M成正比。 4.平方根进位进位选择加法器:这种加法器在线性进位选择加法器的基础上将分组分成不等分的模块,而是呈位宽数单调递增的分组,这样可以有效地将进位从低位传到高位的时间和宽位宽的计算时间匹配。不至于让子模块在计算结果后等待太长的时间才能等到上一级的进位信号。 它的延时与N的平方根成正比,所以叫平方根进位选择加法器。5.提

12、前进位加法器:这种加法器是每一级的计算都不依赖于前一级的进位输出,而是每一级都直接可以通过输入直接计算得出结果。八、实验感想通过两次实验,我学会了数字门电路的基本设计方法,了解门延时和管子参数的关系,加深了对静态逻辑门设计的理解。同时也学会了把硬件描述语言转换成网表并进行后仿的方法,并对延时约束有了更深刻的认识。整个实验收获颇丰。八、附录1.平方根进位选择加法器代码1.1子模块library ieee;use ieee.std_logic_1164.all;entity square_root_unit is generic(N:integer); port(a,b:in std_logic_

13、vector(N-1 downto 0); sum0,sum1:out std_logic_vector(N-1 downto 0); c0,c1:out std_logic);end square_root_unit;architecture behave of square_root_unit issignal ct0,ct1:std_logic_vector(N downto 0);component fau is port(a,b,cin:in std_logic; s,cout:out std_logic);end component;begin ct0(0)<='0&

14、#39; ct1(0)<='1' G1:for i in 0 to N-1 generate I1:fau port map (a(i),b(i),ct0(i),sum0(i),ct0(i+1); I2:fau port map (a(i),b(i),ct1(i),sum1(i),ct1(i+1); end generate G1; c0<=ct0(N); c1<=ct1(N);end behave;1.2顶层文件library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use

15、ieee.std_logic_unsigned.all;use work.all;entity square_root_adder is port( a,b:in std_logic_vector(63 downto 0); cin:in std_logic; sum:out std_logic_vector(63 downto 0); cout:out std_logic);end square_root_adder;architecture behave of square_root_adder issignal c:std_logic_vector(7 downto 0);signal

16、sum0,sum1:std_logic_vector(63 downto 0);signal co0,co1:std_logic_vector(6 downto 0);signal n:natural;component square_root_unit is generic(N:natural); port(a,b:in std_logic_vector(N-1 downto 0); sum0,sum1:out std_logic_vector(N-1 downto 0); c0,c1:out std_logic);end component;begin G1:for i in 0 to 6

17、 generate c(i+1)<=co0(i) when c(i)='0' else co1(i); end generate G1; I0:square_root_unit generic map(2) port map(a(1 downto 0),b(1 downto 0),sum0(1 downto 0),sum1(1 downto 0),co0(0),co1(0); sum(1 downto 0)<=sum0(1 downto 0) when c(0)='0' else sum1(1 downto 0); I1:square_root_un

18、it generic map(4) port map(a(5 downto 2),b(5 downto 2),sum0(5 downto 2),sum1(5 downto 2),co0(1),co1(1); sum(5 downto 2)<=sum0(5 downto 2) when c(1)='0' else sum1(5 downto 2); I2:square_root_unit generic map(6) port map(a(11 downto 6),b(11 downto 6),sum0(11 downto 6),sum1(11 downto 6),co0(

19、2),co1(2); sum(11 downto 6)<=sum0(11 downto 6) when c(2)='0' else sum1(11 downto 6); I3:square_root_unit generic map(10) port map(a(21 downto 12),b(21 downto 12),sum0(21 downto 12),sum1(21 downto 12),co0(3),co1(3); sum(21 downto 12)<=sum0(21 downto 12) when c(3)='0' else sum1(2

20、1 downto 12); I4:square_root_unit generic map(12) port map(a(33 downto 22),b(33 downto 22),sum0(33 downto 22),sum1(33 downto 22),co0(4),co1(4); sum(33 downto 22)<=sum0(33 downto 22) when c(4)='0' else sum1(33 downto 22); I5:square_root_unit generic map(14) port map(a(47 downto 34),b(47 do

21、wnto 34),sum0(47 downto 34),sum1(47 downto 34),co0(5),co1(5); sum(47 downto 34)<=sum0(47 downto 34) when c(5)='0' else sum1(47 downto 34); I6:square_root_unit generic map(16) port map(a(63 downto 48),b(63 downto 48),sum0(63 downto 48),sum1(63 downto 48),co0(6),co1(6); sum(63 downto 48)<

22、;=sum0(63 downto 48) when c(6)='0' else sum1(63 downto 48); c(0)<=cin; cout<=c(7); end behave;1.3全加器library ieee;use ieee.std_logic_1164.all;entity fau is port(a,b,cin:in std_logic; s,cout:out std_logic);end fau;architecture behave of fau isbegin s<=a xor b xor cin; cout<=(a and

23、b) or (a and cin) or (b and cin);end behave;1.4 tb文件timescale 1ns/1psmodule square_root_adder_tb(); reg63:0 a,b; reg cin; wire63:0 sum; wire cout; reg64:0 correct_s; integer run_times=2000; square_root_adder DUT(.a(a),.b(b),.cin(cin),.sum(sum),.cout(cout); initial begin repeat(run_times) begin a= $r

24、andom; b= $random; cin=0; correct_s=a+b; #15 if(cout,sum=correct_s) $display("ok!",$realtime); else $display("wrong! (cout,sum)=%b,correct_s=%b",cout,sum,correct_s,$realtime); end endendmodule1.5 脚本文件# set library & path#set lib_root0 /mnt/SMIC_0.18um_Logic_Lib/Standard_Cell_

25、X/synopsysset lib_root1 /mnt/SMIC_0.18um_Logic_Lib/symbols/synopsysset search_path ". $lib_root0 $lib_root1"set target_library "slow.db"set symbol_library "smic18.sdb"set link_library "* $target_library"set access_internal_pins trueset top_path /home/digtrnset

26、 report_path /home/digtrn/rptset mod square_root_adder_netlistsh rm rpt -rfsh mkdir rpt#read_file -format VHDL -rtl /home/digtrn/fulladd.vhdread_file -format VHDL -rtl /home/digtrn/square_root_unit.vhdread_file -format VHDL -rtl /home/digtrn/square_root_adder.vhdwrite -f ddc -o ./sra.ddc#u#current_d

27、esign square_root_adderlink#set clock_period1 5set chip_area 0#create_clock -period $clock_period1 -name clkset_clock_uncertainty -setup 0.5 clkset_clock_uncertainty -hold 0.5 clkset_input_delay 0.5 -clock clk all_inputsset_output_delay 0.5 -clock clk all_outputsset_max_area $chip_areaset_max_fanout

28、 100 get_designs square_root_adder#set auto_wire_load_selection true#compile#write -f verilog -hier -output $top_path/$mod.vwrite_sdf $top_path/$mod.sdfcheck_design > $report_path/check.rptreport_constraint -all_violators -verbose > $report_path/constraint.rptreport_timing -path full -delay ma

29、x -max_path 50 -input_pins -net -transition_time -capacitance > $report_path/timing_max.rptreport_timing -path full -delay min -max_path 50 -input_pins -net -transition_time -capacitance > $report_path/timing_min.rptreport_clock > $report_path/clk.rptreport_qor > $report_path/qor.rptrepo

30、rt_power > $report_path/power.rptreport_cell > $report_path/cell.rptexit1.6 log文件 DC Professional (TM) DC Expert (TM) DC Ultra (TM) FloorPlan Manager (TM) HDL Compiler (TM) VHDL Compiler (TM) Library Compiler (TM) DesignWare Developer (TM) DFT Compiler (TM) BSD Compiler Power Compiler (TM) Ver

31、sion C-2009.06 for linux - May 21, 2009 Copyright (c) 1988-2008 by Synopsys, Inc. ALL RIGHTS RESERVEDThis software and the associated documentation are confidential and proprietary to Synopsys, Inc. Your use or disclosure of this software is subject to the terms and conditions of a written license a

32、greement between you, or your company, and Synopsys, Inc.The above trademark notice does not imply that you are licensed to use all of the listed products. You are licensed to use only those products for which you have lawfully obtained a valid license key.Initializing.set lib_root0 /mnt/SMIC_0.18um

33、_Logic_Lib/Standard_Cell_X/synopsys/mnt/SMIC_0.18um_Logic_Lib/Standard_Cell_X/synopsysset lib_root1 /mnt/SMIC_0.18um_Logic_Lib/symbols/synopsys/mnt/SMIC_0.18um_Logic_Lib/symbols/synopsysset search_path ". $lib_root0 $lib_root1". /mnt/SMIC_0.18um_Logic_Lib/Standard_Cell_X/synopsys /mnt/SMIC

34、_0.18um_Logic_Lib/symbols/synopsysset target_library "slow.db"slow.dbset symbol_library "smic18.sdb"smic18.sdbset link_library "* $target_library"* slow.dbset access_internal_pins truetrueset top_path /home/digtrn/home/digtrnset report_path $top_path/rpt/home/digtrn/rpt

35、set mod square_root_adder_netlistsquare_root_adder_netlistsh rm rpt -rfsh mkdir rpt#read_file -format VHDL -rtl /home/digtrn/fau.vhdLoading db file '/mnt/SMIC_0.18um_Logic_Lib/Standard_Cell_X/synopsys/slow.db'Loading db file '/opt/syn0906/libraries/syn/gtech.db'Loading db file '/

36、opt/syn0906/libraries/syn/standard.sldb' Loading link library 'slow' Loading link library 'gtech'Loading VHDL file '/home/digtrn/fau.vhd'Running PRESTO HDLCCompiling Entity Declaration FAUCompiling Architecture BEHAVE of FAUWarning: /home/digtrn/fau.vhd:9: The architectur

37、e behave has already been analyzed. It is being replaced. (VHD-4)Presto compilation completed successfully.Current design is now '/home/digtrn/fau.db:fau'Loaded 1 design.Current design is 'fau'.fauread_file -format VHDL -rtl /home/digtrn/square_root_unit.vhdLoading VHDL file '/ho

38、me/digtrn/square_root_unit.vhd'Running PRESTO HDLCCompiling Entity Declaration SQUARE_ROOT_UNITCompiling Architecture BEHAVE of SQUARE_ROOT_UNITWarning: /home/digtrn/square_root_unit.vhd:11: The architecture behave has already been analyzed. It is being replaced. (VHD-4)Warning: /home/digtrn/squ

39、are_root_unit.vhd:11: Generic N does not have a default value. (ELAB-943)Information: Saving the template square_root_unitPresto compilation completed successfully.No designs were readread_file -format VHDL -rtl /home/digtrn/square_root_adder.vhdLoading VHDL file '/home/digtrn/square_root_adder.

40、vhd'Running PRESTO HDLCCompiling Entity Declaration SQUARE_ROOT_ADDERCompiling Architecture BEHAVE of SQUARE_ROOT_ADDERWarning: /home/digtrn/square_root_adder.vhd:15: The architecture behave has already been analyzed. It is being replaced. (VHD-4)Presto compilation completed successfully.Current

41、 design is now '/home/digtrn/square_root_adder.db:square_root_adder'Loaded 1 design.Current design is 'square_root_adder'.square_root_adderwrite -f ddc -o ./sra.ddcInformation: Building the design 'square_root_unit' instantiated from design 'square_root_adder' withthe

42、 parameters "N=2". (HDL-193)Presto compilation completed successfully.Information: Building the design 'square_root_unit' instantiated from design 'square_root_adder' withthe parameters "N=4". (HDL-193)Presto compilation completed successfully.Information: Buildin

43、g the design 'square_root_unit' instantiated from design 'square_root_adder' withthe parameters "N=6". (HDL-193)Presto compilation completed successfully.Information: Building the design 'square_root_unit' instantiated from design 'square_root_adder' withthe

44、 parameters "N=10". (HDL-193)Presto compilation completed successfully.Information: Building the design 'square_root_unit' instantiated from design 'square_root_adder' withthe parameters "N=12". (HDL-193)Presto compilation completed successfully.Information: Build

45、ing the design 'square_root_unit' instantiated from design 'square_root_adder' withthe parameters "N=14". (HDL-193)Presto compilation completed successfully.Information: Building the design 'square_root_unit' instantiated from design 'square_root_adder' with

46、the parameters "N=16". (HDL-193)Presto compilation completed successfully.Writing ddc file './sra.ddc'.1#current_design square_root_adderCurrent design is 'square_root_adder'.square_root_adderlink Linking design 'square_root_adder' Using the following designs and li

47、braries: - * (9 designs) /home/digtrn/square_root_adder.db, etc slow (library) /mnt/SMIC_0.18um_Logic_Lib/Standard_Cell_X/synopsys/slow.db1#set clock_period1 88set chip_area 00#create_clock -period $clock_period1 -name clkWarning: Creating virtual clock named 'clk' with no sources. (UID-348)

48、1set_clock_uncertainty -setup 0.8 clk1set_clock_uncertainty -hold 0.8 clk1set_input_delay 0.5 -clock clk all_inputs1set_output_delay 0.5 -clock clk all_outputs1set_driving_cell -lib_cell INVX1all_inputsset_load 1 all_outputs1set_max_area $chip_area1set_max_fanout 100 get_designs square_root_adder1#set auto_wire_load_selection truetrue#compileInformation: Evaluating DesignWare library utilization. (UISN-27)=| DesignWare Building Block Library |

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论