projects
/
nmigen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6737ef7
)
back.rtlil: add support for real (float) parameters on Instances.
author
Darrell Harmon
<dlharmon@users.noreply.github.com>
Thu, 22 Aug 2019 04:13:05 +0000
(22:13 -0600)
committer
whitequark
<whitequark@whitequark.org>
Thu, 22 Aug 2019 04:13:05 +0000
(
04:13
+0000)
Required for Xilinx MMCME2_BASE, etc.
nmigen/back/rtlil.py
patch
|
blob
|
history
diff --git
a/nmigen/back/rtlil.py
b/nmigen/back/rtlil.py
index 875212d195182e7e6aebf14898ba8bff5dc97dd0..3409d4cca8b04cfe6eb8932228f5cff8426dc5dc 100644
(file)
--- 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)