diff --git a/template_notebook_to_follow.ipynb b/template_notebook_to_follow.ipynb index 16a4fef..abf83a0 100644 --- a/template_notebook_to_follow.ipynb +++ b/template_notebook_to_follow.ipynb @@ -68,248 +68,129 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 141 - }, - "id": "5dHhq5m6wTI2", - "outputId": "e5b6b3e4-b4f1-4f4f-88c3-b1f294e03d0c" - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", - " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", - " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", - " Building wheel for condacolab (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", - "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n", - "\u001b[0m✨🍰✨ Everything looks OK!\n" - ] - } - ], - "source": [ - "#@title Bootstrap conda environment {display-mode: \"form\"}\n", - "#@markdown - Click the ▷ button to initialize the conda-eda environment.\n", - "#@markdown - Wait for the installation to complete\n", - "#@markdown - Click the `Restart Kernel` button.\n", - "%pip install -q https://github.com/conda-incubator/condacolab/archive/28521d7c5c494dd6377bb072d97592e30c44609c.tar.gz\n", - "import condacolab\n", - "\n", - "condacolab.install(restart_kernel=False)" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "U6rf4KBdwsJ5" - }, - "source": [ - "### Install dependencies\n", - "\n", - "- Wait for the kernel restart to complete.\n", - "- Click the ▷ button below to run the hidden cells to complete the setup." - ] - }, - { - "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "aKoPD8cKw2UL", - "outputId": "8d1db9b2-5dda-42c8-fe00-2e7a8d0b8bff" + "outputId": "0959dcdf-5df0-44ba-fb67-b9c3bd7d40b4" }, "outputs": [ { - "name": "stdout", "output_type": "stream", - "text": [ - "Overwriting environment.yml\n" - ] - } - ], - "source": [ - "%%writefile environment.yml\n", - "channels:\n", - " - conda-forge\n", - "dependencies:\n", - " - ngspice" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "JBbUOsEPyTuU", - "outputId": "4cd6e0e8-4e70-4a70-b7a1-5ada626a03c6" - }, - "outputs": [ - { "name": "stdout", - "output_type": "stream", "text": [ - "\u001b[?25l\u001b[2K\u001b[0G[+] 0.0s\n", - "\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 0.1s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 0.2s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 0.3s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 0.4s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 0.5s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 0.6s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 0.7s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 0.8s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 0.9s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 1.0s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 1.1s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 1.2s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 1.3s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 1.4s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 1.5s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 1.6s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 1.7s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 1.8s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 1.9s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 2.0s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 2.1s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 2.2s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 2.3s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch 100%\u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 2.4s\n", - "conda-forge/linux-64 ⣾ \n", - "conda-forge/noarch 100%\u001b[2K\u001b[1A\u001b[2K\u001b[1A\u001b[2K\u001b[0Gconda-forge/noarch \n", - "[+] 2.5s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 2.6s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 2.7s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 2.8s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 2.9s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 3.0s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 3.1s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 3.2s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 3.3s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 3.4s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 3.5s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 3.6s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 3.7s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 3.8s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 3.9s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 4.0s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 4.1s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 4.2s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 4.3s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 4.4s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 4.5s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 4.6s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 4.7s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 4.8s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 4.9s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 5.0s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 5.1s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 5.2s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 5.3s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 5.4s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 5.5s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 5.6s\n", - "conda-forge/linux-64 ⣾ \u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 5.7s\n", - "conda-forge/linux-64 100%\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 5.8s\n", - "conda-forge/linux-64 100%\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 5.9s\n", - "conda-forge/linux-64 100%\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 6.0s\n", - "conda-forge/linux-64 100%\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 6.1s\n", - "conda-forge/linux-64 100%\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 6.2s\n", - "conda-forge/linux-64 100%\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 6.3s\n", - "conda-forge/linux-64 100%\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 6.4s\n", - "conda-forge/linux-64 100%\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 6.5s\n", - "conda-forge/linux-64 100%\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 6.6s\n", - "conda-forge/linux-64 100%\u001b[2K\u001b[1A\u001b[2K\u001b[0G[+] 6.7s\n", - "conda-forge/linux-64 100%\u001b[2K\u001b[1A\u001b[2K\u001b[0Gconda-forge/linux-64 \n", - "\u001b[?25h\n", "\n", - "Looking for: ['ngspice']\n", + " __\n", + " __ ______ ___ ____ _____ ___ / /_ ____ _\n", + " / / / / __ `__ \\/ __ `/ __ `__ \\/ __ \\/ __ `/\n", + " / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /\n", + " / .___/_/ /_/ /_/\\__,_/_/ /_/ /_/_.___/\\__,_/\n", + " /_/\n", + "\n", + "Empty environment created at prefix: /content/conda-env\n", + "\n", + " __\n", + " __ ______ ___ ____ _____ ___ / /_ ____ _\n", + " / / / / __ `__ \\/ __ `/ __ `__ \\/ __ \\/ __ `/\n", + " / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /\n", + " / .___/_/ /_/ /_/\\__,_/_/ /_/ /_/_.___/\\__,_/\n", + " /_/\n", "\n", "\n", - "\n", - " Pinned packages:\n", - "\n", - " - python 3.8.*\n", - " - python_abi 3.8.* *cp38*\n", - " - cudatoolkit 11.2.*\n", + "Pinned packages:\n", + " - python 3.7*\n", "\n", "\n", "Transaction\n", "\n", - " Prefix: /usr/local\n", + " Prefix: /content/conda-env\n", "\n", - " All requested packages already installed\n", + " Updating specs:\n", "\n", - "\u001b[?25l\u001b[2K\u001b[0G\u001b[?25hPreparing transaction: - \b\bdone\n", - "Verifying transaction: | \b\bdone\n", - "Executing transaction: - \b\bdone\n", - "#\n", - "# To activate this environment, use\n", - "#\n", - "# $ conda activate base\n", - "#\n", - "# To deactivate an active environment, use\n", - "#\n", - "# $ conda deactivate\n", + " - ngspice=*\n", "\n", - "Retrieving notices: ...working... done\n" + "\n", + " Package Version Build Channel Size\n", + "─────────────────────────────────────────────────────────────────────────────────────\n", + " Install:\n", + "─────────────────────────────────────────────────────────────────────────────────────\n", + "\n", + " \u001b[32m+ _libgcc_mutex\u001b[0m 0.1 main main/linux-64 3kB\n", + " \u001b[32m+ _openmp_mutex\u001b[0m 5.1 1_gnu main/linux-64 21kB\n", + " \u001b[32m+ libgcc-ng \u001b[0m 11.2.0 h1234567_1 main/linux-64 9MB\n", + " \u001b[32m+ libgomp \u001b[0m 11.2.0 h1234567_1 main/linux-64 573kB\n", + " \u001b[32m+ libstdcxx-ng \u001b[0m 11.2.0 h1234567_1 main/linux-64 6MB\n", + " \u001b[32m+ ngspice \u001b[0m 39.3_2_gf9ed3fd08 20230225_164303 litex-hub/linux-64 3MB\n", + "\n", + " Summary:\n", + "\n", + " Install: 6 packages\n", + "\n", + " Total download: 19MB\n", + "\n", + "─────────────────────────────────────────────────────────────────────────────────────\n", + "\n", + "\n", + "\n", + "Transaction starting\n", + "Linking libstdcxx-ng-11.2.0-h1234567_1\n", + "Linking _libgcc_mutex-0.1-main\n", + "Linking libgomp-11.2.0-h1234567_1\n", + "Linking _openmp_mutex-5.1-1_gnu\n", + "Linking libgcc-ng-11.2.0-h1234567_1\n", + "Linking ngspice-39.3_2_gf9ed3fd08-20230225_164303\n", + "Transaction finished\n", + "downloading: https://github.com/efabless/globalfoundries-pdk-libs-gf180mcu_fd_pr/raw/main/models/ngspice/design.ngspice\n", + "downloading: https://github.com/efabless/globalfoundries-pdk-libs-gf180mcu_fd_pr/raw/main/models/ngspice/sm141064.ngspice\n", + "downloading: https://github.com/efabless/globalfoundries-pdk-libs-gf180mcu_fd_pr/raw/main/models/ngspice/sm141064_mim.ngspice\n", + "downloading: https://github.com/efabless/globalfoundries-pdk-libs-gf180mcu_fd_pr/raw/main/models/ngspice/smbb000149.ngspice\n", + "env: CONDA_PREFIX=/content/conda-env\n", + "env: PATH=/content/conda-env/bin:/opt/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin\n" ] } ], "source": [ - "!mamba env update -n base -f environment.yml" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "Uc5tBh5D4FVT", - "outputId": "d82509a8-2051-4d20-ebc3-841dbce1898d" - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "fatal: destination path 'globalfoundries-pdk-libs-gf180mcu_fd_pr' already exists and is not an empty directory.\n" - ] - } - ], - "source": [ - "!git clone https://github.com/google/globalfoundries-pdk-libs-gf180mcu_fd_pr.git" + "#@title Install dependencies {display-mode: \"form\"}\n", + "#@markdown - Click the ▷ button to setup the digital design environment based on [conda-eda](https://github.com/hdl/conda-eda).\n", + "\n", + "ngspice_version = 'latest' #@param {type:\"string\"}\n", + "gf180mcu_fd_pr_version = 'latest' #@param {type:\"string\"}\n", + "\n", + "if ngspice_version == 'latest':\n", + " ngspice_version = ''\n", + "\n", + "if gf180mcu_fd_pr_version == 'latest':\n", + " gf180mcu_fd_pr_version = 'main'\n", + "\n", + "import os\n", + "import pathlib\n", + "import urllib.request\n", + "\n", + "!curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xj bin/micromamba\n", + "conda_prefix_path = pathlib.Path('conda-env')\n", + "CONDA_PREFIX = str(conda_prefix_path.resolve())\n", + "!bin/micromamba create --yes --prefix $CONDA_PREFIX\n", + "!echo 'python ==3.7*' >> {CONDA_PREFIX}/conda-meta/pinned\n", + "!CI=0 bin/micromamba install --yes --prefix $CONDA_PREFIX \\\n", + " --channel litex-hub \\\n", + " --channel main \\\n", + " ngspice={ngspice_version}\n", + "\n", + "ngspice_models_dir = pathlib.Path('globalfoundries-pdk-libs-gf180mcu_fd_pr/models/ngspice')\n", + "ngspice_models_dir.mkdir(exist_ok=True, parents=True)\n", + "models = ['design.ngspice', 'sm141064.ngspice', 'sm141064_mim.ngspice', 'smbb000149.ngspice']\n", + "for m in models:\n", + " url = f'https://github.com/efabless/globalfoundries-pdk-libs-gf180mcu_fd_pr/raw/{gf180mcu_fd_pr_version}/models/ngspice/{m}'\n", + " print('downloading:', url)\n", + " with urllib.request.urlopen(url) as src:\n", + " with (ngspice_models_dir / m).open('wb') as dst:\n", + " dst.write(src.read())\n", + "\n", + "PATH = os.environ['PATH']\n", + "%env CONDA_PREFIX={CONDA_PREFIX}\n", + "%env PATH={CONDA_PREFIX}/bin:{PATH}" ] }, { @@ -346,20 +227,20 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "J0k4CykG8wui", - "outputId": "48e6bafb-5334-4d30-8373-7786a66f94b4" + "outputId": "8b69d99a-4b1c-42b5-f860-53e0b43a2701" }, "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ - "Overwriting .spiceinit\n" + "Writing .spiceinit\n" ] } ], @@ -370,20 +251,20 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "d4381uZZ1dbj", - "outputId": "eb42f2c2-3002-498a-e21a-5d4f3a799c66" + "outputId": "ae4c2403-439f-4d55-a2a1-9338f712449c" }, "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ - "Overwriting netlist.spice\n" + "Writing netlist.spice\n" ] } ], @@ -395,16 +276,16 @@ ".lib \"globalfoundries-pdk-libs-gf180mcu_fd_pr/models/ngspice/sm141064.ngspice\" typical\n", "\n", ".param width=10u\n", - "X1 vdp vgp 0 vbp pmos_3p3 w=width l=0.28u AD={width*0.24u} AS={width*0.24u} PD={2*(width + 0.24u)} PS={2*(width + 0.24u)}\n", - "vsdp 0 vdp dc 0.9 \n", - "vsgp 0 vgp dc 0.9 \n", + "X1 vdp vgp 0 vbp pfet_03v3 w=width l=0.28u AD={width*0.24u} AS={width*0.24u} PD={2*(width + 0.24u)} PS={2*(width + 0.24u)}\n", + "vsdp 0 vdp dc 0.9\n", + "vsgp 0 vgp dc 0.9\n", "vsbp 0 vbp dc 0\n", ".op\n", ".option post nomod\n", ".end\n", "\n", ".control\n", - "save all @m.x1.m0[id] @m.x1.m0[gm] @m.x1.m0[cgg] \n", + "save all @m.x1.m0[id] @m.x1.m0[gm] @m.x1.m0[cgg]\n", "dc vsgp 0 1.8 0.01\n", "display\n", "wrdata output.txt @m.x1.m0[id] @m.x1.m0[gm] @m.x1.m0[cgg]\n", @@ -413,18 +294,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "6Qs0DbgP02vN", - "outputId": "145fa0f0-4767-411e-8772-73280fe57c2d" + "outputId": "0cf96806-cf62-4069-ceca-6c508ca39aaa" }, "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ "\n", "Note: Compatibility modes selected: hs\n", @@ -442,7 +323,7 @@ "\n", "Title: * pmos vgs sweep\n", "Name: dc1 (DC transfer characteristic)\n", - "Date: Fri Jan 6 01:06:28 2023\n", + "Date: Fri Mar 10 04:41:42 2023\n", "\n", " @m.x1.m0[cgg] : capacitance, real, 181 long\n", " @m.x1.m0[gm] : admittance, real, 181 long\n", @@ -468,14 +349,14 @@ "\tSource\tCurrent\n", "\t------\t-------\n", "\n", - "\t@m.x1.m0[id] 2.829225e-05\n", - "\tvsdp#branch -2.82922e-05\n", + "\t@m.x1.m0[id] 2.878168e-05\n", + "\tvsdp#branch -2.87817e-05\n", "\tvsgp#branch 0.000000e+00\n", "\tvsbp#branch 9.008252e-13\n", "\n", " BSIM4v5: Berkeley Short Channel IGFET Model-4\n", " device m.x1.m0\n", - " model pmos_3p3.8\n", + " model pfet_03v3.8\n", " l 2.8e-07\n", " w 1e-05\n", " m 1\n", @@ -500,7 +381,8 @@ " rbpb 50\n", " rbps 50\n", " rbpd 50\n", - " delvto -0.00173689\n", + " delvto -0\n", + " mulu0 1\n", " xgw 0\n", " ngcon 1\n", " trnqsmod 0\n", @@ -509,17 +391,17 @@ " rgatemod 0\n", " geomod 0\n", " rgeomod 0\n", - " gmbs 8.86307e-05\n", - " gm 0.000266785\n", - " gds 5.90081e-06\n", - " vdsat 0.191771\n", - " vth 0.735876\n", - " id 2.82922e-05\n", + " gmbs 8.95099e-05\n", + " gm 0.000269371\n", + " gds 5.97813e-06\n", + " vdsat 0.193151\n", + " vth 0.734139\n", + " id 2.87817e-05\n", " ibd -9.00825e-13\n", " ibs 0\n", " gbd 1.00168e-12\n", " gbs 1.00054e-12\n", - " isub 1.8697e-19\n", + " isub 1.89841e-19\n", " igidl 0\n", " igisl 0\n", " igs 0\n", @@ -530,29 +412,29 @@ " vbs -0\n", " vgs 0.9\n", " vds 0.9\n", - " cgg 9.14344e-15\n", - " cgs -6.86794e-15\n", - " cgd 5.70583e-17\n", - " cbg -1.64522e-15\n", - " cbd 2.68481e-17\n", - " cbs -3.18837e-15\n", - " cdg -3.00227e-15\n", - " cdd -3.18612e-17\n", - " cds 4.02489e-15\n", - " csg -4.49594e-15\n", - " csd -5.20452e-17\n", - " css 6.03141e-15\n", - " cgb -2.33256e-15\n", - " cdb -9.90754e-16\n", - " csb -1.48343e-15\n", - " cbb 4.80674e-15\n", + " cgg 9.1479e-15\n", + " cgs -6.8743e-15\n", + " cgd 5.70911e-17\n", + " cbg -1.64433e-15\n", + " cbd 2.68413e-17\n", + " cbs -3.18902e-15\n", + " cdg -3.00443e-15\n", + " cdd -3.18562e-17\n", + " cds 4.0277e-15\n", + " csg -4.49914e-15\n", + " csd -5.20762e-17\n", + " css 6.03562e-15\n", + " cgb -2.33068e-15\n", + " cdb -9.91414e-16\n", + " csb -1.48441e-15\n", + " cbb 4.8065e-15\n", " capbd 7.22884e-15\n", " capbs 8.65386e-15\n", - " qg 1.18221e-14\n", - " qb -9.40484e-15\n", - " qd -9.67557e-16\n", - " qs -1.44967e-15\n", - " qinv 1.3522e-15\n", + " qg 1.18378e-14\n", + " qb -9.40755e-15\n", + " qd -9.72774e-16\n", + " qs -1.45748e-15\n", + " qinv 1.36557e-15\n", " qdef -0\n", " gcrg 0\n", " gtau 0\n", @@ -574,23 +456,23 @@ " pwr 0 0 0\n", " freq 0 0 0\n", " phase 0 0 0\n", - " i 9.00825e-13 0 -2.82922e-05\n", - " p 0 0 -2.5463e-05\n", + " i 9.00825e-13 0 -2.87817e-05\n", + " p 0 0 -2.59035e-05\n", "\n", "\n", - "Total analysis time (seconds) = 0.002\n", + "Total analysis time (seconds) = 0.001798\n", "\n", - "Total elapsed time (seconds) = 0.052 \n", + "Total CPU time (seconds) = 0.114 \n", "\n", - "Total DRAM available = 12985.539 MB.\n", - "DRAM currently available = 8757.086 MB.\n", - "Maximum ngspice program size = 55.383 MB.\n", - "Current ngspice program size = 18.945 MB.\n", + "Total DRAM available = 12985.547 MB.\n", + "DRAM currently available = 7227.352 MB.\n", + "Maximum ngspice program size = 20.113 MB.\n", + "Current ngspice program size = 14.832 MB.\n", "\n", - "Shared ngspice pages = 10.492 MB.\n", - "Text (code) pages = 5.336 MB.\n", + "Shared ngspice pages = 6.988 MB.\n", + "Text (code) pages = 5.059 MB.\n", "Stack = 0 bytes.\n", - "Library pages = 24.625 MB.\n", + "Library pages = 8.773 MB.\n", "\n" ] } @@ -601,21 +483,51 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": { "colab": { "base_uri": "https://localhost:8080/", - "height": 424 + "height": 423 }, "id": "xh5L-L-KaM9A", - "outputId": "66e3b0d8-48a8-4403-c703-7e3e8cb51875" + "outputId": "bf99bf27-a710-4047-8282-c7b927499446" }, "outputs": [ { + "output_type": "execute_result", "data": { + "text/plain": [ + " vsg gm vsg1 id vsg2 cgg gm_id \\\n", + "0 0.00 2.327947e-14 0.00 6.266460e-13 0.00 5.090079e-15 0.037149 \n", + "1 0.01 3.047037e-14 0.01 8.202064e-13 0.01 5.067127e-15 0.037150 \n", + "2 0.02 3.988240e-14 0.02 1.073551e-12 0.02 5.044596e-15 0.037150 \n", + "3 0.03 5.220157e-14 0.03 1.405141e-12 0.03 5.022486e-15 0.037150 \n", + "4 0.04 6.832577e-14 0.04 1.839142e-12 0.04 5.000804e-15 0.037151 \n", + ".. ... ... ... ... ... ... ... \n", + "176 1.76 5.645906e-04 1.76 8.077414e-04 1.76 9.709857e-15 0.698974 \n", + "177 1.77 5.726699e-04 1.77 8.080913e-04 1.77 9.714894e-15 0.708670 \n", + "178 1.78 5.807518e-04 1.78 8.082642e-04 1.78 9.720098e-15 0.718517 \n", + "179 1.79 5.888346e-04 1.79 8.082598e-04 1.79 9.725480e-15 0.728521 \n", + "180 1.80 5.969164e-04 1.80 8.080786e-04 1.80 9.731051e-15 0.738686 \n", + "\n", + " f_T \n", + "0 7.278949e-01 \n", + "1 9.570531e-01 \n", + "2 1.258273e+00 \n", + "3 1.654188e+00 \n", + "4 2.174527e+00 \n", + ".. ... \n", + "176 9.254244e+09 \n", + "177 9.381806e+09 \n", + "178 9.509114e+09 \n", + "179 9.636124e+09 \n", + "180 9.762790e+09 \n", + "\n", + "[181 rows x 8 columns]" + ], "text/html": [ "\n", - "