Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Exporting data in Modelsim??

Reply
Thread Tools

Exporting data in Modelsim??

 
 
SD
Guest
Posts: n/a
 
      02-22-2005
Hi all,

I've implemented a signal processing algorithm in a design. I want to
write a text file (export data) from the simulation results of
Modelsim. That would enable me to compare the Matlab output with the
Modelsim output and I can make a good comparison. I would appreciate if
somebody suggests me a way to do so.

In my testbench I read the input from the text file created by the
Matlab input, in other words I use the same input for both the
environments and now I want to compare the outputs from both the
environment.

Thanks in advance.

SD

 
Reply With Quote
 
 
 
 
SD
Guest
Posts: n/a
 
      02-22-2005
I figured out a way to do it.

1. From the ModelSim console window, select "View" -> "List". A
separate List window will pop up.
2. Go to the waveform view, and select the signals you want to save as
data.
3. Drag and drop the signals into the "List" window, opened in step 1.
4. The left row will be shown as time, the right row as signal status
at that time.
5. From the List window, chose "File" -> "Write List" -> "Tabular" to
save data.

The saved data can now be opened in programs like Microsoft Excel.


Thanks,
SD

 
Reply With Quote
 
 
 
 
Kai Harrekilde-Petersen
Guest
Posts: n/a
 
      02-22-2005
"SD" <(E-Mail Removed)> writes:

> I figured out a way to do it.
>
> 1. From the ModelSim console window, select "View" -> "List". A
> separate List window will pop up.
> 2. Go to the waveform view, and select the signals you want to save as
> data.
> 3. Drag and drop the signals into the "List" window, opened in step 1.
> 4. The left row will be shown as time, the right row as signal status
> at that time.
> 5. From the List window, chose "File" -> "Write List" -> "Tabular" to
> save data.
>
> The saved data can now be opened in programs like Microsoft Excel.


Why not use the texio functions for writing the data during
simulation? - it should be pretty straightforward, given that you
know how to read in and apply stimulus.

Regards,


Kai
--
Kai Harrekilde-Petersen <khp(at)harrekilde(dot)dk>
 
Reply With Quote
 
Tim Hubberstey
Guest
Posts: n/a
 
      02-23-2005
Kai Harrekilde-Petersen wrote:

> "SD" <(E-Mail Removed)> writes:
>
>
>>I figured out a way to do it.
>>
>>1. From the ModelSim console window, select "View" -> "List". A
>>separate List window will pop up.
>>2. Go to the waveform view, and select the signals you want to save as
>>data.
>>3. Drag and drop the signals into the "List" window, opened in step 1.
>>4. The left row will be shown as time, the right row as signal status
>>at that time.
>>5. From the List window, chose "File" -> "Write List" -> "Tabular" to
>>save data.
>>
>>The saved data can now be opened in programs like Microsoft Excel.

>
>
> Why not use the texio functions for writing the data during
> simulation? - it should be pretty straightforward, given that you
> know how to read in and apply stimulus.


While that would work, the OP's method has some huge advantages:

1. It requires no coding time. The transcript created by his drag and
drop operations can be very easily edited into a Tcl script (just remove
comment characters from the front of the "add list" lines).

2. It requires little to no debugging, as a consequence of (1).

3. It is extremely easy to modify (drag and drop, then repeat (1).

4. It uses functions built into the simulation engine and (hopefully)
heavily optimized for speed. At the very least, it's running native code
rather than interpreting the compiled VHDL code.

5. If you use "add log" instead of "add list", you can extract the data
(and view waveforms) AFTER the simulation is complete by post-processing
the .wlf file.

No manager worth his salt will ever give you points for "doing it right"
when a near zero cost option provides results almost as good.
--
Tim Hubberstey, P.Eng. . . . . . Hardware/Software Consulting Engineer
Marmot Engineering . . . . . . . VHDL, ASICs, FPGAs, embedded systems
Vancouver, BC, Canada . . . . . . . . . . . http://www.marmot-eng.com

 
Reply With Quote
 
newman5382
Guest
Posts: n/a
 
      02-23-2005

"Kai Harrekilde-Petersen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "SD" <(E-Mail Removed)> writes:
>
>> I figured out a way to do it.
>>
>> 1. From the ModelSim console window, select "View" -> "List". A
>> separate List window will pop up.
>> 2. Go to the waveform view, and select the signals you want to save as
>> data.
>> 3. Drag and drop the signals into the "List" window, opened in step 1.
>> 4. The left row will be shown as time, the right row as signal status
>> at that time.
>> 5. From the List window, chose "File" -> "Write List" -> "Tabular" to
>> save data.
>>
>> The saved data can now be opened in programs like Microsoft Excel.

>
> Why not use the texio functions for writing the data during
> simulation? - it should be pretty straightforward, given that you
> know how to read in and apply stimulus.
>
> Regards,
>
>
> Kai
> --
> Kai Harrekilde-Petersen <khp(at)harrekilde(dot)dk>


Kai,

In a point-counter-point to another view presented, I used the textio
functions for writing the data during the simulation. This provided a large
reduction in the amount of data that needed to be post processed, and my
customers were very happy. Several designers found lots of bugs very
quickly even after they had finished with there own custom standalone
testing. Your mileage may vary depending on the particulars of the project.

-Newman


 
Reply With Quote
 
Kai Harrekilde-Petersen
Guest
Posts: n/a
 
      02-23-2005
Tim Hubberstey <(E-Mail Removed)> writes:

> Kai Harrekilde-Petersen wrote:
>
>> "SD" <(E-Mail Removed)> writes:
>>
>>>I figured out a way to do it.
>>>
>>>1. From the ModelSim console window, select "View" -> "List". A
>>>separate List window will pop up.
>>>2. Go to the waveform view, and select the signals you want to save as
>>>data.
>>>3. Drag and drop the signals into the "List" window, opened in step 1.
>>>4. The left row will be shown as time, the right row as signal status
>>>at that time.
>>>5. From the List window, chose "File" -> "Write List" -> "Tabular" to
>>>save data.
>>>
>>>The saved data can now be opened in programs like Microsoft Excel.

>> Why not use the texio functions for writing the data during
>> simulation? - it should be pretty straightforward, given that you
>> know how to read in and apply stimulus.

>
> While that would work, the OP's method has some huge advantages:
>
> 1. It requires no coding time. The transcript created by his drag and
> drop operations can be very easily edited into a Tcl script (just
> remove comment characters from the front of the "add list" lines).
>
> 2. It requires little to no debugging, as a consequence of (1).
>
> 3. It is extremely easy to modify (drag and drop, then repeat (1).
>
> 4. It uses functions built into the simulation engine and (hopefully)
> heavily optimized for speed. At the very least, it's running native
> code rather than interpreting the compiled VHDL code.
>
> 5. If you use "add log" instead of "add list", you can extract the
> data (and view waveforms) AFTER the simulation is complete by
> post-processing the .wlf file.
>
> No manager worth his salt will ever give you points for "doing it
> right" when a near zero cost option provides results almost as good.


Almost as good? I beg to disagree. One word: automation.

Sure, if this is a one-off simulation, it's easy to just write out the
data needed manually. But if you run a lot of simulations, and I
certainly do, you want everything scripted and driven by makefiles.
All the way from generating stimulus to checking the simulation output
against the expectations. We even have auto-generated summary webpages
that links everything together, with statistics on number of fatals,
errors, warnings, hung simulations, etc.

Once you've passed the initial hurdle of doing this, you wonder why
you haven't done it before.


Cheers,

Kai
--
Kai Harrekilde-Petersen <khp(at)harrekilde(dot)dk>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting to Excel with Unicode data Bernard O'Flynn ASP .Net 1 08-22-2007 09:48 PM
Exporting data from (All columns in data grid EXCEPT THE 1st) to E =?Utf-8?B?cG11ZA==?= ASP .Net 2 01-10-2005 07:53 PM
Exporting Datagrid's data to an Excel Sheet. http://www.visual-basic-data-mining.net/forum ASP .Net 1 10-25-2004 10:24 PM
Exporting data to lotus notes? Eric Caron ASP .Net 0 09-14-2004 07:50 PM
Exporting data to Microsoft Excel from a Web Form (using OWC) problem sarah5e@yahoo.com ASP .Net 1 05-10-2004 01:45 PM



Advertisments