Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
tapasco
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
52
Issues
52
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tapasco
tapasco
Commits
493cc597
Commit
493cc597
authored
Jan 24, 2019
by
Jaco Hofmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add script to show progress of Vivado run
parent
12c72f68
Pipeline
#780
passed with stage
in 6 minutes and 30 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
1 deletion
+62
-1
bin/vivado_progress
bin/vivado_progress
+61
-0
src/main/scala/tapasco/activity/composers/VivadoComposer.scala
...ain/scala/tapasco/activity/composers/VivadoComposer.scala
+1
-1
No files found.
bin/vivado_progress
0 → 100755
View file @
493cc597
#!/usr/bin/python
default_version
=
"v2017.4"
stages
=
{
"v2017.4"
:
[
"Calling pre-header plugins"
,
"Subsystem tapasco complete."
,
"Event pre-wrapper finished."
,
"Starting RTL Elaboration"
,
"Finished RTL Component Statistics "
,
"Starting Routing Task"
,
"Phase 1"
,
"Phase 2"
,
"Phase 3"
,
"Phase 4"
,
"Phase 5"
,
"Phase 6"
,
"Phase 7"
,
"Phase 8"
,
"Phase 9"
,
"Phase 10"
,
"Routing Is Done."
,
"write_bitstream completed successfully"
]}
import
argparse
parser
=
argparse
.
ArgumentParser
(
description
=
'Parse Vivado log and show progress information'
)
parser
.
add_argument
(
'log_file'
,
type
=
str
,
help
=
'A Vivado log file'
)
args
=
parser
.
parse_args
()
import
re
import
sys
from
tqdm
import
tqdm
import
time
def
fetch_vivado_version
(
filename
):
with
open
(
filename
,
'r'
)
as
f
:
pattern
=
re
.
compile
(
"# Vivado (v[0-9]+
\
.[0-9])"
)
for
line
in
f
:
m
=
pattern
.
search
(
line
)
if
m
:
return
m
.
group
(
1
)
else
:
print
(
"Failed to determine Vivado version in {}"
.
format
(
filename
))
sys
.
exit
(
1
)
version
=
fetch_vivado_version
(
args
.
log_file
)
print
(
"Found Vivado Version {}"
.
format
(
version
))
if
version
not
in
stages
:
print
(
"Vivado version {} is unknown. Resetting to default version {}"
.
format
(
version
,
default_version
))
version
=
default_version
current_line
=
0
f
=
open
(
args
.
log_file
,
'r'
)
stage
=
stages
[
version
]
with
tqdm
(
total
=
len
(
stage
))
as
pbar
:
for
p
in
stage
:
searching
=
True
pattern
=
re
.
compile
(
".*"
+
p
+
".*"
)
while
searching
:
line
=
f
.
readline
()
while
line
==
''
:
# Poor mans iNotify...
pos
=
f
.
tell
()
f
.
close
()
time
.
sleep
(
0.1
)
f
=
open
(
args
.
log_file
,
'r'
)
f
.
seek
(
pos
)
line
=
f
.
readline
()
current_line
+=
1
pbar
.
set_description
(
'Line {}'
.
format
(
current_line
))
m
=
pattern
.
search
(
line
)
if
m
:
searching
=
False
pbar
.
update
(
1
)
break
f
.
close
()
\ No newline at end of file
src/main/scala/tapasco/activity/composers/VivadoComposer.scala
View file @
493cc597
...
...
@@ -65,7 +65,7 @@ class VivadoComposer()(implicit cfg: Configuration) extends Composer {
target
=
target
,
composition
=
composition
(
bd
,
target
))
logger
.
info
(
"Vivado starting run {}:
output in {}
"
,
files
.
runName
:
Any
,
files
.
logFile
)
logger
.
info
(
"Vivado starting run {}:
show progress with `vivado_progress {}`
"
,
files
.
runName
:
Any
,
files
.
logFile
)
files
.
logFile
.
toFile
.
delete
cfg
.
verbose
foreach
{
mode
=>
logger
.
info
(
"verbose mode {} is active, starting to watch {}"
,
mode
:
Any
,
files
.
logFile
)
...
...
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