Hierarchical print to file

R

Roger Light

Guest
Hi,

We currently have a cdsplotinit entry for plotting to a png file that
works quite satisfactorily. I have now been asked if it can be made to
work when plotting hierarchically. This would mean giving the files the
correct name. I am stumped as how to go about this, other than I might
need to delve into skill. Can anybody suggest how I might go about this?

This is in Virtuoso schematic on IC 5.0.33 USR2.

Our current setup is:

PNG Out|Generic 600 dpi Adobe PostScript Level 1 Plotter: \
:manufacturer=Hewlett Packard PCL: \
:type=intCLR: \
:spool=/eee/vlsi/Cadence/cdsPNG.sh: \
:sf:sh: \
:maximumPages#1: \
:resolution#600: \
:paperSize="5cm sqr" 1182 1182 0 0: \
:paperSize="10cm sqr" 2364 2364 0 0: \
:paperSize="20cm sqr" 4728 4728 0 0: \
:paperSize="40cm sqr" 9456 9456 0 0: \
:paperSize="A4" 4758 6846 0 0:

Where cdsPNG.sh is:

#!/bin/tcsh
setenv PATH /opt/csw/bin:$CDSDIR/tools/plot/bin:$PATH
setenv file /var/tmp/cadPlot$$

cat - > $file

raptor -a -m color $file | XWDout > ${file}.xwd
convert -trim ${file}.xwd ~/plot.png
rm -f $file
rm -f ${file}.xwd

Cheers,

Roger
--
Nottingham One Day Juggling Convention
5th March 2005 - 10am-Late
http://www.nottsjuggling.co.uk
 
Roger Light wrote:
Hi,

We currently have a cdsplotinit entry for plotting to a png file that
works quite satisfactorily. I have now been asked if it can be made to
work when plotting hierarchically. This would mean giving the files the
correct name. I am stumped as how to go about this, other than I might
need to delve into skill. Can anybody suggest how I might go about this?

This is in Virtuoso schematic on IC 5.0.33 USR2.

Our current setup is:

PNG Out|Generic 600 dpi Adobe PostScript Level 1 Plotter: \
:manufacturer=Hewlett Packard PCL: \
:type=intCLR: \
:spool=/eee/vlsi/Cadence/cdsPNG.sh: \
:sf:sh: \
:maximumPages#1: \
:resolution#600: \
:paperSize="5cm sqr" 1182 1182 0 0: \
:paperSize="10cm sqr" 2364 2364 0 0: \
:paperSize="20cm sqr" 4728 4728 0 0: \
:paperSize="40cm sqr" 9456 9456 0 0: \
:paperSize="A4" 4758 6846 0 0:

Where cdsPNG.sh is:

#!/bin/tcsh
setenv PATH /opt/csw/bin:$CDSDIR/tools/plot/bin:$PATH
setenv file /var/tmp/cadPlot$$

cat - > $file

raptor -a -m color $file | XWDout > ${file}.xwd
convert -trim ${file}.xwd ~/plot.png
rm -f $file
rm -f ${file}.xwd
1) If you are supposed to use 'tcsh' for scripting than name
your script properly (i.e. cdsPNG.tcsh), and the change
the first line to:

#!/bin/tcsh -f

2) Here is a popper sh-script (cdsPNG.sh :):

-------------------------------------------------
#!/bin/sh
PATH=$CDSDIR/tools/plot/bin:$PATH_to_convert:$PATH
export PATH

file=/var/tmp/cadPlot$$

cat - > $file

raptor -a -m color $file | XWDout > ${file}.xwd
convert -trim ${file}.xwd ${file}.png
-------------------------------------------------

You will find your png-s of course in /var/tmp.



3) Why not use a postscript printer, plot to a file
and then convert your "ps" files
(Your_File_Name@libName,cellName,viewName.ps):

-------------------------------------------------
#!/bin/sh
for file in Your_File_Name*.ps
do
png=`basename $file .ps`.png
convert -trim $file $png
done
-------------------------------------------------
 
Roger:
You might find the following SKILL to plot all the cells in the
hierarchy of use.
---
Erik

procedure(plot_cell(cvIdt)
prog((schPlotOptions lePlotOptions view_ID needsupdate)

;plot symbol schematic and layout if they exist
foreach(view_ID list("symbol" "schematic" "layout")

; open cellview for read
if(cvId=dbOpenCellViewByType( cvIdt~>libName cvIdt~>cellName
view_ID nil "r") then
when(ddGetObj(cvId~>libName cvId~>cellName view_ID)
objId=ddGetObj(cvId~>libName cvId~>cellName view_ID)
needsupdate=1
if(isFileName(sprintf(nil "%s/%s/%s.pdf" destination
cvId~>cellName view_ID)) then

if(stringToTime(ddGetObjLastModify(objId))>fileTimeModified(sprintf(nil
"%s/%s/%s.pdf" destination cvId~>cellName view_ID)) then
;the file at the destination is older than the
current plot pdf
needsupdate=1
else
needsupdate=0
) ; if
) ; if

;schematic or symbol plot
when((((cvId~>viewName == "symbol" && plot_symbol == "Yes")
|| (cvId~>viewName == "schematic" && plot_schematic == "Yes")) &&
needsupdate == 1)

;set plot options
schPlotOptions = '(nil
stopcells ""
ignorelibs ""
hierarchy nil
hierleveldown 0
area "whole"
multisheet nil
plot "cellview"
noteText ""
grid nil
indexsheet t
notes nil
header t
plotToFile t
papersize "A"
display "display"
time "now"
tmpdir "/usr/tmp"
copy 1
offset (0.0 0.0)
unit "inches"
center t
mail nil
mailto ""
orientation "automatic"
)

schPlotOptions->plotter=plotter
schPlotOptions->view=eval(cvId~>viewName)
schPlotOptions->cell=eval(cvId~>cellName)
schPlotOptions->library=eval(cvId~>libName)
schPlotOptions->bBox=cvId~>bBox
schPlotOptions->viewlist=eval(cvId~>viewName)
schPlotOptions->outputfile=sprintf(nil
"/usr/tmp/%s:%s:%s.ps" cvId~>libName cvId~>cellName cvId~>viewName)

;plot schematic
schPlot()

) ; when

;layout plot
when((cvId~>viewName == "layout" && plot_layout == "Yes" &&
needsupdate == 1)

;set plot options
lePlotOptions = '(nil
area "whole"
plot "cellview"
noteText ""
notes nil
header t
plotToFile t
papersize "A"
display "display"
time "now"
tmpdir "/usr/tmp"
copy 1
center t
mailto ""
mail nil
orientation "automatic"
scale 1.0
plotsize (8.0 9.9)
offset (0.0 0.0)
unit "inches"
gridMultiple 5
gridSpacing 1.000000
gridType "None"
stopLevel 64
startLevel 0
arrayDisplay "Full"
instName "instance"
pathCL "yes"
drawAxesOn nil
iconsOn nil
)

lePlotOptions->plotter=plotter
lePlotOptions->view=eval(cvId~>viewName)
lePlotOptions->cell=eval(cvId~>cellName)
lePlotOptions->library=eval(cvId~>libName)
lePlotOptions->outputfile=sprintf(nil
"/usr/tmp/%s:%s:%s.ps" cvId~>libName cvId~>cellName cvId~>viewName)

;plot layout
lePlot()
) ; when
) ; when
) ; if
) ; foreach

return(t)

) ; prog
) ; procedure

prog((childview view_ID)

;hit every child
foreach(inst top_cell_view->instances
if((inst->purpose == "cell") && (inst->objType == "inst") then

;make sure the cell exists and skip reference libraries
if(inst->libName == top_cell_view~>libName &&
dbOpenCellViewByType( inst~>libName inst~>cellName
top_cell_view~>viewName nil "r") then

;open child view for read
childview=dbOpenCellViewByType(top_cell_view~>libName
inst~>cellName top_cell_view~>viewName nil "r")

if(!member(sprintf(nil "%s;%s" childview~>cellName
childview~>viewName) blocks_list) then
;add cell to blocks list
blocks_list=cons(sprintf(nil "%s;%s" childview~>cellName
childview~>viewName) blocks_list)

;plot cell
plot_cell(childview)

) ; if

if(childview->instances then
level=level+1
plot_hierarchy(childview level)
level=level-1
) ; if

;close cell view
dbClose(childview)
) ; if
) ; if

) ; foreach

) ; prog
) ; procedure
 

Welcome to EDABoard.com

Sponsor

Back
Top