A logic_lock
参考文献: https://blog.csdn.net/moxu0915/article/details/79264161
官方文档在 quaruts -- help -- on the web -- quartus prime handbook -- 选中quartus prime standard + design constraints + design optimization 中的user guide 两篇文章
若要进行增量编译,
1 将要固化的模块在 design_partition_window 约束为 post_fit, 即模块未变时不重新布线
2 在 logiclock_region_window 中 creat_new_logiclock(不清楚需要多大区域时可以先完整编译一版,然后右键对应模块,locate in chip_planner 查看),然后右键 hierarchy 中对应模块, assign to existing logiclock_region
注意:划分的模块一定要够大,如果使用量超出 logiclock_region 太多,其他模块放不下,仍然可能重新布线该模块,未确保万一,可在chip_planer中截图对比
关于综合优化影响原模块性能:
多个模块如果有共用的逻辑,默认情况下会被综合优化为,共用同一个逻辑块,所以在复制模块时共有逻辑部分扇出会变多,而不会再增加一个相同的逻辑资源,导致已经调好的模块出现时序问题
若要完全复制模块,使两个类似的模块互不相关,就要用 增量编译 的方式,即 logiclock 锁定已经验证ok的部分
set_property CLOCK_REGION X1Y216 [get_cells {design_top/util_ds_buf_0}]
其中的 cell 不能是clock相关的内容
B 防止优化
https://blog.csdn.net/xiao_yao_ke/article/details/83015735
https://blog.csdn.net/wordwarwordwar/article/details/78636395
若只是要保留某几个 寄存器或者信号 不被优化
1)、需要保留的信号是引线
Verilog HDL—定义的时候在后面增加/* synthesis keep */。
例如:wire keep_wire /* synthesis keep */
2)、需要保留是的寄存器
跟reg相关的synthesis attribute,共有两种,分别是/*synthesis noprune*/和/*synthesis preserve*/,两者的差别如下:
/*synthesis noprune*/ 避免 Quartus II 优化掉没output的reg。
/*synthesis preserve*/避免 Quartus II 將reg优化为常数,或者合并重复的reg。
定义的时候在后面增加相关的约束语句。
例如:reg reg1 /* synthesis noprune*/;或者 reg reg1 /* synthesis preserve */;
將/*synthesis noprune*/等synthesis attribute 语句放在module后面,这样整个module的reg将不被最佳化,从而不用再一一寄存器指定。
这三种方式都可以直接在 signaltap 上拉到 原始名字 信号,但是在 post_fit rtl 网表上,只有对应名字的 reg,而没有对应的 wire
C 原语级约束
除了 logic lock ,还可以单独的对某一个网表中的 节点(node) 进行单独的位置约束,https://blog.csdn.net/lis_accept/article/details/104488993 和 https://blog.csdn.net/lis_accept/article/details/104498177
此方法用到了 assignment editor,
另外,也可以直接在chip planner 中进行拖拽移动(从代码或者rtl中的节点 locate到chip planner上,可以定位具体的位置)参考文章开始提到的design optimization中 Viewing Assignments in the Chip Planner章节:
chip planner 中的元件 与 Location布线资源 中提到的 LLCOMB、FF等资源一一对应,可以直接在 timing analyzer 中找到经过每个器件花费的时间