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
05b23006
Commit
05b23006
authored
Jun 18, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed TopModule<s> generators to use tool's top file if available
parent
6a465d09
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
7 deletions
+43
-7
TopModuleNameGenerator.java
...hel/vdt/core/tools/generators/TopModuleNameGenerator.java
+20
-3
TopModulesNameGenerator.java
...el/vdt/core/tools/generators/TopModulesNameGenerator.java
+20
-3
vivado_synthesis.xml
tools/Xilinx_Vivado/vivado_synthesis.xml
+3
-1
No files found.
src/com/elphel/vdt/core/tools/generators/TopModuleNameGenerator.java
View file @
05b23006
...
@@ -29,7 +29,8 @@ package com.elphel.vdt.core.tools.generators;
...
@@ -29,7 +29,8 @@ package com.elphel.vdt.core.tools.generators;
import
org.eclipse.core.resources.IFile
;
import
org.eclipse.core.resources.IFile
;
import
org.eclipse.core.resources.IResource
;
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.Tool
;
import
com.elphel.vdt.ui.variables.SelectedResourceManager
;
import
com.elphel.vdt.ui.variables.SelectedResourceManager
;
/**
/**
...
@@ -50,8 +51,24 @@ public class TopModuleNameGenerator extends AbstractGenerator {
...
@@ -50,8 +51,24 @@ public class TopModuleNameGenerator extends AbstractGenerator {
return
NAME
;
return
NAME
;
}
}
protected
String
[]
getStringValues
()
{
protected
String
[]
getStringValues
()
{
// IResource resource = SelectedResourceManager.getDefault().getSelectedVerilogFile();
IResource
resource
=
SelectedResourceManager
.
getDefault
().
getChosenVerilogFile
();
IResource
resource
=
SelectedResourceManager
.
getDefault
().
getChosenVerilogFile
();
// Use tool top file if available, otherwise use getChosenVerilogFile() as before
String
topFile
=
null
;
if
(
topProcessor
!=
null
){
Tool
tool
=
topProcessor
.
getCurrentTool
();
if
(
tool
!=
null
)
{
topFile
=
tool
.
getTopFile
();
}
else
{
System
.
out
.
println
(
"ToolNameGenerator(): topProcessor.getCurrentTool() is null"
);
}
if
((
topFile
!=
null
)
&&
(
topFile
!=
""
)
&&
(
resource
!=
null
))
{
IResource
resource1
=
resource
.
getProject
().
getFile
(
topFile
);
if
((
resource1
!=
null
)
&&
(
resource1
.
getType
()
==
IResource
.
FILE
)){
resource
=
resource1
;
}
}
}
if
((
resource
!=
null
)
&&
(
resource
.
getType
()
==
IResource
.
FILE
))
{
if
((
resource
!=
null
)
&&
(
resource
.
getType
()
==
IResource
.
FILE
))
{
String
[]
outlineElementsNames
=
VerilogUtils
.
getTopModuleNames
((
IFile
)
resource
);
String
[]
outlineElementsNames
=
VerilogUtils
.
getTopModuleNames
((
IFile
)
resource
);
if
((
outlineElementsNames
!=
null
)
&&
(
outlineElementsNames
.
length
>
0
))
return
new
String
[]
{
outlineElementsNames
[
0
]};
if
((
outlineElementsNames
!=
null
)
&&
(
outlineElementsNames
.
length
>
0
))
return
new
String
[]
{
outlineElementsNames
[
0
]};
...
...
src/com/elphel/vdt/core/tools/generators/TopModulesNameGenerator.java
View file @
05b23006
...
@@ -30,7 +30,8 @@ import org.eclipse.core.resources.IFile;
...
@@ -30,7 +30,8 @@ import org.eclipse.core.resources.IFile;
import
org.eclipse.core.resources.IResource
;
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.Tool
;
import
com.elphel.vdt.ui.variables.SelectedResourceManager
;
import
com.elphel.vdt.ui.variables.SelectedResourceManager
;
/**
/**
...
@@ -54,8 +55,24 @@ public class TopModulesNameGenerator extends AbstractGenerator {
...
@@ -54,8 +55,24 @@ public class TopModulesNameGenerator extends AbstractGenerator {
return
NAME
;
return
NAME
;
}
}
protected
String
[]
getStringValues
()
{
protected
String
[]
getStringValues
()
{
// IResource resource = SelectedResourceManager.getDefault().getSelectedVerilogFile();
IResource
resource
=
SelectedResourceManager
.
getDefault
().
getChosenVerilogFile
();
IResource
resource
=
SelectedResourceManager
.
getDefault
().
getChosenVerilogFile
();
// Use tool top file if available, otherwise use getChosenVerilogFile() as before
String
topFile
=
null
;
if
(
topProcessor
!=
null
){
Tool
tool
=
topProcessor
.
getCurrentTool
();
if
(
tool
!=
null
)
{
topFile
=
tool
.
getTopFile
();
}
else
{
System
.
out
.
println
(
"ToolNameGenerator(): topProcessor.getCurrentTool() is null"
);
}
if
((
topFile
!=
null
)
&&
(
topFile
!=
""
)
&&
(
resource
!=
null
))
{
IResource
resource1
=
resource
.
getProject
().
getFile
(
topFile
);
if
((
resource1
!=
null
)
&&
(
resource1
.
getType
()
==
IResource
.
FILE
)){
resource
=
resource1
;
}
}
}
if
((
resource
!=
null
)
&&
(
resource
.
getType
()
==
IResource
.
FILE
))
{
if
((
resource
!=
null
)
&&
(
resource
.
getType
()
==
IResource
.
FILE
))
{
String
[]
outlineElementsNames
=
VerilogUtils
.
getTopModuleNames
((
IFile
)
resource
);
String
[]
outlineElementsNames
=
VerilogUtils
.
getTopModuleNames
((
IFile
)
resource
);
if
((
outlineElementsNames
!=
null
)
&&
(
outlineElementsNames
.
length
>
0
))
return
outlineElementsNames
;
if
((
outlineElementsNames
!=
null
)
&&
(
outlineElementsNames
.
length
>
0
))
return
outlineElementsNames
;
...
...
tools/Xilinx_Vivado/vivado_synthesis.xml
View file @
05b23006
...
@@ -338,7 +338,9 @@
...
@@ -338,7 +338,9 @@
</if>
</if>
"%MaxMsg\n"
"%MaxMsg\n"
"synth_design"
"synth_design"
"%top"
"%top"
<!-- "-top"
"%%TopModule" -->
<if
VivadoSynthActionIndex=
"0"
>
<if
VivadoSynthActionIndex=
"0"
>
"%name"
"%name"
<!-- "%part" -->
<!-- "%part" -->
...
...
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