https://github.com/mdmfernandes/socad
Connect Cadence Virtuoso to a Python client using sockets.
https://github.com/mdmfernandes/socad
cadence-client cadence-virtuoso python socket-communication
Last synced: 11 months ago
JSON representation
Connect Cadence Virtuoso to a Python client using sockets.
- Host: GitHub
- URL: https://github.com/mdmfernandes/socad
- Owner: mdmfernandes
- License: gpl-3.0
- Created: 2018-09-26T20:18:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-08-27T14:05:36.000Z (almost 6 years ago)
- Last Synced: 2023-10-15T15:51:08.162Z (over 2 years ago)
- Topics: cadence-client, cadence-virtuoso, python, socket-communication
- Language: Python
- Homepage: https://socad.readthedocs.io/
- Size: 123 KB
- Stars: 16
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.rst
- License: LICENSE
Awesome Lists containing this project
README
# SOCAD
Client: [](https://www.python.org/downloads/release/python-360/)
Server: [](https://www.python.org/downloads/release/python-260/) [](https://socad.readthedocs.io/en/latest/?badge=latest)
[](https://github.com/mdmfernandes/socad/blob/master/LICENSE)
## This project is no longer maintained, as I no longer have access to Cadence Virtuoso. If you are interested in contributing and have any questions, feel free to contact me.
**SOCAD** connects Cadence Virtuoso to a Python client. The communication between both processes is made through a server, using the following mechanisms:
* **Cadence<->Server**: Inter-process communication (IPC). The server is invoked by Cadence and waits for a client communication.
* **Client<->Server**: Sockets (more info [here](https://docs.python.org/3/library/socket.html)). Both processes can be run on the same machine or on different machines, according to the socket type chosen by the user. TCP sockets are used by default.
By using this library it is possible to control the Cadence environment from an external program.
## Installation
The installation needs to be performed both in the **client** and the **server**. We recommend you to use *pip* to install SOCAD in your system.
### Install with *pip*
Although the project is not in PyPI, you can install it using *pip*. Go to the project folder and run:
```shell
pip install .
```
**NOTE:** run `pip install socad` from the project directory doesn't work because pip will look for the package on PyPi.
### Build from source
Go to the project folder and run:
```shell
python setup.py install
```
### Use as local module
If the Cadence machine does not allow to install the **socad** package from the methods above, the module is loaded from `examples/socad_cadence/server.py`.
## Usage
Import the *Client* or the *Server* to your program using:
```python
from socad import Client
from socad import Server
```
The available functions of each class are available in the project [library reference](https://socad.readthedocs.io/en/latest/api/index.html).
A complete demonstration of the program usage can be found in the example below.
## Example
The provided example runs simulations in Cadence Virtuoso from a client in a different machine (connected through *ssh*), by executing OCEAN scripts provided by the user.
For more a step by step guide of the example, check [this tutorial](https://socad.readthedocs.io/en/latest/tutorials/common_source.html).
## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [releases on the project repository](https://github.com/mdmfernandes/socad/releases/).
## Main Contributors
* **Miguel Fernandes** - *Initial work* - [mdmfernandes](https://github.com/mdmfernandes)
## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
## License
This project is licensed under the GPLv3 License - see the project [LICENSE](https://github.com/mdmfernandes/socad/blob/master/LICENSE) file for details.