diff options
author | Tim Hutt <timothy.hutt@codasip.com> | 2024-05-21 14:48:25 +0100 |
---|---|---|
committer | Tim Hutt <timothy.hutt@codasip.com> | 2024-06-03 16:01:37 +0100 |
commit | 9194dd51e58ee6767d4494a04fdddb4635c6bfdc (patch) | |
tree | 30a982ce043ee8a6dec3d4ffcf8e295c56a44cdb /model/riscv_insts_fext.sail | |
parent | e1663e985e2bc6c6311b6e81c296f6c4fd794e2d (diff) | |
download | sail-riscv-9194dd51e58ee6767d4494a04fdddb4635c6bfdc.zip sail-riscv-9194dd51e58ee6767d4494a04fdddb4635c6bfdc.tar.gz sail-riscv-9194dd51e58ee6767d4494a04fdddb4635c6bfdc.tar.bz2 |
Change ext_data_get_addr to use bytes for width
Instead of `word_width` which can only be up to 8 bytes, just use bytes. This allows larger accesses (the limit is increased to 4096), e.g. for `cbo.zero`.
Diffstat (limited to 'model/riscv_insts_fext.sail')
-rw-r--r-- | model/riscv_insts_fext.sail | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/model/riscv_insts_fext.sail b/model/riscv_insts_fext.sail index fcd4bb8..5c89e91 100644 --- a/model/riscv_insts_fext.sail +++ b/model/riscv_insts_fext.sail @@ -315,7 +315,7 @@ function clause execute(LOAD_FP(imm, rs1, rd, width)) = { let offset : xlenbits = sign_extend(imm); /* Get the address, X(rs1) + offset. Some extensions perform additional checks on address validity. */ - match ext_data_get_addr(rs1, offset, Read(Data), width) { + match ext_data_get_addr(rs1, offset, Read(Data), size_bytes(width)) { Ext_DataAddr_Error(e) => { ext_handle_data_check_error(e); RETIRE_FAIL }, Ext_DataAddr_OK(vaddr) => if check_misaligned(vaddr, width) @@ -381,7 +381,7 @@ function clause execute (STORE_FP(imm, rs2, rs1, width)) = { let (aq, rl, con) = (false, false, false); /* Get the address, X(rs1) + offset. Some extensions perform additional checks on address validity. */ - match ext_data_get_addr(rs1, offset, Write(Data), width) { + match ext_data_get_addr(rs1, offset, Write(Data), size_bytes(width)) { Ext_DataAddr_Error(e) => { ext_handle_data_check_error(e); RETIRE_FAIL }, Ext_DataAddr_OK(vaddr) => if check_misaligned(vaddr, width) |