vivado_opt.xml 9.64 KB
Newer Older
1 2 3 4
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
 /*******************************************************************************
 * Copyright (c) 2014 Elphel, Inc.
5 6
 * This file is a part of VDT plug-in.
 * VDT plug-in is free software; you can redistribute it and/or modify
7 8 9 10
 * 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.
 *
11
 * VDT plug-in is distributed in the hope that it will be useful,
12 13 14 15 16 17
 * 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
		<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"/>
Andrey Filippov's avatar
Andrey Filippov committed
70 71 72
		<parameter id="SkipSnapshotOpt" label="Skip snapshot" tooltip="Do not create snapshot after Optimization"
		           default="false"
		           type= "Boolean" format="None"/>
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 98 99
                   
		<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"/>
100 101 102
<!-- 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
103 104 105
        <parameter id="PatternErrors"/>
        <parameter id="PatternWarnings"/>
        <parameter id="PatternInfo"/>
106 107 108 109
        <parameter id="InstanceCapture"/>
        <parameter id="InstanceSeparator"/>
        <parameter id="InstanceSuffix"/>
        <parameter id="parser_mode"/>
Andrey Filippov's avatar
Andrey Filippov committed
110 111 112 113 114 115 116 117 118 119 120 121
        <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"/>
122 123 124 125 126
        <parameter id="ShowWarnings"/>
        <parameter id="ShowInfo"/>
        <parameter id="PreGrepW"/>
        <parameter id="PreGrepI"/>
        <parameter id="GrepEWI"/>
127
        <parameter id="MaxMsg"/>
128
        
129 130 131 132 133 134 135 136 137 138 139
<!-- 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"
Andrey Filippov's avatar
Andrey Filippov committed
140 141
				"SkipSnapshotOpt"
				"---"
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
 				"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
166
			      sep=" "
167 168 169
			      prompt="@@FINISH@@"
			      success="opt_design completed successfully"
			      log=""
Andrey Filippov's avatar
Andrey Filippov committed
170
			      stdout="parser_Vivado">
171
			      "cd ~/%VivadoProjectRoot\n"
Andrey Filippov's avatar
Andrey Filippov committed
172
			      "set outputDir ~/%VivadoProjectRoot/%VivadoRemoteDir\n"			      
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 215 216 217
			      "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>