一、Vivado策略类型
1. Vivado预设策略
-
Default - 平衡时序、功耗和布线拥塞
-
Performance_Explore - 追求最高性能(时序)
-
Performance_RefinePlacement - 优化关键路径布局
-
Performance_NetDelay_high - 针对高扇出网络
-
Area_Explore - 最小化资源使用
-
Power_Default - 优化功耗
-
Flow_RunPhysOpt - 包含物理优化
-
Congestion_SpreadLogic_high - 解决布线拥塞
2. 策略分类
├── 性能优先策略
│ ├── Performance_Explore
│ ├── Performance_ExtraTimingOpt
│ └── Performance_WLBlockPlacement
├── 面积优化策略
│ ├── Area_Explore
│ └── Area_ExploreSequential
├── 功耗优化策略
│ └── Power_Default
└── 收敛性策略
├── Congestion_SpreadLogic_high
└── Flow_RuntimeOptimized
二、选择策略的关键因素
1. 设计特性
-
时序关键设计 →
Performance_Explore或Performance_ExtraTimingOpt -
资源紧张设计 →
Area_Explore或Area_ExploreSequential -
高扇出网络 →
Performance_NetDelay_high -
布线拥塞 →
Congestion_SpreadLogic_high
2. 开发阶段
-
早期探索 →
Default或Flow_RunPhysOpt -
时序收敛 →
Performance_RefinePlacement -
最终实现 → 根据需求选择专用策略
3. 设计规模
-
大型设计 →
Flow_RuntimeOptimized(缩短编译时间) -
中小型设计 → 可使用更激进的优化策略
三、推荐选择流程
步骤1:初始实现
# 首次尝试使用Default策略 set_property strategy Default [get_runs impl_1]
步骤2:分析结果
-
检查时序报告(是否满足要求)
-
查看拥塞报告(
report_design_analysis) -
分析资源利用率
步骤3:针对性选择
| 问题现象 | 推荐策略 | 说明 |
|---|---|---|
| 时序违例 > 10% | Performance_Explore | 最全面的时序优化 |
| 布线拥塞严重 | Congestion_SpreadLogic_high | 改善布局,减少拥塞 |
| LUT/FF使用率 > 80% | Area_Explore | 减少资源使用 |
| 编译时间过长 | Flow_RuntimeOptimized | 牺牲优化程度换速度 |
| 功耗敏感 | Power_Default + power_opt_design | 功耗优化 |
步骤4:策略组合使用
# 先运行Area优化,再运行Performance优化 reset_run impl_1 set_property strategy Area_Explore [get_runs impl_1] launch_runs impl_1 -to_step route_design wait_on_run impl_1 # 基于结果进行性能优化 set_property strategy Performance_RefinePlacement [get_runs impl_1] set_property incremental_checkpoint $checkpoint [get_runs impl_1]
四、实用技巧
1. 策略的增量使用
# 保存检查点,尝试不同策略 write_checkpoint -force design_route.dcp set_property strategy Performance_Explore [get_runs impl_1] set_property incremental_checkpoint design_route.dcp [get_runs impl_1]
2. 自定义策略创建
在GUI中:
-
Tools→Edit Strategies -
复制现有策略作为基础
-
调整参数:
-
place_design:-
directive:Explore,ExtraNetDelay_high
-
-
phys_opt_design:-
directive:AggressiveExplore
-
-
route_design:-
directive:Explore,NoTimingRelaxation
-
-
3. 命令行方式
# 查看所有可用策略 report_strategy -all # 应用策略并运行 launch_runs impl_1 -strategy Performance_Explore
五、常见场景示例
场景1:高速时序设计
策略:Performance_Explore + 启用所有物理优化 + 增加place/route迭代次数 + 关键路径额外优化
场景2:面积受限设计
策略:Area_ExploreSequential + 优化寄存器使用 + 逻辑重构减少LUT + 资源共享
场景3:快速迭代
策略:Flow_RuntimeOptimized + 减少优化迭代 + 简化算法 + 快速获得初步结果
六、调试建议
-
始终保存检查点:在每个策略前保存设计状态
-
对比分析:使用
report_qor_assessment比较不同策略结果 -
记录日志:记录每个策略的时序、资源、时间数据
-
渐进优化:从Default开始,逐步尝试更专用策略
七、总结
Vivado策略选择没有"最佳",只有"最适合"。建议:
-
首次设计:使用
Default或Flow_RunPhysOpt -
时序问题:尝试
Performance_Explore系列 -
面积问题:使用
Area_Explore -
收敛困难:考虑
Congestion_SpreadLogic_high
最重要的是:基于实际设计的结果数据做决策,通常需要尝试2-3种策略才能找到最优方案。
690

被折叠的 条评论
为什么被折叠?



