EDAboard.com | EDAboard.de | EDAboard.co.uk | WTWH Media

SKILL: How to convert a waveform object into a list?

Ask a question - edaboard.com

elektroda.net NewsGroups Forum Index - Cadence - SKILL: How to convert a waveform object into a list?

Bernd Fischer
Guest

Thu Aug 17, 2006 3:56 pm   



Hi,

I'm curios if it is possible to convert a
waveform object into a list?


I knew that I can use 'ocnPrint', e.g.
ocnPrint( o_wave ?output t_file )
to print a waveform object into a file.

But I want to postprocess the data before
I write them to a file. And I didn't want to
do a cost effective file out, file in and file out
again.

Thanks Bernd

Svenn Bjerkem
Guest

Thu Aug 17, 2006 5:06 pm   



Bernd Fischer wrote:
Quote:
Hi,

I'm curios if it is possible to convert a
waveform object into a list?


I knew that I can use 'ocnPrint', e.g.
ocnPrint( o_wave ?output t_file )
to print a waveform object into a file.

But I want to postprocess the data before
I write them to a file. And I didn't want to
do a cost effective file out, file in and file out
again.

How about using some of the functions that Andew use to create
waveforms with new xaxis in his abChangeXAxis function? I just saw it
the other day when the question plot somewave vs otherwave in ocean
showed up again. drGetWaveform* should also give some hits in
cdsFinder.

I personally don't like the way ocnPrint formats the data because it is
more or less useless without further processing. I need to move a lot
of ocnPrint data over in excel to postprocess because we haven't
discovered qtiplot, or labplot in my company yet. (But I would rather
like to have something that perl can read in to use
Spreadsheet::WriteExcel perl module)

Any perl hackers out there who have time and energy to write a wrapper
around the psf executable to extract data from the psfbin waveform data
on a command line base. (No OCEAN here) I would gladly cooperate.

--
Svenn

Andrew Beckett
Guest

Fri Aug 18, 2006 6:30 am   



On 17 Aug 2006 10:06:17 -0700, "Svenn Bjerkem" <svenn.are_at_bjerkem.de> wrote:

Quote:

Bernd Fischer wrote:
Hi,

I'm curios if it is possible to convert a
waveform object into a list?


I knew that I can use 'ocnPrint', e.g.
ocnPrint( o_wave ?output t_file )
to print a waveform object into a file.

But I want to postprocess the data before
I write them to a file. And I didn't want to
do a cost effective file out, file in and file out
again.

How about using some of the functions that Andew use to create
waveforms with new xaxis in his abChangeXAxis function? I just saw it
the other day when the question plot somewave vs otherwave in ocean
showed up again. drGetWaveform* should also give some hits in
cdsFinder.

I personally don't like the way ocnPrint formats the data because it is
more or less useless without further processing. I need to move a lot
of ocnPrint data over in excel to postprocess because we haven't
discovered qtiplot, or labplot in my company yet. (But I would rather
like to have something that perl can read in to use
Spreadsheet::WriteExcel perl module)

Any perl hackers out there who have time and energy to write a wrapper
around the psf executable to extract data from the psfbin waveform data
on a command line base. (No OCEAN here) I would gladly cooperate.

A SKILL function to do what Bernd wants:

/* abWaveToList.il

Author A.D.Beckett
Group Custom IC (UK), Cadence Design Systems Ltd.
Language SKILL
Date Nov 17, 2003
Modified
By

Convert a waveform to a list

***************************************************

SCCS Info: @(#) abWaveToList.il 11/17/03.15:08:15 1.1

*/

/************************************************************************
* *
* (abWaveToList wave @key transpose) *
* *
* Take a waveform object, and return it as a list of xy pairs. Or *
* if transpose is set, it returns a list of x values followed by a list *
* of y values. *
* *
************************************************************************/


(procedure (abWaveToList wave @key transpose)
(let (xList yList xyList len
(xVec (drGetWaveformXVec wave))
(yVec (drGetWaveformYVec wave))
)
(setq len (drVectorLength xVec))
;-----------------------------------------------------------------
; Return value of this if is the list
;-----------------------------------------------------------------
(if transpose
(progn
(for i 0 (sub1 len)
(setq xList (tconc xList (drGetElem xVec i)))
(setq yList (tconc yList (drGetElem yVec i)))
)
(list (car xList) (car yList))
)
; else
(progn
(for i 0 (sub1 len)
(setq xyList (tconc xyList (list (drGetElem xVec i)
(drGetElem yVec i))))
)
(car xyList)
)
) ; if
) ; let
) ; procedure



Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.

Bernd Fischer
Guest

Fri Aug 18, 2006 8:28 am   



Thanks guys, especially Andrew, this helps me to move further.

Cheers Bernd

Sylvio Triebel
Guest

Tue Sep 12, 2006 11:52 am   



Hi Andrew,
do you have an estimation, how fast this conversion would be
compared with ocnPrint (which is probably a native implementation)?

Thanks,
Sylvio

Andrew Beckett wrote:
Quote:
On 17 Aug 2006 10:06:17 -0700, "Svenn Bjerkem" <svenn.are_at_bjerkem.de> wrote:


Bernd Fischer wrote:

Hi,

I'm curios if it is possible to convert a
waveform object into a list?


I knew that I can use 'ocnPrint', e.g.
ocnPrint( o_wave ?output t_file )
to print a waveform object into a file.

But I want to postprocess the data before
I write them to a file. And I didn't want to
do a cost effective file out, file in and file out
again.

How about using some of the functions that Andew use to create
waveforms with new xaxis in his abChangeXAxis function? I just saw it
the other day when the question plot somewave vs otherwave in ocean
showed up again. drGetWaveform* should also give some hits in
cdsFinder.

I personally don't like the way ocnPrint formats the data because it is
more or less useless without further processing. I need to move a lot
of ocnPrint data over in excel to postprocess because we haven't
discovered qtiplot, or labplot in my company yet. (But I would rather
like to have something that perl can read in to use
Spreadsheet::WriteExcel perl module)

Any perl hackers out there who have time and energy to write a wrapper
around the psf executable to extract data from the psfbin waveform data
on a command line base. (No OCEAN here) I would gladly cooperate.


A SKILL function to do what Bernd wants:

/* abWaveToList.il

Author A.D.Beckett
Group Custom IC (UK), Cadence Design Systems Ltd.
Language SKILL
Date Nov 17, 2003
Modified
By

Convert a waveform to a list

***************************************************

SCCS Info: @(#) abWaveToList.il 11/17/03.15:08:15 1.1

*/

/************************************************************************
* *
* (abWaveToList wave @key transpose) *
* *
* Take a waveform object, and return it as a list of xy pairs. Or *
* if transpose is set, it returns a list of x values followed by a list *
* of y values. *
* *
************************************************************************/


(procedure (abWaveToList wave @key transpose)
(let (xList yList xyList len
(xVec (drGetWaveformXVec wave))
(yVec (drGetWaveformYVec wave))
)
(setq len (drVectorLength xVec))
;-----------------------------------------------------------------
; Return value of this if is the list
;-----------------------------------------------------------------
(if transpose
(progn
(for i 0 (sub1 len)
(setq xList (tconc xList (drGetElem xVec i)))
(setq yList (tconc yList (drGetElem yVec i)))
)
(list (car xList) (car yList))
)
; else
(progn
(for i 0 (sub1 len)
(setq xyList (tconc xyList (list (drGetElem xVec i)
(drGetElem yVec i))))
)
(car xyList)
)
) ; if
) ; let
) ; procedure



Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.


Andrew Beckett
Guest

Sun Oct 08, 2006 3:35 pm   



On Tue, 12 Sep 2006 13:52:36 +0200, Sylvio Triebel <Sylvio.Triebel_at_nospam.com>
wrote:

Quote:
Hi Andrew,
do you have an estimation, how fast this conversion would be
compared with ocnPrint (which is probably a native implementation)?

Thanks,
Sylvio


I don't think there would be much in it. I've not done any profiling, but I
expect it to be similar speed.

Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.


Guest

Wed Jul 03, 2019 5:45 pm   



On Thursday, August 17, 2006 at 2:06:17 PM UTC-3, Svenn Are Bjerkem wrote:
Quote:
Any perl hackers out there who have time and energy to write a wrapper
around the psf executable to extract data from the psfbin waveform data
on a command line base. (No OCEAN here) I would gladly cooperate.


Hi Svenn,

Why not use nutbin format? It is very easy to parse.

Regards
Ignacio

elektroda.net NewsGroups Forum Index - Cadence - SKILL: How to convert a waveform object into a list?

Ask a question - edaboard.com

Arabic version Bulgarian version Catalan version Czech version Danish version German version Greek version English version Spanish version Finnish version French version Hindi version Croatian version Indonesian version Italian version Hebrew version Japanese version Korean version Lithuanian version Latvian version Dutch version Norwegian version Polish version Portuguese version Romanian version Russian version Slovak version Slovenian version Serbian version Swedish version Tagalog version Ukrainian version Vietnamese version Chinese version Turkish version
EDAboard.com map