Commit 4a32831e authored by Andrey Filippov's avatar Andrey Filippov

continue on tool sequence

parent fa962a13
......@@ -115,7 +115,7 @@ public class ToolLogFile {
* @param hasErr Has error log (if no separate output log - no suffix
* @param buildStamp if null - write log mode, "" - read link (latest) file, else - read that build stamp file
*/
public ToolLogFile (
public ToolLogFile(
String logDir,
String logTool,
String logName,
......
......@@ -198,6 +198,7 @@ public class VDTConsoleRunner{
System.out.println("Using success string: \""+buildParamsItem.getSuccessString()+"\"");
System.out.println("Using failure string: \""+buildParamsItem.getFailureString()+"\"");
}
String timeStamp=ToolsCore.getTool(runConfig.getToolName()).getTimeStamp();
toolLogFile=(((fSendOutputToStreamProxy!=null) || (fSendErrorsToStreamProxy!=null)))?
(new ToolLogFile (
runConfig.getLogDir(),
......@@ -206,11 +207,7 @@ public class VDTConsoleRunner{
null, // extension - use default
fHasStdout, // fSendOutputToStreamProxy!=null, //boolean useOut,
fHasStderr, // fSendErrorsToStreamProxy!=null, //boolean useErr, WRONG
null)) : null;//String buildStamp
//final ToolLogFile fToolLogFile=toolLogFile;
//errorListener=null;
// if (fSendErrorsToStreamProxy!=null){
timeStamp)) : null;//String buildStamp - use the one from the tool
final IStreamMonitor consoleErrStreamMonitor=consoleInStreamProxy.getErrorStreamMonitor();
errorListener=new IStreamListener(){
......@@ -399,7 +396,10 @@ public class VDTConsoleRunner{
VDTLaunchUtil.getRunner().abortLaunch(runConfig.getOriginalConsoleName());
return;
}
if (runConfig.gotGood()){
if (runConfig.gotGood() ||
((buildParamsItem.getFailureString()!=null) && // was only looking for bad, otherwise OK
(buildParamsItem.getSuccessString()==null))
){
tool.setDirty(false);
tool.setState(TOOL_STATE.SUCCESS);
} else if (buildParamsItem.getSuccessString()!=null){
......
......@@ -98,7 +98,7 @@ public class VDTRunner {
tool.setState(TOOL_STATE.FAILURE);
// tool.setRunning(false);
tool.setMode(TOOL_MODE.STOP);
tool.setTimeStamp();
// tool.setTimeStamp(); // will set at start
tool.toolFinished();
//removeConfiguration
runningBuilds.removeConfiguration(runConfig.getOriginalConsoleName());
......@@ -270,7 +270,7 @@ public class VDTRunner {
// tool.setRunning(false);
tool.setMode(TOOL_MODE.STOP);
tool.setTimeStamp();
// tool.setTimeStamp(); //will set at start
if ((tool.getState()==TOOL_STATE.SUCCESS) && runConfig.isKeptOpen()) {
tool.setState(TOOL_STATE.KEPT_OPEN);
} else { // failure on not
......
......@@ -139,6 +139,7 @@ public class BuildParamsItem implements Cloneable{
}
public String getNameAsParser() { return is_parser?name:null; }
public boolean isParser() {return is_parser;}
public String getName() { return name; }
public String getErrors() { return toolErrors; }
public String getWarnings() { return toolWarnings; }
......
......@@ -26,6 +26,7 @@ import java.util.Iterator;
import java.util.ArrayList;
import java.util.List;
import com.elphel.vdt.core.tools.ToolsCore;
import com.elphel.vdt.core.tools.config.Config;
import com.elphel.vdt.core.tools.config.ConfigException;
import com.elphel.vdt.core.tools.config.xml.XMLConfig;
......@@ -58,6 +59,7 @@ public abstract class Context {
private String workingDirectory;
private String version;
private Context context=null;
private int currentHash; // calculated during buildparam from non-parser command blocks and command files.
protected Context(String name,
String controlInterfaceName,
String label,
......@@ -77,6 +79,17 @@ public abstract class Context {
this.paramContainer = new ParameterContainer(params);
}
/**
* Generated hashcode for the last run of buildParams() - includes command files and non-parser command lines
* @return generated hash code
*/
public int getCurrentHash(){
return currentHash;
}
public void setCurrentHash(int hash){
currentHash=hash;
}
public void init(Config config) throws ConfigException {
checkNotInitialized();
......@@ -217,16 +230,38 @@ public abstract class Context {
}
return consoleList;
}
// currently - for all tools, skip generation of control files, ignore errors
public void recalcHashCodes(){
System.out.println("Context.java(): RECALC HASH CODES");
// called from ContextOptionsDialog.okPressed() line: 89
// all context parameters are already recalculated (buildParams() ), so now we just go through all tool contexts,
// calling them with dryRun=true;
for (Tool tool : ToolsCore.getConfig().getContextManager().getToolList()){
try {
tool.buildParams(false);
if (tool.hashMatch()) System.out.println("recalcHashCodes(): "+tool.getName()+
" hashMatch()="+tool.hashMatch()+
" getCurrentHash()="+tool.getCurrentHash()+
" getLastRunHash()="+tool.getLastRunHash());
} catch (ToolException e) {
System.out.println("failed buildParams(false) on tool="+tool.getName()+", e="+e.toString());
}
}
}
public BuildParamsItem[] buildParams() throws ToolException {
return buildParams(false);
}
public BuildParamsItem[] buildParams(boolean dryRun) throws ToolException {
List<BuildParamsItem> buildParamItems = new ArrayList<BuildParamsItem>();
// List<String> commandLineParams = new ArrayList<String>();
Iterator<CommandLinesBlock> commandLinesBlockIter = commandLinesBlocks.iterator(); // command lines block is empty (yes, there is nothing in project output)
createdControlFiles.clear();
currentHash=0;
while(commandLinesBlockIter.hasNext()) {
CommandLinesBlock commandLinesBlock = (CommandLinesBlock)commandLinesBlockIter.next();
......@@ -281,6 +316,7 @@ public abstract class Context {
if (isConsoleName) {
// System.out.println("TODO: Enable console command generation here");
printStringsToConsoleLine(commandLineParams, commandSequence,sep,mark);
//if (name!=null) - it is a parser, do not include in hashcode generation
buildParamItems.add(
new BuildParamsItem (
(String[])commandLineParams.toArray(new String[commandLineParams.size()]),
......@@ -313,12 +349,17 @@ public abstract class Context {
// write strings to control file
boolean controlFileExists = controlFileExists(controlFileName);
printStringsToFile(controlFileName, controlFileExists, commandSequence, sep, mark);
if(!controlFileExists)
createdControlFiles.add(controlFileName);
if (!dryRun) {
printStringsToFile(controlFileName, controlFileExists, commandSequence, sep, mark);
if(!controlFileExists)
createdControlFiles.add(controlFileName);
}
// include hash codes for each segment of the command file content
for (List<String> lStr:commandSequence){
if (lStr!=null) for (String str:lStr){
if (str!=null) currentHash += str.hashCode();
}
}
}
} else { // processing command line
printStringsToCommandLine(commandLineParams, commandSequence, mark);
......@@ -351,6 +392,27 @@ public abstract class Context {
BuildParamsItem buildParamsItem = (BuildParamsItem)buildParamItemsIter.next();
buildParamsItem.removeNonParser(buildParamItems);
}
// include hash codes for each line in the command sequence if it is not a parser
for (BuildParamsItem item:buildParamItems){
if (!item.isParser()){
String [] params=item.getParams();
if (params!=null) for (int i=0;i<params.length;i++){
currentHash += params[i].hashCode();
}
}
}
// System.out.println("BildParam("+dryRun+"), name="+name+" currentHash="+currentHash);
// Seems that during build it worked on a working copy of the tool, so calculated parameter did not get back
Tool proto=ToolsCore.getConfig().getContextManager().findTool(name);
if (proto!=null){
if (proto!=this){
System.out.println("++++ Updating tool's currentHas from working copy, name="+name);
proto.setCurrentHash(currentHash);
}
}
return (BuildParamsItem[])buildParamItems.toArray(new BuildParamsItem[buildParamItems.size()]);
}
......
......@@ -27,6 +27,12 @@ public class BuildStampGenerator extends AbstractGenerator {
}
protected String[] getStringValues() {
return new String[] {SelectedResourceManager.getDefault().getBuildStamp()};
// if ( return new String[] {(tool0!=null)?tool0.getStateFile(): ""};
// System.out.println("#### BuildStampGenerator(): tool0="+
//((tool0!=null)?(tool0.getName()+" state="+tool0.getState()+" mode="+tool0.getMode()):"null"));
String stamp=(tool0!=null)?tool0.getTimeStamp(): null;
if (stamp==null) stamp=SelectedResourceManager.getDefault().getBuildStamp();
return new String[] {stamp};
}
}
\ No newline at end of file
/*******************************************************************************
* 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/>.
*******************************************************************************/
package com.elphel.vdt.core.tools.generators;
import com.elphel.vdt.VDT;
import com.elphel.vdt.ui.variables.SelectedResourceManager;
/**
* Generates name of teh sate file without extension
*
*/
public class StateBaseGenerator extends AbstractGenerator {
public static final String NAME = VDT.GENERATOR_ID_STATE_FILE;
public String getName() {
return NAME;
}
protected String[] getStringValues() {
String base=(tool0!=null)?tool0.getStateFile(): "";
if (base.lastIndexOf('.')>=0) base=base.substring(0,base.lastIndexOf('.'));
return new String[] {base};
}
}
......@@ -49,6 +49,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
private static final String TAG_TOOL_PINNED = ".toolstate.pinned";
private static final String TAG_TOOL_STATE = ".toolstate.state";
private static final String TAG_TOOL_TIMESTAMP = ".toolstate.timeStamp";
private static final String TAG_TOOL_LASTRUNHASH = ".toolstate.lastRunHash";
private String baseToolName;
......@@ -100,7 +101,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
private boolean dirty=false; // tool ran before its sources (runtime value)
private boolean pinned=false; // tool ran before its sources (runtime value)
private long runStamp=0; // timestamp of the tool last ran (0 - never)
// private long runStamp=0; // timestamp of the tool last ran (0 - never)
private TOOL_STATE state=TOOL_STATE.NEW; // tool state (succ, fail,new, running)
// private boolean running=false;
// private long finishTimeStamp=0;
......@@ -121,7 +122,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
private TOOL_MODE runMode;
private TOOL_MODE lastRunMode; // last running (not STOP) mode
private int lastRunHash; // hash code of the last run
public Tool(String name,
String controlInterfaceName,
......@@ -222,7 +223,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
PLAYBACK
}
public void setRunStamp(long runStamp) { this.runStamp=runStamp; }
// public void setRunStamp(long runStamp) { this.runStamp=runStamp; }
public List<String> getDepends() { return depends; }
public boolean isDirty() { return dirty; }
// public boolean isRunning() { return running; }
......@@ -231,7 +232,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
public TOOL_MODE getLastMode() { return lastRunMode; }
public long getRunStamp() { return runStamp; }
// public long getRunStamp() { return runStamp; }
public TOOL_STATE getState() { return state; }
public boolean isPinned() { return pinned; }
public String getOpenState() { return openState; }
......@@ -240,13 +241,6 @@ public class Tool extends Context implements Cloneable, Inheritable {
public Tool getOpenTool() { return openTool; }
public void setOpenTool(Tool openTool) { this.openTool=openTool;}
public void setTimeStamp(){
timeStamp=SelectedResourceManager.getDefault().getBuildStamp();
}
public String getFinishTimeStamp(){
return timeStamp;
}
public void setDirty(boolean dirty) {
this.dirty=dirty;
......@@ -262,14 +256,37 @@ public class Tool extends Context implements Cloneable, Inheritable {
}
public void setMode(TOOL_MODE mode) {
if ((runMode!=TOOL_MODE.STOP) && (mode==TOOL_MODE.STOP)){ // jsut stopped
lastRunHash=getCurrentHash();
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_TOOL_SEQUENCE)) {
System.out.println(":::: Tool "+name+": lastRunHash="+lastRunHash);
}
}
runMode=mode;
if (mode!=TOOL_MODE.STOP) lastRunMode=mode;
if (mode == TOOL_MODE.RUN) { // Only RUN
setTimeStamp(); // copy current time to tool timestamp
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_TOOL_SEQUENCE)) {
System.out.println(":::: Tool "+name+": setTimeStamp="+timeStamp);
}
}
// toolFinished();
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_TOOL_SEQUENCE)) {
System.out.println("--->> "+name+": setMode("+mode+"), lastRunMode="+lastRunMode);
}
}
public boolean hashMatch(){
return lastRunHash == getCurrentHash();
}
public int getLastRunHash(){
return lastRunHash;
}
public void setLastRunHash(int hash){ // to restore from file
lastRunHash=hash;
}
public void setState(TOOL_STATE state) {
this.state=state;
// toolFinished();
......@@ -284,18 +301,6 @@ public class Tool extends Context implements Cloneable, Inheritable {
public void toolFinished(){
designFlowView.getToolSequence().toolFinished(this);
/*
System.out.println("Tool "+getName()+" FINISHED - add more stuff here");
if (designFlowView!=null){
Display.getDefault().syncExec(new Runnable() {
public void run() {
designFlowView.updateLaunchAction(); // Run from Display thread to prevent "invalid thread access" when called from Runner
}
});
}
*/
}
......@@ -659,13 +664,19 @@ System.out.println("Tool "+getName()+" FINISHED - add more stuff here");
return null;
}
public String getStateFile() {return getStateFile(true); }
public String getStateFile() {return getStateFile(true); } // With timestamp or as specified in resultFile
public String getStateFile(boolean first) {
if (resultFile!=null) return resultFile;
List<String> names= getResultNames();
if (names!=null) {
if (names.size()==0) return null;
return ToolLogFile.insertTimeStamp(names.get(0),SelectedResourceManager.getDefault().getBuildStamp());
// return ToolLogFile.insertTimeStamp(names.get(0),SelectedResourceManager.getDefault().getBuildStamp());
String stamp=getTimeStamp();
if (stamp==null){
// System.out.println("*** Warning: no timestamp available in Tool.getStateFile() for tool "+getName()); // OK when dryRun
return null;
}
return ToolLogFile.insertTimeStamp(names.get(0),getTimeStamp());
}
if (!first) return null ; // prevent loops
if (restoreMaster != null) return restoreMaster.getStateFile(false);
......@@ -673,13 +684,42 @@ System.out.println("Tool "+getName()+" FINISHED - add more stuff here");
return null;
}
public void setTimeStamp(){
timeStamp=SelectedResourceManager.getDefault().getBuildStamp();
}
public void setTimeStamp(String timeStamp){
this.timeStamp=timeStamp;
}
public String getTimeStamp() {return getTimeStamp(true); } // With timestamp or as specified in resultFile
public String getTimeStamp(boolean first){
if (timeStamp!=null) return timeStamp;
if (!first) return null ; // prevent loops
if (restoreMaster != null) return restoreMaster.getTimeStamp(false);
if (saveMaster != null) return saveMaster.getTimeStamp(false);
return null;
}
public String getStateLink() {return getStateLink(true); } // No timestamp, link name (or null)
public String getStateLink(boolean first) {
List<String> names= getResultNames();
if (names!=null) {
if (names.size()==0) return null;
return names.get(0);
}
if (!first) return null ; // prevent loops
if (restoreMaster != null) return restoreMaster.getStateLink(false);
if (saveMaster != null) return saveMaster.getStateLink(false);
return null;
}
public void setResultFile(String filename){
resultFile=filename;
}
public String getResultName(){
public String getResultName(){ // does not look at masters
List<String> names= getResultNames();
if ((names==null) || (names.size()==0)) return null;
return names.get(0);
......@@ -690,6 +730,8 @@ System.out.println("Tool "+getName()+" FINISHED - add more stuff here");
memento.putBoolean(name+TAG_TOOL_PINNED, new Boolean(pinned));
memento.putString(name+TAG_TOOL_STATE, this.state.toString());
if (timeStamp!=null) memento.putString(name+TAG_TOOL_TIMESTAMP, timeStamp);
if (lastRunHash!=0) memento.putInteger(name+TAG_TOOL_LASTRUNHASH, lastRunHash);
}
public void restoreState(IMemento memento) {
......@@ -707,6 +749,8 @@ System.out.println("Tool "+getName()+" FINISHED - add more stuff here");
}
String timestamp=memento.getString(name+TAG_TOOL_TIMESTAMP);
if (timestamp!=null) this.timeStamp=timestamp;
Integer hc=memento.getInteger(name+TAG_TOOL_LASTRUNHASH);
if (hc!=null) lastRunHash=hc;
}
......@@ -1012,6 +1056,7 @@ System.out.println("Tool "+getName()+" FINISHED - add more stuff here");
return super.buildParams();
}
protected List<String> buildCommandString(String paramStringTemplate)
throws ToolException
{
......
......@@ -102,7 +102,7 @@ public class RepeaterRecognizer implements Recognizer {
String repSuffix,
String separator)
{
System.out.println("Ever get here? RepeaterRecognizer.java:findGenerator()");
System.out.println("Ever get here? RepeaterRecognizer.java:findGenerator()"); // yes, sure
AbstractGenerator gen=new FilteredSourceListGenerator(repPrefix, repSuffix, separator);
if (genName.equals(gen.getName())) return gen;
gen=new SourceListGenerator(repPrefix, repSuffix, separator);
......
......@@ -38,7 +38,8 @@ public class SimpleGeneratorRecognizer implements Recognizer {
new BuildStampGenerator(),
new UserNameGenerator(),
new StateDirGenerator(),
new StateFileGenerator()
new StateFileGenerator(),
new StateBaseGenerator()
};
public SimpleGeneratorRecognizer(){
......
......@@ -74,14 +74,13 @@ public class VDTPluginImages {
public static final ImageDescriptor DESC_PACKAGE_PROPERTIES = create(ICONS_PATH, "obj16"+File.separator+"package_prop.gif", null);
public static final ImageDescriptor DESC_PROJECT_PROPERTIES = create(ICONS_PATH, "obj16"+File.separator+"project_prop.gif", null);
public static final ImageDescriptor DESC_DESIGM_MENU = create(ICONS_PATH, "obj16"+File.separator+"design_menu.gif", null);
public static final ImageDescriptor DESC_TOOLS_LINKED = create(ICONS_PATH, "obj16"+File.separator+"link.png", null);
public static final ImageDescriptor DESC_TOOLS_LINKED = create(ICONS_PATH, "obj16"+File.separator+"link.png", null);
public static final ImageDescriptor DESC_TOOLS_UNLINKED = create(ICONS_PATH, "obj16"+File.separator+"broken_link.png", null);
public static final ImageDescriptor DESC_TOOLS_SAVE = create(ICONS_PATH, "obj16"+File.separator+"save.png", null);
public static final ImageDescriptor DESC_TOOLS_STOP = create(ICONS_PATH, "obj16"+File.separator+"stop.png", null);
public static final ImageDescriptor DESC_TOOLS_PIN = create(ICONS_PATH, "obj16"+File.separator+"pin.png", null);
public static final ImageDescriptor DESC_TOOLS_RESTORE = create(ICONS_PATH, "obj16"+File.separator+"restore.png", null);
public static final ImageDescriptor DESC_TOOLS_RESTORE_SELECT = create(ICONS_PATH, "obj16"+File.separator+"restore_select.png", null);
public static final String ICON_TOOLSTATE_NEW = "obj16"+File.separator+"white.png";
public static final String ICON_TOOLSTATE_BAD = "obj16"+File.separator+"cross.png";
public static final String ICON_TOOLSTATE_BAD_OLD = "obj16"+File.separator+"cross_dim.png";
......
......@@ -86,6 +86,7 @@ public class ContextOptionsDialog extends Dialog {
, new String[] {context.getLabel(), e.getMessage()})
, e );
}
context.recalcHashCodes();
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("ContexOptionsDialog.okPressed()");
// Need to update Design menu as it uses calculated parameters
......
......@@ -294,7 +294,6 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe
}
public String getBuildStamp(){
return timestamp;
}
......
......@@ -103,6 +103,8 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
// private Action launchAction;
private Action toggleLinkedTools;
private Action toggleSaveTools;
private Action toggleStopTools;
private Action showInstallationPropertiesAction;
private ClearAction clearInstallationPropertiesAction;
......@@ -152,6 +154,12 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
public ToolSequence getToolSequence(){
return toolSequence;
}
public void setToggleSaveTools(boolean checked){
toggleSaveTools.setChecked(checked);
}
public void setToggleStopTools(boolean checked){
toggleStopTools.setChecked(checked);
}
/*
* Method declared on IViewPart.
......@@ -211,6 +219,25 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
if (memento != null)
restoreState(memento);
memento = null;
tree.addListener(SWT.KeyUp, new Listener(){
@Override
public void handleEvent(Event event) {
if (event.keyCode == SWT.SHIFT) {
toolSequence.setShiftPressed(false);
}
}
});
tree.addListener(SWT.KeyDown, new Listener(){
@Override
public void handleEvent(Event event) {
if (event.keyCode == SWT.SHIFT) {
toolSequence.setShiftPressed(true);
}
}
});
} // createPartControl()
private void doLoadDesignMenu() {
......@@ -322,7 +349,9 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
// drillDownAdapter.addNavigationActions(manager);
manager.add(new Separator("toolbar-separator"));
manager.add(toggleLinkedTools);
manager.add(toggleSaveTools);
manager.add(toggleStopTools);
manager.add(new Separator());
manager.add(showInstallationPropertiesAction);
manager.add(showPackagePropertiesToolbarAction);
manager.add(showProjectPropertiesToolbarAction);
......@@ -351,6 +380,25 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
toggleLinkedTools.setToolTipText("Toggle tool dependency");
toggleLinkedTools.setImageDescriptor(VDTPluginImages.DESC_TOOLS_LINKED);
toggleLinkedTools.setChecked(!SelectedResourceManager.getDefault().isToolsLinked()); // normally happens before reading memento
toggleSaveTools= new Action("Save tool state", Action.AS_CHECK_BOX) {
public void run() {
toolSequence.setSave(isChecked());
}
};
toggleSaveTools.setToolTipText("Save tool state");
toggleSaveTools.setImageDescriptor(VDTPluginImages.DESC_TOOLS_SAVE);
toggleStopTools= new Action("Stop tools", Action.AS_CHECK_BOX) {
public void run() {
toolSequence.setStop(isChecked());
}
};
toggleStopTools.setToolTipText("Request tool sequence stop (when convenient), with <SHFT> - mark stopped (for debug)");
toggleStopTools.setImageDescriptor(VDTPluginImages.DESC_TOOLS_STOP);
showInstallationPropertiesAction = new Action() {
public void run() {
......@@ -645,7 +693,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
TOOL_MODE.RUN,
finalI,
fFullPath,
fIgnoreFilter);
......@@ -697,7 +745,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
TOOL_MODE.RESTORE,
0,
fFullPath,
fIgnoreFilter);
......@@ -727,7 +775,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
TOOL_MODE.RESTORE,
0,
fFullPath,
fIgnoreFilter);
......@@ -828,14 +876,15 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
private void launchTool(
Tool tool,
// final DesignFlowView designFlowView,
TOOL_MODE mode,
int choice,
String fullPath,
String ignoreFilter) throws CoreException {
if (tool != null) {
// tool.setDesignFlowView(designFlowView);
tool.setDesignFlowView(this); // maybe will not be needed with ToolSequencing class
tool.setMode(TOOL_MODE.RUN);
if (!toolSequence.okToRun()) return;
tool.setMode(mode) ; //TOOL_MODE.RUN);
tool.toolFinished();
tool.setChoice(0);
SelectedResourceManager.getDefault().updateActionChoice(fullPath, choice, ignoreFilter); // Andrey
......@@ -869,6 +918,8 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
System.out.println("logBuildStamp="+logBuildStamp);
}
tool.setDesignFlowView(designFlowView);
if (!toolSequence.okToRun()) return;
// tool.setRunning(true);
tool.setMode(TOOL_MODE.PLAYBACK);
tool.toolFinished();
......
......@@ -74,9 +74,6 @@ public class LocalContextsAction extends ContextsAction {
dialog.setTitle(title);
dialog.create();
int result=dialog.open();
// if (result == Window.OK){
// updateActions();
// }
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) {
System.out.println("LocalContextAction()->"+result);
}
......
......@@ -48,18 +48,41 @@
label="Synthesize design"
icon="Retort.png"
call="VivadoSynthesis"/>
<menuitem name="VivadoOptPlace"
<!-- <menuitem name="VivadoOptPlace"
label="Optimize and place design"
icon="mondrian2x2.png"
call="VivadoOptPlace"/>
call="VivadoOptPlace"/> -->
<menuitem name="VivadoOpt"
label="Optimize design"
icon="opt_blue.png"
call="VivadoOpt"/>
<menuitem name="VivadoOptPower"
label="Reduce power"
icon="fire.png"
call="VivadoOptPower"/>
<menuitem name="VivadoPlace"
label="Place design"
icon="mondrian2x2.png"
call="VivadoPlace"/>
<menuitem name="VivadoOptPhys"
label="Post-placement optimize"
icon="opt_yellow.png"
call="VivadoOptPhys"/>
<menuitem name="VivadoRoute"
label="Route design"
icon="route66.png"
call="VivadoRoute"/>
<menuitem name="VivadoBitstream"
label="Generate bitstream"
icon="bitstream.png"
call="VivadoBitstream"/>
<menuitem name="Vivado Test"
label="Send a 'Hello World' command to the remote Vivado session"
icon="my_tool.gif"
......
......@@ -110,6 +110,10 @@
<parameter id="VivadoLocalDir" label="Local Xilinx directory" tooltip="Local project subdirectroy for Xilinx Vivado generated files"
type="Pathname" default="vivado" format="CopyValue" readonly="false" />
<parameter id="VivadoLocalResultDir" label="Local Xilinx results directory"
tooltip="Local project subdirectroy for Xilinx Vivado generated result files"
type="Pathname" default="vivado" format="CopyValue" readonly="false" />
<parameter id="VivadoLogDir" label="Local Vivado tool logsx directory" tooltip="Local project subdirectroy for Xilinx Vivado tools log files"
type="Pathname" default="vivado_logs" format="CopyValue" readonly="false" />
......@@ -129,6 +133,25 @@
default="%%ProjectName-opt-place.dcp"
type="Filename" format="CopyValue" />
<parameter id="SnapshotOpt"
label="Optimization snapshot" tooltip="Name of Vivado snapshot archive after optimization"
default="%%ProjectName-opt.dcp"
type="Filename" format="CopyValue" />
<parameter id="SnapshotOptPower"
label="Power optimization snapshot" tooltip="Name of Vivado snapshot archive after power optimization"
default="%%ProjectName-opt-power.dcp"
type="Filename" format="CopyValue" />
<parameter id="SnapshotPlace"
label="Placement snapshot" tooltip="Name of Vivado snapshot archive after placement"
default="%%ProjectName-place.dcp"
type="Filename" format="CopyValue" />
<parameter id="SnapshotOptPhys"
label="Physical optimization snapshot" tooltip="Name of Vivado snapshot archive after physical optimization"
default="%%ProjectName-opt-phys.dcp"
type="Filename" format="CopyValue" />
<parameter id="SnapshotRoute"
label="Routing snapshot" tooltip="Name of Vivado snapshot archive after routing"
......@@ -145,6 +168,25 @@
default="false"
type="Boolean" format="None" />
<parameter id="DisableVivadoOpt"
label="Disable Vivado optimization" tooltip="Disable tool Vivado Optimize"
default="false"
type="Boolean" format="None" />
<parameter id="DisableVivadoOptPower"
label="Disable Vivado power optimization" tooltip="Disable reduction of power consumption"
default="false"
type="Boolean" format="None" />
<parameter id="DisableVivadoPlace"
label="Disable placement" tooltip="Disable tool Vivado Place"
default="false"
type="Boolean" format="None" />
<parameter id="DisableVivadoOptPhys"
label="Disable phys. optimization" tooltip="Disable tool Vivado Physical (post-placement) Optimization"
default="false"
type="Boolean" format="None" />
<parameter id="DisableVivadoRoute"
label="Disable Vivado route" tooltip="Disable tool Vivado route"
......@@ -176,20 +218,29 @@
"part"
"VivadoProjectRoot"
"VivadoLocalDir"
"VivadoLocalResultDir"
"VivadoLogDir"
"VivadoIgnoreSource"
"SedPaths"
</group>
<group name="VivadoDisable" label="Selectively disable Vivado tools">
"DisableVivadoSynth"
"DisableVivadoOptPlace"
<!-- "DisableVivadoOptPlace" -->
"DisableVivadoOpt"
"DisableVivadoOptPower"
"DisableVivadoPlace"
"DisableVivadoOptPhys"
"DisableVivadoRoute"
"DisableVivadoBitsteam"
</group>
<!-- TODO: make time-stamped and "latest" for snapshots -->
<group name="VivadoSnapshots" label="Vivado snapshot archive names">
"SnapshotSynth"
"SnapshotOptPlace"
<!-- "SnapshotOptPlace" -->
"SnapshotOpt"
"SnapshotOptPower"
"SnapshotPlace"
"SnapshotOptPhys"
"SnapshotRoute"
</group>
</input>
......
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