Commit 7ee96883 authored by Andrey Filippov's avatar Andrey Filippov

Split tools into core, restore and save, made inheritance work in these

cases
parent 4c8d5dc3
......@@ -32,6 +32,7 @@ import org.eclipse.ui.console.IConsoleManager;
import com.elphel.vdt.core.tools.ToolsCore;
import com.elphel.vdt.core.tools.params.Tool;
import com.elphel.vdt.core.tools.params.Tool.TOOL_MODE;
import com.elphel.vdt.core.tools.params.Tool.TOOL_STATE;
import com.elphel.vdt.ui.MessageUI;
import com.elphel.vdt.veditor.VerilogPlugin;
......@@ -289,7 +290,8 @@ public class RunningBuilds {
VDTRunnerConfiguration runConfig=unfinishedBuilds.get(consoleName);
if (toolName.equals(runConfig.getToolName())){
Tool tool=ToolsCore.getTool(runConfig.getToolName());
tool.setRunning(false);
// tool.setRunning(false);
tool.setMode(TOOL_MODE.STOP);
tool.toolFinished();
if (tool.getState()==TOOL_STATE.KEPT_OPEN) {
MessageUI.error("Termninal that starts by this tool ("+toolName+") is already open in console \""+consoleName+"\"");
......
......@@ -55,6 +55,7 @@ import com.elphel.vdt.Txt;
import com.elphel.vdt.core.tools.ToolsCore;
import com.elphel.vdt.core.tools.contexts.BuildParamsItem;
import com.elphel.vdt.core.tools.params.Tool;
import com.elphel.vdt.core.tools.params.Tool.TOOL_MODE;
import com.elphel.vdt.core.tools.params.Tool.TOOL_STATE;
import com.elphel.vdt.ui.MessageUI;
//import com.elphel.vdt.VDTPlugin;
......@@ -69,6 +70,7 @@ import com.elphel.vdt.veditor.preference.PreferenceStrings;
//import com.elphel.vdt.core.Utils;
import org.eclipse.ui.console.IConsoleListener;
......@@ -94,7 +96,8 @@ public class VDTRunner {
Tool tool=ToolsCore.getTool(runConfig.getToolName());
tool.setDirty(false);
tool.setState(TOOL_STATE.FAILURE);
tool.setRunning(false);
// tool.setRunning(false);
tool.setMode(TOOL_MODE.STOP);
tool.setTimeStamp();
tool.toolFinished();
//removeConfiguration
......@@ -264,7 +267,9 @@ public class VDTRunner {
if (debugPrint) System.out.println("All finished");
monitor.done();
Tool tool=ToolsCore.getTool(runConfig.getToolName());
tool.setRunning(false);
// tool.setRunning(false);
tool.setMode(TOOL_MODE.STOP);
tool.setTimeStamp();
if ((tool.getState()==TOOL_STATE.SUCCESS) && runConfig.isKeptOpen()) {
tool.setState(TOOL_STATE.KEPT_OPEN);
......@@ -331,12 +336,11 @@ public class VDTRunner {
} //for (;numItem<argumentsItemsArray.length;numItem++){
System.out.println("All playbacks finished");
monitor.done();
ToolsCore.getTool(runConfig.getToolName()).setRunning(false);
// ToolsCore.getTool(runConfig.getToolName()).setRunning(false);
ToolsCore.getTool(runConfig.getToolName()).setMode(TOOL_MODE.STOP);
ToolsCore.getTool(runConfig.getToolName()).toolFinished();
}
public void log(String header,
String[] strings,
String[] controlFiles,
......
......@@ -130,7 +130,10 @@ public class XMLConfig extends Config {
static final String CONTEXT_TOOL_DISABLED = "disabled"; // Parameter name that disables the tool if true
static final String CONTEXT_TOOL_RESULT = "result"; // Parameter name keeps the filename representing result (snapshot)
static final String CONTEXT_TOOL_RESTORE = "restore"; // tool name that restores the state form result
static final String CONTEXT_TOOL_RESTORE = "restore"; // tool name that restores the state from result (shapshot)
static final String CONTEXT_TOOL_SAVE = "save"; // tool name that saves the state to result file (snapshot)
static final String CONTEXT_TOOL_AUTOSAVE = "autosave"; // Parameter name of boolean type that controls automatic save after success
static final String CONTEXT_TOOL_ABSTRACT = "abstract"; // true for the prototype tools used only for inheritance by others
static final String CONTEXT_LINEBLOCK_TAG = "line";
......@@ -572,7 +575,8 @@ public class XMLConfig extends Config {
String contextLabel = getAttributeValue(contextNode, CONTEXT_LABEL_ATTR);
if(contextLabel == null)
throw new ConfigException(err.msg(CONTEXT_LABEL_ATTR));
contextLabel=contextName; // Use name as label /Andrey
// throw new ConfigException(err.msg(CONTEXT_LABEL_ATTR));
Context context = null;
......@@ -636,12 +640,24 @@ public class XMLConfig extends Config {
String result = getAttributeValue(contextNode, CONTEXT_TOOL_RESULT);
String restore = getAttributeValue(contextNode, CONTEXT_TOOL_RESTORE);
String saveString = getAttributeValue(contextNode, CONTEXT_TOOL_SAVE);
String autoSaveString = getAttributeValue(contextNode, CONTEXT_TOOL_AUTOSAVE);
String isAbstractAttr = getAttributeValue(contextNode, CONTEXT_TOOL_ABSTRACT);
boolean isAbstract;
if(isAbstractAttr != null) {
checkBoolAttr(isAbstractAttr, CONTEXT_TOOL_ABSTRACT);
isAbstract = getBoolAttrValue(isAbstractAttr);
} else {
isAbstract = false;
}
boolean isShell=false;
if (toolShell != null){
toolExe=toolShell;
isShell=true;
}
if(toolExe == null)
if((toolExe == null) && (toolBase == null)) // when tool inherits, it's exe will be inherited too - check!
throw new ConfigException(err.msg(CONTEXT_TOOL_EXE_ATTR));
// if(toolShell == null) toolShell="";
......@@ -682,11 +698,13 @@ public class XMLConfig extends Config {
disabled,
result,
restore,
saveString,
autoSaveString,
isAbstract,
null,
null,
null);
break;
default:
throw new ConfigException("Internal error: unknown context kind '" + contextKind + "'");
}
......
......@@ -166,6 +166,7 @@ public class ContextManager {
private Context findContext(List<? extends Context> contexts, String name) {
for(Context context : contexts) {
// System.out.println("Comparing "+context.getName() +" with "+name);
if(context.getName().equals(name))
return context;
}
......
......@@ -18,7 +18,6 @@
package com.elphel.vdt.core.tools.generators;
import com.elphel.vdt.VDT;
import com.elphel.vdt.ui.variables.SelectedResourceManager;
public class StateDirGenerator extends AbstractGenerator {
public static final String NAME = VDT.GENERATOR_ID_STATE_DIR;
......@@ -27,8 +26,6 @@ public class StateDirGenerator extends AbstractGenerator {
}
protected String[] getStringValues() {
String stateDir=(tool0==null)?null:tool0.getStateDir();
if (stateDir==null) stateDir="";
return new String[] {stateDir};
return new String[] {(tool0!=null)?tool0.getStateDir(): ""};
}
}
......@@ -27,8 +27,6 @@ public class StateFileGenerator extends AbstractGenerator {
}
protected String[] getStringValues() {
String stateFile=(tool0==null)? null: tool0.getStateFile(); // calculated from result name and timestamp, or explicitly specified
if (stateFile==null) stateFile="";
return new String[] {stateFile};
return new String[] {(tool0!=null)?tool0.getStateFile(): ""};
}
}
......@@ -483,11 +483,6 @@ public class Parameter implements Cloneable, Updateable {
// returns current value if it is set
// otherwise returns default value
public List<String> getValue() {
/*
if (id.equals("SimulationTopFile")){ // Andrey
System.out.println("getValue() SimulationTopFile");
}
*/
if(!currentValue.isEmpty())
return currentValue;
......@@ -497,11 +492,6 @@ public class Parameter implements Cloneable, Updateable {
// returns external form of the current value unless it equals null;
// otherwise returns external form of the default value
public List<String> getExternalValueForm() {
/*
if (id.equals("SimulationTopFile")){ // Andrey
System.out.println("getExternalValueForm() SimulationTopFile");
}
*/
List<String> externalFormValue = new ArrayList<String>();
for(Iterator<String> i = getValue().iterator(); i.hasNext();) {
......
......@@ -25,8 +25,11 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.swt.widgets.Display;
import com.elphel.vdt.Txt;
import com.elphel.vdt.core.launching.LaunchCore;
import com.elphel.vdt.core.launching.ToolLogFile;
import com.elphel.vdt.core.tools.ToolsCore;
import com.elphel.vdt.core.tools.params.Tool.TOOL_MODE;
import com.elphel.vdt.core.tools.params.Tool.TOOL_STATE;
import com.elphel.vdt.ui.MessageUI;
import com.elphel.vdt.ui.options.FilteredFileSelector;
......@@ -53,7 +56,8 @@ public class ToolSequence {
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_TOOL_SEQUENCE))
System.out.println("\nTool "+tool.getName()+" FINISHED - add more stuff here");
if (tool.getState()==TOOL_STATE.SUCCESS){
updateLinkLatest(tool);
if (tryAutoSave(tool)) return; // started autoSave that will trigger "toolFinished" again
updateLinkLatest(tool); // TODO - maybe swap and do updateLinkLatest before tryAutoSave
} else if (tool.getState()==TOOL_STATE.KEPT_OPEN){
} else {
......@@ -67,9 +71,54 @@ public class ToolSequence {
});
}
}
private boolean tryAutoSave(Tool tool){
if (
(tool.getSave()!=null) &&
tool.getAutoSave() &&
(designFlowView!=null) &&
(tool.getLastMode()==TOOL_MODE.RUN)) { // it was not playback of logs
final Tool fTool=tool.getSave();
final IProject fProject = SelectedResourceManager.getDefault().getSelectedProject();
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_TOOL_SEQUENCE)) {
System.out.println("Launching autosave tool "+fTool.getName()+" for "+tool.getName());
}
fTool.setDesignFlowView(designFlowView); // maybe will not be needed with ToolSequencing class
// fTool.setRunning(true);
fTool.setMode(TOOL_MODE.SAVE);
// fTool.toolFinished();
fTool.setChoice(0);
// SelectedResourceManager.getDefault().updateActionChoice(fullPath, choice, ignoreFilter); // A
// SelectedResourceManager.getDefault().setBuildStamp(); // Use the same from Master
// apply designFlowView to the tool itself
Display.getDefault().asyncExec(new Runnable() {
public void run() {
try {
LaunchCore.launch( fTool,
fProject,
null, //fullPath,
null); // run, not playback
} catch (CoreException e1) {
MessageUI.error( Txt.s("Action.ToolLaunch.Error",
new String[] {"Autosave by "+fTool.getName(), e1.getMessage()})
, e1);
}
}
});
return true;
} else if (tool.getSaveMaster()!=null){
// tool.getSaveMaster().setRunning(false); // turn off the master tool that invoked this save one (may be called directly too)
tool.getSaveMaster().setMode(TOOL_MODE.STOP);
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_TOOL_SEQUENCE)) {
System.out.println("Finished autosave tool "+tool.getName()+" for "+tool.getSaveMaster().getName());
}
}
return false;
}
// Result file may be skipped, in that case link should not be updated, but the console state should be
private void updateLinkLatest(Tool tool){
if (tool.getLastMode()==TOOL_MODE.PLAYBACK) return; // do nothing here
String stateDirString=tool.getStateDir();
String linkString=tool.getResultName();
String targetString=tool.getStateFile(); // With timestamp or specifically set through selection
......@@ -143,15 +192,11 @@ public class ToolSequence {
for(Iterator<Tool> iter = sessionList.iterator(); iter.hasNext();) {
Tool consoleTool=iter.next();
consoleTool.setOpenState(targetString);
consoleTool.setOpenTool(tool);
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_TOOL_SEQUENCE))
System.out.println("Set openState of "+consoleTool.getName()+" to "+targetString);
}
}
/*
public String getOpenState() { return openState; }
public void setOpenState(String stateName) { openState=stateName;}
*/
return true;
}
public String getSelectedStateFile(Tool tool, boolean select){
......
......@@ -52,6 +52,7 @@ import com.elphel.vdt.core.tools.ToolsCore;
import com.elphel.vdt.core.tools.contexts.Context;
import com.elphel.vdt.core.tools.menu.DesignMenu;
import com.elphel.vdt.core.tools.params.Tool;
import com.elphel.vdt.core.tools.params.Tool.TOOL_MODE;
import com.elphel.vdt.core.tools.params.Tool.TOOL_STATE;
import com.elphel.vdt.core.tools.params.ToolSequence;
import com.elphel.vdt.core.tools.params.types.RunFor;
......@@ -644,8 +645,7 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
try {
launchTool(
fTool, // tool, will get
fDesignFlowView, // to be able to launch update when build state of the tool changes
// selectedItem, // is it needed?
// fDesignFlowView, // to be able to launch update when build state of the tool changes
finalI,
fFullPath,
fIgnoreFilter);
......@@ -697,7 +697,7 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
try {
launchTool(
restoreTool,
fDesignFlowView, // to be able to launch update when build state of the tool changes
// fDesignFlowView, // to be able to launch update when build state of the tool changes
0,
fFullPath,
fIgnoreFilter);
......@@ -727,7 +727,7 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
try {
launchTool(
restoreTool,
fDesignFlowView, // to be able to launch update when build state of the tool changes
// fDesignFlowView, // to be able to launch update when build state of the tool changes
0,
fFullPath,
fIgnoreFilter);
......@@ -828,15 +828,14 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
private void launchTool(
Tool tool,
final DesignFlowView designFlowView,
// DesignMenuModel.Item item,
// final DesignFlowView designFlowView,
int choice,
String fullPath,
String ignoreFilter) throws CoreException {
// if (tool==null) tool = selectedItem.getTool();
if (tool != null) {
tool.setDesignFlowView(designFlowView);
tool.setRunning(true);
// tool.setDesignFlowView(designFlowView);
tool.setDesignFlowView(this); // maybe will not be needed with ToolSequencing class
tool.setMode(TOOL_MODE.RUN);
tool.toolFinished();
tool.setChoice(0);
SelectedResourceManager.getDefault().updateActionChoice(fullPath, choice, ignoreFilter); // Andrey
......@@ -844,7 +843,6 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
// apply designFlowView to the tool itself
LaunchCore.launch( tool,
selectedResource.getProject(),
// , selectedResource.getFullPath().toString() );
fullPath,
null); // run, not playback
......@@ -871,7 +869,8 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
System.out.println("logBuildStamp="+logBuildStamp);
}
tool.setDesignFlowView(designFlowView);
tool.setRunning(true);
// tool.setRunning(true);
tool.setMode(TOOL_MODE.PLAYBACK);
tool.toolFinished();
tool.setChoice(0);
SelectedResourceManager.getDefault().updateActionChoice(fullPath, 0, ignoreFilter); // Andrey
......
......@@ -15,4 +15,80 @@
<syntax name="read_xdc_syntax" format="%(read_xdc %%ParamValue%|\n%)" /> -->
</interface>
<!-- Abstract tools to be inherited by instances used for various Vivado tools -->
<!-- Restore tool for Vivado -->
<tool name="RestoreVivado" label="Restore state after Vivado tool"
project="FPGA_project"
interface="VivadoInterface"
package="FPGA_package"
shell="/bin/bash"
abstract="true">
<output>
<line name="vivado_pre_restore">
"-c"
<!-- Create project directory on remote server if it did not exist -->
"ssh"
"-oBatchMode=yes"
"-l %RemoteUser %RemoteHost"
"'"
"mkdir -p"
"%VivadoProjectRoot"
"' ;"
<!-- Copy snapshot generated after synthesis from local to remote -->
"rsync -avrR -e ssh"
<!-- from: -->
"%VivadoLocalDir/%%StateFile"
<!-- to: -->
"%RemoteUser@%RemoteHost:%VivadoProjectRoot"
";"
</line>
<line name="vivado_restore"
dest="VivadoConsole"
mark="``"
sep=""
failure="ERROR"
prompt="@@FINISH@@"
log="">
"cd ~/%VivadoProjectRoot\n"
"set outputDir ~/%VivadoProjectRoot/build\n"
"file mkdir $outputDir\n"
"open_checkpoint %%StateFile\n"
"puts \"@@FINISH@@\"\n"
</line>
</output>
</tool>
<!-- Save tool for Vivado tool -->
<tool name="SaveVivado"
label="SaveVivado"
project="FPGA_project"
interface="VivadoInterface"
package="FPGA_package"
shell="/bin/bash"
abstract="true">
<output>
<line name="vivado_save"
dest="VivadoConsole"
mark="``"
sep=""
prompt="@@FINISH@@"
failure="ERROR"
log="">
"cd ~/%VivadoProjectRoot\n"
"set outputDir ~/%VivadoProjectRoot/build\n"
"file mkdir $outputDir\n"
"write_checkpoint -force %%StateFile\n"
"puts \"@@FINISH@@\"\n"
</line>
<line name="vivado_copy_after_save">
"-c"
"mkdir -p %VivadoLocalDir ;"
"rsync -avr -e ssh"
"%RemoteUser@%RemoteHost:%VivadoProjectRoot/%%StateFile"
"%%StateDir/"
</line>
</output>
</tool>
</vdt-project>
......@@ -59,6 +59,9 @@
state-dir="VivadoLocalDir"
restore="RestoreVivadoOptPlace"
disable="DisableVivadoOptPlace"
autosave="AutosaveVivadoOptPlace"
save="SaveVivadoOptPlace"
>
<action-menu>
<action label="Optimize and Place" resource="" icon="mondrian2x2.png" />
......@@ -211,6 +214,10 @@
<!-- not really used now, always "0" -->
<parameter id="VivadoOptPlaceActionIndex" default="%%ChosenActionIndex"
type="String" format="CopyValue" visible="false" />
<!-- invisible/calculated parameters -->
<parameter id="AutosaveVivadoOptPlace" default="?%%ChosenActionIndex=0 ^ %SkipSnapshotSynth=false : true, false"
visible="false" type="Boolean" format="None"/>
<input>
<group name="General">
......@@ -372,23 +379,9 @@
"%quiet_phys_opt"
"%verbose_phys_opt"
"\n"
</if>
<if SkipSnapshotPlace="false">
"write_checkpoint -force %%StateFile\n"
</if>
"puts \"@@FINISH@@\"\n"
</line>
<!-- -top npmtest -part xc7k70tfbg484-2 -flatten rebuilt\n" -->
<if-and SkipSnapshotPlace="false"
VivadoOptPlaceActionIndex="0">
<line name="vivado_copy_after_opt_place">
"-c"
"mkdir -p %VivadoLocalDir ;"
"rsync -avr -e ssh"
"%RemoteUser@%RemoteHost:%VivadoProjectRoot/%%StateFile"
"%%StateDir/"
</line>
</if-and>
<line name="parser_VivadoOpt"
errors= "PatternErrors"
warnings= "PatternWarnings"
......@@ -416,52 +409,18 @@
</output>
</tool>
<!-- Restore tool for VivadoOptPlace -->
<tool name="RestoreVivadoOptPlace"
project="FPGA_project"
interface="VivadoInterface"
package="FPGA_package"
inherits="RestoreVivado"/>
<!-- Save tool for VivadoOptPlace -->
<tool name="RestoreVivadoOptPlace" label="Restore state after Vivado OptPlace"
<tool name="SaveVivadoOptPlace"
project="FPGA_project"
interface="VivadoOptPlaceInterface"
interface="VivadoInterface"
package="FPGA_package"
shell="/bin/bash"
ignore="%VivadoIgnoreSource"
description="Restore Vivado OptPlace"
log-dir="VivadoLogDir"
state-dir="VivadoLocalDir"
>
<output>
<line name="vivado_pre_restore_opt_place">
"-c"
<!-- Create project directory on remote server if it did not exist -->
"ssh"
"-oBatchMode=yes"
"-l %RemoteUser %RemoteHost"
"'"
"mkdir -p"
"%VivadoProjectRoot"
"' ;"
<!-- Copy snapshot generated after opt/place from local to remote -->
"rsync -avrR -e ssh"
<!-- from: -->
"%VivadoLocalDir/%%StateFile"
<!-- to: -->
"%RemoteUser@%RemoteHost:%VivadoProjectRoot"
";"
</line>
<!-- success="phys_opt_design completed successfully" -->
<line name="vivado_restore_synthesis"
dest="VivadoConsole"
mark="``"
sep=""
failure="ERROR"
prompt="@@FINISH@@"
log="">
"cd ~/%VivadoProjectRoot\n"
"set outputDir ~/%VivadoProjectRoot/build\n"
"file mkdir $outputDir\n"
<!-- Start fresh from the loaded checkpoint -->
"open_checkpoint %%StateFile\n"
"puts \"@@FINISH@@\"\n"
</line>
</output>
</tool>
inherits="SaveVivado"/>
</vdt-project>
......@@ -27,6 +27,8 @@
state-dir="VivadoLocalDir"
restore="RestoreVivadoRoute"
disable="DisableVivadoRoute"
autosave="AutosaveVivadoRoute"
save="SaveVivadoRoute"
>
<action-menu>
<action label="Route" resource="" icon="route66.png" />
......@@ -131,6 +133,8 @@
<parameter id="OtherProblems" label="Other problems" tooltip= "Other problem patterns (after opening '[') to be suppressed)"
default="" visible="true" omit="" type="Stringlist" format="GrepFilterProblemOtherSyntax"/>
<parameter id="AutosaveVivadoRoute" default="?%%ChosenActionIndex=0 ^ %SkipSnapshotSynth=false : true, false"
visible="false" type="Boolean" format="None"/>
<!-- hidden (calculated) parameters -->
<!-- not really used now, always "0" -->
......@@ -227,22 +231,8 @@
"%quiet_route"
"%verbose_route"
"\n"
<if SkipSnapshotRoute="false">
"write_checkpoint -force %SnapshotRoute\n"
</if>
"puts \"@@FINISH@@\"\n"
</line>
<!-- -top npmtest -part xc7k70tfbg484-2 -flatten rebuilt\n" -->
<if-and SkipSnapshotRoute="false"
VivadoRouteActionIndex="0">
<line name="vivado_copy_after_route">
"-c"
"mkdir -p %VivadoLocalDir ;"
"rsync -avr -e ssh"
"%RemoteUser@%RemoteHost:%VivadoProjectRoot/%SnapshotRoute"
"%VivadoLocalDir/"
</line>
</if-and>
<line name="parser_VivadoRoute"
errors= "PatternErrors"
warnings= "PatternWarnings"
......@@ -271,50 +261,18 @@
</line>
</output>
</tool>
<tool name="RestoreVivadoRoute" label="Restore state after Vivado Route"
<!-- Restore tool for VivadoRoute -->
<tool name="RestoreVivadoRoute"
project="FPGA_project"
interface="VivadoRouteInterface"
interface="VivadoInterface"
package="FPGA_package"
shell="/bin/bash"
ignore="%VivadoIgnoreSource"
description="Restore Vivado Routing"
log-dir="VivadoLogDir"
state-dir="VivadoLocalDir"
>
<output>
<line name="vivado_pre_restore_route">
"-c"
<!-- Create project directory on remote server if it did not exist -->
"ssh"
"-oBatchMode=yes"
"-l %RemoteUser %RemoteHost"
"'"
"mkdir -p"
"%VivadoProjectRoot"
"' ;"
<!-- Copy snapshot generated after route from local to remote -->
"rsync -avrR -e ssh"
<!-- from: -->
"%VivadoLocalDir/%%StateFile"
<!-- to: -->
"%RemoteUser@%RemoteHost:%VivadoProjectRoot"
";"
</line>
<!-- success="phys_opt_design completed successfully" -->
<line name="vivado_restore_route"
dest="VivadoConsole"
mark="``"
sep=""
failure="ERROR"
prompt="@@FINISH@@"
log="">
"cd ~/%VivadoProjectRoot\n"
"set outputDir ~/%VivadoProjectRoot/build\n"
"file mkdir $outputDir\n"
<!-- Start fresh from the loaded checkpoint -->
"open_checkpoint %%StateFile\n"
"puts \"@@FINISH@@\"\n"
</line>
</output>
</tool>
inherits="RestoreVivado"/>
<!-- Save tool for VivadoRoute -->
<tool name="SaveVivadoRoute"
project="FPGA_project"
interface="VivadoInterface"
package="FPGA_package"
inherits="SaveVivado"/>
</vdt-project>
......@@ -61,7 +61,8 @@
state-dir="VivadoLocalDir"
restore="RestoreVivadoSynthesis"
disable="DisableVivadoSynth"
>
autosave="AutosaveVivadoSynthesis"
save="SaveVivadoSynthesis" >
<extensions-list>
<extension mask="v" />
......@@ -186,6 +187,11 @@
<parameter id="OtherProblems" label="Other problems" tooltip= "Other problem patterns (after opening '[') to be suppressed)"
default="" visible="true" omit="" type="Stringlist" format="GrepFilterProblemOtherSyntax"/>
<!-- invisible/calculated parameters -->
<parameter id="AutosaveVivadoSynthesis" default="?%%ChosenActionIndex=0 ^ %SkipSnapshotSynth=false : true, false"
visible="false" type="Boolean" format="None"/>
<input>
<group name="General">
"ConstraintsFiles"
......@@ -308,28 +314,8 @@
"%quiet"
"%verbose"
"\n"
<if-and SkipSnapshotSynth="false"
VivadoSynthActionIndex="0">
<!-- "write_checkpoint -force %SnapshotSynth\n" -->
"write_checkpoint -force %%StateFile\n"
</if-and>
"puts \"@@FINISH@@\"\n"
</line>
<!-- -top npmtest -part xc7k70tfbg484-2 -flatten rebuilt\n" -->
<if-and SkipSnapshotSynth="false"
VivadoSynthActionIndex="0">
<line name="vivado_copy_after_synth">
"-c"
"mkdir -p %VivadoLocalDir ;"
"rsync -avr -e ssh"
<!-- "%RemoteUser@%RemoteHost:%VivadoProjectRoot/%SnapshotSynth"
"%VivadoLocalDir/" -->
"%RemoteUser@%RemoteHost:%VivadoProjectRoot/%%StateFile"
"%%StateDir/"
</line>
</if-and>
<!-- errors=".*[ERROR|CRITICAL WARNING]: (\[.*\].*)\[(.*):([0-9]+)\]"
-->
<line name="parser_VivadoSynth"
errors= "PatternErrors"
warnings= "PatternWarnings"
......@@ -355,50 +341,18 @@
</line>
</output>
</tool>
<tool name="RestoreVivadoSynthesis" label="Restore state after Vivado Synthesis"
<!-- Restore tool for VivadoSynthesis -->
<tool name="RestoreVivadoSynthesis"
project="FPGA_project"
interface="VivadoSynthesisInterface"
interface="VivadoInterface"
package="FPGA_package"
shell="/bin/bash"
ignore="%VivadoIgnoreSource"
description="Restore Vivado Synthesis"
log-dir="VivadoLogDir"
state-dir="VivadoLocalDir"
>
<output>
<line name="vivado_pre_restore_synthesis">
"-c"
<!-- Create project directory on remote server if it did not exist -->
"ssh"
"-oBatchMode=yes"
"-l %RemoteUser %RemoteHost"
"'"
"mkdir -p"
"%VivadoProjectRoot"
"' ;"
<!-- Copy snapshot generated after synthesis from local to remote -->
"rsync -avrR -e ssh"
<!-- from: -->
"%VivadoLocalDir/%%StateFile"
<!-- to: -->
"%RemoteUser@%RemoteHost:%VivadoProjectRoot"
";"
</line>
<!-- success="phys_opt_design completed successfully" -->
<line name="vivado_restore_synthesis"
dest="VivadoConsole"
mark="``"
sep=""
failure="ERROR"
prompt="@@FINISH@@"
log="">
"cd ~/%VivadoProjectRoot\n"
"set outputDir ~/%VivadoProjectRoot/build\n"
"file mkdir $outputDir\n"
<!-- Start fresh from the loaded checkpoint -->
"open_checkpoint %%StateFile\n"
"puts \"@@FINISH@@\"\n"
</line>
</output>
</tool>
inherits="RestoreVivado"/>
<!-- Save tool for VivadoSynthesis -->
<tool name="SaveVivadoSynthesis"
project="FPGA_project"
interface="VivadoInterface"
package="FPGA_package"
inherits="SaveVivado"/>
</vdt-project>
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