Work with host filesystem in VHDL

Status
Not open for further replies.

kiv

Newbie level 3
Joined
Jun 1, 2004
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
11
It`s possible to organize full valued file IO (with reading/writing by offsets) while VHDL simulation?
 

It is possible.
 

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
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…