The Sail (pseudo)code needs to be updated. The code looks mostly fine, but there are a few things that are incorrect. I know this is pseudocode, but since the actual implementation is quite similar, I think it would be better to use the actual code wherever possible and keep the pseudocode as close to the implementation as possible.
For example:
sext_or_truncate_to_sew does not exist. The model uses get_scalar(rs1, SEW), see model/extensions/V/vext_utils_insts.sail.
match suffix { "vv" => ..., "vx" => ... } uses a suffix variable that is never defined.
let (result, mask) = init_masked_result(...) followed by result[i] = ... does not work because let bindings are immutable.
- ...
Here is the latest code:
https://github.com/riscv/sail-riscv/pull/1886/changes
Any thoughts on this Andrew Waterman (@aswaterman) Prashanth Mundkur (@pmundkur)?
The Sail (pseudo)code needs to be updated. The code looks mostly fine, but there are a few things that are incorrect. I know this is pseudocode, but since the actual implementation is quite similar, I think it would be better to use the actual code wherever possible and keep the pseudocode as close to the implementation as possible.
For example:
sext_or_truncate_to_sewdoes not exist. The model usesget_scalar(rs1, SEW), seemodel/extensions/V/vext_utils_insts.sail.match suffix { "vv" => ..., "vx" => ... }uses asuffixvariable that is never defined.let (result, mask) = init_masked_result(...)followed byresult[i] = ...does not work becauseletbindings are immutable.Here is the latest code:
https://github.com/riscv/sail-riscv/pull/1886/changes
Any thoughts on this Andrew Waterman (@aswaterman) Prashanth Mundkur (@pmundkur)?