quartus静态时序分析步骤

quartus静态时序分析步骤
quartus静态时序分析步骤

101 Innovation Drive San Jose, CA 95134

https://www.360docs.net/doc/cd12457001.html, TimeQuest Timing Analyzer

Quick Start Tutorial

Software Version:9.1Document Version: 1.1

Document Date:? December 2009

UG-TMQSTANZR-1.1

Copyright ? 2009 Altera Corporation. All rights reserved. Altera, The Programmable Solutions Company, the stylized Altera logo, specific device designations, and all other words and logos that are identified as trademarks and/or service marks are, unless noted otherwise, the trademarks and service marks of Altera Corporation in the U.S. and other countries. All other product or service names are the property of their respective holders. Altera products are protected under numerous U.S. and foreign patents and pending ap-plications, maskwork rights, and copyrights. Altera warrants performance of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, product, or service described herein except as expressly agreed to in writing by Altera Corporation. Altera customers are advised to obtain the latest version of device specifications before relying on any published information and before placing orders for products or services.

UG-TMQSTANZR-1.1

? December 2009Altera Corporation

TimeQuest Timing Analyzer Quick Start Tutorial

Contents

Chapter 1.About this Tutorial Chapter 2.Quick Start Tutorial

System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–1Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–1Step 1: Open and Setup Your Design in the Quartus II Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–1Step 2: Setup the TimeQuest Timing Analyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–1Step 3: Perform Initial Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–2Step 4: Launch the TimeQuest Timing Analyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–2Step 5: Create a Post-Map Timing Netlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–3Step 6: Specify Timing Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–3Step 7: Update the Timing Netlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–4Step 8: Save the Synopsys Design Constraints (SDC) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–4Step 9: Generate Timing Reports for the Initial Timing Netlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5Step 10: Save Constraints to an SDC File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–7Step 11. Perform Timing-Driven Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8Step 12. Verify Timing in the TimeQuest Timing Analyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–12

Chapter 3.Script Examples

Commands and Tcl Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–1

Additional Information

Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About–1How to Contact Altera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About–1Typographic Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About–1

iv

TimeQuest Timing Analyzer Quick Start Tutorial? December 2009Altera Corporation

1.About this Tutorial

the TimeQuest Timing Analyzer. For this tutorial, use the fir_filter design that ships

with the Quartus? II software. Figure1–1 shows the fir_filter design schematic. Figure1–1.

fir_filter Design Schematic

? December 2009 Altera Corporation TimeQuest Timing Analyzer Quick Start Tutorial

1–2Chapter 1:About this Tutorial TimeQuest Timing Analyzer Quick Start Tutorial? December 2009Altera Corporation

? December 2009 Altera Corporation

TimeQuest Timing Analyzer Quick Start Tutorial

2.Quick Start Tutorial

System Requirements

For this tutorial, use Stratix, Cyclone, MAX II, or newer device families (you can also use MAX 3000 and MAX 7000 device families) with the Quartus ? II software beginning with version 6.0. APEX, FLEX, and Mercury device families are not supported.

Procedures

Use the following steps to constrain and analyze a design with the TimeQuest Timing Analyzer. Each step includes the GUI procedure and the command-line equivalent.

Step 1: Open and Setup Your Design in the Quartus II Software

In the Quartus II software, browse to and open the fir_filter located in the /fir_filter/ folder. Use the GUI or the command-line equivalent procedures in Table 2–1.

Step 2: Setup the TimeQuest Timing Analyzer

By default, the Quartus II software uses the Classic Timing Analyzer as the timing analysis tool for designs targeting the Cyclone device family. Specify the TimeQuest Timing Analyzer as the timing analysis tool in the Quartus II software to use in the compilation flow for the fir_filter project.1

This step is not required for all projects. The newer FPGA families default to the TimeQuest Timing Analyzer.

Specify the TimeQuest Timing Analyzer as the timing analysis tool in the Quartus II software with the procedures in Table 2–2.

Table 2–1.Opening and Setting Up Your Design

Procedures Table2–2.Specifying the TimeQuest Timing Analyzer as Default

Step 3: Perform Initial Compilation

Before applying timing constraints to the design, create an initial database with the

procedures in Table2–3. The initial database is generated from the post-map results of

the design.

Table2–3.Performing Initial Compilation (Note1)

Note to Table2–3:

(1)The quartus_map is used to create a post-map database.

The Analysis & Synthesis step generates a post-map database.

1You can also create a post-fit netlist for the initial database. However, creating a post-map is less time consuming and is sufficient for this tutorial example.

Step 4: Launch the TimeQuest Timing Analyzer

Launch the TimeQuest Timing Analyzer to create and verify all timing constraints and

exceptions with the procedures in Table2–4. This command opens the TimeQuest

shell.

Table2–https://www.360docs.net/doc/cd12457001.html,unching the TimeQuest Timing Analyzer

1When you launch the TimeQuest Timing Analyzer directly from the Quartus II

software, the current project is automatically opened.

If you use the GUI, select No when the following message appears:

"No SDC files were found in the Quartus Settings File and filtref.sdc doesn't exist.

Would you like to generate an SDC file from the Quartus Settings File?"

TimeQuest Timing Analyzer Quick Start Tutorial? December 2009 Altera Corporation

Procedures

Step 5: Create a Post-Map Timing Netlist

Before specifying the timing requirements, create a timing netlist. You can create a

timing netlist from a post-map or post-fit database. In this step, create a timing netlist

from the post-map database you created in “Step 3: Perform Initial Compilation” with

the procedures in Table2–5.

Table2–5.Creating a Post-Map Timing Netlist

1You cannot use the Create Timing Netlist command in the Tasks pane to create a post-map timing netlist. By default, the Create Timing Netlist requires a post-fit

database.

Step 6: Specify Timing Requirements

You must define two clocks in the fir_filter design. Refer to Table2–6 for a list of

properties for each clock.

Table2–6.Clocks in fir_filter Design

Create the clocks in the fir_filter design and assign the proper clock ports with the

procedures in Table2–7.

f For more information about constraints supported by the TimeQuest Timing

Analyzer, refer to the TimeQuest Timing Analyzer chapter in volume 3 of the Quartus II

Handbook.

Table2–7.Creating Clocks and Assigning Clock Ports

1By default, the create_clock command assumes a 50/50 duty cycle if the

-waveform option is not used.

? December 2009 Altera Corporation TimeQuest Timing Analyzer Quick Start Tutorial

Procedures

f For more information about creatin

g clocks of different duty cycles, refer to the

TimeQuest Timing Analyzer chapter in volume 3 of the Quartus II Handbook.

After you complete the procedure shown in Table2–7, the clock definition is

complete.

Step 7: Update the Timing Netlist

After you create timing constraints or exceptions, update the timing netlist to apply

all timing requirements to the timing netlist (the new clk and clkx2 clock

constraints) with the procedures in Table2–8.

1You must update the timing netlist whenever new timing constraints are applied. Table2–8.Updating the Timing Netlist

Step 8: Save the Synopsys Design Constraints (SDC) File

You have the option of creating an SDC file after specifying the clock constraints for

the design and updating the timing netlist with the procedures in Table2–9.

Constraints that have been specified with the TimeQuest Timing Analyzer GUI or in

the console are not automatically saved.

1If you inadvertently overwrite any of your constraints later in the design flow, use this initial SDC file to restore all of your constraints.

The initial SDC file can act as the “golden” SDC file that contains the original

constraints and exceptions for the design.

Table2–9.Saving the SDC File

The new filtref.sdc file contains the constraints and false path exceptions for the two

clocks that you defined in “Step 6: Specify Timing Requirements”.

The Write SDC File command can overwrite any existing SDC file. When this occurs,

the new SDC file does not maintain order or comments. Therefore, Altera

recommends saving a golden SDC file separately that you can manually edit with a

text editor. This allows you to enter comments and organize the file to your own

specifications.

TimeQuest Timing Analyzer Quick Start Tutorial? December 2009 Altera Corporation

Procedures

Step 9: Generate Timing Reports for the Initial Timing Netlist

After specifying timing constraints and updating the timing netlist, generate timing

reports, which verify that all clocks are properly defined and applied to the correct

nodes, for the two clocks you defined with the procedures in Table2–10. The

TimeQuest Timing Analyzer provides easy to use report generation commands that

allow you to verify all timing requirements in the design.

Table2–10.Report SDC Command

Figure2–1 shows the Create Clock report that you generate when you click Report

SDC in the Tasks pane.

Figure2–1.Generating the SDC Assignments Report

SDC Assignments reports all timing constraints and exceptions specified in the

design. Two reports are generated: one for the clocks and one for the clock groups.

Generate a report that summarizes all clocks in the design with the procedures in

Table2–11.

Table2–11.Generating the Report Clocks Report

Figure2–2 shows the Clocks Summary report.

Figure2–2. Clocks Summary Report

Use the Report Clock Transfers command to generate a report to verify that all

clock-to-clock transfers are valid with the procedures in Table2–12. This report

contains all clock-to-clock transfers in the design.

? December 2009 Altera Corporation TimeQuest Timing Analyzer Quick Start Tutorial

Procedures Table2–12.Generating the Report Clock Transfers

Figure2–3 shows the Clock Transfers report.

Figure2–3. Clock Transfers Report

The Clock Transfers report indicates that a clock-to-clock transfer exists between the

clk source and the clkx2 destination. There are 16 instances where clk clocks the

source node and where clkx2 clocks the destination node.

In the fir_filter design, you do not have to analyze clock transfers from clk to clkx2

because they are false paths. Declare the paths from clk to clkx2 as false paths with

the procedures in Table2–13. When you complete this procedure, the TimeQuest

Timing Analyzer indicates that the Clock Transfers report is outdated.

Table2–13.Declaring False Paths

1Alternatively, use the set_clock_groups command to declare the paths between the two clock domains as false paths. For example, set_clock_groups

-asynchronous -group [get_clocks clk] -group [get_clocks clkx2].

This command declares all paths from clk to clkx2 and from clkx2 to clk as false

paths. This method is preferred.

Because you have added a new timing constraint, update the timing netlist with the

procedure in Table2–14.

Table2–14.Updating the Timing Netlist

TimeQuest Timing Analyzer Quick Start Tutorial? December 2009 Altera Corporation

Procedures

After you enter the set_false_path in the GUI, all generated report panels are

labeled “Out of Date,” indicating that the report panels do not contain results that

reflects the current state of constraints or exceptions in the TimeQuest Timing

Analyzer. To update the report panels, you must regenerate all of the reports.

At the command-line, re-enter the commands. In the GUI, right-click on any

out-of-date report in the report panel list and select Regenerate or Regenerate all.

After you update the timing netlist, verify that the clock-to-clock transfer has been

declared false with the procedures in Table2–15.

Table2–15.Verifying Using the Report SDC Command

Figure2–4 shows the new SDC Assignments report.

Figure2–4.SDC Assignments Report

The report shown in Figure2–4 indicates that the clock constraints and the false paths

are correct.

Use the Report Clocks and Report Clock Transfers commands to verify that the two

clocks have been removed from analysis. Figure2–5 shows the Clock Transfers report.

Figure2–5. Clock Transfers Report

f The RR Paths column contains the comment “false path” to indicate that you have

declared the clock domains as false paths.

Step 10: Save Constraints to an SDC File

After you specify all clock constraints and false paths for the design, save the timing

constraints and exceptions to an SDC file with the procedures in Table2–16.

? December 2009 Altera Corporation TimeQuest Timing Analyzer Quick Start Tutorial

Procedures Table2–16.Saving Constraints to an SDC File

1This procedure overwrites the previously created filtref.sdc file. If you overwrite an SDC with the Write SDC File command, your custom formatting and comments are

removed in the new SDC file.

The filtref.sdc file contains the two clock constraints and the false path exceptions.

Step 11. Perform Timing-Driven Compilation

After saving the constraints to the SDC file, run a full compilation on the design to

optimize fitting to meet the constraints. However, before you start a full compilation,

add the SDC to your project with the procedures in Table2–17.

Table2–17.Adding the SDC File to Your Project

After you add the SDC to your project, run a full compilation on the design with the

procedures in Table2–18.

Table2–18.Running a Full Compilation

After compilation is complete, the TimeQuest Timing Analyzer generates a summary

report of the clock setup and clock hold checks performed in the Compilation Report.

Step 12. Verify Timing in the TimeQuest Timing Analyzer

To obtain detailed timing analysis data on specific paths, view timing analysis results

in the TimeQuest Timing Analyzer.

1After a full place-and-route is performed, launch the TimeQuest Timing Analyzer as described in “Step 4: Launch the TimeQuest Timing Analyzer”.

Generate a post-fit timing netlist, read the SDC file, and update the timing netlist to

generate reports about the latest compilation with the procedures in Table2–19. TimeQuest Timing Analyzer Quick Start Tutorial? December 2009 Altera Corporation

Procedures

Table2–19.Generating Reports About the Latest Compilation

1When you double-click one of the reporting commands, the Create Timing Netlist, Read SDC, and Update Timing Netlist commands are sequentially executed in the

Tasks pane, automatically setting up the timing netlist.

The clock setup check ensures that each register-to-register transfer does not violate

the timing constraints you specified in the SDC. V erify that no violations have

occurred by generating a clock setup summary check for all clocks in the design with

the procedures in Table2–20.

Table2–20.Generating a Clock Setup Summary Check

Figure2–6 shows the Summary (Setup) report.

Figure2–6.Summary (Setup) Report

1The clkx2 clock does not appear in the Summary (Setup) report because all clock paths between clk and clkx2 have been declared as false paths. In addition, the

fir_filter design does not contain any register-to-register paths where a destination

register path is clocked by clkx2.

The Slack column in the Summary (Setup) report indicates that clk fails to meet the

constraint by 11.588 ns. The End Point TNS column is the total of all total negative

slack (TNS) for the specified clock domain. Use this value to gauge the amount of

failing paths in the specified clock domain.

1For the fir_filter design, the Slack column equals the End Point TNS, indicating that there is only one failing path for the clk clock domain.

? December 2009 Altera Corporation TimeQuest Timing Analyzer Quick Start Tutorial

Procedures

TimeQuest Timing Analyzer Quick Start Tutorial

? December 2009 Altera Corporation

After you generate the Summary (Setup) report, generate a clock hold check summary for the design with the procedures in Table 2–21.

Figure 2–7 shows the Summary (Hold) report.

The Summary (Hold) report indicates that the clk clock node meets the timing constraints by 0.661 ns.

Specify all timing constraints and exceptions prior to performing a full compilation with the procedures in Table 2–22. This ensures that the Fitter optimizes for the critical paths in the design.

You can use the Report Unconstrained Paths command to verify that you have constrained all paths in the fir_filter design.

Figure 2–8 shows the Unconstrained Paths Summary report.

The Unconstrained Paths Summary report indicates that there are numerous unconstrained paths and details the types of paths.

To fully constrain this design, utilize the full set of SDC constraints provided by the TimeQuest Timing Analyzer.

To fully constrain the fir_filter design, constrain all input and output ports. Use the Set Input Delay and Set Output Delay dialog boxes, or the set_input_delay and set_output_delay constraints to specify the input and output delay values.

Table 2–21.Generating the Summary (Hold) Report

Figure 2–7.Summary (Hold) Report

Table 2–22.

Specifying Timing Constraints and Exceptions

Figure 2–8.Unconstrained Paths Summary Report

Procedures

Because additional constraints are applied to the design, create an additional SDC that

contains only the input and output constraints with the text editor (for example,

inout_delay.sdc). Add the input and output delay assignments shown in Table2–23

to the new SDC created in “Step 10: Save Constraints to an SDC File”.

Table2–23.Input and Output Delay Assignments

All ports should be constrained in the design after you read the SDC containing the

input and output delay constraints.

1Remember to update the timing netlist after reading the new constraints. For more information, refer to “Step 7: Update the Timing Netlist”.

To verify all ports are constrained in the design, regenerate the Unconstrained Paths

Summary report (Figure2–9).

Figure2–9.Regenerated Unconstrained Paths Summary Report

Generate specific timing check reports for clocks or nodes in the design with the

procedures in Table2–24. The procedures in Table2–24 generate a report where clk

clocks the destination register to the design destination register bus

acc:inst3|result and reports the top 10 worst paths.

? December 2009 Altera Corporation TimeQuest Timing Analyzer Quick Start Tutorial

Conclusion Table2–24.Generate a Report Timing Report

Figure2–10 shows the Report Timing report.

Figure2–10.Report Timing Report

Use the Report Top Failing Paths command in the Tasks pane to generate a report

that details the top failing paths in the design.

Conclusion

As you create new constraints or exceptions, rerun the Quartus II Fitter to optimize

the design based on your new constraints or exceptions. Multiple iterations on the

design may be necessary to achieve the desired results.

TimeQuest Timing Analyzer Quick Start Tutorial? December 2009 Altera Corporation

? December 2009 Altera Corporation TimeQuest Timing Analyzer Quick Start Tutorial

3.Script Examples

Commands and Tcl Scripts

This section includes commands and accompanying Tcl scripts to execute the entire flow from the command line. Use this method to completely execute the entire flow.Enter the command in Example 3–1 at a command prompt to source the scripts.

Example 3–2 shows the content of the timequest_setup.tcl script. Use this script to specify the TimeQuest Timing Analyzer as the default timing analysis tool.1

The Classic Timing Analyzer is the default timing analyzer in the Quartus II software.

Example 3–3 shows the content of the main_postmap.tcl script. Use this script to create post-map data, set up the timing netlist, read in golden.sdc , and generate initial reports for the design.

Example 3–1.Source the Scripts

quartus_sh –t timequest_setup.tcl r quartus_sta –t main_postmap.tcl r quartus_sh –t fit_sdc_setup.tcl r quartus_sta –t main_postfit.tcl r

Example 3–2.The timeqest_setup.tcl Script

#open the filtref project project_open filtref r

#set the TimeQuest analyzer as the default timing analyzer

set_global_assignment -name USE_TIMEQUEST_TIMING_ANALYZER ON r #close the project project_close r

Commands and Tcl Scripts

Example3–3.The main_postmap.tcl Script

#file main_postmap.tcl

#Include the flow package to create a post-map netlist

package require ::quartus::flow r

#open the project in TimeQuest

project_open filtref r

#create a post-map database

execute_module -tool map r

#create the timing netlist based on the post-map results

create_timing_netlist -post_map r

#read in the constraints from the golden SDC file

read_sdc golden.sdc r

#update the timing netlist with the new constraints

update_timing_netlist r

#generated a clock report

report_clocks r

#generated a clock-to-clock report

report_clock_transfers r

#delete our post-map timing netlist

delete_timing_netlist r

#close the TimeQuest project

project_close r

Example3–4 shows the content of the fit_sdc_setup.tcl script. Use this script to add

the golden.sdc file to the filtref design. This allows the Quartus II Fitter to optimize

the design according to the constraints you specify.

Example3–4.The fit_sdc_setup.tcl Script

#open the filtref project

project_open filtref r

#add the filtref.sdc file to our Quartus II project

set_global_assignment -name SDC_FILE golden.sdc r

#close the project

project_close r

Example3–5 shows the content of the main_postfit.tcl script. Use this script to create

a post-fit database, set up the timing netlist, read in the golden.sdc and io_cons.sdc

files, and generate reports for the design.

TimeQuest Timing Analyzer Quick Start Tutorial? December 2009 Altera Corporation

集成电路验证与算法知识点总结

集成电路验证与算法知识点总结 黑盒:验证工程师不需了解设计的任何实现细节,所有的验证都必须通过接口完成,不能对内部状态进行直接访问,对内部的结构和实现不需过多了解,缺陷可观测性和可控性比较差。白盒:对待验证设计的内部结构和实现完全可见,也具有完全的可控性,优点在于能够快速的设置感兴趣的状态和输入组合,或者分离特定的功能,可以很容易的在验证过程中对结果进行观察并在输出与期望结果不一致时立即报错,但这种方法与特定的实现紧密相关,并且不能用于不同的实现或者将来的二次设计并且还需要验证工程师对设计实现的细节有相当的了解,以便正确生成有意义的条件以及合理地确定对什么结果进行观测白盒是黑盒的有益补充可以保证与实现有关的特性功能的正确性。 灰盒:介于黑盒和白盒之间的一种折中方案。黑盒可能不能验证设计的所有部分,而白盒不具备可移植性和独立性,与黑盒一样,灰盒通过最顶层接口对设计进行观测和控制,一般而已,灰盒最主要是验证与特定实现有关的重要特征。 遗传算法:5个参数的定义:Np是种群数量,Ng是每一代的数量No是产生子代的数量,Pi是通过反转产生2代的概率,Pu是通过变异产生子代的概率。基本思想:首先计算每一个个体的适应度Fitness Np(i)通过竞争选择出Ng个个体,然后根据适应度随机选择双亲,产生下一代,产生下一代的方式中Pi的概率是通过反转产生,Pu的概率通过变异产生,还有的是通过双亲交配产生,产生下一代的个体数量为No,由Ng和No选择出Np个以保持种群数量不变。一直遗传下来,直到种群的适应度足够高或不再提高为止。 验证计划:①明确的验证目标②验证策略③验证手段:基于行为级的模拟,静态时序分析还是形式化验证④结果检查手段:开发的验证环境是自检查,还是验证结果与参考模型的输出结果对比,还是验证结果直接和期望结果对比⑤建立验证环境的要求:内容有验证对象的抽象层次,验证模型的来源,包括行为模型,模拟模型等;验证环境的要素,包括结果检查,激励源等。⑥制定验证方案,即验证用例设计⑦验证结果的质量标准,内容包括验证向量数目,功能覆盖率和代码覆盖率⑧回归测试,什么时间进行回归测试,采用哪些激励进行回归测试⑨验证问题跟踪与管理,内容包括验证过程中发现的问题的记录和解决问题的情况,以及由此引发的代码更改记录⑩制定验证的进度安排和小组人员职责和分工⑾验证计划评审的节点和内容。 断言:监测设计中正确行为或错误行为的验证对象。断言将设计要求转换成了验证对象,从而可以用模拟器或形式化验证工具,评测设计要求是否被满足.断言分为3种:第一种为Assertion,用于描述设计所期望的正确行为;第二种为Constraint,用于描述设计所处环境的行为;第三种为Cover,用于描述设计及其所处环境应该会到达的状态。 SV A是SystemVerilog的断言,比较适合用Verilog编写的RTL代码,SV A是免费的,而PSL 需要购买。SV A的不太适合验证异步时钟接口。 PSL比较适合用VHDL编写的RTL代码。PSL的断言可以用于验证异步时钟接口。PSL的断言功能比SV A要强,例如,PSL支持具有Liveness功能的断言,但SV A不支持openspabc的功能验证(不包括时序和物理设计验证)①处理器体系结构设计验证②RTL设计模拟验证③DFT验证;系统级环境验证:固件操作系统和各类驱动; 使用工具:软模拟,加速器仿真,形式化验证;商业工具+定制工具 模拟:1适用于所有设计层次,2需要测试向量,3完整的模型,部分的验证,4输入驱动,施加激励,比较输出,5不完备的验证方法,只能证明设计有错而不能证明无错,6验证输入空间的点,一次检查一个输出点,7难点在于确定模拟激励是否足够。

TimeQuest快速入门

TimeQuest快速入门 简介 本教程介绍用TimeQuest Analyzer进行时序约束和静态时序分析的必要步骤。所用示例文件在\qdesigns\fir_filter文件夹下。 TimeQuest约束步骤 下面的步骤描述了用TimeQuest对设计进行时序约束的步骤,每一步操作包含GUI和Command-line的操作方法。 第1步:在QuartusII中打开&建立工程 启动QuartusII软件,在\qdesigns\fir_filter文件夹下打开工程compile_fir_filter.qpf。 第2步:设置TimeQuest Analyzer 默认状态下,QuartusII使用Classic Timing Analyzer作为默认的时序分析工具。需要在QuatusII中进行如下设置将TimeQuest Analyzer设为当前工程的时序分析器。 在【Assignment】菜单下单击【Settings】,在【Category】列表中展开【Timing Analysis Processing】,选择【Use TimeQuest Analyzer during compilation】,然后点击【OK】即可。 第3步:进行初始的编译 在将时序约束应用到设计之前,需要为TimeQuest创建初始的数据。初始数据是通过post-map结果产生的。步骤如下: 在【Processing】菜单栏下,选择【Start】/【Start Analysis&Synthesis】。 通过运行【Analysis&Synthesis】产生post-map数据。 还可以用post-fit网表来产生初始数据。但是创建post-map数据所用时间更少,而且post-map数据对本设计示例工程来说已经够用。 第4步:启动TimeQuest Analyzer 为了创建并验证时序约束,需要启动TimeQuest Analyzer。在【Tools】菜单下,单击【TimeQuest Analyzer】启动TimeQuest Analyzer。 第5步:创建Post-Map时序网表 在指定时序要求前,需要首先创建一个时序网表。可以从post-map或post-fit 数据中创建时序网表(见第3步)。利用post-map数据创建时序网表的方法为:在【netlist】菜单下,单击【Create Timing Netlist】,在弹出的对话框中,选择【Input netlist type】下的【Post-Map】,单击【OK】。 不能通过【Task】面板下的【Create Timing Netlist】命令来创建post-map网表。在默认情况下,【Create Timing Netlist】需要post-fit数据。

IC后端流程初学必看样本

校外IC后端实践报告 本教程通过对synopsys公司给lab进行培训,从verilog代码到版图整个流程(固然只是基本流程,由于真正一种大型设计不是那么简朴就完毕),此教程目就是为了让人们尽快理解数字IC设计大概流程,为后来学习建立一种基本。此教程只是本人摸索实验成果,并不代表内容都是对的,只是为了阐明大概流程,里面一定尚有诸多未完善并且有错误地方,我在此后学习当中会对其逐个完善和修正。 此后端流程大体涉及一下内容: 1.逻辑综合(工具DC 逻辑综合是干吗就不用解释了把?) 2.设计形式验证(工具formality) 形式验证就是功能验证,重要验证流程中各个阶段代码功能与否一致,涉及综合前RTL代码和综合后网表验证,由于如今IC设计规模越来越大,如果对门级网表进行动态仿真话,会耗费较长时间(规模大话甚至要数星期),这对于一种对时间规定严格(设计周期短)asic 设计来说是不可容忍,而形式验证只用几小时即可完毕一种大型验证。此外,由于版图后做了时钟树综合,时钟树插入意味着进入布图工具本来网表已经被修改了,因此有必要验证与本来网表是逻辑等价。 3.静态时序分析(STA),某种限度上来说,STA是ASIC设计中最重要环节,使用primetime 对整个设计布图前静态时序分析,没有时序违规,则进入下一步,否则重新进行综合。 (PR后也需作signoff时序分析) 4.使用cadence公司SOCencounter对综合后网表进行自动布局布线(APR) 5.自动布局后来得到详细延时信息(sdf文献,由寄生RC和互联RC所构成)反标注到网 表,再做静态时序分析,与综合类似,静态时序分析是一种迭代过程,它与芯片布局布线联系非常紧密,这个操作普通是需要执行许多次才干满足时序需求,如果没违规,则进入下一步。 6.APR后门级功能仿真(如果需要)

静态时序分析中建立时间和保持时间关系详解

建立时间和保持时间关系详解 图1 建立时间(setup time)是指在触发器的时钟信号上升沿到来以前,数据稳定不变的时间,如果建立时间不够,数据将不能在这个时钟上升沿被打入触发器; 保持时间(hold time)是指在触发器的时钟信号上升沿到来以后,数据稳定不变的时间,如果保持时间不够,数据同样不能被打入触发器。 如图1 。数据稳定传输必须满足建立和保持时间的要求,当然在一些情况下,建立时间和保持时间的值可以为零。PLD/FPGA开发软件可以自动计算两个相关输入的建立和保持时间。 个人理解: 1、建立时间(setup time)触发器在时钟沿到来之前,其数据的输入端的数据必须保持不变的时间;建立时间决定了该触发器之间的组合逻辑的最大延迟。 2、保持时间(hold time)触发器在时钟沿到来之后,其数据输入端的数据必须保持不变的时间;保持时间决定了该触发器之间的组合逻辑的最小延迟。 关于建立时间保持时间的考虑 华为题目:时钟周期为T,触发器D1的建立时间最大为T1max,最小为T1min。组合逻辑电路最大延迟为T2max,最小为T2min。问:触发器D2的建立时间T3和保持时间T4应满足什么条件? 分析: Tffpd:触发器输出的响应时间,也就是触发器的输出在clk时钟上升沿到来之后多长的时间内发生变化并且稳定,也可以理解为触发器的输出延时。 Tcomb:触发器的输出经过组合逻辑所需要的时间,也就是题目中的组合逻辑延迟。 Tsetup:建立时间 Thold:保持时间 Tclk:时钟周期 建立时间容限:相当于保护时间,这里要求建立时间容限大于等于0。 保持时间容限:保持时间容限也要求大于等于0。

时序分析基础与时钟约束实例1

时序分析基础与时钟约束实例(1) 文中实例配套SF-CY3开发套件。更多内容请参考《SF-CY3 FPGA套件开发指南》。 何谓静态时序分析(STA,Static Timing Analysis)? 首先,设计者应该对FPGA内部的工作方式有一些认识。FPGA的内部结构其实就好比一块PCB板,FPGA的逻辑阵列就好比PCB板上的一些分立元器件。PCB通过导线将具有相关电气特性的信号相连接,FPGA也需要通过内部连线将相关的逻辑节点导通。PCB板上的信号通过任何一个元器件都会产生一定的延时,FPGA的信号通过逻辑门传输也会产生延时。PCB的信号走线有延时,FPGA的信号走线也有延时。这就带来了一系列问题,一个信号从FPGA的一端输入,经过一定的逻辑处理后从FPGA的另一端输出,这期间会产生多大的延时呢?有多个总线信号从FPGA的一端输入,这条总线的各个信号经过逻辑处理后从FPGA 的另一端输出,这条总线的各个信号的延时一致吗?之所以关心这些问题,是因为过长的延时或者一条总线多个信号传输时间的不一致,不仅会影响FPGA本身的性能,而且也会给FPGA之外的电路或者系统带来诸多问题。 言归正传吧,之所以引进静态时序分析的理论也正是基于上述的一些思考。它可以简单的定义为:设计者提出一些特定的时序要求(或者说是添加特定的时序约束),套用特定的时序模型,针对特定的电路进行分析。分析的最终结果当然是要求系统时序满足设计者提出的要求。 下面举一个最简单的例子来说明时序分析的基本概念。假设信号需要从输入到输出在FPGA内部经过一些逻辑延时和路径延时。系统要求这个信号在FPGA内部的延时不能超过15ns,而开发工具在执行过程中找到了如图所示的一些可能的布局布线方式。那么,怎样的布局布线能够达到系统的要求呢?仔细分析一番,发现所有路径的延时可能为14ns、15ns、16ns、17ns、18ns,有两条路径能够满足要求,那么最后的布局布线就会选择满足要求的两条路径之一。 静态时序分析的前提就是设计者先提出要求,然后时序分析工具才会根据特定的时序模型进行分析,即有约束才会有分析。若设计者不添加时序约束,那么时序分析就无从谈起。特权同学常常碰见一些初学者在遇到问题时不问青红皂白就认为是时序问题,实际上只有在添加了时序约束后,系统的时序问题才有可能暴露出来。 下面我们再来看一个例子,我们假设有4个输入信号,经过FPGA内部一些逻辑处理后输出。FPGA内部的布线资源有快有慢之分,好比国道和高速公路。通过高速通道所需要的路径延时假设为3ns-7ns,但只有两条可用;而通过慢速通道的路径延时则>10ns。

静态时序分析报告中门延时计算

1引言 在集成电路设计过程中,模拟方法是应用最多的验证时序正确与否的手段,然而,模拟方法在微系统芯片(SoC)时代正面临严竣的挑战。传统的逻辑模拟方法虽然比较快,但需要输入向量作为激励,给使用带来很多不便;更为严重的是其精度不够高,不能处理SoC时代越来越严重的互连线的耦合电容、电感效应。电路模拟方法虽然能非常精确地计算SoC时代的各种效应,但其速度太慢,容量也太小。静态时序分析技术通过提取整个电路的所有时序路径,计算信号沿(上升沿或下降沿)在传播过程的延时,然后检查在最坏情况下电路中是否存在建立时间和保持时间不满足要求的器件,从而确认被验证的电路是否存在时序问题。它们又分别通过对最大路径延迟和最小路径延迟的分析得到。静态时序分析不需要输入向量、运行速度快、占用内存少,因而成为SoC时代最主要的时序验证手段。延时计算和最长/最短路径分析是静态时序分析的关键。由于互连线结构 [1]对门延时的影响非常大,必须在门延时模型中充分考虑这一因素才能确保静态分析结果的正确性。 广告插播信息 维库最新热卖芯片: XC9536-15PC44C SN74F244DWR IS62C1024L-70Q SS34HT162288E6050-RJJ AQY210E H KM68V257CJ-15MUR3020PT TL082CDR 本文提出新的Π模型方法,结合了门的等效电容[3]来计算门的延时,我们的方法结合门的互连线负载的拓扑结构和门负载三阶矩求解的方法,采用[4]中提出的等效电容的求解公式,求出门延时计算模型,相比上述两种方法,在静态时序分析中更为合理。 2新的门延时模型 2.1 新的门延时模型 在[4]中,作者提出了利用Π型的RC模型来近似门的互连线输出负载,同时考虑了负载的屏蔽效应。用该模型等价地计算出门输出驱动点导纳函数前三阶系数。 图1中Y(s)表示准确的RC树的驱动点导纳函数,在s=0的Taylor展开式表示如下: 将门的输出的RC树的互连线负载等效负载为Π模型,如图2。

FPGA静态时序分析模型——寄存器到寄存器

FPGA静态时序分析模型——寄存器到寄存器 1. 适用范围 本文档理论适用于Actel FPGA并且采用Libero软件进行静态时序分析(寄存器到寄存器)。 2. 应用背景 静态时序分析简称STA,它是一种穷尽的分析方法,它按照同步电路设计的要求,根据电路网表的拓扑结构,计算并检查电路中每一个DFF(触发器)的建立和保持时间以及其他基于路径的时延要求是否满足。STA作为FPGA设计的主要验证手段之一,不需要设计者编写测试向量,由软件自动完成分析,验证时间大大缩短,测试覆盖率可达100%。 静态时序分析的前提就是设计者先提出要求,然后时序分析工具才会根据特定的时序模型进行分析,给出正确是时序报告。 进行静态时序分析,主要目的就是为了提高系统工作主频以及增加系统的稳定性。对很多数字电路设计来说,提高工作频率非常重要,因为高工作频率意味着高处理能力。通过附加约束可以控制逻辑的综合、映射、布局和布线,以减小逻辑和布线延时,从而提高工作频率。 3. 理论分析 3.1 静态时序分析的理论基础知识 在进行正确的时序分析前,我们必须具备基本的静态时序的基本知识点,不然看着编译器给出的时序分析报告犹如天书。如图3.1所示,为libero软件给出的寄存器到寄存器模型的时序分析报告的截取,接下来我们会弄清楚每个栏目的数据变量的含义,以及计算方法。 图3.1 libero静态时序分析报告 3.1.1 固定参数launch edge、latch edge、Tsu、Th、Tco概念

1. launch edge 时序分析起点(launch edge):第一级寄存器数据变化的时钟边沿,也是静态时序分析的起点。 2. latch edge 时序分析终点(latch edge):数据锁存的时钟边沿,也是静态时序分析的终点。 3. Clock Setup Time (Tsu) 建立时间(Tsu):是指在时钟沿到来之前数据从不稳定到稳定所需的时间,如果建立的时间不满足要求那么数据将不能在这个时钟上升沿被稳定的打入触发器。如图3.2所示: 图3.2 建立时间图解 4. Clock Hold Time (Th) 保持时间(Th):是指数据稳定后保持的时间,如果保持时间不满足要求那么数据同样也不能被稳定的打入触发器。保持时间示意图如图3.3所示: 图3.3 保持时间图解 5. Clock-to-Output Delay(tco) 数据输出延时(Tco):这个时间指的是当时钟有效沿变化后,数据从输入端到输出端的最小时间

《现代SOC设计技术》学习小结

《现代SOC设计技术》学习小结 目录 一、SOC的概念 二、前端设计和后端实现 三、可测性设计 四、软硬件协同技术 五、验证技术 六、低功耗技术 七、IP复用技术 一、SOC概念 SOC(System on Chip)中文翻译为片上系统、系统级芯片等,由超大规模集成电路发展而来。从狭义上理解,SOC即把系统关键部件集成的到一张芯片上;而从广义上理解,SOC本身就是一个小型系统。 SOC的发展由市场和技术共同推动。20世纪90年代,计算机、通信、电子产品以及军事等领域需要大量高集成度的集成电路,于是集成电路向集成系统转变。这种转变的表现,一方面,IC品种增加、规模扩大、性能提高、上市时间缩短,并且IC标准化形成;另一方面,微电子技术不断发展,计算机性能提高,EDA综合开发工具性能提高,硬件描述语言公布。相比于IC,SOC具有的优势有:功耗低、体积小、速度快、功能丰富、节省成本。 IP核是SOC设计的基本单元。IP核是已经设计好经过验证的具

有特定功能的电路模块。在设计SOC时可以直接使用IP核。IP核分为软核、硬核和固核。软核指RTL级描述的核,一般是HDL代码,也就是源代码。它不依赖工艺,灵活性好,价格很贵。硬核指电路版图形式的核,不能被修改。它需要预先布局,可靠性高,价格低。固核介于软核和硬核之间,属于门级网表形式,固核需要使用者布局布线,有一定的灵活性。 SOC设计是基于核的设计,也就是将系统按功能分为若干块,组合不同的IP核,集成为特定功能的芯片的过程。但是这不意味着,简单的组合IP核就够了,还需要IP核的测试复用和结构上的精心设计。通常利用IP模块可以简化系统设计,但是对开发者理解IP模块有了更高的要求,时序一致性的问题也会凸显。这个问题推动了IP 模块的标准化。代表性的SOC标准化组织是美国的VSIA。 SOC的技术的特征有:复杂的系统功能、软硬件结合、含有一个或多个芯核(微处理器MPU、微控制器MCU、数字信号处理器DSP等)、采用深亚微米或超深亚微米工艺实现。 随着计算机、通信、手持设备等对IC的需求不断增加。IC的发展由元件到单元,再到RTL,现在为IP核。集成电路会继续朝着SOC 发展。 我国的SOC产业从20世纪90年代开始逐步发展。现在基本分为三大产业:设计、制造和封装。封装测试业占的比重约70%。在我国SOC发展的重点有高端通用芯片、网络通信、数字家电、信息安全、工业控制、生物医疗、IP核。

后端流程(初学必看)(DOC)

基本后端流程(漂流&雪拧) ----- 2010/7/3---2010/7/8 本教程将通过一个8*8的乘法器来进行一个从verilog代码到版图的整个流程(当然只是基本流程,因为真正一个大型的设计不是那么简单就完成的),此教程的目的就是为了让大家尽快了解数字IC设计的大概流程,为以后学习建立一个基础。此教程只是本人探索实验的结果,并不代表内容都是正确的,只是为了说明大概的流程,里面一定还有很多未完善并且有错误的地方,我在今后的学习当中会对其逐一完善和修正。 此后端流程大致包括一下内容: 1.逻辑综合(逻辑综合是干吗的就不用解释了把?) 2.设计的形式验证(工具formality) 形式验证就是功能验证,主要验证流程中的各个阶段的代码功能是否一致,包括综合前RTL代码和综合后网表的验证,因为如今IC设计的规模越来越大,如果对门级网表进行动态仿真的话,会花费较长的时间(规模大的话甚至要数星期),这对于一个对时间要求严格的asic设计来说是不可容忍的,而形式验证只用几小时即可完成一个大型的验证。另外,因为版图后做了时钟树综合,时钟树的插入意味着进入布图工具的原来的网表已经被修改了,所以有必要验证与原来的网表是否逻辑等价。 3.静态时序分析(STA),某种程度上来说,STA是ASIC设计中最重要的步骤,使用primetime对整个设 计布图前的静态时序分析,没有时序违规,则进入下一步,否则重新进行综合。(PR后也需作signoff 的时序分析) 4.使用cadence公司的SOCencounter对综合后的网表进行自动布局布线(APR) 5.自动布局以后得到具体的延时信息(sdf文件,由寄生RC和互联RC所组成)反标注到网表,再做静 态时序分析,与综合类似,静态时序分析是一个迭代的过程,它与芯片布局布线的联系非常紧密,这个操作通常是需要执行许多次才能满足时序需求,如果没违规,则进入下一步。 6.APR后的门级功能仿真(如果需要) 7.进行DRC和LVS,如果通过,则进入下一步。 8.用abstract对此8*8乘法器进行抽取,产生一个lef文件,相当于一个hard macro。 9.将此macro作为一个模块在另外一个top设计中进行调用。 10.设计一个新的ASIC,第二次设计,我们需要添加PAD,因为没有PAD,就不是一个完整的芯片,具体 操作下面会说。 11.重复第4到7步

Actel FPGA静态时序分析

1. 适用范围 本文档理论适用于Actel FPGA并且采用Libero软件进行静态时序分析(寄存器到寄存器)。 2. 应用背景 静态时序分析简称STA,它是一种穷尽的分析方法,它按照同步电路设计的要求,根据电路网表的拓扑结构,计算并检查电路中每一个DFF(触发器)的建立和保持时间以及其他基于路径的时延要求是否满足。STA作为FPGA设计的主要验证手段之一,不需要设计者编写测试向量,由软件自动完成分析,验证时间大大缩短,测试覆盖率可达100%。 静态时序分析的前提就是设计者先提出要求,然后时序分析工具才会根据特定的时序模型进行分析,给出正确是时序报告。 进行静态时序分析,主要目的就是为了提高系统工作主频以及增加系统的稳定性。对很多数字电路设计来说,提高工作频率非常重要,因为高工作频率意味着高处理能力。通过附加约束可以控制逻辑的综合、映射、布局和布线,以减小逻辑和布线延时,从而提高工作频率。 3. 理论分析 3.1 静态时序分析的理论基础知识 在进行正确的时序分析前,我们必须具备基本的静态时序的基本知识点,不然看着编译器给出的时序分析报告犹如天书。如图3.1所示,为libero软件给出的寄存器到寄存器模型的时序分析报告的截取,接下来我们会弄清楚每个栏目的数据变量的含义,以及计算方法。 图3.1 libero静态时序分析报告 3.1.1 固定参数launch edge、latch edge、Tsu、Th、Tco概念 1. launch edge 时序分析起点(launch edge):第一级寄存器数据变化的时钟边沿,也是静态时序分析的起点。

2. latch edge 时序分析终点(latch edge):数据锁存的时钟边沿,也是静态时序分析的终点。 3. Clock Setup Time (Tsu) 建立时间(Tsu):是指在时钟沿到来之前数据从不稳定到稳定所需的时间,如果建立的时间不满足要求那么数据将不能在这个时钟上升沿被稳定的打入触发器。如图3.2所示: 图3.2 建立时间图解 4. Clock Hold Time (Th) 保持时间(Th):是指数据稳定后保持的时间,如果保持时间不满足要求那么数据同样也不能被稳定的打入触发器。保持时间示意图如图3.3所示: 图3.3 保持时间图解 5. Clock-to-Output Delay(tco) 数据输出延时(Tco):这个时间指的是当时钟有效沿变化后,数据从输入端到输出端的最小时间间隔。 3.1.2 Clock skew 时钟偏斜(clock skew):是指一个时钟源到达两个不同寄存器时钟端的时间偏移,如图3.4所示:

MIPS程序设计报告

组成原理实验报告 姓名学号 陈宝可 07055004 刘睿 07055013 林建财 07055040 指导老师:姜欣宁 2010年4月22日

一、总体设计思想 1.1 CPU简介 CPU是计算机的核心,其重要性好比大脑对于人一样,它负责处理、运算计算机内部的所有数据。CPU的种类决定了操作系统和相应的软件。CPU主要由运算器、控制器、寄存器组和内部总线等构成,是PC的核心,再配上储存器、输入/输出接口和系统总线组成为完整的PC(个人电脑)。 单周期CPU 的特点是每条指令的执行只需要一个时钟周期,一条指令执行完再执行下一条指 令。再这一个周期中,完成更新地址,取指,解码,执行,内存操作以及寄存器操作。由于每个时钟上 升沿时更新地址,因此要在上升沿到来之前完成所有运算,而这所有的运算除可以利用一个下降沿外, 只能通过组合逻辑解决。这给寄存器和存储器RAM的制作带来了些许难度。且因为每个时钟周期的时 间长短必须统一,因此在确定时钟周期的时间长度时,要依照最长延迟的指令时间来定,这也限制了它 的执行效率。 下图是cpu设计的思路: 1.2系统主要框架 第一台电子计算机与1946年2月14日诞生至今,计算机的发展迅速,经历了电子管,晶体管管,集成电路,大规模集成电路,超大规模集成电路的时代,现在集成电路的设计已经接近极限,不过在发

展历程中,计算机的核心框架并没有太多的改变,仍然是由五大部件组成:存储器、运算器、控制器、I/O设备。设计过程中主要以CPU(运算器+控制器)为中心。 如图是计算机组成原理图: CPU 的功能: 设计的cpu主要是由ALU(运算器)和CU(控制器)两个核心部件构成,另外设计一些辅助器件。ALU处理整个计算机的计算,设计的ALU只能进行简单的算术运算,并不能够实现很强大的计算功能,CU是整个计算机的控制部分,它能够接收外界的响应,并控制计算机的其他部件完成特定的功能,CU 和ALU共同组成cpu的核心部件,处理整个计算机的事件。 CPU开发的进程: 设计初始时,成员讨论cpu所能实现的功能,cpu的组成部分,所需要的开发工具、语言、平台、参考资料等,明确了设计思想后,小组进行明确的分工,现在设计过程已经从最初的讨论进入初步的实践,小组成员正按照各自的分工进行cpu的设计开发。 设计成员的分工: 本小组由三名成员,林建财主要完成设计思路提出和最终的整合,陈宝可主要完成各个模块的设计,刘睿主要完成报告的编写以及提出相关的意见,设计过程中成员需要相互配合,相互支持分工没有明显的界限,成员可以扬长避短,各展所长。 CPU设计的工具: 现在存在很多的cpu开发语言,如VHDL硬件描述语言,V erilog HDL描述语言等等,它们都是非常优秀的开发工具,鉴于知识的局限性,这里只列出我们所学的工具。 Quartus® II design 是最高级和复杂的,用于system-on-a-programmable-chip (SOPC)的设计环境。QuartusII design 提供完善的timing closure 和LogicLock? 基于块的设计流程。QuartusII design是唯一一个包括以timing closure 和基于块的设计流为基本特征的programmable logic device

TimeQuest快速入门实例及时序查看

1.在quartus中对设计进行时序分析 2.1TimeQuest 工具 Quartus? II TimeQuest Timing Analyzer是一个功能强大的ASIC型时序分析工具,能够以工业标准方法论来约束,分析和报告用户设计中所有逻辑的时序性能。这个工具是一个严格的静态工具,使用时不需要搭建硬件环境及进行调试。本节将介绍如何使用Quartus II TimeQuest Timing Analyzer工具的图形化功能来约束,分析及报告设计中的时序结果。 使用这个工具,我们要指定初始时序信息,包括时钟,时序例外以及信号传输中的到达和要求的时间。我们通过后缀名为sdc(Synopsys Design Constraints)的文件来指定时序要求,然后The Quartus II Fitter将优化逻辑布局等来满足我们的时序要求。 在时序分析过程中,Quartus II TimeQuest Timing Analyzer分析设计中的每一条时序路径,计算每条路径的延迟,检查是否存在时序违例,并且报告时序结果。一旦发现时序违例,可以精确定位到违例路径的时序细节,然后用户约束它以纠正违例。如果时序分析没有报告违例,那么恭喜你,在这个器件中的逻辑行为将与你的设计意图一致。 使用TimeQuest分析设计时序的一般步骤为: 图使用TimeQuest分析设计时序的一般步骤第一次编译时我们需要得到没有设置约束的时序结果,有助于我们给设计添加约束。第二次编译的时序需要把包含指定时序要求的文件(后缀为sdc 的文件)添加到工程文件中执行编译,这样工具就能够按照我们的时序要求来进行映射了。 2.2timequest快速入门示例 下面我们按照altera公司所给的timequest快速入门教程示例来讲解该时序分析工具的大致用法。使用的工具是目前使用最广泛的quartusII9.1版本

逻辑设计心得

序 很早之前就想对这几个月工作经历写的东西,一是作为自己的总结,二是自己也很 想将自己这段时间的一些经历和大家分享一下,希望对初学者而言能使得他们能少走一 些弯路。只是公司里的事情很多,最近经常加班,所以一直拖到现在。 能来到这家公司应该是一种缘份--缘起NIOS。当初三月份altera来我们学校建立SO PC实验室的时候自己还不知道NIOS是什么东西,只是想在altera的FAE讲完NIOS后多问他几个时序约束的问题,然后拷一份PPT回去。但是想不到因为那一份NIOS的培训资料,我 认识了edacn上的cawan,他给我讲了很多NIOS的东西,之后是丁哥在SOC版帖了位NIOS大赛的通知,然后我和队友就去报了名,并去川大参加了NIOS的培训,认识了峻龙的FAE- ---也是我现在的boss。在这里要谢谢cawan、丁哥、和我一起参加NIOS竞赛的队友刘科 以及我的BOSS,是他们让我有了这一段的经历。 在公司里的几个月,做的项目其实不多,但是收获还是有一些,我觉得收获最大的是 设计理念的改变,这也是我这段时间最想总结的,我会在后面逐渐阐述。 时序是设计出来的 我的boss有在华为及峻龙工作的背景,自然就给我们讲了一些华为及altera做逻辑 的一些东西,而我们的项目规范,也基本上是按华为的那一套去做。在工作这几个月中 ,给我感触最深的是华为的那句话:时序是设计出来的,不是仿出来的,更不是湊出来 的。 在我们公司,每一个项目都有很严格的评审,只有评审通过了,才能做下一步的工 作。以做逻辑为例,并不是一上来就开始写代码,而是要先写总体设计方案和逻辑详细 设计方案,要等这些方案评审通过,认为可行了,才能进行编码,一般来说这部分工作 所占的时间要远大于编码的时间。 总体方案主要是涉及模块划分,一级模块和二级模块的接口信号和时序(我们要求 把接口信号的时序波形描述出来)以及将来如何测试设计。在这一级方案中,要保证在 今后的设计中时序要收敛到一级模块(最后是在二级模块中)。什么意思呢?我们在做 详细设计的时候,对于一些信号的时序肯定会做一些调整的,但是这种时序的调整最多 只能波及到本一级模块,而不能影响到整个设计。记得以前在学校做设计的时候,由于 不懂得设计时序,经常因为有一处信号的时序不满足,结果不得不将其它模块信号的时 序也改一下,搞得人很郁闷。 在逻辑详细设计方案这一级的时候,我们已经将各级模块的接口时序都设计出来了 ,各级模块内部是怎么实现的也基本上确定下来了。 由于做到这一点,在编码的时候自然就很快了,最重要的是这样做后可以让设计会 一直处于可控的状态,不会因为某一处的错误引起整个设计从头进行。 做逻辑的难点在于系统结构设计和仿真验证 刚去公司的时候BOSS就和我讲,做逻辑的难点不在于RTL级代码的设计,而在于系统 结构设计和仿真验证方面。目前国内对可综合的设计强调的比较多,而对系统结构设计

静态时序分析中路径延时的计算

静态时序分析中路径延时的计算 静态时序分析工具一般将电路网表看成一个拓扑图,图中的节点(node)代表电路中的引脚(pin)。节点之间的边(edge)表示时序弧(timing arc),有两种: # 连线延时(net delay)---驱动引脚(drive pin)和扇出(fanout)之间的连接 # 单元延时(cell delay)---输入引脚(input pin)和输出引脚(output pin)之间的连接 延时计算就是计算每条时序弧的值,可能是单元延时也可能是连线延时。通过累计这些延时可以计算时序路径(timing delay)的上升延时(rise delay)或下降延时(fall delay)。 正函数时序弧(positive unate timing arc): 将上升延时和上升延时相加,下降延时和下降延时相加。例如一个AND门单元延时和连线延时。 负函数时序弧(negative unate timing arc): 将新得到的上升延时和原来的下降延时相加,而新得到的下降延时和原来的上升延时相加。例如NAND门。 非函数时序弧(non-unate timing arc): 将原来的延时和新得到的最差情况延时(worst-case delay)相加。非函数时序弧出现在不能从输入量的变化预测输出端逻辑值变化的地方,例如XOR门。 下图展示了一个电路逻辑网络是如何转化成一张时序图的: 非线性延时模型(nonlinear delay model): 非线性模型是供应商以查表(lookup table)形式在工艺库中提供的延时信息,它和时序分析计算有着紧密的联系。 总的延时包含了单元延时和连线延时:

静态时序分析(Static Timing Analysis)基础及应用

静态时序分析(Static Timing Analysis)基础及应用 ◎陈麒旭 前言 在制程进入深次微米世代之后,芯片(IC)设计的高复杂度及系统单芯片(SOC)设计方式兴起。此一趋势使得如何确保IC质量成为今日所有设计从业人员不得不面临之重大课题。静态时序分析(Static Timing Analysis简称STA)经由完整的分析方式判断IC是否能够在使用者的时序环境下正常工作,对确保IC质量之课题,提供一个不错的解决方案。然而,对于许多IC设计者而言,STA是个既熟悉却又陌生的名词。本文将力求以简单叙述及图例说明的方式,对STA的基础概念及其在IC设计流程中的应用做详尽的介绍。 什么是STA? STA的简单定义如下:套用特定的时序模型(Timing Model),针对特定电路分析其是否违反设计者给定的时序限制(Timing Constraint)。以分析的方式区分,可分为Path-Based及Block-Based两种。 先来看看Path-Based这种分析方式。如图一所示,信号从A点及B点输入,经由4个逻辑闸组成的电路到达输出Y点。套用的Timing Model标示在各逻辑闸上,对于所有输入端到输出端都可以找到相对应的延迟时间。而使用者给定的Timing Constraint为: 1.信号A到达电路输入端的时间点为2(AT=2,AT为Arrival Time)。 2.信号B到达电路输入端的时间点为5(AT=5)。 3.信号必须在时间点10之前到达输出端Y(RT=10,RT为Required Time)。

现在我们针对P1及P2两条路径(Path)来做分析。P1的起始点为A,信号到达时间点为2。经过第1个逻辑闸之后,由于此闸有2单位的延迟时间,所以信号到达此闸输出的时间点为4(2+2)。依此类推,信号经由P1到达输出Y的时间点为7(2+2+3)。在和上述第三项Timing Constraint比对之后,我们可以得知对P1这个路径而言,时序(Timing)是满足使用者要求的。 按照同样的方式可以得到信号经由路径B到达输出Y的时间点为11(5+1+3+2),照样和上述第三项Timing Constraint比对,我们可以得知对P2这个路径而言,Timing 是不满足使用者要求的。 对图一的设计而言,总共有6个信号路径。对于采用Path-Based分析方式的STA 软件来说,它会对这6个信号路径作逐一的分析,然后记录下结果。IC设计者藉由检视其分析报告的方式来判断所设计的电路是否符合给定的Timing Constraint。由于最常用来做静态时序分析验证核可(STA Signoff)的EDA软件PrimeTime?采用Path-Based的分析方式,所以本文将以Path-Based的分析方式介绍为主。 再来看看Block-Based的分析方式。此时时序信息(Timing Information)的储存不再是以路径为单位,而是以电路节点(Node)为单位。由Timing Constraint我们仅能得知A节点的AT为2,B节点的AT为5以及Y节点的RT为10。Block-Based的分析方式会找出每个节点的AT和RT,然后比对这两个数值。当RT的值大于AT时表示信号比Timing Constrain中要求的时间还早到达,如此则Timing是满足的,反之则不满足。 STA资料准备 在做STA之前,我们必须对其准备工作有充分的了解。STA所需的资料如图三所示,以下我们分项说明。其中Design Data部分,由于Block Model和STA软件相关性太高,我们不在此加以说明,请直接参阅您STA软件的使用手册。

PrimeTime_的基本概念

PrimeTime 的基本概念 一、定义设计环境 在对设计作时序分析之前,必须要定义好设计环境以使得在那些情况下满足 限制条件。 通过以下这些信息来说明设计环境: 时钟:时钟波形和时钟信号的性质; 输入、输出延迟:信号到每个输入端口的时间从每个输出端口离开所需的时间。这些时间是用一个时钟周期的相对量表示的; 输入端口的外部驱动:每一个输入端口的驱动单元或驱动电容,还可以用一个确定的过渡时间来表示; 电容负载:输入或输出端口的外部电容; 运作条件:环境特性(工艺、温度和电压); 连线负载电容:用来预测布局布线后每一条连线的电容和电阻。 下图展示了用来定义设计环境的命令: 二、时序声明 通常当前设计只是一个更大电路的一部分。时序声明提供了时钟和输入、输 出延时的信息。在将设计建立起来之后,可以进行时序声明。 为了进行时序声明,包括以下一些内容: 说明时钟信息 描述一个时钟网络 说明时钟门锁(Clock-Gating)的建立和保持时间(Setup and Hold Checks) 建立内部生成的时钟 说明输入延时 说明时钟端的输入延时 说明输出延时 三、时序例外(Timing Exceptions) PrimeTime缺省地认为所有的电路都是单时钟周期的。这意味着电路在一个 时钟周期之内将数据从一条路径的开始端传递到结束端。 在某些情况下,电路不是工作在这样的方式下。对具体的一条路径来说不适用单始终周期时序,所以必须对这

些缺省的时序假设作例外说明。否则,时序分析将不能反映真实电路的工作情况。 主要有以下一些内容: 单时钟周期(缺省)路径延时限制 设置失败(False)路径 设置最大和最小路径延时 设置多时钟周期路径 路径说明方法 有效地说明例外情况 例外情况的优先级 报告例外情况 忽略例外情况 去除例外声明 四、报告的生成 在定义了时序声明和例外情况之后,可以生成时序分析报告,有助于定位设 计中的违规之处。在进行时序分析的时候,PrimeTime会跟踪电路中所有的路径,然后根据电路说明、库、声明和例外情况计算设计的延时。 有以下一些内容: 检查设计约束 报告时序检测的覆盖率 生成路径时序报告 去除有寄存器的路径上的时钟扭斜(Skew) 生成瓶颈报告 进行快速时序升级(Fast Timing Updates) 生成约束报告 生成设计信息报告 生成连线负载报告 生成时序例外情况报告 报告最大扭斜检查(Maximum Skew Checks) 报告不变的时序检查(No-Change Timing Checks) 报告失效的时序弧(Disabled Timing Arcs) 显示情形分析设置 观察扇入逻辑 观察扇出逻辑 显示层次参考(Hierarchical References) 报告单元参考(Cell References) 生成总线报告 生成反标延时和检查报告(Annotated Delay and Check Reports) 生成模式分析报告(Mode Analysis Reports) 生成库的报告 生成延时计算报告 以路径(Paths)来生成定制报告 禁止和恢复时钟门锁、去除检查时钟门锁

统计静态时序分析(SSTA)概述

统计静态时序分析(SSTA)概述 摘要 是否曾想过为什么一个设计能够以高于设计团队承诺的频率工作?为何该设计团队不能将这个更高的频率当作要实现的目标? 过去,静态时序分析被用来分析SoC是否能够在规定的目标频率工作。时序验收要么在最差情况(WCS),要么在最佳情况(BCS)下完成。通常,这些与三西格玛区域对应。当然,为了结束这些情况下的时序,可能进行了大量过度设计。 统计静态时序分析(SSTA)尝试采用一种方法来减少这种不必要的过度设计,因此努力让设计变得更加切合实际,并同时帮助提高目标频率。 什么是统计静态时序分析? 过去几十年里,静态时序分析(ST A)一直是用来结束数字电路时序的一种常用方法。 但由于几何尺寸缩小到45nm甚至更小,现在要结束时序变得越来越困难了。STA和工艺数量的增加,使得整个情形变得更为复杂。 之所以出现这样的复杂情况,是因为要在高级技术节点上实现工艺变化变得异常困难了。现在共有两种变化: 1.芯片到芯片变化 2.芯片内变化 这两种变化又可以进一步划分为: 1.系统性变化 2.随机性变化 其中的部分变化目前仍算在传统的STA方法内。SST A尝试按概率分布来考虑所有这些变化。 基本上,SSTA会计算概率函数,以计算每个节点上每个信号的到达时间。如果设计达到规定的目标频率,根据到达时间的概率分布函数,就能将它计算出来。 例如,如果概率为97%,那么最小余量的信号的到达时间为5ns;到达时间为4ns的概率为10%。这意味着200MHz的目标频率其得到的概率应为97%,250MHz的目标频率其概率为10%。 变化: 临界尺寸的扩展速度超过了我们的控制。现在随着技术节点的减少,互连变化与有源门相比,它正逐渐占据主导地位。 由于互连开始占主导地位,时序的临界变量不只限于晶体管的临界尺寸,同时包括线段尺寸和实际形状以及附近网络的数量。 金属宽度、金属厚度、经电阻、绝缘高度都具有不同的金属层属性。晶体管的类似属性包括晶体管长度、宽度、掺杂密度和门氧化层厚度。

相关文档
最新文档