## Liberty Metric Extraction
### installation
pip install libertymetric
### import package
from libertymetric.classLiberty import liberty as lutil
### load & convert CCS to JSON
lnode = lutil.read_lib('ccs.lib')
lutil.dump_json(lnode,out='ccs.json')
lnode.keys()
### load liberty from JSON
lnode = lutil.load_json('ccs.json')
lnode.keys()
### list cells in the liberary
[v for v in lnode['cell']]
### grab cell node by cell-name, e.g., 'ND2D1LVT'
cnode = lnode['cell']['ND2D1LVT']
### encapsulate all timing/power tables by timing-arc into a dataframe
lutT = lutil.get_cell_timing(cnode,todf=True)
lutP = lutil.get_cell_power(cnode,todf=True)
lutT.index # enumerate all lookup tables encapsulated by timing-arc
lutP.index # enumerate all lookup tables encapsulated by timing-arc
### lookup table interpolation, e.g., timing-arc ('A1,ZN,', 'combinational', 'cell_rise')
lut = lutT.loc[('A1,ZN,', 'combinational', 'cell_rise')]
y,x,v = map(np.array,lut.values) # unpack values as numpy array
### timing interpolation based on the specified transition & load
lutil.table_lookup(lut,trans=0.0207,load=0.0010072,dflag=True)
### LS regression & prediction
lutil.lut2lsCoeff(lut.to_dict(),trans=0.03,load=0.0017,dflag=True)
### visualization
lutT = lutT.T.to_dict() # convert dataframe to JSON
lutil.plot_lut(lutT,keys=('A1,ZN,', 'combinational', 'cell_rise'))
Raw data
{
"_id": null,
"home_page": "https://github.com/dipsci/liberty",
"name": "libertymetric",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "liberty,metric,timing,EDA,physical design",
"author": "hockchen",
"author_email": "hock.chen@dipsci.com",
"download_url": "https://files.pythonhosted.org/packages/c8/4b/8539dfe64b68c5e912cb1f73dcb8788db1b90e4fe6a6aa129f8fae5dd650/libertymetric-0.1.4.tar.gz",
"platform": null,
"description": "## Liberty Metric Extraction\n\n### installation\npip install libertymetric\n\n\n### import package\nfrom libertymetric.classLiberty import liberty as lutil\n\n\n### load & convert CCS to JSON\nlnode = lutil.read_lib('ccs.lib')\nlutil.dump_json(lnode,out='ccs.json')\nlnode.keys()\n\n\n### load liberty from JSON\nlnode = lutil.load_json('ccs.json')\nlnode.keys()\n\n\n### list cells in the liberary\n[v for v in lnode['cell']]\n\n\n### grab cell node by cell-name, e.g., 'ND2D1LVT'\ncnode = lnode['cell']['ND2D1LVT']\n\n\n### encapsulate all timing/power tables by timing-arc into a dataframe\nlutT = lutil.get_cell_timing(cnode,todf=True)\nlutP = lutil.get_cell_power(cnode,todf=True)\nlutT.index # enumerate all lookup tables encapsulated by timing-arc\nlutP.index # enumerate all lookup tables encapsulated by timing-arc\n\n\n### lookup table interpolation, e.g., timing-arc ('A1,ZN,', 'combinational', 'cell_rise')\nlut = lutT.loc[('A1,ZN,', 'combinational', 'cell_rise')]\ny,x,v = map(np.array,lut.values) # unpack values as numpy array\n\n\n### timing interpolation based on the specified transition & load\nlutil.table_lookup(lut,trans=0.0207,load=0.0010072,dflag=True)\n\n\n### LS regression & prediction\nlutil.lut2lsCoeff(lut.to_dict(),trans=0.03,load=0.0017,dflag=True)\n\n\n### visualization\nlutT = lutT.T.to_dict() # convert dataframe to JSON\nlutil.plot_lut(lutT,keys=('A1,ZN,', 'combinational', 'cell_rise'))\n\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Liberty Metric Utility",
"version": "0.1.4",
"split_keywords": [
"liberty",
"metric",
"timing",
"eda",
"physical design"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "dc3287f64352ebec04f7526c1f2c5391",
"sha256": "e4d193a61aab131e67a7e72f025d6b91692755c9a427a9eeaebf3a10f7f1dc91"
},
"downloads": -1,
"filename": "libertymetric-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dc3287f64352ebec04f7526c1f2c5391",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 13186,
"upload_time": "2022-12-09T10:32:01",
"upload_time_iso_8601": "2022-12-09T10:32:01.410725Z",
"url": "https://files.pythonhosted.org/packages/8b/fe/289818130449971fed72079c4c769db5d1da633e6303099e9f3813defc56/libertymetric-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "f424898a548d44113035dfd7cb68337d",
"sha256": "af42a084f9671f3a426cc760b822be08e9af7a068f096c07e4361797b4c91aa8"
},
"downloads": -1,
"filename": "libertymetric-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "f424898a548d44113035dfd7cb68337d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11802,
"upload_time": "2022-12-09T10:32:03",
"upload_time_iso_8601": "2022-12-09T10:32:03.652597Z",
"url": "https://files.pythonhosted.org/packages/c8/4b/8539dfe64b68c5e912cb1f73dcb8788db1b90e4fe6a6aa129f8fae5dd650/libertymetric-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-09 10:32:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "dipsci",
"github_project": "liberty",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "libertymetric"
}