Linux处理cds文件,Cadence中Schematic,Layout以及Waveform的打印输出及图片文件后处理...
1. Plotter的設(shè)置將.cdsplotinit文件放置在工作目錄或者用戶根目錄下。google一下可以找到很多.cdsplotinit文件,但是最簡(jiǎn)單有效的方法是將Cadence自帶的Sample文件拿過(guò)來(lái)直接使用。將$CDSHOME/tools/plot/cdsplotinit/samples/cdsplotint.sample拷貝至工作目錄或者用戶根目錄,并改名為.cdsplotinit即可。打印機(jī)的定義可以參照cdsplotint.sample文件,這里給一個(gè)例子:
EPS|Encapsulated Postscript. \
:manufacturer=Adobe: \
:type=epsf: \
:maximumPages#1: \
:resolution#300: \
:paperSize="Unlimited" 72000 72000:
經(jīng)過(guò)以上設(shè)置之后,Plotter一般就算設(shè)置好了。如果這樣還有問(wèn)題,可以添加環(huán)境變量
setenv CDSPLOTINIT ~/.cdsplotinit (對(duì)應(yīng)的是.cdsplotinit保存在用戶根目錄,如果.cdsplotinit保存在工作目錄,則給出相應(yīng)路徑。)
2.Schematic或layout打印成PS或EPS輸出(1)打開(kāi)相應(yīng)的schematic或layout。
(2)在Virtusuo Schematic Editor或Virtusuo Layout Editor中,[Design] - [Plot] - [Submit...], 將調(diào)出Submit Plot窗口。
(3)在Area to Plot欄里點(diǎn)擊Select按鈕,可以選擇需要打印的區(qū)域,默認(rèn)是Full Size。
(4)Plot With可以選擇header(默認(rèn)是已選擇)和notes。一般不選。
(5)點(diǎn)擊右下部的Plot Options按鈕,調(diào)出Plot Options窗口。
(6)在Plotter Name有下拉菜單,可以選擇你已設(shè)置添加的Plotter,Paper Size選擇打印頁(yè)面尺寸,因?yàn)橐话愦蛴〕蒔S或EPS文件是為了作文檔貼圖,什么尺寸都可以,默認(rèn)即可。Orentation一般默認(rèn)選Autamatic即可。
(7)可以選擇Center Plot或、和Fit to Page,前者決定是否打印在頁(yè)面正中還是從頁(yè)面的默認(rèn)起始端開(kāi)始打印,后則決定打印的圖形是否放大到整個(gè)頁(yè)面。
(8)選中Send Plot Only To File,并添加希望生成的文件保存的路徑及文件名,比如~/figure/eps/schematic.ps (或schematic.eps)。
(9)取消MAIl Log To選項(xiàng),否則每次打印都會(huì)給你設(shè)置的默認(rèn)郵箱發(fā)送通知email。
(10)OK,關(guān)閉Plot Options窗口,返回到Submit Plot窗口。
(11)Submit Plot窗口中點(diǎn)OK,Plot Options窗口將關(guān)閉并在(8)所設(shè)置的打印路徑下生成相應(yīng)的PS或EPS文件。如果想測(cè)試不同打印設(shè)置的效果,可以在Plot Options窗口中修改Plotter name等設(shè)置
,并在Submit Plot窗口中反復(fù)Apply即可。
3. Wavescan的波形圖打印成PS或EPS輸出(1)在Graph Window中,[File] - [Print...],調(diào)出Print窗口。[Print Service]的[Name]中下拉菜單選擇設(shè)置的虛擬打印機(jī)。我這邊默認(rèn)有一個(gè)名為lp的打印機(jī),前述.cdsplotinit文件中設(shè)置的打印機(jī)并非都能在此處出現(xiàn)。比如下面定義的打印機(jī)將會(huì)出現(xiàn):
IBM 4039|Apple LaserWriter II NT/NTX: \
:manufacturer=IBM Corp: \
:type=postscript1: \
:spool=/bin/qprt -Pps -c -Bnn: \
:query=lpq -Pps: \
:remove=lprm -Pps $3: \
:resolution#300: \
:maximumPages#30: \
:paperSize="A" 2400 3150 75 75:
原則上由.cdsplotinit定義的postscript類型的打印機(jī)都可以被Wavescan使用,但是需要在.cdsplotinit定義postscript類型打印機(jī)的時(shí)候明確指出打印機(jī)的名字,比如上例中的:spool=/bin/qprt -Pps -c -Bnn: \ 定義了Wavescan的打印機(jī)列表中出現(xiàn)的名字為ps,又如:spool=lpr -Php4m: \ 定義了Wavesacn的打印機(jī)列表中出現(xiàn)的名字為hp4m。還可以使用-d $PRINTER參數(shù),比如下面例子中將直接引用(:spool=lp -d $PRINTER:)第一行定義的打印機(jī)名字(Guide-PS BW),使之出現(xiàn)在Wavescan的打印機(jī)列表中:
Guide-PS BW|Hewlett-Packard LaserJet, PS: \
:manufacturer=Hewlett-Packard: \
:type=postscript1: \
:spool=lp -d $PRINTER: \
:query=lpstat -o $PRINTER: \
:remove=cancel $1 $PRINTER: \
:maximumPages#30: \
:resolution#600: \
:paperSize="A4" 4758 6846 90 90:(2)選擇Print To File。其他選項(xiàng)一般默認(rèn)即可。[Appearance] - [Color Appearance]可以選擇打印成黑白[Monochrome]還是彩色[Color]。[Annotations]可以設(shè)置[Trace Legends]和[Labels and Cursors]。
(3)點(diǎn)[Print]將調(diào)出Print to File對(duì)話框,選擇合適的路徑,設(shè)置文件名,比如WaveScan.eps。[OK],在所設(shè)置的打印路徑下生成相應(yīng)的PS或EPS文件。
4. PS或EPS轉(zhuǎn)PDFEPS文件可以直接被Tex/LaTex使用,但是有些時(shí)候可能需要將PS/EPS文件轉(zhuǎn)換成PDF使用。如前所述,上面方法生成的PS或EPS文件的后綴名互改(比如將原始生成的schematic.ps改為schematic.eps,或者將原始生成的layout.eps改為layout.ps)似乎都沒(méi)有問(wèn)題。將已生成的PS或EPS文件轉(zhuǎn)換成PDF可以在Linux/Unix命令行方式下完成,也可以在Windows XP下完成。
(1). Linux/Unix命令行方式是進(jìn)入PS/EPS保存目錄,運(yùn)行:ps2pdfwr schematic.eps schematic.pdf
該命令的完整的語(yǔ)法是:ps2pdfwr [options...] (input.[e]ps|-) [output.pdf|-]。
(2).Windows XP下可以右鍵單擊schematic.ps,[Converter to Adobe PDF].或者也可以從右鍵菜單中選擇[從程序打開(kāi)] - [Acrobat Distiller]。
(3).?用Gsview轉(zhuǎn)換。Gsview打開(kāi)PS/EPS文件,[File] > [Convert...] > [Device]選擇[pdfwriter],[Resolution]選300,[Pages]選擇需轉(zhuǎn)換的頁(yè)面,其他默認(rèn),[OK]。強(qiáng)烈推薦此方法,生成的PDF文件比(2)小很多!
需要指出的是,Linux/Unix命令行方式和XP的Acrobat Distiller方式轉(zhuǎn)換wavescan波形圖形的時(shí)候可能會(huì)丟失一些圖形信息,比如波形圖中的一些Guidline。至少在我這邊是這樣的情況,也許是具體設(shè)置的問(wèn)題,原因暫時(shí)不明。
5. PS或EPS轉(zhuǎn)EMF,JPG及PNG文件。(參見(jiàn)另文“EPS格式圖片轉(zhuǎn)EMF格式圖片之GSview+ pstoedit”)
6. Plotter設(shè)置的錯(cuò)誤檢查。有些人發(fā)現(xiàn)就算按照1中所述設(shè)置好了.cdsplotinit,在2的Submit Plot窗口中還是看不到任何可選擇的Plotter,我本人就碰到過(guò)這么奇怪的事情,具體原因至今不明,但是懷疑是XP和Linux之間的文字編碼出了什么問(wèn)題,導(dǎo)致不能正常識(shí)別.cdsplotinit文件中的空格或者換行符。
這時(shí)候就有三條非常重要也非常有用的命令來(lái)幫助你確認(rèn)錯(cuò)誤所在。在CIW窗口中輸入下面三條命令:
CIW> psConfigLoaded()CIW> psLoadCdsPlotInit()CIW> psQueryPlotters()我碰到過(guò)一次問(wèn)題就是通過(guò)psLoadCdsPlotInit()發(fā)現(xiàn).cdsplotinit文件中有不能識(shí)別的錯(cuò)誤,最后重新編輯.cdsplotinit文件(雖然我自己認(rèn)為內(nèi)容完全沒(méi)有變化,但是可能字體編碼有變化)而解決的。
7. AWD
[Window] > [Hardcopy…]
8. 使用Illustrator編輯PS文件解除Group,修改線條3pt,文字1pt。
9. PS文件的直接編輯
使用文本編輯器打開(kāi)PS文件,找到其中的字體設(shè)置段落,可以將其中的Helvetica改為Arial。
10.? Encapsulated PostScript. Plotting with TIFF Preview
By plotting to an Encapsulated PostScript. (EPS) plotter with TIFF preview, you can use the resulting file in Microsoft Word or other Microsoft Office applications.For example, you can add the following to your .cdsplotinit file:Encapsulated PostScript. TIFF preview |Encapsulated PostScript. \
:manufacturer=Adobe: \
:type=epsfiC: \
:EPSPreviewType=TIFF: \
:resolution#300: \
:maximumPages#1: \
:paperSize="5x5 inches" 1500 1500: \
:paperSize="8x8 inches" 2400 2400: \
:paperSize="Unlimited" 72000 72000:
You can specify any of the following type keywords:
type=epsf
EPS black and white, without preview
type=epsfi
EPS black and white, with preview
type=epsfC
EPS with color, no preview
type=epsfiC
EPS with color, with preview
To plot from the virtuoso? Schematic Editor, do the following:
Choose Design - Plot - Submit.
The Submit Plot form. appears.
In the Plot With group box, remove the mark from the header check box.
At the bottom right corner of the form, click Plot Options.
The Plot Options form. appears.
On the Plot Options form, mark the following check boxes:
Center Plot
Fit to Pate
Send Plot Only To File
In the field to the right of the Send Plot Only To File check box, type a file name.
For example, test.eps.
You can insert the plot in a Microsoft Word document by doing the following:
Choose Insert - Picture - From File.
Navigate to and select the file.
Click Insert.
REFERENCES
1. Cadence Design System, Inc.,Virtuoso? Schematic Editor User Guide, Product Version 5.1.4.1,?Chapter 11, October 2008.
2. Cadence Design System, Inc.,Plotter Con?guration User Guide, Product Version 5.0,?November 2005.
總結(jié)
以上是生活随笔為你收集整理的Linux处理cds文件,Cadence中Schematic,Layout以及Waveform的打印输出及图片文件后处理...的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 浏览器怎么屏蔽广告
- 下一篇: oracle sql plus 安装教程