Skip to content

Commit

Permalink
merging with head if main, master branch
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'origin_main/master' into new_test_4_from_timmm
  • Loading branch information
billmcspadden-riscv committed Oct 10, 2024
2 parents 9e1086e + 87f8bb3 commit 4a31525
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
1 change: 0 additions & 1 deletion generated_definitions/ast/riscv-ast-raw.txt

This file was deleted.

14 changes: 7 additions & 7 deletions model/riscv_insts_vext_mem.sail
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function process_vlsegff (nf, vm, vd, load_width_bytes, rs1, EMUL_pow, num_elem)
var trimmed : bool = false;
foreach (i from 0 to (num_elem - 1)) {
if not(trimmed) then {
if vm_val[i] then { /* active segments */
if mask[i] then { /* active segments */
foreach (j from 0 to (nf - 1)) {
let elem_offset = (i * nf + j) * load_width_bytes;
match ext_data_get_addr(rs1, to_bits(xlen, elem_offset), Read(Data), load_width_bytes) {
Expand Down Expand Up @@ -247,7 +247,7 @@ function process_vsseg (nf, vm, vs3, load_width_bytes, rs1, EMUL_pow, num_elem)
let mask : vector('n, bool) = init_masked_source(num_elem, EMUL_pow, vm_val);

foreach (i from 0 to (num_elem - 1)) {
if vm_val[i] then { /* active segments */
if mask[i] then { /* active segments */
vstart = to_bits(16, i);
foreach (j from 0 to (nf - 1)) {
let elem_offset = (i * nf + j) * load_width_bytes;
Expand Down Expand Up @@ -313,7 +313,7 @@ function process_vlsseg (nf, vm, vd, load_width_bytes, rs1, rs2, EMUL_pow, num_e
let width_type : word_width = size_bytes(load_width_bytes);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vd_seg : vector('n, bits('f * 'b * 8)) = read_vreg_seg(num_elem, load_width_bytes * 8, EMUL_pow, nf, vd);
let rs2_val : int = signed(get_scalar(rs2, xlen));
let rs2_val : int = unsigned(get_scalar(rs2, xlen));

let (result, mask) = init_masked_result(num_elem, nf * load_width_bytes * 8, EMUL_pow, vd_seg, vm_val);

Expand Down Expand Up @@ -380,7 +380,7 @@ function process_vssseg (nf, vm, vs3, load_width_bytes, rs1, rs2, EMUL_pow, num_
let width_type : word_width = size_bytes(load_width_bytes);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vs3_seg : vector('n, bits('f * 'b * 8)) = read_vreg_seg(num_elem, load_width_bytes * 8, EMUL_pow, nf, vs3);
let rs2_val : int = signed(get_scalar(rs2, xlen));
let rs2_val : int = unsigned(get_scalar(rs2, xlen));
let mask : vector('n, bool) = init_masked_source(num_elem, EMUL_pow, vm_val);

foreach (i from 0 to (num_elem - 1)) {
Expand Down Expand Up @@ -459,7 +459,7 @@ function process_vlxseg (nf, vm, vd, EEW_index_bytes, EEW_data_bytes, EMUL_index
if mask[i] then { /* active segments */
vstart = to_bits(16, i);
foreach (j from 0 to (nf - 1)) {
let elem_offset : int = signed(vs2_val[i]) + j * EEW_data_bytes;
let elem_offset : int = unsigned(vs2_val[i]) + j * EEW_data_bytes;
match ext_data_get_addr(rs1, to_bits(xlen, elem_offset), Read(Data), EEW_data_bytes) {
Ext_DataAddr_Error(e) => { ext_handle_data_check_error(e); return RETIRE_FAIL },
Ext_DataAddr_OK(vaddr) =>
Expand Down Expand Up @@ -550,7 +550,7 @@ function process_vsxseg (nf, vm, vs3, EEW_index_bytes, EEW_data_bytes, EMUL_inde
if mask[i] then { /* active segments */
vstart = to_bits(16, i);
foreach (j from 0 to (nf - 1)) {
let elem_offset : int = signed(vs2_val[i]) + j * EEW_data_bytes;
let elem_offset : int = unsigned(vs2_val[i]) + j * EEW_data_bytes;
match ext_data_get_addr(rs1, to_bits(xlen, elem_offset), Write(Data), EEW_data_bytes) {
Ext_DataAddr_Error(e) => { ext_handle_data_check_error(e); return RETIRE_FAIL },
Ext_DataAddr_OK(vaddr) =>
Expand Down Expand Up @@ -622,7 +622,7 @@ function clause execute(VSOXSEGTYPE(nf, vm, vs2, rs1, width, vs3)) = {
process_vsxseg(nf_int, vm, vs3, EEW_index_bytes, EEW_data_bytes, EMUL_index_pow, EMUL_data_pow, rs1, vs2, num_elem, 3)
}

mapping clause assembly = VSUXSEGTYPE(nf, vm, vs2, rs1, width, vs3)
mapping clause assembly = VSOXSEGTYPE(nf, vm, vs2, rs1, width, vs3)
<-> "vsox" ^ nfields_string(nf) ^ "ei" ^ vlewidth_bitsnumberstr(width) ^ ".v" ^ spc() ^ vreg_name(vs3) ^ sep() ^ "(" ^ reg_name(rs1) ^ ")" ^ sep() ^ reg_name(vs2) ^ maybe_vmask(vm)

/* ***************** Vector Load Unit-Stride Whole Register (vm=0b1, mop=0b00, lumop=0b01000) ****************** */
Expand Down
11 changes: 0 additions & 11 deletions model/riscv_vmem_common.sail
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,3 @@ let sv57_params : SV_Params = struct {
pte_PPN_j_size_bits = 9
}
*/

// This 'undefined_SV_Params()' function is not used anywhere, but is
// currently (2023-12) needed to work around an issue where Sail tries
// to figure out how it could do
// let x : SV_Params = undefined
// even though the code never does this. This has been fixed in Sail.
// The fix will become available in a new Sail release, at which point
// this function can be deleted (TODO).
// PRIVATE
val undefined_SV_Params : unit -> SV_Params
function undefined_SV_Params() = sv32_params

0 comments on commit 4a31525

Please sign in to comment.