Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kestrel Collaboration
Kestrel LiteX
migen
Commits
16179b2f
Commit
16179b2f
authored
4 years ago
by
Astro
Committed by
Sébastien Bourdeauducq
4 years ago
Browse files
Options
Download
Email Patches
Plain Diff
vivado: split build script in two steps
parent
d1233abe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
migen/build/xilinx/vivado.py
migen/build/xilinx/vivado.py
+11
-0
No files found.
migen/build/xilinx/vivado.py
View file @
16179b2f
...
@@ -89,6 +89,7 @@ class XilinxVivadoToolchain:
...
@@ -89,6 +89,7 @@ class XilinxVivadoToolchain:
self
.
false_paths
=
set
()
self
.
false_paths
=
set
()
def
_build_batch
(
self
,
platform
,
sources
,
edifs
,
ips
,
build_name
):
def
_build_batch
(
self
,
platform
,
sources
,
edifs
,
ips
,
build_name
):
# script for step 1: place and route
tcl
=
[]
tcl
=
[]
tcl
.
append
(
"create_project -force -name {} -part {}"
.
format
(
build_name
,
platform
.
device
))
tcl
.
append
(
"create_project -force -name {} -part {}"
.
format
(
build_name
,
platform
.
device
))
tcl
.
append
(
"set_property XPM_LIBRARIES {XPM_CDC XPM_MEMORY} [current_project]"
)
tcl
.
append
(
"set_property XPM_LIBRARIES {XPM_CDC XPM_MEMORY} [current_project]"
)
...
@@ -138,12 +139,22 @@ class XilinxVivadoToolchain:
...
@@ -138,12 +139,22 @@ class XilinxVivadoToolchain:
tcl
.
append
(
"report_drc -file {}_drc.rpt"
.
format
(
build_name
))
tcl
.
append
(
"report_drc -file {}_drc.rpt"
.
format
(
build_name
))
tcl
.
append
(
"report_timing_summary -datasheet -max_paths 10 -file {}_timing.rpt"
.
format
(
build_name
))
tcl
.
append
(
"report_timing_summary -datasheet -max_paths 10 -file {}_timing.rpt"
.
format
(
build_name
))
tcl
.
append
(
"report_power -file {}_power.rpt"
.
format
(
build_name
))
tcl
.
append
(
"report_power -file {}_power.rpt"
.
format
(
build_name
))
tools
.
write_to_file
(
build_name
+
"_route.tcl"
,
"
\n
"
.
join
(
tcl
))
# script for step 2: bitstream
tcl
=
[]
for
bitstream_command
in
self
.
bitstream_commands
:
for
bitstream_command
in
self
.
bitstream_commands
:
tcl
.
append
(
bitstream_command
.
format
(
build_name
=
build_name
))
tcl
.
append
(
bitstream_command
.
format
(
build_name
=
build_name
))
tcl
.
append
(
"write_bitstream -force {}.bit "
.
format
(
build_name
))
tcl
.
append
(
"write_bitstream -force {}.bit "
.
format
(
build_name
))
for
additional_command
in
self
.
additional_commands
:
for
additional_command
in
self
.
additional_commands
:
tcl
.
append
(
additional_command
.
format
(
build_name
=
build_name
))
tcl
.
append
(
additional_command
.
format
(
build_name
=
build_name
))
tcl
.
append
(
"quit"
)
tcl
.
append
(
"quit"
)
tools
.
write_to_file
(
build_name
+
"_bitstream.tcl"
,
"
\n
"
.
join
(
tcl
))
# script that calls above steps
tcl
=
[]
tcl
.
append
(
"source
\"
{}_route.tcl
\"
"
.
format
(
build_name
))
tcl
.
append
(
"source
\"
{}_bitstream.tcl
\"
"
.
format
(
build_name
))
tools
.
write_to_file
(
build_name
+
".tcl"
,
"
\n
"
.
join
(
tcl
))
tools
.
write_to_file
(
build_name
+
".tcl"
,
"
\n
"
.
join
(
tcl
))
def
_convert_clocks
(
self
,
platform
):
def
_convert_clocks
(
self
,
platform
):
...
...
This diff is collapsed.
Click to expand it.
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