上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 30 下一页

2012年8月20日

时序裕量计算之前言

摘要: 先看一幅图:注意 Clock Hold Latch Edge 和 Clock Hold Launch Edge 的关系。Hold Check检查的是,在Hold Latch处引起的数据保持时间,会不会超过Hold Launch处的数据打出时间,从而把数据“冲”掉? 对于源寄存器和目的寄存器,对Slack有影响的各自属性如下图: Source ----> Destination uTco uTsu/uThd 本文参考了国外一篇匿名文档的思路,在此向作者表示感谢和敬意。 阅读全文

posted @ 2012-08-20 16:09 freshair_cn 阅读(432) 评论(0) 推荐(0) 编辑

2012年8月17日

Altera Coding Style 之 加法器

摘要: 根据器件结构的不同选择不同的风格。…Using a pipelined binary or ternary adder tree appropriately can greatly improve the quality of your results.简单地说,要根据LE进位链的数目决定用多少个加数。例如,对于 4-input LUT,举例如下:对于 6-input LUT,… ALMs can simultaneously add three bits.举例如下: 阅读全文

posted @ 2012-08-17 11:58 freshair_cn 阅读(465) 评论(0) 推荐(0) 编辑

2012年8月16日

Altera Coding Style 之 时钟切换

摘要: 一般来说,时钟切换有3种手段:1、器件本身有硬件结构支持切换 … For example, you can use the Clock Switchover feature or the Clock Control Block available in certain Altera devices.2、使用动态PLL … Many Altera devices also support dynamic PLL reconfiguration, which is the safest and most robust method of changing clock rates during de 阅读全文

posted @ 2012-08-16 18:38 freshair_cn 阅读(804) 评论(0) 推荐(0) 编辑

Altera Coding Style 之 CRC

摘要: 一、CRC的实现方法对于一个比特串,假如要生成 n-bit 的CRC,那么CRC的多项式用(n+1)位表示。生成CRC的步骤如下:1、比特串后面附加n个0;2、(n+1)与比特串最左对齐,做异或;3、(n+1)逐比特右移,并异或;4、直至原比特串全部为0,剩下的n比特即为CRC。校验CRC的方法是:1、CRC附于收到的比特串后面;2、(n+1)异或、移位;3、最后结果,如果包含附加CRC之后的比特串为0,证明传输无误。二、硬件实现CRC的建议 由于异或门天生的缺陷,在硬件实现CRC时,会出现一些与常用处理方法相反的的建议。 … XOR gates have a cancellation pro 阅读全文

posted @ 2012-08-16 17:41 freshair_cn 阅读(426) 评论(0) 推荐(0) 编辑

Altera Coding Style 之 比较器

摘要: 一、两种情况比较器的使用可以归类为2种情况:== 和 <。不等于和大于实际上只是上述的一个反运算。… The == comparator is implemented in general logic cells. The < comparator can be implemented using the carry chain or general logic cells.==会综合成组合逻辑,<可能综合成组合逻辑,也可能综合成进位链。二、优劣比较独立测试时,进位链会比组合逻辑快;但是在大的工程当中,由于约束的关系,进位链的结构有时反而显得慢。对于 6-input 的ALU 阅读全文

posted @ 2012-08-16 15:59 freshair_cn 阅读(328) 评论(0) 推荐(0) 编辑

Altera Coding Style 之 计数器

摘要: For the best area utilization, ensure that the up/down control or controls are expressed in terms of one addition instead of two separate addition operators.当然,构造计数器的时候都会希望这样,但是不好的编码风格可能导致不一样的结果。1、不好的风格out <= count_up ? out + 1 : out –1;这会综合出2个独立的进位链2、推荐的风格out <= out + ( out_up ? 1 : -1 );这只需要 阅读全文

posted @ 2012-08-16 13:26 freshair_cn 阅读(270) 评论(0) 推荐(0) 编辑

2012年8月14日

Altera Coding Style 之多路选择器

摘要: 根据代码风格,基本上会综合出3类Mux。一、MUX分类1、Binary Mux 这是最常见的一类,选择变量用普通的二进制递增的方式枚举。 case (sel) 2’b00 : z = a; 2’b01 : z = b; 2’b10 : z = c; 2’b11 : z = d; endcase 如果配合器件的结构来描述 Binary Mux,综合后的效果会很优越。 Stratix 系列里面 Stratix II以上的器件,LUT结构是 6-input LUT。这样的结构用来构造 4:1 的 Binary Mux 是非常合适的。 对于 4-input LUT,4:1 的 Binary Mux会被 阅读全文

posted @ 2012-08-14 18:29 freshair_cn 阅读(886) 评论(0) 推荐(0) 编辑

Altera Coding Style 之状态机

摘要: Quartus II把某段代码识别为状态机是有一些约束条件的,关键是让综合工具“认识”你的代码。…Ensuring that your synthesis tools recognize a piece of code as a state machine …一、建议做法1、保证分支完备。 Assign default values to outputs derived from the state machine so that synthesis does not generate unwanted latches.2、状态机代码尽量保持独立,与其他逻辑分开写。 Separate the 阅读全文

posted @ 2012-08-14 16:04 freshair_cn 阅读(700) 评论(0) 推荐(0) 编辑

2012年8月13日

Altera Coding Style 之 Latch

摘要: 一、意料之外产生的 Latch1、产生原因 在有判断的组合逻辑中,分支不完整。例如,在Case和If的结构中,分支不完备,就有可能产生Latch。 Latches have limited support in formal verification tools. Therefore, ensure that you do not infer latches unintentionally.2、避免方法 最好的方法是保证分支完备。 为避免分支不完备,可以使用 full_case 属性。full_case 属性把未声明的分支看作 don’t care,不过 full_case 属于 synthe 阅读全文

posted @ 2012-08-13 14:52 freshair_cn 阅读(825) 评论(0) 推荐(0) 编辑

Altera Coding Style 之次要控制信号的优先级

摘要: 这句话很重要:To make the most efficient use of the signals in the device, your HDL code should match the device architecture as closely as possible.而且,这些信号一般来说是有优先级的,在使用时要注意这点。Altera的器件的控制信号的优先级排序如下:(1)Asynchronous Clear, aclr(2)preset,这个只在MAX3000和MAX7000系列中有(3)Asynchronous Load, aload(4)Enable, ena(5)Syn 阅读全文

posted @ 2012-08-13 11:30 freshair_cn 阅读(254) 评论(0) 推荐(0) 编辑

上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 30 下一页

导航