Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
tinebp committed Feb 7, 2025
1 parent 6ee2d41 commit 3e7f9cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion sim/simx/emulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ struct warp_t {
vtype_t vtype;
uint32_t vl;
uint32_t vlmax;

#endif
uint32_t uuid;
};
Expand Down
10 changes: 5 additions & 5 deletions sim/simx/vpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void Emulator::storeVector(const Instr &instr, uint32_t wid, uint32_t tid, const
std::abort();
}
uint32_t vs3 = instr.getRSrc(1);
WordI stride = vsewb;
uint32_t stride = vsewb;
uint32_t vl = nreg * (VLENB / vsewb);
for (uint32_t i = 0; i < vl; i++) {
if (isMasked(vreg_file, 0, i, vmask))
Expand All @@ -229,7 +229,7 @@ void Emulator::storeVector(const Instr &instr, uint32_t wid, uint32_t tid, const

uint32_t vs3 = instr.getRSrc(1);
uint32_t vl = (warp.vl + 7) / 8;
WordI stride = vsewb;
uint32_t stride = vsewb;

for (uint32_t i = 0; i < vl; i++) {
if (isMasked(vreg_file, 0, i, 1))
Expand Down Expand Up @@ -322,7 +322,7 @@ bool Emulator::executeVector(const Instr &instr, uint32_t wid, uint32_t tid, con
auto rdest = instr.getRDest();
auto rsrc0 = instr.getRSrc(0);
auto rsrc1 = instr.getRSrc(1);
auto immsrc = sext((Word)instr.getImm(), width_reg);
auto immsrc = sext<Word>(instr.getImm(), width_reg);
auto uimmsrc = (Word)instr.getImm();
auto vmask = instr.getVmask();

Expand Down Expand Up @@ -1319,7 +1319,7 @@ bool Emulator::executeVector(const Instr &instr, uint32_t wid, uint32_t tid, con
warp.vlmax = vlenTimesLmul / vsew_bits;
warp.vtype.vill = (vsew_bits > XLEN) || (warp.vlmax < (VLEN / XLEN));

Word s0;
uint32_t s0;
if (instr.hasImm()) {
// vsetivli
s0 = instr.getImm();
Expand All @@ -1344,7 +1344,7 @@ bool Emulator::executeVector(const Instr &instr, uint32_t wid, uint32_t tid, con
warp.vtype.vta = vta;
warp.vtype.vsew = vsew_bits;
warp.vtype.vlmul = vlmul;
Word vtype_ = vlmul;
uint32_t vtype_ = vlmul;
vtype_ |= vsew << shift_v_sew;
vtype_ |= vta << shift_v_ta;
vtype_ |= vma << shift_v_ma;
Expand Down

0 comments on commit 3e7f9cf

Please sign in to comment.