diff options
| author | Prashanth Mundkur | 2019-02-07 14:30:41 -0800 |
|---|---|---|
| committer | Prashanth Mundkur | 2019-02-08 11:21:17 -0800 |
| commit | 88c956dc0ee2e4e22c04d7a841d070cca7cca2a0 (patch) | |
| tree | c25d6e7e9e9ddbfab51c63ab6a89b99a2ccbcf7e /language | |
| parent | ad868ef0ad22a78021a5de91073416f69e8163d3 (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.ott | 4 |
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 }} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
