Commit 2e5900c7 authored by Andrey Filippov's avatar Andrey Filippov

Added FilteredSourceListGenerator, continue with communicating to Vivado

parent 3e094d6f
...@@ -119,8 +119,7 @@ public class XMLConfig extends Config { ...@@ -119,8 +119,7 @@ public class XMLConfig extends Config {
static final String CONTEXT_TOOL_SYNTAX_ERRORS = "errors"; static final String CONTEXT_TOOL_SYNTAX_ERRORS = "errors";
static final String CONTEXT_TOOL_SYNTAX_WARNINGS= "warnings"; static final String CONTEXT_TOOL_SYNTAX_WARNINGS= "warnings";
static final String CONTEXT_TOOL_SYNTAX_INFO = "info"; static final String CONTEXT_TOOL_SYNTAX_INFO = "info";
static final String CONTEXT_TOOL_IGNORE_FILTER = "ignore"; // file path regular expression to remove libraries from source list
static final String CONTEXT_LINEBLOCK_TAG = "line"; static final String CONTEXT_LINEBLOCK_TAG = "line";
static final String CONTEXT_LINEBLOCK_NAME_ATTR = "name"; static final String CONTEXT_LINEBLOCK_NAME_ATTR = "name";
...@@ -585,6 +584,7 @@ public class XMLConfig extends Config { ...@@ -585,6 +584,7 @@ public class XMLConfig extends Config {
String toolErrors = getAttributeValue(contextNode, CONTEXT_TOOL_SYNTAX_ERRORS); String toolErrors = getAttributeValue(contextNode, CONTEXT_TOOL_SYNTAX_ERRORS);
String toolWarnings = getAttributeValue(contextNode, CONTEXT_TOOL_SYNTAX_WARNINGS); String toolWarnings = getAttributeValue(contextNode, CONTEXT_TOOL_SYNTAX_WARNINGS);
String toolInfo = getAttributeValue(contextNode, CONTEXT_TOOL_SYNTAX_INFO); String toolInfo = getAttributeValue(contextNode, CONTEXT_TOOL_SYNTAX_INFO);
String ignoreFilter = getAttributeValue(contextNode, CONTEXT_TOOL_IGNORE_FILTER);
boolean isShell=false; boolean isShell=false;
if (toolShell != null){ if (toolShell != null){
...@@ -625,6 +625,7 @@ public class XMLConfig extends Config { ...@@ -625,6 +625,7 @@ public class XMLConfig extends Config {
toolWarnings, toolWarnings,
toolInfo, toolInfo,
toolRunfor, toolRunfor,
ignoreFilter,
null, null,
null, null,
null); null);
......
/*******************************************************************************
* Copyright (c) 2006 Elphel, Inc and Excelsior, LLC.
* This file is a part of Eclipse/VDT plug-in.
* Eclipse/VDT plug-in is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* Eclipse/VDT plug-in is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with Eclipse VDT plug-in; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*******************************************************************************/
package com.elphel.vdt.core.tools.generators;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
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.ui.MessageUI;
//import com.elphel.vdt.core.verilog.VerilogUtils;
import com.elphel.vdt.ui.variables.SelectedResourceManager;
/**
* Generate the file name list of dependency closure for last selected
* verilog source file.
*
* Created: 21.02.2006
* @author Lvov Konstantin
*/
public class FilteredSourceListGenerator extends AbstractGenerator {
// public static final String NAME = VDT.GENERATOR_ID_FILTEREDSOURCE_LIST;
public static final String NAME = "FilteredSourceList";
public FilteredSourceListGenerator(String prefix,
String suffix,
String separator)
{
super(prefix, suffix, separator);
}
public String getName() {
return NAME;
}
protected String[] getStringValues() {
String[] file_names = null;
IResource resource = SelectedResourceManager.getDefault().getChosenVerilogFile();
String ignoreFilter= SelectedResourceManager.getDefault().getFilter();
Pattern ignorePattern = null;
if (ignoreFilter!=null){
try {
ignorePattern=Pattern.compile(ignoreFilter);
} catch (PatternSyntaxException e){
System.out.println("Error in regular expression for ignore filter: \""+ignoreFilter+"\" - ignoring");
MessageUI.error("Error in regular expression for ignore filter: \""+ignoreFilter+"\" - ignoring");
}
}
if (resource != null && resource.getType() == IResource.FILE) {
IFile[] files = VerilogUtils.getDependencies((IFile)resource); // 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();
if ((ignorePattern!=null) &&ignorePattern.matcher(fileName).matches()) {
continue;
}
fileList.add(fileName);
}
file_names=fileList.toArray(new String[0]);
} else {
fault("There is no selected project");
}
return file_names;
}
} // class FilteredSourceListGenerator
...@@ -181,6 +181,9 @@ public class Parameter implements Cloneable, Updateable { ...@@ -181,6 +181,9 @@ public class Parameter implements Cloneable, Updateable {
} }
// this.type = context.getControlInterface().findParamType(typeName); // this.type = context.getControlInterface().findParamType(typeName);
if (this.context.getControlInterface()==null){
throw new ConfigException(contextInfo + ": Interface of the context is absent in "+sourceXML);
}
this.type = this.context.getControlInterface().findParamType(typeName); this.type = this.context.getControlInterface().findParamType(typeName);
if(this.type == null) if(this.type == null)
......
...@@ -46,10 +46,10 @@ public class Tool extends Context implements Cloneable, Inheritable { ...@@ -46,10 +46,10 @@ public class Tool extends Context implements Cloneable, Inheritable {
private String toolWarnings; private String toolWarnings;
private String toolInfo; private String toolInfo;
private List<String> extensions; private List<String> extensions;
private List<RunFor> runfor; private List<RunFor> runfor;
private int choice; // selected variant for runfor private int choice; // selected variant for runfor
private String ignoreFilter;
private Tool baseTool; private Tool baseTool;
...@@ -78,6 +78,7 @@ public class Tool extends Context implements Cloneable, Inheritable { ...@@ -78,6 +78,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
String toolWarnings, String toolWarnings,
String toolInfo, String toolInfo,
List<RunFor> runfor, List<RunFor> runfor,
String ignoreFilter,
/* never used ??? */ /* never used ??? */
List<Parameter> params, List<Parameter> params,
List<ParamGroup> paramGroups, List<ParamGroup> paramGroups,
...@@ -92,6 +93,7 @@ public class Tool extends Context implements Cloneable, Inheritable { ...@@ -92,6 +93,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
paramGroups, paramGroups,
commandLinesBlocks); commandLinesBlocks);
this.runfor=runfor; // should it be cloned? this.runfor=runfor; // should it be cloned?
this.ignoreFilter= ignoreFilter;
this.baseToolName = baseToolName; this.baseToolName = baseToolName;
this.label = label; this.label = label;
this.parentPackageName = parentPackageName; this.parentPackageName = parentPackageName;
...@@ -135,7 +137,8 @@ public class Tool extends Context implements Cloneable, Inheritable { ...@@ -135,7 +137,8 @@ public class Tool extends Context implements Cloneable, Inheritable {
public int getChoice(){ public int getChoice(){
return choice; return choice;
} }
public void setChoice(int choice){
public void setChoice(int choice){
this.choice=choice; this.choice=choice;
} }
...@@ -312,6 +315,24 @@ public class Tool extends Context implements Cloneable, Inheritable { ...@@ -312,6 +315,24 @@ public class Tool extends Context implements Cloneable, Inheritable {
} }
return actualActions; return actualActions;
} }
// Should be called after getMenuActions to have updateContextOptions() already ran
public String getIgnoreFilter(){ // calculate and get
if (ignoreFilter==null) return null;
FormatProcessor processor = new FormatProcessor(
new Recognizer[] {
new ContextParamRecognizer(this),
new SimpleGeneratorRecognizer(true) // in menuMode
// new SimpleGeneratorRecognizer(false) // in menuMode
});
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);
}
private void updateContextOptions (IProject project){ private void updateContextOptions (IProject project){
PackageContext packageContext = getParentPackage(); PackageContext packageContext = getParentPackage();
......
...@@ -19,6 +19,7 @@ package com.elphel.vdt.core.tools.params.recognizers; ...@@ -19,6 +19,7 @@ package com.elphel.vdt.core.tools.params.recognizers;
import com.elphel.vdt.core.tools.generators.AbstractGenerator; import com.elphel.vdt.core.tools.generators.AbstractGenerator;
import com.elphel.vdt.core.tools.generators.FileListGenerator; import com.elphel.vdt.core.tools.generators.FileListGenerator;
import com.elphel.vdt.core.tools.generators.FilteredSourceListGenerator;
import com.elphel.vdt.core.tools.generators.SourceListGenerator; import com.elphel.vdt.core.tools.generators.SourceListGenerator;
import com.elphel.vdt.core.tools.generators.TopModulesNameGenerator; import com.elphel.vdt.core.tools.generators.TopModulesNameGenerator;
import com.elphel.vdt.core.tools.generators.ValueGenerator; import com.elphel.vdt.core.tools.generators.ValueGenerator;
...@@ -40,7 +41,9 @@ public class ParamRepeaterRecognizer extends RepeaterRecognizer { ...@@ -40,7 +41,9 @@ public class ParamRepeaterRecognizer extends RepeaterRecognizer {
if(genName.equals(ParamFormatRecognizer.FORMAT_PARAM_VALUE_MARK)) if(genName.equals(ParamFormatRecognizer.FORMAT_PARAM_VALUE_MARK))
return new ValueGenerator(param, repPrefix, repSuffix, separator); return new ValueGenerator(param, repPrefix, repSuffix, separator);
/* Trying to put these here */ /* Trying to put these here */
if(genName.equals(SourceListGenerator.NAME)) if(genName.equals(FilteredSourceListGenerator.NAME))
return new FilteredSourceListGenerator(repPrefix, repSuffix, separator);
else if(genName.equals(SourceListGenerator.NAME))
return new SourceListGenerator(repPrefix, repSuffix, separator); return new SourceListGenerator(repPrefix, repSuffix, separator);
else if(genName.equals(FileListGenerator.NAME)) else if(genName.equals(FileListGenerator.NAME))
return new FileListGenerator(repPrefix, repSuffix, separator); return new FileListGenerator(repPrefix, repSuffix, separator);
......
...@@ -21,6 +21,7 @@ import com.elphel.vdt.core.Utils; ...@@ -21,6 +21,7 @@ import com.elphel.vdt.core.Utils;
import com.elphel.vdt.core.tools.params.ToolException; import com.elphel.vdt.core.tools.params.ToolException;
import com.elphel.vdt.core.tools.generators.AbstractGenerator; import com.elphel.vdt.core.tools.generators.AbstractGenerator;
import com.elphel.vdt.core.tools.generators.FileListGenerator; import com.elphel.vdt.core.tools.generators.FileListGenerator;
import com.elphel.vdt.core.tools.generators.FilteredSourceListGenerator;
import com.elphel.vdt.core.tools.generators.TopModulesNameGenerator; import com.elphel.vdt.core.tools.generators.TopModulesNameGenerator;
import com.elphel.vdt.core.tools.generators.SourceListGenerator; import com.elphel.vdt.core.tools.generators.SourceListGenerator;
...@@ -102,7 +103,9 @@ public class RepeaterRecognizer implements Recognizer { ...@@ -102,7 +103,9 @@ public class RepeaterRecognizer implements Recognizer {
String separator) String separator)
{ {
System.out.println("Ever get here? RepeaterRecognizer.java:findGenerator()"); System.out.println("Ever get here? RepeaterRecognizer.java:findGenerator()");
AbstractGenerator gen=new SourceListGenerator(repPrefix, repSuffix, separator); AbstractGenerator gen=new FilteredSourceListGenerator(repPrefix, repSuffix, separator);
if (genName.equals(gen.getName())) return gen;
gen=new SourceListGenerator(repPrefix, repSuffix, separator);
if (genName.equals(gen.getName())) return gen; if (genName.equals(gen.getName())) return gen;
gen=new FileListGenerator(repPrefix, repSuffix, separator); gen=new FileListGenerator(repPrefix, repSuffix, separator);
if (genName.equals(gen.getName())) return gen; if (genName.equals(gen.getName())) return gen;
......
...@@ -20,6 +20,7 @@ package com.elphel.vdt.ui.variables; ...@@ -20,6 +20,7 @@ package com.elphel.vdt.ui.variables;
import java.util.Stack; import java.util.Stack;
import com.elphel.vdt.VerilogUtils; import com.elphel.vdt.VerilogUtils;
import com.elphel.vdt.core.tools.params.Tool;
import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
...@@ -68,6 +69,8 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe ...@@ -68,6 +69,8 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe
private IResource fChosenVerilogFile = null; // to keep fSelectedVerilogFile private IResource fChosenVerilogFile = null; // to keep fSelectedVerilogFile
private int fChosenAction=0; // Chosen variant of running the tool private int fChosenAction=0; // Chosen variant of running the tool
private long timestamp=0; private long timestamp=0;
private String ignoreFilter=null;
// private Tool selectedTool=null; // last selected tool
// //
private SelectedResourceManager() { private SelectedResourceManager() {
IWorkbench workbench = PlatformUI.getWorkbench(); IWorkbench workbench = PlatformUI.getWorkbench();
...@@ -245,9 +248,10 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe ...@@ -245,9 +248,10 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe
return path.substring(project.getLocation().toString().length()+1); return path.substring(project.getLocation().toString().length()+1);
return path; return path;
} }
public void updateActionChoice(String chosenTarget, int choice){ public void updateActionChoice(String chosenTarget, int choice, String ignoreFilter){
fChosenAction=choice; fChosenAction=choice;
fChosenTarget=tryRelativePath(chosenTarget); fChosenTarget=tryRelativePath(chosenTarget);
this.ignoreFilter=ignoreFilter;
IProject project=getSelectedProject(); IProject project=getSelectedProject();
if (project==null) return; if (project==null) return;
IPath path = new Path(fChosenTarget); IPath path = new Path(fChosenTarget);
...@@ -292,6 +296,14 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe ...@@ -292,6 +296,14 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe
public int getChosenAction() { public int getChosenAction() {
return fChosenAction; return fChosenAction;
} }
// public Tool getSelectedTool(){
// return selectedTool;
// }
public String getFilter(){
return ignoreFilter;
}
......
...@@ -484,10 +484,12 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { ...@@ -484,10 +484,12 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
// RunFor[] getMenuActions() // RunFor[] getMenuActions()
RunFor [] runFor=null; RunFor [] runFor=null;
Tool tool=null; Tool tool=null;
String ignoreFilter=null;
if (selectedItem != null){ if (selectedItem != null){
tool= selectedItem.getTool(); tool= selectedItem.getTool();
if (tool!=null){ if (tool!=null){
runFor=tool.getMenuActions(project); runFor=tool.getMenuActions(project);
ignoreFilter=tool.getIgnoreFilter(); // should be after getMenuActions(project) that recalculates parameters
tool.initIcons(false); // if not done before - add icons list for actions tool.initIcons(false); // if not done before - add icons list for actions
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) { if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) {
System.out.println("Got Runfor["+((runFor!=null)?runFor.length:"null")+"]"); System.out.println("Got Runfor["+((runFor!=null)?runFor.length:"null")+"]");
...@@ -555,10 +557,12 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { ...@@ -555,10 +557,12 @@ 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;
launchActions[i] = new Action() { launchActions[i] = new Action() {
public void run() { public void run() {
try { try {
launchTool(selectedItem,finalI,fFullPath); launchTool(selectedItem,finalI,fFullPath,fIgnoreFilter);
} catch (Exception e) { } catch (Exception e) {
MessageUI.error( Txt.s("Action.ToolLaunch.Error", MessageUI.error( Txt.s("Action.ToolLaunch.Error",
new String[] {selectedItem.getLabel(), e.getMessage()}) new String[] {selectedItem.getLabel(), e.getMessage()})
...@@ -632,11 +636,11 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { ...@@ -632,11 +636,11 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
clearToolPropertiesAction.setEnabled(enabled); clearToolPropertiesAction.setEnabled(enabled);
} // updateLaunchAction() } // updateLaunchAction()
private void launchTool(DesignMenuModel.Item item, int choice, String fullPath) throws CoreException { private void launchTool(DesignMenuModel.Item item, int choice, String fullPath, String ignoreFilter) throws CoreException {
Tool tool = selectedItem.getTool(); Tool tool = selectedItem.getTool();
if (tool != null) { if (tool != null) {
tool.setChoice(0); tool.setChoice(0);
SelectedResourceManager.getDefault().updateActionChoice(fullPath, choice); // Andrey SelectedResourceManager.getDefault().updateActionChoice(fullPath, choice, ignoreFilter); // Andrey
SelectedResourceManager.getDefault().setBuildStamp(); // Andrey SelectedResourceManager.getDefault().setBuildStamp(); // Andrey
LaunchCore.launch( tool LaunchCore.launch( tool
, selectedResource.getProject() , selectedResource.getProject()
......
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
<!-- Syntax definitions --> <!-- Syntax definitions -->
<syntax name="None" format="" /> <syntax name="None" format="" />
<syntax name="CopyValue" format="%%ParamValue" /> <syntax name="CopyValue" format="%%ParamValue" />
<syntax name="ParamListSyntax" format="%(%%ParamValue%| %)" />
</interface> </interface>
......
...@@ -57,6 +57,10 @@ ...@@ -57,6 +57,10 @@
label="Send a command to the remote Vivado session" label="Send a command to the remote Vivado session"
icon="my_tool.gif" icon="my_tool.gif"
call="VivadoTest"/> call="VivadoTest"/>
<menuitem name="VivadoLoadSource"
label="Load source files to Vivado"
icon="xilinx.png"
call="VivadoLoadSource"/>
<menu name="XDS" <menu name="XDS"
label="Demo XDS Tools" label="Demo XDS Tools"
......
<?xml version="1.0" encoding="UTF-8"?>
<vdt-project>
<interface name="FPGAPprojectInterface" extends="project_interface">
<syntax name="RemoteRootSyntax" format="%%ParamValue/%%ProjectName" />
<syntax name="SourceListSyntax" format="%(%%SourceList%| %)" />
<syntax name="FilteredSourceListSyntax" format="%(%%FilteredSourceList%| %)" />
</interface>
<package name="FPGA_package"
label="Common parameters for all FPGA projects"
interface="FPGAPprojectInterface">
<parameter id="RemoteHost" label="Remote Host IP" type="String"
format="CopyValue" default="192.168.0.122" readonly="false" visible="true" />
<parameter id="RemoteUser" label="Remote user name" type="String"
format="CopyValue" default="xilinx" readonly="false" visible="true" />
<parameter id="PreSSH" label="pre-ssh shell parameters"
type="String" format="CopyValue" default="" readonly="false" visible="true" />
<parameter id="ShellSwitches" label="Shell switches" type="String"
format="CopyValue" default="-c" readonly="false" visible="true" />
<parameter id="TerminalMode" type="BoolYesNo" format="None"
default="false" label="Force terminal mode for the remote program" />
<parameter id="SSHSwitches" label="Other ssh switches"
type="String" format="CopyValue" default="" readonly="false" visible="true" />
<parameter id="RemoteCommand" label="Remote ssh command"
type="String" format="CopyValue" default="/opt/Xilinx/Vivado/2013.4/bin/vivado -mode tcl" readonly="false"
visible="true" />
<parameter id="SSHExtra" label="ssh extra parameters" type="String"
format="CopyValue" default="" readonly="false" visible="true" />
<parameter id="VivadoConsole" default="Vivado" label="Vivado console name"
type="String" format="CopyValue" visible="true" readonly="false"/>
<input>
<group name="VivadoServer" label="Vivado server setup">
"RemoteHost"
"RemoteUser"
"TerminalMode"
"ShellSwitches"
"PreSSH"
"SSHSwitches"
"RemoteCommand"
"SSHExtra"
"VivadoConsole"
</group>
</input>
</package>
<project name="FPGA_project" label="Project parameters for FPGA_project"
package="FPGA_package"
interface="FPGAPprojectInterface">
<!-- Simulation parameters -->
<parameter id="SimulationTopFile" label="Project top simulation file"
type="Filename" default="default_top (testing)" format="CopyValue"
readonly="false" />
<parameter id="SimulationTopModule" label="Project top simulation module"
type="String" default="" format="CopyValue" readonly="false" />
<parameter id="BuildDir" label="project build directory"
type="Pathname" default="simulation" format="CopyValue" readonly="false" />
<!-- Vivado parameters -->
<parameter id="VivadoProjectRoot" label="Relative (to user home directory) path of the workspace on Vivado server"
type="String" default="vdt" format="RemoteRootSyntax" readonly="false" />
<parameter id="VivadoIgnoreSource" label="Ignore source files that match this regular expression"
type="String" default=".*unisims.*" format="CopyValue" readonly="false" />
<!-- Calculated -->
<parameter id="VivadoProjectRoot" label="Relative (to user home directory) path of the project on Vivado server"
type="String" default="vdt" format="RemoteRootSyntax" readonly="false" />
<!-- Invisible (calculated) project-wide parameters -->
<parameter id="BuildDirSlash" type="Pathname" visible="false"
default="?%BuildDir=:,%BuildDir/" format="CopyValue"/>
<input>
<group name="Simulation" label="Simulation properties">
"SimulationTopFile"
"SimulationTopModule"
"BuildDir"
</group>
<group name="Vivado" label="Vivado general properties">
"VivadoProjectRoot"
"VivadoIgnoreSource"
</group>
</input>
<output>
</output>
</project>
</vdt-project>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<vdt-project> <vdt-project>
<interface name="RemoteInterface" extends="project_interface"> <interface name="RemoteInterface" extends="FPGAPprojectInterface">
<syntax name="ProgramSyntax" format="%(%%ParamValue%|\n%)" /> <syntax name="ProgramSyntax" format="%(%%ParamValue%|\n%)" />
</interface> </interface>
<tool name="RemotePython" project="FPGA_project" label="RemotePython" <tool name="RemotePython" project="FPGA_project" label="RemotePython"
package="FPGA_package"
shell="/bin/bash" interface="RemoteInterface" description="Launching remote Python in console" shell="/bin/bash" interface="RemoteInterface" description="Launching remote Python in console"
errors="(.*):([0-9]+): [a-z ]*error: (.*)" warnings="(.*):([0-9]+): warning: (.*)" errors="(.*):([0-9]+): [a-z ]*error: (.*)" warnings="(.*):([0-9]+): warning: (.*)"
info="(.*):([0-9]+): info: (.*)"> <!--does not actually exist --> info="(.*):([0-9]+): info: (.*)"> <!--does not actually exist -->
...@@ -77,6 +78,7 @@ ...@@ -77,6 +78,7 @@
</output> </output>
</tool> </tool>
<tool name="RemotePythonCommand" project="FPGA_project" label="RemotePythonCommand" <tool name="RemotePythonCommand" project="FPGA_project" label="RemotePythonCommand"
package="FPGA_package"
shell="/bin/bash" interface="RemoteInterface" shell="/bin/bash" interface="RemoteInterface"
description="Sending command to a ermote Python session" errors="(.*):([0-9]+): [a-z ]*error: (.*)" description="Sending command to a ermote Python session" errors="(.*):([0-9]+): [a-z ]*error: (.*)"
warnings="(.*):([0-9]+): warning: (.*)" info="(.*):([0-9]+): info: (.*)"> <!--does not actually exist --> warnings="(.*):([0-9]+): warning: (.*)" info="(.*):([0-9]+): info: (.*)"> <!--does not actually exist -->
......
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
--> -->
<!-- exe = "?%%OS: Windows=mytest.bat, Linux=mytest.sh" --> <!-- exe = "?%%OS: Windows=mytest.bat, Linux=mytest.sh" -->
<tool name = "MyTool" <tool name = "MyTool"
project = "FPGA_project" project = "SampleProject"
label = "My Tool" label = "My Tool"
shell = "?%%OS: Windows=, Linux=/bin/bash" shell = "?%%OS: Windows=, Linux=/bin/bash"
interface = "MyControlInterface" interface = "MyControlInterface"
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<vdt-project> <vdt-project>
<interface name="IVerilog" extends="project_interface"> <interface name="IVerilog" extends="FPGAPprojectInterface">
<!-- Syntax definitions --> <!-- Syntax definitions -->
<syntax name="D_ParamSyntax" format="-D%%ParamName" /> <syntax name="D_ParamSyntax" format="-D%%ParamName" />
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<syntax name="TopModuleSyntax" format="-s%%TopModule" /> <syntax name="TopModuleSyntax" format="-s%%TopModule" />
<syntax name="TopModulesOtherSyntax" format="%(-s%%ParamValue%| %)" /> <syntax name="TopModulesOtherSyntax" format="%(-s%%ParamValue%| %)" />
<syntax name="ModuleLibrarySyntax" format="%(-y%%ParamValue%| %)" /> <syntax name="ModuleLibrarySyntax" format="%(-y%%ParamValue%| %)" />
<syntax name="SourceListSyntax" format="%(%%SourceList%| %)" />
<syntax name="ExtraFilesSyntax" format="%(%%ParamValue%| %)" /> <syntax name="ExtraFilesSyntax" format="%(%%ParamValue%| %)" />
<syntax name="SwitchSyntax" format="-%%ParamName" /> <syntax name="SwitchSyntax" format="-%%ParamName" />
<syntax name="GrepFindSyntax" <syntax name="GrepFindSyntax"
...@@ -68,36 +67,10 @@ ...@@ -68,36 +67,10 @@
</typedef> </typedef>
</interface> </interface>
<project name="FPGA_project" label="Project parameters for FPGA_project"
interface="project_interface">
<parameter id="SimulationTopFile" label="Project top simulation file"
type="Filename" default="default_top (testing)" format="CopyValue"
readonly="false" />
<parameter id="SimulationTopModule" label="Project top simulation module"
type="String" default="" format="CopyValue" readonly="false" />
<parameter id="BuildDir" label="project build directory"
type="Pathname" default="simulation" format="CopyValue" readonly="false" />
<!-- Invisible (calculated) project-wide parameters -->
<parameter id="BuildDirSlash" type="Pathname" visible="false"
default="?%BuildDir=:,%BuildDir/" format="CopyValue"/>
<input>
<group name="General" label="Project properties">
"SimulationTopFile"
"SimulationTopModule"
"BuildDir"
</group>
</input>
<output>
</output>
</project>
<tool name="iverilog" project="FPGA_project" label="Icarus Verilog compiler" <tool name="iverilog" project="FPGA_project" label="Icarus Verilog compiler"
exe="iverilog" shell="?%%OS: Windows=shell:, Linux=/bin/bash" exe="iverilog" shell="?%%OS: Windows=shell:, Linux=/bin/bash"
package="FPGA_package"
interface="IVerilog" errors="(.*):([0-9]+): [a-z_\- ]*error: (.*)" interface="IVerilog" errors="(.*):([0-9]+): [a-z_\- ]*error: (.*)"
warnings="(.*):([0-9]+): [a-z_\- ]*warning: (.*)" info="(.*):([0-9]+): [a-z_\- ]*info: (.*)"> <!--do not actually exist --> warnings="(.*):([0-9]+): [a-z_\- ]*warning: (.*)" info="(.*):([0-9]+): [a-z_\- ]*info: (.*)"> <!--do not actually exist -->
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<vdt-project> <vdt-project>
<interface name="IVerilogDebug" extends="project_interface"> <interface name="IVerilogDebug" extends="FPGAPprojectInterface">
<!-- Syntax definitions --> <!-- Syntax definitions -->
<syntax name="D_ParamSyntax" format="-D%%ParamName" /> <syntax name="D_ParamSyntax" format="-D%%ParamName" />
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<syntax name="TopModuleSyntax" format="-s%%TopModule" /> <syntax name="TopModuleSyntax" format="-s%%TopModule" />
<syntax name="TopModulesOtherSyntax" format="%(-s%%ParamValue%| %)" /> <syntax name="TopModulesOtherSyntax" format="%(-s%%ParamValue%| %)" />
<syntax name="ModuleLibrarySyntax" format="%(-y%%ParamValue%| %)" /> <syntax name="ModuleLibrarySyntax" format="%(-y%%ParamValue%| %)" />
<syntax name="SourceListSyntax" format="%(%%SourceList%| %)" />
<syntax name="ExtraFilesSyntax" format="%(%%ParamValue%| %)" /> <syntax name="ExtraFilesSyntax" format="%(%%ParamValue%| %)" />
<syntax name="SwitchSyntax" format="-%%ParamName" /> <syntax name="SwitchSyntax" format="-%%ParamName" />
<syntax name="GrepFindSyntax" <syntax name="GrepFindSyntax"
...@@ -78,7 +77,7 @@ ...@@ -78,7 +77,7 @@
<tool name="iverilog_dbg" project="FPGA_project" label="Icarus Verilog compiler - debug" <tool name="iverilog_dbg" project="FPGA_project" label="Icarus Verilog compiler - debug"
exe="iverilog" shell="?%%OS: Windows=shell:, Linux=/bin/bash" exe="iverilog" shell="?%%OS: Windows=shell:, Linux=/bin/bash"
package="FPGA_package"
interface="IVerilogDebug" errors="(.*):([0-9]+): [a-z_\- ]*error: (.*)" interface="IVerilogDebug" errors="(.*):([0-9]+): [a-z_\- ]*error: (.*)"
warnings="(.*):([0-9]+): [a-z_\- ]*warning: (.*)" info="(.*):([0-9]+): [a-z_\- ]*info: (.*)"> <!--do not actually exist --> warnings="(.*):([0-9]+): [a-z_\- ]*warning: (.*)" info="(.*):([0-9]+): [a-z_\- ]*info: (.*)"> <!--do not actually exist -->
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<vdt-project> <vdt-project>
<interface name="VivadoInterface" extends="project_interface"> <interface name="VivadoInterface" extends="FPGAPprojectInterface">
<syntax name="ProgramSyntax" format="%(%%ParamValue%|\n%)" /> <syntax name="ProgramSyntax" format="%(%%ParamValue%|\n%)" />
</interface> </interface>
<tool name="Vivado" project="FPGA_project" label="Launch Vivado" <!-- name shold be the same as VivadoConsole parameter -->
<tool name="Vivado"
label="Launch Vivado"
project="FPGA_project"
package="FPGA_package"
shell="/bin/bash" interface="VivadoInterface" description="Launching remote Xilinx Vivado in console" shell="/bin/bash" interface="VivadoInterface" description="Launching remote Xilinx Vivado in console"
errors="(.*):([0-9]+): [a-z ]*error: (.*)" warnings="(.*):([0-9]+): warning: (.*)" errors="(.*):([0-9]+): [a-z ]*error: (.*)" warnings="(.*):([0-9]+): warning: (.*)"
info="(.*):([0-9]+): info: (.*)"> <!--does not actually exist --> info="(.*):([0-9]+): info: (.*)"> <!--does not actually exist -->
<!--
<extensions-list> <extensions-list>
<extension mask="v" /> <extension mask="v" />
<extension mask="tf" /> <extension mask="tf" />
</extensions-list> </extensions-list>
-->
<action-menu> <action-menu>
<action label="Launch Vivado" resource="" icon="xilinx.png" /> <action label="Launch Vivado" resource="" icon="xilinx.png" />
</action-menu> </action-menu>
<!--
<parameter id="RemoteHost" label="Remote Host IP" type="String" <parameter id="RemoteHost" label="Remote Host IP" type="String"
format="CopyValue" default="192.168.0.122" readonly="false" visible="true" /> format="CopyValue" default="192.168.0.122" readonly="false" visible="true" />
...@@ -42,10 +48,10 @@ ...@@ -42,10 +48,10 @@
<parameter id="SSHExtra" label="ssh extra parameters" type="String" <parameter id="SSHExtra" label="ssh extra parameters" type="String"
format="CopyValue" default="" readonly="false" visible="true" /> format="CopyValue" default="" readonly="false" visible="true" />
-->
<input> <input>
<group name="General"> <group name="General">
"RemoteHost" <!-- "RemoteHost"
"RemoteUser" "RemoteUser"
"TerminalMode" "TerminalMode"
"ShellSwitches" "ShellSwitches"
...@@ -53,6 +59,7 @@ ...@@ -53,6 +59,7 @@
"SSHSwitches" "SSHSwitches"
"RemoteCommand" "RemoteCommand"
"SSHExtra" "SSHExtra"
-->
</group> </group>
</input> </input>
...@@ -76,8 +83,12 @@ ...@@ -76,8 +83,12 @@
</line> </line>
</output> </output>
</tool> </tool>
<tool name="VivadoTest" project="FPGA_project" label="VivadoCommand" <tool name="VivadoTest" label="VivadoCommand"
shell="/bin/bash" interface="VivadoInterface" project="FPGA_project"
interface="VivadoInterface"
package="FPGA_package"
shell="/bin/bash"
ignore="%VivadoIgnoreSource"
description="Sending command to a remote Vivado session" errors="(.*):([0-9]+): [a-z ]*error: (.*)" description="Sending command to a remote Vivado session" errors="(.*):([0-9]+): [a-z ]*error: (.*)"
warnings="(.*):([0-9]+): warning: (.*)" info="(.*):([0-9]+): info: (.*)"> <!--does not actually exist --> warnings="(.*):([0-9]+): warning: (.*)" info="(.*):([0-9]+): info: (.*)"> <!--does not actually exist -->
<extensions-list> <extensions-list>
...@@ -89,19 +100,19 @@ ...@@ -89,19 +100,19 @@
<action label="Vivado Command" resource="" icon="xilinx.png" /> <action label="Vivado Command" resource="" icon="xilinx.png" />
</action-menu> </action-menu>
<parameter id="RemoteCommand" label="Remote Command to send" <parameter id="TCLCommand" label="Remote TCL Command to send"
type="Stringlist" format="ProgramSyntax" default="puts &quot;Hello, World!&quot;" type="Stringlist" format="ProgramSyntax" default="puts &quot;Hello, World!&quot;"
readonly="false" visible="true" /> readonly="false" visible="true" />
<parameter id="vivado_console" default="Vivado"
type="String" format="CopyValue" visible="false" />
<parameter id="Timeout" label="Script timeout(sec)" type="Cardinal" <parameter id="Timeout" label="Script timeout(sec)" type="Cardinal"
format="CopyValue" default="10" readonly="false" visible="true" /> format="CopyValue" default="10" readonly="false" visible="true" />
<!-- hidden (calculated) parameters -->
<parameter id="FilteredSourceList" type="Stringlist"
format="FilteredSourceListSyntax" default="" readonly="true" visible="false" />
<input> <input>
<group name="General"> <group name="General">
"RemoteCommand" "TCLCommand"
"Timeout" "Timeout"
</group> </group>
</input> </input>
...@@ -110,17 +121,20 @@ ...@@ -110,17 +121,20 @@
<line name="pre_tcl"> <line name="pre_tcl">
"-c" "-c"
"echo 'scp files here' ;" "echo 'scp files here' ;"
"echo '"
"%FilteredSourceList"
"' ;"
"sleep 2 ;" "sleep 2 ;"
</line> </line>
<!-- TODO: Make it OK to ose just strings, not parameters in dest (for console names) --> <!-- TODO: Make it OK to ose just strings, not parameters in dest (for console names) -->
<line name="vivado_line_01" <line name="vivado_line_01"
dest="vivado_console" dest="VivadoConsole"
mark="``" mark="``"
sep="\n" sep="\n"
prompt="@@FINISH@@" prompt="@@FINISH@@"
stdout="parser_001" stdout="parser_001"
timeout="Timeout"> timeout="Timeout">
"%RemoteCommand" "%TCLCommand"
"puts '@@FINISH@@'" "puts '@@FINISH@@'"
"``"`" <!-- two new lines should generate a pair of prompts from the remote --> "``"`" <!-- two new lines should generate a pair of prompts from the remote -->
</line> </line>
...@@ -139,5 +153,97 @@ ...@@ -139,5 +153,97 @@
</line> </line>
</output> </output>
</tool> </tool>
<tool name="VivadoLoadSource" label="Load Source files to Vivado"
project="FPGA_project"
interface="VivadoInterface"
package="FPGA_package"
shell="/bin/bash"
ignore="%VivadoIgnoreSource"
description="Load source files to Vivado">
<extensions-list>
<extension mask="v" />
<extension mask="tf" />
</extensions-list>
<action-menu>
<action label="Vivado Command" resource="" icon="xilinx.png" />
</action-menu>
<parameter id="ExtraFiles" type="Filelist" format="ParamListSyntax"
default="" label="Select additional files to include" readonly="false"
visible="true" />
<parameter id="Timeout" label="Script timeout(sec)" type="Cardinal"
format="CopyValue" default="10" readonly="false" visible="true" />
<parameter id="TCLCommand" label="Remote TCL Command to send"
type="Stringlist" format="ProgramSyntax" default="puts &quot;Hello, World!&quot;"
readonly="false" visible="true" />
<!-- hidden (calculated) parameters -->
<parameter id="FilteredSourceList" type="Stringlist"
format="FilteredSourceListSyntax" default="" readonly="true" visible="false" />
<!--
<parameter id="RsyncRemoteHost" default="%RemoteUser@%RemoteHost:"
visible="false" type="String" format="CopyValue"/>
-->
<input>
<group name="General">
"ExtraFiles"
"TCLCommand"
"Timeout"
</group>
</input>
<output>
<!-- mkdir -p vdt/npmtest -->
<line name="pre_tcl">
"-c"
"echo"
"%RemoteUser@%RemoteHost:%VivadoProjectRoot"
";"
"ssh -l"
"%RemoteUser"
"%RemoteHost"
"'"
"mkdir -p"
"%VivadoProjectRoot"
"' ;"
"rsync -avrR -e ssh"
"%FilteredSourceList"
"%ExtraFiles"
"%RemoteUser@%RemoteHost:%VivadoProjectRoot"
</line>
<!-- TODO: Make it OK to ose just strings, not parameters in dest (for console names) -->
<line name="vivado_line_01"
dest="VivadoConsole"
mark="``"
sep="\n"
prompt="@@FINISH@@"
stdout="parser_001"
timeout="Timeout">
"%TCLCommand"
"puts '@@FINISH@@'"
"``"`" <!-- two new lines should generate a pair of prompts from the remote -->
</line>
<line name="command_line_02">
"-c"
"echo 'Will scp result files back here' ;"
"sleep 2 ;"
</line>
<!-- parser_01 being referenced should be launched in an asynchronous process/console, removed from the launch sequence -->
<line name="parser_001"
errors="(.*):([0-9]+): [a-z ]*error: (.*)"
warnings="(.*):([0-9]+): warning: (.*)"
info="(.*):([0-9]+): info: (.*)">
"-c"
"cat"
</line>
</output>
</tool>
</vdt-project> </vdt-project>
<!-- /opt/Xilinx/Vivado/2013.4/bin/vivado -mode tcl --> <!-- /opt/Xilinx/Vivado/2013.4/bin/vivado -mode tcl -->
\ No newline at end of file <!--
mkdir -p vdt/npmtest
rsync -avrR -e ssh npmtest_tb.v npmtest.v unisims/IBUFG.v xilinx@192.168.0.122:vdt/npmtest -->
\ No newline at end of file
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