From: Arnaud Durand Date: Thu, 19 Dec 2019 08:03:12 +0000 (+0100) Subject: Add integer attributes X-Git-Tag: 24jan2021_ls180~792^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=94e239ff13325a332dd5a3932ff08bc0426b5d44;p=litex.git Add integer attributes --- diff --git a/litex/gen/fhdl/verilog.py b/litex/gen/fhdl/verilog.py index 0e34af26..e1bd8da4 100644 --- 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