From 1d9e83b76a6db63a39fa17c07eee852f54c6f02a Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 22 Aug 2019 04:42:30 +0000 Subject: [PATCH] back.rtlil: print real parameters with maximum precision. --- nmigen/back/rtlil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", -- 2.30.2