diff --git a/nmigen/back/rtlil.py b/nmigen/back/rtlil.py index 7806ace3..9869c61d 100644 --- a/nmigen/back/rtlil.py +++ b/nmigen/back/rtlil.py @@ -128,8 +128,8 @@ def cell(self, kind, name=None, params={}, ports={}, attrs={}, src=""): self._append(" parameter \\{} \"{}\"\n", param, value.translate(self._escape_map)) elif isinstance(value, int): - self._append(" parameter \\{} {:d}\n", - param, value) + self._append(" parameter \\{} {}'{:b}\n", + param, bits_for(value), value) elif isinstance(value, float): self._append(" parameter real \\{} \"{!r}\"\n", param, value)