ARMHPI模型无法模拟SVE指令。
创始人
2024-09-13 20:00:30
0

需要使用Arm Fast Models提供的全新的SVE模型来解决此问题。具体步骤如下:

  1. 下载最新版本的Fast Models。

  2. 在代码中使用Fast Models中的SVE模型,代码示例如下:

#include "sg/SVE.h"
using namespace sg;
using namespace Arm;
    
// Define a vector length of 128 bytes.
#define VL 16
// Create an array of 16-bit integers, with a required buffer alignment of 128 bytes.
int16_t data[VL] __attribute__((aligned(128)));
    
// Initialise an SVE vector with data.
svint16_t vec = svld1_s16(vl, &data[0]);
// Broadcast a scalar value to all elements of the SVE vector.
svint16_t broadcasted_vec = svdup_n_s16(scalar);
// Add the vector together with a scalar value.
svint16_t add_res = svadd_s16_moverw(vec, broadcasted_vec));
// Store the result back into memory.
svst1_s16(vl, &data[0], add_res);
  1. 在进行仿真之前,在Initializer类的子类中添加以下SVE初始化代码片段,以指明仿真使用的特性级:
#include "sg/SGParseText.h"
#include "sg/SVEIface.h"
using namespace sg;
using namespace Arm;
    
class ExampleInit : public sg::Initializer
{
 public:
    virtual void initialize();
};
    
void ExampleInit::initialize()
{
    // Get the SVE model interface.
    auto sve = getModelTreeNode()->unsafe_get_interface();
    // Set the vector length on the SVE model.
    sve->setVectorLength(2048);
    // Set the implementation to use.
    sve->setSVEArchitecture(ArchSVE::ArmSVELevel2);
}

相关内容

热门资讯

透视工具"wpk模拟... 透视工具"wpk模拟器多开"详细辅助解密教程(轻量版透视方法攻略)是一款可以让一直输的玩家,快速成为...
透视教学"哈糖大菠萝... 透视教学"哈糖大菠萝万能挂"详细辅助玩家教你(分析神器)是一款可以让一直输的玩家,快速成为一个“必胜...
透视透视挂"wpk私... 透视透视挂"wpk私人辅助"详细辅助透明挂教程(有挂辅助);支持多人共享记分板与复盘,通过邀请好友或...
透视新版"wpk官网... 透视新版"wpk官网下载链接"详细辅助AI教程(购买模拟器教程);科技安装教程;136704302。...
透视app"werp... 《透视app"werplan脚本"详细辅助微扑克教程(辅助器软件下载辅助)》 werplan脚本软件...
透视安装"wepok... 透视安装"wepoker软件安装包"详细辅助透视教程(辅助器激活码神器);最新版2024是一款经典耐...
透视黑科技"德普之星... 透视黑科技"德普之星透视辅助软件激活码"详细辅助专业教程(私人局透视方法方法);小薇(透视辅助)致您...
透视好友房"德普辅助... 1、透视好友房"德普辅助软件"详细辅助新版2025教程(有挂方法)。2、德普辅助软件透视辅助简单,德...
透视透视"epoke... 透视透视"epoker免费透视脚本"详细辅助可靠教程(辅助器最新版本更新内容教程);玩家必备必赢加哟...
透视实锤"wejok... 透视实锤"wejoker开挂"详细辅助细节方法(插件下载软件);亲真的是有正版授权,小编(透视辅助软...