ise_interface.xml 6.03 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
	<interface name="ISEInterface" extends="FPGAPprojectInterface">
31 32
		<syntax name="GrepFilterProblemSyntax"        format='| grep --line-buffered -v  "%%ParamName"' />
		<syntax name="GrepFilterProblemOtherSyntax"   format='%(| grep --line-buffered -v  "%%ParamValue"%|\n%)' />
33 34 35 36 37 38 39
		<typedef name="intstyleType">
      		<paramtype kind= "enum" base="String">
      			<item value="ise"    label="Indicates the program is being run as part of an integrated design environment"/>
      			<item value="xflow"  label="Indicates the program is being run as part of an integrated batch flow"/>
      			<item value="silent" label="Only errors and warnings are output"/>
      		</paramtype>
    	</typedef>
Andrey Filippov's avatar
Andrey Filippov committed
40 41 42
    	<typedef name = "Cardinal_M1_100">
            <paramtype kind="number" lo="-1" hi="100" format="%d" />
        </typedef>
43 44 45 46 47 48 49 50
	    <typedef name="ParserModeType">
      		<paramtype kind= "enum" base="String">
      			<item value="0"   label="Tool output is parsed immediately"/>
      			<item value="1"   label="Tool output is delayed by not more than 1 line when consolidating bits"/>
      			<item value="2"   label="As '1', but do not show same bits again"/>
      			<item value="3"   label="All tool output containg hierarchical output is delayed to the very end"/>
      		</paramtype>
    	</typedef>
Andrey Filippov's avatar
Andrey Filippov committed
51
    	
52
	 <syntax name="DashNamePart"    format="-%%ParamName %part" />
Andrey Filippov's avatar
Andrey Filippov committed
53 54 55 56 57

	<syntax name="DashListQuoted"      format='-%%ParamName "%(%%ParamValue%| %)"' />
	<syntax name="DashListBraced"      format="-%%ParamName {%(%%ParamValue%| %)}" />
 

58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
		
	
<!-- <syntax name="QuietSyntax"     format=" -quiet" />
		<syntax name="VerboseSyntax"   format=" -verbose" />
		<syntax name="DirectiveSyntax" format=" -directive %%ParamValue" /> -->
		
	
	<!-- 
		<syntax name="ProgramSyntax" format="%(%%ParamValue%|\n%)" />
		<syntax name="read_xdc_syntax" format="%(read_xdc %%ParamValue%|\n%)" /> -->
		
	</interface>
	<!--  Abstract tools to be inherited by instances used for various ISE tools -->	
	<!--  Restore tool for ISE -->
	<tool name="RestoreISE" label="Restore state after ISE tool"
	    project="FPGA_project"
		interface="ISEInterface"
		package="FPGA_package"
		shell="/bin/bash"
		abstract="true">
		<output>
			<line name="ise_pre_restore">
				"-c"
81
				<!-- Create workspace directory on remote server if it did not exist -->
82 83 84 85 86
				"ssh"
				"-oBatchMode=yes"
				"-l %RemoteUser %RemoteHost"
				"'"
				"mkdir -p"
87
				"%ISEWorkspace"
88
				"' ;"
89 90 91
				<!-- Copy snapshot generated earlier from local to remote -->
<!-- 			"rsync -avrR -e ssh"  -->
				"rsync -avr -e ssh"
92 93 94
				<!--  from: -->
				"%ISELocalDir/%%StateFile"
				<!-- to: -->
95
				"%RemoteUser@%RemoteHost:%ISEWorkspace/"
96 97 98 99 100 101 102
				";"
			</line>
			
			<line name="ise_restore"
			      dest="ISEConsole"
			      mark="``" 
			      sep=" "
103
			      failure="ERROR:"
104 105
			      prompt="@@FINISH@@"
			      log="">
106 107 108 109 110 111 112 113 114 115 116 117 118
			      "cd ~/%ISEWorkspace\n"
				<!-- optionally remove project directory on remote before unpacking snapshot -->
			      <if ISECleanRestore="true">
			        "rm -f -r"
			        "%ISEProjectRoot;"
			      </if>
				<!-- Unpack snapshot on remote -->
			      "tar -xzf"
			      "%%StateFile\n"
				<!-- Delete snapshot archive on remote -->
			      "rm -f"
			      "%%StateFile\n"
		          "echo \"@@FINISH@@\"\n"
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
		    </line>
		</output>
	</tool>

	<!--  Save tool for ISE tool -->
	<tool name="SaveISE"
	    label="SaveISE"
	    project="FPGA_project"
		interface="ISEInterface"
		package="FPGA_package"
		shell="/bin/bash"
		abstract="true">
		<output>
			<line name="ise_save"
			      dest="ISEConsole"
			      mark="``" 
			      sep=" "
			      prompt="@@FINISH@@"
137
			      failure="ERROR:"
138
			      log="">
139 140 141 142 143 144 145 146 147 148 149
			      "cd ~/%ISEWorkspace\n"
			<!-- Remove old snapshot if it exists (unlikely as it includes timestamp?) -->
			      "rm -f"
			      "%%StateFile"
			      "\n"
			<!-- Create snapshot at remote (workspace, below project) -->
			      "tar -czf"
			      "%%StateFile"
			      "%%ProjectName"
			      "\n"
	      		  "echo \"@@FINISH@@\"\n"
150 151 152
			</line>
			<line name="ise_copy_after_save">
					"-c"
153
					<!-- Copy snapshot from remote to local -->
154 155
					"mkdir -p %ISELocalDir ;"
					"rsync -avr -e ssh"
156 157 158 159 160 161 162 163 164 165
					"%RemoteUser@%RemoteHost:%ISEWorkspace/%%StateFile"
					"%%StateDir/ ;"
					<!-- Remove snapshot at remote -->
					"ssh"
					"-oBatchMode=yes"
					"-l %RemoteUser %RemoteHost"
					"'"
					"rm -f"
					"%ISEWorkspace/%%StateFile"
					"' ;"
166 167 168 169
			</line>
		</output>		
	</tool>
</vdt-project>