SKILL Q: Getting all model lib file sections??

B

Bernd Fischer

Guest
Hi there,

is there a way of getting all sections in a
spectre model library file, without parsing the file?

Something like:
let( ( o_currentSession l_sections )
o_currentSession = asiGetCurrentSession( )
foreach( t_modelSection asiGetModelLibSelectionList( o_currentSession )
l_sections = cons( asiGetModelLibSection( t_modelSection ) l_sections )
)
l_sections
)

But for all, not only for the active sections!?

Thanks Bernd
 
On Fri, 13 Oct 2006 15:56:30 +0200, Bernd Fischer
<bernd.fischer@xignalerif.r'4054-50];p5.de> wrote:

Hi there,

is there a way of getting all sections in a
spectre model library file, without parsing the file?

Something like:
let( ( o_currentSession l_sections )
o_currentSession = asiGetCurrentSession( )
foreach( t_modelSection asiGetModelLibSelectionList( o_currentSession )
l_sections = cons( asiGetModelLibSection( t_modelSection ) l_sections )
)
l_sections
)

But for all, not only for the active sections!?

Thanks Bernd
Hi Bernd,

In IC5251 the section field on the model forms is now a combobox - so there is
a drop down list of available section names in addition to be able to typing
these in. The same is also in the upcoming IC610 release.

However, the function to do this is a private function. That said, it's doing a
very simple parse of the model file to look for section keywords - there was
talk of using the SFE (simulator front end) that's in Spectre to do a more
intelligent read of the file to uncover model sections.

Clearly it has to parse the file at some point if it's going to offer a list of
choices...

So, to summarize, there's no function to do this in IC5141 and before, and the
function to do this in IC5251 onwards is private - and it's probably just as
easy to parse the file yourself,

Regards,

Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 
On Oct 18, 10:18 am, Andrew Beckett <andr...@DcEaLdEeTnEcTe.HcIoSm>
wrote:

However, the function to do this is a private function. That said, it's doing a
very simple parse of the model file to look for section keywords - there was
talk of using the SFE (simulator front end) that's in Spectre to do a more
intelligent read of the file to uncover model sections.

Clearly it has to parse the file at some point if it's going to offer a list of
choices...

So, to summarize, there's no function to do this in IC5141 and before, and the
function to do this in IC5251 onwards is private - and it's probably just as
easy to parse the file yourself,
I have seen some very creative use of the sections in a spectre model
file and I would picture that the novice user will get pretty confused
when he drops down that selection box unless cadence has done some
extra work. How will the dialog react to reinclude the same model-file
with other sections in use?

I think it would be clever to introduce an additional keyword like
"export" on those sections that are actually going to be used by the
user. Otherwise he will be presented with a lot of intermediate
sections that are just filled with parameters. (Depending on which
foundry he is using)
--
Svenn
 
On 18 Oct 2006 12:29:12 -0700, "Svenn Are Bjerkem" <svenn.are@bjerkem.de> wrote:

I have seen some very creative use of the sections in a spectre model
file and I would picture that the novice user will get pretty confused
when he drops down that selection box unless cadence has done some
extra work. How will the dialog react to reinclude the same model-file
with other sections in use?

I think it would be clever to introduce an additional keyword like
"export" on those sections that are actually going to be used by the
user. Otherwise he will be presented with a lot of intermediate
sections that are just filled with parameters. (Depending on which
foundry he is using)
Hi Svenn,

At the moment all it does is look at all the sections in the file - it doesn't
look at any included files within that file. That said, many model files include
themselves - and so would end up with lots of lower-level choices, as you say.

I think there is definitely merit in what you're suggesting here. The
alternative is to use some kind of pragma since the simulator itself doesn't
really care about this, so not sure it's worth extending the simulator syntax
itself to cover this.

Regards,

Andrew.

--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 
So, to summarize, there's no function to do this in IC5141 and before, and the
function to do this in IC5251 onwards is private - and it's probably just as
easy to parse the file yourself,
Here it is.

Cheers Bernd

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; File Name : getAllModelLibSections.il
;;
;; Function(s) : BFgetAllModelLibSections
;;
;; Author : Bernd Fischer
;;
;; Date : 10/19/2006
;;
;; Version : 1.0
;;
;; Application : DFII - Analog Environment
;;
;; SW Release : Tested in 5.1.41
;;
;; SKILL Lint : Passed
;;
;; Global Variable(s) : None
;;
;; Synopsis : BFgetAllModelLibSections( t_modelLibFile )
;;
;; Description : BFgetAllModelLibSections is parsing a Spectre model
;; library file for all existing sections and is returning
;; a list of them.
;;
;; Arguments : t_modelLibFile Spectre model library file
;;
;; Return Value : l_allModelLibSections/nil
;;
;; Example : BFgetAllModelLibSections( "/pathToLib/modelLib.scs" )
;;
;; Modification : None
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

procedure( BFgetAllModelLibSections( modelLibFile )
let( ( p_inPort t_line l_allModelLibSections )

if( isFile( modelLibFile ) then
if( isReadable( modelLibFile ) then
;; reads file
p_inPort = infile( modelLibFile )
when( p_inPort
while( gets( t_line p_inPort )
when( rexMatchp( "^section" t_line )
l_allModelLibSections = tconc(
l_allModelLibSections
cadr( parseString( t_line ) )
)
) ;; close when rexMatchp
) ;; close while
) ;; close when p_inPort
close( p_inPort )
car( l_allModelLibSections )
else
hiGetAttention( )
warn( "File \"%s\" is not readable\n" modelLibFile )
nil
) ;; close if isReadable
else
hiGetAttention( )
warn( "File \"%s\" does not exist\n" modelLibFile )
nil
) ;; close if isFile

) ;; close let
) ;; close procedure
 

Welcome to EDABoard.com

Sponsor

Back
Top