The next-generation object-oriented script-based PCell design environment.
Explore the docs »
SPiRA is the next-generation object-oriented script-based PCell design environment. The framework leverages the Python programming language to effectively generate circuit layouts, while simultaneously checking for design violations, through a novel methodology called validate-by-design. Creating PCells and extracting a model from a layout requires data from the fabrication process. A new PDK scheme is introduced, called the Rule Deck Database (RDD), that effectively connects process data to the SPiRA framework. The design of the RDD revolves around the principle that a PDK cannot be created, but rather that it evolves as our understanding of physical layout design evolves.
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
Clone or download the SPiRA source code into a directory of your choice.
This is an example of how to list things you need to use the software and how to install them in CentOS 7:
-
We need to install the latest C++ compiler and some libraries.
sudo yum install epel-release sudo yum update sudo yum install centos-release-scl sudo yum install devtoolset-9 sudo yum install \ libffi-devel \ openssl-devel \ readline-devel \ sqlite-devel \ libGL-devel \ libGLU-devel \ fltk-devel \ zlib-devel \ bzip2-devel \ ncurses-devel \ tk-devel \ gdbm-devel \ db4-devel \ libpcap-devel \ xz-devel \ sqlite -
We need at least Python 3.8 or above, but CentOS 7 repositories only provide 3.6:
curl https://pyenv.run | bashNow edit the
~/.bashrcfile and add the following lines at the bottom:export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init --path)" eval "$(pyenv virtualenv-init -)"
Now execute:
exec $SHELL -l pyenv install 3.8.7 pyenv global 3.8.7
-
We need a working copy of
gmshbut the one provided by Python Pip requires a newer C ABI (application binary interface) than the one provided by CentOS 7. So let's do some magic. First download thegmshsource code usinggit:mkdir Development cd Development git clone https://gitlab.onelab.info/gmsh/gmsh.git cd gmsh scl enable devtoolset-9 bash pip install cmake mkdir build cd build cmake -DENABLE_BUILD_DYNAMIC=1 .. make sudo make install sudo touch /etc/ld.so.conf.d/gmsh_x86_64.conf sudo bash -c 'echo "/usr/local/lib64">>/etc/ld.so.conf.d/gmsh_x86_64.conf' sudo ldconfig
This will enable the
gmshcommand to open up GMSH.
To install SPiRA, please follow these steps:
-
In the directory where this
README.mdfile is found execute the following:pip install -r requirements.txt
This will install the Python Pip version of
gmshneeded for theimport gmshcommand, but will not work because of of the wrongCXX_ABI. -
To fix this run
pythonand type in the following:import gmsh
This will give the warning about the wrong ABI and give the location of the
libgmsh.sofile that does not comply. -
Simply replace the infringing file with the one built earlier from source:
cp ~/Development/gmsh/build/libgmsh.so ~/.loacl/lib/libgmsh.so
Replacing the second path the real path to the
libgmsh.socomplained about before. -
Now carry on with the install of SPiRA
pip install .This will install the necessary remaining requirements and SPiRA itself.
-
Now execute
pythonand type the following:import spira import gmsh
If all went well you should be greeted with the SPiRA welcoming banner and no issues.
For examples, please refer to the Documentation
All examples can be ran from the environment directory, which is the home directory of your spira folder.
For the basic tutorial samples:
python tutorials/basic/_9_stretch_1.pyFor the more advanced example with their own defined Rule Deck Database, as explained here.
python spira/technologies/default/circuits/ytron_circuit.pyDistributed under the MIT License. See LICENSE for more information.
- Johannes Delport - jdelport@sun.ac.za
- Kyle Jackman - kjackman@sun.ac.za
- Coenrad Fourie - coenrad@sun.ac.za
- Implementation of the RoutePath function to route inductors between two ports along a specified path
- Code cleanup
- Added layout netlist extraction and viewing.
- Added electrical rule checking (ERC).
- Added filters for advanced layout manipulation.
- Updated ports for more information descriptions. Terminals can now be separated from port definitions.
- A new concept, called virtual modeling (VModel) is introduced. This allows you to create multiple, virtual versions of a single layout for either debugging or fabrication purposes.
- Routing algorithms have been updated to leverage speed improvements made in the Gdspy library.
- The GDSII parser has been updated for better code structure and faster read/write operations.
- Updated the advanced tutorial documentation.
- Added developers documentations.
- Updated the expand transform algorithms, which fixes a lot of known issues.
- Updated the GDSII input parser to use new transformation parameters.
- Changed the
refparameter toreferenceinSRef.
- Added first version of documentation.
- Renamed
FieldstoParametersto overcome confusion. - Renamed
elementaltoelements, sincespira.Celldoes not inherit fromgdspy.Cellanymore. - Added parameter restrictions and preprocessing capabilities.
- Updated parameters to accept an extra restriction argument.
- Introduces
Vector,Line, andCoordclasses. - Depricated locked ports. Instead different port purposes can now be defined.
- Introduces process and purpose parameters to layer elements.
- Introduces derived layers to allow for layer boolean operations. This makes the RDD more flexible for future technology changes.
- Updated the edge generation algorithms to include both an outside and inside edge.
- Updated the routing algorithms to use new
gdspyfeatures. - Added stretching operations.
- Extended the RDD to include display resources.
- Fix issues with writing to a GDSII file.
- Added snap to grid functionality.
- Implemented parameters caching.
- Added port alignment operations.
- Added
PortListclass for special port filtering functionality. - Created layer mappers.
- Changed the default coordinate system to improve port transformations.
- Updates shapes and polygons to only include single polygons. Multiple polygons are now moved to the
PolygonGroupclass. - Updated ports to extend from the
Vector. - Added a custom
LayerListclass that compares already added layers. - Updated mixins to a single
MixinBowlmeta-configuration. - Updated the datatype parameter of ports that represents primitive connects.
- Added
NumberParameterwhich supports 'int' and 'float' parameters. - Added
ComplexParameterwhich supports 'int', 'float' and 'complex' parameters. - Added automatic docstring generation.
- Added Dummy ports for crossing nodes in netlist.
- Automatically generate terminal edges for metal polygons.
- Added shape for yTron.
- Added path routing between two terminals.
- Define a route using a list of terminals.
- Device cell detection (Junction, Via, etc).
- Basic LVS implementation.
- Implemented Manhattan routing between terminals.
- Integrated circleci.
- Started adding unit tests using pytest.
- Updated auto doc generation for classes.
- Added MidPointField for port and terminal midpoints.
- Introduces the Shape class that allows for complex point manipulations.
- Introduces
termwhich is a vertical connection port. - Routes are defined as a Shape with two connected terminal ports.
- Initial release.
