|
增量编译:
选择Setting->Compilation Process Setting,勾选Use smart Compilation,智能编译就是增量编译
assignment->design partitions window 打开partition窗口
增量编译主要用到的两个工具——Design Partition和LogicLock。


首先要提出一个概念,网上大多对增量编译的简要说明是:采用LogicLock进行增量编译。这是错误的看法!LogicLock并不是增量编译的一部分,只是在增量编译过程中建议使用LogicLock!
另外,上一篇里面提到关于增量编译原理个人的理解:将整个工程分成多个“逻辑区域”,然后每次编译中通过设定各个区域的网表类型来决定本次编译是否对该区域重新执行,“增量编译”是针对整个工程在设计过程中后一次编译与前一次编译的一个“增量”过程,其实Altera的官方名称应该叫——“渐进式编译模式”。
那从对原理的理解就可发现,其实我们只要用到Design Partition就可以完成“增量编译”了。下面简单介绍如何使用Design Partition工具:
首先,得对整个工程进行一次全编译(也可不编译,只进行顶层模块的分析,如下图有左边标出的小图标则可点开分析顶层模块下的子模块),经Analysis过程Quartus可自动分析出整个工程顶层模块下含有哪些子模块;

然后,便通过Design Partition对子模块进行“逻辑分区”。一般情况下,我们可以直接将上一步中分析出的子模块设定成“逻辑区域”;

设定好了以后打开Design Partition Window可看到如下图:

它的结构图与Project Navigator里的很像,有一个TOP模块,下面还有我们设定的各个小区域。表中的各列参数则是对各区域形式的一个设定,其中最关键的一个设定是Netlist Type,它有四个可选值——Source File,Post-Synthesis,Post-fit,Empty(如上图中所标1,2,3,4,上图是为了将各Type全面的显现出来,而不是最终设定)。它们各自的含义是:
Source File:如果源代码未修改,则仅不重新Analysis,还需进行Synthesis和Fitter;
Post-Synthesis:如果源代码未修改,不需重新Analysis、Synthesis,结果只进行Fitter;
Post-Fit:如果源代码未修改,保留前次Analysis、Synthesis、Fitter结果;
Empty:标志为空分区,编译时将忽略此分区。
这样我们就很明白了,其实要想达到“增量编译”的目的,只需将各个子模块设置在Design Partition里,并将未进行修改的各个模块设定成Post-fit,而修改过的模块设定为Source File。需要注意的是,顶层模块TOP的状态也需设定为Post-fit。
大家可以试试效果,个人试验的效果很显著……原来编译一次需5分多钟,这样的方法如果只改变一个分区的内容,只需1分多钟。
如何在Signaltap ii中添加状态机
To add pre-synthesis finite state machine (FSM) signals to the configuration file, perform. the following steps after running Analysis and Elaboration on your design:
Create a new SignalTap II File (.stp) or use an existing SignalTap II File.

Note: Any SignalTap II Files that the MegaWizard Plug-In Manager creates from instantiations are not supported for this feature.
In the SignalTap II setup tab, right-click anywhere on the node list and select “Add State Machine Nodes”. The Add State Machine Nodes dialog box lists all the FSMs that have been found in your design.

Note: For the SignalTap II GUI to detect pre-synthesis state-machine signals, perform. Analysis and Elaboration of your design.
From the Netlist pull-down menu, select Pre-Synthesis.
Select the desired FSM.
Click OK. This adds the FSM nodes to the configuration file. A mnemonic table is automatically applied to the FSM signal group.