projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71627cf
)
fhdl/specials: add Keep SynthesisDirective
author
Florent Kermarrec
<florent@enjoy-digital.fr>
Mon, 22 Jun 2015 22:35:58 +0000
(
00:35
+0200)
committer
Florent Kermarrec
<florent@enjoy-digital.fr>
Tue, 23 Jun 2015 14:14:42 +0000
(16:14 +0200)
migen/fhdl/specials.py
patch
|
blob
|
history
diff --git
a/migen/fhdl/specials.py
b/migen/fhdl/specials.py
index 7264e83866534294fb867857927d0f3a7dcc45e0..cb176a8bccb1161f806d660a7d78bd1e6994437c 100644
(file)
--- a/
migen/fhdl/specials.py
+++ b/
migen/fhdl/specials.py
@@
-337,3
+337,8
@@
class SynthesisDirective(Special):
name_dict = dict((k, ns.get_name(sig)) for k, sig in directive.signals.items())
formatted = directive.template.format(**name_dict)
return "// synthesis " + formatted + "\n"
+
+
+class Keep(SynthesisDirective):
+ def __init__(self, signal):
+ SynthesisDirective.__init__(self, "attribute keep of {s} is true", s=signal)