Please don't post empty reply just for points. Be more constructive!
To use 'C' style of function in VHDL simulation is used in some of the tools like FPGAdv. If you don't have their library, there is a free one is also quite useful. Below is some example citing in their README.
fout:=fopen("cpudata.txt", "w");
if fout=0 then
printf("cannot open file=xxx_out.txt\n");
else
fprintf(fout, "alu bus=%s", alu_bus);
fprintf(fout, "=%#x", alu_bus);
fprintf(fout, "=%d\n", alu_bus);
fclose(fout);
end if;
Take a look at their website.
http://bear.ces.cwru.edu/vhdl
regards