vivado_opt_phys.xml 12 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 56 57
	<interface name="VivadoOptPhysInterface" extends="VivadoInterface">
	    <typedef name="PhysOptDirectiveType">
      		<paramtype kind= "enum" base="String">
      			<item value= "Explore"                label="Run different algorithms in multiple passes of optimization, including replication for very high fanout nets."/>
      			<item value= "ExploreWithHoldFix"     label="Same as Explore with addition of hold violation fixing."/>
      			<item value= "AggressiveExplore"      label="Similar to Explore but with different more aggressive optimization algorithms."/>
      			<item value= "AlternateReplication"   label="Use different algorithms for performing critical cell replication."/>
      			<item value= "AggressiveFanoutOpt"    label="Uses different and more aggressiver algorithms for fanout-related optimizations."/>
      			<item value= "AlternateDelayModeling" label="Performs all optimizations using alternate algorithms for estimating net delays."/>
      			<item value= "AddRetime"              label="Deafault optimization with additional register re-timing."/>
      			<item value= "Default"                label="Run the default physical optimization."/>
      		</paramtype>
    	</typedef>
	</interface>

	<tool name="VivadoOptPhys" label="Physical (post-placement) design optimization"
	    project="FPGA_project"
		interface="VivadoOptPhysInterface"
		package="FPGA_package"
		shell="/bin/bash"
		description="Vivado physical optimize design"
		result="SnapshotOptPhys"
		log-dir="VivadoLogDir"
		state-dir="VivadoLocalDir"
		restore="RestoreVivadoOptPhys"
		disable="DisableVivadoOptPhys"
		autosave="AutosaveVivadoOptPhys"
		save="SaveVivadoOptPhys"
Andrey Filippov's avatar
Andrey Filippov committed
58
		inherits="VivadoToolPrototype"
59 60 61 62
		>
		<action-menu>
			<action label="Post placement optimize" resource="" icon="opt_yellow.png" />
		</action-menu>
Andrey Filippov's avatar
Andrey Filippov committed
63 64 65
		<depends-list>
			<depends state="SnapshotPlace"/>
		</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 98 99 100 101 102 103 104 105 106 107 108 109 110
		<parameter id="SkipPreOptimization" label="Skip pre-optimization" tooltip="Do not run pre optimization TCL commands"
		           default="false" type= "Boolean" format="None"/>
		<parameter id="SkipPhysOpt" label="Skip physical optimize" tooltip="Do not run phys_opt_design"
		           default="false" type= "Boolean" format="None"/>
		           
		<parameter id="SkipSnapshotOptPhys" label="Skip snapshot save" tooltip="Do not create snapshot after physical optimization"
		           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" />
                   
<!-- phys_opt_design arguments -->
<!--  TODO: Make a separate command with several different settings sets -->
        <parameter 	id="directive_phys_opt"  outid="directive" label="Directive" tooltip= "Placement algorithm mode (not compatible with other specific options)"
        			default="Default" visible="true" omit="Default" type="PhysOptDirectiveType" format="Dash"/>
        <parameter 	id="fanout_opt" label="Fanout optimization" tooltip= "Delay-driven optimization on high-fanout timing critical nets by replicating drivers."
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="placement_opt" label="Placement optimization" tooltip= "Move cells to reduce delay on timing-critical nets."
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="rewire" label="Rewire" tooltip= "Refactor logic cones to reduce logic levels and reduce delay on critical signals."
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="critical_cell_opt"  label="Replicate cells" tooltip= "Replicate cells on timing critical nets to reduce delays."
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="dsp_register_opt" label="DSP register optimization" tooltip= "Improve critical path delay by moving registers from slices to DSP or from DSP to slices."
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="bram_register_opt"  label="BRAM register optimization" tooltip= "Improve critical path delay by moving registers from slices to BRAM or from BRAM to slices."
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="bram_enable_opt" label="BRAM clock enable optimization" tooltip= "Selectively reverses power optimization for enable logic of BRAMs."
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="shift_register_opt" label="Shift register optimization" tooltip= "Eextract beginnning/end FF from SLR to improve timing"
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="hold_fix" label="Hold violations fix" tooltip= "Insert data path delay to fix hold time violations."
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter 	id="retime" label="Move registers" tooltip= "Move registers through combinatorial fabric."
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        			<!-- TODO: Implement force_replication_on_nets args (requires?  get_nets command ) --> 
        <parameter 	id="critical_pin_opt"   label="Swap LUT pins" tooltip= "Swap LUT pins to improve critical path timimg."
        			default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
        <parameter	id="quiet_phys_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_phys_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"/>

111 112 113
<!-- 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
114 115 116
        <parameter id="PatternErrors"/>
        <parameter id="PatternWarnings"/>
        <parameter id="PatternInfo"/>
117 118 119 120
        <parameter id="InstanceCapture"/>
        <parameter id="InstanceSeparator"/>
        <parameter id="InstanceSuffix"/>
        <parameter 	id="parser_mode"/>
Andrey Filippov's avatar
Andrey Filippov committed
121 122 123 124 125 126 127 128 129 130 131 132
        <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"/>
133 134 135 136 137
        <parameter id="ShowWarnings"/>
        <parameter id="ShowInfo"/>
        <parameter id="PreGrepW"/>
        <parameter id="PreGrepI"/>
        <parameter id="GrepEWI"/>
138
        <parameter id="MaxMsg"/>
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184

<!-- hidden (calculated) parameters -->
<!--  not really used now, always "0" -->			
			   	   <parameter   id="VivadoOptPhysActionIndex" default="%%ChosenActionIndex"
					type="String" format="CopyValue" visible="false"  />
					<!--  invisible/calculated parameters -->        			
        <parameter	id="AutosaveVivadoOptPhys" default="?%%ChosenActionIndex=0 ^ %SkipSnapshotOptPhys=false : true, false"
                    visible="false" type="Boolean" format="None"/>
		
		<input>
			<group name="General">
				"SkipPreOptimization"
				"SkipPhysOpt"
				"SkipSnapshotOptPhys"
				"---"
 				"SnapshotOptPhys" <!--  same as in project -->
			</group>
			<group name="Pre-optimization commands">
		        "PreOptTCL"
			</group>
			<group name="Physical Optimization">
       			"directive_phys_opt"
       			"---"
       			"fanout_opt"
       			"placement_opt"
       			"rewire"
       			"critical_cell_opt"
       			"dsp_register_opt"
       			"bram_register_opt"
       			"bram_enable_opt"
       			"shift_register_opt"
       			"hold_fix"
       			"retime"
       			<!-- TODO: Implement force_replication_on_nets args (requires?  get_nets command ) --> 
       			"critical_pin_opt"
       			"---"
       			"quiet_phys_opt"
       			"verbose_phys_opt"
			</group>
		</input>

		<output>
<!-- Set sep="", so all new lines should be specified as \n -->
			<line name="vivado_run_opt_phys"
			      dest="VivadoConsole"
			      mark="``" 
Andrey Filippov's avatar
Andrey Filippov committed
185
			      sep=" "
186 187 188
			      prompt="@@FINISH@@"
			      success="phys_opt_design completed successfully"
			      log=""
Andrey Filippov's avatar
Andrey Filippov committed
189
			      stdout="parser_Vivado">
190
			      "cd ~/%VivadoProjectRoot\n"
Andrey Filippov's avatar
Andrey Filippov committed
191
			      "set outputDir ~/%VivadoProjectRoot/%VivadoRemoteDir\n"			      
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 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
			      "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 SkipPhysOpt="false">
			      <!-- Run physical optimization -->
			      <!--  TODO: make an extra command to run several optimizations -->
			          "phys_opt_design"
			          "%directive_phys_opt"
			          "%fanout_opt"
			          "%placement_opt"
			          "%rewire"
			          "%critical_cell_opt"
			          "%dsp_register_opt"
			          "%bram_register_opt"
			          "%bram_enable_opt"
			          "%shift_register_opt"
			          "%hold_fix"
			          "%retime"
        			<!-- TODO: Implement force_replication_on_nets args (requires?  get_nets command ) --> 
			          "%critical_pin_opt"
			          "%quiet_phys_opt"
			          "%verbose_phys_opt"
				      "\n"
			      </if>
				"puts \"@@FINISH@@\"\n"
			</line>
		</output>
	</tool>
	
	<!--  Restore tool for VivadoOptPlace -->
	<tool name="RestoreVivadoOptPhys"
		project="FPGA_project"
		interface="VivadoInterface"
		package="FPGA_package"
		inherits="RestoreVivado"/>
	<!--  Save tool for VivadoOptPlace -->

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