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
36f7e18a
Commit
36f7e18a
authored
4 years ago
by
Astro
Committed by
Sébastien Bourdeauducq
4 years ago
Browse files
Options
Download
Email Patches
Plain Diff
xilinx: add copy_ips()
parent
f56ba262
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
migen/build/xilinx/platform.py
migen/build/xilinx/platform.py
+14
-0
migen/build/xilinx/vivado.py
migen/build/xilinx/vivado.py
+1
-1
No files found.
migen/build/xilinx/platform.py
View file @
36f7e18a
import
os
import
shutil
from
migen.build.generic_platform
import
GenericPlatform
from
migen.build.xilinx
import
common
,
vivado
,
ise
...
...
@@ -24,6 +25,19 @@ class XilinxPlatform(GenericPlatform):
def
add_ip
(
self
,
filename
):
self
.
ips
.
add
((
os
.
path
.
abspath
(
filename
)))
def
copy_ips
(
self
,
build_dir
,
subdir
=
"ip"
):
copied_ips
=
set
()
target
=
os
.
path
.
join
(
build_dir
,
subdir
)
os
.
makedirs
(
target
,
exist_ok
=
True
)
for
filename
in
self
.
ips
:
path
=
os
.
path
.
join
(
subdir
,
os
.
path
.
basename
(
filename
))
dest
=
os
.
path
.
join
(
build_dir
,
path
)
shutil
.
copyfile
(
filename
,
dest
)
copied_ips
.
add
(
path
)
return
copied_ips
def
get_verilog
(
self
,
*
args
,
special_overrides
=
dict
(),
**
kwargs
):
so
=
dict
(
common
.
xilinx_special_overrides
)
if
self
.
device
[:
3
]
==
"xc6"
:
...
...
This diff is collapsed.
Click to expand it.
migen/build/xilinx/vivado.py
View file @
36f7e18a
...
...
@@ -211,7 +211,7 @@ class XilinxVivadoToolchain:
v_output
.
write
(
v_file
)
sources
=
platform
.
copy_sources
(
build_dir
)
|
{(
v_file
,
"verilog"
,
"work"
)}
edifs
=
platform
.
edifs
ips
=
platform
.
ips
ips
=
platform
.
copy_ips
(
build_dir
)
self
.
_build_batch
(
platform
,
sources
,
edifs
,
ips
,
build_name
,
build_dir
)
tools
.
write_to_file
(
build_name
+
".xdc"
,
_build_xdc
(
named_sc
,
named_pc
))
if
run
:
...
...
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