Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    哪吒开发板如何使用向量指令

    MR Series
    2
    2
    1232
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Q
      qiao_sh_pudong LV 4 last edited by

      看到 D1-H 文档写程序部分提到可以使用平头哥的编译链,于是我选择了平头哥v2.2.5 版本的Xuantie-900-gcc-elf-newlib-x86_64-V2.2.5-20220323.tar.gz
      在上位机上编译 saxpy.c 程序,使用了矢量指令使用spike模拟器可以运行,将编译好的程序push到下位机,即哪吒开发板上,运行,窗口显示 "illegal instruction"
      通过分别在上位机和下位机上反汇编,发现下位机上所有向量指令都无法识别
      vsetvli a4,a5,e32,m8,tu,mu
      vfmacc.vf v8,fa5,v16
      ......
      等指令都无法识别,97236c52b1ee55ac5bacf5f126e1c35.jpg

      1 Reply Last reply Reply Quote Share 0
      • aozima
        aozima LV 7 last edited by

        https://whycan.com/t_7592.html

        探索麻雀D1s上的RVV
        关键点在于设置VS标志位
        VS位于MSTATUS寄存器的23到24位。但是需要注意的是,当使用RVV时,需要开启浮点寄存器(FS),不然会报错。

        1 Reply Last reply Reply Quote Share 0
        • 1 / 1
        • First post
          Last post

        Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

        行为准则 | 用户协议 | 隐私权政策