我尝试在我的测试平台中的 SystemVerilog 中编写二进制文件。
int file = $fopen(path,"w");
if (!file) begin
$error("File could not be open: ", path);
return;
end
$fwrite(file, "%u", 32'h4D424D42);
$fclose(file);
并得到结果:02 0c 02 0c
我使用 QuestaSum 10.2c。为什么我得到这个结果?谢谢。