• 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. typecasting in cadence SKILL

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 16028
  • 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

typecasting in cadence SKILL

Aditya A S V
Aditya A S V over 12 years ago

Hi All,

I have a list of string values representing the IPC id's submitted using SKILL.

eg: ipcList = ("ipc:15" "ipc:16" "ipc:20") etc,

I would like to query their status using ipcIsAliveProcess() and ipcReadProcess().

ipcStatus = ipcIsAliveProcess(nth(0 ipcList)),

 but, I'm unable to do so as the datatypes do not match. Is there a way I can convert these "string" data values to "o_childId" type. Kindly guide me in solving this prolem.

Thanks in advance,

Aditya.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Aditya,

    You can't. Why did you convert them to strings in the first place? ipc:N is just the print representation of an IPC ID, it's not the ID itself. The IPC ID is a specific object type, and as far as I know there's no API (public or private) to convert from a number or string into the corresponding IPC ID.

    If you store them as their original object types - even as a  list of them - then you can use them directly

    listOfIpcIds=nil
    for(i 1 10
      listOfIpcIds=cons(ipcBeginProcess("sleep 100") listOfIpcIds)
    )

    then you can do

    statuses=foreach(mapcar ipcId listOfIpcIds
      ipcIsAliveProcess(ipcId)
    )

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Aditya A S V
    Aditya A S V over 12 years ago

     

    Hi Andrew,

    Thank you for your quick reply.

    The code is a part of much larger, GUI based script. It actually submits and moitors the various jobs given by the user. I am basically storing the jobs and their corresponding ipcIds as choices inside a report field "hiCreateReportField" as passing values becomes easy and I can minimise my "variables" count (in my opinion), but report field takes in only string, float and int as values. Hence the string list.

    My typical Report Field display in my GUI,

     Sl.No       Cell Name     Job Name      Job Status

        1            NandGate         DRC           Running

        2            NorGate            LVS           Complete

        3            Inverter              DRC            Running

    And, If I cannot convert the string to other dataTypes, then I
    guess I will have to maintain a separate list variable to work on and
    then pass it to the GUI report field as choices.



    Thank a lot :)

    Aditya.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Aditya.

    You can avoid having to have a global variable for this by storing the mapping as a property on the field or the form. For example:

    reportField->ipcStringToIdMappingTable=...

    You can add whatever user-defined properties on the form or field objects as you wish. This could be a simple hash table (e.g. association table produced using makeTable()).

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Aditya A S V
    Aditya A S V over 12 years ago

    Andrew, 

    Thank you for you inpus, but I am not really sure how to implement the suggestion you have put forward. Could you kindly provide me with some more insight, perhaps a snippet code might do the trick.

     Thanks,

    Aditya.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 12 years ago

    At some point in your code you have the original ipc ids before you convert them to strings for your report field. So let's say you have the following:

    ipcIds = list(of some ipc ids)
    ipcTable = makeTable("ipcIds" nil)
    foreach(ipcId ipcIds
        sprintf(ipcString "%L" ipcId)
        ipcTable[ipcString] = ipcId
    )

    Then you can store this either on your form or your report field:
    form->ipcTable = ipcTable
    or
    form->reportField->ipcTable = ipcTable

    When your Skill code that reads the currently selected item in the report field needs to know the original ipcId, you can get it from the table. First, get the ipcString from the appropriate column of the selected item in the report field, then use this:

    ipcId = form->ipcTable[ipcString]

    This is a great way to store data without having to create a lot of global variables.

    I hope this helps.

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Thanks Derek - the day job has been preventing me from giving much more than 1 line answers during the last couple of days!

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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