From fa741f54fdeaac48af277f9e4972214f8f41cd51 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 25 Nov 2013 12:09:51 +0100 Subject: [PATCH] specials/Instance: add PreformattedParam --- migen/fhdl/specials.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/migen/fhdl/specials.py b/migen/fhdl/specials.py index 32afda62..ad11f578 100644 --- a/migen/fhdl/specials.py +++ b/migen/fhdl/specials.py @@ -86,6 +86,8 @@ class Instance(Special): def __init__(self, name, value): self.name = name self.value = value + class PreformattedParam(str): + pass def __init__(self, of, *items, name="", **kwargs): Special.__init__(self) @@ -135,6 +137,8 @@ class Instance(Special): r += verilog_printexpr(ns, p.value)[0] elif isinstance(p.value, float): r += str(p.value) + elif isinstance(p.value, Instance.PreformattedParam): + r += p.value elif isinstance(p.value, str): r += "\"" + p.value + "\"" else: -- 2.30.2