国产FPGA高云GW1N-4系列开发板测评之——软件篇2
<p style="text-indent:31.0pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">对于简单的设计,物理约束我们可能只需要绑定一下管脚、电平,时序约束我们只需要约束一下主时钟即可满足设计和时序的要求,但是对于复杂些的设计,物理约束不仅仅关注管脚电平还需要关注管脚的具体配置,而时序约束也不仅仅是主时钟约束这么简单,往往还有时序例外,输入输出延时等等,一般来说最终的设计往往会充分的消耗FPGA的资源,这样会造成布线时序都会很紧张的情况,可以说一个设计大部分时间都会花在调整时序的路上,所以物理时序约束是FPGA设计中非常重要的一点,今天我们来着重学习一下高云软件物理约束和时序约束相关知识<font color="#001000" face="-apple-system,SF UI Text,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif,SimHei,SimSun" size="3">。</font></span></span></span></span></span></span></span></span></p><p style="text-indent:31.0pt; text-align:justify"> </p>
<p style="text-indent:31.0pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">首先是物理约束部分:</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">我们新建示例工程counter,这里有一点建议就是新建工程不能默认打开定位到之前的目录下要从新手动定位很不方便。</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">module counter1(out, cout, data, load, cin, clk, ce, clko);</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">output out;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">output cout;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">output clko;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">input ce;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">input data;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">input load, cin, clk;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">reg out;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">always @(posedge clk) </span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">begin </span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">if (load)</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">out = data;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">else</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">out = out + cin;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">end</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">assign cout = &out & cin;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">wire clkout;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">CLKDIV clkdiv_inst (</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">.CLKOUT(clkout),</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">.HCLKIN(clk),</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">.RESETN(1'b1),</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">.CALIB(1'b0)</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">);</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">defparam clkdiv_inst.DIV_MODE = "2";</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">defparam clkdiv_inst.GSREN = "false";</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">DQCE dqce_inst (</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">.CLKOUT(clko), </span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">.CLKIN(clkout), </span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">.CE(ce)</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">);</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">endmodule</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt"> 工程中包含一个8位计数器,一个时钟分频器原语例化,一个动态象限时钟使能原语例化(这两个原语例化后面时钟资源篇我们也会讲到)。</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">综合后打开FloorPlanner物理约束编辑器。</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">高云云源软件提供FloorPlanner物理约束编辑器,支持对I/O、原语、Group等属性及位置信息读取、编辑以及生成新的约束文件。打开后会在工程文件夹下生成一个物理约束文件.cst</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">高云云源软件不像vivado那样有很多自动布线策略,它没有可选择的余地,所以复杂设计中要让时序收敛必然会更多的通过调整时序和物理约束(手动布线)来达到时序收敛的目的,</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">接下来我们通过FloorPlanner的学习来了解怎样进行物理约束以及各种物理约束的意义</span></span></span></span></span></span></span></span></p>
<ol>
<li style="margin-left:8px; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">I/O</span></span></span></span></span><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">约束</span></span></span></span></span></span></span></span></li>
</ol>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">单击IO Constraints 编辑窗口,(1)Location约束可以结合Chip Array窗口将选中的Port拖拽至Chip Array窗口对应的位置,位置可以是几个端口(软件最终选择端口编号大的那个,后面我们验证一下),(2)Location约束可以直接在IO Constraints 编辑窗口Port后面的Location栏双击直接填需要绑定的位置,多个位置用英文逗号隔开,属性约束可以直接在Port端口后面对应的属性栏修改。(3)Location约束和属性约束还可以直接在.cst文件中用语法的方式添加如下:</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">IO_LOC “obj_name” obj_location ;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">IO_LOC “obj_name” obj_location ;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">2</span></span></span></span></span><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">、原语约束</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">单击Primitive Constraints 编辑窗口,(1)右键选择 Select Primitives,在下拉列表框中选择需要约束的原语即可对其进行位置位置约束,可以在Chip Array窗处于Constraints视图状态下直接拖拽到约束的位置,或直接在Locations输入位置,(2)原语位置约束还可以直接在.cst文件中用语法的方式添加如下:</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">INS_LOC “obj_name” obj_location ;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">3</span></span></span></span></span><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">、原语组约束</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"> <span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">单击Group Constraints 编辑窗口(1)右键New Primitive Group,输入组名添加组成员即可添加一条原语组约束,同样右键New Relative Group输入组名添加组成员即可添加一条相对组约束(2)原语组约束和相对位置约束还可以直接在.cst文件中用语法的方式添加如下:</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">GROUP group_name = { “obj_names ” } ;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">GROUP group_name += { “obj_names ” } ;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">GRP_LOC group_name group_location;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">REL_GROUP group_name = { “obj_names ” };</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">REL_GROUP group_name += { “obj_names ” };</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">INS_RLOC “obj_name” relative_location;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">其中原语组约束好说就是将几个成员都约束到相同绝对位置,而相对位置组约束就是以位置最小的成员为相对位置原点及GRID角标最小的,其他成员约束到相对于这个原点的某个位置上(角标相减得相对位移,用起来很奇怪,感觉不大实用)如下图:</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">4</span></span></span></span></span><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">、资源预留约束</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"> <span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">单击Resource Reservation 编辑窗(1)右键Resource Resources,在Chip Array 窗处于Constraints视图状态下拖拽约束至需要预留的位置即可,或在Locations栏直接编辑位置(2)资源预留位置约束还可以直接在.cst文件中用语法的方式添加如下:</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">LOC_RESERVE location [ res_obj ];</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">保留一部分资源让布线布局不使用,这个约束还是很有用的</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">5</span></span></span></span></span><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">、全局时钟分配约束</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"> <span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">单击Clock Assignment 编辑窗(1)右键Resource Resources,选择net选择type选择signal即可(2)全局时钟分配约束还可以直接在.cst文件中用语法的方式添加如下:</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">CLOCK_LOC “net_name” global_clocks = fanout ;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">这个约束可以将某些重要路径路由到全局时钟资源上,对时序收敛是有很有效的。</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">6</span></span></span></span></span><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">、时钟象限约束</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"> <span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">单击Quadrant Constraints编辑窗(1)右键Select Dcs/Dqce,选择DCS或DQCE,然后在Position 下方选择象限即可(2)时钟象限约束还可以直接在.cst文件中用语法的方式添加如下:</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">INS_LOC “obj_name” quadrant;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">这个约束主要是对动态时钟控制器这个原语进行象限的约束。</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">7</span></span></span></span></span><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">、高速时钟约束</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"> <span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">单击Hclk Constraints 编辑窗(1)右键Select Hclk,选择DCS,然后在Position 下方选择位置即可(2)高速时钟约束还可以直接在.cst文件中用语法的方式添加如下:</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">INS_LOC “obj_name” location;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">这条约束主要针对CLKDIV、DLLDLY约束到相关位置</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">8</span></span></span></span></span><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">、参考电压约束</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"> <span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">单击Vref Constraints编辑窗(1)右键Define Vref Driver,在Chip Array 视图的Constraints视图状态下拖拽到参考的端口位置或直接在Locations栏编辑相应位置即可(2)参考电压约束还可以直接在.cst文件中用语法的方式添加如下:</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span lang="EN-US" style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">USE_VREF_DRIVER vref_name ;</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">这条约束的作用是为各个Bank选择外部参考电压,一般情况下不会用到,</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt"> 以上就是高云云源软件物理约束的内容,当然,这些约束在设计中不是必须全都有的还有配合时序约束收敛及功耗等情况适当添加,下一篇我们继续学习时序约束部分</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="text-justify:inter-ideograph"><span style="font-size:14.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:#444444"><span style="letter-spacing:.75pt">下面演示当端口约束到几个IO时软件会最终会选择哪个IO:</span></span></span></span></span></span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"></p>
<p>楼主花了不少时间呀,还是比较用心的,我不是做软件的,还是要支持下你!</p>
Fred_1977 发表于 2021-12-26 11:22
楼主花了不少时间呀,还是比较用心的,我不是做软件的,还是要支持下你!
<p>谢谢!没啥,学习记录了一下罢了<img height="52" src="https://bbs.eeworld.com.cn/static/editor/plugins/hkemoji/sticker/facebook/titter.gif" width="48" /></p>
页:
[1]