diff --git a/migen/fhdl/specials.py b/migen/fhdl/specials.py index 7264e8386..cb176a8bc 100644 --- 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)