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
eb6ffffc
Commit
eb6ffffc
authored
Jul 10, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More changes when working with cocotb
parent
e3c85766
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
9 deletions
+56
-9
parser_cocotb_icarus.py
parsers/parser_cocotb_icarus.py
+33
-3
Cocotb.xml
tools/Verilog/Cocotb.xml
+23
-6
No files found.
parsers/parser_cocotb_icarus.py
View file @
eb6ffffc
...
@@ -43,6 +43,10 @@ RAISED_EXCEPTION="raised exception:"
...
@@ -43,6 +43,10 @@ RAISED_EXCEPTION="raised exception:"
COMMA_LINE
=
", line"
COMMA_LINE
=
", line"
state
=
None
# None - pass, cocotb - collecting Cocotb problem, python- just raw python problem
state
=
None
# None - pass, cocotb - collecting Cocotb problem, python- just raw python problem
lines
=
[]
lines
=
[]
PATTERN_PS
=
re
.
compile
(
r"(\d+\.\d+) ps"
)
PATTERN_FILE_LINE
=
re
.
compile
(
'([
\
w/-]*
\
.[v|V][hH]?):
\
s*([0-9]+)'
)
TRUNCATE_PATH
=
True
NS_FORMAT
=
"
%10.3
fns"
def
report_python
(
lines
):
def
report_python
(
lines
):
err_msg
=
lines
[
0
]
err_msg
=
lines
[
0
]
for
i
in
range
((
len
(
lines
)
-
1
)
//
2
):
for
i
in
range
((
len
(
lines
)
-
1
)
//
2
):
...
@@ -59,6 +63,34 @@ def report_python(lines):
...
@@ -59,6 +63,34 @@ def report_python(lines):
for
line
in
iter
(
sys
.
stdin
.
readline
,
''
):
for
line
in
iter
(
sys
.
stdin
.
readline
,
''
):
sline
=
line
.
strip
()
sline
=
line
.
strip
()
#Replace picoseconds with nanoseconds
ps
=
PATTERN_PS
.
match
(
sline
)
while
ps
:
try
:
ns
=
NS_FORMAT
%
(
0.001
*
float
(
ps
.
group
(
1
)))
except
:
break
sline
=
sline
[:
ps
.
start
(
0
)]
+
ns
+
sline
[
ps
.
end
(
0
):]
ps
=
PATTERN_PS
.
match
(
sline
)
#Recognize verilog file:line and get rid of spaces between them
fl
=
PATTERN_FILE_LINE
.
search
(
sline
)
if
fl
:
if
fl
.
start
(
0
)
!=
0
:
#Icarus compiler output, keep as is (controlled by warnings/errors/sorry
#lsof -i TCP| fgrep LISTEN
fname
=
fl
.
group
(
1
)
if
TRUNCATE_PATH
:
try
:
lastSlashIndex
=
fname
.
rindex
(
'/'
)
fname
=
fname
[
lastSlashIndex
+
1
:]
except
:
pass
subl
=
"SIM:
%20
s:
%4
d in simulator "
%
(
fname
,
int
(
fl
.
group
(
2
)))
sline
=
sline
[:
fl
.
start
(
0
)]
+
subl
+
sline
[
fl
.
end
(
0
):]
if
state
==
"cocotb"
:
if
state
==
"cocotb"
:
if
(
len
(
lines
)
%
2
==
0
)
or
sline
.
startswith
(
'File "'
):
if
(
len
(
lines
)
%
2
==
0
)
or
sline
.
startswith
(
'File "'
):
lines
.
append
(
sline
)
lines
.
append
(
sline
)
...
@@ -87,11 +119,9 @@ for line in iter(sys.stdin.readline,''):
...
@@ -87,11 +119,9 @@ for line in iter(sys.stdin.readline,''):
lines
=
[
sline
]
lines
=
[
sline
]
sys
.
stdout
.
write
(
line
)
sys
.
stdout
.
write
(
line
)
continue
continue
else
:
else
:
sys
.
stdout
.
write
(
line
)
sys
.
stdout
.
write
(
sline
+
"
\n
"
)
...
...
tools/Verilog/Cocotb.xml
View file @
eb6ffffc
...
@@ -265,6 +265,9 @@
...
@@ -265,6 +265,9 @@
<parameter
id=
"ShowInfo"
type=
"BoolYesNo"
format=
"None"
<parameter
id=
"ShowInfo"
type=
"BoolYesNo"
format=
"None"
default=
"true"
label=
"Show info messages"
/>
default=
"true"
label=
"Show info messages"
/>
<parameter
id=
"ShowSim"
type=
"BoolYesNo"
format=
"None"
default=
"true"
label=
"Show Simulator"
tooltip=
"Show simulator output with filename/line"
/>
<parameter
id=
"FilterParser"
type=
"BoolYesNo"
format=
"None"
<parameter
id=
"FilterParser"
type=
"BoolYesNo"
format=
"None"
default=
"true"
label=
"Filter simulation output with an external parser"
/>
default=
"true"
label=
"Filter simulation output with an external parser"
/>
...
@@ -316,7 +319,7 @@
...
@@ -316,7 +319,7 @@
default=
"(.*):([0-9]+): [a-z_\- ]*[warning|sorry]: (.*)"
default=
"(.*):([0-9]+): [a-z_\- ]*[warning|sorry]: (.*)"
visible=
"true"
type=
"String"
format=
"CopyValue"
/>
visible=
"true"
type=
"String"
format=
"CopyValue"
/>
<parameter
id=
"PatternInfo"
label=
"Info"
tooltip=
"Regular expression for info messages"
<parameter
id=
"PatternInfo"
label=
"Info"
tooltip=
"Regular expression for info messages"
default=
".*[\s.](
\w*\.py):
([0-9]+)\s*\S*\s*\S*\s*(.*)"
default=
".*[\s.](
[\w-]*\.py|[\w/-]*\.[v|V][hH]?):\s*
([0-9]+)\s*\S*\s*\S*\s*(.*)"
visible=
"true"
type=
"String"
format=
"CopyValue"
/>
visible=
"true"
type=
"String"
format=
"CopyValue"
/>
...
@@ -388,6 +391,15 @@
...
@@ -388,6 +391,15 @@
format=
"CopyValue"
default=
""
visible=
"true"
/>
format=
"CopyValue"
default=
""
visible=
"true"
/>
</if-not>
</if-not>
<if
ShowSim=
"true"
>
<parameter
id=
"GrepSim"
type=
"String"
label =
"GrepSim"
format=
"CopyValue"
default=
"|SIM:"
visible=
"true"
/>
</if>
<if-not
ShowSim=
"true"
>
<parameter
id=
"GrepSim"
type=
"String"
label =
"GrepSim"
format=
"CopyValue"
default=
""
visible=
"true"
/>
</if-not>
<if
ShowInfo=
"true"
>
<if
ShowInfo=
"true"
>
<parameter
id=
"GrepInfo"
type=
"String"
label =
"GrepInfo"
<parameter
id=
"GrepInfo"
type=
"String"
label =
"GrepInfo"
format=
"CopyValue"
default=
"|info|INFO"
visible=
"true"
/>
format=
"CopyValue"
default=
"|info|INFO"
visible=
"true"
/>
...
@@ -408,8 +420,10 @@
...
@@ -408,8 +420,10 @@
<parameter
id=
"GrepEWI"
type=
"String"
label =
"GrepWarning"
<parameter
id=
"GrepEWI"
type=
"String"
label =
"GrepWarning"
format=
"GrepFindSyntax"
default=
"error|ERROR%GrepWarning%GrepInfo%GrepDebug"
visible=
"true"
readonly=
"true"
/>
format=
"GrepFindSyntax"
default=
"error|ERROR%GrepWarning%GrepInfo%GrepDebug
%GrepSim
"
visible=
"true"
readonly=
"true"
/>
<parameter
id=
"SIMULATION_PATH"
type=
"String"
format=
"MakefileExport"
default=
"%%ProjectPath/%SimulDir"
visible=
"false"
/>
<input>
<input>
...
@@ -446,6 +460,7 @@
...
@@ -446,6 +460,7 @@
"ShowNoProblem"
"ShowNoProblem"
"ShowWarnings"
"ShowWarnings"
"ShowInfo"
"ShowInfo"
"ShowSim"
"RemoveBugs"
"RemoveBugs"
"SaveLogsPreprocessor"
"SaveLogsPreprocessor"
"SaveLogsSimulator"
"SaveLogsSimulator"
...
@@ -508,9 +523,11 @@
...
@@ -508,9 +523,11 @@
errors=
"PatternErrors"
errors=
"PatternErrors"
warnings=
"PatternWarnings"
warnings=
"PatternWarnings"
info=
"PatternInfo"
info=
"PatternInfo"
failure =
"
ERROR|
CRITICAL"
failure =
"CRITICAL"
>
>
"%Param_Shell_Options"
<!-- failure = "ERROR|CRITICAL"
-->
"%Param_Shell_Options"
"%Param_PreExe"
"%Param_PreExe"
<!-- MKDIR - ALWAYS -->
<!-- MKDIR - ALWAYS -->
"mkdir -p"
"mkdir -p"
...
@@ -528,7 +545,7 @@
...
@@ -528,7 +545,7 @@
"%%ProjectPath/%LogFileFull"
"%%ProjectPath/%LogFileFull"
</if>
</if>
<if
FilterParser=
"true"
>
<if
FilterParser=
"true"
>
"|python -u %parsers_path
/
%parser_name"
"|python -u %parsers_path%parser_name"
</if>
</if>
<if
ShowNoProblem=
"false"
>
<if
ShowNoProblem=
"false"
>
"%GrepEWI"
"%GrepEWI"
...
@@ -580,7 +597,7 @@
...
@@ -580,7 +597,7 @@
"%CocotbRANDOM_SEED"
"%CocotbRANDOM_SEED"
"%COCOTB_DEBUG"
"%COCOTB_DEBUG"
"%COCOTB_ANSI_OUTPUT"
"%COCOTB_ANSI_OUTPUT"
"%SIMULATION_PATH"
"%CocotbVERILOG_SOURCES"
"%CocotbVERILOG_SOURCES"
"%CocotbExtraFiles"
"%CocotbExtraFiles"
"%CocotbVHDL_SOURCES"
"%CocotbVHDL_SOURCES"
...
...
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