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 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>clean,full,incremental,</triggers>
......@@ -24,5 +29,6 @@
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</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 {
public static final String GENERATOR_ID_STATE_DIR = "StateDir";
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";
......
/*******************************************************************************
* 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,9 +108,11 @@ public class FormatProcessor {
topProcessor.setCurrentTool(context);
return;
}
if (currentTool==null) { // otherwise after using parameter belonging to baseTool, it will be changed
currentTool=(Tool) context;
}
}
}
private List<String> processTemplate(String template)
throws ToolException
......
......@@ -912,8 +912,12 @@ public class ToolSequence {
IProject project = SelectedResourceManager.getDefault().getSelectedProject(); // should not be null when we got here
IFolder stateDir= project.getFolder((stateDirString==null)?"":stateDirString);
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()){
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 true;
......
......@@ -45,7 +45,8 @@ public class SimpleGeneratorRecognizer implements Recognizer {
new StateDirGenerator(processor),
new StateFileGenerator(processor),
new StateBaseGenerator(processor),
new ToolNameGenerator()
new ToolNameGenerator(),
new ParsersPathGenerator()
// new SourceListGenerator("","",""),
// new FilteredSourceListGenerator("","","")
};
......
......@@ -52,6 +52,14 @@
label="Synthesize design"
icon="Retort.png"
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 name="Vivado"
......
......@@ -317,6 +317,16 @@
default="%%ProjectName-synth.tgz"
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"
label="Placement snapshot" tooltip="Name of ISE snapshot archive after optimization/placement"
default="%%ProjectName-opt-place.tgz"
......@@ -406,6 +416,8 @@
<group name="ISESnapshots" label="ISE snapshot archives">
"ISECleanRestore"
"ISESnapshotSynth"
"ISESnapshotNGDBuild"
"ISESnapshotMap"
<!-- "ISESnapshotOptPlace" -->
"ISESnapshotOpt"
"ISESnapshotOptPower"
......
This diff is collapsed.
......@@ -75,6 +75,11 @@
default="grep --line-buffered -E 'ERROR:%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
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>
<group name="Common options"
......@@ -86,6 +91,9 @@
</group>
<group name="Parser"
weight="10">
"parsers_path"
"parser_name"
"ShowWarnings"
"ShowInfo"
"GrepEWI"
......@@ -114,6 +122,7 @@
warnings= "PatternWarnings"
info= "PatternInfo">
"-c"
"python -u %parsers_path%parser_name %%ToolName | "
"%GrepEWI"
"| %ISESedPaths"
<if NoBabyTalk="true">
......@@ -130,11 +139,12 @@
"%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-->
<!--
<if NoFileProblem="true">
"| sed -u 's@^[^\[]*\[[^\[]*$@&amp;\[%%ToolName:0000\]@'"
</if>
-->
</line>
</output>
</tool>
......
......@@ -217,7 +217,7 @@
<depends files="constraints"/>
</depends-list>
<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"
default="false"
type= "Boolean" format="None"/>
......@@ -629,7 +629,7 @@
"%RemoteUser@%RemoteHost:%ISEProjectRoot"
</line>
<line name="ise_run_partgen"
<line name="ise_run_xst"
dest="ISEConsole"
mark="``"
sep=" "
......@@ -743,7 +743,7 @@
</line>
<!-- TODO: copy results -->
<!--
<line name="ise_copy_after_partgen">
<line name="ise_copy_after_synth">
"-c"
"mkdir -p %ISELocalResultDir ;"
"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