From: Darrell Harmon Date: Thu, 22 Aug 2019 04:13:05 +0000 (-0600) Subject: back.rtlil: add support for real (float) parameters on Instances. X-Git-Tag: locally_working~7 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aefde85031bee5fad869fcdeab5d0f6876475b8d;p=nmigen.git back.rtlil: add support for real (float) parameters on Instances. Required for Xilinx MMCME2_BASE, etc. --- diff --git a/nmigen/back/rtlil.py b/nmigen/back/rtlil.py index 875212d..3409d4c 100644 --- a/nmigen/back/rtlil.py +++ b/nmigen/back/rtlil.py @@ -123,6 +123,9 @@ class _ModuleBuilder(_Namer, _BufferedBuilder, _AttrBuilder): elif isinstance(value, int): self._append(" parameter \\{} {:d}\n", param, value) + elif isinstance(value, float): + self._append(" parameter real \\{} \"{:f}\"\n", + param, value) elif isinstance(value, ast.Const): self._append(" parameter \\{} {}'{:b}\n", param, len(value), value.value)