projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8c5821
)
Add integer attributes
author
Arnaud Durand
<arnaud.durand@unifr.ch>
Thu, 19 Dec 2019 08:03:12 +0000
(09:03 +0100)
committer
Arnaud Durand
<arnaud.durand@unifr.ch>
Thu, 19 Dec 2019 08:03:12 +0000
(09:03 +0100)
litex/gen/fhdl/verilog.py
patch
|
blob
|
history
diff --git
a/litex/gen/fhdl/verilog.py
b/litex/gen/fhdl/verilog.py
index 0e34af26fcd79dfda1bc0bf5a78c81dc4b26ab76..e1bd8da4e6d9ebf2318cbd6dca405d15937f9804 100644
(file)
--- a/
litex/gen/fhdl/verilog.py
+++ b/
litex/gen/fhdl/verilog.py
@@
-210,7
+210,8
@@
def _printattr(attr, attr_translate):
if not firsta:
r += ", "
firsta = False
- r += attr_name + " = \"" + attr_value + "\""
+ const_expr = "\"" + attr_value + "\"" if not isinstance(attr_value, int) else str(attr_value)
+ r += attr_name + " = " + const_expr
if r:
r = "(* " + r + " *)"
return r