Re: Simulation Data extraction
Hi.
You could try this:
integer rslts;
// open results file, write header
rslts=$fopen("tb_results.txt"); // Name of text file.
$fdisplay(rslts, "testbench results"); // Text File Header.
$fdisplay(rslts);
$fwrite(rslts, "\n"); // Insert blank line.
// Format data.
$fdisplay(rslts, "\t%s\t%s", "address", "data"); // Setup header.
$fdisplay(rslts, "\t%h\t%h", addr_for, data_out); // Write Data.
Hope this helps,
Jeremy
vikramts wrote:
> Hello
>
> I would like to make plots of variables used in my codes and I
realise
> that Verilog-AMS only provides transient analysis. I figured it would
make
> sense to try and sample some points and store values in a text file
or
> something,which I could use in Matlab or Excel.
>
> Can someone tell me how I should do this?Are tere any tools in
SimVision
> for Verilog-AMS for this purpose?I have tried using $fopen,$fdisplay
but I
> am not able to understand the proper method of usage.
>
> Any help/source references would be greatly appreciated!Beginner in
> Verilog-AMS and SimVision here!!!!
>
> -Vikram
|