用下边的的语句实现了一个写文件的功能
integer fw_id;
initial begin
fw_id=$fopen("first.txt","w");
$fmonitor(fw_id, "%h\n", x_rl_a1_o);
$fclose(fw_id);
integer fw_id;
initial begin
fw_id=$fopen("first.txt","w");
$fmonitor(fw_id, "%h\n", x_rl_a1_o);
$fclose(fw_id);
end
结果就出现了这个:
$fmonitor : Argument 1 is an unknown file descriptor.
在网上搜了好久没有找到答案:最后用谷粉搜到 http://community.cadence.com/cadence_technology_forums/f/30/t/9584;
才得以解决
删除最后的 $fclose(fw_id);就ok了。