简体   繁体   English

系统Verilog至Specman E

[英]System Verilog to Specman E

What is the equivalent syntax in Specman E for $readmemh(file,array) and similar system tasks and functions in System verilog? Specman E中$ readmemh(file,array)和系统verilog中类似的系统任务和功能的等效语法是什么?

I am working in converting the existing System verilog code into Specman E ,I have converted and implemented most of the concepts except few system methods like below .Please help me to implement methods like below in Specman E. 我正在将现有的System verilog代码转换为Specman E,我已经转换并实现了大多数概念,除了以下几种系统方法。请帮助我在Specman E中实现以下方法。

$readmemh(file_s,data_2d_i);//For converting SV code into Specman E

In the vr_ad Package there is an equivalent method. 在vr_ad软件包中,有一个等效的方法。 Assuming you have a vr_ad_mem object called data_2d_i, you can eg call 假设您有一个名为data_2d_i的vr_ad_mem对象,则可以例如调用

data_2d_i.readmemh(file_s,0,1000,0,1000);

To read addresses 0..1000 from that file into memory. 从该文件中读取地址0..1000到内存中。

Example: 例:

import vr_ad/e/vr_ad_top;
extend sys {
   mem: vr_ad_mem;
   keep mem.addressing_width_in_bytes == 1;
   keep mem.size == 1000;

   run() is also {
      var data_2d_l: list of byte;
      -- read first 16 bytes of mem-file and store the result in a list
      mem.readmemh("mem.txt", 0, 15, 0, 15);
      data_2d_l = mem.fetch(0, 16);
      print data_2d_l;
   };
};

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM