Skip to content

Commit

Permalink
Add integer attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
DurandA authored and sbourdeauducq committed Dec 17, 2019
1 parent 46177e5 commit 811d135
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion migen/fhdl/verilog.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,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
Expand Down

0 comments on commit 811d135

Please sign in to comment.