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

vpl instruction: assertion failed #8

Closed
ShuyunJia opened this issue Feb 25, 2019 · 2 comments
Closed

vpl instruction: assertion failed #8

ShuyunJia opened this issue Feb 25, 2019 · 2 comments

Comments

@ShuyunJia
Copy link

Hi,

I'm running such a piece of code in hwacha

    vset vp0
    vpl vp1, va1
    vlw vv1, va0
@vp1 vfirst vs1, vv1  
   ...

It runs successfully in Spike, while gets the following assertion in hwacha
at scalar-unit.scala:297 assert(!vf_active || !io.imem.resp.valid || id_ctrl.ival, "illegal instruction exception!")
I looked into scalar-unit.scala and found that it seems there is no decode table for vpl/vps instructions.
Does these two instructions supported in hwacha?

Thanks,
-Shuyun

@a0u
Copy link
Member

a0u commented Feb 25, 2019

No, the predicate memory instructions remain unimplemented in RTL, but they can be emulated with a compare operation and a vector byte load/store. Modifying your code sample:

    vpset vp0
    vlbu vv1, (va1)
    vcmpeq vp1, vv1, vs0
    vlw vv1, (va0)
@!vp1 vfirst vs1, vv1
    ...

@ShuyunJia
Copy link
Author

Your suggestion works. Issue closed.
Thanks!

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

2 participants