├── .gitignore ├── HelloCadence.py ├── HelloPython.il ├── README.md └── gitSKILLpy.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | 48 | # Translations 49 | *.mo 50 | *.pot 51 | 52 | # Django stuff: 53 | *.log 54 | local_settings.py 55 | 56 | # Flask stuff: 57 | instance/ 58 | .webassets-cache 59 | 60 | # Scrapy stuff: 61 | .scrapy 62 | 63 | # Sphinx documentation 64 | docs/_build/ 65 | 66 | # PyBuilder 67 | target/ 68 | 69 | # IPython Notebook 70 | .ipynb_checkpoints 71 | 72 | # pyenv 73 | .python-version 74 | 75 | # celery beat schedule file 76 | celerybeat-schedule 77 | 78 | # dotenv 79 | .env 80 | 81 | # virtualenv 82 | venv/ 83 | ENV/ 84 | 85 | # Spyder project settings 86 | .spyderproject 87 | 88 | # Rope project settings 89 | .ropeproject 90 | -------------------------------------------------------------------------------- /HelloCadence.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # shebang line 3 | import sys 4 | data = sys.stdin.readline() # read from SKILL 5 | data = data.replace('', '')[:-2] # remove the \n 6 | sys.stdout.write('hello Cadence %s' % data) # stdout for Cadence Virtuoso 7 | sys.stdout.flush() # flus 8 | sys.stdout.close() # not sure about this line 9 | -------------------------------------------------------------------------------- /HelloPython.il: -------------------------------------------------------------------------------- 1 | (defun HelloPython () 2 | (let ( childPID result) 3 | childPID = ipcBeginProcess( 4 | simplifyFilename( ;Returns the fully expanded name of the file 5 | "./IPC/CadenceSKILL-Python/HelloCadence.py");Path to the python file 6 | ) 7 | ipcWaitForProcess( childPID ) ; wait for a process 8 | 9 | ipcWriteProcess( childPID strcat("& hello Python " "\n") ) ; !important! add \n to the end of your string 10 | 11 | result = ipcReadProcess( childPID 1) ; read 12 | 13 | ipcKillProcess( childPID ) ;kill 14 | 15 | result 16 | ) ; let 17 | ) ; procedure 18 | 19 | ;to use run (HelloPython ) in the CIW 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CadenceSKILL-Python 2 | Inter Process Communication (IPC) between Cadence Virtuoso (SKILL) and Python script. 3 | 4 | 5 | In order to start the IPC script, add scripts to your cadence folder and run **(HelloPython )** in **CIW** 6 | 7 | ![test](https://github.com/unnir/CadenceSKILL-Python/blob/master/gitSKILLpy.png?raw=true) 8 | -------------------------------------------------------------------------------- /gitSKILLpy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unnir/CadenceSKILL-Python/b665258113def9659d8d2b62b1c9a9c9017127a1/gitSKILLpy.png --------------------------------------------------------------------------------