Commit 8bd2c99b authored by Andrey Filippov's avatar Andrey Filippov

Working on per-tool defines adn closures

parent b0a62607
......@@ -27,7 +27,9 @@
package com.elphel.vdt;
import java.util.ArrayList;
//import java.util.HashMap;
import java.util.List;
//import java.util.Map;
import com.elphel.vdt.ui.variables.SelectedResourceManager;
import com.elphel.vdt.veditor.VerilogPlugin;
......@@ -185,25 +187,53 @@ public class VerilogUtils {
return outlineDatabase.getClosureSorted(topFiles);
} // getDependencies()
public static IFile[] getDependencies(IFile topFile) {
return getDependencies(new IFile [] {topFile});
public static IFile[] getDependencies(IFile topFile, String toolDefine) {
/// System.out.println("===VerilogUtils.getDependencies("+topFile+")");
IProject project = topFile.getProject();
if (toolDefine != null) {
OutlineDatabase outlineDatabase=new OutlineDatabase(project); // new OutlineDatabase just for this scan
outlineDatabase.scanFilesWithDefine(topFile,toolDefine);
// System.out.println("-->>>VerilogUtils.getDependencies number of files="+outlineDatabase.getDatabaseFileList().length);
// for (int i=0; i<outlineDatabase.getDatabaseFileList().length; i++){
// System.out.println(i+": "+outlineDatabase.getDatabaseFileList()[i]);
// }
IFile[] topFiles = {topFile};
return outlineDatabase.getClosureSorted(topFiles);
} else {
/// System.out.println("===---VerilogUtils.getDependencies("+topFile+") - using editor depends");
return getDependencies(new IFile [] {topFile});
}
}
/**
* Returns included files dependency closure for given verilog file.
*/
public static IFile[] getIncludedDependencies(IFile topFile, String toolDefine) {
// System.out.println("===VerilogUtils.getIncludedDependencies("+topFile+", "+toolDefine+")");
IProject project = topFile.getProject();
if (toolDefine != null) {
OutlineDatabase outlineDatabase=new OutlineDatabase(project); // new OutlineDatabase just for this scan
outlineDatabase.scanFilesWithDefine(topFile,toolDefine);
// System.out.println("-->>>VerilogUtils.getDependencies number of files="+outlineDatabase.getDatabaseFileList().length);
// for (int i=0; i<outlineDatabase.getDatabaseFileList().length; i++){
// System.out.println(i+": "+outlineDatabase.getDatabaseFileList()[i]);
// }
IFile[] topFiles = {topFile};
return outlineDatabase.getClosureIncludes(topFiles);
} else {
return getIncludedDependencies(new IFile [] {topFile});
}
}
public static IFile[] getIncludedDependencies(IFile [] topFiles) {
if (topFiles==null) return null;
IProject project = topFiles[0].getProject();
OutlineDatabase outlineDatabase=getVeditorOutlineDatabase(project);
return outlineDatabase.getCLosureIncludes(topFiles);
return outlineDatabase.getClosureIncludes(topFiles);
} // getDependencies()
public static IFile[] getIncludedDependencies(IFile topFile) {
return getIncludedDependencies(new IFile [] {topFile});
}
/* for now all modules, including library ones */
public static OutlineElement[] getModuleListVeditor(IProject project) {
......
......@@ -66,7 +66,7 @@ import com.elphel.vdt.ui.MessageUI;
import com.elphel.vdt.ui.dialogs.PackageLocationDialog;
import com.elphel.vdt.ui.dialogs.ToolLocationDialog;
import com.elphel.vdt.ui.preferences.PreferencePage;
import com.elphel.vdt.ui.views.DesignFlowView;
//import com.elphel.vdt.ui.views.DesignFlowView;
/**
* Support for launching verilog development tools programmatically.
......@@ -133,9 +133,10 @@ public class LaunchCore {
public static void updateLaunchConfiguration( ILaunchConfigurationWorkingCopy workingCopy
, Tool tool ) throws CoreException
{
for (Iterator i = tool.getParams().iterator(); i.hasNext(); ) {
Parameter param = (Parameter)i.next();
{
for (Iterator<Parameter> i = tool.getParams().iterator(); i.hasNext(); ) {
Parameter param = i.next();
String valueAttrName = LaunchCore.getValueAttributeName(param);
if(param.getType().isList())
......@@ -158,7 +159,8 @@ public class LaunchCore {
workingCopy.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, true);
} // updateLaunchConfiguration()
public static void updateContextOptions(Tool tool, IProject project) throws ToolException, CoreException {
public static void updateContextOptions(Tool tool, IProject project) throws ToolException, CoreException {
tool.setTreeReparse(true);
PackageContext packageContext = tool.getParentPackage();
if (packageContext != null) {
OptionsCore.doLoadContextOptions(packageContext);
......
......@@ -144,13 +144,14 @@ public class VDTLaunchUtil {
*/
// public static List<String> getArguments(ILaunchConfiguration configuration) throws CoreException {
public static BuildParamsItem[] getArguments(ILaunchConfiguration configuration) throws CoreException {
Tool tool = obtainTool(configuration);
Tool tool = obtainTool(configuration);
tool.setTreeReparse(true);
// Replaces tool parameter values with the ones passed through configuration, then uses tool.buildParams;
// that causes conflicts in multi-threaded operation. Or is it just a working copy?
for (Iterator i = tool.getParams().iterator(); i.hasNext(); ) {
Parameter param = (Parameter)i.next();
for (Iterator<Parameter> i = tool.getParams().iterator(); i.hasNext(); ) {
Parameter param = i.next();
String valueAttrName = LaunchCore.getValueAttributeName(param); // "ATTR_VALUE_" + toolParameter.getID();
try {
if(param.getType().isList()) {
......@@ -169,8 +170,8 @@ public class VDTLaunchUtil {
try {
String location = getWorkingDirectory(configuration);
tool.setWorkingDirectory(location);
tool.setWorkingDirectory(location);
BuildParamsItem[] paramItemsArray = tool.buildParams();
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_LAUNCHING)) {
System.out.println("called tool.buildParams() here (from VDTLaunchUtils.java)");
......@@ -204,7 +205,17 @@ public class VDTLaunchUtil {
Tool tool = obtainTool(configuration);
return tool.getName();
}
public static String getToolDefine(ILaunchConfiguration configuration) throws CoreException {
Tool tool = obtainTool(configuration);
return tool.getDefine();
}
public static String getToolTopFile(ILaunchConfiguration configuration) throws CoreException {
Tool tool = obtainTool(configuration);
return tool.getTopFile();
}
public static String getPatternWarnings(ILaunchConfiguration configuration) throws CoreException {
Tool tool = obtainTool(configuration);
......@@ -249,7 +260,7 @@ public class VDTLaunchUtil {
// return resources;
// return parseVerilogFile(resource);
if (resource instanceof IFile) {
List<String> resourcesLocation = getVerilogFileDependencies((IFile)resource);
List<String> resourcesLocation = getVerilogFileDependencies((IFile)resource, getToolDefine(configuration));
// resourcesLocation.add(resource.getLocation().toOSString());
return resourcesLocation;
}
......@@ -258,13 +269,13 @@ public class VDTLaunchUtil {
return null;
} // getResources()
private static List<String> getVerilogFileDependencies(IFile file) throws CoreException {
private static List<String> getVerilogFileDependencies(IFile file, String toolDefine) throws CoreException {
// StackTraceElement frame = new Exception().getStackTrace()[0];
// System.out.println("*** Broken core/tools/generators in "+frame.getFileName()+":"+frame.getLineNumber());
// return null;
IFile[] dependencies = VerilogUtils.getDependencies(file);
IFile[] dependencies = VerilogUtils.getDependencies(file, toolDefine);
List<String> dependenciesLocation = new ArrayList<String>();
if(dependencies != null) {
......@@ -273,7 +284,7 @@ public class VDTLaunchUtil {
// System.out.println(" "+dependencies[i].getName());
}
}
dependencies = VerilogUtils.getIncludedDependencies(file);
dependencies = VerilogUtils.getIncludedDependencies(file, toolDefine);
if(dependencies != null) {
for (int i=0; i < dependencies.length; i++) {
dependenciesLocation.add(dependencies[i].getLocation().toOSString());
......
......@@ -146,7 +146,10 @@ public class XMLConfig extends Config {
static final String CONTEXT_TOOL_AUTOSAVE = "autosave"; // Parameter name of boolean type that controls automatic save after success
static final String CONTEXT_TOOL_ABSTRACT = "abstract"; // true for the prototype tools used only for inheritance by others
static final String CONTEXT_TOOL_PRIORITY = "priority"; // lower the value, first to run among otherwise equivalent report tools (taht do not change state)
static final String CONTEXT_TOOL_TOP_FILE = "top-file"; // Top file for this tool
static final String CONTEXT_TOOL_DEFINE = "define"; // Tool-specific define used to resolve dependencies
static final String CONTEXT_LINEBLOCK_TAG = "line";
static final String CONTEXT_LINEBLOCK_NAME_ATTR = "name";
......@@ -664,6 +667,8 @@ public class XMLConfig extends Config {
String priorityString = getAttributeValue(contextNode, CONTEXT_TOOL_PRIORITY);
String topFile = getAttributeValue(contextNode, CONTEXT_TOOL_TOP_FILE);
String toolDefine = getAttributeValue(contextNode, CONTEXT_TOOL_DEFINE);
double priority=Double.NaN;;
if (priorityString!=null){
......@@ -734,7 +739,9 @@ public class XMLConfig extends Config {
saveString,
autoSaveString,
isAbstract,
priority,
priority,
topFile,
toolDefine,
null,
null,
null);
......
......@@ -67,13 +67,13 @@ public abstract class Context {
protected List<CommandLinesBlock> commandLinesBlocks;
protected List<ParamGroup> visibleParamGroups = new ArrayList<ParamGroup>();
protected Config config;
protected boolean needsReparse;
private StringConditionParser conditionParser = new StringConditionParser(this);
private List<String> createdControlFiles = new ArrayList<String>();
private boolean initialized = false;
private String workingDirectory;
private String version;
private Context context=null;
// private Context context=null;
private int currentHash; // calculated during buildparam from non-parser command blocks and command files.
protected Context(String name,
String controlInterfaceName,
......@@ -91,8 +91,18 @@ public abstract class Context {
this.commandLinesBlocks = commandLinesBlocks;
this.inputDialogLabel = inputDialogLabel;
this.paramGroups = paramGroups;
this.paramContainer = new ParameterContainer(params);
this.paramContainer = new ParameterContainer(params);
this.needsReparse = false;
}
// Tree needed to be reparsed for closure rebuild (slow)
public boolean needsTreeReparse(){
return needsReparse;
}
public void setTreeReparse(boolean needsReparse){
// System.out.println("Tool.setTreeReparse("+needsReparse+") - "+getName());
this.needsReparse = needsReparse;
}
/**
* Generated hashcode for the last run of buildParams() - includes command files and non-parser command lines
......
......@@ -76,24 +76,34 @@ public class FilteredIncludesListGenerator extends AbstractGenerator {
protected String[] getStringValues() {
String ignoreFilter= SelectedResourceManager.getDefault().getFilter(); // old version
// System.out.println("FilteredIncludesListGenerator(), tool0="+((tool0==null)?null:(tool0.getName()+tool0.getIgnoreFilter())));
// System.out.print("FilteredIncludesListGenerator(): ");
String topFile = null;
String toolDefine = null;
if (topProcessor!=null){
Tool tool=topProcessor.getCurrentTool();
// System.out.println(", tool="+tool+" tool name="+((tool!=null)?tool.getName():null));
if (tool != null) {
ignoreFilter=tool.getIgnoreFilter();
// System.out.println(" tool="+tool.getName()+", ignoreFilter="+ignoreFilter);
topFile = tool.getTopFile();
toolDefine = tool.getDefine();
} else {
System.out.println("FilteredIncludesListGenerator(): topProcessor.getCurrentTool() is null");
}
if ((toolDefine == null) || (toolDefine == "")) {
if ((topFile == null ) || (topFile == "")) toolDefine = null; // no need to reparse tree for this tool
else toolDefine = ""; // reparse for this tool - top file may have different defines
}
if (!tool.needsTreeReparse()) toolDefine = null;
} else {
System.out.println("FilteredIncludesListGenerator(): topProcessor is null");
}
String[] file_names = null;
IResource resource = SelectedResourceManager.getDefault().getChosenVerilogFile();
if ((topFile != null) && (topFile !="") && (resource !=null)) {
IResource resource1 = resource.getProject().getFile(topFile);
if ((resource1 != null) && (resource1.getType() == IResource.FILE)){
resource = resource1;
// System.out.println("resource1="+resource1);
}
}
Pattern ignorePattern = null;
if (ignoreFilter!=null){
try {
......@@ -105,7 +115,7 @@ public class FilteredIncludesListGenerator extends AbstractGenerator {
}
if (resource != null && resource.getType() == IResource.FILE) {
IFile[] files = VerilogUtils.getIncludedDependencies((IFile)resource); // returned just the same x353_1.tf
IFile[] files = VerilogUtils.getIncludedDependencies((IFile)resource, toolDefine); // returned just the same x353_1.tf
List<String> fileList=new ArrayList<String>();
for (int i=0; i < files.length; i++) {
String fileName=files[i].getProjectRelativePath().toOSString(); //.getName();
......
......@@ -68,6 +68,7 @@ public class FilteredSourceListGenerator extends AbstractGenerator {
FormatProcessor topProcessor)
{
super(prefix, suffix, separator, topProcessor );
// System.out.println("FilteredSourceListGenerator( "+prefix+","+suffix+", "+separator+",.prefix..)");
}
public String getName() {
......@@ -76,16 +77,22 @@ public class FilteredSourceListGenerator extends AbstractGenerator {
protected String[] getStringValues() {
String ignoreFilter= SelectedResourceManager.getDefault().getFilter(); // old version
// System.out.println("FilteredSourceListGenerator(), tool0="+((tool0==null)?null:(tool0.getName()+tool0.getIgnoreFilter())));
// System.out.print("FilteredSourceListGenerator(): ");
String topFile = null;
String toolDefine = null;
if (topProcessor!=null){
Tool tool=topProcessor.getCurrentTool();
// System.out.println(", tool="+tool+" tool name="+((tool!=null)?tool.getName():null));
if (tool != null) {
ignoreFilter=tool.getIgnoreFilter();
// System.out.println(" tool="+tool.getName()+", ignoreFilter="+ignoreFilter);
// System.out.println("FilteredSourceListGenerator().getStringValue(): tool="+tool.getName()+", ignoreFilter="+ignoreFilter);
topFile = tool.getTopFile();
toolDefine = tool.getDefine();
if ((toolDefine == null) || (toolDefine == "")) {
if ((topFile == null ) || (topFile == "")) toolDefine = null; // no need to reparse tree for this tool
else toolDefine = ""; // reparse for this tool - top file may have different defines
}
if (!tool.needsTreeReparse()) toolDefine = null;
// System.out.println("topFile="+topFile+ " toolDefine="+toolDefine);
} else {
System.out.println("FilteredSourceListGenerator(): topProcessor.getCurrentTool() is null");
}
......@@ -94,6 +101,13 @@ public class FilteredSourceListGenerator extends AbstractGenerator {
}
String[] file_names = null;
IResource resource = SelectedResourceManager.getDefault().getChosenVerilogFile();
if ((topFile != null) && (topFile !="") && (resource !=null)) {
IResource resource1 = resource.getProject().getFile(topFile);
if ((resource1 != null) && (resource1.getType() == IResource.FILE)){
resource = resource1;
// System.out.println("resource1="+resource1);
}
}
Pattern ignorePattern = null;
if (ignoreFilter!=null){
try {
......@@ -104,8 +118,10 @@ public class FilteredSourceListGenerator extends AbstractGenerator {
}
}
if (resource != null && resource.getType() == IResource.FILE) {
IFile[] files = VerilogUtils.getDependencies((IFile)resource); // returned just the same x353_1.tf
IFile[] files = VerilogUtils.getDependencies((IFile)resource, toolDefine); // returned just the same x353_1.tf
// System.out.println("FilteredSourceListGenerator(): resource = "+resource);
List<String> fileList=new ArrayList<String>();
for (int i=0; i < files.length; i++) {
String fileName=files[i].getProjectRelativePath().toOSString(); //.getName();
......
......@@ -31,8 +31,10 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
//import com.elphel.vdt.VDT;
import com.elphel.vdt.VerilogUtils;
import com.elphel.vdt.core.tools.params.Tool;
//import com.elphel.vdt.core.verilog.VerilogUtils;
import com.elphel.vdt.ui.variables.SelectedResourceManager;
......@@ -61,11 +63,21 @@ public class IncludesListGenerator extends AbstractGenerator {
}
protected String[] getStringValues() {
String[] file_names = null;
String[] file_names = null;
String toolName = null;
if (topProcessor!=null){
Tool tool=topProcessor.getCurrentTool();
if (tool != null) toolName=tool.getName();
}
// IResource resource = SelectedResourceManager.getDefault().getSelectedVerilogFile();
IResource resource = SelectedResourceManager.getDefault().getChosenVerilogFile();
if (resource != null && resource.getType() == IResource.FILE) {
IFile[] files = VerilogUtils.getDependencies((IFile)resource); // returned just the same x353_1.tf
if (resource != null && resource.getType() == IResource.FILE) {
// Should it be
// IFile[] files = VerilogUtils.getIncludedDependencies((IFile)resource); // returned just the same x353_1.tf
IFile[] files = VerilogUtils.getDependencies((IFile)resource, toolName); // returned just the same x353_1.tf
file_names = new String[files.length];
for (int i=0; i < files.length; i++)
file_names[i] = files[i].getProjectRelativePath().toOSString(); //.getName();
......
......@@ -32,7 +32,8 @@ import org.eclipse.core.resources.IResource;
//import com.elphel.vdt.VDT;
import com.elphel.vdt.VerilogUtils;
import com.elphel.vdt.VerilogUtils;
import com.elphel.vdt.core.tools.params.Tool;
//import com.elphel.vdt.core.verilog.VerilogUtils;
import com.elphel.vdt.ui.variables.SelectedResourceManager;
......@@ -63,9 +64,15 @@ public class SourceListGenerator extends AbstractGenerator {
protected String[] getStringValues() {
String[] file_names = null;
// IResource resource = SelectedResourceManager.getDefault().getSelectedVerilogFile();
IResource resource = SelectedResourceManager.getDefault().getChosenVerilogFile();
IResource resource = SelectedResourceManager.getDefault().getChosenVerilogFile();
String toolName = null;
if (topProcessor!=null){
Tool tool=topProcessor.getCurrentTool();
if (tool != null) toolName=tool.getName();
}
if (resource != null && resource.getType() == IResource.FILE) {
IFile[] files = VerilogUtils.getDependencies((IFile)resource); // returned just the same x353_1.tf
IFile[] files = VerilogUtils.getDependencies((IFile)resource, toolName); // returned just the same x353_1.tf
file_names = new String[files.length];
for (int i=0; i < files.length; i++)
file_names[i] = files[i].getProjectRelativePath().toOSString(); //.getName();
......
......@@ -28,12 +28,12 @@ package com.elphel.vdt.core.tools.params;
import java.util.*;
import java.io.*;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.ui.IMemento;
import com.elphel.vdt.VDT;
import com.elphel.vdt.core.launching.ToolLogFile;
import com.elphel.vdt.core.options.OptionsCore;
......@@ -160,7 +160,10 @@ public class Tool extends Context implements Cloneable, Inheritable {
private TOOL_MODE lastRunMode; // last running (not STOP) mode
private int lastRunHash; // hash code of the last run
private ToolWaitingArguments toolWaitingArguments; // save here launch parameters when tool need to wait for other tools to run/get restored
private double priority; // the lower the earlier tool will run among those with the same dependencies
private double priority; // the lower the earlier tool will run among those with the same dependencies
private String topFile; // Tool-specific project top file (may be different for different tools)
private String toolDefine; // Tool-specific define that may be used to distinguish for closure
private static void DEBUG_PRINT(String msg){
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_TOOL_SEQUENCE)) {
System.out.println(msg);
......@@ -192,7 +195,11 @@ public class Tool extends Context implements Cloneable, Inheritable {
String saveString, // name of tool that saves the state of this tool run
String autoSaveString, // name of boolean that turns on/off auto-save after the tool run
boolean abstractTool,
double priority,
double priority,
String topFile,
String toolDefine,
/* never used ??? */
List<Parameter> params,
List<ParamGroup> paramGroups,
......@@ -233,8 +240,12 @@ public class Tool extends Context implements Cloneable, Inheritable {
this.saveString= saveString; // name of tool that saves the state of this tool run
this.autoSaveString= autoSaveString; // name of boolean that turns on/off auto-save after the tool run
this.abstractTool= abstractTool;
this.priority = priority;
this.priority = priority;
this.topFile = topFile;
this.toolDefine = toolDefine;
disabled=null;
restoreTool=null;
result=null;
......@@ -559,7 +570,11 @@ public class Tool extends Context implements Cloneable, Inheritable {
if (restoreString== null) restoreString = baseTool.restoreString;
if (saveString== null) saveString = baseTool.saveString;
if (autoSaveString== null) autoSaveString = baseTool.autoSaveString;
// System.out.println("copyBaseAttributes(), tool="+getName());
if (topFile== null) topFile = baseTool.topFile;
if (toolDefine== null) toolDefine = baseTool.toolDefine;
// System.out.println("copyBaseAttributes(), tool="+getName());
if (Double.isNaN(priority)) priority= baseTool.priority;
// What about output lines attributes?
......@@ -656,7 +671,8 @@ public class Tool extends Context implements Cloneable, Inheritable {
}
}
public List<String> getDependFiles(){
DEBUG_PRINT("------ getDependFiles()");
DEBUG_PRINT("------ getDependFiles()");
setTreeReparse(true); // Set actual dependence
if ((dependFiles == null) || (dependFiles.size()==0)) return null;
List<String> list = new ArrayList<String>();
for (Iterator<Parameter> iter= dependFiles.iterator(); iter.hasNext();) {
......@@ -669,6 +685,9 @@ public class Tool extends Context implements Cloneable, Inheritable {
}
// list.addAll(vList);
}
}
for (String item:list){
System.out.println("-----> "+getName()+".getDependFiles()->"+item);
}
return list;
}
......@@ -1334,29 +1353,42 @@ public class Tool extends Context implements Cloneable, Inheritable {
}
return actualActions;
}
// Should be called after getMenuActions to have updateContextOptions() already ran
public String getIgnoreFilter(){ // calculate and get
if (ignoreFilter==null) return null;
FormatProcessor topProcessor=new FormatProcessor(this);
FormatProcessor processor = new FormatProcessor(
new Recognizer[] {
new ContextParamRecognizer(this,topProcessor),
new SimpleGeneratorRecognizer(true,topProcessor) // in menuMode
// new SimpleGeneratorRecognizer(false) // in menuMode
},topProcessor); // null for topFormatProcessor - this generator can not reference other parameters
List<String> results=null;
try {
results=processor.process(ignoreFilter);
} catch (ToolException e) {
return null;
}
if ((results == null) || (results.size()==0)) return null;
return results.get(0);
// Should be called after getMenuActions to have updateContextOptions() already ran
private String parseParameterString(String par){
if (par==null) return null;
FormatProcessor topProcessor=new FormatProcessor(this);
FormatProcessor processor = new FormatProcessor(
new Recognizer[] {
new ContextParamRecognizer(this,topProcessor),
new SimpleGeneratorRecognizer(true,topProcessor) // in menuMode
// new SimpleGeneratorRecognizer(false) // in menuMode
},topProcessor); // null for topFormatProcessor - this generator can not reference other parameters
List<String> results=null;
try {
results=processor.process(par);
} catch (ToolException e) {
return null;
}
if ((results == null) || (results.size()==0)) return null;
return results.get(0);
}
public String getIgnoreFilter(){ // calculate and get
return parseParameterString (this.ignoreFilter);
}
public String getTopFile(){
return parseParameterString (this.topFile);
}
public String getDefine(){
return parseParameterString (this.toolDefine);
}
// private void updateContextOptions (IProject project){
public void updateContextOptions (IProject project){ // public to be able to update parameters before setting "dirty" flags
DEBUG_PRINT("~~~updateContextOptions(project) for tool "+getName());
DEBUG_PRINT("~~~updateContextOptions(project) for tool "+getName());
setTreeReparse(false);
PackageContext packageContext = getParentPackage();
if (packageContext != null) {
OptionsCore.doLoadContextOptions(packageContext);
......@@ -1465,9 +1497,12 @@ public class Tool extends Context implements Cloneable, Inheritable {
return buildParams(false);
}
public BuildParamsItem[] buildParams(boolean dryRun) throws ToolException {
DEBUG_PRINT("buildParams("+dryRun+"): tool "+getName()+" state="+getState()+" dirty="+isDirty()+" hashMatch()="+hashMatch()+" pinned="+isPinned());
public BuildParamsItem[] buildParams(boolean dryRun) throws ToolException {
DEBUG_PRINT("buildParams("+dryRun+"): tool "+getName()+" state="+getState()+" dirty="+isDirty()+" hashMatch()="+hashMatch()+" pinned="+isPinned());
setTreeReparse(!dryRun);
if(parentPackage != null)
parentPackage.buildParams();
......
......@@ -1071,7 +1071,8 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
private int openToolPropertiesDialog(DesignMenuModel.Item item) {
Shell shell = VerilogPlugin.getActiveWorkbenchShell();
Context context = item.getTool();
Context context = item.getTool();
context.setTreeReparse(true);
ContextOptionsDialog dialog = new ContextOptionsDialog( shell
, context
, selectedResource.getProject() );
......
......@@ -167,6 +167,19 @@ endmodule
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt; .
*
* Additional permission under GNU GPL version 3 section 7:
* If you modify this Program, or any covered work, by linking or combining it
* with independent modules provided by the FPGA vendor only (this permission
* does not extend to any 3-rd party modules, "soft cores" or macros) under
* different license terms solely for the purpose of generating binary "bitstream"
* files and/or simulating the code, the copyright holders of this Program give
* you the right to distribute the covered work without those independent modules
* as long as the source code for them is available from the FPGA vendor free of
* charge, and there is no dependence on any encrypted modules for simulating of
* the combined code. This permission applies to you if the distributed code
* contains all the components and scripts required to completely simulate it
* with at least one of the Free Software programs.
*******************************************************************************/
`timescale 1ns/1ps
......
......@@ -95,7 +95,10 @@
package="FPGA_package"
interface="IVerilog" errors="(.*):([0-9]+): [a-z_\- ]*error: (.*)"
warnings="(.*):([0-9]+): [a-z_\- ]*warning: (.*)"
info="(.*):([0-9]+): [a-z_\- ]*sorry: (.*)">
info="(.*):([0-9]+): [a-z_\- ]*sorry: (.*)"
top-file="%IcarusTopFile"
define="IVERILOG"
>
<extensions-list>
<extension mask="v" />
......@@ -103,7 +106,7 @@
</extensions-list>
<action-menu>
<action label="Simulate project " resource="%SimulationTopFile"
<action label="Simulate project " resource="%IcarusTopFile"
check-extension="false" check-existence="true" icon="iverilog.ico" />
<action label="Simulate selected" resource="%%SelectedFile"
check-extension="true" check-existence="true" icon="iverilog_pointer.png" />
......@@ -113,6 +116,12 @@
<action label="Just try for" resource="%%OS" /> -->
</action-menu>
<parameter id="IcarusTopFile"
label="Simulation top file" tooltip="IVerilog simulator top file"
default="%SimulationTopFile"
type="String" format="CopyValue" />
<parameter id="Param_Shell_Options" label="Param_Shell_Options"
type="String" format="CopyValue" default="-c" readonly="false"
visible="true" />
......@@ -284,6 +293,7 @@
<input>
<group name="files" label="Files">
<!-- "SimulationTopFile" -->
"IcarusTopFile"
"Param_TopModule"
"TopModulesOther"
"ExtraFiles"
......
......@@ -89,7 +89,9 @@
disable="DisableVivadoSynth"
autosave="AutosaveVivadoSynthesis"
save="SaveVivadoSynthesis"
inherits="VivadoToolPrototype"
inherits="VivadoToolPrototype"
top-file="%VivadoTopFile"
define="%VivadoDefine"
>
<extensions-list>
......@@ -109,6 +111,16 @@
<depends files="FilteredIncludesListPar"/>
<depends files="ConstraintsFiles"/>
</depends-list>
<parameter id="VivadoTopFile"
label="Synthesis top file" tooltip="Synthesis Verilog top file"
default="%ImplementationTopFile"
type="String" format="CopyValue" />
<parameter id="VivadoDefine"
label="Synthesis define" tooltip="`define specific to this tool"
default="VIVADO_SYNTHESIS"
type="String" format="CopyValue" />
<parameter id="ConstraintsFiles" type="Filelist" format="ParamListSyntax"
default="" label="Constraints files" tooltip="Select constraint files to load to Vivado" readonly="false"
......@@ -227,7 +239,9 @@
visible="false" type="Filelist" format="None"/>
<input>
<group name="General">
<group name="General">
"VivadoTopFile"
"VivadoDefine"
"FilteredSourceListPar"
"FilteredIncludesListPar"
"ConstraintsFiles"
......
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