Commit 62377d5d authored by Andrey Filippov's avatar Andrey Filippov

Added ISE map, python parser for ISE tool output, bug fixes

parent 19878460
...@@ -5,6 +5,11 @@ ...@@ -5,6 +5,11 @@
<projects> <projects>
</projects> </projects>
<buildSpec> <buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>clean,full,incremental,</triggers> <triggers>clean,full,incremental,</triggers>
...@@ -24,5 +29,6 @@ ...@@ -24,5 +29,6 @@
<natures> <natures>
<nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.python.pydev.pythonNature</nature>
</natures> </natures>
</projectDescription> </projectDescription>
#!/usr/bin/env python
##/usr/bin/python -u
import sys
tool="EXTERNAL_TOOL"
if len(sys.argv)>1:
tool=sys.argv[1]
def isProblem(str):
if str.startswith("ERROR:") or str.startswith("WARNING:") or str.startswith("INFO:"):
return True
return False
def hasLine(str):
if '" Line ' in str:
return True
return False
def addTool(str,tool):
if hasLine(str):
return str
else:
index=str.find(" - ")+3
return str[:index]+(" \"%s\" Line 0000:"%tool)+str[index:]
# return str[:len(str)-1]+(" \"%s\" Line 0000:"%tool)+"\n"
pline=""
for line in iter(sys.stdin.readline,''):
if isProblem(pline):
if line.startswith(" ") :
pline = pline[:len(pline)-1]+line[2:]
else:
sys.stdout.write(addTool(pline,tool))
pline = line
else:
pline = line
if isProblem(pline):
sys.stdout.write(addTool(pline,tool))
...@@ -159,6 +159,9 @@ public class VDT { ...@@ -159,6 +159,9 @@ public class VDT {
public static final String GENERATOR_ID_STATE_DIR = "StateDir"; public static final String GENERATOR_ID_STATE_DIR = "StateDir";
public static final String GENERATOR_ID_STATE_FILE = "StateFile"; public static final String GENERATOR_ID_STATE_FILE = "StateFile";
public static final String GENERATOR_PARSERS_PATH = "ParsersPath";
public static final String PATH_TO_PARSERS = "parsers";
public static final String TIME_STAMP_FORMAT = "yyyyMMddHHmmssSSS"; public static final String TIME_STAMP_FORMAT = "yyyyMMddHHmmssSSS";
......
/*******************************************************************************
* Copyright (c) 2014 Elphel, Inc.
* This file is a part of Eclipse/VDT plug-in.
* Eclipse/VDT plug-in is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Eclipse/VDT plug-in is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
package com.elphel.vdt.core.tools.generators;
import java.net.URI;
import java.net.URL;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import com.elphel.vdt.VDT;
import com.elphel.vdt.veditor.VerilogPlugin;
public class ParsersPathGenerator extends AbstractGenerator {
public static final String NAME = VDT.GENERATOR_PARSERS_PATH;
public String getName() {
return NAME;
}
public ParsersPathGenerator()
{
super(null); // null for topFormatProcessor - this generator can not reference other parameters
}
protected String[] getStringValues() {
String path = "$nl$/" + VDT.PATH_TO_PARSERS; //$NON-NLS-1$
try {
URL url=FileLocator.find(VerilogPlugin.getDefault().getBundle(), new Path(path), null);
if(url != null) {
URI uri=FileLocator.resolve(url).toURI();
// System.out.println("ParsersPathGenerator()->"+uri.getRawPath()+" : "+uri.toString());
return new String[]{uri.getRawPath()};
}
return null;
} catch (Exception e){
return null;
}
}
}
...@@ -108,7 +108,9 @@ public class FormatProcessor { ...@@ -108,7 +108,9 @@ public class FormatProcessor {
topProcessor.setCurrentTool(context); topProcessor.setCurrentTool(context);
return; return;
} }
currentTool=(Tool) context; if (currentTool==null) { // otherwise after using parameter belonging to baseTool, it will be changed
currentTool=(Tool) context;
}
} }
} }
......
...@@ -912,8 +912,12 @@ public class ToolSequence { ...@@ -912,8 +912,12 @@ public class ToolSequence {
IProject project = SelectedResourceManager.getDefault().getSelectedProject(); // should not be null when we got here IProject project = SelectedResourceManager.getDefault().getSelectedProject(); // should not be null when we got here
IFolder stateDir= project.getFolder((stateDirString==null)?"":stateDirString); IFolder stateDir= project.getFolder((stateDirString==null)?"":stateDirString);
IFile target= stateDir.getFile(targetString); //null po IFile target= stateDir.getFile(targetString); //null po
if (target==null){
System.out.println("Restore file for tool "+tool.getName()+" - '"+targetString+"': got null");
return false;
}
if (!target.exists()){ if (!target.exists()){
System.out.println("Restore file "+target.getLocation().toOSString()+" does not exist"); System.out.println("Restore file for tool "+tool.getName()+": "+target.getLocation().toOSString()+" does not exist");
return false; return false;
} }
return true; return true;
......
...@@ -45,7 +45,8 @@ public class SimpleGeneratorRecognizer implements Recognizer { ...@@ -45,7 +45,8 @@ public class SimpleGeneratorRecognizer implements Recognizer {
new StateDirGenerator(processor), new StateDirGenerator(processor),
new StateFileGenerator(processor), new StateFileGenerator(processor),
new StateBaseGenerator(processor), new StateBaseGenerator(processor),
new ToolNameGenerator() new ToolNameGenerator(),
new ParsersPathGenerator()
// new SourceListGenerator("","",""), // new SourceListGenerator("","",""),
// new FilteredSourceListGenerator("","","") // new FilteredSourceListGenerator("","","")
}; };
......
...@@ -52,6 +52,14 @@ ...@@ -52,6 +52,14 @@
label="Synthesize design" label="Synthesize design"
icon="Retort.png" icon="Retort.png"
call="ISExst"/> call="ISExst"/>
<menuitem name="ISENGDBuild"
label="Run NGDBuild"
icon="opt_blue.png"
call="ISENGDBuild"/>
<menuitem name="ISEMap"
label="Map design"
icon="map_icon.png"
call="ISEMap"/>
</menu> </menu>
<menu name="Vivado" <menu name="Vivado"
......
...@@ -317,6 +317,16 @@ ...@@ -317,6 +317,16 @@
default="%%ProjectName-synth.tgz" default="%%ProjectName-synth.tgz"
type="String" format="CopyValue" /> type="String" format="CopyValue" />
<parameter id="ISESnapshotNGDBuild"
label="NGDBuild snapshot" tooltip="Name of ISE snapshot archive after NGDBuild"
default="%%ProjectName-ngdbuild.tgz"
type="String" format="CopyValue" />
<parameter id="ISESnapshotMap"
label="NGDBuild snapshot" tooltip="Name of ISE snapshot archive after map"
default="%%ProjectName-map.tgz"
type="String" format="CopyValue" />
<parameter id="ISESnapshotOptPlace" <parameter id="ISESnapshotOptPlace"
label="Placement snapshot" tooltip="Name of ISE snapshot archive after optimization/placement" label="Placement snapshot" tooltip="Name of ISE snapshot archive after optimization/placement"
default="%%ProjectName-opt-place.tgz" default="%%ProjectName-opt-place.tgz"
...@@ -406,6 +416,8 @@ ...@@ -406,6 +416,8 @@
<group name="ISESnapshots" label="ISE snapshot archives"> <group name="ISESnapshots" label="ISE snapshot archives">
"ISECleanRestore" "ISECleanRestore"
"ISESnapshotSynth" "ISESnapshotSynth"
"ISESnapshotNGDBuild"
"ISESnapshotMap"
<!-- "ISESnapshotOptPlace" --> <!-- "ISESnapshotOptPlace" -->
"ISESnapshotOpt" "ISESnapshotOpt"
"ISESnapshotOptPower" "ISESnapshotOptPower"
......
This diff is collapsed.
...@@ -75,6 +75,11 @@ ...@@ -75,6 +75,11 @@
default="grep --line-buffered -E 'ERROR:%PreGrepW%PreGrepI'" default="grep --line-buffered -E 'ERROR:%PreGrepW%PreGrepI'"
type="String" format="CopyValue" type="String" format="CopyValue"
visible="true" readonly="true"/> visible="true" readonly="true"/>
<parameter id="parsers_path" label="Parsers Path" tooltip= "parsers directory in plugins"
default="%%ParsersPath" visible="true" omit="" type="String" format="CopyValue"/>
<parameter id="parser_name" label="ISE parser name" tooltip= "ISE parser script path"
default="parser_ise.py" visible="true" omit="" type="String" format="CopyValue"/>
<input> <input>
<group name="Common options" <group name="Common options"
...@@ -86,6 +91,9 @@ ...@@ -86,6 +91,9 @@
</group> </group>
<group name="Parser" <group name="Parser"
weight="10"> weight="10">
"parsers_path"
"parser_name"
"ShowWarnings" "ShowWarnings"
"ShowInfo" "ShowInfo"
"GrepEWI" "GrepEWI"
...@@ -114,6 +122,7 @@ ...@@ -114,6 +122,7 @@
warnings= "PatternWarnings" warnings= "PatternWarnings"
info= "PatternInfo"> info= "PatternInfo">
"-c" "-c"
"python -u %parsers_path%parser_name %%ToolName | "
"%GrepEWI" "%GrepEWI"
"| %ISESedPaths" "| %ISESedPaths"
<if NoBabyTalk="true"> <if NoBabyTalk="true">
...@@ -130,11 +139,12 @@ ...@@ -130,11 +139,12 @@
"%Timing" "%Timing"
"%Pwropt" "%Pwropt"
"%OtherProblems" "%OtherProblems"
<!-- TODO: change Placement to Routing? or such --> <!-- Add [Placement:0000] to lines that do not have [file:line] - then "Placement" will appear in "Problems" location-->
<!--
<if NoFileProblem="true"> <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\]@'" "| sed -u 's@^[^\[]*\[[^\[]*$@&amp;\[%%ToolName:0000\]@'"
</if> </if>
-->
</line> </line>
</output> </output>
</tool> </tool>
......
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
<depends files="constraints"/> <depends files="constraints"/>
</depends-list> </depends-list>
<parameter id="clean_start" label="Clean start" tooltip= "Delete all files on remote before running XST" <parameter id="clean_start" label="Clean start" tooltip= "Delete all files on remote before running XST"
default="false" visible="true" omit="false" type="BoolYesNo" format="Dash"/> default="true" visible="true" omit="false" type="BoolYesNo" format="Dash"/>
<parameter id="SkipSnapshotSynth" label="Skip snapshot" tooltip="Do not create snapshot after synthesis" <parameter id="SkipSnapshotSynth" label="Skip snapshot" tooltip="Do not create snapshot after synthesis"
default="false" default="false"
type= "Boolean" format="None"/> type= "Boolean" format="None"/>
...@@ -629,7 +629,7 @@ ...@@ -629,7 +629,7 @@
"%RemoteUser@%RemoteHost:%ISEProjectRoot" "%RemoteUser@%RemoteHost:%ISEProjectRoot"
</line> </line>
<line name="ise_run_partgen" <line name="ise_run_xst"
dest="ISEConsole" dest="ISEConsole"
mark="``" mark="``"
sep=" " sep=" "
...@@ -743,7 +743,7 @@ ...@@ -743,7 +743,7 @@
</line> </line>
<!-- TODO: copy results --> <!-- TODO: copy results -->
<!-- <!--
<line name="ise_copy_after_partgen"> <line name="ise_copy_after_synth">
"-c" "-c"
"mkdir -p %ISELocalResultDir ;" "mkdir -p %ISELocalResultDir ;"
"rsync -avr -e ssh" "rsync -avr -e ssh"
......
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