Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vdt-plugin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
vdt-plugin
Commits
71997eed
Commit
71997eed
authored
Dec 27, 2015
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More on tool-specific closure, added support for parameters in functions/tasks
parent
1b185b7e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
56 additions
and
17 deletions
+56
-17
VerilogUtils.java
src/com/elphel/vdt/VerilogUtils.java
+13
-7
FilteredSourceListGenerator.java
...dt/core/tools/generators/FilteredSourceListGenerator.java
+23
-3
ToolSequence.java
src/com/elphel/vdt/core/tools/params/ToolSequence.java
+5
-0
SelectedResourceManager.java
src/com/elphel/vdt/ui/variables/SelectedResourceManager.java
+2
-1
DesignFlowView.java
src/com/elphel/vdt/ui/views/DesignFlowView.java
+9
-2
IVerilog.xml
tools/Verilog/IVerilog.xml
+2
-2
vivado_bitstream.xml
tools/Xilinx_Vivado/vivado_bitstream.xml
+1
-1
vdt-veditor.patch
vdt-veditor.patch
+1
-1
No files found.
src/com/elphel/vdt/VerilogUtils.java
View file @
71997eed
...
@@ -31,6 +31,7 @@ import java.util.ArrayList;
...
@@ -31,6 +31,7 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.List
;
//import java.util.Map;
//import java.util.Map;
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
;
import
com.elphel.vdt.veditor.document.HdlDocument
;
import
com.elphel.vdt.veditor.document.HdlDocument
;
...
@@ -99,7 +100,8 @@ public class VerilogUtils {
...
@@ -99,7 +100,8 @@ public class VerilogUtils {
if
(
SelectedResourceManager
.
getDefault
().
getChosenVerilogFile
()==
null
)
{
if
(
SelectedResourceManager
.
getDefault
().
getChosenVerilogFile
()==
null
)
{
System
.
out
.
println
(
"database is null, and no Verilog file is selected to create one."
);
System
.
out
.
println
(
"database is null, and no Verilog file is selected to create one."
);
return
null
;
return
null
;
}
}
// getChosenVerilogFile() sometimes returns project (after switching projects)
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 */
}
}
...
@@ -156,7 +158,7 @@ public class VerilogUtils {
...
@@ -156,7 +158,7 @@ public class VerilogUtils {
public
static
OutlineElement
[]
getTopModulesVeditor
(
IFile
file
)
{
public
static
OutlineElement
[]
getTopModulesVeditor
(
IFile
file
)
{
IProject
project
=
file
.
getProject
();
IProject
project
=
file
.
getProject
();
if
(
project
==
null
){
if
(
project
==
null
){
System
.
out
.
println
(
"getTopModulesVeditor(): Projectis null for file="
+
file
.
getFullPath
());
System
.
out
.
println
(
"getTopModulesVeditor(): Project
is null for file="
+
file
.
getFullPath
());
return
null
;
return
null
;
}
}
OutlineDatabase
outlineDatabase
=
getVeditorOutlineDatabase
(
project
);
OutlineDatabase
outlineDatabase
=
getVeditorOutlineDatabase
(
project
);
...
@@ -193,14 +195,18 @@ public class VerilogUtils {
...
@@ -193,14 +195,18 @@ public class VerilogUtils {
if
(
toolDefine
!=
null
)
{
if
(
toolDefine
!=
null
)
{
OutlineDatabase
outlineDatabase
=
new
OutlineDatabase
(
project
);
// new OutlineDatabase just for this scan
OutlineDatabase
outlineDatabase
=
new
OutlineDatabase
(
project
);
// new OutlineDatabase just for this scan
outlineDatabase
.
scanFilesWithDefine
(
topFile
,
toolDefine
);
outlineDatabase
.
scanFilesWithDefine
(
topFile
,
toolDefine
);
// System.out.println("-->>>VerilogUtils.getDependencies number of files="+outlineDatabase.getDatabaseFileList().length);
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
DEBUG_CLOSURE
))
{
// for (int i=0; i<outlineDatabase.getDatabaseFileList().length; i++){
System
.
out
.
println
(
"-->>>VerilogUtils.getDependencies number of files="
+
outlineDatabase
.
getDatabaseFileList
().
length
);
// System.out.println(i+": "+outlineDatabase.getDatabaseFileList()[i]);
for
(
int
i
=
0
;
i
<
outlineDatabase
.
getDatabaseFileList
().
length
;
i
++){
// }
System
.
out
.
println
(
i
+
": "
+
outlineDatabase
.
getDatabaseFileList
()[
i
]);
}
}
IFile
[]
topFiles
=
{
topFile
};
IFile
[]
topFiles
=
{
topFile
};
return
outlineDatabase
.
getClosureSorted
(
topFiles
);
return
outlineDatabase
.
getClosureSorted
(
topFiles
);
}
else
{
}
else
{
// System.out.println("===---VerilogUtils.getDependencies("+topFile+") - using editor depends");
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
DEBUG_CLOSURE
))
{
System
.
out
.
println
(
"===---VerilogUtils.getDependencies("
+
topFile
+
") - using editor depends"
);
}
return
getDependencies
(
new
IFile
[]
{
topFile
});
return
getDependencies
(
new
IFile
[]
{
topFile
});
}
}
}
}
...
...
src/com/elphel/vdt/core/tools/generators/FilteredSourceListGenerator.java
View file @
71997eed
...
@@ -41,6 +41,7 @@ import org.eclipse.core.resources.IResource;
...
@@ -41,6 +41,7 @@ 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.tools.params.FormatProcessor
;
import
com.elphel.vdt.core.tools.params.FormatProcessor
;
...
@@ -48,6 +49,8 @@ import com.elphel.vdt.core.tools.params.Tool;
...
@@ -48,6 +49,8 @@ import com.elphel.vdt.core.tools.params.Tool;
import
com.elphel.vdt.ui.MessageUI
;
import
com.elphel.vdt.ui.MessageUI
;
//import com.elphel.vdt.core.verilog.VerilogUtils;
//import com.elphel.vdt.core.verilog.VerilogUtils;
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.preference.PreferenceStrings
;
/**
/**
* Generate the file name list of dependency closure for last selected
* Generate the file name list of dependency closure for last selected
...
@@ -84,7 +87,9 @@ public class FilteredSourceListGenerator extends AbstractGenerator {
...
@@ -84,7 +87,9 @@ public class FilteredSourceListGenerator extends AbstractGenerator {
// System.out.println(", tool="+tool+" tool name="+((tool!=null)?tool.getName():null));
// System.out.println(", tool="+tool+" tool name="+((tool!=null)?tool.getName():null));
if
(
tool
!=
null
)
{
if
(
tool
!=
null
)
{
ignoreFilter
=
tool
.
getIgnoreFilter
();
ignoreFilter
=
tool
.
getIgnoreFilter
();
// System.out.println("FilteredSourceListGenerator().getStringValue(): tool="+tool.getName()+", ignoreFilter="+ignoreFilter);
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
DEBUG_CLOSURE
))
{
System
.
out
.
println
(
"FilteredSourceListGenerator().getStringValue(): tool="
+
tool
.
getName
()+
", ignoreFilter="
+
ignoreFilter
);
}
topFile
=
tool
.
getTopFile
();
topFile
=
tool
.
getTopFile
();
toolDefine
=
tool
.
getDefine
();
toolDefine
=
tool
.
getDefine
();
if
((
toolDefine
==
null
)
||
(
toolDefine
==
""
))
{
if
((
toolDefine
==
null
)
||
(
toolDefine
==
""
))
{
...
@@ -92,7 +97,9 @@ public class FilteredSourceListGenerator extends AbstractGenerator {
...
@@ -92,7 +97,9 @@ public class FilteredSourceListGenerator extends AbstractGenerator {
else
toolDefine
=
""
;
// reparse for this tool - top file may have different defines
else
toolDefine
=
""
;
// reparse for this tool - top file may have different defines
}
}
if
(!
tool
.
needsTreeReparse
())
toolDefine
=
null
;
if
(!
tool
.
needsTreeReparse
())
toolDefine
=
null
;
// System.out.println("topFile="+topFile+ " toolDefine="+toolDefine);
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
DEBUG_CLOSURE
))
{
System
.
out
.
println
(
"topFile="
+
topFile
+
" toolDefine="
+
toolDefine
);
}
}
else
{
}
else
{
System
.
out
.
println
(
"FilteredSourceListGenerator(): topProcessor.getCurrentTool() is null"
);
System
.
out
.
println
(
"FilteredSourceListGenerator(): topProcessor.getCurrentTool() is null"
);
}
}
...
@@ -121,16 +128,29 @@ public class FilteredSourceListGenerator extends AbstractGenerator {
...
@@ -121,16 +128,29 @@ public class FilteredSourceListGenerator extends AbstractGenerator {
if
(
resource
!=
null
&&
resource
.
getType
()
==
IResource
.
FILE
)
{
if
(
resource
!=
null
&&
resource
.
getType
()
==
IResource
.
FILE
)
{
IFile
[]
files
=
VerilogUtils
.
getDependencies
((
IFile
)
resource
,
toolDefine
);
// 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);
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
DEBUG_CLOSURE
))
{
for
(
IFile
fl:
files
)
{
System
.
out
.
println
(
"FilteredSourceListGenerator()"
+
fl
);
}
System
.
out
.
println
(
"FilteredSourceListGenerator(): resource = "
+
resource
);
}
List
<
String
>
fileList
=
new
ArrayList
<
String
>();
List
<
String
>
fileList
=
new
ArrayList
<
String
>();
for
(
int
i
=
0
;
i
<
files
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
files
.
length
;
i
++)
{
String
fileName
=
files
[
i
].
getProjectRelativePath
().
toOSString
();
//.getName();
String
fileName
=
files
[
i
].
getProjectRelativePath
().
toOSString
();
//.getName();
if
((
ignorePattern
!=
null
)
&&
ignorePattern
.
matcher
(
fileName
).
matches
())
{
if
((
ignorePattern
!=
null
)
&&
ignorePattern
.
matcher
(
fileName
).
matches
())
{
// System.out.println("FilteredSourceListGenerator() IGNORE "+fileName+" ("+files[i]+")");
continue
;
continue
;
}
}
fileList
.
add
(
fileName
);
fileList
.
add
(
fileName
);
// System.out.println("FilteredSourceListGenerator() ADDED "+fileName+" ("+files[i]+")");
}
}
file_names
=
fileList
.
toArray
(
new
String
[
0
]);
file_names
=
fileList
.
toArray
(
new
String
[
0
]);
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
DEBUG_CLOSURE
))
{
for
(
String
fn:
file_names
)
{
System
.
out
.
println
(
String
.
format
(
"FilteredSourceListGenerator() %s "
,
fn
));
}
}
}
else
{
}
else
{
// fault("There is no selected project");
// fault("There is no selected project");
System
.
out
.
println
(
getName
()+
": no project selected"
);
System
.
out
.
println
(
getName
()+
": no project selected"
);
...
...
src/com/elphel/vdt/core/tools/params/ToolSequence.java
View file @
71997eed
...
@@ -53,6 +53,7 @@ import com.elphel.vdt.ui.options.FilteredFileSelector;
...
@@ -53,6 +53,7 @@ import com.elphel.vdt.ui.options.FilteredFileSelector;
import
com.elphel.vdt.ui.variables.SelectedResourceManager
;
import
com.elphel.vdt.ui.variables.SelectedResourceManager
;
import
com.elphel.vdt.ui.views.DesignFlowView
;
import
com.elphel.vdt.ui.views.DesignFlowView
;
import
com.elphel.vdt.veditor.VerilogPlugin
;
import
com.elphel.vdt.veditor.VerilogPlugin
;
import
com.elphel.vdt.veditor.parser.OutlineDatabase
;
import
com.elphel.vdt.veditor.preference.PreferenceStrings
;
import
com.elphel.vdt.veditor.preference.PreferenceStrings
;
import
java.io.File
;
import
java.io.File
;
...
@@ -734,9 +735,13 @@ java.lang.NullPointerException
...
@@ -734,9 +735,13 @@ java.lang.NullPointerException
String
fullPath
,
String
fullPath
,
String
ignoreFilter
)
throws
CoreException
{
String
ignoreFilter
)
throws
CoreException
{
if
(!
okToRun
())
return
;
if
(!
okToRun
())
return
;
// Just testing://
// OutlineDatabase.getProjectsDatabase(SelectedResourceManager.getDefault().getSelectedProject()).invalidateToolCache();
// Set this tool dirty (not to try reports on this tool before it ran)
// Set this tool dirty (not to try reports on this tool before it ran)
DEBUG_PRINT
(
"launchToolSequence("
+
tool
.
getName
()+
", setting its state to \"Dirty\""
);
DEBUG_PRINT
(
"launchToolSequence("
+
tool
.
getName
()+
", setting its state to \"Dirty\""
);
tool
.
setDirty
(
true
);
tool
.
setDirty
(
true
);
setStateProvides
();
// just testing
setStateProvides
();
// just testing
// tool.setDesignFlowView(designFlowView);
// tool.setDesignFlowView(designFlowView);
...
...
src/com/elphel/vdt/ui/variables/SelectedResourceManager.java
View file @
71997eed
...
@@ -363,7 +363,8 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe
...
@@ -363,7 +363,8 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe
if
(
project
.
getFullPath
().
toPortableString
().
equals
(
rslt
.
getProject
().
getFullPath
().
toPortableString
())){
if
(
project
.
getFullPath
().
toPortableString
().
equals
(
rslt
.
getProject
().
getFullPath
().
toPortableString
())){
return
(
fChosenVerilogFile
!=
null
)?
fChosenVerilogFile:
fSelectedVerilogFile
;
return
(
fChosenVerilogFile
!=
null
)?
fChosenVerilogFile:
fSelectedVerilogFile
;
}
else
{
}
else
{
System
.
out
.
println
(
"Wrong getChosenVerilogFile="
+
rslt
+
" for project "
+
project
);
System
.
out
.
println
(
"Wrong getChosenVerilogFile="
+
rslt
+
" for project "
+
project
);
fChosenVerilogFile
=
null
;
// invalidate
if
(
fSelectedVerilogFile
==
null
)
return
null
;
if
(
fSelectedVerilogFile
==
null
)
return
null
;
if
(
project
.
getFullPath
().
toPortableString
().
equals
(
fSelectedVerilogFile
.
getProject
().
getFullPath
().
toPortableString
())){
if
(
project
.
getFullPath
().
toPortableString
().
equals
(
fSelectedVerilogFile
.
getProject
().
getFullPath
().
toPortableString
())){
System
.
out
.
println
(
"Using: "
+
fSelectedVerilogFile
);
System
.
out
.
println
(
"Using: "
+
fSelectedVerilogFile
);
...
...
src/com/elphel/vdt/ui/views/DesignFlowView.java
View file @
71997eed
...
@@ -1270,8 +1270,15 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
...
@@ -1270,8 +1270,15 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
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
// restore properties from the project, overwrite global ones
restoreCurrentState
(
selectedResource
.
getProject
());
// null OK
IProject
project
;
if
(
selectedResource
==
null
)
{
project
=
SelectedResourceManager
.
getDefault
().
getSelectedProject
();
}
else
{
project
=
HDLFile
.
getProject
();
}
// restoreCurrentState(selectedResource.getProject()); // null OK
restoreCurrentState
(
project
);
// null OK
if
((
HDLFile
!=
null
)
&&
HDLFile
.
exists
()){
if
((
HDLFile
!=
null
)
&&
HDLFile
.
exists
()){
toolSequence
.
setUnfinishedBoot
(
memento
,
true
);
toolSequence
.
setUnfinishedBoot
(
memento
,
true
);
...
...
tools/Verilog/IVerilog.xml
View file @
71997eed
...
@@ -226,7 +226,7 @@
...
@@ -226,7 +226,7 @@
visible=
"true"
/>
visible=
"true"
/>
<parameter
id=
"GrepFindErrWarn"
label=
"Grep pattern for both errors and warnings"
<parameter
id=
"GrepFindErrWarn"
label=
"Grep pattern for both errors and warnings"
type=
"String"
format=
"GrepFindSyntax"
default=
"error|warning"
type=
"String"
format=
"GrepFindSyntax"
default=
"error|warning
|sorry
"
readonly=
"false"
visible=
"true"
/>
readonly=
"false"
visible=
"true"
/>
<parameter
id=
"GrepSkip1"
label=
"Grep skip pattern"
type=
"String"
<parameter
id=
"GrepSkip1"
label=
"Grep skip pattern"
type=
"String"
...
@@ -361,7 +361,7 @@
...
@@ -361,7 +361,7 @@
<if-not
IVerilogActionIndex=
"2"
>
<if-not
IVerilogActionIndex=
"2"
>
"%OutFileFull"
"%OutFileFull"
</if-not>
</if-not>
" -D
IVERILOG"
" -DIVERILOG"
"%IVerilogOther"
"%IVerilogOther"
"%Param_TopModule"
"%Param_TopModule"
"%TopModulesOther"
"%TopModulesOther"
...
...
tools/Xilinx_Vivado/vivado_bitstream.xml
View file @
71997eed
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
<parameter
id=
"rawfile"
label=
"Bitstream filename"
tooltip=
"Bitstream file name (will add *.bit extension)."
<parameter
id=
"rawfile"
label=
"Bitstream filename"
tooltip=
"Bitstream file name (will add *.bit extension)."
default=
"%%ProjectName"
visible=
"true"
omit=
""
type=
"String"
format=
"CopyValue"
/>
default=
"%%ProjectName"
visible=
"true"
omit=
""
type=
"String"
format=
"CopyValue"
/>
<parameter
id=
"force"
label=
"Force (overwrite)"
tooltip=
"Overwrite existent files."
<parameter
id=
"force"
label=
"Force (overwrite)"
tooltip=
"Overwrite existent files."
default=
"
fals
e"
visible=
"true"
omit=
"false"
type=
"Boolean"
format=
"DashName"
/>
default=
"
tru
e"
visible=
"true"
omit=
"false"
type=
"Boolean"
format=
"DashName"
/>
<parameter
id=
"raw_bitfile"
label=
"Write raw bitfile"
tooltip=
"Write bitfile in ASCII (*.rbt)."
<parameter
id=
"raw_bitfile"
label=
"Write raw bitfile"
tooltip=
"Write bitfile in ASCII (*.rbt)."
default=
"false"
visible=
"true"
omit=
"false"
type=
"Boolean"
format=
"DashName"
/>
default=
"false"
visible=
"true"
omit=
"false"
type=
"Boolean"
format=
"DashName"
/>
<parameter
id=
"no_binary_bitfile"
label=
"Do not write .bit"
tooltip=
"Do not write to binary bitfile (*.bit)."
<parameter
id=
"no_binary_bitfile"
label=
"Do not write .bit"
tooltip=
"Do not write to binary bitfile (*.bit)."
...
...
vdt-veditor.patch
View file @
71997eed
...
@@ -75506,7 +75506,7 @@ diff -U 3 -dHrN -- vdt-veditor/src/com/elphel/vdt/veditor/parser/verilog/Verilog
...
@@ -75506,7 +75506,7 @@ diff -U 3 -dHrN -- vdt-veditor/src/com/elphel/vdt/veditor/parser/verilog/Verilog
-}
-}
-
-
+/*******************************************************************************
+/*******************************************************************************
+ * Notice:
this prog
am DOES NOT have a valid distribution license and has to be
+ * Notice:
This progr
am DOES NOT have a valid distribution license and has to be
+ * re-generated by a user.
+ * re-generated by a user.
+ *
+ *
+ * This program is made of the original VEditor code released under Eclipse Public
+ * This program is made of the original VEditor code released under Eclipse Public
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment