summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorAlasdair Armstrong2019-12-10 17:28:32 +0000
committerAlasdair Armstrong2019-12-10 17:33:22 +0000
commitb48403b1b91ac355e50e7ede8164c3045b440dc4 (patch)
tree441476199ccc746f0ef6653e40ed22e8329089f8 /.github
parent4ca7f488fb6b3bf1d708bfe42bc26e9d83542969 (diff)
Introduce new bitfield syntax for ASL translation
Now we less desugared ASL we'd like to translate some notions more idiomatically, such as bitfields with names. However the current bitfield implementation in Sail is really ugly (entirely my fault) This commit introduces a new flag -new_bitfields which changes the behavior of bitfields as follows bitfield B : bits(32) = { Field: 7..0 } Is now treated as a struct with a single field called `bits` register R : B function main() -> unit = { R[Field] = 0xFF; assert(R[Field] == 0xFF) } then desugars as R.bits[7..0] = 0xFF and assert(R.bits[7..0] == 0xFF) which is much simpler, matches ASL and is probably how it should have worked all along
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions