Skip to content

Commit

Permalink
status
Browse files Browse the repository at this point in the history
  • Loading branch information
daquintero committed Jul 1, 2024
1 parent e46abdc commit caac1cc
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 127 deletions.
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"nbsphinx", # Integrate Jupyter Notebooks and Sphinx
"myst_parser",
"sphinxcontrib.pdfembed",
"sphinxcontrib.tikz",
"sphinx.ext.autodoc", # Core Sphinx library for auto html doc generation from docstrings
"sphinx.ext.autosummary", # Create neat summary tables for modules/classes/methods etc
"sphinx.ext.coverage",
Expand Down Expand Up @@ -99,6 +100,13 @@
release = piel.__version__
set_type_checking_flag = True # Enable 'expensive' imports for sphinx_autodoc_typehints
source_suffix = [".rst", ".md"]
tikz_tikzlibraries = "circuits.ee.IEC"
tikz_proc_suite = "ImageMagick"
tikz_latex_preamble = r"""
\usepackage{tikz}
\usepackage{circuitikz}
\usetikzlibrary{circuits.ee.IEC}
"""
templates_path = ["_templates"]
texinfo_documents = [
(
Expand Down
110 changes: 56 additions & 54 deletions docs/sections/codesign/devices/comparators.rst
Original file line number Diff line number Diff line change
@@ -1,57 +1,59 @@
Comparators
============

.. raw:: latex

\begin{circuitikz}[american]
\draw (0,0) node[pfet](PMOS1){};
\draw (PMOS1.D) to[short, -*] ++(0,-0.25) \coord (PMOSJ1) to[short] ++(0,-0.25) node[pfet, anchor=source](PMOS2){};
\draw (PMOSJ1) to[short] ++(1,0) node[pfet, anchor=source, rotate=90](PMOS3){};
\draw (PMOS2.D) to[short, -*] ++(0,-0.5) \coord (OUT1) to[short] ++(0,-0.5) node[nfet, anchor=drain](NMOS1){};

\draw (OUT1) to[short] ++(3,0) node[ocirc](OUT2){};

\draw (NMOS1.S) to[short, -*] ++(0,-0.25) \coord (NMOSJ1) to[short] ++(0,-0.25) node[nfet, anchor=drain](NMOS2){};
\draw (NMOSJ1) to[short] ++(1,0) node[nfet, anchor=source, rotate=-90](NMOS3){};
\draw (NMOS2.G) to[short, -*] ++(-0.5,0) \coord(NMOS2GO);
\draw (NMOS1.G) to[short, -*] ++(-0.5,0) \coord(NMOS1GO);
\draw (PMOS1.G) to[short, -*] ++(-0.5,0) \coord(PMOS1GO);
\draw (PMOS2.G) to[short, -*] ++(-0.5,0) \coord(PMOS2GO);
\draw (NMOS1GO) -- (NMOS2GO) -- (PMOS1GO) -- (PMOS2GO);

\draw (NMOS3.G) to[short, -*] (NMOS3.G |- OUT1);
\draw (PMOS3.G) to[short, -*] (PMOS3.G |- OUT1);
\draw (NMOS2GO |- OUT1) node[circ](){} to[short] ++(-1, 0) node[ocirc](){};

\draw (NMOS2.S) to[short] ++(0, -0.25) \coord(NMOSGND) node[ground](GND1){};
\draw (PMOS1.S) to[short] ++(0, 0.25) \coord(PMOSGND) node[vcc](VCC){};
\draw (NMOS3.D) to[short] ++(0.25, 0) to[short] ++(0, 0.25) \coord(NMOSVCC) node[vcc](VCC1){};
\draw (PMOS3.D) to[short] ++(0.25, 0) to[short] ++(0, -0.25) \coord(NMOSVCC) node[ground](GND2){};

\draw (NMOS3.bulk) |- (GND1);
\draw (NMOS1.bulk) to[short] ++(0.5,0) \coord(NMOS1BO);
\draw (NMOS2.bulk) to[short, -*] ++(0.5,0) \coord(NMOS2BO);
\draw (NMOS1BO) to[short, -*] (NMOS2BO|- GND1);

\draw (PMOS3.bulk) |- (VCC);
\draw (PMOS1.bulk) to[short, -*] ++(0.5,0) \coord(PMOS1BO);
\draw (PMOS2.bulk) to[short] ++(0.5,0) \coord(PMOS2BO);
\draw (PMOS2BO) to[short, -*] (PMOS1BO |- VCC);
\end{circuitikz}


.. raw:: latex

\begin{circuitikz}[american]
\draw (0,0) node[npn](HBT1){};
\draw (HBT1.B) to[R] ++(-3,0) node[ocirc](IN){};
\draw (HBT1.C) to[short, -*] ++(0,0.5) \coord (HBTJ1) to[short] ++(0.5,0) node[npn, anchor=base](HBT2){};
\draw (HBT1.E) to[short, -*] (HBT1.E -| HBT2.E) \coord (HBTJ2) node [circ]{} -- (HBT2.E);
\draw (HBTJ2) to[R] ++ (0, -2) node[ground](GND){};
\draw (HBTJ2) to[R] ++ (0, -2) node[ground](GND){};
\draw (HBT2.C) to[short] ++ (1,0) node[ocirc](out){};
\draw (HBT2.C) to[R] ++ (0,2) node[vcc](vcc){$V_{CC}=\SI{1}{V}$};
\draw (vcc) to[short, *-] (vcc -| HBT1.C) to[R] ++ (0, -2) \coord (HBT1CR1);
\draw (HBT1CR1) -- (HBT1.C);
\end{circuitikz}
.. tikz::
:align: center

\begin{circuitikz}[american]
\draw (0,0) node[pfet](PMOS1){};
\draw (PMOS1.D) to[short, -*] ++(0,-0.25) \coord (PMOSJ1) to[short] ++(0,-0.25) node[pfet, anchor=source](PMOS2){};
\draw (PMOSJ1) to[short] ++(1,0) node[pfet, anchor=source, rotate=90](PMOS3){};
\draw (PMOS2.D) to[short, -*] ++(0,-0.5) \coord (OUT1) to[short] ++(0,-0.5) node[nfet, anchor=drain](NMOS1){};

\draw (OUT1) to[short] ++(3,0) node[ocirc](OUT2){};

\draw (NMOS1.S) to[short, -*] ++(0,-0.25) \coord (NMOSJ1) to[short] ++(0,-0.25) node[nfet, anchor=drain](NMOS2){};
\draw (NMOSJ1) to[short] ++(1,0) node[nfet, anchor=source, rotate=-90](NMOS3){};
\draw (NMOS2.G) to[short, -*] ++(-0.5,0) \coord(NMOS2GO);
\draw (NMOS1.G) to[short, -*] ++(-0.5,0) \coord(NMOS1GO);
\draw (PMOS1.G) to[short, -*] ++(-0.5,0) \coord(PMOS1GO);
\draw (PMOS2.G) to[short, -*] ++(-0.5,0) \coord(PMOS2GO);
\draw (NMOS1GO) -- (NMOS2GO) -- (PMOS1GO) -- (PMOS2GO);

\draw (NMOS3.G) to[short, -*] (NMOS3.G |- OUT1);
\draw (PMOS3.G) to[short, -*] (PMOS3.G |- OUT1);
\draw (NMOS2GO |- OUT1) node[circ](){} to[short] ++(-1, 0) node[ocirc](){};

\draw (NMOS2.S) to[short] ++(0, -0.25) \coord(NMOSGND) node[ground](GND1){};
\draw (PMOS1.S) to[short] ++(0, 0.25) \coord(PMOSGND) node[vcc](VCC){};
\draw (NMOS3.D) to[short] ++(0.25, 0) to[short] ++(0, 0.25) \coord(NMOSVCC) node[vcc](VCC1){};
\draw (PMOS3.D) to[short] ++(0.25, 0) to[short] ++(0, -0.25) \coord(NMOSVCC) node[ground](GND2){};

\draw (NMOS3.bulk) |- (GND1);
\draw (NMOS1.bulk) to[short] ++(0.5,0) \coord(NMOS1BO);
\draw (NMOS2.bulk) to[short, -*] ++(0.5,0) \coord(NMOS2BO);
\draw (NMOS1BO) to[short, -*] (NMOS2BO|- GND1);

\draw (PMOS3.bulk) |- (VCC);
\draw (PMOS1.bulk) to[short, -*] ++(0.5,0) \coord(PMOS1BO);
\draw (PMOS2.bulk) to[short] ++(0.5,0) \coord(PMOS2BO);
\draw (PMOS2BO) to[short, -*] (PMOS1BO |- VCC);
\end{circuitikz}


.. tikz::
:align: center

\begin{circuitikz}[american]
\draw (0,0) node[npn](HBT1){};
\draw (HBT1.B) to[R] ++(-3,0) node[ocirc](IN){};
\draw (HBT1.C) to[short, -*] ++(0,0.5) \coord (HBTJ1) to[short] ++(0.5,0) node[npn, anchor=base](HBT2){};
\draw (HBT1.E) to[short, -*] (HBT1.E -| HBT2.E) \coord (HBTJ2) node [circ]{} -- (HBT2.E);
\draw (HBTJ2) to[R] ++ (0, -2) node[ground](GND){};
\draw (HBTJ2) to[R] ++ (0, -2) node[ground](GND){};
\draw (HBT2.C) to[short] ++ (1,0) node[ocirc](out){};
\draw (HBT2.C) to[R] ++ (0,2) node[vcc](vcc){$V_{CC}=\SI{1}{V}$};
\draw (vcc) to[short, *-] (vcc -| HBT1.C) to[R] ++ (0, -2) \coord (HBT1CR1);
\draw (HBT1CR1) -- (HBT1.C);
\end{circuitikz}
2 changes: 2 additions & 0 deletions docs/sections/codesign/devices/digital_cell.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Digital Cells
==============
Loading

0 comments on commit caac1cc

Please sign in to comment.