From: whitequark Date: Thu, 22 Aug 2019 04:42:30 +0000 (+0000) Subject: back.rtlil: print real parameters with maximum precision. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d9e83b76a6db63a39fa17c07eee852f54c6f02a;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",