【virtuoso导入gds和cdl网表记录】

提示:本文为个人笔记,记录日常工作
工艺文档:SMIC 40nm Low Leakage HD C40 ECO RVT Logic Process Standard Cell Library Databook V0.0

1. gds导入成功

在这里插入图片描述

2. cdl导入成功

  • CDL文件中P11LL_CKT均为黑盒,DGSB为修改之后的端口名,因为PDK中端口为DGSB

  • input设置
    在这里插入图片描述

  • output设置
    在这里插入图片描述

  • Device Map设置
    在这里插入图片描述

  • apply之后显示正在导入,最终显示成功
    在这里插入图片描述

  • 修改后的cdl文件
    在这里插入图片描述

3. LVS失败

  • 对版图跑和原理图运行仿真,LVS不一致
    在这里插入图片描述

在这里插入图片描述

4. 调整后成功

  • 由于KINV1_8T4R40调用了BASECELL,因此将BASECELL中的空盒替换为P11LL_CKT和N11LL_CKT。
    在这里插入图片描述

  • 尽管LVS通过,但是仍旧有报错
    在这里插入图片描述
    这是因为电源和地的连接问题,可忽略。调用之后需要将body连接到VDD或者VSS


180nm工艺库导入

1. cdl文件问题

由于cdl文件中包含以下两行导致了两个问题:

  • 原理图中的W/L长度不是180nm,而是长度的最大值。因为单位问题
  • 原理图中的VDD和VSS为VDD!和VSS!,与版图不符
    在这里插入图片描述

2. 修改cdl文件

  • 修改.scale meter 为.OPTION SCALE 1e-6
  • 删除.GLOBAL GND VSS VDD
  • 为所有子电路加上VSS和VDD 端口,可以用python实现

先将原cdl文件后缀改为txt文件
再将文件转为python列表
随后对列表进行insert插值得到新的列表
将列表输出文件中即可

lines = []

fp = open('smic18.txt', 'r')
for line in fp.readlines():
    lines.append(line)
print(len(lines))
i = 0

key_words = '.subckt'
for i in range(13156): # change here
    # print(lines[i])
    if lines[i][0:7]==key_words:
        lines.insert(i+1, '+VDD VSS\n')
        i=i+2
    else:
        i=i+1

# print(lines)
print(len(lines))
result = open('smic18wp.txt', 'w')
for j in lines:
    result.write(j)

result.close()
fp.close()

最终一个子电路的描述如下:
在这里插入图片描述

3. 利用skill批量修改W

  • 导入之后,晶体管的宽长比与cdl文件中的宽长比不符,因此此处利用skill进行修改。主要想法是利用case语句逐个访问相应的晶体管,修改宽长比
# 由于skill中case语句中的格式为:
# case(input_name
#(case_name1 case operation)
#(case_name2 case operation)
#(case_name3 case operation)
# ......
# )
# 因此需要修改以下代码为合适的格式,依旧比较麻烦
M0 VDD K hnet23 VDD p18 l=0.18u w=0.86u
M1 hnet23 s net46 VDD p18 l=0.18u w=0.86u
M2 hnet27 cn net50 VDD p18 l=0.18u w=1.5u
M3 hnet29 cn net50 VDD p18 l=0.18u w=1.5u
M4 hnet26 cn net50 VDD p18 l=0.18u w=1.5u
M5 VDD m hnet27 VDD p18 l=0.18u w=1.5u
M6 VDD m hnet29 VDD p18 l=0.18u w=1.5u
M7 VDD m hnet26 VDD p18 l=0.18u w=1.5u
M8 hnet25 m VSS VSS n18 l=0.18u w=1u
M9 hnet28 m VSS VSS n18 l=0.18u w=1u
M10 hnet32 m VSS VSS n18 l=0.18u w=1u
M11 net50 c hnet25 VSS n18 l=0.18u w=1u
M12 net50 c hnet28 VSS n18 l=0.18u w=1u
M13 net50 c hnet32 VSS n18 l=0.18u w=1u
M14 VDD s net54 VDD p18 l=0.18u w=0.32u
M15 VDD J net54 VDD p18 l=0.18u w=0.32u
M16 hnet37 s VSS VSS n18 l=0.18u w=0.3u
M17 net54 J hnet37 VSS n18 l=0.18u w=0.3u
M18 net64 s VSS VSS n18 l=0.18u w=0.58u
M19 net61 net54 net64 VSS n18 l=0.18u w=0.58u
M20 net64 K VSS VSS n18 l=0.18u w=0.58u
M21 net91 cn net61 VSS n18 l=0.18u w=0.58u
M22 net46 net54 VDD VDD p18 l=0.18u w=0.74u
M23 net91 c net46 VDD p18 l=0.18u w=0.86u
M24 QN net50 VSS VSS n18 l=0.18u w=2.4u
M25 VDD net50 QN VDD p18 l=0.18u w=3.6u
M26 Q s VSS VSS n18 l=0.18u w=2.4u
M27 VDD s Q VDD p18 l=0.18u w=3.6u
M28 m net91 VSS VSS n18 l=0.18u w=0.92u
M29 VDD net91 m VDD p18 l=0.18u w=1.38u
M30 c cn VSS VSS n18 l=0.18u w=0.7u
M31 VDD cn c VDD p18 l=0.18u w=1u
M32 s net50 VSS VSS n18 l=0.18u w=1.36u
M33 VDD net50 s VDD p18 l=0.19u w=2.05u
M34 cn CK VSS VSS n18 l=0.19u w=1.2u
M35 VDD CK cn VDD p18 l=0.18u w=1.8u
M36 hnet53 c net50 VDD p18 l=0.18u w=0.3u
M37 VDD s hnet53 VDD p18 l=0.18u w=0.3u
M38 hnet51 s VSS VSS n18 l=0.18u w=0.3u
M39 net50 cn hnet51 VSS n18 l=0.18u w=0.3u
M40 hnet59 cn net91 VDD p18 l=0.18u w=0.42u
M41 VDD m hnet59 VDD p18 l=0.18u w=0.42u
M42 hnet57 m VSS VSS n18 l=0.18u w=0.3u
M43 net91 c hnet57 VSS n18 l=0.18u w=0.3u
  • 修改代码为
id_cell = dbOpenCellViewByType("smic18mmrf_std" "JKFFX4" "schematic")
inst_cell = id_cell~>instances
inst_cell_length = length(inst_cell)

for(i 0 inst_cell_length
    if(nth(i inst_cell)~>cellName == "n18"||nth(i inst_cell)~>cellName == "p18"
        then
        
        name = nth(i inst_cell)~>name

        case(name
            ("M0" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.86u" println("change over"))
            ("M1" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.86u" println("change over"))
            ("M2" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1.5u" println("change over") )
            ("M3" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1.5u" println("change over") )
            ("M4" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1.5u" println("change over") )
            ("M5" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1.5u" println("change over") )
            ("M6" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1.5u" println("change over") )
            ("M7" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1.5u" println("change over") )
            ("M8" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1u" println("change over") )
            ("M9" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1u" println("change over") )
            ("M10" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1u" println("change over") )
            ("M11" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1u" println("change over") )
            ("M12" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1u" println("change over") )
            ("M13" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1u" println("change over") )
            ("M14" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.32u" println("change over") )
            ("M15" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.32u" println("change over") )
            ("M16" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.3u" println("change over") )
            ("M17" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.3u" println("change over") )
            ("M18" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.58u" println("change over") )
            ("M19" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.58u" println("change over") )
            ("M20" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.58u" println("change over") )
            ("M21" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.58u" println("change over") )
            ("M22" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.74u" println("change over") )
            ("M23" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.86u" println("change over") )
            ("M24" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="2.4u" println("change over") )
            ("M25" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="3.6u" println("change over") )
            ("M26" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="2.4u" println("change over") )
            ("M27" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="3.6u" println("change over") )
            ("M28" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.92u" println("change over") )
            ("M29" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1.38u" println("change over") )
            ("M30" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.7u" println("change over") )
            ("M31" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1u" println("change over") )
            ("M32" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1.36u" println("change over") )
            ("M33" nth(i inst_cell)~>l="0.19u" nth(i inst_cell)~>w="2.05u" println("change over") )
            ("M34" nth(i inst_cell)~>l="0.19u" nth(i inst_cell)~>w="1.2u" println("change over") )
            ("M35" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="1.8u" println("change over") )
            ("M36" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.3u" println("change over") )
            ("M37" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.3u" println("change over") )
            ("M38" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.3u" println("change over") )
            ("M39" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.3u" println("change over") )
            ("M40" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.42u" println("change over") )
            ("M41" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.42u" println("change over") )
            ("M42" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.3u" println("change over") )
            ("M43" nth(i inst_cell)~>l="0.18u" nth(i inst_cell)~>w="0.3u" println("change over") )

        );case
        cell_name = nth(i inst_cell)~>cellName
        fw = nth(i inst_cell)~>fw
        w = nth(i inst_cell)~>w
        l = nth(i inst_cell)~>l
        m = nth(i inst_cell)~>m
        printf("name: %s; cell name %s; finger width %s; width %s; length %s; multiplier %s\n" name cell_name fw w l m)
        else println("this is not cell")
    );if
);for

  • 但即便原理图中显示的宽长比与Property Editor中显示的宽长比不一样,LVS的结果是成功的。即版图中的宽长比与显示的宽长比一致,不是Property Editor中的宽长比
    在这里插入图片描述

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值