Commit fcd0f044 authored by Andrey Filippov's avatar Andrey Filippov

Bug fix in restoring states for Vivado, debugging ISE XST

parent 1e47ffcc
......@@ -985,6 +985,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
return;
}
DEBUG_PRINT("restoring "+getName()+" state for project "+project);
if (getState()!=TOOL_STATE.KEPT_OPEN) { // do not
QualifiedName qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_PINNED);
String str= pp.get(qn);
if (str!=null) try {
......@@ -1002,6 +1003,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
}
if (getState()==TOOL_STATE.KEPT_OPEN)
setStateJustThis(TOOL_STATE.NEW);
// See if console with this name is open
}
qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_TIMESTAMP);
str= pp.get(qn);
......@@ -1031,6 +1033,9 @@ public class Tool extends Context implements Cloneable, Inheritable {
setFileTimeStamp(qName.getLocalName().substring(filePrefix.length()), value);
}
}
} else {
DEBUG_PRINT("Do not update state of the open session "+getName()+" for project "+project);
}
}
......
......@@ -308,6 +308,52 @@
label="sed command line" tooltip="Remote file prefix to be removed for the local error parser when running ISE tools"
default="sed -u 's@/home/%RemoteUser/%ISEProjectRoot/%%ProjectName/@@'"/>
<parameter id="ISEWorkspace" label="Workspace directory" tooltip="Relative (to user home directory) path of the workspace on ISE server"
type="String" default="%ISEProjectRoot" format="CopyValue" readonly="true" />
<parameter id="ISESnapshotSynth"
label="Synthesis snapshot" tooltip="Name of ISE snapshot archive after synthesis"
default="%%ProjectName-synth.tgz"
type="String" format="CopyValue" />
<parameter id="ISESnapshotOptPlace"
label="Placement snapshot" tooltip="Name of ISE snapshot archive after optimization/placement"
default="%%ProjectName-opt-place.tgz"
type="String" format="CopyValue" />
<parameter id="ISESnapshotOpt"
label="Optimization snapshot" tooltip="Name of ISE snapshot archive after optimization"
default="%%ProjectName-opt.tgz"
type="String" format="CopyValue" />
<parameter id="ISESnapshotOptPower"
label="Power optimization snapshot" tooltip="Name of ISE snapshot archive after power optimization"
default="%%ProjectName-opt-power.tgz"
type="String" format="CopyValue" />
<parameter id="ISESnapshotPlace"
label="Placement snapshot" tooltip="Name of ISE snapshot archive after placement"
default="%%ProjectName-place.tgz"
type="String" format="CopyValue" />
<parameter id="ISESnapshotOptPhys"
label="Physical optimization snapshot" tooltip="Name of ISE snapshot archive after physical optimization"
default="%%ProjectName-opt-phys.tgz"
type="String" format="CopyValue" />
<parameter id="ISESnapshotRoute"
label="Routing snapshot" tooltip="Name of ISE snapshot archive after routing"
default="%%ProjectName-route.tgz"
type="String" format="CopyValue" />
<parameter id="ISECleanRestore" label="ISE Clean restore"
tooltip= "Remove remote ISE project files before unpacking snapshot archives"
default="true" visible="true" type="Boolean" format="None"/>
<input>
<group name="Genaral" label="General parameters">
"part"
......@@ -328,15 +374,6 @@
"VivadoIgnoreSource"
"VivadoSedPaths"
</group>
<group name="ISE" label="ISE general properties">
"ISEProjectRoot"
"ISERemoteDir"
"ISELocalDir"
"ISELocalResultDir"
"ISELogDir"
"ISEIgnoreSource"
"ISESedPaths"
</group>
<group name="VivadoDisable" label="Selectively disable Vivado tools">
"DisableVivadoSynth"
<!-- "DisableVivadoOptPlace" -->
......@@ -357,6 +394,25 @@
"SnapshotOptPhys"
"SnapshotRoute"
</group>
<group name="ISE" label="ISE general properties">
"ISEProjectRoot"
"ISERemoteDir"
"ISELocalDir"
"ISELocalResultDir"
"ISELogDir"
"ISEIgnoreSource"
"ISESedPaths"
</group>
<group name="ISESnapshots" label="ISE snapshot archives">
"ISECleanRestore"
"ISESnapshotSynth"
<!-- "ISESnapshotOptPlace" -->
"ISESnapshotOpt"
"ISESnapshotOptPower"
"ISESnapshotPlace"
"ISESnapshotOptPhys"
"ISESnapshotRoute"
</group>
</input>
<output>
</output>
......
......@@ -44,20 +44,21 @@
<output>
<line name="ise_pre_restore">
"-c"
<!-- Create project directory on remote server if it did not exist -->
<!-- Create workspace directory on remote server if it did not exist -->
"ssh"
"-oBatchMode=yes"
"-l %RemoteUser %RemoteHost"
"'"
"mkdir -p"
"%ISEProjectRoot"
"%ISEWorkspace"
"' ;"
<!-- Copy snapshot generated after synthesis from local to remote -->
"rsync -avrR -e ssh"
<!-- Copy snapshot generated earlier from local to remote -->
<!-- "rsync -avrR -e ssh" -->
"rsync -avr -e ssh"
<!-- from: -->
"%ISELocalDir/%%StateFile"
<!-- to: -->
"%RemoteUser@%RemoteHost:%ISEProjectRoot"
"%RemoteUser@%RemoteHost:%ISEWorkspace/"
";"
</line>
......@@ -68,11 +69,19 @@
failure="ERROR"
prompt="@@FINISH@@"
log="">
"cd ~/%ISEProjectRoot\n"
"set outputDir ~/%ISEProjectRoot/%ISERemoteDir\n"
"file mkdir $outputDir\n"
"open_checkpoint %ISERemoteDir/%%StateFile\n"
"puts \"@@FINISH@@\"\n"
"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"
</line>
</output>
</tool>
......@@ -93,18 +102,33 @@
prompt="@@FINISH@@"
failure="ERROR"
log="">
"cd ~/%ISEProjectRoot\n"
"set outputDir ~/%ISEProjectRoot/%ISERemoteDir\n"
"file mkdir $outputDir\n"
"write_checkpoint -force %ISERemoteDir/%%StateFile\n"
"puts \"@@FINISH@@\"\n"
"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"
</line>
<line name="ise_copy_after_save">
"-c"
<!-- Copy snapshot from remote to local -->
"mkdir -p %ISELocalDir ;"
"rsync -avr -e ssh"
"%RemoteUser@%RemoteHost:%ISEProjectRoot/%ISERemoteDir/%%StateFile"
"%%StateDir/"
"%RemoteUser@%RemoteHost:%ISEWorkspace/%%StateFile"
"%%StateDir/ ;"
<!-- Remove snapshot at remote -->
"ssh"
"-oBatchMode=yes"
"-l %RemoteUser %RemoteHost"
"'"
"rm -f"
"%ISEWorkspace/%%StateFile"
"' ;"
</line>
</output>
</tool>
......
......@@ -183,8 +183,6 @@
</paramtype>
</typedef>
<syntax name="XSTPrjFile" format="%(verilog work %%ParamValue%|\n%)" />
</interface>
<tool name="ISExst" label="run XST"
......@@ -194,8 +192,12 @@
shell="/bin/bash"
ignore="%ISEIgnoreSource"
description="Run XST"
result="ISESnapshotSynth"
log-dir="ISELogDir"
state-dir="ISELocalDir"
restore="RestoreISESynthesis"
autosave="AutosaveISESynthesis"
save="SaveISESynthesis"
inherits="ISEToolPrototype"
>
<!-- disable="TRUE" -->
......@@ -214,6 +216,11 @@
<depends files="FilteredSourceListPar"/>
<depends files="constraints"/>
</depends-list>
<parameter id="clean_start" label="Clean start" tooltip= "Delete all files on remote before running XST"
default="false" visible="true" omit="false" type="BoolYesNo" format="Dash"/>
<parameter id="SkipSnapshotSynth" label="Skip snapshot" tooltip="Do not create snapshot after synthesis"
default="false"
type= "Boolean" format="None"/>
<!-- Constraints parameters -->
<parameter id="arch" label="VHDL architecture" tooltip= "VHDL Top Level Architecture"
default="" visible="true" omit="" type="String" format="Dash"/>
......@@ -463,13 +470,16 @@
readonly="true" visible="true" />
<parameter id="xst_prj_content" default="%%FilteredSourceList"
type="Stringlist" format="XSTPrjFile" visible="false" />
<!-- hidden (calculated) parameters -->
<parameter id="AutosaveISESynthesis" default="?%%ChosenActionIndex=0 ^ %SkipSnapshotSynth=false : true, false"
visible="false" type="Boolean" format="None"/>
<parameter id= "useRedirect" label="debug condition"
default="?(%info = true | %arch # ) ^ %redirect # : true , false" visible="true" omit="false" type="Boolean" format="None"/>
<input>
<group name="General options">
"clean_start"
"SkipSnapshotSynth"
"top"
"ConstraintsFiles"
"ifmt"
......@@ -477,10 +487,13 @@
"output_format" <!-- outid="ofmt" -->
"output_file" <!-- outid="ofn" -->
"target_device" <!-- outid="p" -->
"---"
"FilteredSourceListPar"
"RawOutFile"
"xst_prj"
"---"
"ISEProjectRoot"
"ISERemoteDir"
</group>
<group name ="Synthesis Options">
"constraints" <!-- outid="uc" -->
......@@ -588,14 +601,16 @@
>
"%xst_prj_content"
</line>
//xst_prj
<line name="ise_copy_pre_synth">
"-c"
"ssh"
"-oBatchMode=yes"
"-l %RemoteUser %RemoteHost"
"'"
<if clean_start="true">
"rm -f -r"
"%ISEProjectRoot;"
</if>
"mkdir -p"
"%ISEProjectRoot;"
<if-not tmpdir="/tmp">
......@@ -727,6 +742,7 @@
"quit\n"
</line>
<!-- TODO: copy results -->
<!--
<line name="ise_copy_after_partgen">
"-c"
"mkdir -p %ISELocalResultDir ;"
......@@ -738,7 +754,22 @@
</if>
"%ISELocalResultDir/"
</line>
-->
</output>
</tool>
<!-- Restore tool for ISESynthesis -->
<tool name="RestoreISESynthesis"
project="FPGA_project"
interface="ISEInterface"
package="FPGA_package"
inherits="RestoreISE"/>
<!-- Save tool for ISESynthesis -->
<tool name="SaveISESynthesis"
project="FPGA_project"
interface="ISEInterface"
package="FPGA_package"
inherits="SaveISE"/>
</vdt-project>
......@@ -110,7 +110,8 @@
<if-not reference_bitfile="">
<line name="vivado_copy_pre_opt">
"-c"
"rsync -avrR -e ssh"
<!-- "rsync -avrR -e ssh" -->
"rsync -avr -e ssh"
<!-- from: (trying full name) -->
"%VivadoLocalResultDir/%reference_bitfile"
<!-- to: -->
......
......@@ -35,7 +35,8 @@
"%VivadoProjectRoot"
"' ;"
<!-- Copy snapshot generated after synthesis from local to remote -->
"rsync -avrR -e ssh"
<!-- "rsync -avrR -e ssh" -->
"rsync -avr -e ssh"
<!-- from: -->
"%VivadoLocalDir/%%StateFile"
<!-- to: -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment