Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vslidedown.(vx|vi) issue when VLMAX is exceeded #99

Open
moimfeld opened this issue Aug 8, 2022 · 0 comments
Open

vslidedown.(vx|vi) issue when VLMAX is exceeded #99

moimfeld opened this issue Aug 8, 2022 · 0 comments

Comments

@moimfeld
Copy link
Contributor

moimfeld commented Aug 8, 2022

Hi @michael-platzer,

Issue

For LMUL=1/2 or LMUL=1/4 the result is not calculated correctly. For the vslidedown.vi v8, v1, 7 instruction (SEW=8, LMUL=1/4, VL=8) the UVM environment throws the following warning:

# UVM_WARNING cvxif_scoreboard.svh(412) @ 15660: uvm_test_top.env.scoreboard [CVXIF_SCOREBOARD] Instr "vslidedown.vi v8, v1, 7 mf4, tu, mu" with id = 5 in Prog "slide_imm" failed: 
# at      15660 ns: 
# State Difference
# ref.vproc_register[8]: 222fdebad92347aa6105c675f9f005dfb4da4ac62bab1af6000000000000007b, dut.vproc_reg[8]: 222fdebad92347aa6105c675f9f005dfb4da4ac62bab1af62d0a8ee15971837b

The RISC-V "V" specifications describe the following behavior (see section 16.3.2.) for the slidedown instruction:

# vslidedown behavior for source elements for element i in slide
    0 <= i+OFFSET < VLMAX src[i] = vs2[i+OFFSET]
VLMAX <= i+OFFSET src[i] = 0

# Note: VLMAX = LMUL*VLEN/SEW = (1/4)*256/8 = 8

Vicuna does not apply this rule, but instead slides elements that exceed VLMAX into the result vector (this is not compliant with the RVV specs).

How to reproduce

You can reproduce this issue by running the cvxif_test_direct_issue_99 in the UVM environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant