G
GAYATHRI U
Guest
module(input clk);
integer fd;
initial begin
fd = $fopen(\"log.txt\",\"w\");
for(int i =0;i<5;i =i+1)
begin
$fdisplay(fd,\"VALUE OF i %d \",i);
end
end
always @(posedge clk)
begin
$fdisplay(fd,\"TRANSACTION COMPLETE\");
end
endmodule
I am a user of Verilog.Can you please guide me in clearing this doubt.
The display \"Value of i \" will be stored in the text file log.txt.
I would like to dump the display written inside the always begin end block in the same text file.
but the file handle fd will not be available in the always block right.
can you please suggest me so that i can dump all the displays in the code in the same text file.
integer fd;
initial begin
fd = $fopen(\"log.txt\",\"w\");
for(int i =0;i<5;i =i+1)
begin
$fdisplay(fd,\"VALUE OF i %d \",i);
end
end
always @(posedge clk)
begin
$fdisplay(fd,\"TRANSACTION COMPLETE\");
end
endmodule
I am a user of Verilog.Can you please guide me in clearing this doubt.
The display \"Value of i \" will be stored in the text file log.txt.
I would like to dump the display written inside the always begin end block in the same text file.
but the file handle fd will not be available in the always block right.
can you please suggest me so that i can dump all the displays in the code in the same text file.