在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 7875|回复: 16

可编程逻辑器件设计技巧(中

[复制链接]
发表于 2006-10-8 20:25:14 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
可编程逻辑器件设计技巧(中)
                --转自电子工程专辑

21.              用MAXPLUSII或QUARTUS多次编译同一设计生成的带延时的网表文件中的延时是否一样?
答:用MP2或QII多次编译同一设计成的带延时的网表文件中的延时是一样,  但要保证该网表文件没有修改过.

22.              在编译前设定一个模块的Synthesis Style为FAST是否一定比不设定(NONE)要节省LC资源?
答:在布局布线的过程中, Synthesis Style的设置会影响到资源的利用率和速度的快慢,  一般情况下:设置为FAST主要是为了提高设计的速度.  在软件中除了综合类型的设置,  还有一项是选择优化的目的:oPTIMIZE->AREA OR SPEED. 选择AREA可以节省设计所占用的资源.  

23.              Altera公司对芯片热设计有哪些资料和工具?
答:ALTERA提供了许多计算功耗的资料和工具. 数据手册中的AN74就是关与计算ALTERA器件功耗的专门文档.  

24.              如何在设计前期分析芯片的功耗?
计算功耗的工具: ALTERA提供的QUARTUS软件就有计算功耗的功能,  它可以根据你不同的激励项量来计算功耗; 在ALTERA 的网叶上就有专门计算功耗的运算器,  请点击相关文章 它就给出了APEXII的功耗计算方法.  

25.              看过“FLEX PCI Development Board”的参考设计原理图, 它利用了条线开关选择配置方式. 既然两种配置方式管脚并没有公用, 为何需要这个跳线开关呢?
答:EPC2不会影响到用下载电缆通过JTAG口配置EPF10K30A. 使用跳线开关是在选择给10K30A下载的方式,  是通过下载电缆还是EPC2.  
因为将ECP2与10K30A连接成JTAG菊花链的形式通过下载电缆下载和用EPC2对10K30A下载的连接方式是不同的, 所以要将这两者分开,  详细的连接方法应该在参考设计原理图中已经描绘的很清楚了.  

26.              为了保证设计可靠性, 需要重点关注哪些方面?  
答:Here are a few guidelines for reliable FPGA design(关于可靠性FPGA设计的几点建议)
①                  Use fully synchronous design.  Asynchronous design is very sensitive to path delay and is therefore not robust.  An example of asychronous circuit is the SR latch which uses combinational feedback. (使用完全同步设计. 异步设计对路径延迟非常敏感, 因此不很可靠. 异步电路的一个例子是使用组合反馈的SR闭锁. )
②                  Never gate your clock signal with combinational logic.  Glitches may occur on any gated clock signals,  which results in false triggering of flip-flops. (绝不使用组合逻辑控制时钟信号. 因为在任何门控制时钟信号上可能产生短时脉冲干扰, 最终导致错误触发flip-flop. )
③                  Never rely on gate delay. (绝不要依靠门延迟. )
④                  Enough bypass capacitors should be placed close to the power and ground pins of FPGA.  Use capacitors with good high frequency response. (FPGA的电源和接地引脚附近应该放置足够多的旁路电容器. 使用优质高频响应电容器. )
⑤                  Always use the global clock buffers on the FPGA to drive internal clock signals.  These clock buffers and the associated clock distribution network have been carefully designed to minimize skew. (在FPGA上始终使用全局时钟缓冲来驱动内部时钟信号. 并且已经仔细设计了这些时钟缓冲和关联时钟配电网, 以将畸变减至最小. )

27.              You said "An example of asychronous circuit is the SR latch which uses combinational feedback".  How do I learn SR latch ? What is the difference between SR latch and SRFF? (“异步电路的一个例子是使用组合反馈的SR闭锁”. 请问如何理解SR闭锁?SR闭锁与SRFF有什么区别?)
答:A latch changes states whenever the gate signal is active.  A FF changes states only at clock edges. (参考译文:只要门信号是活动的, 闭锁就会更改状态. 而FF只有在时钟边沿才更改状态. )

28.              Xilinx公司的芯片在热设计方面可以提供哪些工具和资料?
答:For thermal consideration,  you need to know the power consumption of your FPGA and the thermal resistivity of the device package you are using.  The power consumption can be estimated by the XPower tool included in Xilinx ISE software.  The thermal resistivity of the device package can be found in Xilinx databook.  The junction temperature can then be calculated by the following formula(至于散热问题, 需要了解所用FPGA的功耗和正在使用的器件封装的热阻系数. Xilinx ISE软件中所包含的Xpower工具可以估计功耗. 在Xilinx数据手册中可以找到器件封装的热阻系数. 然后利用下面的公式计算接合温度. )
P = (Tj - Ta) / THETAja    其中, P=功耗;Tj=接合温度;Ta=环境温度;THETAja = 封装的热阻系数
You can then detemine if the junction temperature falls within the acceptable region.  The maximum acceptable junction temperature is different for C and I grade devices.  If it is higher than the max.  acceptable temperature,  you may consider adding a heatsink or cooling fan.  (之后确定接合温度是否在允许范围内. C和I级器件允许的最高接合温度不同. 如果温度高于允许的最高值, 可能需要增加散热片或风扇. )

29.              如果时钟进入FPGA后经过一段组合逻辑才上时钟网络, 会存在一定的延时. 综合布线后会出现信号输入延时为负值, 意味着信号比时钟先到达触发器. 那么, 怎样通过约束文件增加输入信号的延时呢?我试过对"NET"加上"MEDDELAY"的约束, 但是没效果.  
答:Gating the clock signal with combinational logic is not recommended in modern high speed digital design since it may creates glitches on the gated clock signal,  which results in false triggering of flip-flops.  This results in a less reliable design.  A common technique to remove gated clock is to make use of the clock enable pin of the flip-flop.  For example,  if you have a signal clko = clki & a & b driving the clock pin of a flip-flop,  you can eliminate the gated clock by feeding clki directly to the FF clock pin,  and have another signal en = a & b connected to the clock enable pin of the FF. ( 参考译文:在现代高速数字设计当中, 不建议使用组合逻辑门控时钟信号, 因为这将会在选通的时钟信号上产生短时脉冲波形干扰, 导致错误触发flip-flop. 这是缺乏可靠性的设计. 移除门控时钟通常所采用的技巧是使用flip-flop的时钟使能引脚. 例如, 如果有一个信号clko = clki & a & b 正在驱动flip-flop的时钟引脚, 则可以通过直接将clki传递给FF时钟引脚, 并将另一个信号en = a & b与FF的时钟使能引脚连接, 来消除门控时钟. )
By removing the gated clock,  you no longer have the problem of clock delay.  Also the design is more robust.  (移除门控时钟后, 就不再有时钟延迟的问题了. 而且这种设计也比较可靠. )

30.              FPGA生产产商提供了IP, 如何用第三方软件, 如Advantage 或 ACTIVE vhdl, 调用并进行仿真?
答:The IPs provided by Xilinx,  e. g.  PCI,  come with simulation models which can be processed by 3rd part simulation tools like Modelsim.  So there is no problem for functional simulation.  Timing simulation can be done by exporting the post-layout vhdl/verilog model from Xilinx ISE software.  In some cases,  sample testbenches are also included. (参考译文:Xilinx提供的IP, 例如PCI, 是与仿真模型一同提供的, 这种模型可由第三方仿真工具, 如Modelsim来处理. 因此对功能仿真来说, 没有问题. 通过从Xilinx ISE软件中导出post-layout vhdl/verilog可以执行定时仿真. 在某些情况下, 也包括样本测试平台. )

31.              “As a good design practice,  never use gate delay to implement your delay logic under all circumstances”.  Please tell me what does "gate delay"(闸) mean?(“一个好的设计, 在所有情况下都决不会使用门延迟来实现延迟逻辑. ”此处“门延迟”是什么意思?)
答: “By "gate delay" I mean using a series of logic gates to introduce certain amount of delay in the design.  This is highly undesirable since gate delay changes with factors like temperature and process technology.  The design may fail as temperature changes or using a different version silicon.  Also designs relying on gate delay are not portable,  meaning that you need to re-design the whole circuit whenever you want to change to another product series or part number,  simply because the gate delay changes as well. (参考译文:“门延迟”指得是使用一系列逻辑门将一定数量的延迟导入到设计中. 既然门延迟更改像温度和处理技术这样的因素, 所以, 这是很不合适的. 由于温度的改变或使用不同版本的芯片, 设计可能会失败. 依赖门延迟的设计也不是可移植的, 也就是说, 要更改另一产品系列或部件号时, 需要重新设计整个电路, 只因为更改了门延迟. )
Always use fully synchronous design.  You never need to reply on gate delay if your design is fully synchronous. (始终使用完全同步设计. 如果设计是全同步的, 则无需回应门延迟. )
 楼主| 发表于 2006-10-8 20:26:13 | 显示全部楼层

接上面的:

32.              This time I download another program to another chip SpartanII XC2S50PQ208 in another circuit, while it fails, and show the following message: ". . .  Checking boundary-scan chain integrity. . . ERROR:JTag - Boundary-scan chain test failed at bit position '3' on instance '***'(a substitute for the real name of file).  A problem may exist in the hardware configuration.  Check that the cable,  scan chain,  and power connections are intact,  that the specified scan chain configuration matches the actual hardware,  and that the power supply is adequate and delivering the correct voltage.  ERROR:JTag - Boundary scan chain has been improperly specified.  Please check your configuration and re-enter the boundary-scan chain information.  Boundary-scan chain validated unsuccessfully.  ERROR:JTag - : The boundary-scan chain has not been declared correctly.  Verify the syntax and correctness of the device BSDL files,  correct the files, reset the cable and retry this command. " With so many messages, I don't know what to do! I try many times but only fail, and doubt whether there is something wrong with the circuit?But the powers checked in circuit are right.  Would you please give me some advice to crack the problem?(有一次, 将程序下载至SpartanII XC2S50PQ208芯片电路, 结果发生了故障, 并显示以下消息:“. . .  Checking boundary-scan chain integrity. . . ERROR:JTag - Boundary-scan chain test failed at bit position '3' on instance '***'(实际的文件名)”. 问题可能在硬件配置. 检查了连线、扫描链路和电源接头都没有问题. 特定的扫描链路配置与实际的硬件相匹配, 电源充足且电压正常. “ERROR:JTag - Boundary scan chain has been improperly specified.  Please check your configuration and re-enter the boundary-scan chain information.  Boundary-scan chain validated unsuccessfully.  ERROR:JTag - : The boundary-scan chain has not been declared correctly.  Verify the syntax and correctness of the device BSDL files,  correct the files, reset the cable and retry this command. ”这么多出错消息, 什么原因, 怎么办?)
答:Usually it is the result of a broken JTAG chain or noisy chain.  Most commonly,  the cable is not connected properly,  a trace is not correct on the board,  other devices in the chain are causing a problem,  or a noisy parallel port exists.  Try using a different PC.  You can also add a 4. 7K pullup on the PROG pin of the FPGA and see if it helps.  (通常, 这是由于中断的JTAG链或噪声链. 最常见的原因是, 连线不正确, 板子上的迹线不正确, 链路中的其它器件导致问题, 或者存在噪声并口. 试一下使用不同的PC. 也可以在FPGA的PROG引脚上增加一个4. 7K的上拉电阻, 看看是否有帮助. )
33.              在VHDL中, 定义为SIGNAL的量起到什么作用?什么时候需要定义这个量?下面的程序
ARCHITECTURE EXER2_ARCH OF EXERCISE2 IS
SIGNAL TEM: STD_LOGIC;
BEGIN
TEM<=PIN50 AND PIN51;
PIN8 <=TEM;
END EXER2_ARCH;
和如下的程序有何区别?
ARCHITECTURE EXER2_ARCH OF EXERCISE2 IS
BEGIN
PIN8<=PIN50 AND PIN51;
END EXER2_ARCH;
答:If PIN8 is declared in your port list,  the 2 examples are identical.  From a hardware design's perspective,  you can think of a vhdl "signal" as an electrical signal.  So basically you can declare every object as "signal".  >From a simulation's perspective,  there is a fundamental difference between "signal" and "variable" in vhdl.  A variable is nothing more than an object that holds a value.  A variable assignment occurs instantly in a vhdl simulation.  Also,  a variable can only exist within a process,  so it cannot transfer values across processes.  A signal,  on the other hand,  has a history of values.  Whenever a signal assignment occurs,  the vhdl simulator schedules an event to update the signal value after a certain period of simulation time - the signal does not get this new value instantly in the simulation time domain.  Also,  a signal can exists outside processes.  Sounds complicated,  but for most of the time you can simply use vhdl "signal" in your hardware design.  (参考译文:如果在端口表中声明了PIN8, 这两个示例是一样的. 从硬件设计的角度看, 可以将vhdl "signal"视为电子信号. 因此, 基本上可以将每个对象声明为“signal”. 从仿真角度看, vhdl中的"signal" 与 "variable"是根本不同的. 变量只不过是拥有值的对象. 变量分配即时出现在vhdl仿真中. 而且, 变量只能存在于一个过程内, 因此它不能通过过程来传递值. 另一方面, 信号有多个值. 不论何时分配信号, vhdl仿真都会在某个仿真时段安排一个事件来更新信号的值. 在仿真时域里, 信号不会立即获得这个新的值. 而且信号可以存在于过程之外. 听起来好象有点复杂, 但大多数时候, 在硬件设计中可以只使用vhdl "信号". )

34.              如果输入时钟必须经过一段组合逻辑(比如需要进行时钟选择, 可选外部或内部时钟), 那么在DFF使能端加控制是无法解决的, 有什么更好的方法?
答:A simple answer is to use the BUFGMUX resource in Xilinx VirtexII devices.  The BUFGMUX is actually a global clock buffer in VirtexII which incoporates a smart mux to switch between 2 clock sources.  More importantly,  the BUFGMUX guarantees glitch-free switching between these 2 clocks,  even though the select signal changes asynchronously. (参考译文:简单的方法是使用Xilinx VirtexII器件上的BUFGMUX资源. BUFGMUX实际上是VirtexII中的全局时钟缓冲, VirtexII将智能mux与2个时钟源之间的切换相结合. 更为重要的是, 即使选择信号更改不同步, BUFGMUX也能保证这两个时钟之间的无干扰切换. )

35.              用Altera器件设计一个电路, 外挂一同步存储器件. 逻辑设计和存储器件的时钟是相同的, 但由于时钟信号带负载能力较差, 只能接一个负载, 所以将时钟信号接在可编程器件上, 而用内部赋值语句将时钟信号赋值给某一引脚, 此引脚信号再接到存储器件的时钟引脚, 但这样存在一个问题:存储器件的读写信号相对于Altera器件上的时钟信号有延迟, 存储器件的时钟信号相对于Altera器件上的时钟信号也有延迟, 这样存储器件的时钟信号与读写信号之间的时间差难以控制, 极有可能不满足存储器件的Setup/hold时间, 有什么好的方法解决此问题?
答:可以利用ALTERA器件中的PLL来精确控制延时.  ALTERA中的PLL是一个真正的模拟锁相环,  它可以提供精确的时钟频率合成与相位延时的细微调整. 可以将时钟信号按照你的要求进行延迟调整.
假如采用的器件没有PLL的话,  那么可能需要在逻辑内部来做一些延时逻辑,  不过这样会导致异步逻辑设计, 我们一般情况下不推荐这样用.  还有一种办法就是在PCB板上来调整时延.  关于PLL的详细资料可以参考ALTERA的相关文档.  

36.              利用ACEX1K系列片内EAB单元创建RAM时, 每创建一个容量较小的RAM时就要占用一个EAB单元, 能否将多个RAM整合由一个EAB实现, 以节约片内的EAB单元?
答:在ACEX1K系列的器件中, 一个EAB单元目前只能做一个应用, 我们现在的软件还不支持将多个小的RAM集成到一个EAB当中.  

37.              Synthesis Style设为FAST后, 发现速度有所提升, 同时使用的资源也减少了, 资源和速度似乎兼得了, 那么是否所有的模块都可以设定为FAST呢?
答:将SYNTHESIS STYLE设置为FAST主要是为了提高系统性能.  但是有一点要记住的是,  软件的设置不是在任何情况下对所有的设计都表现出相同的结果.  针对这个设计模块,  将SYNTHESIS STYLE设置为FAST可能对资源和速度都有了优化,  但这并不说明对所有的模块都有相同的效果,  但是可以试一试.  设计优化是一个原则与经验, 技巧相结合的过程,  我们只掌握一定的原则与方法,  根据我们自己的经验,  运用一定的技巧, 才能将一个设计做到最优化.
发表于 2006-12-21 17:00:03 | 显示全部楼层
LZ太好了~~~~```
发表于 2006-12-22 09:29:57 | 显示全部楼层
谢谢了!
好人!
发表于 2006-12-26 13:28:18 | 显示全部楼层
这样的东西多多益善
发表于 2006-12-31 11:38:49 | 显示全部楼层
这样的东西多多益善
发表于 2006-12-31 12:59:04 | 显示全部楼层
很好,有没有整理在一个文件中方便下载的版本?
发表于 2007-1-2 11:25:57 | 显示全部楼层
这样的东西多多益善
发表于 2007-1-3 09:47:18 | 显示全部楼层
挺好的,谢谢!!!
发表于 2007-1-18 21:48:21 | 显示全部楼层
谢谢楼主啦
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

小黑屋| 手机版| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-5-14 12:38 , Processed in 0.049604 second(s), 10 queries , Gzip On, MemCached On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表