From: whitequark Date: Thu, 22 Aug 2019 04:42:30 +0000 (+0000) Subject: back.rtlil: print real parameters with maximum precision. X-Git-Tag: locally_working~6 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47bad3d20e45912885819d95749a35716a824406;p=nmigen.git back.rtlil: print real parameters with maximum precision. --- diff --git a/nmigen/back/rtlil.py b/nmigen/back/rtlil.py index 3409d4c..73b05f3 100644 --- a/nmigen/back/rtlil.py +++ b/nmigen/back/rtlil.py @@ -124,7 +124,7 @@ class _ModuleBuilder(_Namer, _BufferedBuilder, _AttrBuilder): self._append(" parameter \\{} {:d}\n", param, value) elif isinstance(value, float): - self._append(" parameter real \\{} \"{:f}\"\n", + self._append(" parameter real \\{} \"{!r}\"\n", param, value) elif isinstance(value, ast.Const): self._append(" parameter \\{} {}'{:b}\n",