From: Florent Kermarrec Date: Mon, 22 Jun 2015 22:35:58 +0000 (+0200) Subject: fhdl/specials: add Keep SynthesisDirective X-Git-Tag: 24jan2021_ls180~2099^2~45 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d77a5fc5acffdb77e45b1df10e7b8d0f273df58b;p=litex.git fhdl/specials: add Keep SynthesisDirective --- diff --git a/migen/fhdl/specials.py b/migen/fhdl/specials.py index 7264e838..cb176a8b 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)