Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[VHDL Modelsim] speed up write to a file

Status
Not open for further replies.

raka200

Member level 2
Joined
Aug 2, 2007
Messages
48
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Activity points
1,625
Hi everybody

I have a test bench in vhdl that I run under modelsim XE starter.
I 'd like to write to a file some signal. I have modified the test bench, but the simulation time as increased dramatically (x100 !!!)
Is there a way to speed up the simulation ??? (using buffer, other text function ???)

Here is my piece of code :

Code:
library STD;
USE STD.textio.ALL;

file MyFile : text open write_mode is "C:\FileOut.txt";
constant SEPAR	: string := " ";
	

WriteToFile : PROCESS(CLK)
  variable MyLine: line;
  BEGIN
    if rising_edge(CLK) then
      write(MyLine,conv_integer(FirstVector),left,1);
      write(MyLine, SEPAR, left, 1);
      write(MyLine,conv_integer(SecondVector),left,1);
      writeline(MyFile ,MyLine);
    end if;
  END PROCESS;

thank in advance !!!
 

aji_vlsi said:
Why are you writing every clock? File IO is usually expensive operation, use it with caution.

Ajeetha, CVC
www.noveldv.com

Hi !!!

You mean it will be faster to fill up a buffer of 1Ko of Data, and then flush it to the hard disk ???
Isn't there already a disk buffer in modelsim / windows ???

Thanks,
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top