Home > Community > Forums > Custom IC SKILL > Inserting text note in schematic

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Inserting text note in schematic 

Last post Tue, Jun 29 2010 8:09 AM by skillUser. 8 replies.
Started by tyanata 24 Jun 2010 04:00 AM. Topic has 8 replies and 2677 views
Page 1 of 1 (9 items)
Sort Posts:
  • Thu, Jun 24 2010 4:00 AM

    • tyanata
    • Top 75 Contributor
    • Joined on Sun, May 2 2010
    • Posts 89
    • Points 1,480
    Inserting text note in schematic Reply

    Hi,

     Is there some SKILL procedure to place text note in shematic hierarchicaly in schematics without opening circuits one by one. What I mean: we have skill code difning layout dimesions (width and height) of every cell in the schematic and all this data is written in text file. But now we want the data for every particular cell layout to be written as text note in the corresponding schematic view.

    • Post Points: 20
  • Thu, Jun 24 2010 7:07 AM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,069
    • Points 16,275
    Re: Inserting text note in schematic Reply

    Hi tyanata

    May I have a sample of the contents of your text file?

    Best regards
    Quek

    • Post Points: 20
  • Thu, Jun 24 2010 11:10 PM

    • tyanata
    • Top 75 Contributor
    • Joined on Sun, May 2 2010
    • Posts 89
    • Points 1,480
    Re: Inserting text note in schematic Reply

     Hi,

    The shape of the text file is:

    cell_x 23.5 189

    amp1 140 135.9

    osc_x 27 56

     ...

     First number is cell layout X second one is cell layout Y dimension.

    Of course this type of cell area determination is applicable only for rectangular cells, so it is not accurate for most of the full custom analog cells, but for approximate chip area estimation is fairly enough. If it is very difficult these notes to be included in the schematics of the cells (without opening of the cells) we need at least these notes to be in included in .ps files after plot file command.

    The final goal of that task is when we convert ps files to pdf in the page of schematics of each cell to be printed the note with its layout dimensions.

     

     

     

    • Post Points: 20
  • Thu, Jun 24 2010 11:58 PM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,069
    • Points 16,275
    Re: Inserting text note in schematic Reply

    Hi tyanata

    The following script should be able to do what you want. Save it as "addnotes.il" in the working directory and load it in ciw. Then execute it using:

    CCSaddSchNotes("myLib" "myInputFile")

    where "myLib" is the name of the schematic library and "myInputFile" is the file containing the cellnames and X/Y dimensions.

    Best regards
    Quek


    procedure( CCSaddSchNotes(myLib myFile)
       let( (inPort inLine inLineList myCell xDimen yDimen cv
        myNote xCoord yCoord)
          inPort=infile(myFile)
          while( gets(inLine inPort)
             inLineList=parseString(inLine)
             myCell=nth(0 inLineList)
             xDimen=nth(1 inLineList)
             yDimen=nth(2 inLineList)
             cv=dbOpenCellViewByType(myLib myCell "schematic" "" "a")
             myNote=strcat("Layout estimation: X=" xDimen " Y=" yDimen)
             xCoord=leftEdge(cv~>bBox)
             yCoord=bottomEdge(cv~>bBox)-0.2
             schCreateNoteLabel(cv xCoord:yCoord
            myNote "lowerLeft" "R0" "roman" 0.0625 "normalLabel")
             dbSave(cv)
             dbClose(cv)
          ) ;while
          close(inPort)
          inPort=nil
       ) ;let
    ) ;procedure

    • Post Points: 20
  • Fri, Jun 25 2010 4:01 AM

    • tyanata
    • Top 75 Contributor
    • Joined on Sun, May 2 2010
    • Posts 89
    • Points 1,480
    Re: Inserting text note in schematic Reply

     Thanks for the response I tested it, the proposed solution works perfectly.

    Can you say is there way this result instead as note to be included in schematics only to be included in corresponding .ps file before plot to file command, so layout dimensions text note to appear only in final pdf file instead of be included in the schematics. 

     

    • Post Points: 20
  • Fri, Jun 25 2010 4:40 AM

    Re: Inserting text note in schematic Reply

    The only way that I think this could be done would be to modify the PostScript after it was generated (which would be far from trivial), or maybe opening the schematic in "s" (scratch) mode, adding the note, creating the PostScript with schPlot() and then discarding the edits and reverting to read mode afterwards. You'd have to be careful if it was in edit mode to start off with.

    Regards,

    Andrew.

    • Post Points: 20
  • Tue, Jun 29 2010 5:40 AM

    • tyanata
    • Top 75 Contributor
    • Joined on Sun, May 2 2010
    • Posts 89
    • Points 1,480
    Re: Inserting text note in schematic Reply

    I checked your proposal, now I do following:

    1. Run schPlot() and plot to file

    2. Run ls -al >> ls_log  in the folder with generated ps files.

    3 Do some postprocesing of ls_log to create the file for feeding the function addnotes.il above.

    ( I make these actions to define schematics tree and create required file. )

    4. After that I open the all the listed in file cells in "s" mode place the note and close the certain cell

    5. Run  schPlot() again with already placed layout dimensions notes.

    6. Create the final PDF file.

     

    But now I do not know how to discard changes in the cells made in point 4. Can you say how to that?

     

     

     

    • Post Points: 35
  • Tue, Jun 29 2010 8:07 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,587
    • Points 15,915
    Re: Inserting text note in schematic Reply

    Hi Tyanata,

    You should be able to use the dbRefreshCellView() SKILL command or the geDiscardEdits() command to do this.  The first command can be used in non-graphical sessions also.  Since you are working with graphical windows, you should be able to use either function, though I'm not sure if the geDiscardEdits() function prompts for confirmation but the dbRefreshCellView() command should not need any further interaction.

    Best regards,

    Lawrence.

    • Post Points: 5
  • Tue, Jun 29 2010 8:09 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,587
    • Points 15,915
    Re: Inserting text note in schematic Reply

    Hi Tyanata,

    If you are using Quek's code above, you may wish to remove or comment out the line with the "dbSave" command on it. Then any edits made can be discarded as noted above in my previous post.

    Regards,

    Lawrence.

    • Post Points: 5
Page 1 of 1 (9 items)
Sort Posts:
Started by tyanata at 24 Jun 2010 04:00 AM. Topic has 8 replies.