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) 编辑

导航