unihd-cag / skillbridge Goto Github PK
View Code? Open in Web Editor NEWA seamless python to Cadence Virtuoso Skill interface
Home Page: https://unihd-cag.github.io/skillbridge/
License: GNU Lesser General Public License v3.0
A seamless python to Cadence Virtuoso Skill interface
Home Page: https://unihd-cag.github.io/skillbridge/
License: GNU Lesser General Public License v3.0
Verify correct documentation generation
I was trying to get OCEAN functions like simulator
, modelFile
, resultsDir
etc available to python through skillbridge. I modified the listFunctions
function argument as "[a-z]"
in the python_server.il
file so that it includes every kind of SKILL functions when I run pyDumpFunctionDefinitions
.
However I don't know how to use those the newly added OCEAN functions (like simulator
).
I could not get those functions through ws = Workspace.open()
then ws.simulator
.
Does skillbridge has the functionality to use OCEAN functions?
DB objects have an attribute objType
and DD objects have an attribute type
. We should use them to improve the string representation of the remote objects.
When virtuoso starts the python server we know the path to python_server.py
and we also know that this file is inside the site-packages
directory of a python installation. Maybe we can find out the correct python executable that belongs to this installation.
This removes the need to use a virtual environment.
Some Skill functions show a warning instead of throwing an error.
The Skillbridge should capture these warnings and replay them on the Python side.
Some things should be removed:
Remote objects should provide a way to print their Skill ID:
db:0x12345678
-> 0x12345678
For a minimal example:
There is no way to test the skillbridge in an external package without a running Virtuoso instance.
I was seeing a timeout error when I stay connected to the server and run some operations for a few hours. So I decided to set a longer timeout period by pyStartServer ?timeout nil
. But virtuoso returns this error
*Error* ilGetString: arg must be symbol or string - nil
I tried the command mentioned in the documentation pyStartServer ?timeout 10.5
which also returns the same error.
*Error* ilGetString: arg must be symbol or string - 10.5
sending 10.5
as string "10.5"
returns
pyStartServer ?timeout "10.5" t error "usage: /......./lib/python3.6/site-packages/skillbridge/server/python_server.py\n [-h] [--notify] [--single]\n socket {DEBUG,WARNING,INFO,ERROR,CRITICAL,FATAL}\n/tmp/mhasan13-lws54/anaconda3/envs/brian/lib/python3.6/site-packages/skillbridge/server/python_server.py: error: argument log_level: invalid choice: '10.5' (choose from 'DEBUG', 'WARNING', 'INFO', 'ERROR', 'CRITICAL', 'FATAL')\n" server was stopped with code 2
What is the correct way to set timeout to some value or nil?
This tools works with IC6.1.7 and ICADV and upwards
Currently the python_server.il
dumps every variable into the global namespace. Use let
to prevent that.
In line 100 python must be exchanged with __py_python
Currently all the path handling is done with strcat
and substr
. We must find a more robust way to manipulate the paths we use inside the skill server.
E.g. load("path-to-server.il ")
should work even if there are too many spaces.
Why
Some Cadence tools on Windows also use a built in Skill interpreter (Allegro).
For the Windows support, we need a new Channel
implementation, because currently we use TCP Unix Domain Sockets.
Windows has the SIO_LOOPBACK_FAST_PATH
option since Windows 7. This looks like a viable alternative.
>>> ws.define('defun(foo (x) x + 1)')
>>> ws.user.foo(42)
AttributeError
cds ipc hdb pcdb tx ciw dds dmb dm de deo lbui env nr dl dag gdm nmp ccp lmgr ps tech tc cds dr ann he hsm opc lm cpf ci cci cpf cst imp vhdl conn pte tpa bnd lce ncl soi vfo abs icc cpfe rte rde adp adpnl vfp vpa ap gpe lob mg idf lo odc cph ct we drd mpt abe pc xpc vsa elec ead vdr asi nl ans hnl art apa drpl amse ann ahdl alm anc dr fam msp sev cdf aed relx axl verif awv arm cal adt rdb vv viva ael auLvs par ams ael fnl ocnxl sim ise hnl vos vhms po pi xst pipo xoasis xoas ldtr edi edifin edif edifout
Usecase is different people using the tool on the same machine.
pyStartServer with any logLevel even "WARNING" results in the server not responding
pyStartServer without the logLevel argument works.
The way jupyter notebook works multiple connections exist. Implement this as the default but add a parameter so disallow multiple connections
the tab completion here also yields all methods this does not seem right.
There are skill function alias which are not dumped at the moment:
Example:
getCurrentWindow <-> hiGetCurrentWindow
Allow overwrite of already existing definitions in skillbridge import
via a yes flag.
This would be useful in automated environments.
Example:
In Skill:
rodCreatePath(..., ?cvId cellViewId)
is currently in python:
ws.rod.create_path(..., cvId=cell_view_id)
but it should be
ws.rod.create_path(..., cv_id=cell_view_id)
Using an underscore in the name string handed to DummyWorkspace.prepare_remote results in a ValueError
: too many values to unpack (expected 2)
See: skillbridge/client/objects.py:39: ValueError
test_translator.py
must import call
from the translator.py
module.
It could be useful to run the skillbridge in a direct mode such that it does not use the TCP server, but communicates with Virtuoso, etc. directly.
The C Parser should compile on all normal Linux systems. It doesn't make sense to keep the Python implamentation any longer.
db.check() is missing dbCheck skill function is not extracted.
We should revert to the old dump method
skillbridge import FILE
and skillbridge export FILE
require absolute paths. Relative paths should also work.
I used pip install skillbirdge
. Then in Virtuoso CIW ran load("path\to\python_server.il")
and pyDumpFunctionDefinitions "<install>"
.
After that on the same CIW, when I run pyStartServer
I get
error "python: can't open file '/path/to/lib/python3.6/site-packages/skillbridge/server/python_server.ipy': [Errno 2] No such file or directory\n" server was stopped with code 2
I thought I needed to close Virtuoso and run the two commands again. But when I did that I got this.
error " File \"/path/to/lib/python3.6/site-packages/skillbridge/server/python_server.py\", line 21\n def send_to_skill(data: str) -> None:\n ^\nSyntaxError: invalid syntax\n" server was stopped with code 1
Am I missing anything? Isn't "Open the Skill console in Virtuoso and type" the same thing as "typing in Virtuoso CIW" ?
python version 3.6
virtuoso 6.1.7
There is no static completion for skill functions in IDEs:
Typing ws.db.<TAB>
should print all db functions. That list is known, it is inside the definitions.txt
.
Some ROD functions return these IDs: rodObj:...
but the parser assumed, that IDs are lower case.
Maybe we need a CLI script as a replacement to the __main__.py
script for users that are not familiar with Python.
E.g.
skillbridge
# should print the path to the server
# should print if the functions have been dumped
# should print if the static completion stubs have been generated
skillbridge generate
# should generate the static completion stubs
Other commands could include
cellView->type
returns a Symbol.
This should be wrapped into a Python Symbol object:
Some skill functions are not valid python identifiers: PREFIXreturn
, PREFIXas
when you remove the prefix.
UserWarning: Function definitions are not generated Run 'dumpFunctionDefinitions "<install>"' first, before using this module.
but should be pyDumpFunctionDefinitions <install>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.