vivado_opt.xml 9.47 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
 /*******************************************************************************
 * Copyright (c) 2014 Elphel, Inc.
 * This file is a part of Eclipse/VDT plug-in.
 * Eclipse/VDT plug-in is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Eclipse/VDT plug-in is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
Andrey Filippov's avatar
Andrey Filippov committed
18 19 20 21 22 23 24 25 26
 * 
 *  Additional permission under GNU GPL version 3 section 7:
 * If you modify this Program, or any covered work, by linking or combining it
 * with Eclipse or Eclipse plugins (or a modified version of those libraries),
 * containing parts covered by the terms of EPL/CPL, the licensors of this
 * Program grant you additional permission to convey the resulting work.
 * {Corresponding Source for a non-source form of such a combination shall
 * include the source code for the parts of Eclipse or Eclipse plugins used
 * as well as that of the covered work.}
27 28 29
 *******************************************************************************/
 -->
<vdt-project>
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
	<interface name="VivadoOptInterface" extends="VivadoInterface">
	    <typedef name="OptDirectiveType">
      		<paramtype kind= "enum" base="String">
      			<item value="Explore"               label="Run multiple passes of optimization to improve results."/>
      			<item value="ExploreArea"           label="Run multiple passes of optimization, with an emphasis on reducing area."/>
      			<item value="ExploreSequentialArea" label="Run multiple passes of optimization, with an emphasis on reducing registers and related combinational logic."/>
      			<item value="AddRemap"              label="Run the default optimization, and include LUT remapping to reduce logic levels."/>
      			<item value="RuntimeOptimized"      label="Run the fewest iterations, trading optimization results for faster runtime."/>
      			<item value="Default"               label=" Run the default optimization."/>
      		</paramtype>
    	</typedef>
	</interface>

	<tool name="VivadoOpt" label="Optimize design"
	    project="FPGA_project"
		interface="VivadoOptInterface"
		package="FPGA_package"
		shell="/bin/bash"
		description="Vivado optimize design"
		result="SnapshotOpt"
		log-dir="VivadoLogDir"
		state-dir="VivadoLocalDir"
		restore="RestoreVivadoOpt"
		disable="DisableVivadoOpt"
		autosave="AutosaveVivadoOpt"
		save="SaveVivadoOpt"
Andrey Filippov's avatar
Andrey Filippov committed
56
		inherits="VivadoToolPrototype"
57 58 59 60
		>
		<action-menu>
			<action label="Optimize" resource="" icon="opt_blue.png" />
		</action-menu>
Andrey Filippov's avatar
Andrey Filippov committed
61 62 63 64 65
		<depends-list>
			<depends state="SnapshotSynth"/>
		</depends-list>
		
		
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
		<parameter id="SkipPreOptimization" label="Skip pre-optimization" tooltip="Do not run pre optimization TCL commands"
		           default="false" type= "Boolean" format="None"/>
		<parameter id="SkipOptimization" label="Skip optimize" tooltip="Do not run opt_design"
		           default="false" type= "Boolean" format="None"/>

                   
		<parameter id="PreOptTCL" label="Pre-optimize TCL commands" tooltip="TCL commands to run before opt_design"
			type="Stringlist" format="ProgramSyntax" default="" omit=""
			readonly="false" visible="true" />
  
<!-- opt_design arguments -->  

        <parameter 	id="directive_opt" outid="directive" label="Directive" tooltip= "Mode of behaviour for opt_design command, not compatible with individual optimization settings."
        			default="Default" visible="true" omit="Default" type="OptDirectiveType" format="Dash"/>
        <parameter 	id="retarget"  label="Retarget" tooltip= "Retarget block types when using different part"
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="propconst" label="Propagate constants" tooltip= "Propagate constants across leaf-level instances"
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="sweep" label="Remove unconnected instances" tooltip= "Remove unconnected leaf-level instances"
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="bram_power_opt" label="Optimize BRAM" tooltip= "Power optimization of BRAM cells - changes WRITE_MODE and clock gating"
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="remap" label="Remap LUTs" tooltip= "Remap logic optimally in LUTs"
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="resynth_area" label="Re-synthesis in area mode" tooltip= " Perform re-synthesis in area mode to reduce the number of LUTs."
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="resynth_seq_area" label="Re-synthesis with sequential" tooltip= "Re-synthesis with both combinatorial and sequential optimizations)."
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter	id="quiet_opt" outid="quiet" label="Quiet" tooltip= "Ignore errors, return TCL_OK in any case"
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter	id="verbose_opt" outid="verbose" label="verbose" tooltip= "Temporarily override message limits set with set_msg_config"
        			default="false" visible="true" omit="False" type="Boolean" format="DashName"/>
98 99 100
<!-- parser parameters - will have different values than the base tool -->
        <parameter id="parsers_path"/>
        <parameter id="parser_name"/>
Andrey Filippov's avatar
Andrey Filippov committed
101 102 103
        <parameter id="PatternErrors"/>
        <parameter id="PatternWarnings"/>
        <parameter id="PatternInfo"/>
104 105 106 107
        <parameter id="InstanceCapture"/>
        <parameter id="InstanceSeparator"/>
        <parameter id="InstanceSuffix"/>
        <parameter id="parser_mode"/>
Andrey Filippov's avatar
Andrey Filippov committed
108 109 110 111 112 113 114 115 116 117 118 119
        <parameter id="NoFileProblem"/>
        <parameter id="Drc"/>
        <parameter id="Vivado_Tcl"/>
        <parameter id="Route"/>
        <parameter id="Memdata"/>
        <parameter id="Synth"/>
        <parameter id="Netlist"/>
        <parameter id="Opt"/>
        <parameter id="Project"/>
        <parameter id="Timing"/>
        <parameter id="Pwropt"/>
        <parameter id="OtherProblems"/>
120 121 122 123 124
        <parameter id="ShowWarnings"/>
        <parameter id="ShowInfo"/>
        <parameter id="PreGrepW"/>
        <parameter id="PreGrepI"/>
        <parameter id="GrepEWI"/>
125
        <parameter id="MaxMsg"/>
126
        
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
<!-- hidden (calculated) parameters -->
<!--  not really used now, always "0" -->			
			   	   <parameter   id="VivadoOptActionIndex" default="%%ChosenActionIndex"
					type="String" format="CopyValue" visible="false"  />
					<!--  invisible/calculated parameters -->        			
        <parameter	id="AutosaveVivadoOpt" default="?%%ChosenActionIndex=0 ^ %SkipSnapshotOpt=false : true, false"
                    visible="false" type="Boolean" format="None"/>
		<input>
			<group name="General">
				"SkipPreOptimization"
				"SkipOptimization"
				"---"
 				"SnapshotOpt" <!--  same as in project -->
			</group>
			<group name="Pre-optimization commands">
		        "PreOptTCL"
			</group>
			<group name="Optimization">
       			"directive_opt"
       			"---"
				"retarget"
				"propconst"
       			"sweep"
       			"bram_power_opt"
				"remap"
       			"resynth_area"
       			"resynth_seq_area"
       			"---"
       			"quiet_opt"
       			"verbose_opt"
			</group>
		</input>
		<output>
			<line name="vivado_run_opt"
			      dest="VivadoConsole"
			      mark="``" 
Andrey Filippov's avatar
Andrey Filippov committed
163
			      sep=" "
164 165 166
			      prompt="@@FINISH@@"
			      success="opt_design completed successfully"
			      log=""
Andrey Filippov's avatar
Andrey Filippov committed
167
			      stdout="parser_Vivado">
168
			      "cd ~/%VivadoProjectRoot\n"
Andrey Filippov's avatar
Andrey Filippov committed
169
			      "set outputDir ~/%VivadoProjectRoot/%VivadoRemoteDir\n"			      
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
			      "file mkdir $outputDir\n"
		          <!-- Run pre-optimization TCL commands (if specified) -->
			      <if SkipPreOptimization="false">
				      <if-not PreOptTCL="">
				      		"%PreOptTCL\n"
				      </if-not>
				      <if PreOptTCL="">
				      		"puts \"No pre-optimization TCL commands specified\"\n"'
				      </if>
			      </if>
			      <if SkipOptimization="false">
		          <!-- Run optimization -->
			          "opt_design"
			          "%retarget"
			          "%propconst"
			          "%sweep"
			          "%bram_power_opt"
			          "%remap"
			          "%resynth_area"
			          "%resynth_seq_area"
			          "%directive_opt"
			          "%quiet_opt"
			          "%verbose_opt"
				      "\n"
			      </if>
				"puts \"@@FINISH@@\"\n"
			</line>
		</output>
	</tool>
	
	<!--  Restore tool for VivadoOptPlace -->
	<tool name="RestoreVivadoOpt"
		project="FPGA_project"
		interface="VivadoInterface"
		package="FPGA_package"
		inherits="RestoreVivado"/>
	<!--  Save tool for VivadoOptPlace -->

	<tool name="SaveVivadoOpt"
		project="FPGA_project"
		interface="VivadoInterface"
		package="FPGA_package"
		inherits="SaveVivado"/>
</vdt-project>