verilog: support for float parameters in instances
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 17 Dec 2011 13:59:27 +0000 (14:59 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 17 Dec 2011 13:59:27 +0000 (14:59 +0100)
migen/fhdl/verilog.py

index cb43810b1e94213c959dc245531b2840cca84903..ac9892f3543a0637f090669b8c9bc962a751a0c1 100644 (file)
@@ -90,7 +90,7 @@ def _printinstances(ns, i, clk, rst):
                                        r += ",\n"
                                firstp = False
                                r += "\t." + p[0] + "("
-                               if isinstance(p[1], int) or isinstance(p[1], Constant):
+                               if isinstance(p[1], int) or isinstance(p[1], float) or isinstance(p[1], Constant):
                                        r += str(p[1])
                                elif isinstance(p[1], str):
                                        r += "\"" + p[1] + "\""