From d77a5fc5acffdb77e45b1df10e7b8d0f273df58b Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 23 Jun 2015 00:35:58 +0200 Subject: [PATCH] fhdl/specials: add Keep SynthesisDirective --- migen/fhdl/specials.py | 5 +++++ 1 file changed, 5 insertions(+) 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)