loadContext seg faults

  • Follow


I have been trying to convert some skill code into a context.  Whenever
I load the context I run into problems working within Cadence.

If I load the context at startup, icfb seg faults when I try to open a
schematic window.

If I delay loading the context until I get into ADE I get the following
message repeatedly whenever I try to work within ADE.  For example,
selecting "Netlist and Run" gives the following two lines:
** GC: non-cons/nil in cdr slot of cons cell @ 0x0xce49034
** GC: non-cons/nil in cdr slot of cons cell @ 0x0xce49034

The behaviour seems to be independent of what is in the context.  I
will reproduce the shortest path I have to a seg fault:

$ cat mytest.il
;; Simple function
procedure(MyHelloWorld()
    printf("Hello world!\n")
)

$ cat MakeContext.il
;; Simple create context
procedure(MyMakeContext()
    setContext("mytest")
    load("mytest.il")
    saveContext("mytest.cxt")
)
MyMakeContext()
exit()

$ icfb -ilLoadIL MakeContext.il

Then in icfb -nograph (or ocean):

> loadContext("mytest.cxt")
t
> MyHelloWorld()
Hello world!
t
> simulator('spectre)
Loading oasis.cxt
Loading analog.cxt
Loading asimenv.cxt
Segmentation fault


Does anyone know what I am doing wrong?

0
Reply joel_cooper (18) 9/13/2006 9:49:57 PM

On 13 Sep 2006 14:49:57 -0700, "Joel" <joel_cooper@hotmail.com> wrote:

>I have been trying to convert some skill code into a context.  Whenever
>I load the context I run into problems working within Cadence.
>
>If I load the context at startup, icfb seg faults when I try to open a
>schematic window.
>
>If I delay loading the context until I get into ADE I get the following
>message repeatedly whenever I try to work within ADE.  For example,
>selecting "Netlist and Run" gives the following two lines:
>** GC: non-cons/nil in cdr slot of cons cell @ 0x0xce49034
>** GC: non-cons/nil in cdr slot of cons cell @ 0x0xce49034
>
>The behaviour seems to be independent of what is in the context.  I
>will reproduce the shortest path I have to a seg fault:
>
>$ cat mytest.il
>;; Simple function
>procedure(MyHelloWorld()
>    printf("Hello world!\n")
>)
>
>$ cat MakeContext.il
>;; Simple create context
>procedure(MyMakeContext()
>    setContext("mytest")
>    load("mytest.il")
>    saveContext("mytest.cxt")
>)
>MyMakeContext()
>exit()
>
>$ icfb -ilLoadIL MakeContext.il
>
>Then in icfb -nograph (or ocean):
>
>> loadContext("mytest.cxt")
>t
>> MyHelloWorld()
>Hello world!
>t
>> simulator('spectre)
>Loading oasis.cxt
>Loading analog.cxt
>Loading asimenv.cxt
>Segmentation fault
>
>
>Does anyone know what I am doing wrong?

You need to ensure you are loading all dependency contexts before doing the
setContext. So if you change MakeContext.il to:

    procedure( getContext(cxt)
    ;;------------------------
    ;; Given a context name load the context into the session
    (let ((ff (prependInstallPath (strcat "etc/context/" cxt ".cxt"))))
           (cond ((null (isFile ff)) nil)
                 ((null (loadContext ff))
                    (printf "Failed to load context %s\n" cxt))
                 ((null (callInitProc cxt))
                    (printf "Failed to initialize context %s\n"
                             cxt))
                 (t (printf "Loading Context %s\n" cxt))
           )
            )
    )


;; Simple create context
procedure(MyMakeContext()
    ; load functions needed.
    getContext("skillCore")
    getContext("hiBase")
    setContext("mytest")
    load("mytest.il")
    saveContext("mytest.cxt")
)
MyMakeContext()
exit()


it prevents the crash.

Regards,

Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
0
Reply andrewb1899 (1994) 9/19/2006 8:19:33 AM


That worked!  Thank you very much.  I sincerely appreciate the reply.

0
Reply joel_cooper (18) 9/19/2006 10:54:32 PM

2 Replies
69 Views

(page loaded in 0.132 seconds)

Similiar Articles:

7/27/2012 6:44:59 AM


Reply: