fhdl/specials: add Keep SynthesisDirective

This commit is contained in:
Florent Kermarrec 2015-06-23 00:35:58 +02:00
parent 71627cf9f0
commit d77a5fc5ac
1 changed files with 5 additions and 0 deletions

View File

@ -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)