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

Started adding ISE tools, fixed persistent storage when switching

projects
parent 07d87ca2
...@@ -18,11 +18,7 @@ ...@@ -18,11 +18,7 @@
package com.elphel.vdt; package com.elphel.vdt;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Iterator;
import java.util.Set;
import java.util.Vector;
import com.elphel.vdt.ui.variables.SelectedResourceManager; import com.elphel.vdt.ui.variables.SelectedResourceManager;
import com.elphel.vdt.veditor.VerilogPlugin; import com.elphel.vdt.veditor.VerilogPlugin;
...@@ -41,9 +37,6 @@ import org.eclipse.core.resources.IFile; ...@@ -41,9 +37,6 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
/** /**
* Verilog file utilities. * Verilog file utilities.
...@@ -52,6 +45,14 @@ import org.eclipse.jface.viewers.ViewerFilter; ...@@ -52,6 +45,14 @@ import org.eclipse.jface.viewers.ViewerFilter;
* @author Lvov Konstantin * @author Lvov Konstantin
*/ */
public class VerilogUtils { public class VerilogUtils {
public static boolean existsVeditorOutlineDatabase(IProject project){
try {
if (project.getSessionProperty(VerilogPlugin.getOutlineDatabaseId()) !=null) return true;
} catch (CoreException e) {
System.out.println("Probably project is closed: "+e);
}
return false;
}
public static OutlineDatabase getVeditorOutlineDatabase(IProject project){ public static OutlineDatabase getVeditorOutlineDatabase(IProject project){
OutlineDatabase database=null; OutlineDatabase database=null;
...@@ -59,17 +60,30 @@ public class VerilogUtils { ...@@ -59,17 +60,30 @@ public class VerilogUtils {
try { try {
database = (OutlineDatabase)project.getSessionProperty(VerilogPlugin.getOutlineDatabaseId()); database = (OutlineDatabase)project.getSessionProperty(VerilogPlugin.getOutlineDatabaseId());
} catch (CoreException e) { } catch (CoreException e) {
e.printStackTrace(); System.out.println("Probably project is closed: "+e);
} }
if (database !=null) return database; if (database !=null) return database;
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("database is null, looking for the HdlDocument"); System.out.println("database is null, looking for the HdlDocument");
try { try {
hdlDocument=(HdlDocument)project.getSessionProperty(VerilogPlugin.getHdlDocumentId()); hdlDocument=(HdlDocument)project.getSessionProperty(VerilogPlugin.getHdlDocumentId());
if ((hdlDocument!=null) && (hdlDocument.getFile()!=null)) {
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("database is null, looking for the HdlDocument="+hdlDocument.getFile().toString());
} else {
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("database is null, HdlDocument="+((hdlDocument==null)?"NULL":" not null, but getFile() is NULL"));
}
} catch (CoreException e) { } catch (CoreException e) {
e.printStackTrace(); e.printStackTrace();
} }
if (hdlDocument!=null) return hdlDocument.getOutlineDatabase(); /* will create a new one if does not exist */ if (hdlDocument!=null) return hdlDocument.getOutlineDatabase(); /* will create a new one if does not exist */
// Create HdlDocument from selected/restored HDLfile // Create HdlDocument from selected/restored HDLfile
if (SelectedResourceManager.getDefault().getChosenVerilogFile()==null) {
System.out.println("database is null, and no Verilog file is selected to create one.");
return null;
}
hdlDocument=new VerilogDocument(project, (IFile) SelectedResourceManager.getDefault().getChosenVerilogFile()); hdlDocument=new VerilogDocument(project, (IFile) SelectedResourceManager.getDefault().getChosenVerilogFile());
return hdlDocument.getOutlineDatabase(); /* will create a new one if does not exist */ return hdlDocument.getOutlineDatabase(); /* will create a new one if does not exist */
} }
......
...@@ -22,8 +22,11 @@ import java.util.ArrayList; ...@@ -22,8 +22,11 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.ui.IMemento; import org.eclipse.ui.IMemento;
//import com.elphel.vdt.VDTPlugin; //import com.elphel.vdt.VDTPlugin;
import com.elphel.vdt.veditor.VerilogPlugin; import com.elphel.vdt.veditor.VerilogPlugin;
import com.elphel.vdt.core.options.OptionsCore; import com.elphel.vdt.core.options.OptionsCore;
...@@ -78,15 +81,29 @@ public class ToolsCore { ...@@ -78,15 +81,29 @@ public class ToolsCore {
} }
public static void saveToolsState(IMemento memento){ public static void saveToolsState(IMemento memento){
if (getConfig().getContextManager().getToolList()!=null) {
for (Tool tool : getConfig().getContextManager().getToolList()) for (Tool tool : getConfig().getContextManager().getToolList())
tool.saveState(memento); tool.saveState(memento);
} }
}
public static void restoreToolsState(IMemento memento){ public static void restoreToolsState(IMemento memento){
for (Tool tool : getConfig().getContextManager().getToolList()) for (Tool tool : getConfig().getContextManager().getToolList())
tool.restoreState(memento); tool.restoreState(memento);
} }
public static void saveToolsState(IProject project){
if (getConfig().getContextManager().getToolList()!=null) {
for (Tool tool : getConfig().getContextManager().getToolList())
tool.saveState(project);
}
}
public static void restoreToolsState(IProject project){
for (Tool tool : getConfig().getContextManager().getToolList())
tool.restoreState(project);
}
public static Tool getToolWorkingCopy(String toolID) { public static Tool getToolWorkingCopy(String toolID) {
Tool tool = getTool(toolID); Tool tool = getTool(toolID);
......
...@@ -108,7 +108,9 @@ public class FilteredSourceListGenerator extends AbstractGenerator { ...@@ -108,7 +108,9 @@ public class FilteredSourceListGenerator extends AbstractGenerator {
} }
file_names=fileList.toArray(new String[0]); file_names=fileList.toArray(new String[0]);
} else { } else {
fault("There is no selected project"); // fault("There is no selected project");
System.out.println(getName()+": no project selected");
return new String[] {""};
} }
return file_names; return file_names;
} }
......
...@@ -49,7 +49,10 @@ public class ProjectNameGenerator extends AbstractGenerator { ...@@ -49,7 +49,10 @@ public class ProjectNameGenerator extends AbstractGenerator {
String project_name = resource.getProject().getName(); String project_name = resource.getProject().getName();
value = new String[]{project_name}; value = new String[]{project_name};
} else { } else {
fault("There is no selected project"); // fault("There is no selected project");
System.out.println(getName()+": no project selected");
return new String[] {""};
} }
return value; return value;
} }
......
...@@ -51,7 +51,9 @@ public class ProjectPathGenerator extends AbstractGenerator { ...@@ -51,7 +51,9 @@ public class ProjectPathGenerator extends AbstractGenerator {
String project_name = workspaceRoot+resource.getProject().getFullPath().toString()+File.separator; String project_name = workspaceRoot+resource.getProject().getFullPath().toString()+File.separator;
value = new String[]{project_name}; value = new String[]{project_name};
} else { } else {
fault("There is no selected project"); // fault("There is no selected project");
System.out.println(getName()+": no project selected");
return new String[] {""};
} }
return value; return value;
} }
......
...@@ -21,6 +21,7 @@ package com.elphel.vdt.core.tools.generators; ...@@ -21,6 +21,7 @@ package com.elphel.vdt.core.tools.generators;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResource;
//import com.elphel.vdt.VDT; //import com.elphel.vdt.VDT;
import com.elphel.vdt.VerilogUtils; import com.elphel.vdt.VerilogUtils;
//import com.elphel.vdt.core.verilog.VerilogUtils; //import com.elphel.vdt.core.verilog.VerilogUtils;
...@@ -60,7 +61,9 @@ public class SourceListGenerator extends AbstractGenerator { ...@@ -60,7 +61,9 @@ public class SourceListGenerator extends AbstractGenerator {
for (int i=0; i < files.length; i++) for (int i=0; i < files.length; i++)
file_names[i] = files[i].getProjectRelativePath().toOSString(); //.getName(); file_names[i] = files[i].getProjectRelativePath().toOSString(); //.getName();
} else { } else {
fault("There is no selected project"); // fault("There is no selected project");
System.out.println(getName()+": no project selected");
return new String[] {""};
} }
return file_names; return file_names;
} }
......
...@@ -21,6 +21,8 @@ import java.util.*; ...@@ -21,6 +21,8 @@ import java.util.*;
import java.io.*; import java.io.*;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.ui.IMemento; import org.eclipse.ui.IMemento;
import com.elphel.vdt.VDT; import com.elphel.vdt.VDT;
...@@ -61,6 +63,14 @@ public class Tool extends Context implements Cloneable, Inheritable { ...@@ -61,6 +63,14 @@ public class Tool extends Context implements Cloneable, Inheritable {
private static final String MEMENTO_TOOL_FILEDEPSTAMP = "fileDependency"; private static final String MEMENTO_TOOL_FILEDEPSTAMP = "fileDependency";
private static final String MEMENTO_TOOL_STATEDEPSTAMP = "stateDependency"; private static final String MEMENTO_TOOL_STATEDEPSTAMP = "stateDependency";
private static final String PROJECT_TOOL_NAME = "tool.";
private static final String PROJECT_TOOL_PINNED = ".pinned";
private static final String PROJECT_TOOL_STATE = ".state";
private static final String PROJECT_TOOL_TIMESTAMP = ".timestamp";
private static final String PROJECT_TOOL_LASTRUNHASH = ".lastrunhash";
private static final String PROJECT_TOOL_DEPSTATE = ".depstate.";
private static final String PROJECT_TOOL_DEPFILE = ".depfile.";
private String baseToolName; private String baseToolName;
private String parentPackageName; private String parentPackageName;
...@@ -415,11 +425,14 @@ public class Tool extends Context implements Cloneable, Inheritable { ...@@ -415,11 +425,14 @@ public class Tool extends Context implements Cloneable, Inheritable {
public void setLastRunHash(int hash){ // to restore from file public void setLastRunHash(int hash){ // to restore from file
lastRunHash=hash; lastRunHash=hash;
} }
public void setStateJustThis(TOOL_STATE state) {
this.state=state;
}
public void setState(TOOL_STATE state) { public void setState(TOOL_STATE state) {
this.state=state; setStateJustThis(state);
DEBUG_PRINT("SetState("+state+") for tool "+getName()+" threadID="+Thread.currentThread().getId()); DEBUG_PRINT("SetState("+state+") for tool "+getName()+" threadID="+Thread.currentThread().getId());
if (getRestoreMaster()!=null){ if ((getRestoreMaster()!=null) && (state != TOOL_STATE.NEW)){
getRestoreMaster().setState(state); // TODO: Should it be always or just for SUCCESS ? getRestoreMaster().setState(state); // TODO: Should it be always or just for SUCCESS ?
} }
} }
...@@ -928,6 +941,98 @@ public class Tool extends Context implements Cloneable, Inheritable { ...@@ -928,6 +941,98 @@ public class Tool extends Context implements Cloneable, Inheritable {
return names.get(0); return names.get(0);
} }
/**
* Save tool state as project persistent properties
* @param project where to attach properties
*/
public void saveState(IProject project) {
QualifiedName qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_PINNED);
try {project.setPersistentProperty(qn, new Boolean(isPinned()).toString());}
catch (CoreException e) {System.out.println(project+"Failed setPersistentProperty("+qn+", "+isPinned()+", e="+e);}
qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_STATE);
try {project.setPersistentProperty(qn, getState().toString());}
catch (CoreException e) {System.out.println(project+"Failed setPersistentProperty("+qn+", "+getState()+", e="+e);}
if (getTimeStamp()!=null) {
qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_TIMESTAMP);
try {project.setPersistentProperty(qn, getTimeStamp());}
catch (CoreException e) {System.out.println(project+"Failed setPersistentProperty("+qn+", "+getTimeStamp()+", e="+e);}
}
if (getLastRunHash()!=0) {
qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_LASTRUNHASH);
try {project.setPersistentProperty(qn, new Integer(getLastRunHash()).toString());}
catch (CoreException e) {System.out.println(project+"Failed setPersistentProperty("+qn+", "+getLastRunHash()+", e="+e);}
}
for(String state:dependStatesTimestamps.keySet()){
qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_DEPSTATE+state);
try {project.setPersistentProperty(qn, dependStatesTimestamps.get(state));}
catch (CoreException e) {System.out.println(project+"Failed setPersistentProperty("+qn+", "+dependStatesTimestamps.get(state)+", e="+e);}
}
for(String file:dependFilesTimestamps.keySet()){
qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_DEPFILE+file);
try {project.setPersistentProperty(qn, dependFilesTimestamps.get(file));}
catch (CoreException e) {System.out.println(project+"Failed setPersistentProperty("+qn+", "+dependFilesTimestamps.get(file)+", e="+e);}
}
DEBUG_PRINT("*** Updated persistent properties for tool "+getName()+ " in the project "+project.toString());
}
public void restoreState(IProject project) {
Map<QualifiedName,String> pp;
try {
pp=project.getPersistentProperties();
} catch (CoreException e){
System.out.println(project+": Failed getPersistentProperties(), e="+e);
return;
}
DEBUG_PRINT("restoring "+getName()+" state for project "+project);
QualifiedName qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_PINNED);
String str= pp.get(qn);
if (str!=null) try {
setPinned(Boolean.parseBoolean(str));
} catch (Exception e){
System.out.println(project+"Failed setPinned(), e="+e);
}
qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_STATE);
str= pp.get(qn);
if (str!=null) {
try {
setStateJustThis(TOOL_STATE.valueOf(str));
} catch (IllegalArgumentException e){
System.out.println("Invalid tool state: "+str+" for tool "+getName()+" in memento");
}
if (getState()==TOOL_STATE.KEPT_OPEN)
setStateJustThis(TOOL_STATE.NEW);
}
qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_TIMESTAMP);
str= pp.get(qn);
if (str!=null) setTimeStamp(str);
qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_LASTRUNHASH);
str= pp.get(qn);
if (str!=null) {
try {
Integer hc=Integer.parseInt(str);
setLastRunHash(hc);
} catch (Exception e){
System.out.println("Invalid hashCode: "+str+" for tool "+getName()+" for project "+project);
}
}
clearDependStamps();
String statePrefix=PROJECT_TOOL_NAME+name+PROJECT_TOOL_DEPSTATE;
String filePrefix= PROJECT_TOOL_NAME+name+PROJECT_TOOL_DEPFILE;
for (QualifiedName qName: pp.keySet()){
// qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_DEPSTATE+state);
if (qName.getLocalName().startsWith(statePrefix)){
String value=pp.get(qName);
setStateTimeStamp(qName.getLocalName().substring(statePrefix.length()), value);
}
if (qName.getLocalName().startsWith(filePrefix)){
String value=pp.get(qName);
setFileTimeStamp(qName.getLocalName().substring(filePrefix.length()), value);
}
}
}
public void saveState(IMemento memento) { public void saveState(IMemento memento) {
IMemento toolMemento= memento.createChild(MEMENTO_TOOL_TYPE,name); IMemento toolMemento= memento.createChild(MEMENTO_TOOL_TYPE,name);
...@@ -971,12 +1076,12 @@ public class Tool extends Context implements Cloneable, Inheritable { ...@@ -971,12 +1076,12 @@ public class Tool extends Context implements Cloneable, Inheritable {
String state=toolMemento.getString(MEMENTO_TOOL_STATE); String state=toolMemento.getString(MEMENTO_TOOL_STATE);
if (state!=null){ if (state!=null){
try { try {
this.state=TOOL_STATE.valueOf(state); setStateJustThis(TOOL_STATE.valueOf(state));
} catch (IllegalArgumentException e){ } catch (IllegalArgumentException e){
System.out.println("Invalid tool state: "+state+" for tool "+name+" in memento"); System.out.println("Invalid tool state: "+state+" for tool "+name+" in memento");
} }
if (this.state==TOOL_STATE.KEPT_OPEN) if (getState()==TOOL_STATE.KEPT_OPEN)
this.state=TOOL_STATE.NEW; setStateJustThis(TOOL_STATE.NEW);
} }
String timestamp=toolMemento.getString(MEMENTO_TOOL_TIMESTAMP); String timestamp=toolMemento.getString(MEMENTO_TOOL_TIMESTAMP);
if (timestamp!=null) setTimeStamp(timestamp); if (timestamp!=null) setTimeStamp(timestamp);
......
...@@ -66,6 +66,10 @@ public class ToolSequence { ...@@ -66,6 +66,10 @@ public class ToolSequence {
private static final String TAG_CURRENTSTATE_STATEFILE = ".currentState.stateFile."; private static final String TAG_CURRENTSTATE_STATEFILE = ".currentState.stateFile.";
private static final String TAG_CURRENTSTATE_TOOLSTAMP = ".currentState.toolStamp."; private static final String TAG_CURRENTSTATE_TOOLSTAMP = ".currentState.toolStamp.";
private static final String PROJECT_CURRENTSTATE_TOOLNAME = "currentState.toolName.";
private static final String PROJECT_CURRENTSTATE_STATEFILE = "currentState.stateFile.";
private static final String PROJECT_CURRENTSTATE_TOOLSTAMP = "currentState.toolStamp.";
// private static final int MAX_TOOLS_TO_RUN=100; // private static final int MAX_TOOLS_TO_RUN=100;
private boolean shiftPressed=false; private boolean shiftPressed=false;
...@@ -96,7 +100,7 @@ public class ToolSequence { ...@@ -96,7 +100,7 @@ public class ToolSequence {
if (tool.getState()== TOOL_STATE.KEPT_OPEN) { if (tool.getState()== TOOL_STATE.KEPT_OPEN) {
MessageUI.error("Tool "+tool.getName()+" is running session, you need to close it to stop"); MessageUI.error("Tool "+tool.getName()+" is running session, you need to close it to stop");
} else { } else {
tool.setState(TOOL_STATE.NEW); tool.setStateJustThis(TOOL_STATE.NEW);
tool.clearDependStamps(); tool.clearDependStamps();
} }
} }
...@@ -174,9 +178,10 @@ public class ToolSequence { ...@@ -174,9 +178,10 @@ public class ToolSequence {
public void setUnfinishedBoot(IMemento memento){ public void setUnfinishedBoot(IMemento memento, boolean updateDB){
unfinishedMemento=memento; unfinishedMemento=memento;
if (memento!=null){ // if (memento!=null){
if (updateDB) {
// Does not seem to work: // Does not seem to work:
IActionBars bars = designFlowView.getViewSite().getActionBars(); IActionBars bars = designFlowView.getViewSite().getActionBars();
bars.getStatusLineManager().setMessage("Waiting for VEditor database to be built..."); bars.getStatusLineManager().setMessage("Waiting for VEditor database to be built...");
...@@ -186,13 +191,13 @@ public class ToolSequence { ...@@ -186,13 +191,13 @@ public class ToolSequence {
} }
} }
public void finalizeBootAfterVEditor(){ public void finalizeBootAfterVEditor(){
if (unfinishedMemento!=null) { // if (unfinishedMemento!=null) {
// Does not seem to work: // Does not seem to work:
IActionBars bars = designFlowView.getViewSite().getActionBars(); IActionBars bars = designFlowView.getViewSite().getActionBars();
bars.getStatusLineManager().setMessage(""); bars.getStatusLineManager().setMessage("");
// designFlowView.changeMenuTitle(menuName); // designFlowView.changeMenuTitle(menuName);
designFlowView.finalizeAfterVEditorDB(unfinishedMemento); designFlowView.finalizeAfterVEditorDB(unfinishedMemento);
} // }
} }
public void toolFinished(Tool tool){ public void toolFinished(Tool tool){
...@@ -1281,6 +1286,80 @@ public class ToolSequence { ...@@ -1281,6 +1286,80 @@ public class ToolSequence {
} }
} }
/**
* Save tool states to the project persistent properties
* @param project - project to save properties to
*/
public void saveCurrentStates(IProject project) {
if ((project==null) || !project.exists()) {
System.out.println("Can not set persistent properties of non-existent project "+project);
return;
}
for (String state:currentStates.keySet()){
ToolStateStamp tss=currentStates.get(state);
QualifiedName qn= new QualifiedName(VDT.ID_VDT, PROJECT_CURRENTSTATE_TOOLNAME+state);
try {project.setPersistentProperty(qn, tss.getToolName());}
catch (CoreException e) {System.out.println(project+"Failed setPersistentProperty("+qn+", "+tss.getToolName()+", e="+e);}
qn= new QualifiedName(VDT.ID_VDT, PROJECT_CURRENTSTATE_STATEFILE+state);
try {project.setPersistentProperty(qn, tss.getToolStateFile());}
catch (CoreException e) {System.out.println(project+"Failed setPersistentProperty("+qn+", "+tss.getToolStateFile()+", e="+e);}
qn= new QualifiedName(VDT.ID_VDT, PROJECT_CURRENTSTATE_TOOLSTAMP+state);
try {project.setPersistentProperty(qn, tss.getToolStamp());}
catch (CoreException e) {System.out.println(project+"Failed setPersistentProperty("+qn+", "+tss.getToolStamp()+", e="+e);}
DEBUG_PRINT("Saving state "+state+
" to project:"+project.toString()+
", toolName="+tss.getToolName()+
", toolStateFile="+tss.getToolStateFile()+
", toolStamp="+tss.getToolStamp());
}
}
/**
* Restore tool states from the project persistent properites
* @param project - project to get properties from
*/
public void restoreCurrentStates(IProject project) {
if ((project==null) || !project.exists()) {
System.out.println("Can not read persistent properties from the non-existent project "+project);
return;
}
Map<QualifiedName,String> pp;
try {
pp=project.getPersistentProperties();
} catch (CoreException e){
System.out.println(project+": Failed getPersistentProperties(), e="+e);
return;
}
currentStates.clear();
setStateProvides(); // Can be called just once - during initialization?
for (String state:stateProviders.keySet()){
QualifiedName qn_toolName= new QualifiedName(VDT.ID_VDT, PROJECT_CURRENTSTATE_TOOLNAME+state);
if (pp.containsKey(qn_toolName)){
QualifiedName qn_stateFile= new QualifiedName(VDT.ID_VDT, PROJECT_CURRENTSTATE_STATEFILE+state);
QualifiedName qn_toolStamp= new QualifiedName(VDT.ID_VDT, PROJECT_CURRENTSTATE_TOOLSTAMP+state);
currentStates.put(state,new ToolStateStamp(
pp.get(qn_toolName),
pp.get(qn_stateFile),
pp.get(qn_toolStamp)
));
DEBUG_PRINT("Restoring state "+state+
" from project "+project.toString()+
", toolName="+pp.get(qn_toolName)+
", toolStateFile="+pp.get(qn_stateFile)+
", toolStamp="+pp.get(qn_toolStamp));
}
}
// Set all tool dirty flags according to restored states and tools dependencies
// updateContextOptions(project); // Fill in parameters - it parses here too - at least some parameters? (not in menu mode)
// setToolsDirtyFlag(true) initiates Verilog database rebuild, let's trigger it intentionally
//VerilogUtils.getTopModuleNames((IFile)resource);
// stToolsDirtyFlag(true); // recalculate each successful tool's parameters - moved to caller
}
public void saveCurrentStates(IMemento memento) { public void saveCurrentStates(IMemento memento) {
for (String state:currentStates.keySet()){ for (String state:currentStates.keySet()){
ToolStateStamp tss=currentStates.get(state); ToolStateStamp tss=currentStates.get(state);
...@@ -1295,6 +1374,8 @@ public class ToolSequence { ...@@ -1295,6 +1374,8 @@ public class ToolSequence {
} }
} }
/** /**
* Restore states (snapshot files status) from persistent storage * Restore states (snapshot files status) from persistent storage
* Should be called after tools are restored * Should be called after tools are restored
...@@ -1326,11 +1407,11 @@ public class ToolSequence { ...@@ -1326,11 +1407,11 @@ public class ToolSequence {
", toolStamp="+memento.getString(state+TAG_CURRENTSTATE_TOOLSTAMP)); ", toolStamp="+memento.getString(state+TAG_CURRENTSTATE_TOOLSTAMP));
} }
} }
// Set all tool dirty flags according to restored states and tools dendencies // Set all tool dirty flags according to restored states and tools dependencies
// updateContextOptions(project); // Fill in parameters - it parses here too - at least some parameters? (not in menu mode) // updateContextOptions(project); // Fill in parameters - it parses here too - at least some parameters? (not in menu mode)
// setToolsDirtyFlag(true) initiates Verilog database rebuild, let's trigger it intentionally // setToolsDirtyFlag(true) initiates Verilog database rebuild, let's trigger it intentionally
//VerilogUtils.getTopModuleNames((IFile)resource); //VerilogUtils.getTopModuleNames((IFile)resource);
setToolsDirtyFlag(true); // recalculate each successful tool's parameters // stToolsDirtyFlag(true); // recalculate each successful tool's parameters - moved to caller
} }
public void putCurrentState(Tool tool){ public void putCurrentState(Tool tool){
......
...@@ -244,20 +244,26 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe ...@@ -244,20 +244,26 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe
* @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection) * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/ */
public void selectionChanged(IWorkbenchPart part, ISelection selection) { public void selectionChanged(IWorkbenchPart part, ISelection selection) {
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.print("$$$ Selection changed, fSelectedResource="+fSelectedResource);
// System.out.println("SelectedResourceManager.selectionChanged()"); // System.out.println("SelectedResourceManager.selectionChanged()");
IWorkbenchWindow window = part.getSite().getWorkbenchWindow(); IWorkbenchWindow window = part.getSite().getWorkbenchWindow();
if (fWindowStack.isEmpty() || !fWindowStack.peek().equals(window)) { if (fWindowStack.isEmpty() || !fWindowStack.peek().equals(window)) {
// selection is not in the active window // selection is not in the active window
System.out.println(" - stray selection outside acrtive window");
return; return;
} }
IResource selectedResource = getSelectedResource(part, selection); IResource selectedResource = getSelectedResource(part, selection);
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println(" New selection: "+selectedResource);
if (selectedResource != null) { if (selectedResource != null) {
fSelectedResource = selectedResource; fSelectedResource = selectedResource;
// System.out.println("SelectedResourceManager.selectionChanged(): fSelectedResource changed to "+fSelectedResource.getName());
if ((selectedResource.getType()==IResource.FILE) && (VerilogUtils.isHhdlFile((IFile)fSelectedResource))){ if ((selectedResource.getType()==IResource.FILE) && (VerilogUtils.isHhdlFile((IFile)fSelectedResource))){
fSelectedVerilogFile = selectedResource; /* Maybe same will work for vhdl too? */ fSelectedVerilogFile = selectedResource; /* Maybe same will work for vhdl too? */
// System.out.println("SelectedResourceManager.selectionChanged(): fSelectedVerilogFile changed to "+fSelectedVerilogFile.getName()); if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("Updated fSelectedVerilogFile: "+fSelectedVerilogFile);
} else {
System.out.println(selectedResource+" is not a file or not an HDL file");
} }
} }
...@@ -339,12 +345,34 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe ...@@ -339,12 +345,34 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe
} }
public IResource getChosenVerilogFile() { public IResource getChosenVerilogFile() {
IProject project=getSelectedProject();
if (project==null) return null;
IResource rslt=(fChosenVerilogFile!=null)?fChosenVerilogFile:fSelectedVerilogFile;
if (rslt==null) return null;
if (project.getFullPath().toPortableString().equals(rslt.getProject().getFullPath().toPortableString())){
return (fChosenVerilogFile!=null)?fChosenVerilogFile:fSelectedVerilogFile; return (fChosenVerilogFile!=null)?fChosenVerilogFile:fSelectedVerilogFile;
} else {
System.out.println("Wrong getChosenVerilogFile="+rslt+" for project "+project);
if (fSelectedVerilogFile==null) return null;
if (project.getFullPath().toPortableString().equals(fSelectedVerilogFile.getProject().getFullPath().toPortableString())){
System.out.println("Using: "+fSelectedVerilogFile);
return fSelectedVerilogFile;
} else {
System.out.println("fSelectedVerilogFile is also wrong: "+fSelectedVerilogFile);
}
return fSelectedResource;
}
} }
// Used when restoring from memento // Used when restoring from memento
public void setChosenVerilogFile(IResource file) { public void setChosenVerilogFile(IResource file) {
fChosenVerilogFile=file; fChosenVerilogFile=file;
IProject project=getSelectedProject();
IProject newProject= (file == null)? null: file.getProject();
// if file is different project than selectedResource
if ((newProject != null) && ((project == null) || !newProject.getFullPath().toPortableString().equals(project.getFullPath().toPortableString()))){
fSelectedResource=file;
}
if (fSelectedResource==null) fSelectedResource=file; if (fSelectedResource==null) fSelectedResource=file;
} }
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
package com.elphel.vdt.ui.views; package com.elphel.vdt.ui.views;
import java.util.List; import java.util.List;
import java.util.Map;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Display;
...@@ -42,6 +43,7 @@ import org.eclipse.core.resources.ResourcesPlugin; ...@@ -42,6 +43,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.QualifiedName;
import java.io.File; import java.io.File;
...@@ -196,6 +198,9 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { ...@@ -196,6 +198,9 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
* to create the viewer and initialize it. * to create the viewer and initialize it.
*/ */
public void createPartControl(Composite parent) { public void createPartControl(Composite parent) {
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("+++++ createPartControl()");
compositeParent=parent; // will it help to re-draw compositeParent=parent; // will it help to re-draw
viewer = new TreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL); viewer = new TreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);
drillDownAdapter = new DrillDownAdapter(viewer); drillDownAdapter = new DrillDownAdapter(viewer);
...@@ -250,13 +255,45 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { ...@@ -250,13 +255,45 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
} // createPartControl() } // createPartControl()
private void doLoadDesignMenu(IProject newProject) {
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) {
System.out.println("##### doLoadDesignMenu("+newProject+"): current project="+selectedResource.getProject().toString());
}
if (newProject!=null){
restoreCurrentState(newProject);
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("Restored new project: "+newProject.toString());
IResource HDLFile=SelectedResourceManager.getDefault().getChosenVerilogFile();
if ((HDLFile!=null) && (toolSequence!=null)){
if (VerilogUtils.existsVeditorOutlineDatabase(newProject)){
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("VEditor DB for "+newProject+" already exist");
toolSequence.setUnfinishedBoot(null,false);
finalizeAfterVEditorDB(memento);
} else {
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("Initiating DB rebuild HDLFile="+HDLFile);
toolSequence.setUnfinishedBoot(null,true);
VerilogUtils.getTopModuleNames((IFile) HDLFile); // will initiate DB rebuild, updateDirty and call doLoadDesignMenu();
}
return;
}
}
doLoadDesignMenu();
}
private void doLoadDesignMenu() { private void doLoadDesignMenu() {
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) {
System.out.println("#### doLoadDesignMenu(): project="+selectedResource.getProject().toString());
}
String menuName = selectedResource == null String menuName = selectedResource == null
? null ? null
: OptionsCore.doLoadOption(desigMenuName, selectedResource.getProject()); : OptionsCore.doLoadOption(desigMenuName, selectedResource.getProject());
doLoadDesignMenu(menuName); doLoadDesignMenu(menuName);
} }
private void doLoadDesignMenu(String menuName) { private void doLoadDesignMenu(String menuName) {
if (menuName != null) { // Horizontal menu bar if (menuName != null) { // Horizontal menu bar
DesignMenu designMenu = ToolsCore.getDesignMenuManager().findDesignMenu(menuName); DesignMenu designMenu = ToolsCore.getDesignMenuManager().findDesignMenu(menuName);
...@@ -609,18 +646,29 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { ...@@ -609,18 +646,29 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
/* Method declared on ISelectionListener */ /* Method declared on ISelectionListener */
public void selectionChanged(IWorkbenchPart part, ISelection selection) { public void selectionChanged(IWorkbenchPart part, ISelection selection) {
// System.out.println("DesignFlowView.selectionChanged()"); if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println(">>>>> DesignFlowView.selectionChanged(, new selection)="+selection+" selectedResource="+selectedResource);
IResource oldSelection = selectedResource; IResource oldSelection = selectedResource;
// Save old project if it changed, before doin anything else
IProject oldProject= (selectedResource ==null)? null : selectedResource.getProject();
IResource newSelectedResource=SelectedResourceManager.getDefault().getSelectedResource(part, selection);
IProject newProject= (newSelectedResource ==null)? null : newSelectedResource.getProject();
// if (HDLFile.getProject().getFullPath().toPortableString().equals(project.getFullPath().toPortableString())){
if ((oldProject != null) &&
((newProject == null) ||
!oldProject.getFullPath().toPortableString().equals(newProject.getFullPath().toPortableString()))){
saveState(oldProject);
}
selectedResource = SelectedResourceManager.getDefault().getSelectedResource(part, selection); selectedResource = SelectedResourceManager.getDefault().getSelectedResource(part, selection);
IProject newProject = selectedResource == null // IProject newProject = selectedResource == null
? null // ? null
: selectedResource.getProject(); // : selectedResource.getProject();
if ( (oldSelection == null) || if ( (oldSelection == null) ||
(newProject != oldSelection.getProject()) (newProject != oldSelection.getProject())
) { ) {
doLoadDesignMenu(); doLoadDesignMenu(newProject);
} }
updateLaunchAction(); updateLaunchAction();
} // selectionChanged() } // selectionChanged()
...@@ -729,7 +777,7 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { ...@@ -729,7 +777,7 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
final int finalI=i; final int finalI=i;
final String fFullPath=fullPath; final String fFullPath=fullPath;
final String fIgnoreFilter=ignoreFilter; final String fIgnoreFilter=ignoreFilter;
final DesignFlowView fDesignFlowView=this; // final DesignFlowView fDesignFlowView=this;
launchActions[i] = new Action() { launchActions[i] = new Action() {
public void run() { public void run() {
...@@ -1178,12 +1226,16 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { ...@@ -1178,12 +1226,16 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
} }
selectedResource = ResourcesPlugin.getWorkspace().getRoot().findMember(Path.fromPortableString(location)); selectedResource = ResourcesPlugin.getWorkspace().getRoot().findMember(Path.fromPortableString(location));
String HDLLocation=memento.getString(TAG_SELECTED_HDL_FILE); String HDLLocation=memento.getString(TAG_SELECTED_HDL_FILE);
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("restoreState(memento): selectedResource="+selectedResource+ " HDLLocation="+HDLLocation);
if (HDLLocation!=null) { if (HDLLocation!=null) {
IResource HDLFile=ResourcesPlugin.getWorkspace().getRoot().findMember(Path.fromPortableString(HDLLocation)); IResource HDLFile=ResourcesPlugin.getWorkspace().getRoot().findMember(Path.fromPortableString(HDLLocation));
if (HDLFile!=null){
SelectedResourceManager.getDefault().setChosenVerilogFile(HDLFile); SelectedResourceManager.getDefault().setChosenVerilogFile(HDLFile);
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("Setting HDL file to "+HDLFile.toString()); System.out.println("Setting HDL file to "+HDLFile.toString());
} }
}
String HDLFilter=memento.getString(TAG_SELECTED_HDL_FILTER); //SelectedResourceManager.getDefault().getFilter(); String HDLFilter=memento.getString(TAG_SELECTED_HDL_FILTER); //SelectedResourceManager.getDefault().getFilter();
if (HDLFilter!=null){ if (HDLFilter!=null){
SelectedResourceManager.getDefault().setFilter(HDLFilter); SelectedResourceManager.getDefault().setFilter(HDLFilter);
...@@ -1193,24 +1245,96 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { ...@@ -1193,24 +1245,96 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
if (linkedTools==null) linkedTools=true; if (linkedTools==null) linkedTools=true;
SelectedResourceManager.getDefault().setToolsLinked(linkedTools); SelectedResourceManager.getDefault().setToolsLinked(linkedTools);
toggleLinkedTools.setChecked(!SelectedResourceManager.getDefault().isToolsLinked()); toggleLinkedTools.setChecked(!SelectedResourceManager.getDefault().isToolsLinked());
// Initialize VEditor database build // Initialize VEditor database build
IResource HDLFile=SelectedResourceManager.getDefault().getChosenVerilogFile(); IResource HDLFile=SelectedResourceManager.getDefault().getChosenVerilogFile();
// restore properties from the project, overwrite global ones
restoreCurrentState(selectedResource.getProject()); // null OK
if ((HDLFile!=null) && HDLFile.exists()){ if ((HDLFile!=null) && HDLFile.exists()){
toolSequence.setUnfinishedBoot(memento); toolSequence.setUnfinishedBoot(memento,true);
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("Initiating DB rebuild HDLFile="+HDLFile);
VerilogUtils.getTopModuleNames((IFile) HDLFile); VerilogUtils.getTopModuleNames((IFile) HDLFile);
} else { } else {
toolSequence.setUnfinishedBoot(null); if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("Skipping DB rebuild HDLFile=NULL");
toolSequence.setUnfinishedBoot(null,false);
finalizeAfterVEditorDB(memento); finalizeAfterVEditorDB(memento);
} }
} }
public void finalizeAfterVEditorDB(IMemento memento){ public void finalizeAfterVEditorDB(IMemento memento){
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("finalizeAfterVEditorDB(), memento is "+((memento==null)?"NULL":"not NULL"));
if (memento!=null) {
toolSequence.restoreCurrentStates(memento); // restore states and recalc "dirty" flags - should be after tools themselves toolSequence.restoreCurrentStates(memento); // restore states and recalc "dirty" flags - should be after tools themselves
}
if (selectedResource!=null) toolSequence.restoreCurrentStates(selectedResource.getProject()); // restore states and recalc "dirty" flags - should be after tools themselves
IResource HDLFile=SelectedResourceManager.getDefault().getChosenVerilogFile();
if ((HDLFile!=null) && HDLFile.exists()){
toolSequence.setToolsDirtyFlag(true); // recalculate each successful tool's parameters - does it trigger Database rebuild?
}
doLoadDesignMenu(); doLoadDesignMenu();
updateLaunchAction(true); // true? updateLaunchAction(true); // true?
} }
private void restoreCurrentState(IProject project){
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("^^^^ restoreCurrentState("+project+")");
if ((project==null) || !project.exists()){
System.out.println("Can not restore persistent properties from non-existent project "+project);
return;
}
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)){
System.out.println("::::: Restoring persistent properties from the project "+project);
}
ToolsCore.restoreToolsState(project);
Map<QualifiedName,String> pp;
try {
pp=project.getPersistentProperties();
} catch (CoreException e){
System.out.println(project+": Failed getPersistentProperties(), e="+e);
return;
}
String location= pp.get(new QualifiedName(VDT.ID_VDT, TAG_SELECTED_RESOURCE));
if (location!=null) {
IResource resource=ResourcesPlugin.getWorkspace().getRoot().findMember(Path.fromPortableString(location));
if (resource.getProject().getFullPath().toPortableString().equals(project.getFullPath().toPortableString())){
selectedResource = resource;
} else {
System.out.println("**** Wrong selected resource "+location+" for project "+project.getFullPath().toPortableString());
}
}
String HDLLocation= pp.get(new QualifiedName(VDT.ID_VDT, TAG_SELECTED_HDL_FILE));
if (HDLLocation!=null) {
if (HDLLocation!=null) {
IResource HDLFile=ResourcesPlugin.getWorkspace().getRoot().findMember(Path.fromPortableString(HDLLocation));
if (HDLFile!=null){
if (HDLFile.getProject().getFullPath().toPortableString().equals(project.getFullPath().toPortableString())){
SelectedResourceManager.getDefault().setChosenVerilogFile(HDLFile);
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("Setting HDL file to "+HDLFile.toString());
} else {
System.out.println("*** Wrong HDLFile "+HDLLocation+" for project "+project.getFullPath().toPortableString());
}
}
}
}
String HDLFilter= pp.get(new QualifiedName(VDT.ID_VDT, TAG_SELECTED_HDL_FILTER));
if (HDLFilter!=null){
SelectedResourceManager.getDefault().setFilter(HDLFilter);
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("Setting HDL filter to "+HDLFilter);
}
String LinkedToolsStr=pp.get(new QualifiedName(VDT.ID_VDT, TAG_LINKED_TOOLS));
if (LinkedToolsStr!=null) try {
SelectedResourceManager.getDefault().setToolsLinked(Boolean.parseBoolean(LinkedToolsStr));
toggleLinkedTools.setChecked(!SelectedResourceManager.getDefault().isToolsLinked());
} catch (Exception e){
System.out.println(project+"Failed .setToolsLinked("+LinkedToolsStr+"), e="+e);
}
}
...@@ -1220,14 +1344,25 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { ...@@ -1220,14 +1344,25 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
* @see ViewPart#saveState * @see ViewPart#saveState
*/ */
public void saveState(IMemento memento) { public void saveState(IMemento memento) {
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("^^^^saveState()");
if (viewer == null) { if (viewer == null) {
if (this.memento != null) //Keep the old state; if (this.memento != null) //Keep the old state;
memento.putMemento(this.memento); memento.putMemento(this.memento);
// return;
}
IProject project = selectedResource == null
? null
: selectedResource.getProject();
if (project==null) {
System.out.println("No project selected, nothing to save");
return; return;
} }
if (selectedResource != null) { if (selectedResource != null) {
String location = selectedResource.getFullPath().toPortableString(); String location = selectedResource.getFullPath().toPortableString();
memento.putString(TAG_SELECTED_RESOURCE, location); memento.putString(TAG_SELECTED_RESOURCE, location);
System.out.println("saveState(memento): selectedResource="+selectedResource);
} }
IResource HDLFile=SelectedResourceManager.getDefault().getChosenVerilogFile(); IResource HDLFile=SelectedResourceManager.getDefault().getChosenVerilogFile();
if (HDLFile!=null){ if (HDLFile!=null){
...@@ -1243,7 +1378,63 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { ...@@ -1243,7 +1378,63 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
} }
memento.putBoolean(TAG_LINKED_TOOLS, new Boolean(SelectedResourceManager.getDefault().isToolsLinked())); memento.putBoolean(TAG_LINKED_TOOLS, new Boolean(SelectedResourceManager.getDefault().isToolsLinked()));
ToolsCore.saveToolsState(memento); ToolsCore.saveToolsState(memento);
if (toolSequence!=null) {
toolSequence.saveCurrentStates(memento); toolSequence.saveCurrentStates(memento);
} }
// set project properties
if ((project!=null) && project.exists())
saveState(project);
}
// this may need some synchronization as saveState(IMemento memento) is called by the timer (what if selectedResource changes while save is in progress?
public void saveState(IProject project) {
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("^^^^ SaveState("+project+")");
if ((project==null) || !project.exists()){
System.out.println("Can not save persistent properties to non-existent project "+project);
return;
}
QualifiedName qn;
if (selectedResource != null) {
if (selectedResource.getProject().getFullPath().toPortableString().equals(project.getFullPath().toPortableString())){
String location = selectedResource.getFullPath().toPortableString();
qn= new QualifiedName(VDT.ID_VDT, TAG_SELECTED_RESOURCE);
try {project.setPersistentProperty(qn, location);}
catch (CoreException e) {System.out.println(project+"Failed setPersistentProperty("+qn+", "+location+", e="+e);}
} else {
System.out.println("*** Wrong selected resource "+selectedResource+" for project "+project);
return;
}
}
IResource HDLFile=SelectedResourceManager.getDefault().getChosenVerilogFile();
if (HDLFile!=null){
if (HDLFile.getProject().getFullPath().toPortableString().equals(project.getFullPath().toPortableString())){
qn= new QualifiedName(VDT.ID_VDT, TAG_SELECTED_HDL_FILE);
try {project.setPersistentProperty(qn, HDLFile.getFullPath().toPortableString());}
catch (CoreException e) {System.out.println(project+"Failed setPersistentProperty("+qn+", "+HDLFile.getFullPath().toPortableString()+", e="+e);}
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("project.setPersistentProperty("+qn.toString()+","+HDLFile.getFullPath().toPortableString()+")");
} else {
System.out.println("*** Wrong HDLFile "+HDLFile+" for project "+project);
return;
}
}
String HDLFilter=SelectedResourceManager.getDefault().getFilter();
if (HDLFilter!=null){
qn= new QualifiedName(VDT.ID_VDT, TAG_SELECTED_HDL_FILTER);
try {project.setPersistentProperty(qn, HDLFilter);}
catch (CoreException e) {System.out.println(project+"Failed setPersistentProperty("+qn+", "+HDLFilter+", e="+e);}
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("project.setPersistentProperty("+qn.toString()+","+HDLFilter+")");
}
qn= new QualifiedName(VDT.ID_VDT, TAG_LINKED_TOOLS);
try {project.setPersistentProperty(qn, new Boolean(SelectedResourceManager.getDefault().isToolsLinked()).toString());}
catch (CoreException e) {System.out.println(project+"Failed setPersistentProperty("+qn+", "+
SelectedResourceManager.getDefault().isToolsLinked()+", e="+e);}
ToolsCore.saveToolsState(project);
if (toolSequence!=null) {
toolSequence.saveCurrentStates(project);
}
}
} // class DesignFlowView } // class DesignFlowView
\ No newline at end of file
...@@ -32,12 +32,31 @@ ...@@ -32,12 +32,31 @@
icon="my_tool.gif" icon="my_tool.gif"
call="RemotePythonCommand"/> call="RemotePythonCommand"/>
</menu> </menu>
<menu name="ISE"
label="ISE Tools"
icon="xilinx.png">
<menuitem name="ISECopyUnisims"
label="Copy Xilinx ISE primitives library to the local project"
icon="copy.png"
call="ISEUnisims"/>
<menuitem name="ISE Server"
label="Start remote ISE session"
icon="door_in.png"
call="ISE"/>
<menuitem name="ISEPartgen"
label="Run ISE partgen"
icon="bitstream.png"
call="ISEPartgen"/>
</menu>
<menu name="Vivado" <menu name="Vivado"
label="Vivado Tools" label="Vivado Tools"
icon="xilinx.png"> icon="xilinx.png">
<menuitem name="CopyUnisims" <menuitem name="CopyUnisims"
label="Copy Xilinx primitives library to the local project" label="Copy Xilinx Vivado primitives library to the local project"
icon="copy.png" icon="copy.png"
call="VivadoUnisims"/> call="VivadoUnisims"/>
<menuitem name="Vivado Server" <menuitem name="Vivado Server"
......
...@@ -17,63 +17,125 @@ ...@@ -17,63 +17,125 @@
<parameter id="RemoteUser" label="Remote user name" tooltip="Remote user name" type="String" <parameter id="RemoteUser" label="Remote user name" tooltip="Remote user name" type="String"
format="CopyValue" default="%%UserName" readonly="false" visible="true" /> format="CopyValue" default="%%UserName" readonly="false" visible="true" />
<parameter id="PreSSH" label="pre-ssh" tooltip="pre-ssh shell parameters" <!-- Vivado options -->
type="String" format="CopyValue" default="" readonly="false" visible="true" /> <parameter id="VivadoRelease" label="Vivado release" tooltip="Vivado release number (part of the path)"
type="String" format="CopyValue" default="2013.4" readonly="false"
visible="true" />
<parameter id="ShellSwitches" label="Shell switch" tooltip="Shell switches" type="String" <parameter id="VivadoInstallationRoot" label="Vivado root" tooltip="Vivado Installation Root"
format="CopyValue" default="-c" readonly="false" visible="true" /> type="String" format="CopyValue" default="/opt/Xilinx/Vivado" readonly="false"
visible="true" />
<!-- ISE options -->
<parameter id="ISERelease" label="ISE release" tooltip="ISE release number (part of the path)"
type="String" format="CopyValue" default="14.7" readonly="false"
visible="true" />
<parameter id="ISEInstallationRoot" label="ISE root" tooltip="ISE Installation Root"
type="String" format="CopyValue" default="/opt/Xilinx" readonly="false"
visible="true" />
<!-- Vivado advanced parameters -->
<parameter id="TerminalMode" type="BoolYesNo" format="None" <parameter id="TerminalMode" type="BoolYesNo" format="None"
default="false" label="Force terminal mode" tooltip="Force terminal mode for the remote program" /> default="false" label="Force terminal mode" tooltip="Force terminal mode for the remote program" />
<parameter id="SSHSwitches" label="ssh switches" tooltip="Other ssh switches" <parameter id="ShellSwitches" label="Shell switch" tooltip="Shell switches" type="String"
format="CopyValue" default="-c" readonly="false" visible="true" />
<parameter id="PreSSH" label="pre-ssh" tooltip="pre-ssh shell parameters"
type="String" format="CopyValue" default="" readonly="false" visible="true" /> type="String" format="CopyValue" default="" readonly="false" visible="true" />
<parameter id="SSHSwitches" label="ssh switches" tooltip="Other ssh switches"
type="String" format="CopyValue" default="" readonly="false" visible="true" />
<parameter id="VivadoRelease" label="Vivado release" tooltip="Vivado release number (part of the path)" <parameter id="SSHExtra" label="ssh extra parameters" tooltip="ssh extra parameters" type="String"
type="String" format="CopyValue" default="2013.4" readonly="false" format="CopyValue" default="" readonly="false" visible="true" />
visible="true" />
<parameter id="VivadoInstallationRoot" label="Vivado root" tooltip="Vivado Installation Root" <parameter id="VivadoConsole" default="Vivado" label="Vivado console name" tooltip="Vivado console name in Eclipse, used by other tools"
type="String" format="CopyValue" default="/opt/Xilinx/Vivado" readonly="false" type="String" format="CopyValue" visible="true" readonly="false"/>
visible="true" />
<parameter id="VivadoRelativeExeOptions" label="Vivado launch command" tooltip="Vivado relative executable path and command options" <parameter id="VivadoRelativeExeOptions" label="Vivado launch command" tooltip="Vivado relative executable path and command options"
type="String" format="CopyValue" default="bin/vivado -mode tcl" readonly="false" type="String" format="CopyValue" default="bin/vivado -mode tcl" readonly="false"
visible="true" /> visible="true" />
<parameter id="VivadoUnisimsPath" label="unisims location" tooltip="Relative location of Xilinx unisims library" <parameter id="VivadoUnisimsPath" label="unisims location" tooltip="Relative location of Xilinx Vivado unisims library"
type="String" format="CopyValue" default="data/verilog/src" readonly="false" type="String" format="CopyValue" default="data/verilog/src" readonly="false"
visible="true" /> visible="true" />
<!-- /opt/Xilinx/Vivado/2013.4/bin/vivado -mode tcl -->
<parameter id="RemoteCommand" label="Remote command" tooltip="Remote ssh command" <parameter id="RemoteCommand" label="Remote command" tooltip="Remote ssh command"
type="String" format="CopyValue" type="String" format="CopyValue"
default="%VivadoInstallationRoot/%VivadoRelease/%VivadoRelativeExeOptions" default="%VivadoInstallationRoot/%VivadoRelease/%VivadoRelativeExeOptions"
readonly="true" readonly="true"
visible="true" /> visible="true" />
<parameter id="VivadoUnisimsAbsolutePath" label="Full unisims path" tooltip="Full path of Xilinx unisims primitives library"
<parameter id="VivadoUnisimsAbsolutePath" label="Full unisims path" tooltip="Full path of Xilinx Vivado unisims primitives library"
type="String" format="CopyValue" type="String" format="CopyValue"
default="%VivadoInstallationRoot/%VivadoRelease/%VivadoUnisimsPath" default="%VivadoInstallationRoot/%VivadoRelease/%VivadoUnisimsPath"
readonly="true" readonly="true"
visible="true" /> visible="true" />
<!-- ISE advanced parameters -->
<parameter id="ISETerminalMode" type="BoolYesNo" format="None"
default="false" label="Force terminal mode" tooltip="Force terminal mode for the remote program" />
<parameter id="ISEShellSwitches" label="Shell switch" tooltip="Shell switches" type="String"
format="CopyValue" default="-c" readonly="false" visible="true" />
<parameter id="SSHExtra" label="ssh extra parameters" tooltip="ssh extra parameters" type="String" <parameter id="ISEPreSSH" label="pre-ssh" tooltip="pre-ssh shell parameters"
type="String" format="CopyValue" default="" readonly="false" visible="true" />
<parameter id="ISESSHSwitches" label="ssh switches" tooltip="Other ssh switches"
type="String" format="CopyValue" default="" readonly="false" visible="true" />
<parameter id="ISESSHExtra" label="ssh extra parameters" tooltip="ssh extra parameters" type="String"
format="CopyValue" default="" readonly="false" visible="true" /> format="CopyValue" default="" readonly="false" visible="true" />
<parameter id="VivadoConsole" default="Vivado" label="Vivado console name" tooltip="Vivado console name in Eclipse, used by other tools" <parameter id="ISEConsole" default="ISE" label="ISE console name" tooltip="ISE shell console name in Eclipse, used by other tools"
type="String" format="CopyValue" visible="true" readonly="false"/> type="String" format="CopyValue" visible="true" readonly="false"/>
<parameter id="ISEUnisimsPath" label="ISE unisims location" tooltip="Relative location of Xilinx ISE unisims library"
type="String" format="CopyValue" default="ISE_DS/ISE/verilog/src" readonly="false"
visible="true" />
<parameter id="ISERemoteCommand" label="Remote command" tooltip="Remote ssh command"
type="String" format="CopyValue"
default="/bin/bash"
readonly="false"
visible="true" />
<parameter id="ISEBinDirectory" label="ISE executables" tooltip="ISE executables sub-directory"
type="String" format="CopyValue" default="ISE_DS/ISE/bin/lin64" readonly="false"
visible="true" />
<parameter id="ISEUnisimsAbsolutePath" label="Full unisims path" tooltip="Full path of Xilinx ISE unisims primitives library"
type="String" format="CopyValue"
default="%ISEInstallationRoot/%ISERelease/%ISEUnisimsPath"
readonly="true"
visible="true" />
<parameter id="ISEBinAbsolutePath" label="Full ISE executables path" tooltip="Full path of Xilinx ISE executables directory"
type="String" format="CopyValue"
default="%ISEInstallationRoot/%ISERelease/%ISEBinDirectory"
readonly="true"
visible="true" />
<!-- /opt/Xilinx/Vivado/2013.4/bin/vivado -mode tcl -->
<parameter id="NoBabyTalk" label="No Baby talk" tooltip= "Remove licensing baby talk from INFO messages." <parameter id="NoBabyTalk" label="No Baby talk" tooltip= "Remove licensing baby talk from INFO messages."
default="true" visible="true" omit="false" type="Boolean" format="DashName"/> default="true" visible="true" omit="false" type="Boolean" format="DashName"/>
<input> <input>
<group name="VivadoServer" label="Vivado server setup"> <group name="XilinxServer" label="Xilinx server setup">
"RemoteHost" "RemoteHost"
"RemoteUser" "RemoteUser"
"VivadoRelease" "VivadoRelease"
"VivadoInstallationRoot" "VivadoInstallationRoot"
"ISERelease"
"ISEInstallationRoot"
</group> </group>
<group name="Advanced" label="Vivado server advanced setup"> <group name="AdvancedVivado" label="Vivado server advanced setup">
"TerminalMode" "TerminalMode"
"ShellSwitches" "ShellSwitches"
"PreSSH" "PreSSH"
...@@ -85,6 +147,18 @@ ...@@ -85,6 +147,18 @@
"RemoteCommand" "RemoteCommand"
"VivadoUnisimsAbsolutePath" "VivadoUnisimsAbsolutePath"
</group> </group>
<group name="AdvancedISE" label="Xilinx ISE server advanced setup">
"ISETerminalMode"
"ISEShellSwitches"
"ISEPreSSH"
"ISESSHSwitches"
"ISESSHExtra"
"ISEConsole"
"ISEUnisimsPath"
"ISERemoteCommand"
"ISEBinDirectory"
"ISEUnisimsAbsolutePath"
</group>
</input> </input>
</package> </package>
...@@ -103,7 +177,7 @@ ...@@ -103,7 +177,7 @@
type="Pathname" default="simulation" format="CopyValue" readonly="false" /> type="Pathname" default="simulation" format="CopyValue" readonly="false" />
<!-- Vivado parameters --> <!-- Vivado parameters -->
<parameter id="part" label="Device" tooltip= "FPGA part number (device) to use" <parameter id="part" label="Device" tooltip= "FPGA part number (device) to use"
default="" visible="true" omit="" type="String" format="Dash"/> default="" visible="true" omit="" type="String" format="CopyValue"/>
<parameter id="VivadoProjectRoot" label="Workspace directory" tooltip="Relative (to user home directory) path of the workspace on Vivado server" <parameter id="VivadoProjectRoot" label="Workspace directory" tooltip="Relative (to user home directory) path of the workspace on Vivado server"
type="String" default="vdt" format="RemoteRootSyntax" readonly="false" /> type="String" default="vdt" format="RemoteRootSyntax" readonly="false" />
...@@ -117,11 +191,32 @@ ...@@ -117,11 +191,32 @@
tooltip="Local project subdirectroy for Xilinx Vivado generated result files" tooltip="Local project subdirectroy for Xilinx Vivado generated result files"
type="Pathname" default="vivado_results" format="CopyValue" readonly="false" /> type="Pathname" default="vivado_results" format="CopyValue" readonly="false" />
<parameter id="VivadoLogDir" label="Local Vivado tool logsx directory" tooltip="Local project subdirectroy for Xilinx Vivado tools log files" <parameter id="VivadoLogDir" label="Local Vivado tool logs directory" tooltip="Local project subdirectroy for Xilinx Vivado tools log files"
type="Pathname" default="vivado_logs" format="CopyValue" readonly="false" /> type="Pathname" default="vivado_logs" format="CopyValue" readonly="false" />
<parameter id="VivadoIgnoreSource" label="Ignore source files" tooltip="Pattern to ignore source files that match this regular expression" <parameter id="VivadoIgnoreSource" label="Ignore source files" tooltip="Pattern to ignore source files that match this regular expression"
type="String" default=".*unisims.*" format="CopyValue" readonly="false" /> type="String" default=".*unisims.*" format="CopyValue" readonly="false" />
<!-- ISE parameters -->
<parameter id="ISEProjectRoot" label="Workspace directory" tooltip="Relative (to user home directory) path of the workspace on ISE server"
type="String" default="vdt_ise" format="RemoteRootSyntax" readonly="false" />
<parameter id="ISERemoteDir" label="Remote ISE directory" tooltip="Remote ISE output subdirectroy for snapshot and result files"
type="Pathname" default="vivado_build" format="CopyValue" readonly="false" />
<parameter id="ISELocalDir" label="Local ISE directory" tooltip="Local project subdirectroy for Xilinx ISE snapshot files"
type="Pathname" default="vivado_state" format="CopyValue" readonly="false" />
<parameter id="ISELocalResultDir" label="Local ISE results directory"
tooltip="Local project subdirectroy for Xilinx ISE generated result files"
type="Pathname" default="vivado_results" format="CopyValue" readonly="false" />
<parameter id="ISELogDir" label="Local ISE tool logs directory" tooltip="Local project subdirectroy for Xilinx ISE tools log files"
type="Pathname" default="vivado_logs" format="CopyValue" readonly="false" />
<parameter id="ISEIgnoreSource" label="Ignore source files" tooltip="Pattern to ignore source files that match this regular expression"
type="String" default=".*unisims.*" format="CopyValue" readonly="false" />
<!-- Calculated --> <!-- Calculated -->
<!-- <parameter id="VivadoProjectRoot" label="" tooltip="Relative (to user home directory) path of the project on Vivado server" <!-- <parameter id="VivadoProjectRoot" label="" tooltip="Relative (to user home directory) path of the project on Vivado server"
type="String" default="vdt" format="RemoteRootSyntax" readonly="false" /> --> type="String" default="vdt" format="RemoteRootSyntax" readonly="false" /> -->
...@@ -205,27 +300,42 @@ ...@@ -205,27 +300,42 @@
<!-- Invisible (calculated) project-wide parameters --> <!-- Invisible (calculated) project-wide parameters -->
<parameter id="SimulDirSlash" type="Pathname" visible="false" <parameter id="SimulDirSlash" type="Pathname" visible="false"
default="?%SimulDir=:,%SimulDir/" format="CopyValue"/> default="?%SimulDir=:,%SimulDir/" format="CopyValue"/>
<parameter id="SedPaths" type="String" format="CopyValue" <parameter id="VivadoSedPaths" type="String" format="CopyValue"
label="sed commaaand line" tooltip="Remote file prefix to be removed for the local error parser" label="sed command line" tooltip="Remote file prefix to be removed for the local error parser when running Vivado tools"
default="sed -u 's@/home/%RemoteUser/%VivadoProjectRoot/%%ProjectName/@@'"/> default="sed -u 's@/home/%RemoteUser/%VivadoProjectRoot/%%ProjectName/@@'"/>
<parameter id="ISESedPaths" type="String" format="CopyValue"
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/%VivadoProjectRoot/%%ProjectName/@@'"/>
<input> <input>
<group name="Genaral" label="General parameters">
"part"
</group>
<group name="Simulation" label="Simulation properties"> <group name="Simulation" label="Simulation properties">
"SimulationTopFile" "SimulationTopFile"
"SimulationTopModule" "SimulationTopModule"
"ImplementationTopFile" "ImplementationTopFile"
"SimulDir" "SimulDir"
</group> </group>
<group name="Vivado" label="Vivado general properties"> <group name="Vivado" label="Vivado general properties">
"part"
"VivadoProjectRoot" "VivadoProjectRoot"
"VivadoRemoteDir" "VivadoRemoteDir"
"VivadoLocalDir" "VivadoLocalDir"
"VivadoLocalResultDir" "VivadoLocalResultDir"
"VivadoLogDir" "VivadoLogDir"
"VivadoIgnoreSource" "VivadoIgnoreSource"
"SedPaths" "VivadoSedPaths"
</group>
<group name="ISE" label="ISE general properties">
"ISEProjectRoot"
"ISERemoteDir"
"ISELocalDir"
"ISELocalResultDir"
"ISELogDir"
"ISEIgnoreSource"
"ISESedPaths"
</group> </group>
<group name="VivadoDisable" label="Selectively disable Vivado tools"> <group name="VivadoDisable" label="Selectively disable Vivado tools">
"DisableVivadoSynth" "DisableVivadoSynth"
......
...@@ -24,6 +24,18 @@ ...@@ -24,6 +24,18 @@
format = "Equation" format = "Equation"
readonly= "true" /> readonly= "true" />
<parameter id = "TRUE"
type = "Boolean"
default = "true"
format = "None"
visible= "false" />
<parameter id = "FALSE"
type = "Boolean"
default = "false"
format = "None"
visible= "false" />
<input> <input>
<group name="General" label="System properties"> <group name="General" label="System properties">
"OSName" "OSName"
......
<?xml version="1.0" encoding="UTF-8"?>
<vdt-project>
<interface name="ISEInterface" extends="FPGAPprojectInterface">
<syntax name="GrepFilterProblemSyntax" format='| grep --line-buffered -v "\[%%ParamName"' />
<syntax name="GrepFilterProblemOtherSyntax" format='%(| grep --line-buffered -v "\[%%ParamValue"%|\n%)' />
<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>
<syntax name="DashNamePart" format="-%%ParamName %part" />
<!-- <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"
<!-- Create project directory on remote server if it did not exist -->
"ssh"
"-oBatchMode=yes"
"-l %RemoteUser %RemoteHost"
"'"
"mkdir -p"
"%ISEProjectRoot"
"' ;"
<!-- Copy snapshot generated after synthesis from local to remote -->
"rsync -avrR -e ssh"
<!-- from: -->
"%ISELocalDir/%%StateFile"
<!-- to: -->
"%RemoteUser@%RemoteHost:%ISEProjectRoot"
";"
</line>
<line name="ise_restore"
dest="ISEConsole"
mark="``"
sep=" "
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"
</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@@"
failure="ERROR"
log="">
"cd ~/%ISEProjectRoot\n"
"set outputDir ~/%ISEProjectRoot/%ISERemoteDir\n"
"file mkdir $outputDir\n"
"write_checkpoint -force %ISERemoteDir/%%StateFile\n"
"puts \"@@FINISH@@\"\n"
</line>
<line name="ise_copy_after_save">
"-c"
"mkdir -p %ISELocalDir ;"
"rsync -avr -e ssh"
"%RemoteUser@%RemoteHost:%ISEProjectRoot/%ISERemoteDir/%%StateFile"
"%%StateDir/"
</line>
</output>
</tool>
</vdt-project>
<?xml version="1.0" encoding="UTF-8"?>
<vdt-project>
<!-- name should be the same as VivadoConsole parameter -->
<!-- name should be the same as ISEConsole parameter -->
<tool name="ISE"
label="Launch ISE"
project="FPGA_project"
package="FPGA_package"
shell="/bin/bash" interface="ISEInterface" description="Launching remote Xilinx ISE console">
<action-menu>
<action label="Launch ISE shell on remote" resource="" icon="shell.png" />
<action label="Generate public key" resource="" icon="key.png" />
<action label="Setup connection to" resource="%RemoteUser@%RemoteHost"
check-extension="false" check-existence="false" icon="setup.png" />
</action-menu>
<parameter id="command" label="Shell command" default="bash"
type="String" format="CopyValue" visible="true" readonly="false" />
<parameter id="actionIndex" default="%%ChosenActionIndex"
type="String" format="CopyValue" visible="false" />
<input>
<group name="General">
"RemoteCommand"
</group>
<group name="Shell">
- "command"
</group>
</input>
<output>
<if actionIndex="0">
<line name="ISE"
timeout="1"
keep-open= "true">
"%ISEShellSwitches"
"%ISEPreSSH"
"ssh"
"-oBatchMode=yes"
<if ISETerminalMode = "true">
"-t -t"
</if>
"%ISESSHSwitches"
"-l"
"%RemoteUser"
"%RemoteHost"
"'"
"%ISERemoteCommand"
"'"
"%ISESSHExtra"
"|| { echo '*** ssh connection to the server %RemoteUser@%RemoteHost failed ***';"
"echo 'You may need to configure connection - it is done in \"Package Setup\"';"
"echo 'Then generate a public key (if it is not done already), and post it to';"
"echo 'the remote server (currently set as %RemoteUser@%RemoteHost)';"
"exit 1; } ;"
</line>
<line name="ise_check"
dest="ISEConsole"
mark="``"
sep=""
success="@@FINISH@@"
prompt="@@FINISH@@">
"echo \"@@FINISH@@\"\n"
</line>
</if>
<if actionIndex="1">
<line name="Keygen">
"%ShellSwitches"
"echo \"Generating public key with command:\";"
"echo \"ssh-keygen -t rsa -q -f ~/.ssh/id_rsa -N ''\";"
"ssh-keygen -t rsa -q -f ~/.ssh/id_rsa -N ''"
</line>
</if>
<if actionIndex="2">
<line name="SSHCopyID">
"%ShellSwitches"
"echo \"*********************************************\";"
"echo \"** **\";"
"echo \"** This command requires you to be able **\";"
"echo \"** to login to the remote system and enter **\";"
"echo \"** a password once to post your public key **\";"
"echo \"** there. **\";"
"echo \"** **\";"
"echo \"** For this you need 'ssh-askpass' to be **\";"
"echo \"** installed in your system. **\";"
"echo \"** **\";"
"echo \"** If the command will fail, you need to **\";"
"echo \"** install 'ssh-askpass' and try again or **\";"
"echo \"** just manually run: **\";"
"echo \"\n ssh-copy-id %RemoteUser@%RemoteHost\n\";"
"echo \"** from the system terminal and enter your **\";"
"echo \"** password when prompted. **\";"
"echo \"** **\";"
"echo \"** If you see nothing below this box, that **\";"
"echo \"** likely means that Eclipse is launched **\";"
"echo \"** from the terminal, and the system asks **\";"
"echo \"** your password (or permission to add **\";"
"echo \"** key of the remote host first) in that **\";"
"echo \"** terminal - just switch to it and **\";"
"echo \"** complete the setup. **\";"
"echo \"** **\";"
"echo \"*********************************************\";"
"ssh-copy-id %RemoteUser@%RemoteHost;"
</line>
</if>
</output>
</tool>
</vdt-project>
<?xml version="1.0" encoding="UTF-8"?>
<vdt-project>
<interface name="ISEPartgenInterface" extends="ISEInterface">
</interface>
<tool name="ISEPartgen" label="run partgen"
project="FPGA_project"
interface="ISEPartgenInterface"
package="FPGA_package"
shell="/bin/bash"
description="Run ISE partgen"
log-dir="ISELogDir"
state-dir="ISELocalDir"
disable="TRUE"
inherits="ISEToolPrototype"
>
<action-menu>
<action label="Partgen" resource="" icon="bitstream.png" />
</action-menu>
<parameter id="p_option" outid="p" label="include part" tooltip= "Include -p &lt;part&gt; option"
default="false" visible="true" omit="false" type="Boolean" format="DashNamePart"/>
<parameter id="v_option" outid="v" label="include verbose part" tooltip= "Include -v &lt;part&gt; option"
default="false" visible="true" omit="false" type="Boolean" format="DashNamePart"/>
<parameter id="arch" label="architecture" tooltip= "Output information for the specified architecture"
default="" visible="true" omit="" type="String" format="Dash"/>
<parameter id="nopkgfile" label="no package file" tooltip= "Do not generate package file"
default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
<parameter id="info" outid="i" label="list devices" tooltip= "Output list of devices, packages, speeds"
default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
<parameter id="redirect" label="redirect output" tooltip= "Redirect output to file (for info and arch options)"
default="partgen.out" visible="true" omit="" type="String" format="CopyValue"/>
<!-- common parameters form the base tool -->
<parameter id="intstyle"/>
<parameter id="command_files"/>
<parameter id="speed_grade"/>
<!-- hidden (calculated) parameters -->
<parameter id= "useRedirect" label="debug condition"
default="?(%info = true | %arch # ) ^ %redirect # : true , false" visible="true" omit="false" type="Boolean" format="None"/>
<input>
<group name="Partgen options">
"p_option"
"v_option"
"arch"
"nopkgfile"
"info"
"redirect"
"useRedirect"
</group>
</input>
<output>
<line name="ise_run_partgen"
dest="ISEConsole"
mark="``"
sep=" "
prompt="@@FINISH@@"
success="@@FINISH@@"
failure="ERROR"
log=""
stdout="parser_ISE">
"mkdir -p"
"~/%ISEProjectRoot"
"\n"
"cd ~/%ISEProjectRoot\n"
"%ISEBinAbsolutePath/partgen"
"%p_option"
"%v_option"
"%arch"
"%nopkgfile"
"%info"
"%intstyle"
<if useRedirect="true">
"&gt;%redirect"
</if>
"\n"
"echo \"@@FINISH@@\"\n"
</line>
<!-- TODO: copy results -->
</output>
</tool>
</vdt-project>
<?xml version="1.0" encoding="UTF-8"?>
<vdt-project>
<tool name="ISEToolPrototype" label="ISEToolPrototype"
project="FPGA_project"
interface="ISEInterface"
package="FPGA_package"
shell="/bin/bash"
description="ISE tool prototype"
abstract="true"
>
<!-- Parameters common to all tools -->
<!-- Not clear what is the default value for intstyle so using always -->
<parameter id="intstyle" label="Integration Style" tooltip= "Defines screen output"
default="xflow" visible="true" omit="" type="intstyleType" format="Dash"/>
<parameter id="command_files" outid="f" label="command files" tooltip= "Include command files"
default="" visible="true" omit="" type="Stringlist" format="DashListIndividual"/>
<!-- <parameter id="part_num" outid="p" label="part number" tooltip= "Device part number"
default="%part" visible="true" omit="" type="String" format="Dash"/> -->
<parameter id="speed_grade" outid="s" label="speed grade" tooltip= "Device speed grade"
default="" visible="true" omit="" type="String" format="Dash"/>
<!-- parser parameters -->
<!-- TODO: parser is temporarily copied from Vivado, change to ISE -->
<parameter id="PatternErrors" label="Errors" tooltip= "Regular expression for error messages"
default=".*ERROR: (\[.*\].*)\[(.*):([0-9]+)\]"
visible="true" type="String" format="CopyValue"/>
<parameter id="PatternWarnings" label="Warnings" tooltip= "Regular expression for warnings messages"
default=".*WARNING: (\[.*\].*)\[(.*):([0-9]+)\]"
visible="true" type="String" format="CopyValue"/>
<parameter id="PatternInfo" label="Info" tooltip= "Regular expression for info messages"
default=".*INFO: (\[.*\].*)\[(.*):([0-9]+)\]"
visible="true" type="String" format="CopyValue"/>
<parameter id="NoFileProblem" label="No-file problems" tooltip= "Report problems that do not specify particular source file/line"
default="true" visible="true" omit="false" type="Boolean" format="None"/>
<parameter id="Drc" label="Drc" tooltip= "Enable problems with [Drc to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="ISE_Tcl" label="ISE_Tcl" tooltip= "Enable problems with [ISE_Tcl to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Route" label="Route" tooltip= "Enable problems with [Route to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Memdata" label="Memdata" tooltip= "Enable problems with [Memdata to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Synth" label="Synth" tooltip= "Enable problems with [Synth to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Netlist" label="Netlist" tooltip= "Enable problems with [Netlist to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Opt" label="Opt" tooltip= "Enable problems with [Opt to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Project" label="Project" tooltip= "Enable problems with [Project to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Timing" label="Timing" tooltip= "Enable problems with [Timing to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Pwropt" label="Pwropt" tooltip= "Enable problems with [Pwropt to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<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="ShowWarnings" label="Show Warnings" tooltip="Parse warning messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="ShowInfo" label="Show info" tooltip="Parse info messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="PreGrepW" visible="false"
type="String" format="None"
default="?%ShowWarnings=true: |WARNING, "/>
<parameter id="PreGrepI" visible="false"
type="String" format="None"
default="?%ShowInfo=true: |INFO, "/>
<parameter id="GrepEWI" label="Grep filter" tooltip="Calculated grep filter"
default="grep --line-buffered -E 'ERROR%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
visible="true" readonly="true"/>
<input>
<group name="Common options"
weight="9">
"intstyle"
"command_files"
<!-- "part_num" -->
"speed_grade"
</group>
<group name="Parser"
weight="10">
"ShowWarnings"
"ShowInfo"
"GrepEWI"
"---"
"NoFileProblem"
"Drc"
"ISE_Tcl"
"Route"
"Memdata"
"Synth"
"Netlist"
"Opt"
"Project"
"Timing"
"Pwropt"
"OtherProblems"
"---"
"PatternErrors"
"PatternWarnings"
"PatternInfo"
</group>
</input>
<output>
<line name= "parser_ISE"
errors= "PatternErrors"
warnings= "PatternWarnings"
info= "PatternInfo">
"-c"
"%GrepEWI"
"| %ISESedPaths"
<if NoBabyTalk="true">
"| grep --line-buffered -v \"license\""
</if>
"%Drc"
"%ISE_Tcl"
"%Route"
"%Memdata"
"%Synth"
"%Netlist"
"%Opt"
"%Project"
"%Timing"
"%Pwropt"
"%OtherProblems"
<!-- TODO: change Placement to Routing? or such -->
<if NoFileProblem="true">
<!-- Add [Placement:0000] to lines that do not have [file:line] - then "Placement" will appear in "Problems" location-->
"| sed -u 's@^[^\[]*\[[^\[]*$@&amp;\[%%ToolName:0000\]@'"
</if>
</line>
</output>
</tool>
</vdt-project>
<?xml version="1.0" encoding="UTF-8"?>
<vdt-project>
<tool name="ISEUnisims" label="Get Xilinx ISE unisims"
project="FPGA_project"
interface="ISEInterface"
package="FPGA_package"
shell="/bin/bash"
description="Copy ISE unisims library to the project directory">
<action-menu>
<action label="Copy ISE unisims" resource="" icon="copy.png" />
</action-menu>
<input>
<group name="General">
"ISEUnisimsAbsolutePath"
</group>
</input>
<output>
<line name="copy_unisims">
"-c"
"rsync -avr -e ssh"
"%RemoteUser@%RemoteHost:%ISEUnisimsAbsolutePath/unisims"
"./;"
</line>
</output>
</tool>
</vdt-project>
...@@ -23,23 +23,6 @@ ...@@ -23,23 +23,6 @@
</depends-list> </depends-list>
<parameter id="SkipPreBitstream" label="Skip pre-bitstream" tooltip="Do not run pre bitstream TCL commands" <parameter id="SkipPreBitstream" label="Skip pre-bitstream" tooltip="Do not run pre bitstream TCL commands"
default="false" type= "Boolean" format="None"/> default="false" type= "Boolean" format="None"/>
<!-- left from synthesis, may need update-->
<parameter id="ShowWarnings" label="Parse warnings" tooltip="Parse warning messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="ShowInfo" label="Parse info" tooltip="Parse info messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="PreGrepW" visible="false"
type="String" format="None"
default="?%ShowWarnings=true: |WARNING, "/>
<parameter id="PreGrepI" visible="false"
type="String" format="None"
default="?%ShowInfo=true: |INFO, "/>
<parameter id="GrepEWI" label="Grep filter" tooltip="Calculated grep filter"
default="grep --line-buffered -E 'ERROR%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
visible="true" readonly="true"/>
<parameter id="PreBitstreamTCL" label="Pre-bitstream TCL commands" tooltip="TCL commands to run before write_bitstream" <parameter id="PreBitstreamTCL" label="Pre-bitstream TCL commands" tooltip="TCL commands to run before write_bitstream"
type="Stringlist" format="ProgramSyntax" default="" omit="" type="Stringlist" format="ProgramSyntax" default="" omit=""
...@@ -86,6 +69,11 @@ ...@@ -86,6 +69,11 @@
<parameter id="Timing"/> <parameter id="Timing"/>
<parameter id="Pwropt"/> <parameter id="Pwropt"/>
<parameter id="OtherProblems"/> <parameter id="OtherProblems"/>
<parameter id="ShowWarnings"/>
<parameter id="ShowInfo"/>
<parameter id="PreGrepW"/>
<parameter id="PreGrepI"/>
<parameter id="GrepEWI"/>
<!-- hidden (calculated) parameters --> <!-- hidden (calculated) parameters -->
...@@ -97,9 +85,6 @@ ...@@ -97,9 +85,6 @@
<input> <input>
<group name="General"> <group name="General">
"SkipPreBitstream" "SkipPreBitstream"
"ShowWarnings"
"ShowInfo"
"GrepEWI"
</group> </group>
<group name="Pre-bitstream commands"> <group name="Pre-bitstream commands">
"PreBitstreamTCL" "PreBitstreamTCL"
......
...@@ -42,23 +42,6 @@ ...@@ -42,23 +42,6 @@
<parameter id="SkipOptimization" label="Skip optimize" tooltip="Do not run opt_design" <parameter id="SkipOptimization" label="Skip optimize" tooltip="Do not run opt_design"
default="false" type= "Boolean" format="None"/> default="false" type= "Boolean" format="None"/>
<!-- left from synthesis, may need update-->
<parameter id="ShowWarnings" label="Parse warnings" tooltip="Parse warning messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="ShowInfo" label="Parse info" tooltip="Parse info messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="PreGrepW" visible="false"
type="String" format="None"
default="?%ShowWarnings=true: |WARNING, "/>
<parameter id="PreGrepI" visible="false"
type="String" format="None"
default="?%ShowInfo=true: |INFO, "/>
<parameter id="GrepEWI" label="Grep filter" tooltip="Calculated grep filter"
default="grep --line-buffered -E 'ERROR%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
visible="true" readonly="true"/>
<parameter id="PreOptTCL" label="Pre-optimize TCL commands" tooltip="TCL commands to run before opt_design" <parameter id="PreOptTCL" label="Pre-optimize TCL commands" tooltip="TCL commands to run before opt_design"
type="Stringlist" format="ProgramSyntax" default="" omit="" type="Stringlist" format="ProgramSyntax" default="" omit=""
...@@ -102,6 +85,13 @@ ...@@ -102,6 +85,13 @@
<parameter id="Timing"/> <parameter id="Timing"/>
<parameter id="Pwropt"/> <parameter id="Pwropt"/>
<parameter id="OtherProblems"/> <parameter id="OtherProblems"/>
<parameter id="ShowWarnings"/>
<parameter id="ShowInfo"/>
<parameter id="PreGrepW"/>
<parameter id="PreGrepI"/>
<parameter id="GrepEWI"/>
<!-- hidden (calculated) parameters --> <!-- hidden (calculated) parameters -->
<!-- not really used now, always "0" --> <!-- not really used now, always "0" -->
<parameter id="VivadoOptActionIndex" default="%%ChosenActionIndex" <parameter id="VivadoOptActionIndex" default="%%ChosenActionIndex"
...@@ -115,9 +105,6 @@ ...@@ -115,9 +105,6 @@
"SkipOptimization" "SkipOptimization"
"---" "---"
"SnapshotOpt" <!-- same as in project --> "SnapshotOpt" <!-- same as in project -->
"ShowWarnings"
"ShowInfo"
"GrepEWI"
</group> </group>
<group name="Pre-optimization commands"> <group name="Pre-optimization commands">
"PreOptTCL" "PreOptTCL"
......
...@@ -45,23 +45,6 @@ ...@@ -45,23 +45,6 @@
<parameter id="SkipSnapshotOptPhys" label="Skip snapshot save" tooltip="Do not create snapshot after physical optimization" <parameter id="SkipSnapshotOptPhys" label="Skip snapshot save" tooltip="Do not create snapshot after physical optimization"
default="false" type= "Boolean" format="None"/> default="false" type= "Boolean" format="None"/>
<!-- left from synthesis, may need update-->
<parameter id="ShowWarnings" label="Parse warnings" tooltip="Parse warning messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="ShowInfo" label="Parse info" tooltip="Parse info messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="PreGrepW" visible="false"
type="String" format="None"
default="?%ShowWarnings=true: |WARNING, "/>
<parameter id="PreGrepI" visible="false"
type="String" format="None"
default="?%ShowInfo=true: |INFO, "/>
<parameter id="GrepEWI" label="Grep filter" tooltip="Calculated grep filter"
default="grep --line-buffered -E 'ERROR%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
visible="true" readonly="true"/>
<parameter id="PreOptTCL" label="Pre-optimize TCL commands" tooltip="TCL commands to run before opt_design" <parameter id="PreOptTCL" label="Pre-optimize TCL commands" tooltip="TCL commands to run before opt_design"
type="Stringlist" format="ProgramSyntax" default="" omit="" type="Stringlist" format="ProgramSyntax" default="" omit=""
...@@ -115,6 +98,11 @@ ...@@ -115,6 +98,11 @@
<parameter id="Timing"/> <parameter id="Timing"/>
<parameter id="Pwropt"/> <parameter id="Pwropt"/>
<parameter id="OtherProblems"/> <parameter id="OtherProblems"/>
<parameter id="ShowWarnings"/>
<parameter id="ShowInfo"/>
<parameter id="PreGrepW"/>
<parameter id="PreGrepI"/>
<parameter id="GrepEWI"/>
<!-- hidden (calculated) parameters --> <!-- hidden (calculated) parameters -->
<!-- not really used now, always "0" --> <!-- not really used now, always "0" -->
...@@ -131,9 +119,6 @@ ...@@ -131,9 +119,6 @@
"SkipSnapshotOptPhys" "SkipSnapshotOptPhys"
"---" "---"
"SnapshotOptPhys" <!-- same as in project --> "SnapshotOptPhys" <!-- same as in project -->
"ShowWarnings"
"ShowInfo"
"GrepEWI"
</group> </group>
<group name="Pre-optimization commands"> <group name="Pre-optimization commands">
"PreOptTCL" "PreOptTCL"
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
disable="DisableVivadoOptPlace" disable="DisableVivadoOptPlace"
autosave="AutosaveVivadoOptPlace" autosave="AutosaveVivadoOptPlace"
save="SaveVivadoOptPlace" save="SaveVivadoOptPlace"
inherits="VivadoToolPrototype"
> >
<action-menu> <action-menu>
<action label="Optimize and Place" resource="" icon="mondrian2x2.png" /> <action label="Optimize and Place" resource="" icon="mondrian2x2.png" />
...@@ -83,23 +83,6 @@ ...@@ -83,23 +83,6 @@
<parameter id="SkipSnapshotPlace" label="Skip snapshot save" tooltip="Do not create snapshot after placement" <parameter id="SkipSnapshotPlace" label="Skip snapshot save" tooltip="Do not create snapshot after placement"
default="false" type= "Boolean" format="None"/> default="false" type= "Boolean" format="None"/>
<!-- left from synthesis, may need update-->
<parameter id="ShowWarnings" label="Parse warnings" tooltip="Parse warning messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="ShowInfo" label="Parse info" tooltip="Parse info messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="PreGrepW" visible="false"
type="String" format="None"
default="?%ShowWarnings=true: |WARNING, "/>
<parameter id="PreGrepI" visible="false"
type="String" format="None"
default="?%ShowInfo=true: |INFO, "/>
<parameter id="GrepEWI" label="Grep filter" tooltip="Calculated grep filter"
default="grep --line-buffered -E 'ERROR%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
visible="true" readonly="true"/>
<parameter id="PreOptTCL" label="Pre-optimize TCL commands" tooltip="TCL commands to run before opt_design" <parameter id="PreOptTCL" label="Pre-optimize TCL commands" tooltip="TCL commands to run before opt_design"
type="Stringlist" format="ProgramSyntax" default="" omit="" type="Stringlist" format="ProgramSyntax" default="" omit=""
...@@ -181,36 +164,28 @@ ...@@ -181,36 +164,28 @@
<parameter id="verbose_phys_opt" outid="verbose" label="Verbose" tooltip= "Temporarily override message limits set with set_msg_config" <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"/> default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
<!-- parser parameters --> <!-- parser parameters - will have different values than the base tool -->
<parameter id="PatternErrors" label="Errors" tooltip= "Regular expression for error messages" <parameter id="PatternErrors"/>
default=".*ERROR: (\[.*\].*)\[(.*):([0-9]+)\]" <parameter id="PatternWarnings"/>
visible="true" type="String" format="CopyValue"/> <parameter id="PatternInfo"/>
<parameter id="PatternWarnings" label="Warnings" tooltip= "Regular expression for warnings messages" <parameter id="NoFileProblem"/>
default=".*WARNING: (\[.*\].*)\[(.*):([0-9]+)\]" <parameter id="Drc"/>
visible="true" type="String" format="CopyValue"/> <parameter id="Vivado_Tcl"/>
<parameter id="PatternInfo" label="Info" tooltip= "Regular expression for info messages" <parameter id="Route"/>
default=".*INFO: (\[.*\].*)\[(.*):([0-9]+)\]" <parameter id="Memdata"/>
visible="true" type="String" format="CopyValue"/> <parameter id="Synth"/>
<parameter id="NoFileProblem" label="No-file problems" tooltip= "Report problems that do not specify particular source file/line" <parameter id="Netlist"/>
default="true" visible="true" omit="false" type="Boolean" format="None"/> <parameter id="Opt"/>
<parameter id="Drc" label="Drc" tooltip= "Enable problems with [Drc to be reported" <parameter id="Project"/>
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/> <parameter id="Timing"/>
<parameter id="Memdata" label="Memdata" tooltip= "Enable problems with [Memdata to be reported" <parameter id="Pwropt"/>
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/> <parameter id="OtherProblems"/>
<parameter id="Netlist" label="Netlist" tooltip= "Enable problems with [Netlist to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/> <parameter id="ShowWarnings"/>
<parameter id="Opt" label="Opt" tooltip= "Enable problems with [Opt to be reported" <parameter id="ShowInfo"/>
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/> <parameter id="PreGrepW"/>
<parameter id="Project" label="Project" tooltip= "Enable problems with [Project to be reported" <parameter id="PreGrepI"/>
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/> <parameter id="GrepEWI"/>
<parameter id="Timing" label="Timing" tooltip= "Enable problems with [Timing to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Pwropt" label="Pwropt" tooltip= "Enable problems with [Pwropt to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Vivado_Tcl" label="Vivado_Tcl" tooltip= "Enable problems with [Vivado_Tcl to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="OtherProblems" label="Other problems" tooltip= "Other problem patterns (after opening '[') to be suppressed)"
default="" visible="true" omit="" type="Stringlist" format="GrepFilterProblemOtherSyntax"/>
<!-- hidden (calculated) parameters --> <!-- hidden (calculated) parameters -->
...@@ -232,9 +207,6 @@ ...@@ -232,9 +207,6 @@
"SkipSnapshotPlace" "SkipSnapshotPlace"
"---" "---"
"SnapshotOptPlace" <!-- same as in project --> "SnapshotOptPlace" <!-- same as in project -->
"ShowWarnings"
"ShowInfo"
"GrepEWI"
</group> </group>
<group name="Pre-optimization commands"> <group name="Pre-optimization commands">
"PreOptTCL" "PreOptTCL"
...@@ -286,23 +258,6 @@ ...@@ -286,23 +258,6 @@
"quiet_phys_opt" "quiet_phys_opt"
"verbose_phys_opt" "verbose_phys_opt"
</group> </group>
<group name="Parser">
"NoFileProblem"
"Drc"
"Memdata"
"Netlist"
"Opt"
"Project"
"Timing"
"Pwropt"
"Vivado_Tcl"
"OtherProblems"
"---"
"PatternErrors"
"PatternWarnings"
"PatternInfo"
</group>
</input> </input>
<output> <output>
...@@ -391,7 +346,7 @@ ...@@ -391,7 +346,7 @@
info= "PatternInfo"> info= "PatternInfo">
"-c" "-c"
"%GrepEWI" "%GrepEWI"
"| %SedPaths" "| %VivadoSedPaths"
<if NoBabyTalk="true"> <if NoBabyTalk="true">
"| grep --line-buffered -v \"license\"" "| grep --line-buffered -v \"license\""
</if> </if>
......
...@@ -29,23 +29,6 @@ ...@@ -29,23 +29,6 @@
default="false" type= "Boolean" format="None"/> default="false" type= "Boolean" format="None"/>
<parameter id="SkipPowerOptimization" label="skip power optimize" tooltip="Do not run power_opt_design" <parameter id="SkipPowerOptimization" label="skip power optimize" tooltip="Do not run power_opt_design"
default="false" type= "Boolean" format="None"/> default="false" type= "Boolean" format="None"/>
<!-- left from synthesis, may need update-->
<parameter id="ShowWarnings" label="Parse warnings" tooltip="Parse warning messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="ShowInfo" label="Parse info" tooltip="Parse info messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="PreGrepW" visible="false"
type="String" format="None"
default="?%ShowWarnings=true: |WARNING, "/>
<parameter id="PreGrepI" visible="false"
type="String" format="None"
default="?%ShowInfo=true: |INFO, "/>
<parameter id="GrepEWI" label="Grep filter" tooltip="Calculated grep filter"
default="grep --line-buffered -E 'ERROR%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
visible="true" readonly="true"/>
<parameter id="PreOptTCL" label="Pre-optimize TCL commands" tooltip="TCL commands to run before power_opt_design" <parameter id="PreOptTCL" label="Pre-optimize TCL commands" tooltip="TCL commands to run before power_opt_design"
type="Stringlist" format="ProgramSyntax" default="" omit="" type="Stringlist" format="ProgramSyntax" default="" omit=""
readonly="false" visible="true" /> readonly="false" visible="true" />
...@@ -71,6 +54,11 @@ ...@@ -71,6 +54,11 @@
<parameter id="Timing"/> <parameter id="Timing"/>
<parameter id="Pwropt"/> <parameter id="Pwropt"/>
<parameter id="OtherProblems"/> <parameter id="OtherProblems"/>
<parameter id="ShowWarnings"/>
<parameter id="ShowInfo"/>
<parameter id="PreGrepW"/>
<parameter id="PreGrepI"/>
<parameter id="GrepEWI"/>
<!-- hidden (calculated) parameters --> <!-- hidden (calculated) parameters -->
<!-- not really used now, always "0" --> <!-- not really used now, always "0" -->
...@@ -85,9 +73,6 @@ ...@@ -85,9 +73,6 @@
"SkipPowerOptimization" "SkipPowerOptimization"
"---" "---"
"SnapshotOptPower" <!-- same as in project --> "SnapshotOptPower" <!-- same as in project -->
"ShowWarnings"
"ShowInfo"
"GrepEWI"
</group> </group>
<group name="Pre-optimization commands"> <group name="Pre-optimization commands">
"PreOptTCL" "PreOptTCL"
......
...@@ -55,23 +55,6 @@ ...@@ -55,23 +55,6 @@
<parameter id="SkipSnapshotPlace" label="Skip snapshot save" tooltip="Do not create snapshot after placement" <parameter id="SkipSnapshotPlace" label="Skip snapshot save" tooltip="Do not create snapshot after placement"
default="false" type= "Boolean" format="None"/> default="false" type= "Boolean" format="None"/>
<!-- left from synthesis, may need update-->
<parameter id="ShowWarnings" label="Parse warnings" tooltip="Parse warning messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="ShowInfo" label="Parse info" tooltip="Parse info messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="PreGrepW" visible="false"
type="String" format="None"
default="?%ShowWarnings=true: |WARNING, "/>
<parameter id="PreGrepI" visible="false"
type="String" format="None"
default="?%ShowInfo=true: |INFO, "/>
<parameter id="GrepEWI" label="Grep filter" tooltip="Calculated grep filter"
default="grep --line-buffered -E 'ERROR%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
visible="true" readonly="true"/>
<parameter id="PreOptTCL" label="Pre-placement TCL commands" tooltip="TCL commands to run before place_design" <parameter id="PreOptTCL" label="Pre-placement TCL commands" tooltip="TCL commands to run before place_design"
type="Stringlist" format="ProgramSyntax" default="" omit="" type="Stringlist" format="ProgramSyntax" default="" omit=""
...@@ -111,6 +94,11 @@ ...@@ -111,6 +94,11 @@
<parameter id="Pwropt"/> <parameter id="Pwropt"/>
<parameter id="OtherProblems"/> <parameter id="OtherProblems"/>
<parameter id="ShowWarnings"/>
<parameter id="ShowInfo"/>
<parameter id="PreGrepW"/>
<parameter id="PreGrepI"/>
<parameter id="GrepEWI"/>
<!-- hidden (calculated) parameters --> <!-- hidden (calculated) parameters -->
<!-- not really used now, always "0" --> <!-- not really used now, always "0" -->
...@@ -125,9 +113,6 @@ ...@@ -125,9 +113,6 @@
"SkipPlacement" "SkipPlacement"
"---" "---"
"SnapshotPlace" <!-- same as in project --> "SnapshotPlace" <!-- same as in project -->
"ShowWarnings"
"ShowInfo"
"GrepEWI"
</group> </group>
<group name="Pre-optimization commands"> <group name="Pre-optimization commands">
"PreOptTCL" "PreOptTCL"
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
shell="/bin/bash" shell="/bin/bash"
description="Vivado tool prototype" description="Vivado tool prototype"
abstract="true" abstract="true"
parser="true"
> >
<!-- parser parameters --> <!-- parser parameters -->
<parameter id="PatternErrors" label="Errors" tooltip= "Regular expression for error messages" <parameter id="PatternErrors" label="Errors" tooltip= "Regular expression for error messages"
...@@ -44,9 +43,31 @@ ...@@ -44,9 +43,31 @@
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/> default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="OtherProblems" label="Other problems" tooltip= "Other problem patterns (after opening '[') to be suppressed)" <parameter id="OtherProblems" label="Other problems" tooltip= "Other problem patterns (after opening '[') to be suppressed)"
default="" visible="true" omit="" type="Stringlist" format="GrepFilterProblemOtherSyntax"/> default="" visible="true" omit="" type="Stringlist" format="GrepFilterProblemOtherSyntax"/>
<parameter id="ShowWarnings" label="Show Warnings" tooltip="Parse warning messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="ShowInfo" label="Show info" tooltip="Parse info messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="PreGrepW" visible="false"
type="String" format="None"
default="?%ShowWarnings=true: |WARNING, "/>
<parameter id="PreGrepI" visible="false"
type="String" format="None"
default="?%ShowInfo=true: |INFO, "/>
<parameter id="GrepEWI" label="Grep filter" tooltip="Calculated grep filter"
default="grep --line-buffered -E 'ERROR%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
visible="true" readonly="true"/>
<input> <input>
<group name="Parser" <group name="Parser"
weight="10"> weight="10">
"ShowWarnings"
"ShowInfo"
"GrepEWI"
"---"
"NoFileProblem" "NoFileProblem"
"Drc" "Drc"
"Vivado_Tcl" "Vivado_Tcl"
...@@ -72,7 +93,7 @@ ...@@ -72,7 +93,7 @@
info= "PatternInfo"> info= "PatternInfo">
"-c" "-c"
"%GrepEWI" "%GrepEWI"
"| %SedPaths" "| %VivadoSedPaths"
<if NoBabyTalk="true"> <if NoBabyTalk="true">
"| grep --line-buffered -v \"license\"" "| grep --line-buffered -v \"license\""
</if> </if>
......
...@@ -42,23 +42,6 @@ ...@@ -42,23 +42,6 @@
<parameter id="SkipSnapshotRoute" label="Skip snapshot save" tooltip="Do not create snapshot after route" <parameter id="SkipSnapshotRoute" label="Skip snapshot save" tooltip="Do not create snapshot after route"
default="false" type= "Boolean" format="None"/> default="false" type= "Boolean" format="None"/>
<!-- left from synthesis, may need update-->
<parameter id="ShowWarnings" label="Parse warnings" tooltip="Parse warning messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="ShowInfo" label="Parse info" tooltip="Parse info messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="PreGrepW" visible="false"
type="String" format="None"
default="?%ShowWarnings=true: |WARNING, "/>
<parameter id="PreGrepI" visible="false"
type="String" format="None"
default="?%ShowInfo=true: |INFO, "/>
<parameter id="GrepEWI" label="Grep filter" tooltip="Calculated grep filter"
default="grep --line-buffered -E 'ERROR%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
visible="true" readonly="true"/>
<parameter id="PreRouteTCL" label="Pre-route TCL commands" tooltip="TCL commands to run before route_design" <parameter id="PreRouteTCL" label="Pre-route TCL commands" tooltip="TCL commands to run before route_design"
type="Stringlist" format="ProgramSyntax" default="" omit="" type="Stringlist" format="ProgramSyntax" default="" omit=""
...@@ -116,6 +99,12 @@ ...@@ -116,6 +99,12 @@
<parameter id="Pwropt"/> <parameter id="Pwropt"/>
<parameter id="OtherProblems"/> <parameter id="OtherProblems"/>
<parameter id="ShowWarnings"/>
<parameter id="ShowInfo"/>
<parameter id="PreGrepW"/>
<parameter id="PreGrepI"/>
<parameter id="GrepEWI"/>
<parameter id="AutosaveVivadoRoute" default="?%%ChosenActionIndex=0 ^ %SkipSnapshotRoute=false : true, false" <parameter id="AutosaveVivadoRoute" default="?%%ChosenActionIndex=0 ^ %SkipSnapshotRoute=false : true, false"
visible="false" type="Boolean" format="None"/> visible="false" type="Boolean" format="None"/>
...@@ -129,9 +118,6 @@ ...@@ -129,9 +118,6 @@
"SkipPreRoute" "SkipPreRoute"
"SkipSnapshotRoute" "SkipSnapshotRoute"
"SnapshotRoute" <!-- same as in project --> "SnapshotRoute" <!-- same as in project -->
"ShowWarnings"
"ShowInfo"
"GrepEWI"
</group> </group>
<group name="Pre-routing commands"> <group name="Pre-routing commands">
"PreRouteTCL" "PreRouteTCL"
......
...@@ -97,22 +97,7 @@ ...@@ -97,22 +97,7 @@
<parameter id="ResetProject" label="Reset project" tooltip="Reset project before loading source files" <parameter id="ResetProject" label="Reset project" tooltip="Reset project before loading source files"
default="true" default="true"
type= "Boolean" format="None"/> type= "Boolean" format="None"/>
<parameter id="ShowWarnings" label="Show Warnings" tooltip="Parse warning messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="ShowInfo" label="Show info" tooltip="Parse info messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="PreGrepW" visible="false"
type="String" format="None"
default="?%ShowWarnings=true: |WARNING, "/>
<parameter id="PreGrepI" visible="false"
type="String" format="None"
default="?%ShowInfo=true: |INFO, "/>
<parameter id="GrepEWI" label="Grep filter" tooltip="Calculated grep filter"
default="grep --line-buffered -E 'ERROR%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
visible="true" readonly="true"/>
<!-- synth_design arguments --> <!-- synth_design arguments -->
...@@ -190,6 +175,13 @@ ...@@ -190,6 +175,13 @@
<parameter id="Timing"/> <parameter id="Timing"/>
<parameter id="Pwropt"/> <parameter id="Pwropt"/>
<parameter id="OtherProblems"/> <parameter id="OtherProblems"/>
<parameter id="ShowWarnings"/>
<parameter id="ShowInfo"/>
<parameter id="PreGrepW"/>
<parameter id="PreGrepI"/>
<parameter id="GrepEWI"/>
<!-- invisible/calculated parameters --> <!-- invisible/calculated parameters -->
<parameter id="AutosaveVivadoSynthesis" default="?%%ChosenActionIndex=0 ^ %SkipSnapshotSynth=false : true, false" <parameter id="AutosaveVivadoSynthesis" default="?%%ChosenActionIndex=0 ^ %SkipSnapshotSynth=false : true, false"
visible="false" type="Boolean" format="None"/> visible="false" type="Boolean" format="None"/>
...@@ -203,9 +195,6 @@ ...@@ -203,9 +195,6 @@
"SkipSnapshotSynth" "SkipSnapshotSynth"
"SnapshotSynth" <!-- same as in project --> "SnapshotSynth" <!-- same as in project -->
"ResetProject" "ResetProject"
"ShowWarnings"
"ShowInfo"
"GrepEWI"
</group> </group>
<group name="Synthesis"> <group name="Synthesis">
"directive" "directive"
......
...@@ -62,23 +62,6 @@ ...@@ -62,23 +62,6 @@
<parameter id="SkipTCL" label="Skip TCL commands" tooltip="Do not run pre-timing summary TCL commands" <parameter id="SkipTCL" label="Skip TCL commands" tooltip="Do not run pre-timing summary TCL commands"
default="false" type= "Boolean" format="None"/> default="false" type= "Boolean" format="None"/>
<!-- left from synthesis, may need update-->
<parameter id="ShowWarnings" label="Parse warnings" tooltip="Parse warning messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="ShowInfo" label="Parse info" tooltip="Parse info messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="PreGrepW" visible="false"
type="String" format="None"
default="?%ShowWarnings=true: |WARNING, "/>
<parameter id="PreGrepI" visible="false"
type="String" format="None"
default="?%ShowInfo=true: |INFO, "/>
<parameter id="GrepEWI" label="Grep filter" tooltip="Calculated grep filter"
default="grep --line-buffered -E 'ERROR%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
visible="true" readonly="true"/>
<parameter id="PreTCL" label="Pre timing summary TCL commands" tooltip="TCL commands to run before timing summary" <parameter id="PreTCL" label="Pre timing summary TCL commands" tooltip="TCL commands to run before timing summary"
type="Stringlist" format="ProgramSyntax" default="" omit="" type="Stringlist" format="ProgramSyntax" default="" omit=""
...@@ -214,6 +197,12 @@ ...@@ -214,6 +197,12 @@
<parameter id="Pwropt"/> <parameter id="Pwropt"/>
<parameter id="OtherProblems"/> <parameter id="OtherProblems"/>
<parameter id="ShowWarnings"/>
<parameter id="ShowInfo"/>
<parameter id="PreGrepW"/>
<parameter id="PreGrepI"/>
<parameter id="GrepEWI"/>
<!-- Invisible (calculated) parameters --> <!-- Invisible (calculated) parameters -->
<!-- same value as %file, but will appear withou "-file" prefix --> <!-- same value as %file, but will appear withou "-file" prefix -->
<parameter id="file" default="%VivadoRemoteDir/%rawfile" visible="false" omit="" type="String" format="Dash"/> <parameter id="file" default="%VivadoRemoteDir/%rawfile" visible="false" omit="" type="String" format="Dash"/>
...@@ -221,9 +210,6 @@ ...@@ -221,9 +210,6 @@
<group name="General"> <group name="General">
"DisableVivadoTiming" "DisableVivadoTiming"
"SkipTCL" "SkipTCL"
"ShowWarnings"
"ShowInfo"
"GrepEWI"
</group> </group>
<group name="TCL commands"> <group name="TCL commands">
"PreTCL" "PreTCL"
......
...@@ -45,27 +45,10 @@ ...@@ -45,27 +45,10 @@
<parameter id="SkipTCL" label="Skip TCL commands" tooltip="Do not run pre-timing summary TCL commands" <parameter id="SkipTCL" label="Skip TCL commands" tooltip="Do not run pre-timing summary TCL commands"
default="false" type= "Boolean" format="None"/> default="false" type= "Boolean" format="None"/>
<!--
<parameter id="SkipTCL" label="Skip TCL commands" tooltip="Do not run pre-timing summary TCL commands" <parameter id="SkipTCL" label="Skip TCL commands" tooltip="Do not run pre-timing summary TCL commands"
default="false" type= "Boolean" format="None"/> default="false" type= "Boolean" format="None"/>
<!-- left from synthesis, may need update--> -->
<parameter id="ShowWarnings" label="Parse warnings" tooltip="Parse warning messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="ShowInfo" label="Parse info" tooltip="Parse info messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="PreGrepW" visible="false"
type="String" format="None"
default="?%ShowWarnings=true: |WARNING, "/>
<parameter id="PreGrepI" visible="false"
type="String" format="None"
default="?%ShowInfo=true: |INFO, "/>
<parameter id="GrepEWI" label="Grep filter" tooltip="Calculated grep filter"
default="grep --line-buffered -E 'ERROR%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
visible="true" readonly="true"/>
<parameter id="PreTCL" label="Pre timing summary TCL commands" tooltip="TCL commands to run before timing summary" <parameter id="PreTCL" label="Pre timing summary TCL commands" tooltip="TCL commands to run before timing summary"
type="Stringlist" format="ProgramSyntax" default="" omit="" type="Stringlist" format="ProgramSyntax" default="" omit=""
readonly="false" visible="true" /> readonly="false" visible="true" />
...@@ -134,6 +117,13 @@ ...@@ -134,6 +117,13 @@
<parameter id="Timing"/> <parameter id="Timing"/>
<parameter id="Pwropt"/> <parameter id="Pwropt"/>
<parameter id="OtherProblems"/> <parameter id="OtherProblems"/>
<parameter id="ShowWarnings"/>
<parameter id="ShowInfo"/>
<parameter id="PreGrepW"/>
<parameter id="PreGrepI"/>
<parameter id="GrepEWI"/>
<!-- Invisible (calculated) parameters --> <!-- Invisible (calculated) parameters -->
<!-- same value as %file, but will appear withou "-file" prefix --> <!-- same value as %file, but will appear withou "-file" prefix -->
<parameter id="file" default="%VivadoRemoteDir/%rawfile" visible="false" omit="" type="String" format="Dash"/> <parameter id="file" default="%VivadoRemoteDir/%rawfile" visible="false" omit="" type="String" format="Dash"/>
...@@ -141,9 +131,6 @@ ...@@ -141,9 +131,6 @@
<input> <input>
<group name="General"> <group name="General">
"SkipTCL" "SkipTCL"
"ShowWarnings"
"ShowInfo"
"GrepEWI"
</group> </group>
<group name="TCL commands"> <group name="TCL commands">
"PreTCL" "PreTCL"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
shell="/bin/bash" shell="/bin/bash"
description="Copy unisims library to the project directory"> description="Copy unisims library to the project directory">
<action-menu> <action-menu>
<action label="Copy unisims" resource="" icon="door_in.png" /> <action label="Copy unisims" resource="" icon="copy.png" />
</action-menu> </action-menu>
<input> <input>
<group name="General"> <group name="General">
......
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