Skip to content

Commit

Permalink
Started to add license header to sources
Browse files Browse the repository at this point in the history
  • Loading branch information
hpretl committed Nov 26, 2024
1 parent 221ed0c commit a87e729
Show file tree
Hide file tree
Showing 30 changed files with 480 additions and 0 deletions.
16 changes: 16 additions & 0 deletions content/_app_circuit_designers_etiquette.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Appendix: Circuit Designer's Etiquette {#sec-designers-etiquette}

## Prolog
Expand Down
16 changes: 16 additions & 0 deletions content/_app_linux_cheatsheet.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Appendix: Linux Cheatsheet {#sec-linux-cheatsheet}

The most useful commands for the Linux command line are:
Expand Down
16 changes: 16 additions & 0 deletions content/_app_middlebrook_method.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Appendix: Middlebrook's Method {#sec-middlebrook-method}

If we want to do a closed-loop gain analysis (for stability or other investigations), we have the need to break the loop at one point, apply a stimulus, and monitor the response on the other end. By doing this we want to keep the loading (i.e. the impedance) on both ends similar to the original case. To achieve this, we break the loop at one point by inserting (1) an ac voltage source, and (2) attach an ac current source, as shown in @fig-middlebrook-voltage and @fig-middlebrook-current. The derivation of this approach is presented in [@Middlebrook_1975], and has the big advantage that loading is not changed compared to the closed-loop situation, and the bias points are also unchanged.
Expand Down
16 changes: 16 additions & 0 deletions content/_app_millers_theorem.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Appendix: Miller's Theorem {#sec-miller-theorem}

Using Miller's theorem we can find the equivalent circuit of an impedance connected between two nodes, and we know the transfer function between these nodes. The given situation is shown in @fig-miller-theorem, and the equivalent circuit is shown in @fig-miller-theorem-equivalent.
Expand Down
16 changes: 16 additions & 0 deletions content/_app_ngspice_cheatsheet.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Appendix: ngspice Cheatsheet {#sec-ngspice-cheatsheet}

Here is an unsorted list of useful ngspice settings and command:
Expand Down
16 changes: 16 additions & 0 deletions content/_app_voltage_buffer_zout.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Appendix: 5T-OTA Small-Signal Output Impedance {#sec-5t-ota-zout}

This section gives additional details to the analysis presented in @sec-basic-ota-small-signal.
Expand Down
16 changes: 16 additions & 0 deletions content/_app_xschem_cheatsheet.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Appendix: Xschem Cheatsheet {#sec-xschem-cheatsheet}

When opening Xschem, using `Help -> Keys` a pop-up windows comes up with many useful shortcuts. The most useful are:
Expand Down
16 changes: 16 additions & 0 deletions content/_macros.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

::: {.hidden}
\newcommand{\VDD}[1][]{V_\mathrm{DD#1}}
\newcommand{\VSS}[1][]{V_\mathrm{SS#1}}
Expand Down
16 changes: 16 additions & 0 deletions content/_sec_basic_ota.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# A Basic 5-Transistor OTA {#sec-basic-ota}

Suited with the knowledge of basic transistor operation (@sec-first-steps and @sec-gmid-method) and the working knowledge of the current mirror (@sec-mosfet-diode and @sec-current-mirror) as well as the differential pair (@sec-diff-pair) we can now start to design our first real circuit. A fundamental (simple) circuit that is often used for basic tasks is the 5-transistor operational transconductance amplifier (OTA). A circuit diagram of this 5T-OTA is shown in @fig-basic-ota.
Expand Down
16 changes: 16 additions & 0 deletions content/_sec_cascode_stage.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Cascode Stage {#sec-cascode-stage}

As we have seen in @sec-basic-ota the performance of the OTA is generally quite acceptable (see @tbl-voltage-buffer-spec), but we might want to aim for better output voltage accuracy. As our analysis has shown the output voltage tolerance is limited by the open-loop dc gain $A_0$ of the OTA (see @eq-voltage-buffer-tolerance), which in turn is limited by the output conductance of $M_2$ and $M_4$ in @fig-basic-ota, which is also confirmed by the analytical result in @eq-simple-ota-gain-dc.
Expand Down
16 changes: 16 additions & 0 deletions content/_sec_common_source_amplifier.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Common-Source Amplifier {#sec-cs-amplifier}

We now want to step up our game, and use more components to design something useful. We will use a basic circuit structure, namely a single-ended common-source amplifier. The structure of this circuit, using a resistor as a load, is shown in @fig-cs-amplifier.
Expand Down
16 changes: 16 additions & 0 deletions content/_sec_current_mirror.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Current Mirror {#sec-current-mirror}

In this section we will look into a fundamental building block which is often used in integrated circuit design, the **current mirror**. A diagram is shown in @fig-current-mirror with one MOSFET diode converting the incoming bias current into a voltage, and two output MOSFETs working as current sources, which are biased from the diode. By properly selecting all $W$ and $L$ the input current can be scaled, and multiple copies can be created at once. Shown in the figure are two output currents, but any number of parallel branches can be realized.
Expand Down
16 changes: 16 additions & 0 deletions content/_sec_differential_pair.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Differential Pair {#sec-diff-pair}

Like the current mirror in @sec-current-mirror the **differential pair** is an ubiquitous building block often used in integrated circuit design. The fundamental structure is given in @fig-differential-pair.
Expand Down
16 changes: 16 additions & 0 deletions content/_sec_first_steps.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# First Steps {#sec-first-steps}

In this first chapter we will learn to use Xschem for schematic entry, and how to operate the ngspice SPICE simulator for circuit simulations. Further, we will make ourself familiar with the transistor and other passive components available in the IHP Microelectronics SG13G2 technology. While this is strictly speaking a BiCMOS technology offering MOSFETs as well as SiGe heterojunction bipolar transistors (HBTs), we will use it as a pure CMOS technology, which is available from IHP under the name SG13S.
Expand Down
16 changes: 16 additions & 0 deletions content/_sec_improved_ota.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Improved OTA {#sec-improved-ota}

With the new learned know-how of the cascode stage we can set out to improve our original basic 5T-OTA design. Essentially this means to add cascodes to $M_2$ and $M_4$ in @fig-basic-ota. For symmetry reasons we will add cascodes to both sides, and the resulting schematic is shown in @fig-improved-ota.
Expand Down
16 changes: 16 additions & 0 deletions content/_sec_intro.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Introduction {#sec-intro}

This is the material for an intermediate-level MOSFET analog circuit design course, held at JKU under course number 336.009 ("KV Analoge Schaltungstechnik").
Expand Down
16 changes: 16 additions & 0 deletions content/_sec_mosfet_diode.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# First Circuit: MOSFET Diode {#sec-mosfet-diode}

The first (simple) circuit which we will investigate is a MOSFET, where the gate is shorted with the drain, a so-called MOSFET "diode", which is shown in @fig-mosfet-diode. This diode is one half of a current mirror, which we will investigate in @sec-current-mirror.
Expand Down
16 changes: 16 additions & 0 deletions content/_sec_sizing.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Transistor Sizing Using gm/ID Methodology {#sec-gmid-method}

When designing integrated circuits it is an important question how to select various parameters of a MOSFET, like $W$, $L$, or the bias current $I_\mathrm{D}$. In comparison to using discrete components in PCB design, or also compared to a bipolar junction transistor (BJT), we have these degrees of freedom, which make integrated circuit design so interesting.
Expand Down
16 changes: 16 additions & 0 deletions content/_sec_summary.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

# Summary & Conclusion

By now, you should be familiar with the use of a schematic entry tool (Xschem) and circuit simulator (ngspice). You have learned the basic performance trade-offs, and the large- and small-signal behavior of the MOSFET. You can use the $\gmid$ method to size MOSFET for class-A operation. You can design simple amplifiers based on OTA structures. In summary, you are on a good way to become a good analog or mixed-signal circuit designer!
Expand Down
16 changes: 16 additions & 0 deletions figures/_fig_basic_ota.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
::: {.content-hidden}
Copyright (C) 2024 Harald Pretl and co-authors (harald.pretl@jku.at)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:::

```{python}
#| label: fig-basic-ota
#| echo: false
Expand Down
Loading

0 comments on commit a87e729

Please sign in to comment.