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
2484eaf1
Commit
2484eaf1
authored
Apr 06, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
processing ports in the tool output
parent
c2d1f2e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
17 deletions
+13
-17
parser_vivado.py
parsers/parser_vivado.py
+12
-16
vivado_proto.xml
tools/Xilinx_Vivado/vivado_proto.xml
+1
-1
No files found.
parsers/parser_vivado.py
View file @
2484eaf1
...
@@ -6,9 +6,11 @@ pattern=re.compile("\[[^[:]*:\d*]")
...
@@ -6,9 +6,11 @@ pattern=re.compile("\[[^[:]*:\d*]")
START_REF
=
"(
\\
"
START_REF
=
"(
\\
"
END_REF
=
" )"
END_REF
=
" )"
patternFlatRef
=
re
.
compile
(
"
\
(([A-Za-z_$][A-Za-z_$0-9]*)
\
)"
)
patternModule
=
re
.
compile
(
"module ([A-Za-z_$][A-Za-z_$0-9:]*)
\
."
)
patternHierRef
=
re
.
compile
(
"
\
(
\\
\
(
\
S*)
\
)"
)
patternModule
=
re
.
compile
(
"module ([A-Za-z_$][A-Za-z_$0-9]*)
\
."
)
patternFlatRef
=
re
.
compile
(
"(
\
(([A-Za-z_$][A-Za-z_$0-9]*)
\
))"
)
patternHierRef
=
re
.
compile
(
"(
\
(
\\
\
(
\
S*)
\
))"
)
patternPin
=
re
.
compile
(
"pin (([A-Za-z_$][A-Za-z_$0-9:]*:[A-Za-z_$][A-Za-z_$0-9:]*(
\
[
\
d*])* ))"
)
#PREFIX_REF="@{"
#PREFIX_REF="@{"
#SUFFIX_REF="}@"
#SUFFIX_REF="}@"
...
@@ -52,22 +54,16 @@ def hasFileVivado(string): # [*:*]
...
@@ -52,22 +54,16 @@ def hasFileVivado(string): # [*:*]
return
False
return
False
def
getLineSignalBit
(
string
):
def
getLineSignalBit
(
string
):
# sys.stdout.write(START_REF)
pref
=
""
m
=
patternHierRef
.
search
(
string
)
m
=
patternHierRef
.
search
(
string
)
if
not
m
:
if
not
m
:
m
=
patternFlatRef
.
search
(
string
)
m
=
patternFlatRef
.
search
(
string
)
# if START_REF in string:
if
not
m
:
m
=
patternPin
.
search
(
string
)
pref
=
"#"
if
m
:
if
m
:
# start = string.find(START_REF)
line
=
string
[:
m
.
start
(
1
)]
+
PREFIX_REF
+
pref
+
"
%
s"
+
SUFFIX_REF
+
string
[
m
.
end
(
1
):]
# end = string.find(END_REF,start)
ref
=
m
.
group
(
2
)
# if end <0:
# return None
# line=string[:start]+PREFIX_REF+"%s"+SUFFIX_REF+string[end+len(END_REF):]
# ref=string[start+len(START_REF):end]
line
=
string
[:
m
.
start
(
0
)]
+
PREFIX_REF
+
"
%
s"
+
SUFFIX_REF
+
string
[
m
.
end
(
0
):]
# ref=string[m.start(1):m.end(1)]
ref
=
m
.
group
(
1
)
# replace "/" (used in Xilinx Vivado) with "." for Verilog
ref
=
ref
.
replace
(
"/"
,
"."
)
ref
=
ref
.
replace
(
"/"
,
"."
)
if
"["
in
ref
:
if
"["
in
ref
:
bitStart
=
ref
.
find
(
"["
)
bitStart
=
ref
.
find
(
"["
)
...
@@ -124,7 +120,7 @@ def printLineRef(pRef):
...
@@ -124,7 +120,7 @@ def printLineRef(pRef):
if
ranges
:
if
ranges
:
# line=pRef[0]
# line=pRef[0]
ref
=
pRef
[
1
];
ref
=
pRef
[
1
];
if
mod
:
if
mod
and
not
":"
in
ref
:
ref
=
mod
+
"."
+
ref
ref
=
mod
+
"."
+
ref
for
rng
in
ranges
:
for
rng
in
ranges
:
if
(
rng
[
0
]
<
0
):
if
(
rng
[
0
]
<
0
):
...
...
tools/Xilinx_Vivado/vivado_proto.xml
View file @
2484eaf1
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<parameter
id=
"InstanceCapture"
label=
"Instance capture"
<parameter
id=
"InstanceCapture"
label=
"Instance capture"
tooltip=
"Regular expression to extract hierarchical instance name (outer '()' enclose the hierarchical name itself)"
tooltip=
"Regular expression to extract hierarchical instance name (outer '()' enclose the hierarchical name itself)"
default=
"((([
a-zA-Z_]([a-zA-Z_0-9]|\[[0-9:]+\])*)\.)+([a-zA-Z_]([a-zA-Z_
0-9]|\[[0-9:]+\])*))"
default=
"((([
#a-zA-Z_$]([a-zA-Z_$0-9]|\[[0-9:]+\])*)(\.|:))+([a-zA-Z_$]([a-zA-Z_$
0-9]|\[[0-9:]+\])*))"
visible=
"true"
type=
"String"
format=
"CopyValue"
/>
visible=
"true"
type=
"String"
format=
"CopyValue"
/>
<parameter
id=
"InstanceSeparator"
label=
"Instance separator"
<parameter
id=
"InstanceSeparator"
label=
"Instance separator"
tooltip=
"Regular expression to extract hierarchical name separator, for literal '.' it is '\.'"
tooltip=
"Regular expression to extract hierarchical name separator, for literal '.' it is '\.'"
...
...
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