热度 8| |||
来源微信公众号:icdlab,关注公众号获取更多信息
下图为skillbridge实现方法,图片由unihd-cag绘制
cd ~/your/path/skillbridge
pip install -e .
[icdlab@icdlab ~]$ skillbridge
usage: skillbridge [-h] {shell,path,generate,status,export,import} ...
CLI utility for the various skillbridge management commands
optional arguments:
-h, --help show this help message and exit
commands:
{shell,path,generate,status,export,import}
shell opens a python interpreter with a connected workspace
path show the path to the skill script
generate generate static completion file
status deprecated, not needed anymore
export deprecated, not needed anymore
import deprecated, not needed anymore
skillbridge path
[icdlab@icdlab skillbridge]$ skillbridge path
Path to Skill server script:
/home/icdlab/tools/skillbridge/skillbridge/server/python_server.il
Type this into the Skill console:
load("/home/icdlab/tools/skillbridge/skillbridge/server/python_server.il")
; add this line at the end of .cdsinit file
load("/home/icdlab/tools/skillbridge/skillbridge/server/python_server.il")
启动virtuoso, load python_server.il文件后CIW会有如下显示信息
Loading ./.cdsinit init file from the site init file.
"load ICDSkill Menu"
Available commands:
pyStartServer ?id "default" ?logLevel "WARNING" ?singleMode nil ?timeout nil ?python "python"
pyKillServer
pyReloadScript
pyShowLog [numberOfLines]
pyRunScript path ?args list() ?python "python"
pyStartServer ?id "default" ?logLevel "WARNING" ?singleMode nil ?timeout nil ?python "python"
skillbridge generate
pip install mypy
在terminal中输入:
skillbridge shell
即可在terminal中用python命令与virtuoso交互,示例如下:
[icdlab@icdlab ~]$ skillbridge shell
Interactive Python interpreter with skillbridge Workspace `ws`
>>> cellx = ws.ge.get_edit_cell_view()
>>> print(dir(cellx))
['DBUPerUU', 'any_inst_count', 'area_boundaries', 'assoc_text_displays', 'b_box', 'blockages', 'cell', 'cell_name', 'cell_type', 'cell_view', 'cell_view_type', 'clusters', 'conns', 'constraint_groups', 'create_time', 'fig_groups', 'file_name', 'file_time_stamp', 'g_cell_patterns', 'group_members', 'groups', 'guides', 'inst_header_refs', 'inst_headers', 'inst_refs', 'instance_masters', 'instances', 'is_param_cell', 'layer_headers', 'layer_purpose_pairs', 'lib', 'lib_name', 'lpps', 'markers', 'mem_insts', 'mode', 'modified_but_not_saved', 'modified_counter', 'mosaics', 'need_refresh', 'net_count', 'nets', 'obj_type', 'pr_boundary', 'prop', 'routes', 'row_headers', 'rows', 'shapes', 'sig_names', 'signals', 'site_pattern', 'snap_boundary', 'steiners', 'sub_masters', 'super_master', 'term_count', 'terminals', 'text_displays', 'track_patterns', 'user_units', 'via_headers', 'via_masters', 'via_variants', 'vias', 'view', 'view_name']
>>> print(cellx.lib_name)
icdlab
>>> print(cellx.cell_name)
icdPcellRect
>>> print(cellx.view_name)
layout
>>> print(cellx.instances)
None
>>> print(cellx.lib)
<remote Lib@0x151b2f40>
>>>
简单范例如下:
from skillbridge import Workspace
ws = Workspace.open()
icdCell = ws.ge.get_edit_cell_view()
# Skill equivalent: icdCell = geGetEditCellView()
print(dir(icdCell))
print(icdCell.lib_name)
print(icdCell.cell_name)
print(icdCell.view_name)
关注微信公众号:icdlab,将本条微信共享到朋友圈,点赞达到5个后,将朋友圈截图发送到公众号,公众号将会在24小时之内将下载链接发送给您
免责声明:
1,本公众号主要是交流学习IC设计知识,部分素材源于网络,若有侵权,作者会第一时间修改删除;
2,本公众号标明原创的文章欢迎转载并注明出处;
3,本公众号文章中出现的脚本仅供学习之用,作者不对其他任何个人或组织在使用脚本过程中产生的任何纠纷负责;
4,本公众号的主体为个人,发表文章纯属个人交流学习行为,文章的观点也属个人观点,与作者曾经任职或者正在任职的公司、其他个人或组织没有任何关系;
5,本公众号文章为个人撰写,错误和疏漏之处在所难免,希望大家指正;
6,本公众号发表的文章依赖各种软件,作者所获取的软件仅供学习交流之用,若有侵权,作者将配合删除;