newhunt163写道:
1)根据>第128页:第7章:触发器和寄存器控制信号:,本指南是“尽可能完全避免操作设置/复位逻辑”。
sowhich推荐的代码风格?
为什么?
为什么?
我认为,因为指南涉及绝对最大可能性能,这忽略了大多数时序约束不会将设计推向器件限制的现实。
本文档的第14.1版已经软化了“尽可能避免操作设置/重置逻辑”的指导原则。
2)如果我们将两种代码样式映射到真实硬件,例如Virtex-6,则根据第12页:存储元件 - 控制信号时钟(CLK),时钟使能(CE)和设置
/ reset(SR)对于一个片中的所有存储元素是通用的。
因此,如果FF已经使用了复位/设置或CE,那么对于Virtex-6,不能使用相同切片中的剩余七个FF,但是四个LUT仍然有机会被使用,这在地图中是正确的
?
我正在研究S6 SLICEL和SLICEM图,实际上,触发器的CE和SR输入很常见。
这意味着如果切片中需要使用CE和/或SR的任何触发器必须具有相同的CE / SR要求。
(片中所有触发器的时钟和时钟极性也必须相同。)切片中的某些触发器当然可以不使用CE输入,而其他触发器也可以。
还要注意CE和SR信号是切片的输入,这意味着用于导出它们的任何逻辑必然来自另一个切片;
没有任何方法可以将切片的LUT用于CE,同时也将这些LUT用于触发器的D输入。
因此,我认为,对于从给定设备中挤出最后一点性能和资源使用的这种程度的担忧被夸大了。
你不应该迷失在这种精细细节的杂草中。
编写代码,使其在功能上正确且易于人类读者/维护者理解。
绝大多数设计不必“尽可能快地”运行,他们只需要满足时机要求。
仅在未能关闭计时或路由/区域问题时才进行优化。
----------------------------是的,我这样做是为了谋生。
以上来自于谷歌翻译
以下为原文
newhunt163 wrote:
1) according to the >Page 128: Chapter 7:Flip-Flops and Registers Control Signals:,this guideline is " Whenever possible, avoid operational set/reset logic altogether.".
so which are code styles recommended? Why?
Why? I think because that the guidelines are concerned with absolute maximum possible performance, which ignores the reality that most timing constraints are not pushing the designs to the device limits.
Version 14.1 of this document has softened that guideline to "Avoid operational set/reset logic whenever possible."
2) If We map the two code styles into the real hardware , for example Virtex-6,, according to the Page 12: Storage Elements-----The control signals clock (CLK), clock enable (CE), and set/reset (SR) are common to all storage elements in one slice.
So if a FF has been used a reset/set or CE, then for Virtex-6, the remaining seven FF in the same slice cann't be used,but the four LUT still have chance to be used , This is right in map?
I'm looking at the S6 SLICEL and SLICEM diagram, and indeed, the flops' CE and SR inputs are common. What this means is that if any flops in the slice which need to use CE and/or SR must have the same CE/SR requirements. (The clock, and the clock polarity, for all flops in the slice must be the same, too.) It is certainly possible for some of the flops in the slice to not use the CE input while others do.
Also note that the CE and SR signals are inputs to the slice, which means that necessarily any logic used to derive them must come from another slice; there isn't any way to use the slice's LUTs for the CE while also using those LUTs for the D inputs to the flops.
So, again, I think that these level of concern about wringing the last bit of performance and resource usage out of a given device is overblown. You shouldn't get lost in the weeds of this fine-level of detail. Write your code so that it's functionally correct and easy for the human reader/maintainer to understand. The vast majority of designs don't have to run "as fast as possible," they just need to meet timing. Optimize only if you fail to close timing or if you have routing/area issues.
----------------------------Yes, I do this for a living.