summaryrefslogtreecommitdiff
path: root/language
diff options
context:
space:
mode:
authorPrashanth Mundkur2019-02-07 14:30:41 -0800
committerPrashanth Mundkur2019-02-08 11:21:17 -0800
commit88c956dc0ee2e4e22c04d7a841d070cca7cca2a0 (patch)
treec25d6e7e9e9ddbfab51c63ab6a89b99a2ccbcf7e /language
parentad868ef0ad22a78021a5de91073416f69e8163d3 (diff)
Add parameterization support for bitfields.
This supports the following syntax: type xlen : Int = 64 type ylen : Int = 1 type xlenbits = bits(xlen) bitfield Mstatus : xlenbits = { SD : xlen - ylen, SXL : xlen - ylen - 1 .. xlen - ylen - 3 }
Diffstat (limited to 'language')
-rw-r--r--language/sail.ott4
1 files changed, 2 insertions, 2 deletions
diff --git a/language/sail.ott b/language/sail.ott
index 6d2760ff..7dbd3c9e 100644
--- a/language/sail.ott
+++ b/language/sail.ott
@@ -316,8 +316,8 @@ type_union :: 'Tu_' ::=
index_range :: 'BF_' ::= {{ com index specification, for bitfields in register types}}
{{ aux _ l }}
- | num :: :: 'single' {{ com single index }}
- | num1 '..' num2 :: :: range {{ com index range }}
+ | nexp :: :: 'single' {{ com single index }}
+ | nexp1 '..' nexp2 :: :: range {{ com index range }}
| index_range1 , index_range2 :: :: concat {{ com concatenation of index ranges }}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%