Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17263 Discussions

How to save the simulation results in file for check?

Altera_Forum
Honored Contributor II
1,403 Views

Sometimes I did simulation in Modelsim, the output data are huge, it is impossible to compare the data with results computed in Matlab.  

So I need to save the results simulated in Modelsim as file then load into Matlab to compare. 

As I know, the command I can use: 

 

fid=$fopen("filename.dat","w"); 

 

then I need the write command: 

 

$fwrite(fid,"%d",Portname); 

 

I try them but it does not work well. Firstly, it seems I can't write data in decimal, I should write in binary format. Another is when I try to load the dat file, Matlab seems can't distinguish the space between each number. 

 

If anybody who is familiar with these data save operation, can you give me a completed example to show the commands you use in testbench? If you also have Matlab code to read the file, please show me. 

 

Thanks very much.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
488 Views

No body know?

0 Kudos
Reply