版图新手求助skill问题
我是一个没有写过任何代码的版图新人,因为要对工艺的一个器件做改变,要把它做成一个cell进行识别,写了下面的这段代码,如果你有skill方面的经验,希望你能帮我看看这段代码。谢谢你。
目标:我希望得到如图所示的这样的一个电路
实际:我写的代码实现的电路,与目标差了pin,不知是我的代码哪里没有写好?
pcellId=pcDefinePCell(
list(ddGetObj("test_sj") "rm4_test" "schematic" "schematic")
;----------------------------------------------------------------
; Code itself
;----------------------------------------------------------------
let(( cvmaster masterl instId instIdl netHnetL
)
cv = pcCellView
;----------------------------------------------------------------
; open master cell view
;----------------------------------------------------------------
master = dbOpenCellViewByType( "test_sj" "rm4" "symbol" nil "r" )
masterl = dbOpenCellViewByType( "test_sj" "rm4" "symbol" nil "r" )
;----------------------------------------------------------------
; create the nets
;----------------------------------------------------------------
netH=dbMakeNet(cv "VCC")
netL=dbMakeNet(cv "VEE")
;----------------------------------------------------------------
; create the terminals
;----------------------------------------------------------------
dbCreateTerm(netH netH~>name "inputOutput")
dbCreateTerm(netL netL~>name "inputOutput")
;----------------------------------------------------------------
; create the instance of rm4
;----------------------------------------------------------------
instId = dbCreateInst(cv master "I0" 0:0 "R0" )
instIdl = dbCreateInst(cv masterl "I1" 0.8:0 "R0" )
;----------------------------------------------------------------
; Connect it up
;----------------------------------------------------------------
dbCreateConnByName(netH instId "plus");
dbCreateConnByName(netL instIdl "minus");
;----------------------------------------------------------------
; creat the wire
;----------------------------------------------------------------
schCreateWire( cv "draw" "full" list(0:0 0.8:0) 0.0625 0.0625 0.0 )
schCreateWire( cv "draw" "full" list(0:0 -0.4:0) 0.0625 0.0625 0.0
)
schCreateWire( cv "draw" "full" list(1.2:0 1.8:0) 0.0625 0.0625 0.0
)
;----------------------------------------------------------------
; creat the pin
;----------------------------------------------------------------
schCreatePin( cv master "netH" "inputoutput" nil -0.6:-0.4 "R0")
schCreatePin( cv masterl "netL" "inputoutput" nil 1.8:2.0 "R0")
dbClose( master )
dbClose( masterl )
t
) ; let
)
dbSave(pcellId)
dbClose(pcellId)
dbOpenCellViewByType( "test_sj" "rm4" "symbol" nil "r" )
你这个lib:test_sjcell:rm4view:symbol建好了没有?
建好了哦
感觉问题出在这一句上
schCreatePin( cv master "netH" "inputoutput" nil -0.6:-0.4 "R0")
你仔细检查一下symbol建得对不对
恩恩我检查过了哦,symbol是对的
这句话schcreatpin应该怎么写才可以呢?我把这句话引掉后,得到的结果跟没有引掉是一样的,所以说这句话应该是我写的不对,没有被编译出来,不知道该怎么改哦?
这个是我写的 rm4 的symbol的代码哦.
;;; define the symbol of rm4
pcellId=pcDefinePCell(
list(ddGetObj("test_sj") "rm4" "symbol" "schematicSymbol")
;----------------------------------------------------------------
; Formal parameters
;----------------------------------------------------------------
(
(buswidth 6)
(busvalue 0)
)
let(( cv
figH figL
hp ps pl bw lh
pxc plus minus)
cv = pcCellView
;----------------------------------------------------------------
; Various dimensions
;----------------------------------------------------------------
; half pin size
hp=0.025
; pin spacing
ps=0.125
; pin length
pl=0.05
;0.250
; box width
bw=0.3
;1.4375
; label height
lh=0.0625
; param label x coord
pxc= 0.5
;----------------------------------------------------------------
; create the shapes - first the pins
;----------------------------------------------------------------
figH = dbCreateRect(cv list("pin" "drawing") list(-hp:-hp hp:hp))
figL = dbCreateRect(cv list("pin" "drawing") list(2*pl+bw-hp:-hp 2*pl+bw+hp:hp) )
;----------------------------------------------------------------
; create the Lines
;----------------------------------------------------------------
dbCreateLine(cv list("device" "drawing") list(0:0 pl:0))
dbCreateLine(cv list("device" "drawing") list(pl:0 2*pl:2*pl))
dbCreateLine(cv list("device" "drawing") list(2*pl:2*pl 3*pl:-2*pl))
dbCreateLine(cv list("device" "drawing") list(3*pl:-2*pl 5*pl:2*pl))
dbCreateLine(cv list("device" "drawing") list(5*pl:2*pl 6*pl:-2*pl))
dbCreateLine(cv list("device" "drawing") list(6*pl:-2*pl 7*pl:0))
dbCreateLine(cv list("device" "drawing") list(pl+bw:0 2*pl+bw:0))
;---------------------------------------------------------------
; Then the boxes
;----------------------------------------------------------------
dbCreateRect(cv list("instance" "drawing") list(0:-1*ps 2*pl+bw:ps))
;---------------------------------------------------------------
; creat the nets
;----------------------------------------------------------------
plus=dbMakeNet(cv "plus")
minus=dbMakeNet(cv "minus")
;---------------------------------------------------------------
; creat the terminals
;----------------------------------------------------------------
dbCreateTerm(plus plus~>name "inputOutput")
dbCreateTerm(minus minus~>name "inputOutput")
;---------------------------------------------------------------
; creat the pins
;----------------------------------------------------------------
dbCreatePin(plus figH)
dbCreatePin(minus figL)
;----------------------------------------------------------------
; Put some labels
;----------------------------------------------------------------
label=dbCreateLabel(cv list("annotate" "drawing")
0.4:0.2
"cdsParam(3)" "centerRight" "R0" "stick" lh)
label~>labelType="ILLabel"
label=dbCreateLabel(cv list("annotate" "drawing")
0.4:0.3
"cdsParam(2)" "centerRight" "R0" "stick" lh)
label~>labelType="ILLabel"
label=dbCreateLabel(cv list("annotate" "drawing")
0.4:0.4
"cdsParam(1)" "centerRight" "R0" "stick" lh)
label~>labelType="ILLabel"
)
) ; let
dbSave(pcellId)
dbClose(pcellId)
这个我也看不出来哪有问题,我只写过layout的pcell。你可以在load程序的时候看一下CIW窗口有没有错误或者警告信息,然后根据这些信息判断一下哪里可能有问题。
你好,请问在做版图pcell的时候CIW窗口报错:*Error* eval:unbound variable - pcCellView是什么原因?
你们这些版图工程师都会skill啊?看得我好惭愧。
很不错的思路
好东西!thanks!
小编的问题解决了吗