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 阅读(895) 评论(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) 编辑

导航