• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Assigning Pcell parameters by reading vales from file

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 144
  • Views 14152
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Assigning Pcell parameters by reading vales from file

frasheed
frasheed over 10 years ago

Hello,

I wrote short code to read a file(CSV) and then I am storing the vlaues in a respecive variable.

Example:

CSV FILE:

w   1.1

l 0.9

grid 0.35

My code:

while( str = lineread(file)
case( car(str)


(w

  if(cdr(str)

  then

  w = cadr(str)
  else error("w not defined in %s file" file)
  ); end if

);w

(l

  if(cdr(str)

  then

  l = cadr(str)
  else error("l not defined in %s file" file)
  ); end if

);l

and then I will use these values to define the parameters in pcell with same variable 

;;FORMAL PARAMETERS

(

(w float w) ;; This is wrong, I want to skip this 

(l float w)

)

As the above method is not correct but I have already stored the value in "w" and "l" so how Can I define my formal parameters with the values that I have read from file ?

will this work:

(

(w)

(l)

)

or is there any way I create a database and directly create the object in database variable and store values like

 if(cdr(str)

  then

  myObj~>w = cadr(str)

and then while defining pCell parameters I can write

(

(w float myObj~>w)

(l float myObj~>l)

)

Which method is suitable can anyone guide me ?

Thanks and sorry for the bad explanation.

  • Cancel
Parents
  • frasheed
    frasheed over 10 years ago

    Hello Andrew, In Pcell we define formal parameters like

    (

    (w float 0.9)

    (s int 10)

    (n int 1)

    )

    I want to set parameters values based on values read from file.

    What I am doing now is using ddId = ddGetObj(lib)

    ans susing case for every propertyvariable to read value from file

    setSGq(ddId cadr(str) w)

    and then setting papmeters fpr pcell

    (

    (w float ddId~>w)

    (l int ddId~>l)

    )

    Is this method ok or is there any better way to do that ??


    .

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • frasheed
    frasheed over 10 years ago

    Hello Andrew, In Pcell we define formal parameters like

    (

    (w float 0.9)

    (s int 10)

    (n int 1)

    )

    I want to set parameters values based on values read from file.

    What I am doing now is using ddId = ddGetObj(lib)

    ans susing case for every propertyvariable to read value from file

    setSGq(ddId cadr(str) w)

    and then setting papmeters fpr pcell

    (

    (w float ddId~>w)

    (l int ddId~>l)

    )

    Is this method ok or is there any better way to do that ??


    .

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information