add configuration option for reserved behavior vsew >= 100. - #1573
Jiacheng Tong (challenger1024) wants to merge 1 commit into
Conversation
| Vsew_Fatal => reserved_behavior("vsew contains reserved value: " ^ bits_str(v) ^ "."), | ||
| // The caller will detect the return value and invoke handle_illegal_vtype(). | ||
| Vsew_Illegal => true, | ||
| } else false |
There was a problem hiding this comment.
I'm not sure about this, it seems weird that this function would have side effects.
Can we do the check when you actually write vsew instead?
There was a problem hiding this comment.
In model/extensions/V/vext_vset_insts.sail, the execute_vsetvl_type function calls is_invalid_sew_pow, and the subsequent write only occurs when the check passes. Given this control flow, I was wondering whether my modification could still introduce any unintended side effects.
There was a problem hiding this comment.
Hmm, I think I would just have one config option base.reserved_behavior.vtype, and put the code in handle_illegal_vtype. Although this technically isn't "reserved behaviour" in the sense that implementations are allowed to do anything, so I'm starting to thing we just shouldn't do this at all.
See https://riscv-isa-manual.timhutt.co.uk/riscv-unprivileged.html#_unsupported_vtype_values
There was a problem hiding this comment.
So should I close this PR?
There was a problem hiding this comment.
Yeah I think so. Sorry about that!
No description provided.