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
ca5ee584
Commit
ca5ee584
authored
8 years ago
by
Sebastien Bourdeauducq
Browse files
Options
Download
Email Patches
Plain Diff
vivado: keep -> dont_touch
parent
20ef4805
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
migen/build/xilinx/platform.py
migen/build/xilinx/platform.py
+3
-0
migen/build/xilinx/vivado.py
migen/build/xilinx/vivado.py
+8
-0
No files found.
migen/build/xilinx/platform.py
View file @
ca5ee584
from
migen.fhdl.specials
import
Keep
from
migen.build.generic_platform
import
GenericPlatform
from
migen.build.xilinx
import
common
,
vivado
,
ise
...
...
@@ -18,6 +19,8 @@ class XilinxPlatform(GenericPlatform):
so
=
dict
(
common
.
xilinx_special_overrides
)
if
self
.
device
[:
3
]
==
"xc7"
:
so
.
update
(
common
.
xilinx_s7_special_overrides
)
if
isinstance
(
self
.
toolchain
,
vivado
.
XilinxVivadoToolchain
):
so
[
Keep
]
=
vivado
.
VivadoKeep
so
.
update
(
special_overrides
)
return
GenericPlatform
.
get_verilog
(
self
,
*
args
,
special_overrides
=
so
,
**
kwargs
)
...
...
This diff is collapsed.
Click to expand it.
migen/build/xilinx/vivado.py
View file @
ca5ee584
...
...
@@ -6,6 +6,7 @@ import subprocess
import
sys
from
migen.fhdl.structure
import
_Fragment
from
migen.fhdl.specials
import
SynthesisDirective
from
migen.build.generic_platform
import
*
from
migen.build
import
tools
from
migen.build.xilinx
import
common
...
...
@@ -70,6 +71,13 @@ def _run_vivado(build_name, vivado_path, source, ver=None):
raise
OSError
(
"Subprocess failed"
)
class
VivadoKeep
:
@
staticmethod
def
emit_verilog
(
directive
,
ns
,
add_data_file
):
sig_name
=
ns
.
get_name
(
directive
.
signals
[
"s"
])
return
"// synthesis attribute dont_touch of "
+
sig_name
+
" is true
\n
"
class
XilinxVivadoToolchain
:
def
__init__
(
self
):
self
.
bitstream_commands
=
[]
...
...
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