opt_design命令在Vivado Design Suite 中用于执行逻辑优化。当执行 opt_design 命令时,Vivado Design Suite会根据当前的设计配置和指定的属性来应用一系列优化策略。这些策略可能包括简化逻辑表达式、消除冗余逻辑、合并或重新排列逻辑单元等。通过优化逻辑结构,可以减少设计的复杂性,提高设计的可维护性和性能。
opt_design语法:
opt_design [-retarget] [-propconst] [-sweep] [-bram_power_opt] [-remap] [-aggressive_remap] [-resynth_area] [-resynth_seq_area]
[-directive <arg>] [-muxf_remap] [-hier_fanout_limit <arg>] [-bufg_opt] [-mbufg_opt] [-shift_register_opt] [-dsp_register_opt]
[-srl_remap_modes <arg>] [-control_set_merge] [-merge_equivalent_drivers] [-carry_remap] [-debug_log]
[-property_opt_only] [-quiet] [-verbose]
opt_design 示例脚本(对内存中的设计执行逻辑优化,并在过程中重写设计。完成优化后,它还会写入一个设计检查点,并生成一个时序概要报告,将报告写入到指定的文件中)
opt_design -directive AddRemap
write_checkpoint -force $outputDir/post_opt
report_timing_summary -file $outputDir/post_opt_timing_summary.rpt
如果要限制优化到一个或多个特定的类型,可以使用命令行选项来实现。例如,以下是一种跳过默认运行的块RAM(Block RAM)优化的方法: