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.
Hi tyanataMay I have a sample of the contents of your text file?Best regardsQuek
In reply to Quek:
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.
In reply to tyanata:
Hi tyanataThe 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 regardsQuekprocedure( 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
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.
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.
In reply to Andrew Beckett:
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?
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.
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.