我需要在我的系统 verilog 代码中打开一个文件,我需要知道它对我的相对路径才能使用 $fopen。所以首先,我需要知道我的立场。有没有办法知道我当前的目录路径?(通过使用 $display 或其他东西)
我是 systemverilog 的新手;我需要遍历一个我不知道其大小的数组元素。我需要在每次迭代中读取 2 个元素,所以我不能使用 foreach (可以吗?)。我需要做类似的事情:
for(int i = 0 ; i < arraySize ; i+=2 ){
foo(data[i],data[i+1]);
}
Run Code Online (Sandbox Code Playgroud)
但我手头没有 arraySize 。