aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-04-14 03:25:22 +0000
committerwhitequark <whitequark@whitequark.org>2020-04-15 14:14:50 +0000
commit2106f78bb14eab6c234a0a367ec32ff6680fc6d9 (patch)
treedfe37680bcce6a05d8974e3645fc7afc1ca9f0cb /README.md
parentf44b287f8e36684607447beb05556f1a5a34d625 (diff)
downloadyosys-2106f78bb14eab6c234a0a367ec32ff6680fc6d9.tar.gz
yosys-2106f78bb14eab6c234a0a367ec32ff6680fc6d9.tar.bz2
yosys-2106f78bb14eab6c234a0a367ec32ff6680fc6d9.zip
ast/simplify: improve enum handling.
Before this commit, enum values were serialized as attributes of form \enum_<width>_<value> where <value> was a decimal signed integer. This has multiple drawbacks: * Enums with large values would be hard to process for downstream tooling that cannot parse arbitrary precision decimals. (In fact Yosys also did not correctly process enums with large values, and would overflow `int`.) * Enum value attributes were not confined to their own namespace, making it harder for downstream tooling to enumerate all such attributes, as opposed to looking up any specific value. * Enum values could not include x or z, which are explicitly permitted in the SystemVerilog standard. After this commit, enum values are serialized as attributes of form \enum_value_<value> where <value> is a bit sequence of the appropriate width.
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index ce7b26411..0a81d8bb9 100644
--- a/README.md
+++ b/README.md
@@ -443,8 +443,8 @@ Verilog Attributes and non-standard features
- The ``wiretype`` attribute is added by the verilog parser for wires of a
typedef'd type to indicate the type identifier.
-- Various ``enum_{width}_{value}`` attributes are added to wires of an
- enumerated type to give a map of possible enum items to their values.
+- Various ``enum_value_{value}`` attributes are added to wires of an enumerated type
+ to give a map of possible enum items to their values.
- The ``enum_base_type`` attribute is added to enum items to indicate which
enum they belong to (enums -- anonymous and otherwise -- are