├── .github
└── workflows
│ ├── docker-image.yml
│ └── documentation.yaml
├── .gitignore
├── .gitmodules
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Dockerfile
├── Doxyfile
├── LICENSE
├── Makefile
├── README.md
├── bashrc.config
├── bin
├── cic
├── cic-gui
├── json2lyp
└── start_script.sh
├── cic-core
├── cic-core.pro
├── external
│ └── libgds_dist
│ │ ├── INSTALL
│ │ ├── libgds.c
│ │ ├── libgds.h
│ │ └── write_gds_examples.c
└── src
│ ├── cells
│ ├── capcell.cpp
│ ├── capcell.h
│ ├── capcellv2.cpp
│ ├── capcellv2.h
│ ├── cdac.cpp
│ ├── cdac.h
│ ├── cells.h
│ ├── phcapcell.cpp
│ ├── phcapcell.h
│ ├── resistorcell.cpp
│ ├── resistorcell.h
│ ├── sar.cpp
│ └── sar.h
│ ├── cic-core.h
│ ├── core
│ ├── cell.cpp
│ ├── cell.h
│ ├── console.cpp
│ ├── console.h
│ ├── consoleoutput.cpp
│ ├── consoleoutput.h
│ ├── cut.cpp
│ ├── cut.h
│ ├── design.cpp
│ ├── design.h
│ ├── graph.cpp
│ ├── graph.h
│ ├── guard.cpp
│ ├── guard.h
│ ├── instance.cpp
│ ├── instance.h
│ ├── instancecut.h
│ ├── instanceport.cpp
│ ├── instanceport.h
│ ├── layer.cpp
│ ├── layer.h
│ ├── layoutcell.cpp
│ ├── layoutcell.h
│ ├── layoutrotatecell.cpp
│ ├── layoutrotatecell.h
│ ├── patterncapacitor.cpp
│ ├── patterncapacitor.h
│ ├── patternhighresistor.cpp
│ ├── patternhighresistor.h
│ ├── patternhighresistornobulk.cpp
│ ├── patternhighresistornobulk.h
│ ├── patternresistor.cpp
│ ├── patternresistor.h
│ ├── patterntile.cpp
│ ├── patterntile.h
│ ├── patterntransistor.cpp
│ ├── patterntransistor.h
│ ├── point.h
│ ├── port.cpp
│ ├── port.h
│ ├── rect.cpp
│ ├── rect.h
│ ├── route.cpp
│ ├── route.h
│ ├── routering.cpp
│ ├── routering.h
│ ├── rules.cpp
│ ├── rules.h
│ ├── text.cpp
│ └── text.h
│ ├── decorator
│ ├── connectsourcedrain.cpp
│ ├── connectsourcedrain.h
│ ├── layoutcelldecorator.cpp
│ └── layoutcelldecorator.h
│ ├── printer
│ ├── cics.cpp
│ ├── cics.h
│ ├── designprinter.cpp
│ └── designprinter.h
│ └── spice
│ ├── capacitor.cpp
│ ├── capacitor.h
│ ├── mosfet.cpp
│ ├── mosfet.h
│ ├── resistor.cpp
│ ├── resistor.h
│ ├── spicedevice.cpp
│ ├── spicedevice.h
│ ├── spiceobject.cpp
│ ├── spiceobject.h
│ ├── spiceparser.cpp
│ ├── spiceparser.h
│ ├── subckt.cpp
│ ├── subckt.h
│ ├── subcktinstance.cpp
│ └── subcktinstance.h
├── cic-gui
├── ALGIC003_STDLIB.icns
├── cic-gui.pro
└── src
│ ├── cellpainter.cpp
│ ├── cellpainter.h
│ ├── glwidget.cpp
│ ├── glwidget.h
│ ├── main.cpp
│ ├── widget.cpp
│ ├── widget.h
│ ├── window.cpp
│ └── window.h
├── cic
├── cic.pro
└── src
│ └── main.cpp
├── ciccreator.code-workspace
├── ciccreator.pro
├── config.yaml
├── docs
├── Makefile
├── make.bat
└── source
│ ├── api.rst
│ ├── basics
│ ├── basics.rst
│ ├── netlist.rst
│ ├── object.rst
│ └── technology.rst
│ ├── cells
│ ├── cell.rst
│ ├── cells.rst
│ ├── layoutcell.rst
│ ├── patterncapacitor.rst
│ ├── patternresistor.rst
│ ├── patterntile.rst
│ └── patterntransistor.rst
│ ├── conf.py
│ ├── graphics
│ ├── Connectivity_AB.png
│ ├── Connectivity_B.png
│ ├── DirectedRoute.png
│ ├── Options_3cuts.png
│ ├── Options_5cuts.png
│ ├── Options_offsethigh.png
│ ├── Options_offsethighend.png
│ ├── Options_offsetlow.png
│ ├── Options_offsetlowend.png
│ ├── Options_onTopB.png
│ ├── Options_onTopL.png
│ ├── Options_onTopR.png
│ ├── Options_onTopT.png
│ ├── Options_track4.png
│ ├── Options_track8.png
│ ├── StartLeft_Left.png
│ ├── StartLeft_Right.png
│ ├── StartRight_Left.png
│ ├── StartRight_Right.png
│ ├── TEST.png
│ ├── TESTVIA.png
│ ├── U_Left.png
│ ├── U_Right.png
│ └── Vertical.png
│ ├── index.rst
│ ├── routing
│ ├── con_route.rst
│ ├── dir_route.rst
│ ├── options.rst
│ ├── route.rst
│ ├── type.rst
│ └── via.rst
│ └── svg
│ ├── Connectivity_A_-|--.svg
│ ├── Connectivity_A|B_-.svg
│ ├── Connectivity_B_-|--.svg
│ ├── DDD.svg
│ ├── Directed_StartLeft_Left(-|--).svg
│ ├── Directed_StartLeft_Right(--|-).svg
│ ├── Directed_StartRight_Left(-|--).svg
│ ├── Directed_StartRight_Right(--|-).svg
│ ├── Directed_U_Left(|-).svg
│ ├── Directed_U_Right(-|).svg
│ ├── Directed_Vertical(||).svg
│ └── TEST.svg
├── etc
├── console_config.pro
└── mac_sdk.pro
├── examples
├── LICENSE
├── SAR_ESSCIRC16_28N.json
├── SAR_ESSCIRC16_28N.spi
├── SAR_ESSCIRC16_28NBULK.spi
├── legend.json
├── routes.json
├── routes.spi
├── tech.json
├── tech.json.lyp
├── tech.json.lyt
├── tech_gds3d.txt
├── tech_gds3d_light.txt
└── tech_svg.json
├── lay
└── Makefile
├── schema.json
└── tests
├── routes
└── Makefile
├── sar
└── Makefile
└── sun_sar9b
├── Makefile
├── capacitor.json
├── dmos_sky130nm_core.json
├── ip.json
├── ip.spi
├── ref.cic
└── sky130.tech
/.github/workflows/docker-image.yml:
--------------------------------------------------------------------------------
1 | name: Docker Image CI
2 |
3 | on:
4 | push:
5 | branches: [ master ]
6 | pull_request:
7 | branches: [ master ]
8 |
9 | jobs:
10 |
11 | build:
12 |
13 | runs-on: ubuntu-latest
14 | container:
15 | image: wulffern/cic_qt:latest
16 | options: --user root
17 | steps:
18 | - name: ciccreator
19 | uses: actions/checkout@v2
20 | - name: Compile
21 | run: |
22 | pip install cicpy
23 | make compile
24 | make test
25 |
--------------------------------------------------------------------------------
/.github/workflows/documentation.yaml:
--------------------------------------------------------------------------------
1 | name: Docs
2 | on: [push, pull_request, workflow_dispatch]
3 | jobs:
4 | docs:
5 | runs-on: ubuntu-latest
6 | steps:
7 | - uses: actions/checkout@v2
8 | - uses: actions/setup-python@v2
9 | - name: Install dependencies
10 | run: |
11 | pip install sphinx sphinx_rtd_theme
12 |
13 | - name: Install doxygen
14 | run: |
15 | sudo apt-get update
16 | sudo apt-get install -y doxygen
17 | - name: Install breathe and run doxygen
18 | run: |
19 | git clone https://github.com/wulffern/breathe.git
20 | cd breathe
21 | python3 -m pip install .
22 | cd ..
23 | doxygen
24 | - name: Sphinx build
25 | run: |
26 | sphinx-build docs/source _build
27 | - name: Deploy
28 | uses: peaceiris/actions-gh-pages@v3
29 | if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
30 | with:
31 | publish_branch: gh-pages
32 | github_token: ${{ secrets.GITHUB_TOKEN }}
33 | publish_dir: _build/
34 | force_orphan: true
35 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *#
2 | *~
3 | .#*
4 | .vscode
5 | bin
6 | version.h
7 | *.autosave
8 | lay
9 | build
10 | moc_*
11 | qmake.make
12 | *.o
13 | .DS_Store
14 | .qmake.*
15 | *.svg
16 | *.pro.user.*
17 | *.pro.user
18 | Makefile
19 |
20 | # Compiled Object files
21 | *.slo
22 | *.lo
23 | *.o
24 | *.obj
25 |
26 | # Precompiled Headers
27 | *.gch
28 | *.pch
29 |
30 | # Compiled Dynamic libraries
31 | *.so
32 | *.dylib
33 | *.dll
34 |
35 | # Fortran module files
36 | *.mod
37 |
38 | # Compiled Static libraries
39 | *.lai
40 | *.la
41 | *.a
42 | *.lib
43 |
44 | # Executables
45 | *.exe
46 | *.out
47 | *.app
48 | doxygen
49 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "release"]
2 | path = release
3 | url = https://github.com/wulffern/ciccreator-bin
4 | branch = main
5 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at carsten@wulff.no. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Ask for access, I'd be happy to give you access to a branch. Contact me at carsten@ciccreator.com
2 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:22.04
2 |
3 | ENV DEBIAN_FRONTEND noninteractive
4 |
5 | RUN apt-get -qq update && apt-get install -qq -y --no-install-recommends \
6 | git \
7 | make \
8 | openssh-client \
9 | ca-certificates \
10 |
11 | build-essential \
12 | pkg-config \
13 | libgl1-mesa-dev \
14 | libsm6 \
15 | libice6 \
16 | libxext6 \
17 | libxrender1 \
18 | libfontconfig1 \
19 | qt6-base-dev \
20 | python3 python3-pip jq\
21 | && apt-get -qq clean
22 |
23 | RUN python3 -m pip install matplotlib numpy click svgwrite pyyaml pandas tabulate wheel setuptools tikzplotlib
24 |
25 | ENTRYPOINT /bin/bash
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [](https://github.com/wulffern/ciccreator/actions/workflows/docker-image.yml)
4 | [](https://github.com/wulffern/ciccreator/actions/workflows/documentation.yaml)
5 |
6 | # ciccreator
7 | Back in 2013 I started playing with the thought of generating a SAR ADC with a
8 | script, such that it would be easy to port between technologies. The prototype
9 | was written in Perl, and contained 16k lines of code. The Perl compiler is
10 | closed source, and not available outside NTNU. cIcCreator is the C++ version,
11 | it's been written from scratch to support the same input files as the Perl
12 | compiler, but with a vastly improved performance.
13 |
14 | # Documentation
15 |
16 | Head over to
17 | [wulffern.github.io/ciccreator](http://wulffern.github.io/ciccreator/index.html)
18 | or [ciccreator.readthedocs.io](https://ciccreator.readthedocs.io/en/latest/index.html)
19 |
20 | # Master plan
21 | :white_check_mark: Create prototype of compiler in Perl that can compile SAR ADCs (Aug 2014)
22 |
23 | :white_check_mark: Tapeout SAR ADC in 28nm FDSOI (Jan 2015)
24 |
25 | :white_check_mark: Demonstrate effectiveness of compiled approach ([ESSCIRC 2016](http://ieeexplore.ieee.org/document/7598271/),[JSSC 2017](http://ieeexplore.ieee.org/document/7906479/)) (Sept 2016, April 2017)
26 |
27 | :white_check_mark: Rewrite the compiler in C++ under a GPL license and compile equivalent GDS with Perl compiler (Nov 2016)
28 |
29 | # Compile and run, the easy version
30 |
31 | Although it's possible to run "make" to compile ciccreator on most platforms,
32 | the compile does require QT. Head over to ciccreator-bin repository for latest binaries.
33 |
34 | For simulation in Skywater 130 nm PDK, head over to [aicex](https://github.com/wulffern/aicex)
35 |
36 | # Test
37 | Have a look at the SAR
38 |
39 | ``` bash
40 | make esscirc
41 | make view
42 | ```
43 |
44 | Or the route tests
45 |
46 | ``` bash
47 | make routes
48 | make viewroutes
49 | ```
50 |
51 |
52 | # Videos
53 |
54 | Minecraft video - https://youtu.be/J9lhEt0f3Wk
55 | cIcCreator in action - https://youtu.be/hv9u9aQGHQc
56 |
57 |
58 | # Comments/Questions
59 | Should you find issues, don't hesitate to add an issue on gitub.
60 |
61 |
62 |
63 |
64 |
65 | # Changelog
66 |
67 | ## v0.1.5
68 | * Added verticalMultiplyVector to patterntile to simplify analog transistor generation
69 | * Route, RouteRing, Guard will be loaded as LayoutCell to fix view problem of cuts.
70 | * Fixed issue rotateAngle in LayoutRotateCell. Seems like QJsonValue is no
71 | longer automatically casted to QString.
72 | * removed GDS and SPICE output. Only *.cic will be supported from now on. Use
73 | cicpy to convert to other formats
74 |
75 | ## v0.1.4
76 | * layoutcell: Added ability to route to rails.
77 | With addDirectedRoute one can do ["M1","AVSS","xa:S-|--rail_r_AVSS","strap"], which will strap all mosfet sources to right route rail.
78 | The rails are named rail_(t|b|r|l)_(NAME)
79 | * cic-gui: Increased step size for arrow keys
80 | * cic-gui: Added rubber band zoom.
81 |
--------------------------------------------------------------------------------
/bashrc.config:
--------------------------------------------------------------------------------
1 |
2 | #- Change to your installation of Qt5.4
3 | export QTDIR=~/Qt5.4.2/5.4/gcc_64
4 |
5 | #- No need to change these
6 | export QTVER=qt5
7 | export PATH=$QTDIR/bin/:$PATH
8 | export LD_LIBRARY_PATH=$QTDIR/lib/:$LD_LIBRARY_PATH
9 | export PKG_CONFIG_PATH=$QTDIR/lib/pkgconfig/:$PKG_CONFIG_PATH
10 | export QT_PLUGIN_PATH=$QTDIR/lib/plugins/
11 |
--------------------------------------------------------------------------------
/bin/cic:
--------------------------------------------------------------------------------
1 | start_script.sh
--------------------------------------------------------------------------------
/bin/cic-gui:
--------------------------------------------------------------------------------
1 | start_script.sh
--------------------------------------------------------------------------------
/bin/start_script.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | ######################################################################
3 | ## Copyright (c) 2015 Carsten Wulff Software, Norway
4 | ## ###################################################################
5 | ## Created : wulff at 2015-7-23
6 | ## ###################################################################
7 | ## This program is free software: you can redistribute it and/or modify
8 | ## it under the terms of the GNU General Public License as published by
9 | ## the Free Software Foundation, either version 3 of the License, or
10 | ## (at your option) any later version.
11 | ##
12 | ## This program is distributed in the hope that it will be useful,
13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | ## GNU General Public License for more details.
16 | ##
17 | ## You should have received a copy of the GNU General Public License
18 | ## along with this program. If not, see .
19 | ######################################################################
20 | platform=`uname -a | awk '{ print tolower($1)}'`
21 |
22 | appname=`basename $0 | sed s,\.sh$,,`
23 |
24 | dirname=`dirname $0`
25 | tmp="${dirname#?}"
26 |
27 | if [ "${dirname%$tmp}" != "/" ]; then
28 | dirname=$PWD/$dirname
29 | fi
30 |
31 | #- Setup LD library path on linux
32 | if [ $platform == "linux" ] ; then
33 |
34 | LD_LIBRARY_PATH=$dirname
35 | export LD_LIBRARY_PATH
36 |
37 | execfile=$dirname/${platform}/${appname}
38 |
39 | if [ ! -f "$execfile" ]; then
40 | echo "INFO: Trying pre-compiled "
41 | execfile=${dirname}/../release/${appname}.${platform}-latest
42 | fi
43 |
44 | echo $execfile "$@"
45 |
46 | $execfile "$@"
47 |
48 | else
49 |
50 | if [ $platform == "darwin" ]; then
51 |
52 |
53 | execfile=$dirname/${platform}/${appname}.app/Contents/MacOS/${appname}
54 | if [ ! -f "$execfile" ]; then
55 | execfile=$dirname/${platform}/${appname}
56 | fi
57 |
58 | if [ ! -f "$execfile" ]; then
59 | echo "INFO: Trying pre-compiled "
60 | execfile=${dirname}/../release/${appname}.${platform}-latest
61 | fi
62 |
63 | echo $execfile "$@"
64 | $execfile "$@"
65 |
66 |
67 |
68 | else
69 | echo "Looks like your on windows. Windows no longer supported, use linux in WSL"
70 | fi
71 | fi
72 |
--------------------------------------------------------------------------------
/cic-core/external/libgds_dist/INSTALL:
--------------------------------------------------------------------------------
1 |
2 | libgds A library of C functions which read and write GDSII pattern format.
3 | M. Rooks, Yale University
4 | Look at libgds.c for more details on GDS format.
5 | Look at write_gds_examples.c obviously.
6 |
7 | Simply type "make" to compile the library and the example program.
8 | Run the example program to create the file stuff.gds
9 | then use your favorite CAD program to display the GDS file.
10 |
11 | To install the library for general use, copy libgds.a to
12 | somewhere in LD_LIBRARY_PATH, such as /usr/local/lib
13 | and copy libgds.h to somewhere like /usr/local/include
14 |
15 |
16 |
--------------------------------------------------------------------------------
/cic-core/src/cells/capcell.h:
--------------------------------------------------------------------------------
1 | //====================================================================
2 | // Copyright (c) 2016 Carsten Wulff Software, Norway
3 | // ===================================================================
4 | // Created : wulff at 2016-9-3
5 | // ===================================================================
6 | // This program is free software: you can redistribute it and/or modify
7 | // it under the terms of the GNU General Public License as published by
8 | // the Free Software Foundation, either version 3 of the License, or
9 | // (at your option) any later version.
10 | //
11 | // This program is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License
17 | // along with this program. If not, see .
18 | //====================================================================
19 |
20 |
21 |
22 |
23 | #ifndef CIC_CELLS_CAPCELL_H
24 | #define CIC_CELLS_CAPCELL_H
25 |
26 | #include "core/layoutcell.h"
27 |
28 | namespace cIcCells{
29 |
30 | class CapCell: public cIcCore::LayoutCell
31 | {
32 | Q_OBJECT
33 |
34 | public:
35 | virtual void place();
36 | virtual Rect calcBoundingRect();
37 | void addContacts(QString name, QString node,int y,QList array, Rect* r);
38 | Rect* getAvssConnectRect(Rect* rect);
39 |
40 | Q_INVOKABLE
41 | /**
42 | * @brief Use Metal 3
43 | */
44 | void usem3(QJsonValue obj);
45 |
46 | Q_INVOKABLE
47 | /**
48 | * @brief Use Metal 5 shield
49 | */
50 | void usem5(QJsonValue obj);
51 |
52 | Q_INVOKABLE
53 | /**
54 | * @brief Increase multiplier height
55 | */
56 | void heightIncreaseMult(QJsonValue obj);
57 |
58 | private:
59 | int msw = 0;
60 | int xorg = 0;
61 | int yMax = 0;
62 | bool usem3_ = true;
63 | bool usem5_ = false;
64 | int heightIncreaseMult_ = 1;
65 |
66 |
67 | };
68 |
69 |
70 | };
71 | Q_DECLARE_METATYPE(cIcCells::CapCell)
72 |
73 | #endif
74 |
--------------------------------------------------------------------------------
/cic-core/src/cells/capcellv2.h:
--------------------------------------------------------------------------------
1 | //====================================================================
2 | // Copyright (c) 2016 Carsten Wulff Software, Norway
3 | // ===================================================================
4 | // Created : wulff at 2016-9-3
5 | // ===================================================================
6 | // This program is free software: you can redistribute it and/or modify
7 | // it under the terms of the GNU General Public License as published by
8 | // the Free Software Foundation, either version 3 of the License, or
9 | // (at your option) any later version.
10 | //
11 | // This program is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License
17 | // along with this program. If not, see .
18 | //====================================================================
19 |
20 |
21 |
22 |
23 | #ifndef CIC_CELLS_CAPCELLV2_H
24 | #define CIC_CELLS_CAPCELLV2_H
25 |
26 | #include "core/layoutcell.h"
27 |
28 | namespace cIcCells{
29 |
30 | class CapCellV2: public cIcCore::LayoutCell
31 | {
32 | Q_OBJECT
33 |
34 | public:
35 | virtual void place();
36 | virtual Rect calcBoundingRect();
37 | void addContacts(QString name, QString node,int y,QList array);
38 | Rect* getAvssConnectRect(Rect* rect);
39 |
40 |
41 | private:
42 | int msw = 0;
43 | int xorg = 0;
44 | int yMax = 0;
45 |
46 |
47 | };
48 |
49 |
50 | };
51 | Q_DECLARE_METATYPE(cIcCells::CapCellV2)
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/cic-core/src/cells/cdac.h:
--------------------------------------------------------------------------------
1 | //====================================================================
2 | // Copyright (c) 2016 Carsten Wulff Software, Norway
3 | // ===================================================================
4 | // Created : wulff at 2016-9-4
5 | // ===================================================================
6 | // This program is free software: you can redistribute it and/or modify
7 | // it under the terms of the GNU General Public License as published by
8 | // the Free Software Foundation, either version 3 of the License, or
9 | // (at your option) any later version.
10 | //
11 | // This program is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License
17 | // along with this program. If not, see .
18 | //====================================================================
19 |
20 |
21 | #ifndef CIC_CELLS_CDAC_H
22 | #define CIC_CELLS_CDAC_H
23 |
24 | #include "core/layoutcell.h"
25 | #include "cells/capcell.h"
26 |
27 | namespace cIcCells{
28 |
29 | class CDAC: public cIcCore::LayoutCell
30 | {
31 | Q_OBJECT
32 |
33 | public:
34 | virtual void place();
35 | virtual void route();
36 | virtual void paint();
37 |
38 |
39 | private:
40 | cIcCore::Instance* firstinst;
41 | cIcCore::Instance* inst;
42 |
43 |
44 |
45 | };
46 |
47 |
48 | };
49 | Q_DECLARE_METATYPE(cIcCells::CDAC)
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/cic-core/src/cells/cells.h:
--------------------------------------------------------------------------------
1 | //====================================================================
2 | // Copyright (c) 2016 Carsten Wulff Software, Norway
3 | // ===================================================================
4 | // Created : wulff at 2016-9-4
5 | // ===================================================================
6 | // This program is free software: you can redistribute it and/or modify
7 | // it under the terms of the GNU General Public License as published by
8 | // the Free Software Foundation, either version 3 of the License, or
9 | // (at your option) any later version.
10 | //
11 | // This program is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License
17 | // along with this program. If not, see .
18 | //====================================================================
19 |
20 | #ifndef CIC_CELLS_CELLS_H
21 | #define CIC_CELLS_CELLS_H
22 |
23 | #include "cells/sar.h"
24 | #include "cells/cdac.h"
25 | #include "cells/capcell.h"
26 |
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/cic-core/src/cells/phcapcell.h:
--------------------------------------------------------------------------------
1 | //====================================================================
2 | // Copyright (c) 2016 Carsten Wulff Software, Norway
3 | // ===================================================================
4 | // Created : wulff at 2019-06-02
5 | // ===================================================================
6 | // This program is free software: you can redistribute it and/or modify
7 | // it under the terms of the GNU General Public License as published by
8 | // the Free Software Foundation, either version 3 of the License, or
9 | // (at your option) any later version.
10 | //
11 | // This program is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License
17 | // along with this program. If not, see .
18 | //====================================================================
19 |
20 | #ifndef CIC_CELLS_PHCAPCELL_H
21 | #define CIC_CELLS_PHCAPCELL_H
22 |
23 | #include "core/layoutcell.h"
24 |
25 | namespace cIcCells{
26 |
27 | class PhCapCell: public cIcCore::LayoutCell
28 | {
29 | Q_OBJECT
30 |
31 | public:
32 |
33 | Q_INVOKABLE void binaryBits(QJsonValue obj);
34 | Q_INVOKABLE void unaryBits(QJsonValue obj);
35 |
36 | virtual void place();
37 | virtual Rect calcBoundingRect();
38 | int addFinger(int x, int y, int msw, int mw, int mh,int i,string name);
39 |
40 |
41 | private:
42 | int _binaryBits = 1;
43 | int _unaryBits = 1;
44 | int _top_length = 1;
45 | int _finger_length = 1;
46 | };
47 |
48 |
49 | };
50 | Q_DECLARE_METATYPE(cIcCells::PhCapCell)
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/cic-core/src/cells/resistorcell.cpp:
--------------------------------------------------------------------------------
1 | //====================================================================
2 | // Copyright (c) 2016 Carsten Wulff Software, Norway
3 | // ===================================================================
4 | // Created : wulff at 2016-9-4
5 | // ===================================================================
6 | // This program is free software: you can redistribute it and/or modify
7 | // it under the terms of the GNU General Public License as published by
8 | // the Free Software Foundation, either version 3 of the License, or
9 | // (at your option) any later version.
10 | //
11 | // This program is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License
17 | // along with this program. If not, see .
18 | //====================================================================
19 |
20 |
21 | #include "cells/resistorcell.h"
22 |
--------------------------------------------------------------------------------
/cic-core/src/cells/resistorcell.h:
--------------------------------------------------------------------------------
1 | //====================================================================
2 | // Copyright (c) 2016 Carsten Wulff Software, Norway
3 | // ===================================================================
4 | // Created : wulff at 2016-9-4
5 | // ===================================================================
6 | // This program is free software: you can redistribute it and/or modify
7 | // it under the terms of the GNU General Public License as published by
8 | // the Free Software Foundation, either version 3 of the License, or
9 | // (at your option) any later version.
10 | //
11 | // This program is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License
17 | // along with this program. If not, see .
18 | //====================================================================
19 |
20 |
21 |
22 | #ifndef CIC_CELLS_RESISTORCELL_H
23 | #define CIC_CELLS_RESISTORCELL_H
24 |
25 | #include
26 | #include "cell.h"
27 | #include "patterntile.h"
28 | #include "spice/resistor.h"
29 |
30 |
31 |
32 | namespace cIcCore{
33 |
34 | using namespace cIcSpice;
35 |
36 | class ResistorCell : public PatternTile
37 | {
38 | Q_OBJECT
39 |
40 | public:
41 | virtual void paintRect(Rect*, QChar ,int , int );
42 | ResistorCell();
43 | ResistorCell(const ResistorCell& mos);
44 | ~ResistorCell();
45 |
46 | protected:
47 | Resistor * res_;
48 | };
49 |
50 | }
51 |
52 | Q_DECLARE_METATYPE(cIcCore::ResistorCell)
53 |
54 | #endif
55 |
--------------------------------------------------------------------------------
/cic-core/src/cells/sar.h:
--------------------------------------------------------------------------------
1 | //====================================================================
2 | // Copyright (c) 2016 Carsten Wulff Software, Norway
3 | // ===================================================================
4 | // Created : wulff at 2016-8-2
5 | // ===================================================================
6 | // This program is free software: you can redistribute it and/or modify
7 | // it under the terms of the GNU General Public License as published by
8 | // the Free Software Foundation, either version 3 of the License, or
9 | // (at your option) any later version.
10 | //
11 | // This program is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License
17 | // along with this program. If not, see .
18 | //====================================================================
19 |
20 |
21 |
22 |
23 |
24 | #ifndef CIC_CELLS_SAR_H
25 | #define CIC_CELLS_SAR_H
26 |
27 | #include "core/layoutcell.h"
28 |
29 |
30 | typedef QMap> SARgroup;
31 |
32 |
33 |
34 | namespace cIcCells{
35 |
36 | class SAR : public cIcCore::LayoutCell
37 | {
38 | Q_OBJECT
39 |
40 | public:
41 |
42 | virtual void place();
43 | virtual void route();
44 |
45 | Q_INVOKABLE
46 | /**
47 | * @brief Use Metal 5 shield
48 | */
49 | void usem5(QJsonValue obj);
50 |
51 | int getCellWidth(SARgroup groups,QString group);
52 | cIcCore::Instance* placeAlternateMirror(SARgroup groups,QString group, int i, int x ,int y, int xoffset);
53 | int addSarRouting(int y,int msw,int mw);
54 |
55 | static bool sortGraph(cIcCore::Graph* a, cIcCore:: Graph *b);
56 |
57 |
58 | private:
59 |
60 | Rect* sarn = NULL;
61 | Rect* sarp = NULL;
62 | bool usem5_ = true;
63 |
64 | };
65 |
66 |
67 | }
68 |
69 | Q_DECLARE_METATYPE(cIcCells::SAR)
70 |
71 | #endif
72 |
73 |
--------------------------------------------------------------------------------
/cic-core/src/cic-core.h:
--------------------------------------------------------------------------------
1 | #include "core/design.h"
2 | #include "core/rules.h"
3 | #include "core/consoleoutput.h"
4 | #include "printer/cics.h"
5 | #include "core/consoleoutput.h"
6 | #include "decorator/layoutcelldecorator.h"
7 |
--------------------------------------------------------------------------------
/cic-core/src/core/console.cpp:
--------------------------------------------------------------------------------
1 | //====================================================================
2 | // Copyright (c) 2016 Carsten Wulff Software, Norway
3 | // ===================================================================
4 | // Created : wulff at 2016-12-26
5 | // ===================================================================
6 | // This program is free software: you can redistribute it and/or modify
7 | // it under the terms of the GNU General Public License as published by
8 | // the Free Software Foundation, either version 3 of the License, or
9 | // (at your option) any later version.
10 | //
11 | // This program is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License
17 | // along with this program. If not, see .
18 | //====================================================================
19 |
20 | #include "core/console.h"
21 |
22 |
23 | namespace cIcCore{
24 |
25 | Console::Console(int argc, char* argv[])
26 | {
27 |
28 | this->initialize(argc, argv);
29 | }
30 |
31 | void Console::initialize(int argc, char* argv[])
32 | {
33 | this->initialize();
34 | }
35 |
36 | void Console::initialize()
37 | {
38 | }
39 |
40 |
41 | void Console::addOption(Option* o)
42 | {
43 | options.insert(make_pair(o->name,o));
44 | }
45 |
46 | Option* Console::option(string name)
47 | {
48 | auto iter = options.find(name);
49 | if(iter != options.end()){
50 | return options[name];
51 | }else{
52 | Option* o = new Option();
53 | o->type = Option::valueType::EMPTY;
54 | return o;
55 | }
56 |
57 | }
58 |
59 | }
60 |
61 |
--------------------------------------------------------------------------------
/cic-core/src/core/console.h:
--------------------------------------------------------------------------------
1 | //====================================================================
2 | // Copyright (c) 2016 Carsten Wulff Software, Norway
3 | // ===================================================================
4 | // Created : wulff at 2016-12-26
5 | // ===================================================================
6 | // This program is free software: you can redistribute it and/or modify
7 | // it under the terms of the GNU General Public License as published by
8 | // the Free Software Foundation, either version 3 of the License, or
9 | // (at your option) any later version.
10 | //
11 | // This program is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License
17 | // along with this program. If not, see .
18 | //====================================================================
19 |
20 | #ifndef CONSOLE_H
21 | #define CONSOLE_H
22 |
23 | #include
24 | #include
25 | #include