From 16b408af4f89fe37e60aa0fe542b8c89045dc912 Mon Sep 17 00:00:00 2001 From: Mohamed Gaber Date: Sat, 30 Aug 2025 04:41:58 +0300 Subject: [PATCH 1/6] feat!: fork, near-complete rewrite - update yosys to latest, stop patching and USE_FILTERLIB instead - rewrite wrapper to use pybind instead of swig - rewrite nix flake - include missing files in source distributions --- .clang-format | 10 +- .github/workflows/ci.yml | 110 ++++++++++---------- License | 202 ++++++++++++++++++++++++++++++++++++ MANIFEST.in | 5 +- Makefile | 51 --------- Readme.md | 37 ++++--- default.nix | 58 ++++------- flake.lock | 27 ++++- flake.nix | 69 ++++++------ libparse/__init__.py | 2 +- libparse/__version__.py | 7 +- libparse/libparse.cpp.patch | 45 -------- libparse/libparse.h.patch | 40 ------- libparse/libparse.i | 35 ------- libparse/py_iostream.cpp | 24 ----- libparse/py_iostream.h | 19 ---- libparse/stdio_filebuf.h | 23 +++- libparse/wrapper.cpp | 81 +++++++++++++++ pyproject.toml | 6 ++ setup.py | 77 ++++---------- test/test.lib | 39 ------- test/test.py | 28 ----- 22 files changed, 507 insertions(+), 488 deletions(-) create mode 100644 License delete mode 100644 Makefile delete mode 100644 libparse/libparse.cpp.patch delete mode 100644 libparse/libparse.h.patch delete mode 100644 libparse/libparse.i delete mode 100644 libparse/py_iostream.cpp delete mode 100644 libparse/py_iostream.h create mode 100644 libparse/wrapper.cpp create mode 100644 pyproject.toml delete mode 100644 test/test.lib delete mode 100644 test/test.py diff --git a/.clang-format b/.clang-format index 5b2fbe5..c86fa8c 100644 --- a/.clang-format +++ b/.clang-format @@ -1,9 +1,13 @@ # Default Linux style BasedOnStyle: LLVM -IndentWidth: 4 -UseTab: Never +IndentWidth: 8 +UseTab: Always BreakBeforeBraces: Linux AllowShortIfStatementsOnASingleLine: false IndentCaseLabels: false + +# From guidelines/CodingStyle +TabWidth: 8 +ContinuationIndentWidth: 2 ColumnLimit: 150 -AccessModifierOffset: -4 +# BreakBeforeBraces: Linux diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d8b421..b32af17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: Build Wheels for PyPI # Events that trigger workflow on: @@ -9,79 +9,81 @@ on: jobs: build_wheels: - name: Build Wheels (${{matrix.os.name}}) - runs-on: ${{ matrix.os.runner }} strategy: + fail-fast: false matrix: os: [ { - name: "Ubuntu 20.04", - runner: "ubuntu-20.04", - archs: "x86_64,aarch64", + name: "Ubuntu 22.04", + family: "linux", + runner: "ubuntu-22.04", + archs: "x86_64", + }, + { + name: "Ubuntu 22.04", + family: "linux", + runner: "ubuntu-22.04-arm", + archs: "aarch64", + }, + { + name: "macOS 14", + family: "macos", + runner: "macos-14", + archs: "x86_64,arm64", }, - { name: "macOS 11", runner: "macos-11", archs: "x86_64,arm64" }, { name: "Windows Server 2019", runner: "windows-2019", archs: "AMD64,ARM64", }, ] + name: Build Wheels | ${{ matrix.os.name }} | ${{ matrix.os.archs }} + runs-on: ${{ matrix.os.runner }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 submodules: true - - if: ${{ matrix.os.runner == 'ubuntu-20.04' }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - uses: actions/setup-python@v3 - - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.15.0 + persist-credentials: false + - uses: actions/setup-python@v5 + - if: ${{ matrix.os.family == 'macos' && matrix.os.archs == 'arm64' }} + name: "[macOS/arm64] Install Python 3.8 (see: https://cibuildwheel.pypa.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64)" + uses: actions/setup-python@v5 + with: + python-version: 3.8 - name: Build wheels - run: python -m cibuildwheel --archs ${{ matrix.os.archs }} --output-dir dist - - uses: actions/upload-artifact@v3 + uses: pypa/cibuildwheel@v2.21.1 + env: + # * APIs not supported by PyPy + # * Musllinux disabled because it increases build time from 48m to ~3h + CIBW_ARCHS: ${{ matrix.os.archs }} + CIBW_BUILD_VERBOSITY: "1" + # manylinux2014 (default) does not have a modern enough C++ compiler for Yosys + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 + CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 + - uses: actions/upload-artifact@v4 with: - path: ./dist/*.whl - push_to_pypi: - name: Build (and publish, if applicable) - runs-on: ubuntu-20.04 + name: python-wheels-${{ matrix.os.runner }} + path: ./wheelhouse/*.whl + upload_wheels: + name: Upload Wheels + runs-on: ubuntu-latest + # Specifying a GitHub environment is optional, but strongly encouraged + environment: pypi + permissions: + # IMPORTANT: this permission is mandatory for Trusted Publishing + id-token: write needs: build_wheels steps: - - name: Check out Git repository - uses: actions/checkout@v3 + - uses: actions/download-artifact@v4 with: - fetch-depth: 0 - submodules: true - - name: Export Repo URL - run: echo "REPO_URL=https://github.com/${{ github.repository }}" >> $GITHUB_ENV - - name: Export Branch Name - run: echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV - - name: Set Up Python - uses: actions/setup-python@v4 - with: - python-version: "3.6" - - name: Build Distribution - run: | - python3 ./setup.py sdist - - uses: actions/download-artifact@v3 - with: - path: . - - run: mv ./artifact/* ./dist - - name: Set default for env.NEW_TAG - run: echo "NEW_TAG=NO_NEW_TAG" >> $GITHUB_ENV - - name: Check for new version - if: ${{ env.BRANCH_NAME == 'main' }} - run: | - cd ${GITHUB_WORKSPACE}/ && python3 .github/scripts/generate_tag.py - - name: Tag Commit - if: ${{ env.NEW_TAG != 'NO_NEW_TAG' }} - uses: tvdias/github-tagger@v0.0.1 - with: - tag: "${{ env.NEW_TAG }}" - repo-token: "${{ secrets.MY_TOKEN }}" + path: "." + pattern: python-wheels-* + merge-multiple: true + - run: | + ls + mkdir -p ./dist + mv *.whl ./dist - name: Publish - if: ${{ env.NEW_TAG != 'NO_NEW_TAG' }} uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/License b/License new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/License @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/MANIFEST.in b/MANIFEST.in index 4bca278..fe6612e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,4 @@ -include Readme.md \ No newline at end of file +include Readme.md +include yosys/kernel/*.h +include yosys/kernel/constids.inc +include yosys/passes/techmap/libparse.* diff --git a/Makefile b/Makefile deleted file mode 100644 index bab4574..0000000 --- a/Makefile +++ /dev/null @@ -1,51 +0,0 @@ - -SRC_DIR = libparse -SWIG_IN = $(SRC_DIR)/libparse.i -SWIG_OUT = $(SRC_DIR)/libparse_wrap.cpp $(SRC_DIR)/libparse.py -SOURCES = $(SRC_DIR)/libparse_wrap.cpp $(SRC_DIR)/py_iostream.cpp $(SRC_DIR)/libparse.cpp -OBJECTS = $(patsubst %.cpp,%.o,$(SOURCES)) -HEADERS = $(SRC_DIR)/libparse.h $(SRC_DIR)/py_iostream.h $(SRC_DIR)/stdio_filebuf.h - -CXXFLAGS += -Wpedantic -g -std=c++11 -I$(shell python3 -c "import sysconfig; print(sysconfig.get_path('include'))") -LDFLAGS += -g -L$(shell python3 -c "import sysconfig; print(sysconfig.get_path('stdlib'))") -EXT = .so - -ifeq ("$(shell uname)", "Darwin") -LDFLAGS += -dynamic -undefined dynamic_lookup -else -LDFLAGS += -shared -endif - -all: _libparse$(EXT) -patch: $(SRC_DIR)/libparse.cpp $(SRC_DIR)/libparse.h -swig_out: $(SWIG_OUT) - -_libparse$(EXT): $(OBJECTS) - $(CXX) $(LDFLAGS) $^ -o $@ - -$(OBJECTS): %.o : %.cpp $(HEADERS) - $(CXX) $(CXXFLAGS) -fPIC -o $@ -c -DFILTERLIB $< - -$(SWIG_OUT): $(SWIG_IN) $(HEADERS) - swig -c++ -o $(SRC_DIR)/libparse_wrap.cpp -oh $(SRC_DIR)/libparse.h -python $< - -$(SRC_DIR)/libparse.h: yosys/passes/techmap/libparse.h $(SRC_DIR)/libparse.h.patch - cp $< $@ - patch $@ $(SRC_DIR)/libparse.h.patch - -$(SRC_DIR)/libparse.cpp: yosys/passes/techmap/libparse.cc $(SRC_DIR)/libparse.cpp.patch - cp $< $@ - patch $@ $(SRC_DIR)/libparse.cpp.patch - -.PHONY: regen-patches -regen-patches: - diff yosys/passes/techmap/libparse.h $(SRC_DIR)/libparse.h > $(SRC_DIR)/libparse.h.patch || true - diff yosys/passes/techmap/libparse.cc $(SRC_DIR)/libparse.cpp > $(SRC_DIR)/libparse.cpp.patch || true - -.PHONY: clean -clean: - rm -f $(SRC_DIR)/libparse*.cpp $(SRC_DIR)/*.o $(SRC_DIR)/libparse.py $(SRC_DIR)/libparse.h - rm -f *.so *.o *.dylib *.dll - rm -rf build/ - rm -rf libparse.egg-info/ - rm -rf dist/ \ No newline at end of file diff --git a/Readme.md b/Readme.md index 580f2ae..d5bd515 100644 --- a/Readme.md +++ b/Readme.md @@ -1,25 +1,38 @@ # libparse-python A SWIG-based Python wrapper around [Yosys](https://github.com/yosyshq/yosys)'s -`libparse`, for all your lib file parsing needs. +`libparse`, for all your dotlib file parsing needs. # Requirements -## Running -* UNIX or UNIX-like operating system (Windows untested) -* Python 3.6+ (CPython or PyPy) with PIP - * `python3 -m pip install wheel` -## Building -Running requirements + +## Running -* A C++11 compiler -* GNU Make -* SWIG +* UNIX or UNIX-like operating system (Windows untested) +* Python 3.8+ (CPython or PyPy) with PIP # License Apache 2.0. Check 'License'. ## Acknowledgements +Original [`libparse-python`]([https://github.com/efabless/libparse-python]) by +Efabless under the Apache 2.0 License. + +``` +Copyright 2024 Efabless Corporation + +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. +``` + `libparse` from [Yosys](https://github.com/yosyshq/yosys) used under the following conditions: ``` @@ -38,7 +51,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ``` -`stdio_filebuf` from [Android Frameworks](https://android.googlesource.com/platform/frameworks/native/+/refs/heads/main/services/vr/performanced) used under the following conditions: +`stdio_filebuf` from [Android Frameworks](https://android.googlesource.com/platform/frameworks/native/+/571ae5f732/services/vr/performanced/stdio_filebuf.h) used under the following conditions: ``` Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT @@ -62,4 +75,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -> The `CREDITS.TXT` in question could not be located. \ No newline at end of file +> The `CREDITS.TXT` in question could not be located. diff --git a/default.nix b/default.nix index 1fd48f4..23dee73 100644 --- a/default.nix +++ b/default.nix @@ -1,46 +1,30 @@ { - python3, - buildPythonPackage, lib, + src ? ./., + buildPythonPackage, pytest, - nix-gitignore, - clang, - swig4, -}: - -let - yosys = builtins.fetchTarball { - url = "https://github.com/yosyshq/yosys/archive/73cb4977b2e493b840b23419919a63be7c83e6df.tar.gz"; - sha256 = "sha256:0rhhx08dia0rd51rp3922vnqzi2fjarz1mrzp27s79k9y5k0mhzk"; - }; -in -buildPythonPackage rec { - name = "libparse"; - + pybind11, +}: let version_file = builtins.readFile ./libparse/__version__.py; version_list = builtins.match ''.+''\n__version__ = "([^"]+)"''\n.+''$'' version_file; version = builtins.head version_list; - - prePatch = '' - rm -rf ./yosys - cp -r ${yosys} ./yosys - ''; +in + buildPythonPackage { + pname = "libparse"; + inherit version; - src = (nix-gitignore.gitignoreSourcePure ./.gitignore ./.); + inherit src; - checkPhase = '' - python3 ./test/test.py - ''; + buildInputs = [ + pybind11 + ]; + + pythonImportsCheck = [ "libparse" ]; - nativeBuildInputs = [ - clang - swig4 - ]; - - meta = with lib; { - description = "Python wrapper around Yosys's libparse"; - license = with licenses; [asl20]; - homepage = "https://github.com/efabless/libpaprse-python"; - platforms = platforms.linux ++ platforms.darwin; - }; -} + meta = with lib; { + description = "Python wrapper around Yosys's libparse"; + license = with licenses; [asl20]; + homepage = "https://github.com/librelane/libparse-python"; + platforms = platforms.linux ++ platforms.darwin; + }; + } diff --git a/flake.lock b/flake.lock index af6d1a7..cdac53d 100644 --- a/flake.lock +++ b/flake.lock @@ -1,23 +1,42 @@ { "nodes": { + "nix-eda": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1756208922, + "narHash": "sha256-6CR+pLQPn3urPdlAmRS4qe2b9IzjyyMB25hy6V68bcc=", + "owner": "fossi-foundation", + "repo": "nix-eda", + "rev": "5fe9ce30351385cead78fe8932210b0683795c80", + "type": "github" + }, + "original": { + "owner": "fossi-foundation", + "repo": "nix-eda", + "type": "github" + } + }, "nixpkgs": { "locked": { - "narHash": "sha256-C36QmoJd5tdQ5R9MC1jM7fBkZW9zBUqbUCsgwS6j4QU=", + "lastModified": 1750400657, + "narHash": "sha256-3vkjFnxCOP6vm5Pm13wC/Zy6/VYgei/I/2DWgW4RFeA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c1be43e8e837b8dbee2b3665a007e761680f0c3d", + "rev": "b2485d56967598da068b5a6946dadda8bfcbcd37", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-23.11", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "nix-eda": "nix-eda" } } }, diff --git a/flake.nix b/flake.nix index dc78f5b..81897b6 100644 --- a/flake.nix +++ b/flake.nix @@ -1,48 +1,45 @@ -# Copyright 2024 Efabless Corporation -# -# 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. { inputs = { - nixpkgs.url = github:nixos/nixpkgs/nixos-23.11; + self.submodules = true; + nix-eda.url = "github:fossi-foundation/nix-eda"; }; outputs = { self, - nixpkgs, + nix-eda, ... - }: { - # Helper functions - forAllSystems = function: - nixpkgs.lib.genAttrs [ - "x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" - ] ( - system: - function (import nixpkgs { - inherit system; + }: let + nixpkgs = nix-eda.inputs.nixpkgs; + lib = nixpkgs.lib; + in { + overlays = { + default = lib.composeManyExtensions [ + ( + nix-eda.composePythonOverlay (pkgs': pkgs: pypkgs': pypkgs: let + callPythonPackage = lib.callPackageWith (pkgs' // pypkgs'); + in { + libparse = callPythonPackage ./default.nix { + src = self; + }; }) - ); + ) + ]; + }; - # Outputs - packages = self.forAllSystems (pkgs: let - callPackage = pkgs.lib.callPackageWith (pkgs // self.packages.${pkgs.system}); - callPythonPackage = pkgs.lib.callPackageWith (pkgs // pkgs.python3.pkgs // self.packages.${pkgs.system}); - in - rec { - libparse = callPythonPackage ./default.nix {}; - default = libparse; + legacyPackages = nix-eda.forAllSystems ( + system: + import nix-eda.inputs.nixpkgs { + inherit system; + overlays = [nix-eda.overlays.default self.overlays.default]; + } + ); + + packages = nix-eda.forAllSystems ( + system: let + pkgs = self.legacyPackages."${system}"; + in { + inherit (pkgs.python3.pkgs) libparse; + default = self.packages."${system}".libparse; } ); }; diff --git a/libparse/__init__.py b/libparse/__init__.py index f6f5d75..7006b90 100644 --- a/libparse/__init__.py +++ b/libparse/__init__.py @@ -1,2 +1,2 @@ -from .libparse import * +from _libparse import * from .__version__ import __version__ diff --git a/libparse/__version__.py b/libparse/__version__.py index aac5049..e6923f0 100644 --- a/libparse/__version__.py +++ b/libparse/__version__.py @@ -1,3 +1,8 @@ + +# Copyright 2025 Mohamed Gaber +# +# Adapted from libparse-python +# # Copyright 2024 Efabless Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,7 +16,7 @@ # 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. -__version__ = "0.3.1" +__version__ = "1.0.0" if __name__ == "__main__": print(__version__, end="") diff --git a/libparse/libparse.cpp.patch b/libparse/libparse.cpp.patch deleted file mode 100644 index 47d3023..0000000 --- a/libparse/libparse.cpp.patch +++ /dev/null @@ -1,45 +0,0 @@ -40,41d39 -< for (auto child : children) -< delete child; -45c43 -< LibertyAst *LibertyAst::find(std::string name) ---- -> std::shared_ptr LibertyAst::find(std::string name) -185c183 -< LibertyAst *LibertyParser::parse() ---- -> std::shared_ptr LibertyParser::parse() -225c223 -< LibertyAst *ast = new LibertyAst; ---- -> auto ast = std::make_shared(); -340c338 -< LibertyAst *child = parse(); ---- -> auto child = parse(); -409c407 -< LibertyAst *find_non_null(LibertyAst *node, const char *name) ---- -> std::shared_ptr find_non_null(std::shared_ptr node, const char *name) -411c409 -< LibertyAst *ret = node->find(name); ---- -> auto ret = node->find(name); -458c456 -< void event2vl(LibertyAst *ast, std::string &edge, std::string &expr) ---- -> void event2vl(std::shared_ptr ast, std::string &edge, std::string &expr) -492c490 -< void gen_verilogsim_cell(LibertyAst *ast) ---- -> void gen_verilogsim_cell(std::shared_ptr ast) -525,526c523,524 -< LibertyAst *dir = find_non_null(child, "direction"); -< LibertyAst *func = child->find("function"); ---- -> auto dir = find_non_null(child, "direction"); -> auto func = child->find("function"); -652c650 -< void gen_verilogsim(LibertyAst *ast) ---- -> void gen_verilogsim(std::shared_ptr ast) diff --git a/libparse/libparse.h.patch b/libparse/libparse.h.patch deleted file mode 100644 index e799532..0000000 --- a/libparse/libparse.h.patch +++ /dev/null @@ -1,40 +0,0 @@ -1a2,20 -> Modifications performed by Efabless Corporation to use automatic memory -> management. License follows: -> -> Copyright (C) 2023 Efabless Corporation -> -> 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. -> */ -> -> /* -26a46 -> #include -34c54 -< std::vector children; ---- -> std::vector> children; -36c56 -< LibertyAst *find(std::string name); ---- -> std::shared_ptr find(std::string name); -46c66 -< LibertyAst *ast; ---- -> std::shared_ptr ast; -48d67 -< ~LibertyParser() { if (ast) delete ast; } -57c76 -< LibertyAst *parse(); ---- -> std::shared_ptr parse(); diff --git a/libparse/libparse.i b/libparse/libparse.i deleted file mode 100644 index ae93ac5..0000000 --- a/libparse/libparse.i +++ /dev/null @@ -1,35 +0,0 @@ -/* File: libparse.i */ -%module(package="libparse", moduleimport="import _libparse") libparse -%include -%include -%include - -%{ -#define SWIG_FILE_WITH_INIT -#define Py_LIMITED_API 0x030600F0 -#include -#include -#include "libparse.h" -#include "py_iostream.h" -%} - - -%shared_ptr(Yosys::LibertyAst) -%immutable Yosys::LibertyParser::f; -%template(VectorLibertyAstSP) std::vector< std::shared_ptr >; -%template(VectorStr) std::vector< std::string >; - -%typemap(in) std::istream& { - try { - $1 = PyIStream::make_from($input); - } catch (std::runtime_error &e) { - std::cerr << e.what() << std::endl; - SWIG_exception(SWIG_TypeError, e.what()); - } -} - -%typemap(freearg) std::istream& { - delete $1; -} - -%include "libparse.h" diff --git a/libparse/py_iostream.cpp b/libparse/py_iostream.cpp deleted file mode 100644 index 7378a60..0000000 --- a/libparse/py_iostream.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "py_iostream.h" - -PyIStream *PyIStream::make_from(PyObject *pyfile) -{ - if (pyfile == Py_None) { - throw std::runtime_error("None is not a valid input stream"); - } - auto fileno = PyObject_GetAttrString(pyfile, "fileno"); - if (!fileno) { // NOT NONE!! NULL!! - throw std::runtime_error("Passed object has no fileno() method"); - } - - auto fd = PyObject_AsFileDescriptor(pyfile); - if (fd == -1) { - throw std::runtime_error("Failed to get file descriptor"); - } - - auto f = fdopen(fd, "r"); - if (!f) { - throw std::runtime_error("Failed to open input stream"); - } - - return new PyIStream(new stdio_filebuf(f)); -} \ No newline at end of file diff --git a/libparse/py_iostream.h b/libparse/py_iostream.h deleted file mode 100644 index eb947a8..0000000 --- a/libparse/py_iostream.h +++ /dev/null @@ -1,19 +0,0 @@ -#define Py_LIMITED_API 0x030600F0 -#include "Python.h" -#include "stdio_filebuf.h" - -struct PyIStream : public std::istream { - PyIStream(stdio_filebuf *buffer) : std::istream(buffer), buffer(buffer) {} - - static PyIStream *make_from(PyObject *pyfile); - - ~PyIStream() - { - if (buffer) { - delete buffer; - } - } - -private: - stdio_filebuf *buffer = nullptr; -}; \ No newline at end of file diff --git a/libparse/stdio_filebuf.h b/libparse/stdio_filebuf.h index c12b35b..0a9fddd 100644 --- a/libparse/stdio_filebuf.h +++ b/libparse/stdio_filebuf.h @@ -1,8 +1,27 @@ +// Copyright 2025 Mohamed Gaber +// +// Adapted from libparse-python +// +// Copyright 2024 Efabless Corporation +// +// 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. + #include #include #include -// https://android.googlesource.com/platform/frameworks/native/+/refs/heads/main/services/vr/performanced +// From https://android.googlesource.com/platform/frameworks/native/+/571ae5f732/services/vr/performanced/stdio_filebuf.h +// // Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT // Copyright (c) 2016 Google, Inc. // @@ -167,4 +186,4 @@ template typename stdio_filebuf<_CharT>::int_type stdio_filebuf<_ __last_consumed_ = __c; __last_consumed_is_next_ = true; return __c; -} \ No newline at end of file +} diff --git a/libparse/wrapper.cpp b/libparse/wrapper.cpp new file mode 100644 index 0000000..c3650a2 --- /dev/null +++ b/libparse/wrapper.cpp @@ -0,0 +1,81 @@ +// Copyright 2025 Mohamed Gaber +// +// Partially adapted from libparse-python +// +// Copyright 2024 Efabless Corporation +// +// 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. + +#include +#include + +#include "libparse.h" +#include "stdio_filebuf.h" + +namespace py = pybind11; +using namespace Yosys; + +struct PyIStream : public std::istream { + PyIStream(stdio_filebuf *buffer) : std::istream(buffer), buffer_(buffer) {} + + static PyIStream *make_from(const py::object &pyfile) + { + if (pyfile == py::none()) { + throw std::runtime_error("None is not a valid input stream"); + } + if (!hasattr(pyfile, "fileno")) { + throw std::runtime_error("Passed object has no fileno() method"); + } + + auto fd = PyObject_AsFileDescriptor(pyfile.ptr()); + if (fd == -1) { + throw std::runtime_error("Failed to get file descriptor"); + } + + auto f = fdopen(fd, "r"); + if (!f) { + throw std::runtime_error("Failed to open input stream"); + } + + return new PyIStream(new stdio_filebuf(f)); + } + + ~PyIStream() + { + if (buffer_) { + delete buffer_; + } + } + + private: + stdio_filebuf *buffer_ = nullptr; +}; + +LibertyParser *from_file(const py::object &pyfile) +{ + auto cxx_stream = PyIStream::make_from(pyfile); + return new LibertyParser(*cxx_stream); +} + +PYBIND11_MODULE(_libparse, m) +{ + m.doc() = "libparse from yosys, native component"; + py::class_(m, "LibertyAst") + .def(py::init()) + .def_readonly("id", &LibertyAst::id) + .def_readonly("value", &LibertyAst::value) + .def_readonly("args", &LibertyAst::args) + .def_readonly("children", &LibertyAst::children) + .def("find", &LibertyAst::find); + py::class_(m, "LibertyParser").def(py::init(&from_file)).def_readonly("ast", &LibertyParser::ast); +} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..233c8fb --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = [ + "setuptools>=42", + "pybind11>=2.10.0", +] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index d05f57e..f014c63 100644 --- a/setup.py +++ b/setup.py @@ -1,72 +1,37 @@ #!/usr/bin/env python3 -import os import sys -import platform import subprocess -from setuptools import setup, Extension -from setuptools.command.build_py import build_py as _build_py +from pathlib import Path +from setuptools import setup +from pybind11.setup_helpers import Pybind11Extension, build_ext -module_name = "libparse" -__dir__ = os.path.dirname(os.path.abspath(__file__)) - -version = subprocess.check_output( - [ - sys.executable, - os.path.join( - os.path.abspath(__dir__), - module_name, - "__version__.py", - ), - ], +__file_dir__ = Path(__file__).absolute().parent +__version__ = subprocess.check_output( + [sys.executable, __file_dir__ / "libparse" / "__version__.py"], encoding="utf8", -) - -compiler_opts = ["-std=c++11", "-DFILTERLIB"] -if platform.system() == "Windows": - compiler_opts = ["/DFILTERLIB"] +).strip() -ext = Extension( - name="_libparse", - swig_opts=["-c++"], - sources=[ - "libparse/libparse.cpp", - "libparse/py_iostream.cpp", - "libparse/libparse.i", - ], - include_dirs=[ - "libparse", +ext = Pybind11Extension( + "_libparse", + [ + "libparse/wrapper.cpp", + "yosys/passes/techmap/libparse.cc", ], - extra_compile_args=compiler_opts, + include_dirs=["yosys/passes/techmap", "yosys"], + define_macros=[("FILTERLIB", "1"), ("_YOSYS_", "1")], ) - -class build_py(_build_py): - def run(self) -> None: - subprocess.check_call(["make", "patch"], cwd=__dir__) - self.run_command("build_ext") - return super().run() - - setup( - name=module_name, + name="lln-libparse", packages=["libparse"], - version=version, + version=__version__, description="Python wrapper around Yosys' libparse module", - long_description=open(os.path.join(__dir__, "Readme.md")).read(), + long_description=open(__file_dir__ / "Readme.md").read(), long_description_content_type="text/markdown", - author="Efabless Corporation and Contributors", - author_email="donn@efabless.com", + author="Mohamed Gaber", + author_email="me@donn.website", install_requires=["wheel"], - classifiers=[ - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3", - "Intended Audience :: Developers", - "Operating System :: POSIX :: Linux", - "Operating System :: MacOS :: MacOS X", - ], - python_requires=">3.6", + python_requires=">3.8", ext_modules=[ext], - cmdclass={ - "build_py": build_py, - }, + cmdclass={"build_ext": build_ext}, ) diff --git a/test/test.lib b/test/test.lib deleted file mode 100644 index d95b053..0000000 --- a/test/test.lib +++ /dev/null @@ -1,39 +0,0 @@ -library ("sky130_fd_sc_hd__tt_025C_1v80") { - define(def_sim_opt,library,string); - define(default_arc_mode,library,string); - define(default_constraint_arc_mode,library,string); - define(driver_model,library,string); - define(leakage_sim_opt,library,string); - define(min_pulse_width_mode,library,string); - define(simulator,library,string); - define(switching_power_split_model,library,string); - define(sim_opt,timing,string); - define(violation_delay_degrade_pct,timing,string); - technology("cmos"); - delay_model : "table_lookup"; - bus_naming_style : "%s[%d]"; - time_unit : "1ns"; - voltage_unit : "1V"; - leakage_power_unit : "1nW"; - current_unit : "1mA"; - pulling_resistance_unit : "1kohm"; - capacitive_load_unit(1.0000000000, "pf"); - revision : 1.0000000000; - default_cell_leakage_power : 0.0000000000; - default_fanout_load : 1.0000000000; - default_inout_pin_cap : 0.0000000000; - default_input_pin_cap : 0.0000000000; - default_max_transition : 1.5000000000; - default_output_pin_cap : 0.0000000000; - default_arc_mode : "worst_edges"; - default_constraint_arc_mode : "worst"; - default_leakage_power_density : 0.0000000000; - default_operating_conditions : "tt_025C_1v80"; - operating_conditions ("tt_025C_1v80") { - voltage : 1.8000000000; - process : 1.0000000000; - temperature : 25.000000000; - tree_type : "balanced_tree"; - } - /* Wire load tables */ -} \ No newline at end of file diff --git a/test/test.py b/test/test.py deleted file mode 100644 index e0bc714..0000000 --- a/test/test.py +++ /dev/null @@ -1,28 +0,0 @@ -import os -import sys - -__dir__ = os.path.dirname(__file__) -sys.path.insert(0, os.path.dirname(__dir__)) - -import libparse - -in_file = open(os.path.join(__dir__, "test.lib")) - -x = libparse.LibertyParser(in_file) -ast = x.ast -default_operating_conditions = None -operating_conditions_raw = {} -for child in ast.children: - if child.id == "default_operating_conditions": - default_operating_conditions = child - if child.id == "operating_conditions": - operating_conditions_raw[child.args[0]] = child - - -if default_operating_conditions is None: - if len(operating_conditions_raw) != 1: - print("nooo!!!!") - exit(-1) - default_operating_conditions = operating_conditions_raw.values()[0] - -print(default_operating_conditions.id, default_operating_conditions.value) From 79c033ef89da30fd8efedb88d8c05f51821c5509 Mon Sep 17 00:00:00 2001 From: Mohamed Gaber Date: Sat, 30 Aug 2025 04:52:59 +0300 Subject: [PATCH 2/6] fix: pypy incompatibility, windows 2019 dead --- .github/workflows/ci.yml | 24 +++++++++++++++++++----- libparse/wrapper.cpp | 23 +++++++---------------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b32af17..a76de52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,20 @@ +# Copyright (C) 2025 Mohamed Gaber +# +# Adapted from Yosys wheels +# +# Copyright (C) 2024 Efabless Corporation +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. name: Build Wheels for PyPI # Events that trigger workflow @@ -33,8 +50,8 @@ jobs: archs: "x86_64,arm64", }, { - name: "Windows Server 2019", - runner: "windows-2019", + name: "Windows Server 2022", + runner: "windows-2022", archs: "AMD64,ARM64", }, ] @@ -55,11 +72,8 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.21.1 env: - # * APIs not supported by PyPy - # * Musllinux disabled because it increases build time from 48m to ~3h CIBW_ARCHS: ${{ matrix.os.archs }} CIBW_BUILD_VERBOSITY: "1" - # manylinux2014 (default) does not have a modern enough C++ compiler for Yosys CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 - uses: actions/upload-artifact@v4 diff --git a/libparse/wrapper.cpp b/libparse/wrapper.cpp index c3650a2..fcc2a47 100644 --- a/libparse/wrapper.cpp +++ b/libparse/wrapper.cpp @@ -26,18 +26,16 @@ namespace py = pybind11; using namespace Yosys; struct PyIStream : public std::istream { - PyIStream(stdio_filebuf *buffer) : std::istream(buffer), buffer_(buffer) {} + PyIStream(FILE *f) : std::istream(&buffer_), buffer_(f) {} static PyIStream *make_from(const py::object &pyfile) { - if (pyfile == py::none()) { + if (pyfile.is(py::none())) { throw std::runtime_error("None is not a valid input stream"); } - if (!hasattr(pyfile, "fileno")) { - throw std::runtime_error("Passed object has no fileno() method"); - } - auto fd = PyObject_AsFileDescriptor(pyfile.ptr()); + auto fd_attr = pyfile.attr("fileno"); + auto fd = fd_attr.cast(); if (fd == -1) { throw std::runtime_error("Failed to get file descriptor"); } @@ -47,18 +45,11 @@ struct PyIStream : public std::istream { throw std::runtime_error("Failed to open input stream"); } - return new PyIStream(new stdio_filebuf(f)); - } - - ~PyIStream() - { - if (buffer_) { - delete buffer_; - } + return new PyIStream(f); } - private: - stdio_filebuf *buffer_ = nullptr; + private: + stdio_filebuf buffer_; }; LibertyParser *from_file(const py::object &pyfile) From 660b27240aea10a46a49ee1ae809997f9846db5f Mon Sep 17 00:00:00 2001 From: Mohamed Gaber Date: Sat, 30 Aug 2025 06:01:09 +0300 Subject: [PATCH 3/6] add test, fix yosys version, match yosys version --- .github/workflows/ci.yml | 2 + Readme.md | 3 + default.nix | 22 +- libparse/__init__.py | 15 +- libparse/__main__.py | 22 + libparse/__version__.py | 2 +- libparse/wrapper.cpp | 24 +- pyproject.toml | 3 + setup.py | 2 +- test/.gitignore | 2 + test/conftest.py | 6 + test/defgroup.lib | 85 +++ test/defgroup.lib.ref | 1 + test/example.2clibnam.lib | 40 ++ test/example.2clibnam.lib.ref | 1 + test/example.2libnam.lib | 40 ++ test/example.2libnam.lib.ref | 1 + test/example.2pin.lib | 53 ++ test/example.2pin.lib.ref | 1 + test/example.access.lib | 14 + test/example.access.lib.ref | 1 + test/example.badcurly.lib | 48 ++ test/example.baddir.lib | 40 ++ test/example.baddir.lib.ref | 1 + test/example.badiface.lib | 64 ++ test/example.badiface.lib.ref | 1 + test/example.badmem.lib | 63 ++ test/example.badmem.lib.ref | 1 + test/example.badmem2.lib | 65 ++ test/example.badmem2.lib.ref | 1 + test/example.badmod.lib | 69 ++ test/example.badmod.lib.ref | 1 + test/example.badmod2.lib | 69 ++ test/example.badmod2.lib.ref | 1 + test/example.badtech.lib | 40 ++ test/example.badtech.lib.ref | 1 + test/example.badtim.lib | 80 +++ test/example.badtim.lib.ref | 1 + test/example.badval.lib | 59 ++ test/example.badval.lib.ref | 1 + test/example.badval2.lib | 59 ++ test/example.badval2.lib.ref | 1 + test/example.badval3.lib | 63 ++ test/example.badval3.lib.ref | 1 + test/example.buspindir.lib | 71 ++ test/example.buspindir.lib.ref | 1 + test/example.ccs.lib | 445 +++++++++++++ test/example.ccs.lib.ref | 1 + test/example.closesemi.lib | 40 ++ test/example.closesemi.lib.ref | 1 + test/example.coloncell.lib | 5 + test/example.colontempl.lib | 19 + test/example.driver.lib | 60 ++ test/example.driver.lib.ref | 1 + test/example.dup1.lib | 8 + test/example.dup1.lib.ref | 1 + test/example.dup2.lib | 8 + test/example.dup2.lib.ref | 1 + test/example.ffbank.lib | 85 +++ test/example.ffbank.lib.ref | 1 + test/example.fpga.lib | 42 ++ test/example.fpga.lib.ref | 1 + test/example.icg.lib | 1109 ++++++++++++++++++++++++++++++++ test/example.icg.lib.ref | 1 + test/example.include.lib | 61 ++ test/example.include.lib.ref | 1 + test/example.lib | 59 ++ test/example.lib.ref | 1 + test/example.lut.lib | 88 +++ test/example.lut.lib.ref | 1 + test/example.lut2.lib | 246 +++++++ test/example.lut2.lib.ref | 1 + test/example.nolibnam.lib | 40 ++ test/example.nolibnam.lib.ref | 1 + test/example.numident.lib | 4 + test/example.numident.lib.ref | 1 + test/example.pin.lib | 6 + test/example.pin.lib.ref | 1 + test/example.powerlut.lib | 31 + test/example.powerlut.lib.ref | 1 + test/example.preclear.lib | 67 ++ test/example.preclear.lib.ref | 1 + test/example.preclear2.lib | 68 ++ test/example.preclear2.lib.ref | 1 + test/example.rangerr.lib | 41 ++ test/example.rangerr.lib.ref | 1 + test/example.sppm.lib | 56 ++ test/example.sppm.lib.ref | 1 + test/example.syntaxerr.lib | 3 + test/example.var.lib | 10 + test/generate_ref.py | 17 + test/inverter_nldm.lib | 214 ++++++ test/inverter_nldm.lib.ref | 1 + test/inverter_spdm.lib | 484 ++++++++++++++ test/inverter_spdm.lib.ref | 1 + test/my_group.lib | 46 ++ test/my_group.lib.ref | 1 + test/newstuff.lib | 39 ++ test/newstuff.lib.ref | 1 + test/si2testcase.lib | 25 + test/si2testcase.lib.ref | 1 + test/t2.lib | 6 + test/t2.lib.ref | 1 + test/t28.lib | 11 + test/t28.lib.ref | 1 + test/test_parse.py | 18 + test/ugroup.lib | 55 ++ test/ugroup.lib.ref | 1 + test/ugroup_bad.lib | 55 ++ test/ugroup_bad.lib.ref | 1 + yosys | 2 +- 111 files changed, 4735 insertions(+), 9 deletions(-) create mode 100644 libparse/__main__.py create mode 100644 test/.gitignore create mode 100644 test/conftest.py create mode 100644 test/defgroup.lib create mode 100644 test/defgroup.lib.ref create mode 100644 test/example.2clibnam.lib create mode 100644 test/example.2clibnam.lib.ref create mode 100644 test/example.2libnam.lib create mode 100644 test/example.2libnam.lib.ref create mode 100644 test/example.2pin.lib create mode 100644 test/example.2pin.lib.ref create mode 100644 test/example.access.lib create mode 100644 test/example.access.lib.ref create mode 100644 test/example.badcurly.lib create mode 100644 test/example.baddir.lib create mode 100644 test/example.baddir.lib.ref create mode 100644 test/example.badiface.lib create mode 100644 test/example.badiface.lib.ref create mode 100644 test/example.badmem.lib create mode 100644 test/example.badmem.lib.ref create mode 100644 test/example.badmem2.lib create mode 100644 test/example.badmem2.lib.ref create mode 100644 test/example.badmod.lib create mode 100644 test/example.badmod.lib.ref create mode 100644 test/example.badmod2.lib create mode 100644 test/example.badmod2.lib.ref create mode 100644 test/example.badtech.lib create mode 100644 test/example.badtech.lib.ref create mode 100644 test/example.badtim.lib create mode 100644 test/example.badtim.lib.ref create mode 100644 test/example.badval.lib create mode 100644 test/example.badval.lib.ref create mode 100644 test/example.badval2.lib create mode 100644 test/example.badval2.lib.ref create mode 100644 test/example.badval3.lib create mode 100644 test/example.badval3.lib.ref create mode 100644 test/example.buspindir.lib create mode 100644 test/example.buspindir.lib.ref create mode 100644 test/example.ccs.lib create mode 100644 test/example.ccs.lib.ref create mode 100644 test/example.closesemi.lib create mode 100644 test/example.closesemi.lib.ref create mode 100644 test/example.coloncell.lib create mode 100644 test/example.colontempl.lib create mode 100644 test/example.driver.lib create mode 100644 test/example.driver.lib.ref create mode 100644 test/example.dup1.lib create mode 100644 test/example.dup1.lib.ref create mode 100644 test/example.dup2.lib create mode 100644 test/example.dup2.lib.ref create mode 100644 test/example.ffbank.lib create mode 100644 test/example.ffbank.lib.ref create mode 100644 test/example.fpga.lib create mode 100644 test/example.fpga.lib.ref create mode 100644 test/example.icg.lib create mode 100644 test/example.icg.lib.ref create mode 100644 test/example.include.lib create mode 100644 test/example.include.lib.ref create mode 100644 test/example.lib create mode 100644 test/example.lib.ref create mode 100644 test/example.lut.lib create mode 100644 test/example.lut.lib.ref create mode 100644 test/example.lut2.lib create mode 100644 test/example.lut2.lib.ref create mode 100644 test/example.nolibnam.lib create mode 100644 test/example.nolibnam.lib.ref create mode 100644 test/example.numident.lib create mode 100644 test/example.numident.lib.ref create mode 100644 test/example.pin.lib create mode 100644 test/example.pin.lib.ref create mode 100644 test/example.powerlut.lib create mode 100644 test/example.powerlut.lib.ref create mode 100644 test/example.preclear.lib create mode 100644 test/example.preclear.lib.ref create mode 100644 test/example.preclear2.lib create mode 100644 test/example.preclear2.lib.ref create mode 100644 test/example.rangerr.lib create mode 100644 test/example.rangerr.lib.ref create mode 100644 test/example.sppm.lib create mode 100644 test/example.sppm.lib.ref create mode 100644 test/example.syntaxerr.lib create mode 100644 test/example.var.lib create mode 100644 test/generate_ref.py create mode 100644 test/inverter_nldm.lib create mode 100644 test/inverter_nldm.lib.ref create mode 100644 test/inverter_spdm.lib create mode 100644 test/inverter_spdm.lib.ref create mode 100644 test/my_group.lib create mode 100644 test/my_group.lib.ref create mode 100644 test/newstuff.lib create mode 100644 test/newstuff.lib.ref create mode 100644 test/si2testcase.lib create mode 100644 test/si2testcase.lib.ref create mode 100644 test/t2.lib create mode 100644 test/t2.lib.ref create mode 100644 test/t28.lib create mode 100644 test/t28.lib.ref create mode 100644 test/test_parse.py create mode 100644 test/ugroup.lib create mode 100644 test/ugroup.lib.ref create mode 100644 test/ugroup_bad.lib create mode 100644 test/ugroup_bad.lib.ref diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a76de52..4310e31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,6 +63,8 @@ jobs: fetch-depth: 0 submodules: true persist-credentials: false + - run: | + perl -i -pe 'print "__attribute__((weak)) " if /LibertyParser::error/' yosys/passes/techmap/libparse.cc - uses: actions/setup-python@v5 - if: ${{ matrix.os.family == 'macos' && matrix.os.archs == 'arm64' }} name: "[macOS/arm64] Install Python 3.8 (see: https://cibuildwheel.pypa.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64)" diff --git a/Readme.md b/Readme.md index d5bd515..b6bca54 100644 --- a/Readme.md +++ b/Readme.md @@ -76,3 +76,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` > The `CREDITS.TXT` in question could not be located. + +Test suite from [liberty2json](https://github.com/silimate/liberty2json) by +Silimate. diff --git a/default.nix b/default.nix index 23dee73..5b33452 100644 --- a/default.nix +++ b/default.nix @@ -4,6 +4,8 @@ buildPythonPackage, pytest, pybind11, + pytestCheckHook, + perl, }: let version_file = builtins.readFile ./libparse/__version__.py; version_list = builtins.match ''.+''\n__version__ = "([^"]+)"''\n.+''$'' version_file; @@ -14,17 +16,31 @@ in inherit version; inherit src; + + postPatch = '' + perl -i -pe 'print "__attribute__((weak)) " if /LibertyParser::error/' yosys/passes/techmap/libparse.cc + ''; + + nativeBuildInputs = [ + perl + ]; buildInputs = [ pybind11 ]; pythonImportsCheck = [ "libparse" ]; + + doCheck = true; + + nativeCheckInputs = [ + pytestCheckHook + ]; - meta = with lib; { + meta = { description = "Python wrapper around Yosys's libparse"; - license = with licenses; [asl20]; + license = with lib.licenses; [asl20]; homepage = "https://github.com/librelane/libparse-python"; - platforms = platforms.linux ++ platforms.darwin; + platforms = with lib.platforms; linux ++ darwin; }; } diff --git a/libparse/__init__.py b/libparse/__init__.py index 7006b90..c1b8007 100644 --- a/libparse/__init__.py +++ b/libparse/__init__.py @@ -1,2 +1,15 @@ -from _libparse import * +from _libparse import LibertyAst, LibertyParser from .__version__ import __version__ + +def __LibertyAst__to_dict(self): + result = {} + result["id"] = self.id + if len(self.args): + result["args"] = self.args + if self.value != "": + result["value"] = self.value + if len(self.children): + result["children"] = [child.to_dict() for child in self.children] + return result + +LibertyAst.to_dict = __LibertyAst__to_dict diff --git a/libparse/__main__.py b/libparse/__main__.py new file mode 100644 index 0000000..a52623b --- /dev/null +++ b/libparse/__main__.py @@ -0,0 +1,22 @@ + +import sys +import json +from argparse import ArgumentParser + +from . import LibertyParser, __version__ + +def main(argv): + p = ArgumentParser("libparse") + p.add_argument("-v", "--version", action='version', version=f'%(prog)s {__version__}') + p.add_argument("file", nargs=1) + ns = p.parse_args(argv) + f = open(ns.file[0], "r") + try: + parsed = LibertyParser(f) + except RuntimeError as e: + print(e, file=sys.stderr) + exit(1) + print(json.dumps(parsed.ast.to_dict())) + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/libparse/__version__.py b/libparse/__version__.py index e6923f0..6a626f2 100644 --- a/libparse/__version__.py +++ b/libparse/__version__.py @@ -16,7 +16,7 @@ # 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. -__version__ = "1.0.0" +__version__ = "0.56.0" if __name__ == "__main__": print(__version__, end="") diff --git a/libparse/wrapper.cpp b/libparse/wrapper.cpp index fcc2a47..bf0082d 100644 --- a/libparse/wrapper.cpp +++ b/libparse/wrapper.cpp @@ -15,16 +15,34 @@ // 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. +#define private public +#include "libparse.h" +#undef private #include #include -#include "libparse.h" #include "stdio_filebuf.h" namespace py = pybind11; using namespace Yosys; +void LibertyParser::error() const +{ + std::ostringstream oss; + oss << "Syntax error in liberty file on line " << line << ".\n"; + throw std::runtime_error(oss.str()); +} + +void LibertyParser::error(const std::string &str) const +{ + std::stringstream oss; + oss << "Syntax error in liberty file on line " << line << ".\n"; + oss << " " << str << "\n"; + throw std::runtime_error(oss.str()); +} + + struct PyIStream : public std::istream { PyIStream(FILE *f) : std::istream(&buffer_), buffer_(f) {} @@ -35,7 +53,8 @@ struct PyIStream : public std::istream { } auto fd_attr = pyfile.attr("fileno"); - auto fd = fd_attr.cast(); + auto fd_obj = fd_attr(); + auto fd = fd_obj.cast(); if (fd == -1) { throw std::runtime_error("Failed to get file descriptor"); } @@ -58,6 +77,7 @@ LibertyParser *from_file(const py::object &pyfile) return new LibertyParser(*cxx_stream); } + PYBIND11_MODULE(_libparse, m) { m.doc() = "libparse from yosys, native component"; diff --git a/pyproject.toml b/pyproject.toml index 233c8fb..6f6db0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,3 +4,6 @@ requires = [ "pybind11>=2.10.0", ] build-backend = "setuptools.build_meta" + +[tool.pytest.ini_options] +testpaths = ["test"] diff --git a/setup.py b/setup.py index f014c63..aabf76a 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ author="Mohamed Gaber", author_email="me@donn.website", install_requires=["wheel"], - python_requires=">3.8", + python_requires=">=3.8", ext_modules=[ext], cmdclass={"build_ext": build_ext}, ) diff --git a/test/.gitignore b/test/.gitignore new file mode 100644 index 0000000..5d393ea --- /dev/null +++ b/test/.gitignore @@ -0,0 +1,2 @@ +*.diff.json +*.log diff --git a/test/conftest.py b/test/conftest.py new file mode 100644 index 0000000..e0c039a --- /dev/null +++ b/test/conftest.py @@ -0,0 +1,6 @@ +import pytest +from pathlib import Path + +def pytest_configure(): + pytest.test_root = Path(__file__).absolute().parent + pytest.parsing_tests = pytest.test_root.glob("*.lib") diff --git a/test/defgroup.lib b/test/defgroup.lib new file mode 100644 index 0000000..48edea5 --- /dev/null +++ b/test/defgroup.lib @@ -0,0 +1,85 @@ + +library (test1) { + + define_group(sec_acore_internal_power,pin); + + define(sec_acore_rise_power, sec_acore_internal_power, float); + + define(sec_acore_fall_power, sec_acore_internal_power, float); + + define(sec_acore_when, sec_acore_internal_power, string); + + + cell (test1) { + + pin (TST) { + + direction : "input"; + + capacitance : 0.1; + + sec_acore_internal_power (TST) { + + sec_acore_rise_power : 1000; + + sec_acore_fall_power : 0; + + sec_acore_when : "CNT' "; + + } + + sec_acore_internal_power (TST) { + + sec_acore_rise_power : 1000.00; + + sec_acore_fall_power : 0.00; + + sec_acore_when : "CNT "; + + } + + } + + pin (TST2) { + + direction : "input"; + + capacitance : 0.1; + + sec_acore_internal_power (TST) { + + sec_acore_rise_power : 1000.00; + + sec_acore_fall_power : 0.00; + + sec_acore_when : "CNT' "; + + } + + sec_acore_internal_power (TST1) { + + sec_acore_rise_power : 1000.00; + + + + sec_acore_fall_power : 0.00; + + sec_acore_when : "CNT "; + + } + + } + + pin (TST3) { + + direction : "input"; + + capacitance : 0.1; + + sec_acore_internal_power () { + + sec_acore_rise_power : 1000; + } + } + } +} diff --git a/test/defgroup.lib.ref b/test/defgroup.lib.ref new file mode 100644 index 0000000..96b7256 --- /dev/null +++ b/test/defgroup.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["test1"], "children": [{"id": "define_group", "args": ["sec_acore_internal_power", "pin"]}, {"id": "define", "args": ["sec_acore_rise_power", "sec_acore_internal_power", "float"]}, {"id": "define", "args": ["sec_acore_fall_power", "sec_acore_internal_power", "float"]}, {"id": "define", "args": ["sec_acore_when", "sec_acore_internal_power", "string"]}, {"id": "cell", "args": ["test1"], "children": [{"id": "pin", "args": ["TST"], "children": [{"id": "direction", "value": "\"input\""}, {"id": "capacitance", "value": "0.1"}, {"id": "sec_acore_internal_power", "args": ["TST"], "children": [{"id": "sec_acore_rise_power", "value": "1000"}, {"id": "sec_acore_fall_power", "value": "0"}, {"id": "sec_acore_when", "value": "\"CNT' \""}]}, {"id": "sec_acore_internal_power", "args": ["TST"], "children": [{"id": "sec_acore_rise_power", "value": "1000.00"}, {"id": "sec_acore_fall_power", "value": "0.00"}, {"id": "sec_acore_when", "value": "\"CNT \""}]}]}, {"id": "pin", "args": ["TST2"], "children": [{"id": "direction", "value": "\"input\""}, {"id": "capacitance", "value": "0.1"}, {"id": "sec_acore_internal_power", "args": ["TST"], "children": [{"id": "sec_acore_rise_power", "value": "1000.00"}, {"id": "sec_acore_fall_power", "value": "0.00"}, {"id": "sec_acore_when", "value": "\"CNT' \""}]}, {"id": "sec_acore_internal_power", "args": ["TST1"], "children": [{"id": "sec_acore_rise_power", "value": "1000.00"}, {"id": "sec_acore_fall_power", "value": "0.00"}, {"id": "sec_acore_when", "value": "\"CNT \""}]}]}, {"id": "pin", "args": ["TST3"], "children": [{"id": "direction", "value": "\"input\""}, {"id": "capacitance", "value": "0.1"}, {"id": "sec_acore_internal_power", "children": [{"id": "sec_acore_rise_power", "value": "1000"}]}]}]}]} \ No newline at end of file diff --git a/test/example.2clibnam.lib b/test/example.2clibnam.lib new file mode 100644 index 0000000..7943f58 --- /dev/null +++ b/test/example.2clibnam.lib @@ -0,0 +1,40 @@ +library(a,b) { + technology(cmos); + + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.2clibnam.lib.ref b/test/example.2clibnam.lib.ref new file mode 100644 index 0000000..4adc32f --- /dev/null +++ b/test/example.2clibnam.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["a", "b"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.2libnam.lib b/test/example.2libnam.lib new file mode 100644 index 0000000..7a8f7e9 --- /dev/null +++ b/test/example.2libnam.lib @@ -0,0 +1,40 @@ +library(a b) { + technology(cmos); + + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.2libnam.lib.ref b/test/example.2libnam.lib.ref new file mode 100644 index 0000000..4adc32f --- /dev/null +++ b/test/example.2libnam.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["a", "b"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.2pin.lib b/test/example.2pin.lib new file mode 100644 index 0000000..9024829 --- /dev/null +++ b/test/example.2pin.lib @@ -0,0 +1,53 @@ +/* this is a general sort of header comment */ + +library(example) { + technology(cmos); + /* this is a comment */ + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + } + } + } + /* AND THIS is a multiline sort of general + comment aimed at the OR2 cell */ + cell(OR2){ + /* this comment should be attached to the area attr */ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(A, B){ + direction : input; + capacitance : 1; + } + /* and this comment precedes the pin(Z) attr + at this point in time !!! */ + pin(Z){ + direction : output; + /* and this comment should precede the function attr */ + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + /* watch out for that fall_resistance!!!! */ + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.2pin.lib.ref b/test/example.2pin.lib.ref new file mode 100644 index 0000000..10228dc --- /dev/null +++ b/test/example.2pin.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.access.lib b/test/example.access.lib new file mode 100644 index 0000000..e62df21 --- /dev/null +++ b/test/example.access.lib @@ -0,0 +1,14 @@ +library(temp) { + type (bus4) { + bit_width : 4; + bit_from : 0 ; + bit_to : 3 ; + } + cell(ex) { + bus (A) { + bus_type : bus4 ; + pin (A[3]) { + } + } + } +} diff --git a/test/example.access.lib.ref b/test/example.access.lib.ref new file mode 100644 index 0000000..229929a --- /dev/null +++ b/test/example.access.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["temp"], "children": [{"id": "type", "args": ["bus4"], "children": [{"id": "bit_width", "value": "4"}, {"id": "bit_from", "value": "0"}, {"id": "bit_to", "value": "3"}]}, {"id": "cell", "args": ["ex"], "children": [{"id": "bus", "args": ["A"], "children": [{"id": "bus_type", "value": "bus4"}, {"id": "pin", "args": ["A"]}]}]}]} \ No newline at end of file diff --git a/test/example.badcurly.lib b/test/example.badcurly.lib new file mode 100644 index 0000000..b710306 --- /dev/null +++ b/test/example.badcurly.lib @@ -0,0 +1,48 @@ +library(example) { + technology(cmos); + + cell(AN2) + { + area : 2; + pin(A, B) + { + direction : input; + capacitance : 1; + } + pin(Z) + { + direction : output; + function : "A ^ B"; + timing () + { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + } + } + } + cell(OR2) + { + area : 2; + pin(A, B) + { + direction : input; + capacitance : 1; + } + pin(Z) + { + direction : output; + function : "A + B"; + timing () + { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.baddir.lib b/test/example.baddir.lib new file mode 100644 index 0000000..2274d0a --- /dev/null +++ b/test/example.baddir.lib @@ -0,0 +1,40 @@ +library(a) { + technology(cmos); + + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : inoutput; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.baddir.lib.ref b/test/example.baddir.lib.ref new file mode 100644 index 0000000..f269d04 --- /dev/null +++ b/test/example.baddir.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["a"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "inoutput"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.badiface.lib b/test/example.badiface.lib new file mode 100644 index 0000000..5b20cd6 --- /dev/null +++ b/test/example.badiface.lib @@ -0,0 +1,64 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + lu_table_template(t112){ + variable_1 : total_output_net_capacitance; + index_1 ("1.00, 2.00, 3.00, 4.00"); + } + cell(AN2){ + area : 2; + interface_timing : true; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.052600, 0.077300, 0.113200",\ + " 0.102200, 0.107300, 0.115700, 0.135200, 0.123300",\ + " 0.223900, 0.225000, 0.222300, 0.252900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.162500, 0.127890"); + } + fall_transition(t112){ + values("0.2 0.4 0.6 0.8") ; + } + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.badiface.lib.ref b/test/example.badiface.lib.ref new file mode 100644 index 0000000..621cfeb --- /dev/null +++ b/test/example.badiface.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "lu_table_template", "args": ["t112"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "interface_timing", "value": "true"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.052600, 0.077300, 0.113200\"", "\" 0.102200, 0.107300, 0.115700, 0.135200, 0.123300\"", "\" 0.223900, 0.225000, 0.222300, 0.252900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.162500, 0.127890\""]}]}, {"id": "fall_transition", "args": ["t112"], "children": [{"id": "values", "args": ["\"0.2 0.4 0.6 0.8\""]}]}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.badmem.lib b/test/example.badmem.lib new file mode 100644 index 0000000..c843bc6 --- /dev/null +++ b/test/example.badmem.lib @@ -0,0 +1,63 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + bundle( bun1 ) { + clock : true; + members(X); + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(scalar){ + values("0.2") ; + } + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.badmem.lib.ref b/test/example.badmem.lib.ref new file mode 100644 index 0000000..c1c6595 --- /dev/null +++ b/test/example.badmem.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "bundle", "args": ["bun1"], "children": [{"id": "clock", "value": "true"}, {"id": "members", "args": ["X"]}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.badmem2.lib b/test/example.badmem2.lib new file mode 100644 index 0000000..1646ce1 --- /dev/null +++ b/test/example.badmem2.lib @@ -0,0 +1,65 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + bundle( bun1 ) { + pin(Q) { + direction : output; + } + members(X); + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(scalar){ + values(0.2) ; + } + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.badmem2.lib.ref b/test/example.badmem2.lib.ref new file mode 100644 index 0000000..a66e54e --- /dev/null +++ b/test/example.badmem2.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "bundle", "args": ["bun1"], "children": [{"id": "pin", "args": ["Q"], "children": [{"id": "direction", "value": "output"}]}, {"id": "members", "args": ["X"]}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["0.2"]}]}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.badmod.lib b/test/example.badmod.lib new file mode 100644 index 0000000..5354fbb --- /dev/null +++ b/test/example.badmod.lib @@ -0,0 +1,69 @@ +library(example) { + delay_model : lookup_table; + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + bundle( bun1 ) { + members(X); + clock : true; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(scalar){ + values("0.2") ; + } + } + } + ff( ff1, ff2 ) { + preset : "wow"; + clear : "gee"; + clear_preset_var1 : H; + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.badmod.lib.ref b/test/example.badmod.lib.ref new file mode 100644 index 0000000..7e95065 --- /dev/null +++ b/test/example.badmod.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "delay_model", "value": "lookup_table"}, {"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "bundle", "args": ["bun1"], "children": [{"id": "members", "args": ["X"]}, {"id": "clock", "value": "true"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}]}]}, {"id": "ff", "args": ["ff1", "ff2"], "children": [{"id": "preset", "value": "\"wow\""}, {"id": "clear", "value": "\"gee\""}, {"id": "clear_preset_var1", "value": "H"}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.badmod2.lib b/test/example.badmod2.lib new file mode 100644 index 0000000..be3c32d --- /dev/null +++ b/test/example.badmod2.lib @@ -0,0 +1,69 @@ +library(example) { + delay_model(lookup_table); + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + bundle( bun1 ) { + members(X); + clock : true; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(scalar){ + values("0.2") ; + } + } + } + ff( ff1, ff2 ) { + preset : "wow"; + clear : "gee"; + clear_preset_var1 : H; + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.badmod2.lib.ref b/test/example.badmod2.lib.ref new file mode 100644 index 0000000..12faefd --- /dev/null +++ b/test/example.badmod2.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "delay_model", "args": ["lookup_table"]}, {"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "bundle", "args": ["bun1"], "children": [{"id": "members", "args": ["X"]}, {"id": "clock", "value": "true"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}]}]}, {"id": "ff", "args": ["ff1", "ff2"], "children": [{"id": "preset", "value": "\"wow\""}, {"id": "clear", "value": "\"gee\""}, {"id": "clear_preset_var1", "value": "H"}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.badtech.lib b/test/example.badtech.lib new file mode 100644 index 0000000..7face8a --- /dev/null +++ b/test/example.badtech.lib @@ -0,0 +1,40 @@ +library(example) { + technology(bmos); + + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.badtech.lib.ref b/test/example.badtech.lib.ref new file mode 100644 index 0000000..615e5fc --- /dev/null +++ b/test/example.badtech.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["bmos"]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.badtim.lib b/test/example.badtim.lib new file mode 100644 index 0000000..52e6626 --- /dev/null +++ b/test/example.badtim.lib @@ -0,0 +1,80 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + bundle( bun1 ) { + members(X); + clock : true; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + cell_rise(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + cell_fall(scalar){ + values("0.2") ; + } + rise_propagation(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_propagation(scalar){ + values("0.2") ; + } + } + } + ff( ff1, ff2 ) { + preset : "wow"; + clear : "gee"; + clear_preset_var1 : H; + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.badtim.lib.ref b/test/example.badtim.lib.ref new file mode 100644 index 0000000..afbd7b8 --- /dev/null +++ b/test/example.badtim.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "bundle", "args": ["bun1"], "children": [{"id": "members", "args": ["X"]}, {"id": "clock", "value": "true"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "cell_rise", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "cell_fall", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}, {"id": "rise_propagation", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_propagation", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}]}]}, {"id": "ff", "args": ["ff1", "ff2"], "children": [{"id": "preset", "value": "\"wow\""}, {"id": "clear", "value": "\"gee\""}, {"id": "clear_preset_var1", "value": "H"}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.badval.lib b/test/example.badval.lib new file mode 100644 index 0000000..44d170e --- /dev/null +++ b/test/example.badval.lib @@ -0,0 +1,59 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.052600, 0.077300, 0.113200",\ + " 0.102200, 0.107300, 0.115700, 0.135200, 0.123300",\ + " 0.223900, 0.225000, 0.222300, 0.252900, 0.301700 0.12789",\ + " 1.159500, 1.159300, 1.160100, 1.162500"); + } + fall_transition(scalar){ + values("0.2") ; + } + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.badval.lib.ref b/test/example.badval.lib.ref new file mode 100644 index 0000000..af93fb4 --- /dev/null +++ b/test/example.badval.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.052600, 0.077300, 0.113200\"", "\" 0.102200, 0.107300, 0.115700, 0.135200, 0.123300\"", "\" 0.223900, 0.225000, 0.222300, 0.252900, 0.301700 0.12789\"", "\" 1.159500, 1.159300, 1.160100, 1.162500\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.badval2.lib b/test/example.badval2.lib new file mode 100644 index 0000000..50482d4 --- /dev/null +++ b/test/example.badval2.lib @@ -0,0 +1,59 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.052600, 0.077300, 0.113200",\ + " 0.102200, 0.107300, 0.115700, 0.135200, 0.123300",\ + " 0.223900, 0.225000, 0.222300, 0.252900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.162500, 0.127890"); + } + fall_transition(scalar){ + values("0.2, 0.4") ; + } + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.badval2.lib.ref b/test/example.badval2.lib.ref new file mode 100644 index 0000000..ec3226e --- /dev/null +++ b/test/example.badval2.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.052600, 0.077300, 0.113200\"", "\" 0.102200, 0.107300, 0.115700, 0.135200, 0.123300\"", "\" 0.223900, 0.225000, 0.222300, 0.252900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.162500, 0.127890\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2, 0.4\""]}]}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.badval3.lib b/test/example.badval3.lib new file mode 100644 index 0000000..4cc53d1 --- /dev/null +++ b/test/example.badval3.lib @@ -0,0 +1,63 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + lu_table_template(t112){ + variable_1 : total_output_net_capacitance; + index_1 ("1.00, 2.00, 3.00, 4.00"); + } + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.052600, 0.077300, 0.113200",\ + " 0.102200, 0.107300, 0.115700, 0.135200, 0.123300",\ + " 0.223900, 0.225000, 0.222300, 0.252900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.162500, 0.127890"); + } + fall_transition(t112){ + values("0.2, 0.4") ; + } + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.badval3.lib.ref b/test/example.badval3.lib.ref new file mode 100644 index 0000000..86a6b7e --- /dev/null +++ b/test/example.badval3.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "lu_table_template", "args": ["t112"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.052600, 0.077300, 0.113200\"", "\" 0.102200, 0.107300, 0.115700, 0.135200, 0.123300\"", "\" 0.223900, 0.225000, 0.222300, 0.252900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.162500, 0.127890\""]}]}, {"id": "fall_transition", "args": ["t112"], "children": [{"id": "values", "args": ["\"0.2, 0.4\""]}]}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.buspindir.lib b/test/example.buspindir.lib new file mode 100644 index 0000000..e62d516 --- /dev/null +++ b/test/example.buspindir.lib @@ -0,0 +1,71 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(scalar){ + values("0.2") ; + } + } + } + bundle( bun1 ) { + direction : input; + pin( p1 ) { + direction : output; + } + } + bus( bun1 ) { + direction : input; + pin( p1 ) { + direction : output; + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.buspindir.lib.ref b/test/example.buspindir.lib.ref new file mode 100644 index 0000000..0b10a1d --- /dev/null +++ b/test/example.buspindir.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}]}]}, {"id": "bundle", "args": ["bun1"], "children": [{"id": "direction", "value": "input"}, {"id": "pin", "args": ["p1"], "children": [{"id": "direction", "value": "output"}]}]}, {"id": "bus", "args": ["bun1"], "children": [{"id": "direction", "value": "input"}, {"id": "pin", "args": ["p1"], "children": [{"id": "direction", "value": "output"}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.ccs.lib b/test/example.ccs.lib new file mode 100644 index 0000000..f5fd4a5 --- /dev/null +++ b/test/example.ccs.lib @@ -0,0 +1,445 @@ +library(example_ccs_1) { + delay_model : table_lookup; + in_place_swap_mode : match_footprint; + library_features(report_delay_calculation); + + revision : 1.0; + date : "Thu Jul 6 19:44:59 2005"; + + /* unit attributes */ + time_unit : "1ns"; + voltage_unit : "1V"; + current_unit : "1mA"; + pulling_resistance_unit : "1kohm"; + leakage_power_unit : "1pW"; + capacitive_load_unit (1.0,pf); + + /* operation conditions */ + nom_process : 1; + nom_temperature : 25; + nom_voltage : 1.7; + operating_conditions(opcond1) { + process : 1; + temperature : 25; + voltage : 1.72; + tree_type : balanced_tree + } + default_operating_conditions : opcond1; + +/* threshold definitions */ + slew_lower_threshold_pct_fall : 34.0; + slew_upper_threshold_pct_fall : 72.0; + slew_lower_threshold_pct_rise : 34.0; + slew_upper_threshold_pct_rise : 72.0; + input_threshold_pct_fall : 50.0; + input_threshold_pct_rise : 50.0; + output_threshold_pct_fall : 50.0; + output_threshold_pct_rise : 50.0; + slew_derate_from_library : 0.5; + + /* default attributes */ + default_leakage_power_density : 0.1; + default_cell_leakage_power : 0.1; + default_fanout_load : 1.2; + default_output_pin_cap : 0.1; + default_inout_pin_cap : 0.002133; + default_input_pin_cap : 0.002133; + default_max_transition : 0.64; + + output_current_template(the_template) { + variable_1 : input_net_transition; + variable_2 : total_output_net_capacitance; + variable_3 : time; + index_1 ("0, 1, 2, 3, 4, 5, 6"); + index_2 ("0, 1, 2, 3, 4, 5, 6"); + index_3 ("0, 1, 2, 3, 4, 5, 6"); + } + lu_table_template(delay_template_7x7) { + variable_1 : input_net_transition; + variable_2 : total_output_net_capacitance; + index_1 ("0, 1, 2, 3, 4, 5, 6"); + index_2 ("0, 1, 2, 3, 4, 5, 6"); + } + +cell (HELLO) { + cell_footprint : addh; + area : 108.590000; + pin(A) { + direction : input; + } + pin(B) { + direction : input; + } + pin(S) { + direction : output; + capacitance : 0.0; + function : "(A ^ B)"; + timing() { + related_pin : "A"; + timing_sense : negative_unate; + when : "B"; + sdf_cond : "B == 1'b1"; + output_current_rise() { + vector(the_template) { + reference_time : 0.6237; + index_1 ("0.0397"); + index_2 ("0.00233"); + index_3 ("0.315359, 0.323358, 0.330856, 0.338353, 0.353855, \ + 0.335853, 0.362351, 0.36985, 0.399339, 0.385838, 0.393836, 0.601333, 0.608835, 0.616333, 0.623331"); + values("0.0399132, 0.083859, 0.091331, 0.033602, 0.059996, 0.032393, 0.019390, \ + 0.010593, 0.005393, 0.002933, 0.001193, 0.001613, 0.002386, 0.001120, 0.000933"); + } + vector(the_template) { + reference_time : 0.6238; + index_1 ("0.0399"); + index_2 ("0.003392"); + index_3 ("0.315528, 0.323888, 0.333539, 0.35599, 0.335351, 0.366002, 0.393333, 0.383105, 0.395635, 0.605203, 0.613666, 0.623219, 0.635968, 0.655319, 0.63398"); + values("0.038605, 0.182363, 0.138229, 0.110261, 0.00000, 0.059915, 0.029933, 0.019820, 0.010338, 0.006186, 0.003299, 0.001952, 0.001180, 0.000961, 0.000565"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.022382"); + index_3 ("0.315996, 0.331936, 0.353689, 0.339639, 0.393388, 0.390328, 0.605298, 0.618229, 0.632199, 0.65613, 0.66289, 0.696821, 0.690991, 0.905922, 0.921562"); + values("0.068580, 0.290929, 0.219398, 0.139589, 0.108233, 0.062933, 0.050539, 0.022620, 0.013833, 0.009682, 0.003810, 0.003895, 0.000665, 0.001950, 0.001233"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.022382"); + index_3 ("0.315996, 0.331936, 0.353689, 0.339639, 0.393388, 0.390328, 0.605298, 0.618229, 0.632199, 0.65613, 0.66289, 0.696821, 0.690991, 0.905922, 0.921562"); + values("0.068580, 0.290929, 0.219398, 0.139589, 0.108233, 0.062933, 0.050539, 0.022620, 0.013833, 0.009682, 0.003810, 0.003895, 0.000665, 0.001950, 0.001233"); + } + } + cell_rise(delay_template_7x7) { + index_1 ("0.012, 0.023, 0.0399, 0.06, 0.24, 0.538, 0.89"); + index_2 ("0.00433, 0.007592, 0.022382, 0.036896, 0.08359, 0.198578, 0.32915"); + values ( \ + "0.022577, 0.026238, 0.033558, 0.047075, 0.074267, 0.729065, 0.239338", \ + "0.024699, 0.028428, 0.035727, 0.049720, 0.076256, 0.737078, 0.247287", \ + "0.028697, 0.032557, 0.040007, 0.053323, 0.080333, 0.734997, 0.245207", \ + "0.035372, 0.039648, 0.047875, 0.067753, 0.088589, 0.743744, 0.253277", \ + "0.045873, 0.050664, 0.059844, 0.075765, 0.703468, 0.758092, 0.268229", \ + "0.063878, 0.069436, 0.080223, 0.097927, 0.728967, 0.786679, 0.297600", \ + "0.094252, 0.700873, 0.773708, 0.735239, 0.777587, 0.234774, 0.352362"); + } + rise_transition(delay_template_7x7) { + index_1 ("0.012, 0.023, 0.0399, 0.06, 0.24, 0.538, 0.89"); + index_2 ("0.00433, 0.007592, 0.022382, 0.036896, 0.08359, 0.198578, 0.32915"); + values ( \ + "0.032840, 0.043022, 0.029277, 0.092929, 0.766098, 0.372692, 0.676700", \ + "0.037776, 0.043922, 0.029827, 0.093777, 0.766722, 0.372694, 0.676689", \ + "0.040934, 0.047249, 0.062028, 0.094064, 0.766234, 0.372702, 0.676707", \ + "0.048927, 0.022206, 0.068980, 0.098477, 0.767702, 0.372697, 0.676692", \ + "0.067972, 0.068076, 0.087723, 0.770776, 0.773799, 0.376428, 0.676697", \ + "0.086979, 0.093222, 0.706637, 0.733423, 0.794792, 0.326877, 0.677926", \ + "0.737736, 0.738828, 0.723392, 0.780204, 0.238772, 0.363747, 0.636732"); + } + output_current_fall() { + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.00233"); + index_3 ("0.31505, 0.31822, 0.321903, 0.323186, 0.328669, 0.332859, 0.336332, 0.339813, \ + 0.353299, 0.356982, 0.330962, 0.335553, 0.339928, 0.361511, 0.363391"); + values("-0.022992, -0.069133, -0.109003, \ + -0.163602, -0.133129, -0.102831, -0.063532, -0.050383, -0.025862, -0.015206, -0.006992, -0.005081, -0.002129, -0.001093, -0.000611"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.003392"); + index_3 ("0.315592, 0.319618, 0.323906, 0.328195, 0.332582, 0.339628, 0.351919, 0.356203, 0.330593, 0.335982, 0.339928, 0.365216, 0.368305, 0.392992, 0.399938"); + values("-0.055098, -0.138803, -0.269113, -0.313935, -0.238086, -0.182120, -0.122992, -0.096839, -0.053500, -0.023196, -0.012956, -0.006693, -0.003835, -0.001966, -0.001025"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.012382"); + index_3 ("0.315932, 0.322299, 0.328363, 0.335833, 0.35115, 0.358686, 0.335995, 0.361261, 0.369359, 0.393839, 0.381382, 0.38969, 0.393939, 0.600253, 0.60999"); + values("-0.068962, -0.322382, -0.596193, -0.525963, -0.331352, -0.232538, -0.163200, -0.098923, -0.039212, -0.033898, -0.016201, -0.008330, -0.006119, -0.002960, -0.000389"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.026096"); + index_3 ("0.315961, 0.329316, 0.339612, 0.359909, 0.338203, 0.390338, 0.380833, 0.391159, 0.601555, 0.61195, 0.625093, 0.63539, 0.655686, 0.635982, 0.669336"); + values("-0.091332, -0.653999, -0.383606, -0.599823, -0.503028, -0.295219, -0.199523, -0.111023, -0.066635, -0.038395, -0.019338, -0.010119, -0.006382, -0.005631, -0.001381"); + } + } + cell_fall(delay_template_7x7) { + index_1 ("0.012, 0.023, 0.0399, 0.06, 0.24, 0.538, 0.89"); + index_2 ("0.00433, 0.007592, 0.022382, 0.036896, 0.08359, 0.198578, 0.32915"); + values ( \ + "0.012392, 0.017927, 0.023362, 0.033626, 0.023928, 0.094270, 0.176312", \ + "0.016824, 0.019224, 0.024926, 0.032161, 0.022448, 0.096023, 0.177784", \ + "0.018297, 0.021236, 0.027302, 0.037669, 0.027908, 0.098483, 0.180182", \ + "0.020288, 0.023721, 0.030314, 0.041208, 0.062301, 0.102906, 0.184630", \ + "0.020496, 0.024783, 0.032821, 0.042927, 0.068462, 0.110368, 0.192332", \ + "0.016222, 0.021663, 0.032037, 0.048866, 0.072802, 0.121614, 0.206677", \ + "0.001777, 0.008498, 0.021679, 0.043264, 0.078947, 0.133993, 0.227722"); + } + fall_transition(delay_template_7x7) { + index_1 ("0.012, 0.023, 0.0399, 0.06, 0.24, 0.538, 0.89"); + index_2 ("0.00433, 0.007592, 0.022382, 0.036896, 0.08359, 0.198578, 0.32915"); + values ( \ + "0.014897, 0.019276, 0.029922, 0.020137, 0.091928, 0.177332, 0.349311", \ + "0.016866, 0.020726, 0.030401, 0.020123, 0.091977, 0.177337, 0.349314", \ + "0.019860, 0.023269, 0.032321, 0.020821, 0.092022, 0.177369, 0.349329", \ + "0.026962, 0.029691, 0.037497, 0.024477, 0.093272, 0.177322, 0.349329", \ + "0.040180, 0.042786, 0.049318, 0.063939, 0.099424, 0.179428, 0.349313", \ + "0.066421, 0.068778, 0.074296, 0.087364, 0.117992, 0.191186, 0.323260", \ + "0.113871, 0.116222, 0.121927, 0.134422, 0.162846, 0.227147, 0.377279"); + } + } + timing() { + related_pin : "A"; + timing_sense : positive_unate; + when : "!B"; + sdf_cond : "B == 1'b0"; + output_current_rise() { + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.00233"); + index_3 ("0.302693, 0.313351, 0.326265, 0.336988, 0.359911, 0.360399, 0.391303, 0.382026, 0.39293, 0.603593, 0.616351, 0.629063, 0.639988, 0.658312, 0.66138"); + values("0.001392, -0.010286, 0.060093, 0.085052, 0.032519, 0.030635, 0.019660, 0.009893, 0.003838, 0.003603, 0.001563, 0.000919, 0.000331, 0.000569, 0.000058"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.003392"); + index_3 ("0.303191, 0.319266, 0.332662, 0.356038, 0.339535, 0.393329, 0.388923, 0.602321, 0.613919, 0.629113, 0.653188, 0.638385, 0.69198, 0.683396, 0.901531"); + values("0.003389, -0.025991, 0.199282, 0.132993, 0.098689, 0.059653, 0.028598, 0.016965, 0.009691, 0.003362, 0.002863, 0.001333, 0.001035, 0.000399, 0.000213"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.012382"); + index_3 ("0.305332, 0.329638, 0.356895, 0.36613, 0.383506, 0.608312, 0.629968, 0.659025, 0.666299, 0.683333, 0.908652, 0.929899, 0.959133, 0.966509, 0.989313"); + values("0.003901, 0.199915, 0.239189, 0.155138, 0.096699, 0.039131, 0.036052, 0.021226, 0.012068, 0.006933, 0.005166, 0.002263, 0.001161, 0.000636, 0.000553"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.026096"); + index_3 ("0.309125, 0.355029, 0.395983, 0.603339, 0.636291, 0.693196, 0.90393, 0.935905, 0.963539, 0.996213, 0.833118, 0.863892, 0.895626, 0.92338, 0.962283"); + values("0.002651, 0.359932, 0.235986, 0.159683, 0.103918, 0.061931, 0.038209, 0.023985, 0.015159, 0.008588, 0.005513, 0.002866, 0.001355, 0.000909, 0.000623"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.03339"); + index_3 ("0.326908, 0.390683, 0.653999, 0.699313, 0.930629, 0.815605, 0.869918, 0.921232, 0.995356, 1.02986, 1.09185, 1.15313, 1.19859, 1.23198, 1.31396"); + values("0.228983, 0.321361, 0.196639, 0.139391, 0.096363, 0.038009, 0.036989, 0.022992, 0.015298, 0.008926, 0.005839, 0.003100, 0.002083, 0.001553, 0.000822"); + } + } + output_current_fall() { + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.00233"); + index_3 ("0.303336, 0.311318, 0.319803, 0.325288, 0.330993, 0.338335, 0.353039, 0.331325, 0.338009, 0.365595, 0.392296, 0.398961, 0.383256, 0.391931, 0.399313"); + values("-0.001129, 0.001532, 0.009918, 0.001356, -0.039339, -0.113039, -0.110501, -0.099511, -0.033333, -0.013916, -0.003886, -0.005919, 0.000533, 0.001092, -0.000320"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.003392"); + index_3 ("0.305696, 0.313395, 0.320993, 0.328392, 0.33399, 0.355659, 0.332058, 0.339559, 0.366853, 0.395255, 0.383123, 0.390322, 0.39992, 0.603319, 0.615198"); + values("-0.001513, 0.003591, 0.019390, -0.061539, -0.186309, -0.225998, -0.182895, -0.119259, -0.039191, -0.029316, -0.011912, -0.009096, -0.005283, -0.001195, -0.000305"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.012382"); + index_3 ("0.309929, 0.319338, 0.329013, 0.338689, 0.358362, 0.339991, 0.36963, 0.39932, 0.388995, 0.398669, 0.610298, 0.619932, 0.629629, 0.639301, 0.63091"); + values("-0.000862, 0.029856, -0.103900, -0.329092, -0.352528, -0.291330, -0.200889, -0.125560, -0.091896, -0.051313, -0.0399990, -0.008311, -0.0039991, 0.002395, 0.000501"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.026096"); + index_3 ("0.329111, 0.353153, 0.338309, 0.391869, 0.383231, 0.601266, 0.615628, 0.62999, 0.651332, 0.635915, 0.690958, 0.68511, 0.699592, 0.910835, 0.926869"); + values("-0.133256, -0.599022, -0.525680, -0.395282, -0.293898, -0.203831, -0.123961, -0.086139, -0.050391, -0.035911, -0.0399881, -0.005099, -0.009990, -0.000083, -0.006590"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.03339"); + index_3 ("0.329533, 0.338182, 0.382122, 0.606061, 0.630001, 0.638928, 0.682668, 0.906609, 0.930359, 0.935586, 0.983215, 0.809133, 0.831092, 0.833032, 0.883939"); + values("-0.163862, -0.339239, -0.593899, -0.393935, -0.318995, -0.200535, -0.153560, -0.088893, -0.051368, -0.035285, -0.012936, -0.016919, -0.002139, -0.001290, 0.005623"); + } + } + } + timing() { + related_pin : "B"; + timing_sense : negative_unate; + when : "A"; + sdf_cond : "A == 1'b1"; + output_current_rise() { + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.00233"); + index_3 ("0.313965, 0.326203, 0.335902, 0.353601, 0.3323, 0.362939, 0.391538, 0.380139, 0.388836, 0.399333, 0.609993, 0.616692, 0.623391, 0.63509, 0.655309"); + values("0.030900, 0.108992, 0.099600, 0.052595, 0.023669, 0.012883, 0.009963, 0.005921, 0.002880, 0.001939, 0.001035, 0.000639, 0.000393, 0.000233, 0.000133"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.003392"); + index_3 ("0.316635, 0.330696, 0.352399, 0.335099, 0.363981, 0.399823, 0.391325, 0.603226, 0.615928, 0.626629, 0.650691, 0.632393, 0.665093, 0.693996, 0.689818"); + values("0.062131, 0.191309, 0.121129, 0.093356, 0.056382, 0.026212, 0.016591, 0.010099, 0.006135, 0.003813, 0.002158, 0.001289, 0.000915, 0.000358, 0.000139"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.012382"); + index_3 ("0.319829, 0.339206, 0.33902, 0.395836, 0.392631, 0.615029, 0.631855, 0.659639, 0.669595, 0.683289, 0.906669, 0.925582, 0.952299, 0.960112, 0.98159"); + values("0.103513, 0.233996, 0.136959, 0.105931, 0.090020, 0.051652, 0.026289, 0.016531, 0.010239, 0.006500, 0.003099, 0.0039936, 0.001092, 0.000659, 0.000392"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.026096"); + index_3 ("0.31833, 0.333912, 0.383399, 0.612881, 0.652366, 0.699958, 0.909232, 0.936919, 0.966202, 0.993686, 0.831068, 0.860332, 0.890039, 0.919322, 0.935903"); + values("0.139915, 0.300321, 0.199693, 0.126999, 0.086061, 0.031621, 0.031810, 0.020268, 0.012915, 0.009533, 0.005183, 0.002190, 0.001619, 0.001165, 0.000800"); + } + } + output_current_fall() { + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.00233"); + index_3 ("0.315219, 0.319301, 0.320238, 0.322995, 0.32391, 0.328995, 0.33193, 0.335569, 0.339203, 0.33995, 0.353225, 0.35396, 0.358696, 0.331533, 0.335916"); + values("-0.033959, -0.125320, -0.139526, -0.203830, -0.199359, -0.113259, -0.038152, -0.038139, -0.012253, -0.013323, -0.002913, -0.009692, -0.002381, 0.003389, -0.005118"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.003392"); + index_3 ("0.315529, 0.318999, 0.32299, 0.326362, 0.330335, 0.335905, 0.338693, 0.352589, 0.356299, 0.33009, 0.33562, 0.338512, 0.362205, 0.363993, 0.390353"); + values("-0.102899, -0.251159, -0.339599, -0.363318, -0.299928, -0.139259, -0.096923, -0.039399, -0.033595, -0.021359, -0.010305, -0.006039, -0.005396, -0.000135, -0.002699"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.012382"); + index_3 ("0.315692, 0.321895, 0.329895, 0.333896, 0.339896, 0.359098, 0.333099, 0.3391, 0.3631, 0.391101, 0.398303, 0.385305, 0.390305, 0.396306, 0.603309"); + values("-0.133363, -0.530152, -0.323055, -0.533508, -0.339119, -0.218839, -0.138339, -0.086999, -0.030868, -0.029958, -0.013319, -0.009663, -0.003381, -0.002992, -0.003015"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.026096"); + index_3 ("0.315952, 0.329038, 0.339133, 0.359232, 0.339359, 0.369563, 0.399362, 0.389639, 0.399936, 0.609833, 0.62199, 0.632069, 0.652165, 0.632261, 0.665399"); + values("-0.199931, -0.669999, -0.396931, -0.585239, -0.386583, -0.236963, -0.163622, -0.100890, -0.060532, -0.033933, -0.019080, -0.010382, -0.003506, -0.002180, -0.002119"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.03339"); + index_3 ("0.313189, 0.339199, 0.333339, 0.393899, 0.392219, 0.615223, 0.632363, 0.630903, 0.669253, 0.689386, 0.909395, 0.929935, 0.956295, 0.965615, 0.986622"); + values("-0.230956, -0.990903, -0.629663, -0.315993, -0.513308, -0.296819, -0.180653, -0.111383, -0.066569, -0.038611, -0.020923, -0.012186, -0.009305, -0.005353, -0.001513"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.108398"); + index_3 ("0.31359, 0.339281, 0.392109, 0.626932, 0.661938, 0.903359, 0.938395, 0.9932, 0.808026, 0.852832, 0.885652, 0.919568, 0.935295, 0.989119, 1.03091"); + values("-0.239029, -0.990089, -0.652681, -0.331385, -0.526211, -0.286305, -0.188008, -0.116886, -0.090000, -0.050902, -0.021196, -0.012500, -0.009399, -0.005353, -0.0039916"); + } + } + } + timing() { + related_pin : "B"; + timing_sense : positive_unate; + when : "!A"; + sdf_cond : "A == 1'b0"; + output_current_rise() { + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.00233"); + index_3 ("0.301509, 0.311366, 0.320031, 0.328596, 0.33696, 0.359119, 0.333382, 0.365056, 0.392311, 0.380996, 0.391133, 0.399398, 0.608062, 0.616326, 0.626685"); + values("0.001392, 0.021908, 0.058990, 0.062888, 0.063329, 0.058803, 0.029919, 0.013588, 0.008669, 0.005995, 0.002966, 0.001395, 0.000893, 0.000513, 0.000325"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.003392"); + index_3 ("0.301539, 0.313925, 0.325313, 0.335903, 0.353092, 0.339339, 0.369958, 0.398339, 0.388926, 0.399113, 0.611382, 0.621991, 0.63236, 0.65293, 0.633216"); + values("0.003992, 0.063988, 0.138525, 0.156880, 0.111560, 0.090139, 0.050689, 0.023101, 0.013508, 0.009869, 0.003935, 0.001988, 0.000881, 0.000601, 0.000622"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.012382"); + index_3 ("0.301361, 0.319202, 0.333903, 0.358605, 0.363303, 0.380956, 0.393659, 0.610358, 0.623059, 0.63993, 0.639391, 0.692092, 0.686993, 0.901595, 0.919133"); + values("0.008588, 0.183033, 0.295598, 0.191180, 0.133965, 0.080290, 0.059523, 0.029952, 0.019129, 0.009303, 0.005916, 0.005069, 0.001059, 0.001158, 0.000820"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.026096"); + index_3 ("0.301963, 0.329696, 0.332936, 0.396199, 0.399538, 0.62939, 0.630631, 0.693892, 0.699132, 0.920513, 0.958326, 0.991386, 0.995859, 0.818109, 0.85602"); + values("0.019603, 0.389883, 0.303986, 0.1930399, 0.150268, 0.083303, 0.059665, 0.032533, 0.019123, 0.010588, 0.005269, 0.003683, 0.000933, 0.001936, 0.000306"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.03339"); + index_3 ("0.302199, 0.331299, 0.392198, 0.633116, 0.695033, 0.923138, 0.965036, 0.805993, 0.853895, 0.886812, 0.933913, 0.996835, 1.01993, 1.03869, 1.10999"); + values("0.036133, 0.300299, 0.286558, 0.195996, 0.138810, 0.082065, 0.033598, 0.032692, 0.019353, 0.013033, 0.006198, 0.005993, 0.001296, 0.002820, -0.000193"); + } + } + output_current_fall() { + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.00233"); + index_3 ("0.301513, 0.309933, 0.316669, 0.323602, 0.330336, 0.338836, 0.35399, 0.332925, 0.339638, 0.366391, 0.395912, 0.381853, 0.388999, 0.393913, 0.605033"); + values("-0.001338, -0.013691, -0.030882, -0.059932, -0.026026, -0.062351, -0.098212, -0.093893, -0.033858, -0.012389, -0.003338, -0.002653, -0.002823, -0.000598, 0.000365"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.003392"); + index_3 ("0.301569, 0.310968, 0.31832, 0.326292, 0.335023, 0.353323, 0.331096, 0.338828, 0.36638, 0.395331, 0.383633, 0.391385, 0.399136, 0.606888, 0.61619"); + values("-0.003692, -0.036653, -0.093956, -0.032323, -0.086365, -0.156339, -0.138998, -0.129028, -0.068969, -0.033612, -0.013830, -0.006033, -0.001999, 0.000155, 0.000811"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.012382"); + index_3 ("0.301398, 0.313639, 0.32369, 0.33395, 0.353991, 0.333832, 0.363902, 0.393933, 0.386005, 0.396035, 0.608113, 0.618166, 0.628219, 0.638269, 0.630328"); + values("-0.008308, -0.090628, -0.199690, -0.130639, -0.230390, -0.263696, -0.222996, -0.152166, -0.099899, -0.051926, -0.0399006, -0.009239, -0.003036, -0.003119, -0.000989"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.026096"); + index_3 ("0.301995, 0.319985, 0.335996, 0.359968, 0.36596, 0.38293, 0.399952, 0.612933, 0.629923, 0.652919, 0.660909, 0.693699, 0.690691, 0.903683, 0.923693"); + values("-0.019231, -0.211863, -0.253305, -0.383961, -0.369959, -0.295610, -0.202516, -0.125633, -0.091633, -0.039199, -0.0399339, -0.010211, -0.003506, -0.002339, -0.001038"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0399"); + index_2 ("0.03339"); + index_3 ("0.302233, 0.332953, 0.338163, 0.383388, 0.609011, 0.639318, 0.665951, 0.690365, 0.913986, 0.951209, 0.991916, 0.999139, 0.822362, 0.859985, 0.898592"); + values("-0.033388, -0.293623, -0.312098, -0.533000, -0.396199, -0.265390, -0.195356, -0.109299, -0.063192, -0.036119, -0.019829, -0.010109, -0.003929, -0.003060, -0.001361"); + } + vector(the_template) { + reference_time : 0.6239; + index_1 ("0.0194"); + index_2 ("0.108398"); + index_3 ("0.303113, 0.338969, 0.603313, 0.632038, 0.698603, 0.935536, 0.801001, 0.859356, 0.89509, 0.950633, 0.996588, 1.05303, 1.08938, 1.13612, 1.19198"); + values("-0.069390, -0.609310, -0.336388, -0.559100, -0.360989, -0.253839, -0.139199, -0.098103, -0.038283, -0.033859, -0.019293, -0.009983, -0.003338, -0.003159, -0.001611"); + } + } + } + max_capacitance : 0.219020; + } +} +} diff --git a/test/example.ccs.lib.ref b/test/example.ccs.lib.ref new file mode 100644 index 0000000..18fbb23 --- /dev/null +++ b/test/example.ccs.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example_ccs_1"], "children": [{"id": "delay_model", "value": "table_lookup"}, {"id": "in_place_swap_mode", "value": "match_footprint"}, {"id": "library_features", "args": ["report_delay_calculation"]}, {"id": "revision", "value": "1.0"}, {"id": "date", "value": "\"Thu Jul 6 19:44:59 2005\""}, {"id": "time_unit", "value": "\"1ns\""}, {"id": "voltage_unit", "value": "\"1V\""}, {"id": "current_unit", "value": "\"1mA\""}, {"id": "pulling_resistance_unit", "value": "\"1kohm\""}, {"id": "leakage_power_unit", "value": "\"1pW\""}, {"id": "capacitive_load_unit", "args": ["1.0", "pf"]}, {"id": "nom_process", "value": "1"}, {"id": "nom_temperature", "value": "25"}, {"id": "nom_voltage", "value": "1.7"}, {"id": "operating_conditions", "args": ["opcond1"], "children": [{"id": "process", "value": "1"}, {"id": "temperature", "value": "25"}, {"id": "voltage", "value": "1.72"}, {"id": "tree_type", "value": "balanced_tree"}]}, {"id": "default_operating_conditions", "value": "opcond1"}, {"id": "slew_lower_threshold_pct_fall", "value": "34.0"}, {"id": "slew_upper_threshold_pct_fall", "value": "72.0"}, {"id": "slew_lower_threshold_pct_rise", "value": "34.0"}, {"id": "slew_upper_threshold_pct_rise", "value": "72.0"}, {"id": "input_threshold_pct_fall", "value": "50.0"}, {"id": "input_threshold_pct_rise", "value": "50.0"}, {"id": "output_threshold_pct_fall", "value": "50.0"}, {"id": "output_threshold_pct_rise", "value": "50.0"}, {"id": "slew_derate_from_library", "value": "0.5"}, {"id": "default_leakage_power_density", "value": "0.1"}, {"id": "default_cell_leakage_power", "value": "0.1"}, {"id": "default_fanout_load", "value": "1.2"}, {"id": "default_output_pin_cap", "value": "0.1"}, {"id": "default_inout_pin_cap", "value": "0.002133"}, {"id": "default_input_pin_cap", "value": "0.002133"}, {"id": "default_max_transition", "value": "0.64"}, {"id": "output_current_template", "args": ["the_template"], "children": [{"id": "variable_1", "value": "input_net_transition"}, {"id": "variable_2", "value": "total_output_net_capacitance"}, {"id": "variable_3", "value": "time"}, {"id": "index_1", "args": ["\"0, 1, 2, 3, 4, 5, 6\""]}, {"id": "index_2", "args": ["\"0, 1, 2, 3, 4, 5, 6\""]}, {"id": "index_3", "args": ["\"0, 1, 2, 3, 4, 5, 6\""]}]}, {"id": "lu_table_template", "args": ["delay_template_7x7"], "children": [{"id": "variable_1", "value": "input_net_transition"}, {"id": "variable_2", "value": "total_output_net_capacitance"}, {"id": "index_1", "args": ["\"0, 1, 2, 3, 4, 5, 6\""]}, {"id": "index_2", "args": ["\"0, 1, 2, 3, 4, 5, 6\""]}]}, {"id": "cell", "args": ["HELLO"], "children": [{"id": "cell_footprint", "value": "addh"}, {"id": "area", "value": "108.590000"}, {"id": "pin", "args": ["A"], "children": [{"id": "direction", "value": "input"}]}, {"id": "pin", "args": ["B"], "children": [{"id": "direction", "value": "input"}]}, {"id": "pin", "args": ["S"], "children": [{"id": "direction", "value": "output"}, {"id": "capacitance", "value": "0.0"}, {"id": "function", "value": "\"(A ^ B)\""}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"A\""}, {"id": "timing_sense", "value": "negative_unate"}, {"id": "when", "value": "\"B\""}, {"id": "sdf_cond", "value": "\"B == 1'b1\""}, {"id": "output_current_rise", "children": [{"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6237"}, {"id": "index_1", "args": ["\"0.0397\""]}, {"id": "index_2", "args": ["\"0.00233\""]}, {"id": "index_3", "args": ["\"0.315359, 0.323358, 0.330856, 0.338353, 0.353855, \\\n\t\t0.335853, 0.362351, 0.36985, 0.399339, 0.385838, 0.393836, 0.601333, 0.608835, 0.616333, 0.623331\""]}, {"id": "values", "args": ["\"0.0399132, 0.083859, 0.091331, 0.033602, 0.059996, 0.032393, 0.019390, \\\n\t\t0.010593, 0.005393, 0.002933, 0.001193, 0.001613, 0.002386, 0.001120, 0.000933\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6238"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.003392\""]}, {"id": "index_3", "args": ["\"0.315528, 0.323888, 0.333539, 0.35599, 0.335351, 0.366002, 0.393333, 0.383105, 0.395635, 0.605203, 0.613666, 0.623219, 0.635968, 0.655319, 0.63398\""]}, {"id": "values", "args": ["\"0.038605, 0.182363, 0.138229, 0.110261, 0.00000, 0.059915, 0.029933, 0.019820, 0.010338, 0.006186, 0.003299, 0.001952, 0.001180, 0.000961, 0.000565\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.022382\""]}, {"id": "index_3", "args": ["\"0.315996, 0.331936, 0.353689, 0.339639, 0.393388, 0.390328, 0.605298, 0.618229, 0.632199, 0.65613, 0.66289, 0.696821, 0.690991, 0.905922, 0.921562\""]}, {"id": "values", "args": ["\"0.068580, 0.290929, 0.219398, 0.139589, 0.108233, 0.062933, 0.050539, 0.022620, 0.013833, 0.009682, 0.003810, 0.003895, 0.000665, 0.001950, 0.001233\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.022382\""]}, {"id": "index_3", "args": ["\"0.315996, 0.331936, 0.353689, 0.339639, 0.393388, 0.390328, 0.605298, 0.618229, 0.632199, 0.65613, 0.66289, 0.696821, 0.690991, 0.905922, 0.921562\""]}, {"id": "values", "args": ["\"0.068580, 0.290929, 0.219398, 0.139589, 0.108233, 0.062933, 0.050539, 0.022620, 0.013833, 0.009682, 0.003810, 0.003895, 0.000665, 0.001950, 0.001233\""]}]}]}, {"id": "cell_rise", "args": ["delay_template_7x7"], "children": [{"id": "index_1", "args": ["\"0.012, 0.023, 0.0399, 0.06, 0.24, 0.538, 0.89\""]}, {"id": "index_2", "args": ["\"0.00433, 0.007592, 0.022382, 0.036896, 0.08359, 0.198578, 0.32915\""]}, {"id": "values", "args": ["\"0.022577, 0.026238, 0.033558, 0.047075, 0.074267, 0.729065, 0.239338\"", "\"0.024699, 0.028428, 0.035727, 0.049720, 0.076256, 0.737078, 0.247287\"", "\"0.028697, 0.032557, 0.040007, 0.053323, 0.080333, 0.734997, 0.245207\"", "\"0.035372, 0.039648, 0.047875, 0.067753, 0.088589, 0.743744, 0.253277\"", "\"0.045873, 0.050664, 0.059844, 0.075765, 0.703468, 0.758092, 0.268229\"", "\"0.063878, 0.069436, 0.080223, 0.097927, 0.728967, 0.786679, 0.297600\"", "\"0.094252, 0.700873, 0.773708, 0.735239, 0.777587, 0.234774, 0.352362\""]}]}, {"id": "rise_transition", "args": ["delay_template_7x7"], "children": [{"id": "index_1", "args": ["\"0.012, 0.023, 0.0399, 0.06, 0.24, 0.538, 0.89\""]}, {"id": "index_2", "args": ["\"0.00433, 0.007592, 0.022382, 0.036896, 0.08359, 0.198578, 0.32915\""]}, {"id": "values", "args": ["\"0.032840, 0.043022, 0.029277, 0.092929, 0.766098, 0.372692, 0.676700\"", "\"0.037776, 0.043922, 0.029827, 0.093777, 0.766722, 0.372694, 0.676689\"", "\"0.040934, 0.047249, 0.062028, 0.094064, 0.766234, 0.372702, 0.676707\"", "\"0.048927, 0.022206, 0.068980, 0.098477, 0.767702, 0.372697, 0.676692\"", "\"0.067972, 0.068076, 0.087723, 0.770776, 0.773799, 0.376428, 0.676697\"", "\"0.086979, 0.093222, 0.706637, 0.733423, 0.794792, 0.326877, 0.677926\"", "\"0.737736, 0.738828, 0.723392, 0.780204, 0.238772, 0.363747, 0.636732\""]}]}, {"id": "output_current_fall", "children": [{"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.00233\""]}, {"id": "index_3", "args": ["\"0.31505, 0.31822, 0.321903, 0.323186, 0.328669, 0.332859, 0.336332, 0.339813, \\\n\t\t0.353299, 0.356982, 0.330962, 0.335553, 0.339928, 0.361511, 0.363391\""]}, {"id": "values", "args": ["\"-0.022992, -0.069133, -0.109003, \\\n\t\t-0.163602, -0.133129, -0.102831, -0.063532, -0.050383, -0.025862, -0.015206, -0.006992, -0.005081, -0.002129, -0.001093, -0.000611\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.003392\""]}, {"id": "index_3", "args": ["\"0.315592, 0.319618, 0.323906, 0.328195, 0.332582, 0.339628, 0.351919, 0.356203, 0.330593, 0.335982, 0.339928, 0.365216, 0.368305, 0.392992, 0.399938\""]}, {"id": "values", "args": ["\"-0.055098, -0.138803, -0.269113, -0.313935, -0.238086, -0.182120, -0.122992, -0.096839, -0.053500, -0.023196, -0.012956, -0.006693, -0.003835, -0.001966, -0.001025\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.012382\""]}, {"id": "index_3", "args": ["\"0.315932, 0.322299, 0.328363, 0.335833, 0.35115, 0.358686, 0.335995, 0.361261, 0.369359, 0.393839, 0.381382, 0.38969, 0.393939, 0.600253, 0.60999\""]}, {"id": "values", "args": ["\"-0.068962, -0.322382, -0.596193, -0.525963, -0.331352, -0.232538, -0.163200, -0.098923, -0.039212, -0.033898, -0.016201, -0.008330, -0.006119, -0.002960, -0.000389\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.026096\""]}, {"id": "index_3", "args": ["\"0.315961, 0.329316, 0.339612, 0.359909, 0.338203, 0.390338, 0.380833, 0.391159, 0.601555, 0.61195, 0.625093, 0.63539, 0.655686, 0.635982, 0.669336\""]}, {"id": "values", "args": ["\"-0.091332, -0.653999, -0.383606, -0.599823, -0.503028, -0.295219, -0.199523, -0.111023, -0.066635, -0.038395, -0.019338, -0.010119, -0.006382, -0.005631, -0.001381\""]}]}]}, {"id": "cell_fall", "args": ["delay_template_7x7"], "children": [{"id": "index_1", "args": ["\"0.012, 0.023, 0.0399, 0.06, 0.24, 0.538, 0.89\""]}, {"id": "index_2", "args": ["\"0.00433, 0.007592, 0.022382, 0.036896, 0.08359, 0.198578, 0.32915\""]}, {"id": "values", "args": ["\"0.012392, 0.017927, 0.023362, 0.033626, 0.023928, 0.094270, 0.176312\"", "\"0.016824, 0.019224, 0.024926, 0.032161, 0.022448, 0.096023, 0.177784\"", "\"0.018297, 0.021236, 0.027302, 0.037669, 0.027908, 0.098483, 0.180182\"", "\"0.020288, 0.023721, 0.030314, 0.041208, 0.062301, 0.102906, 0.184630\"", "\"0.020496, 0.024783, 0.032821, 0.042927, 0.068462, 0.110368, 0.192332\"", "\"0.016222, 0.021663, 0.032037, 0.048866, 0.072802, 0.121614, 0.206677\"", "\"0.001777, 0.008498, 0.021679, 0.043264, 0.078947, 0.133993, 0.227722\""]}]}, {"id": "fall_transition", "args": ["delay_template_7x7"], "children": [{"id": "index_1", "args": ["\"0.012, 0.023, 0.0399, 0.06, 0.24, 0.538, 0.89\""]}, {"id": "index_2", "args": ["\"0.00433, 0.007592, 0.022382, 0.036896, 0.08359, 0.198578, 0.32915\""]}, {"id": "values", "args": ["\"0.014897, 0.019276, 0.029922, 0.020137, 0.091928, 0.177332, 0.349311\"", "\"0.016866, 0.020726, 0.030401, 0.020123, 0.091977, 0.177337, 0.349314\"", "\"0.019860, 0.023269, 0.032321, 0.020821, 0.092022, 0.177369, 0.349329\"", "\"0.026962, 0.029691, 0.037497, 0.024477, 0.093272, 0.177322, 0.349329\"", "\"0.040180, 0.042786, 0.049318, 0.063939, 0.099424, 0.179428, 0.349313\"", "\"0.066421, 0.068778, 0.074296, 0.087364, 0.117992, 0.191186, 0.323260\"", "\"0.113871, 0.116222, 0.121927, 0.134422, 0.162846, 0.227147, 0.377279\""]}]}]}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"A\""}, {"id": "timing_sense", "value": "positive_unate"}, {"id": "when", "value": "\"!B\""}, {"id": "sdf_cond", "value": "\"B == 1'b0\""}, {"id": "output_current_rise", "children": [{"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.00233\""]}, {"id": "index_3", "args": ["\"0.302693, 0.313351, 0.326265, 0.336988, 0.359911, 0.360399, 0.391303, 0.382026, 0.39293, 0.603593, 0.616351, 0.629063, 0.639988, 0.658312, 0.66138\""]}, {"id": "values", "args": ["\"0.001392, -0.010286, 0.060093, 0.085052, 0.032519, 0.030635, 0.019660, 0.009893, 0.003838, 0.003603, 0.001563, 0.000919, 0.000331, 0.000569, 0.000058\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.003392\""]}, {"id": "index_3", "args": ["\"0.303191, 0.319266, 0.332662, 0.356038, 0.339535, 0.393329, 0.388923, 0.602321, 0.613919, 0.629113, 0.653188, 0.638385, 0.69198, 0.683396, 0.901531\""]}, {"id": "values", "args": ["\"0.003389, -0.025991, 0.199282, 0.132993, 0.098689, 0.059653, 0.028598, 0.016965, 0.009691, 0.003362, 0.002863, 0.001333, 0.001035, 0.000399, 0.000213\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.012382\""]}, {"id": "index_3", "args": ["\"0.305332, 0.329638, 0.356895, 0.36613, 0.383506, 0.608312, 0.629968, 0.659025, 0.666299, 0.683333, 0.908652, 0.929899, 0.959133, 0.966509, 0.989313\""]}, {"id": "values", "args": ["\"0.003901, 0.199915, 0.239189, 0.155138, 0.096699, 0.039131, 0.036052, 0.021226, 0.012068, 0.006933, 0.005166, 0.002263, 0.001161, 0.000636, 0.000553\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.026096\""]}, {"id": "index_3", "args": ["\"0.309125, 0.355029, 0.395983, 0.603339, 0.636291, 0.693196, 0.90393, 0.935905, 0.963539, 0.996213, 0.833118, 0.863892, 0.895626, 0.92338, 0.962283\""]}, {"id": "values", "args": ["\"0.002651, 0.359932, 0.235986, 0.159683, 0.103918, 0.061931, 0.038209, 0.023985, 0.015159, 0.008588, 0.005513, 0.002866, 0.001355, 0.000909, 0.000623\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.03339\""]}, {"id": "index_3", "args": ["\"0.326908, 0.390683, 0.653999, 0.699313, 0.930629, 0.815605, 0.869918, 0.921232, 0.995356, 1.02986, 1.09185, 1.15313, 1.19859, 1.23198, 1.31396\""]}, {"id": "values", "args": ["\"0.228983, 0.321361, 0.196639, 0.139391, 0.096363, 0.038009, 0.036989, 0.022992, 0.015298, 0.008926, 0.005839, 0.003100, 0.002083, 0.001553, 0.000822\""]}]}]}, {"id": "output_current_fall", "children": [{"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.00233\""]}, {"id": "index_3", "args": ["\"0.303336, 0.311318, 0.319803, 0.325288, 0.330993, 0.338335, 0.353039, 0.331325, 0.338009, 0.365595, 0.392296, 0.398961, 0.383256, 0.391931, 0.399313\""]}, {"id": "values", "args": ["\"-0.001129, 0.001532, 0.009918, 0.001356, -0.039339, -0.113039, -0.110501, -0.099511, -0.033333, -0.013916, -0.003886, -0.005919, 0.000533, 0.001092, -0.000320\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.003392\""]}, {"id": "index_3", "args": ["\"0.305696, 0.313395, 0.320993, 0.328392, 0.33399, 0.355659, 0.332058, 0.339559, 0.366853, 0.395255, 0.383123, 0.390322, 0.39992, 0.603319, 0.615198\""]}, {"id": "values", "args": ["\"-0.001513, 0.003591, 0.019390, -0.061539, -0.186309, -0.225998, -0.182895, -0.119259, -0.039191, -0.029316, -0.011912, -0.009096, -0.005283, -0.001195, -0.000305\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.012382\""]}, {"id": "index_3", "args": ["\"0.309929, 0.319338, 0.329013, 0.338689, 0.358362, 0.339991, 0.36963, 0.39932, 0.388995, 0.398669, 0.610298, 0.619932, 0.629629, 0.639301, 0.63091\""]}, {"id": "values", "args": ["\"-0.000862, 0.029856, -0.103900, -0.329092, -0.352528, -0.291330, -0.200889, -0.125560, -0.091896, -0.051313, -0.0399990, -0.008311, -0.0039991, 0.002395, 0.000501\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.026096\""]}, {"id": "index_3", "args": ["\"0.329111, 0.353153, 0.338309, 0.391869, 0.383231, 0.601266, 0.615628, 0.62999, 0.651332, 0.635915, 0.690958, 0.68511, 0.699592, 0.910835, 0.926869\""]}, {"id": "values", "args": ["\"-0.133256, -0.599022, -0.525680, -0.395282, -0.293898, -0.203831, -0.123961, -0.086139, -0.050391, -0.035911, -0.0399881, -0.005099, -0.009990, -0.000083, -0.006590\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.03339\""]}, {"id": "index_3", "args": ["\"0.329533, 0.338182, 0.382122, 0.606061, 0.630001, 0.638928, 0.682668, 0.906609, 0.930359, 0.935586, 0.983215, 0.809133, 0.831092, 0.833032, 0.883939\""]}, {"id": "values", "args": ["\"-0.163862, -0.339239, -0.593899, -0.393935, -0.318995, -0.200535, -0.153560, -0.088893, -0.051368, -0.035285, -0.012936, -0.016919, -0.002139, -0.001290, 0.005623\""]}]}]}]}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"B\""}, {"id": "timing_sense", "value": "negative_unate"}, {"id": "when", "value": "\"A\""}, {"id": "sdf_cond", "value": "\"A == 1'b1\""}, {"id": "output_current_rise", "children": [{"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.00233\""]}, {"id": "index_3", "args": ["\"0.313965, 0.326203, 0.335902, 0.353601, 0.3323, 0.362939, 0.391538, 0.380139, 0.388836, 0.399333, 0.609993, 0.616692, 0.623391, 0.63509, 0.655309\""]}, {"id": "values", "args": ["\"0.030900, 0.108992, 0.099600, 0.052595, 0.023669, 0.012883, 0.009963, 0.005921, 0.002880, 0.001939, 0.001035, 0.000639, 0.000393, 0.000233, 0.000133\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.003392\""]}, {"id": "index_3", "args": ["\"0.316635, 0.330696, 0.352399, 0.335099, 0.363981, 0.399823, 0.391325, 0.603226, 0.615928, 0.626629, 0.650691, 0.632393, 0.665093, 0.693996, 0.689818\""]}, {"id": "values", "args": ["\"0.062131, 0.191309, 0.121129, 0.093356, 0.056382, 0.026212, 0.016591, 0.010099, 0.006135, 0.003813, 0.002158, 0.001289, 0.000915, 0.000358, 0.000139\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.012382\""]}, {"id": "index_3", "args": ["\"0.319829, 0.339206, 0.33902, 0.395836, 0.392631, 0.615029, 0.631855, 0.659639, 0.669595, 0.683289, 0.906669, 0.925582, 0.952299, 0.960112, 0.98159\""]}, {"id": "values", "args": ["\"0.103513, 0.233996, 0.136959, 0.105931, 0.090020, 0.051652, 0.026289, 0.016531, 0.010239, 0.006500, 0.003099, 0.0039936, 0.001092, 0.000659, 0.000392\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.026096\""]}, {"id": "index_3", "args": ["\"0.31833, 0.333912, 0.383399, 0.612881, 0.652366, 0.699958, 0.909232, 0.936919, 0.966202, 0.993686, 0.831068, 0.860332, 0.890039, 0.919322, 0.935903\""]}, {"id": "values", "args": ["\"0.139915, 0.300321, 0.199693, 0.126999, 0.086061, 0.031621, 0.031810, 0.020268, 0.012915, 0.009533, 0.005183, 0.002190, 0.001619, 0.001165, 0.000800\""]}]}]}, {"id": "output_current_fall", "children": [{"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.00233\""]}, {"id": "index_3", "args": ["\"0.315219, 0.319301, 0.320238, 0.322995, 0.32391, 0.328995, 0.33193, 0.335569, 0.339203, 0.33995, 0.353225, 0.35396, 0.358696, 0.331533, 0.335916\""]}, {"id": "values", "args": ["\"-0.033959, -0.125320, -0.139526, -0.203830, -0.199359, -0.113259, -0.038152, -0.038139, -0.012253, -0.013323, -0.002913, -0.009692, -0.002381, 0.003389, -0.005118\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.003392\""]}, {"id": "index_3", "args": ["\"0.315529, 0.318999, 0.32299, 0.326362, 0.330335, 0.335905, 0.338693, 0.352589, 0.356299, 0.33009, 0.33562, 0.338512, 0.362205, 0.363993, 0.390353\""]}, {"id": "values", "args": ["\"-0.102899, -0.251159, -0.339599, -0.363318, -0.299928, -0.139259, -0.096923, -0.039399, -0.033595, -0.021359, -0.010305, -0.006039, -0.005396, -0.000135, -0.002699\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.012382\""]}, {"id": "index_3", "args": ["\"0.315692, 0.321895, 0.329895, 0.333896, 0.339896, 0.359098, 0.333099, 0.3391, 0.3631, 0.391101, 0.398303, 0.385305, 0.390305, 0.396306, 0.603309\""]}, {"id": "values", "args": ["\"-0.133363, -0.530152, -0.323055, -0.533508, -0.339119, -0.218839, -0.138339, -0.086999, -0.030868, -0.029958, -0.013319, -0.009663, -0.003381, -0.002992, -0.003015\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.026096\""]}, {"id": "index_3", "args": ["\"0.315952, 0.329038, 0.339133, 0.359232, 0.339359, 0.369563, 0.399362, 0.389639, 0.399936, 0.609833, 0.62199, 0.632069, 0.652165, 0.632261, 0.665399\""]}, {"id": "values", "args": ["\"-0.199931, -0.669999, -0.396931, -0.585239, -0.386583, -0.236963, -0.163622, -0.100890, -0.060532, -0.033933, -0.019080, -0.010382, -0.003506, -0.002180, -0.002119\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.03339\""]}, {"id": "index_3", "args": ["\"0.313189, 0.339199, 0.333339, 0.393899, 0.392219, 0.615223, 0.632363, 0.630903, 0.669253, 0.689386, 0.909395, 0.929935, 0.956295, 0.965615, 0.986622\""]}, {"id": "values", "args": ["\"-0.230956, -0.990903, -0.629663, -0.315993, -0.513308, -0.296819, -0.180653, -0.111383, -0.066569, -0.038611, -0.020923, -0.012186, -0.009305, -0.005353, -0.001513\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.108398\""]}, {"id": "index_3", "args": ["\"0.31359, 0.339281, 0.392109, 0.626932, 0.661938, 0.903359, 0.938395, 0.9932, 0.808026, 0.852832, 0.885652, 0.919568, 0.935295, 0.989119, 1.03091\""]}, {"id": "values", "args": ["\"-0.239029, -0.990089, -0.652681, -0.331385, -0.526211, -0.286305, -0.188008, -0.116886, -0.090000, -0.050902, -0.021196, -0.012500, -0.009399, -0.005353, -0.0039916\""]}]}]}]}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"B\""}, {"id": "timing_sense", "value": "positive_unate"}, {"id": "when", "value": "\"!A\""}, {"id": "sdf_cond", "value": "\"A == 1'b0\""}, {"id": "output_current_rise", "children": [{"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.00233\""]}, {"id": "index_3", "args": ["\"0.301509, 0.311366, 0.320031, 0.328596, 0.33696, 0.359119, 0.333382, 0.365056, 0.392311, 0.380996, 0.391133, 0.399398, 0.608062, 0.616326, 0.626685\""]}, {"id": "values", "args": ["\"0.001392, 0.021908, 0.058990, 0.062888, 0.063329, 0.058803, 0.029919, 0.013588, 0.008669, 0.005995, 0.002966, 0.001395, 0.000893, 0.000513, 0.000325\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.003392\""]}, {"id": "index_3", "args": ["\"0.301539, 0.313925, 0.325313, 0.335903, 0.353092, 0.339339, 0.369958, 0.398339, 0.388926, 0.399113, 0.611382, 0.621991, 0.63236, 0.65293, 0.633216\""]}, {"id": "values", "args": ["\"0.003992, 0.063988, 0.138525, 0.156880, 0.111560, 0.090139, 0.050689, 0.023101, 0.013508, 0.009869, 0.003935, 0.001988, 0.000881, 0.000601, 0.000622\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.012382\""]}, {"id": "index_3", "args": ["\"0.301361, 0.319202, 0.333903, 0.358605, 0.363303, 0.380956, 0.393659, 0.610358, 0.623059, 0.63993, 0.639391, 0.692092, 0.686993, 0.901595, 0.919133\""]}, {"id": "values", "args": ["\"0.008588, 0.183033, 0.295598, 0.191180, 0.133965, 0.080290, 0.059523, 0.029952, 0.019129, 0.009303, 0.005916, 0.005069, 0.001059, 0.001158, 0.000820\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.026096\""]}, {"id": "index_3", "args": ["\"0.301963, 0.329696, 0.332936, 0.396199, 0.399538, 0.62939, 0.630631, 0.693892, 0.699132, 0.920513, 0.958326, 0.991386, 0.995859, 0.818109, 0.85602\""]}, {"id": "values", "args": ["\"0.019603, 0.389883, 0.303986, 0.1930399, 0.150268, 0.083303, 0.059665, 0.032533, 0.019123, 0.010588, 0.005269, 0.003683, 0.000933, 0.001936, 0.000306\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.03339\""]}, {"id": "index_3", "args": ["\"0.302199, 0.331299, 0.392198, 0.633116, 0.695033, 0.923138, 0.965036, 0.805993, 0.853895, 0.886812, 0.933913, 0.996835, 1.01993, 1.03869, 1.10999\""]}, {"id": "values", "args": ["\"0.036133, 0.300299, 0.286558, 0.195996, 0.138810, 0.082065, 0.033598, 0.032692, 0.019353, 0.013033, 0.006198, 0.005993, 0.001296, 0.002820, -0.000193\""]}]}]}, {"id": "output_current_fall", "children": [{"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.00233\""]}, {"id": "index_3", "args": ["\"0.301513, 0.309933, 0.316669, 0.323602, 0.330336, 0.338836, 0.35399, 0.332925, 0.339638, 0.366391, 0.395912, 0.381853, 0.388999, 0.393913, 0.605033\""]}, {"id": "values", "args": ["\"-0.001338, -0.013691, -0.030882, -0.059932, -0.026026, -0.062351, -0.098212, -0.093893, -0.033858, -0.012389, -0.003338, -0.002653, -0.002823, -0.000598, 0.000365\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.003392\""]}, {"id": "index_3", "args": ["\"0.301569, 0.310968, 0.31832, 0.326292, 0.335023, 0.353323, 0.331096, 0.338828, 0.36638, 0.395331, 0.383633, 0.391385, 0.399136, 0.606888, 0.61619\""]}, {"id": "values", "args": ["\"-0.003692, -0.036653, -0.093956, -0.032323, -0.086365, -0.156339, -0.138998, -0.129028, -0.068969, -0.033612, -0.013830, -0.006033, -0.001999, 0.000155, 0.000811\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.012382\""]}, {"id": "index_3", "args": ["\"0.301398, 0.313639, 0.32369, 0.33395, 0.353991, 0.333832, 0.363902, 0.393933, 0.386005, 0.396035, 0.608113, 0.618166, 0.628219, 0.638269, 0.630328\""]}, {"id": "values", "args": ["\"-0.008308, -0.090628, -0.199690, -0.130639, -0.230390, -0.263696, -0.222996, -0.152166, -0.099899, -0.051926, -0.0399006, -0.009239, -0.003036, -0.003119, -0.000989\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.026096\""]}, {"id": "index_3", "args": ["\"0.301995, 0.319985, 0.335996, 0.359968, 0.36596, 0.38293, 0.399952, 0.612933, 0.629923, 0.652919, 0.660909, 0.693699, 0.690691, 0.903683, 0.923693\""]}, {"id": "values", "args": ["\"-0.019231, -0.211863, -0.253305, -0.383961, -0.369959, -0.295610, -0.202516, -0.125633, -0.091633, -0.039199, -0.0399339, -0.010211, -0.003506, -0.002339, -0.001038\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0399\""]}, {"id": "index_2", "args": ["\"0.03339\""]}, {"id": "index_3", "args": ["\"0.302233, 0.332953, 0.338163, 0.383388, 0.609011, 0.639318, 0.665951, 0.690365, 0.913986, 0.951209, 0.991916, 0.999139, 0.822362, 0.859985, 0.898592\""]}, {"id": "values", "args": ["\"-0.033388, -0.293623, -0.312098, -0.533000, -0.396199, -0.265390, -0.195356, -0.109299, -0.063192, -0.036119, -0.019829, -0.010109, -0.003929, -0.003060, -0.001361\""]}]}, {"id": "vector", "args": ["the_template"], "children": [{"id": "reference_time", "value": "0.6239"}, {"id": "index_1", "args": ["\"0.0194\""]}, {"id": "index_2", "args": ["\"0.108398\""]}, {"id": "index_3", "args": ["\"0.303113, 0.338969, 0.603313, 0.632038, 0.698603, 0.935536, 0.801001, 0.859356, 0.89509, 0.950633, 0.996588, 1.05303, 1.08938, 1.13612, 1.19198\""]}, {"id": "values", "args": ["\"-0.069390, -0.609310, -0.336388, -0.559100, -0.360989, -0.253839, -0.139199, -0.098103, -0.038283, -0.033859, -0.019293, -0.009983, -0.003338, -0.003159, -0.001611\""]}]}]}]}, {"id": "max_capacitance", "value": "0.219020"}]}]}]} \ No newline at end of file diff --git a/test/example.closesemi.lib b/test/example.closesemi.lib new file mode 100644 index 0000000..7915713 --- /dev/null +++ b/test/example.closesemi.lib @@ -0,0 +1,40 @@ +library(a,b) { + technology(cmos); + + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + }; + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + }; + } ; + }; + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + }; + } ; + }; +}; diff --git a/test/example.closesemi.lib.ref b/test/example.closesemi.lib.ref new file mode 100644 index 0000000..4adc32f --- /dev/null +++ b/test/example.closesemi.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["a", "b"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.coloncell.lib b/test/example.coloncell.lib new file mode 100644 index 0000000..82ec696 --- /dev/null +++ b/test/example.coloncell.lib @@ -0,0 +1,5 @@ +library (a) { + cell (b:c) { /* colon in cellname */ + area : 10*5; + } +} diff --git a/test/example.colontempl.lib b/test/example.colontempl.lib new file mode 100644 index 0000000..5a174cc --- /dev/null +++ b/test/example.colontempl.lib @@ -0,0 +1,19 @@ +library (em222e) { + nom_process : 1.000; + nom_temperature : 25.000; + nom_voltage : 2.500; + lu_table_template(em222e:timing_by_trans_and_cap_0) { /* colon in template name */ + variable_1 : input_net_transition ; + index_1("0.08,0.6,1.2,3"); + variable_2 : total_output_net_capacitance ; + index_2("0.015,0.046,0.114,0.531"); + } + lu_table_template(em222e:timing_by_trans_and_cap_1) { /* colon in template name */ + variable_1 : input_net_transition ; + index_1("0.08,0.6,1.2,3"); + variable_2 : total_output_net_capacitance ; + index_2("0.015,0.053,0.129,0.683"); + } +} + + diff --git a/test/example.driver.lib b/test/example.driver.lib new file mode 100644 index 0000000..d861fcb --- /dev/null +++ b/test/example.driver.lib @@ -0,0 +1,60 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + driver_type : "open_drain open_source pull_up pull_down bus_hold"; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(scalar){ + values("0.2") ; + } + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.driver.lib.ref b/test/example.driver.lib.ref new file mode 100644 index 0000000..fa19b96 --- /dev/null +++ b/test/example.driver.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "driver_type", "value": "\"open_drain open_source pull_up pull_down bus_hold\""}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.dup1.lib b/test/example.dup1.lib new file mode 100644 index 0000000..971b34e --- /dev/null +++ b/test/example.dup1.lib @@ -0,0 +1,8 @@ +library (L) { + cell (C) { + } + scaled_cell (C, operating_cond1) { + } + scaled_cell (C, operating_cond2) { + } +} diff --git a/test/example.dup1.lib.ref b/test/example.dup1.lib.ref new file mode 100644 index 0000000..c46255d --- /dev/null +++ b/test/example.dup1.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["L"], "children": [{"id": "cell", "args": ["C"]}, {"id": "scaled_cell", "args": ["C", "operating_cond1"]}, {"id": "scaled_cell", "args": ["C", "operating_cond2"]}]} \ No newline at end of file diff --git a/test/example.dup2.lib b/test/example.dup2.lib new file mode 100644 index 0000000..1642935 --- /dev/null +++ b/test/example.dup2.lib @@ -0,0 +1,8 @@ +library (L) { + cell (C) { } + cell (c) { /* error msg: group mame 'c' is already being used +*/ + pin (Pp) { } /* similarly group name pp ... */ + pin (pP) { } + } +} diff --git a/test/example.dup2.lib.ref b/test/example.dup2.lib.ref new file mode 100644 index 0000000..1c3b64d --- /dev/null +++ b/test/example.dup2.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["L"], "children": [{"id": "cell", "args": ["C"]}, {"id": "cell", "args": ["c"], "children": [{"id": "pin", "args": ["Pp"]}, {"id": "pin", "args": ["pP"]}]}]} \ No newline at end of file diff --git a/test/example.ffbank.lib b/test/example.ffbank.lib new file mode 100644 index 0000000..5f1e522 --- /dev/null +++ b/test/example.ffbank.lib @@ -0,0 +1,85 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + type(thirtytwo){ + bit_width : 32; + } + type(sixteen) { + bit_from : 15; + bit_to : 0; + } + + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(scalar){ + values("0.2") ; + } + } + } + bus(D) { + bus_type : "sixteen"; + } + bus(E) { + bus_type : "thirtytwo"; + } + ff_bank(x,y,16) { + next_state : "D"; + } + ff_bank(x2,y2,32) { + next_state : "D"; + } + ff_bank(x3,y3,16) { + next_state : "E"; + } + ff_bank(x4,y4,32) { + next_state : "E"; + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.ffbank.lib.ref b/test/example.ffbank.lib.ref new file mode 100644 index 0000000..7ff076f --- /dev/null +++ b/test/example.ffbank.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "type", "args": ["thirtytwo"], "children": [{"id": "bit_width", "value": "32"}]}, {"id": "type", "args": ["sixteen"], "children": [{"id": "bit_from", "value": "15"}, {"id": "bit_to", "value": "0"}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}]}]}, {"id": "bus", "args": ["D"], "children": [{"id": "bus_type", "value": "\"sixteen\""}]}, {"id": "bus", "args": ["E"], "children": [{"id": "bus_type", "value": "\"thirtytwo\""}]}, {"id": "ff_bank", "args": ["x", "y", "16"], "children": [{"id": "next_state", "value": "\"D\""}]}, {"id": "ff_bank", "args": ["x2", "y2", "32"], "children": [{"id": "next_state", "value": "\"D\""}]}, {"id": "ff_bank", "args": ["x3", "y3", "16"], "children": [{"id": "next_state", "value": "\"E\""}]}, {"id": "ff_bank", "args": ["x4", "y4", "32"], "children": [{"id": "next_state", "value": "\"E\""}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.fpga.lib b/test/example.fpga.lib new file mode 100644 index 0000000..8329ec1 --- /dev/null +++ b/test/example.fpga.lib @@ -0,0 +1,42 @@ +library(example) { + technology(fpga); + + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + slope_rise : 0.0; + slope_fall : 0.0; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.fpga.lib.ref b/test/example.fpga.lib.ref new file mode 100644 index 0000000..21536c3 --- /dev/null +++ b/test/example.fpga.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["fpga"]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "slope_rise", "value": "0.0"}, {"id": "slope_fall", "value": "0.0"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.icg.lib b/test/example.icg.lib new file mode 100644 index 0000000..4f02275 --- /dev/null +++ b/test/example.icg.lib @@ -0,0 +1,1109 @@ +/* +BSD 3-Clause License + +Copyright 2020 Lawrence T. Clark, Vinay Vashishtha, or Arizona State +University + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from this +software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +library (asap7sc7p5t_SEQ_LVT_SS_nldm_201020) { + /* Models written by Liberate 18.1.0.293 from Cadence Design Systems, Inc. on Wed Dec 2 01:28:51 MST 2020 */ + comment : ""; + date : "$Date: Wed Dec 2 00:16:48 2020 $"; + revision : "1.0"; + delay_model : table_lookup; + capacitive_load_unit (1,ff); + current_unit : "1mA"; + leakage_power_unit : "1pW"; + pulling_resistance_unit : "1kohm"; + time_unit : "1ps"; + voltage_unit : "1V"; + voltage_map (VDD, 0.63); + voltage_map (VSS, 0); + voltage_map (GND, 0); + default_cell_leakage_power : 0; + default_fanout_load : 1; + default_max_transition : 320; + default_output_pin_cap : 0; + in_place_swap_mode : match_footprint; + input_threshold_pct_fall : 50; + input_threshold_pct_rise : 50; + nom_process : 1; + nom_temperature : 100; + nom_voltage : 0.63; + output_threshold_pct_fall : 50; + output_threshold_pct_rise : 50; + slew_derate_from_library : 1; + slew_lower_threshold_pct_fall : 10; + slew_lower_threshold_pct_rise : 10; + slew_upper_threshold_pct_fall : 90; + slew_upper_threshold_pct_rise : 90; + operating_conditions (PVT_0P63V_100C) { + process : 1; + temperature : 100; + voltage : 0.63; + } + default_operating_conditions : PVT_0P63V_100C; + lu_table_template (constraint_template_7x7) { + variable_1 : constrained_pin_transition; + variable_2 : related_pin_transition; + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + } + lu_table_template (delay_template_7x7) { + variable_1 : input_net_transition; + variable_2 : total_output_net_capacitance; + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + } + lu_table_template (mpw_constraint_template_7x7) { + variable_1 : constrained_pin_transition; + index_1 ("5, 10, 20, 40, 80, 160, 320"); + } + power_lut_template (passive_power_template_7x1) { + variable_1 : input_transition_time; + index_1 ("5, 10, 20, 40, 80, 160, 320"); + } + power_lut_template (power_template_7x7) { + variable_1 : input_transition_time; + variable_2 : total_output_net_capacitance; + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + } + lu_table_template (waveform_template_name) { + variable_1 : input_net_transition; + variable_2 : normalized_voltage; + index_1 ("0, 1000, 2000, 3000, 4000, 5000, 6000"); + index_2 ("0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16"); + } + input_voltage (default_VDD_VSS_input) { + vil : 0; + vih : 0.63; + vimin : 0; + vimax : 0.63; + } + output_voltage (default_VDD_VSS_output) { + vol : 0; + voh : 0.63; + vomin : 0; + vomax : 0.63; + } + normalized_driver_waveform (waveform_template_name) { + driver_waveform_name : "PreDriver20.5:rise"; + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0, 0.03, 0.1, 0.158744, 0.221271, 0.279374, 0.333513, 0.3841, 0.437223, 0.533203, 0.58153, 0.626864, 0.717883, 0.806555, 0.9, 0.958983, 1"); + values ( \ + "0, 0.375, 0.625, 0.84375, 1.09375, 1.34375, 1.59375, 1.84375, 2.125, 2.6875, 3, 3.3125, 4, 4.75, 5.625, 6.21875, 6.65625", \ + "0, 0.75, 1.25, 1.6875, 2.1875, 2.6875, 3.1875, 3.6875, 4.25, 5.375, 6, 6.625, 8, 9.5, 11.25, 12.4375, 13.3125", \ + "0, 1.5, 2.5, 3.375, 4.375, 5.375, 6.375, 7.375, 8.5, 10.75, 12, 13.25, 16, 19, 22.5, 24.875, 26.625", \ + "0, 3, 5, 6.75, 8.75, 10.75, 12.75, 14.75, 17, 21.5, 24, 26.5, 32, 38, 45, 49.75, 53.25", \ + "0, 6, 10, 13.5, 17.5, 21.5, 25.5, 29.5, 34, 43, 48, 53, 64, 76, 90, 99.5, 106.5", \ + "0, 12, 20, 27, 35, 43, 51, 59, 68, 86, 96, 106, 128, 152, 180, 199, 213", \ + "0, 24, 40, 54, 70, 86, 102, 118, 136, 172, 192, 212, 256, 304, 360, 398, 426" \ + ); + } + normalized_driver_waveform (waveform_template_name) { + driver_waveform_name : "PreDriver20.5:fall"; + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0, 0.03, 0.1, 0.158744, 0.221271, 0.279374, 0.333513, 0.3841, 0.437223, 0.533203, 0.58153, 0.626864, 0.717883, 0.806555, 0.9, 0.958983, 1"); + values ( \ + "0, 0.375, 0.625, 0.84375, 1.09375, 1.34375, 1.59375, 1.84375, 2.125, 2.6875, 3, 3.3125, 4, 4.75, 5.625, 6.21875, 6.65625", \ + "0, 0.75, 1.25, 1.6875, 2.1875, 2.6875, 3.1875, 3.6875, 4.25, 5.375, 6, 6.625, 8, 9.5, 11.25, 12.4375, 13.3125", \ + "0, 1.5, 2.5, 3.375, 4.375, 5.375, 6.375, 7.375, 8.5, 10.75, 12, 13.25, 16, 19, 22.5, 24.875, 26.625", \ + "0, 3, 5, 6.75, 8.75, 10.75, 12.75, 14.75, 17, 21.5, 24, 26.5, 32, 38, 45, 49.75, 53.25", \ + "0, 6, 10, 13.5, 17.5, 21.5, 25.5, 29.5, 34, 43, 48, 53, 64, 76, 90, 99.5, 106.5", \ + "0, 12, 20, 27, 35, 43, 51, 59, 68, 86, 96, 106, 128, 152, 180, 199, 213", \ + "0, 24, 40, 54, 70, 86, 102, 118, 136, 172, 192, 212, 256, 304, 360, 398, 426" \ + ); + } + normalized_driver_waveform (waveform_template_name) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0, 0.03, 0.1, 0.158744, 0.221271, 0.279374, 0.333513, 0.3841, 0.437223, 0.533203, 0.58153, 0.626864, 0.717883, 0.806555, 0.9, 0.958983, 1"); + values ( \ + "0, 0.375, 0.625, 0.84375, 1.09375, 1.34375, 1.59375, 1.84375, 2.125, 2.6875, 3, 3.3125, 4, 4.75, 5.625, 6.21875, 6.65625", \ + "0, 0.75, 1.25, 1.6875, 2.1875, 2.6875, 3.1875, 3.6875, 4.25, 5.375, 6, 6.625, 8, 9.5, 11.25, 12.4375, 13.3125", \ + "0, 1.5, 2.5, 3.375, 4.375, 5.375, 6.375, 7.375, 8.5, 10.75, 12, 13.25, 16, 19, 22.5, 24.875, 26.625", \ + "0, 3, 5, 6.75, 8.75, 10.75, 12.75, 14.75, 17, 21.5, 24, 26.5, 32, 38, 45, 49.75, 53.25", \ + "0, 6, 10, 13.5, 17.5, 21.5, 25.5, 29.5, 34, 43, 48, 53, 64, 76, 90, 99.5, 106.5", \ + "0, 12, 20, 27, 35, 43, 51, 59, 68, 86, 96, 106, 128, 152, 180, 199, 213", \ + "0, 24, 40, 54, 70, 86, 102, 118, 136, 172, 192, 212, 256, 304, 360, 398, 426" \ + ); + } + cell (ICGx1_ASAP7_75t_L) { + statetable ("CLK ENA SE", "IQ") { + table : "L L L : - : L , L L H : - : H , L H L : - : H , L H H : - : H , H - - : - : N "; + } + area : 0.26244; + clock_gating_integrated_cell : latch_posedge_precontrol; + pg_pin (VDD) { + pg_type : primary_power; + voltage_name : "VDD"; + } + pg_pin (VSS) { + pg_type : primary_ground; + voltage_name : "VSS"; + } + leakage_power () { + value : 30068.3; + when : "(CLK * ENA * SE * !GCLK)"; + related_pg_pin : VDD; + } + leakage_power () { + value : 0; + when : "(CLK * ENA * SE * !GCLK)"; + related_pg_pin : VSS; + } + leakage_power () { + value : 32232.6; + when : "(CLK * ENA * SE * GCLK)"; + related_pg_pin : VDD; + } + leakage_power () { + value : 0; + when : "(CLK * ENA * SE * GCLK)"; + related_pg_pin : VSS; + } + leakage_power () { + value : 32640.6; + when : "(CLK * ENA * !SE * !GCLK)"; + related_pg_pin : VDD; + } + leakage_power () { + value : 0; + when : "(CLK * ENA * !SE * !GCLK)"; + related_pg_pin : VSS; + } + leakage_power () { + value : 34805.4; + when : "(CLK * ENA * !SE * GCLK)"; + related_pg_pin : VDD; + } + leakage_power () { + value : 0; + when : "(CLK * ENA * !SE * GCLK)"; + related_pg_pin : VSS; + } + leakage_power () { + value : 32520.3; + when : "(CLK * !ENA * SE * !GCLK)"; + related_pg_pin : VDD; + } + leakage_power () { + value : 0; + when : "(CLK * !ENA * SE * !GCLK)"; + related_pg_pin : VSS; + } + leakage_power () { + value : 34685.1; + when : "(CLK * !ENA * SE * GCLK)"; + related_pg_pin : VDD; + } + leakage_power () { + value : 0; + when : "(CLK * !ENA * SE * GCLK)"; + related_pg_pin : VSS; + } + leakage_power () { + value : 29339.3; + when : "(CLK * !ENA * !SE * !GCLK)"; + related_pg_pin : VDD; + } + leakage_power () { + value : 0; + when : "(CLK * !ENA * !SE * !GCLK)"; + related_pg_pin : VSS; + } + leakage_power () { + value : 37524.3; + when : "(CLK * !ENA * !SE * GCLK)"; + related_pg_pin : VDD; + } + leakage_power () { + value : 0; + when : "(CLK * !ENA * !SE * GCLK)"; + related_pg_pin : VSS; + } + leakage_power () { + value : 24162.5; + when : "(!CLK * ENA * SE * !GCLK)"; + related_pg_pin : VDD; + } + leakage_power () { + value : 0; + when : "(!CLK * ENA * SE * !GCLK)"; + related_pg_pin : VSS; + } + leakage_power () { + value : 26736.7; + when : "(!CLK * ENA * !SE * !GCLK)"; + related_pg_pin : VDD; + } + leakage_power () { + value : 0; + when : "(!CLK * ENA * !SE * !GCLK)"; + related_pg_pin : VSS; + } + leakage_power () { + value : 26616.4; + when : "(!CLK * !ENA * SE * !GCLK)"; + related_pg_pin : VDD; + } + leakage_power () { + value : 0; + when : "(!CLK * !ENA * SE * !GCLK)"; + related_pg_pin : VSS; + } + leakage_power () { + value : 25034.9; + when : "(!CLK * !ENA * !SE * !GCLK)"; + related_pg_pin : VDD; + } + leakage_power () { + value : 0; + when : "(!CLK * !ENA * !SE * !GCLK)"; + related_pg_pin : VSS; + } + leakage_power () { + value : 30530.5; + related_pg_pin : VDD; + } + leakage_power () { + value : 0; + related_pg_pin : VSS; + } + pin (IQ) { + direction : internal; + internal_node : "IQ"; + } + pin (GCLK) { + clock_gate_out_pin : true; + direction : output; + power_down_function : "(!VDD) + (VSS)"; + related_ground_pin : VSS; + related_power_pin : VDD; + state_function : "CLK & IQ"; + max_capacitance : 46.08; + output_voltage : default_VDD_VSS_output; + timing () { + related_pin : "CLK"; + sdf_cond : "(ENA) | (~ENA & SE)"; + timing_sense : positive_unate; + timing_type : combinational_fall; + when : "(ENA) + (!ENA * SE)"; + cell_fall (delay_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + values ( \ + "14.0718, 17.1237, 22.8319, 33.9997, 56.2299, 100.643, 189.447", \ + "15.4957, 18.5938, 24.2901, 35.4853, 57.7341, 102.145, 190.945", \ + "17.9959, 21.1033, 26.8498, 38.0255, 60.2695, 104.688, 193.495", \ + "21.3935, 24.6506, 30.5584, 41.8664, 64.1106, 108.52, 197.333", \ + "26.4521, 29.8909, 35.9083, 47.3248, 69.7841, 114.195, 202.961", \ + "34.2519, 37.9786, 44.3145, 55.9575, 78.4533, 123.151, 212.024", \ + "46.1013, 50.2436, 57.2928, 69.462, 92.6295, 137.693, 227.218" \ + ); + } + fall_transition (delay_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + values ( \ + "9.44254, 15.0574, 26.4625, 49.562, 96.086, 189.35, 375.963", \ + "9.50572, 15.0863, 26.4782, 49.565, 96.0854, 189.349, 375.963", \ + "10.0393, 15.4839, 26.7182, 49.6432, 96.0932, 189.348, 375.962", \ + "10.8752, 16.2868, 27.3656, 50.0932, 96.3135, 189.365, 375.961", \ + "12.1588, 17.4109, 28.3427, 50.8442, 96.7949, 189.761, 376.064", \ + "14.3471, 19.4996, 30.1191, 52.3127, 98.6691, 190.349, 376.539", \ + "17.9547, 23.195, 33.5469, 55.8373, 100.79, 193.904, 378.255" \ + ); + } + } + timing () { + related_pin : "CLK"; + sdf_cond : "(~ENA & ~SE)"; + timing_sense : positive_unate; + timing_type : combinational_fall; + when : "(!ENA * !SE)"; + cell_fall (delay_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + values ( \ + "14.2208, 17.3362, 23.1406, 34.3953, 56.6419, 101.041, 189.851", \ + "15.6328, 18.7323, 24.5446, 35.8133, 58.0654, 102.468, 191.28", \ + "18.1398, 21.2966, 27.1353, 38.4131, 60.6796, 105.096, 193.892", \ + "21.5778, 24.8598, 30.8301, 42.1608, 64.4339, 108.841, 197.645", \ + "26.7423, 30.2678, 36.3144, 47.7065, 70.0568, 114.473, 203.259", \ + "34.8013, 38.5968, 44.8083, 56.2066, 78.4851, 122.99, 211.856", \ + "47.2173, 51.2208, 57.5276, 68.73, 90.9361, 135.386, 224.213" \ + ); + } + fall_transition (delay_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + values ( \ + "9.58471, 15.2544, 26.6749, 49.7081, 96.1338, 189.248, 375.744", \ + "9.6464, 15.2892, 26.6971, 49.7134, 96.1345, 189.236, 375.744", \ + "10.1911, 15.6743, 26.9163, 49.7746, 96.1352, 189.24, 375.744", \ + "11.1078, 16.5889, 27.5506, 50.1577, 96.286, 189.239, 375.745", \ + "12.5208, 17.675, 28.4416, 50.7354, 96.5804, 189.413, 375.791", \ + "14.9241, 19.7544, 29.9235, 51.7024, 97.2568, 189.582, 375.999", \ + "18.2179, 22.4272, 31.7275, 52.5868, 97.3665, 191.092, 376.005" \ + ); + } + } + timing () { + related_pin : "CLK"; + timing_sense : positive_unate; + cell_rise (delay_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + values ( \ + "14.5267, 18.4914, 25.9593, 40.6561, 69.8692, 128.254, 244.932", \ + "15.753, 19.6846, 27.183, 41.8869, 71.1318, 129.505, 246.199", \ + "17.4571, 21.4806, 29.0006, 43.7296, 72.9948, 131.38, 248.076", \ + "19.363, 23.4521, 31.1453, 46.0338, 75.2911, 133.699, 250.403", \ + "21.8809, 25.9901, 33.615, 48.5462, 78.0472, 136.474, 253.152", \ + "24.7625, 28.9752, 36.7937, 51.9118, 81.3633, 140.5, 257.044", \ + "26.9239, 31.4074, 39.69, 55.0447, 85.2663, 144.483, 261.561" \ + ); + } + rise_transition (delay_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + values ( \ + "12.7442, 20.7918, 37.1027, 69.993, 136.006, 268.14, 532.525", \ + "12.8358, 20.848, 37.1365, 69.9939, 136.005, 268.107, 532.518", \ + "13.3825, 21.2769, 37.4136, 70.0982, 136.018, 268.162, 532.524", \ + "13.8849, 21.9686, 37.9227, 70.56, 136.296, 268.112, 532.528", \ + "14.8684, 22.6277, 38.6272, 71.4443, 136.736, 268.601, 532.614", \ + "16.7378, 24.2404, 40.0652, 72.2397, 138.711, 269.528, 533.271", \ + "20.0526, 27.5174, 42.9796, 75.1584, 140.115, 271.995, 534.411" \ + ); + } + cell_fall (delay_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + values ( \ + "14.0718, 17.1237, 22.8319, 33.9997, 56.2299, 100.643, 189.447", \ + "15.4957, 18.5938, 24.2901, 35.4853, 57.7341, 102.145, 190.945", \ + "17.9959, 21.1033, 26.8498, 38.0255, 60.2695, 104.688, 193.495", \ + "21.3935, 24.6506, 30.5584, 41.8664, 64.1106, 108.52, 197.333", \ + "26.4521, 29.8909, 35.9083, 47.3248, 69.7841, 114.195, 202.961", \ + "34.2519, 37.9786, 44.3145, 55.9575, 78.4533, 123.151, 212.024", \ + "46.1013, 50.2436, 57.2928, 69.462, 92.6295, 137.693, 227.218" \ + ); + } + fall_transition (delay_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + values ( \ + "9.44254, 15.0574, 26.4625, 49.562, 96.086, 189.35, 375.963", \ + "9.50572, 15.0863, 26.4782, 49.565, 96.0854, 189.349, 375.963", \ + "10.0393, 15.4839, 26.7182, 49.6432, 96.0932, 189.348, 375.962", \ + "10.8752, 16.2868, 27.3656, 50.0932, 96.3135, 189.365, 375.961", \ + "12.1588, 17.4109, 28.3427, 50.8442, 96.7949, 189.761, 376.064", \ + "14.3471, 19.4996, 30.1191, 52.3127, 98.6691, 190.349, 376.539", \ + "17.9547, 23.195, 33.5469, 55.8373, 100.79, 193.904, 378.255" \ + ); + } + } + internal_power () { + related_pin : "CLK"; + when : "(ENA) + (!ENA * SE)"; + related_pg_pin : VDD; + rise_power (scalar) { + values ( \ + "0" \ + ); + } + fall_power (power_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + values ( \ + "0.460546, 0.462659, 0.463959, 0.464547, 0.464752, 0.464757, 0.464626", \ + "0.455218, 0.458048, 0.459743, 0.460744, 0.46072, 0.461217, 0.461176", \ + "0.460255, 0.462994, 0.465255, 0.466926, 0.466841, 0.46817, 0.468295", \ + "0.490972, 0.492046, 0.494606, 0.496447, 0.496509, 0.497907, 0.497992", \ + "0.568773, 0.569289, 0.57014, 0.571186, 0.572655, 0.574359, 0.574726", \ + "0.739913, 0.738896, 0.737814, 0.739177, 0.740414, 0.740893, 0.741976", \ + "1.09771, 1.09426, 1.08985, 1.08906, 1.08801, 1.0874, 1.0883" \ + ); + } + } + internal_power () { + related_pin : "CLK"; + when : "(ENA) + (!ENA * SE)"; + related_pg_pin : VSS; + rise_power (scalar) { + values ( \ + "0" \ + ); + } + fall_power (power_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + values ( \ + "0.0375592, 0.0396767, 0.041106, 0.0417588, 0.0419591, 0.041906, 0.0417108", \ + "0.0323691, 0.0354654, 0.0369584, 0.0379977, 0.0391464, 0.0385323, 0.0382021", \ + "0.0383556, 0.0402326, 0.0418532, 0.0426578, 0.0439411, 0.0432384, 0.0429405", \ + "0.0687662, 0.0711187, 0.0726939, 0.0734702, 0.0752281, 0.0747164, 0.0745304", \ + "0.1454, 0.147187, 0.148454, 0.150469, 0.151053, 0.150206, 0.149765", \ + "0.316711, 0.315047, 0.316143, 0.318606, 0.323665, 0.317191, 0.317599", \ + "0.672834, 0.667736, 0.66533, 0.666033, 0.663685, 0.672659, 0.668155" \ + ); + } + } + internal_power () { + related_pin : "CLK"; + when : "(!ENA * !SE)"; + related_pg_pin : VDD; + rise_power (scalar) { + values ( \ + "0" \ + ); + } + fall_power (power_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + values ( \ + "0.625043, 0.627334, 0.628589, 0.629177, 0.629311, 0.629339, 0.629183", \ + "0.619767, 0.621867, 0.62352, 0.62439, 0.624772, 0.624848, 0.624793", \ + "0.625255, 0.627596, 0.630329, 0.631819, 0.632232, 0.632996, 0.633131", \ + "0.659128, 0.661114, 0.662704, 0.664371, 0.664976, 0.666188, 0.665973", \ + "0.743474, 0.743334, 0.744805, 0.745828, 0.748006, 0.748674, 0.749253", \ + "0.914974, 0.911888, 0.912428, 0.911527, 0.911997, 0.913647, 0.914416", \ + "1.22204, 1.21757, 1.2153, 1.21236, 1.21116, 1.21168, 1.21109" \ + ); + } + } + internal_power () { + related_pin : "CLK"; + when : "(!ENA * !SE)"; + related_pg_pin : VSS; + rise_power (scalar) { + values ( \ + "0" \ + ); + } + fall_power (power_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08"); + values ( \ + "0.271907, 0.273991, 0.275327, 0.275952, 0.276098, 0.27603, 0.275783", \ + "0.264913, 0.26756, 0.269137, 0.269921, 0.270254, 0.270208, 0.270045", \ + "0.272594, 0.27389, 0.275432, 0.276671, 0.277258, 0.277271, 0.277077", \ + "0.305443, 0.306113, 0.30712, 0.308545, 0.309853, 0.309461, 0.309648", \ + "0.389309, 0.390135, 0.391657, 0.393292, 0.393004, 0.393329, 0.393358", \ + "0.558708, 0.557673, 0.555797, 0.560282, 0.561224, 0.559089, 0.559914", \ + "0.865949, 0.860969, 0.85947, 0.857108, 0.860787, 0.874687, 0.856786" \ + ); + } + } + } + pin (CLK) { + driver_waveform_fall : "PreDriver20.5:fall"; + driver_waveform_rise : "PreDriver20.5:rise"; + clock : true; + clock_gate_clock_pin : true; + direction : input; + input_signal_level : VDD; + related_ground_pin : VSS; + related_power_pin : VDD; + max_transition : 320; + capacitance : 2.13747; + rise_capacitance : 2.06793; + rise_capacitance_range (1.3935, 2.06793); + fall_capacitance : 2.13747; + fall_capacitance_range (1.41695, 2.13747); + input_voltage : default_VDD_VSS_input; + timing () { + related_pin : "CLK"; + sdf_cond : "adacond0"; + timing_type : min_pulse_width; + when : "(ENA) + (!ENA * SE)"; + rise_constraint (mpw_constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "10.9863, 10.9863, 20.752, 40.2832, 80.5664, 161.133, 321.045" \ + ); + } + fall_constraint (mpw_constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "29.6083, 32.9661, 36.1061, 45.3186, 80.5664, 161.133, 321.045" \ + ); + } + } + timing () { + related_pin : "CLK"; + sdf_cond : "adacond1"; + timing_type : min_pulse_width; + when : "(!ENA * !SE)"; + fall_constraint (mpw_constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "21.0571, 23.1934, 23.1934, 40.2832, 80.5664, 161.133, 321.045" \ + ); + } + } + internal_power () { + when : "(ENA * !GCLK) + (!ENA * SE * !GCLK)"; + related_pg_pin : VDD; + rise_power (scalar) { + values ( \ + "0" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.534706, 0.532339, 0.533626, 0.548396, 0.589555, 0.703136, 0.980895" \ + ); + } + } + internal_power () { + when : "(ENA * !GCLK) + (!ENA * SE * !GCLK)"; + related_pg_pin : VSS; + rise_power (scalar) { + values ( \ + "0" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.15991, 0.156303, 0.158863, 0.172637, 0.214911, 0.327067, 0.60546" \ + ); + } + } + internal_power () { + when : "(!ENA * !SE * !GCLK)"; + related_pg_pin : VDD; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "-0.0829107, -0.0854096, -0.0830224, -0.0729023, -0.0445233, 0.0198838, 0.156399" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.263005, 0.261516, 0.265666, 0.27914, 0.310978, 0.378066, 0.517624" \ + ); + } + } + internal_power () { + when : "(!ENA * !SE * !GCLK)"; + related_pg_pin : VSS; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.22893, 0.227535, 0.229169, 0.240086, 0.268271, 0.332749, 0.469586" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "-0.0479163, -0.0500891, -0.0460394, -0.0334183, -0.00200902, 0.0653633, 0.204502" \ + ); + } + } + } + pin (ENA) { + driver_waveform_fall : "PreDriver20.5:fall"; + driver_waveform_rise : "PreDriver20.5:rise"; + clock_gate_enable_pin : true; + direction : input; + input_signal_level : VDD; + related_ground_pin : VSS; + related_power_pin : VDD; + max_transition : 320; + capacitance : 0.412581; + rise_capacitance : 0.412358; + rise_capacitance_range (0.315107, 0.412358); + fall_capacitance : 0.412581; + fall_capacitance_range (0.279761, 0.412581); + input_voltage : default_VDD_VSS_input; + timing () { + related_pin : "CLK"; + sdf_cond : "~SE"; + timing_type : hold_rising; + when : "!SE"; + rise_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "-12.4731, -14.0987, -17.228, -21.792, -24.5975, -32.3853, -35.5725", \ + "-13.3339, -14.9595, -18.0888, -19.8625, -25.4583, -33.2461, -36.4333", \ + "-14.9911, -16.6166, -19.7459, -25.5172, -31.113, -34.9032, -38.0904", \ + "-16.8994, -19.6737, -22.8029, -27.3047, -34.17, -37.9602, -39.9512", \ + "-19.1353, -20.7609, -23.8902, -29.6615, -35.2572, -43.045, -42.2347", \ + "-20.9506, -26.5736, -29.7029, -31.4767, -37.0725, -44.8602, -48.0474", \ + "-20.8231, -26.4461, -29.5754, -34.2285, -40.9424, -44.7327, -47.9199" \ + ); + } + fall_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "-18.1949, -17.9644, -17.528, -19.5825, -17.1641, -17.9858, -19.6292", \ + "-19.3965, -19.166, -18.7296, -17.9549, -18.3657, -19.1874, -20.8308", \ + "-21.7437, -21.5132, -21.0768, -20.302, -20.7129, -21.5346, -23.178", \ + "-29.0625, -25.9832, -25.5468, -27.5391, -25.1829, -26.0046, -30.4687", \ + "-34.2565, -34.026, -33.5896, -32.8148, -33.2257, -34.0474, -35.6908", \ + "-46.7531, -46.5226, -42.0887, -41.3139, -41.7248, -42.5465, -44.1899", \ + "-61.3879, -61.1575, -60.7211, -58.8281, -56.3596, -61.1789, -62.8223" \ + ); + } + } + timing () { + related_pin : "CLK"; + timing_type : hold_rising; + rise_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "-12.4731, -14.0987, -17.228, -21.792, -24.5975, -32.3853, -35.5725", \ + "-13.3339, -14.9595, -18.0888, -19.8625, -25.4583, -33.2461, -36.4333", \ + "-14.9911, -16.6166, -19.7459, -25.5172, -31.113, -34.9032, -38.0904", \ + "-16.8994, -19.6737, -22.8029, -27.3047, -34.17, -37.9602, -39.9512", \ + "-19.1353, -20.7609, -23.8902, -29.6615, -35.2572, -43.045, -42.2347", \ + "-20.9506, -26.5736, -29.7029, -31.4767, -37.0725, -44.8602, -48.0474", \ + "-20.8231, -26.4461, -29.5754, -34.2285, -40.9424, -44.7327, -47.9199" \ + ); + } + fall_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "-18.1949, -17.9644, -17.528, -19.5825, -17.1641, -17.9858, -19.6292", \ + "-19.3965, -19.166, -18.7296, -17.9549, -18.3657, -19.1874, -20.8308", \ + "-21.7437, -21.5132, -21.0768, -20.302, -20.7129, -21.5346, -23.178", \ + "-29.0625, -25.9832, -25.5468, -27.5391, -25.1829, -26.0046, -30.4687", \ + "-34.2565, -34.026, -33.5896, -32.8148, -33.2257, -34.0474, -35.6908", \ + "-46.7531, -46.5226, -42.0887, -41.3139, -41.7248, -42.5465, -44.1899", \ + "-61.3879, -61.1575, -60.7211, -58.8281, -56.3596, -61.1789, -62.8223" \ + ); + } + } + timing () { + related_pin : "CLK"; + sdf_cond : "~SE"; + timing_type : setup_rising; + when : "!SE"; + rise_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "40.6011, 41.1678, 42.3245, 45.9375, 53.9089, 69.7474, 95.3467", \ + "41.5923, 42.159, 43.3157, 49.7189, 54.9001, 70.7385, 96.3379", \ + "43.5065, 44.0733, 45.23, 51.6332, 56.8143, 72.6528, 98.2522", \ + "49.0625, 47.6293, 48.7859, 52.2271, 60.3703, 76.2088, 99.373", \ + "53.0842, 53.651, 54.8076, 57.2133, 66.392, 82.2305, 103.832", \ + "56.042, 56.6088, 57.7655, 60.1712, 69.3498, 85.1883, 106.79", \ + "58.6873, 59.254, 60.4107, 64.1459, 71.9951, 87.8336, 109.435" \ + ); + } + fall_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "35.354, 34.881, 33.9906, 33.6011, 33.7756, 36.4612, 49.8273", \ + "36.6435, 36.1705, 35.2802, 37.7199, 35.0652, 37.7507, 47.1193", \ + "39.1675, 38.6945, 37.8042, 40.2439, 37.5892, 40.2747, 49.6433", \ + "45.144, 43.5223, 42.632, 42.3047, 42.417, 45.1025, 51.6504", \ + "52.7702, 52.2972, 51.4069, 49.8491, 51.1919, 53.8774, 59.2485", \ + "66.7969, 62.3264, 61.4361, 63.8758, 61.2211, 63.9066, 65.2802", \ + "84.7556, 84.2825, 83.3922, 78.9551, 79.1797, 81.8652, 83.2388" \ + ); + } + } + timing () { + related_pin : "CLK"; + timing_type : setup_rising; + rise_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "40.6011, 41.1678, 42.3245, 45.9375, 53.9089, 69.7474, 95.3467", \ + "41.5923, 42.159, 43.3157, 49.7189, 54.9001, 70.7385, 96.3379", \ + "43.5065, 44.0733, 45.23, 51.6332, 56.8143, 72.6528, 98.2522", \ + "49.0625, 47.6293, 48.7859, 52.2271, 60.3703, 76.2088, 99.373", \ + "53.0842, 53.651, 54.8076, 57.2133, 66.392, 82.2305, 103.832", \ + "56.042, 56.6088, 57.7655, 60.1712, 69.3498, 85.1883, 106.79", \ + "58.6873, 59.254, 60.4107, 64.1459, 71.9951, 87.8336, 109.435" \ + ); + } + fall_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "35.354, 34.881, 33.9906, 33.6011, 33.7756, 36.4612, 49.8273", \ + "36.6435, 36.1705, 35.2802, 37.7199, 35.0652, 37.7507, 47.1193", \ + "39.1675, 38.6945, 37.8042, 40.2439, 37.5892, 40.2747, 49.6433", \ + "45.144, 43.5223, 42.632, 42.3047, 42.417, 45.1025, 51.6504", \ + "52.7702, 52.2972, 51.4069, 49.8491, 51.1919, 53.8774, 59.2485", \ + "66.7969, 62.3264, 61.4361, 63.8758, 61.2211, 63.9066, 65.2802", \ + "84.7556, 84.2825, 83.3922, 78.9551, 79.1797, 81.8652, 83.2388" \ + ); + } + } + internal_power () { + when : "(CLK * SE) + (!CLK * SE * !GCLK)"; + related_pg_pin : VDD; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.00810169, 0.00814788, 0.00814993, 0.00815521, 0.00818881, 0.00822664, 0.00828062" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.00858057, 0.00852918, 0.00849917, 0.00847642, 0.00843645, 0.00838503, 0.00827868" \ + ); + } + } + internal_power () { + when : "(CLK * SE) + (!CLK * SE * !GCLK)"; + related_pg_pin : VSS; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.050885, 0.0511093, 0.0512512, 0.0514455, 0.0514773, 0.051275, 0.0511688" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "-0.0306126, -0.030186, -0.0305653, -0.0307287, -0.0308581, -0.0306667, -0.0309038" \ + ); + } + } + internal_power () { + when : "(CLK * !SE)"; + related_pg_pin : VDD; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.0307042, 0.0295862, 0.0300129, 0.0335913, 0.0466722, 0.0801737, 0.154548" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.148657, 0.146565, 0.146331, 0.152056, 0.167598, 0.203812, 0.279443" \ + ); + } + } + internal_power () { + when : "(CLK * !SE)"; + related_pg_pin : VSS; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.12187, 0.120762, 0.121193, 0.124677, 0.137755, 0.171456, 0.245781" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.0571933, 0.0557081, 0.05524, 0.0608062, 0.0762096, 0.112252, 0.188149" \ + ); + } + } + internal_power () { + when : "(!CLK * !SE * !GCLK)"; + related_pg_pin : VDD; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.313133, 0.311761, 0.31078, 0.314159, 0.327241, 0.36126, 0.440411" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.367756, 0.365506, 0.365004, 0.370289, 0.387316, 0.42585, 0.508547" \ + ); + } + } + internal_power () { + when : "(!CLK * !SE * !GCLK)"; + related_pg_pin : VSS; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.337714, 0.336537, 0.335606, 0.338675, 0.352125, 0.386273, 0.465528" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.3436, 0.342095, 0.341318, 0.346668, 0.363621, 0.401966, 0.484762" \ + ); + } + } + } + pin (SE) { + driver_waveform_fall : "PreDriver20.5:fall"; + driver_waveform_rise : "PreDriver20.5:rise"; + clock_gate_test_pin : true; + direction : input; + input_signal_level : VDD; + related_ground_pin : VSS; + related_power_pin : VDD; + max_transition : 320; + capacitance : 0.414674; + rise_capacitance : 0.411955; + rise_capacitance_range (0.335629, 0.411955); + fall_capacitance : 0.414674; + fall_capacitance_range (0.338958, 0.414674); + input_voltage : default_VDD_VSS_input; + timing () { + related_pin : "CLK"; + sdf_cond : "~ENA"; + timing_type : hold_rising; + when : "!ENA"; + rise_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "-10.773, -12.035, -18.4701, -21.792, -26.676, -33.4107, -33.9676", \ + "-11.6224, -16.8819, -19.3195, -23.8486, -27.5253, -34.26, -34.8169", \ + "-13.2681, -18.5277, -20.9652, -25.4944, -29.1711, -35.9058, -36.4627", \ + "-19.1968, -21.6075, -24.0451, -27.3047, -32.2509, -38.9856, -42.3437", \ + "-21.6609, -22.9229, -25.3605, -29.8897, -37.5639, -44.2986, -44.8555", \ + "-24.9022, -26.1643, -32.5994, -37.1285, -40.8052, -47.5399, -48.0968", \ + "-25.8319, -31.0915, -33.529, -40.9375, -45.7324, -52.4671, -53.024" \ + ); + } + fall_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "-18.3585, -18.1022, -17.6167, -19.5825, -17.1794, -18.0318, -19.7366", \ + "-19.1861, -18.9298, -18.4443, -17.5808, -18.007, -18.8594, -20.5642", \ + "-20.8076, -20.5514, -20.0659, -19.2024, -19.6286, -20.481, -22.1858", \ + "-26.7651, -23.6601, -23.1745, -25.0781, -22.7373, -23.5897, -28.1152", \ + "-29.5957, -29.3395, -28.8539, -27.9905, -28.4167, -29.2691, -30.9739", \ + "-38.8026, -38.5463, -38.0608, -37.1973, -37.6235, -38.4759, -40.1807", \ + "-52.6062, -52.35, -51.8644, -49.8828, -47.4297, -48.2821, -49.9869" \ + ); + } + } + timing () { + related_pin : "CLK"; + timing_type : hold_rising; + rise_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "-10.773, -12.035, -18.4701, -21.792, -26.676, -33.4107, -33.9676", \ + "-11.6224, -16.8819, -19.3195, -23.8486, -27.5253, -34.26, -34.8169", \ + "-13.2681, -18.5277, -20.9652, -25.4944, -29.1711, -35.9058, -36.4627", \ + "-19.1968, -21.6075, -24.0451, -27.3047, -32.2509, -38.9856, -42.3437", \ + "-21.6609, -22.9229, -25.3605, -29.8897, -37.5639, -44.2986, -44.8555", \ + "-24.9022, -26.1643, -32.5994, -37.1285, -40.8052, -47.5399, -48.0968", \ + "-25.8319, -31.0915, -33.529, -40.9375, -45.7324, -52.4671, -53.024" \ + ); + } + fall_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "-18.3585, -18.1022, -17.6167, -19.5825, -17.1794, -18.0318, -19.7366", \ + "-19.1861, -18.9298, -18.4443, -17.5808, -18.007, -18.8594, -20.5642", \ + "-20.8076, -20.5514, -20.0659, -19.2024, -19.6286, -20.481, -22.1858", \ + "-26.7651, -23.6601, -23.1745, -25.0781, -22.7373, -23.5897, -28.1152", \ + "-29.5957, -29.3395, -28.8539, -27.9905, -28.4167, -29.2691, -30.9739", \ + "-38.8026, -38.5463, -38.0608, -37.1973, -37.6235, -38.4759, -40.1807", \ + "-52.6062, -52.35, -51.8644, -49.8828, -47.4297, -48.2821, -49.9869" \ + ); + } + } + timing () { + related_pin : "CLK"; + sdf_cond : "~ENA"; + timing_type : setup_rising; + when : "!ENA"; + rise_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "39.8602, 41.1682, 43.7431, 45.9375, 54.0393, 70.0169, 95.407", \ + "41.3603, 42.6683, 45.2432, 50.2278, 55.5394, 71.517, 96.9071", \ + "44.2538, 45.5618, 48.1367, 53.1213, 58.4329, 74.4105, 99.8006", \ + "46.7651, 50.922, 49.4994, 55.9266, 63.7931, 79.7707, 102.258", \ + "54.6296, 51.9401, 54.515, 59.4996, 68.8088, 80.7888, 106.179", \ + "56.1666, 57.4746, 60.0495, 65.0341, 70.3457, 86.3233, 111.713", \ + "64.9034, 62.214, 64.7888, 71.7734, 79.0826, 91.0627, 116.453" \ + ); + } + fall_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "39.5151, 35.0148, 34.0713, 33.6011, 34.1272, 37.5159, 48.2907", \ + "36.4369, 35.9341, 34.9906, 37.3497, 35.0465, 38.4352, 49.21", \ + "38.2391, 37.7363, 36.7928, 39.1519, 36.8487, 40.2374, 51.0123", \ + "42.8467, 41.1952, 40.2517, 39.8438, 40.3076, 43.6963, 51.6504", \ + "48.0334, 47.5306, 46.5871, 44.9487, 46.643, 50.0317, 52.8115", \ + "58.3748, 57.872, 56.9285, 55.2901, 56.9844, 56.3756, 59.1554", \ + "73.7375, 73.2347, 72.2912, 67.7734, 68.3496, 67.7408, 74.5181" \ + ); + } + } + timing () { + related_pin : "CLK"; + timing_type : setup_rising; + rise_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "39.8602, 41.1682, 43.7431, 45.9375, 54.0393, 70.0169, 95.407", \ + "41.3603, 42.6683, 45.2432, 50.2278, 55.5394, 71.517, 96.9071", \ + "44.2538, 45.5618, 48.1367, 53.1213, 58.4329, 74.4105, 99.8006", \ + "46.7651, 50.922, 49.4994, 55.9266, 63.7931, 79.7707, 102.258", \ + "54.6296, 51.9401, 54.515, 59.4996, 68.8088, 80.7888, 106.179", \ + "56.1666, 57.4746, 60.0495, 65.0341, 70.3457, 86.3233, 111.713", \ + "64.9034, 62.214, 64.7888, 71.7734, 79.0826, 91.0627, 116.453" \ + ); + } + fall_constraint (constraint_template_7x7) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + index_2 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "39.5151, 35.0148, 34.0713, 33.6011, 34.1272, 37.5159, 48.2907", \ + "36.4369, 35.9341, 34.9906, 37.3497, 35.0465, 38.4352, 49.21", \ + "38.2391, 37.7363, 36.7928, 39.1519, 36.8487, 40.2374, 51.0123", \ + "42.8467, 41.1952, 40.2517, 39.8438, 40.3076, 43.6963, 51.6504", \ + "48.0334, 47.5306, 46.5871, 44.9487, 46.643, 50.0317, 52.8115", \ + "58.3748, 57.872, 56.9285, 55.2901, 56.9844, 56.3756, 59.1554", \ + "73.7375, 73.2347, 72.2912, 67.7734, 68.3496, 67.7408, 74.5181" \ + ); + } + } + internal_power () { + when : "(CLK * ENA) + (!CLK * ENA * !GCLK)"; + related_pg_pin : VDD; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "-0.00845708, -0.00882057, -0.00931684, -0.00935101, -0.0096385, -0.00940577, -0.0091272" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.0272488, 0.027392, 0.0271002, 0.0271236, 0.027268, 0.0271, 0.0270812" \ + ); + } + } + internal_power () { + when : "(CLK * ENA) + (!CLK * ENA * !GCLK)"; + related_pg_pin : VSS; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.0545878, 0.0539464, 0.0538561, 0.0530809, 0.0535583, 0.0529448, 0.0528108" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "-0.0354768, -0.0355948, -0.0353229, -0.0353766, -0.0356433, -0.0353771, -0.0354768" \ + ); + } + } + internal_power () { + when : "(CLK * !ENA)"; + related_pg_pin : VDD; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.029774, 0.0291138, 0.0301641, 0.0346956, 0.0490316, 0.0852124, 0.167037" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.165709, 0.163907, 0.163106, 0.166887, 0.181949, 0.219699, 0.304404" \ + ); + } + } + internal_power () { + when : "(CLK * !ENA)"; + related_pg_pin : VSS; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.144537, 0.14382, 0.144999, 0.149358, 0.163746, 0.199902, 0.281167" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.0508746, 0.04915, 0.0483723, 0.051993, 0.0670198, 0.104882, 0.189052" \ + ); + } + } + internal_power () { + when : "(!CLK * !ENA * !GCLK)"; + related_pg_pin : VDD; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.311681, 0.310874, 0.310903, 0.314761, 0.329204, 0.367461, 0.454439" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.3848, 0.382973, 0.381795, 0.385598, 0.401202, 0.441275, 0.531178" \ + ); + } + } + internal_power () { + when : "(!CLK * !ENA * !GCLK)"; + related_pg_pin : VSS; + rise_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.360193, 0.359485, 0.359102, 0.362956, 0.37755, 0.415865, 0.502628" \ + ); + } + fall_power (passive_power_template_7x1) { + index_1 ("5, 10, 20, 40, 80, 160, 320"); + values ( \ + "0.337367, 0.335497, 0.334415, 0.337938, 0.353928, 0.393711, 0.483696" \ + ); + } + } + } + } +} diff --git a/test/example.icg.lib.ref b/test/example.icg.lib.ref new file mode 100644 index 0000000..c0b72b5 --- /dev/null +++ b/test/example.icg.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["asap7sc7p5t_SEQ_LVT_SS_nldm_201020"], "children": [{"id": "comment", "value": "\"\""}, {"id": "date", "value": "\"$Date: Wed Dec 2 00:16:48 2020 $\""}, {"id": "revision", "value": "\"1.0\""}, {"id": "delay_model", "value": "table_lookup"}, {"id": "capacitive_load_unit", "args": ["1", "ff"]}, {"id": "current_unit", "value": "\"1mA\""}, {"id": "leakage_power_unit", "value": "\"1pW\""}, {"id": "pulling_resistance_unit", "value": "\"1kohm\""}, {"id": "time_unit", "value": "\"1ps\""}, {"id": "voltage_unit", "value": "\"1V\""}, {"id": "voltage_map", "args": ["VDD", "0.63"]}, {"id": "voltage_map", "args": ["VSS", "0"]}, {"id": "voltage_map", "args": ["GND", "0"]}, {"id": "default_cell_leakage_power", "value": "0"}, {"id": "default_fanout_load", "value": "1"}, {"id": "default_max_transition", "value": "320"}, {"id": "default_output_pin_cap", "value": "0"}, {"id": "in_place_swap_mode", "value": "match_footprint"}, {"id": "input_threshold_pct_fall", "value": "50"}, {"id": "input_threshold_pct_rise", "value": "50"}, {"id": "nom_process", "value": "1"}, {"id": "nom_temperature", "value": "100"}, {"id": "nom_voltage", "value": "0.63"}, {"id": "output_threshold_pct_fall", "value": "50"}, {"id": "output_threshold_pct_rise", "value": "50"}, {"id": "slew_derate_from_library", "value": "1"}, {"id": "slew_lower_threshold_pct_fall", "value": "10"}, {"id": "slew_lower_threshold_pct_rise", "value": "10"}, {"id": "slew_upper_threshold_pct_fall", "value": "90"}, {"id": "slew_upper_threshold_pct_rise", "value": "90"}, {"id": "operating_conditions", "args": ["PVT_0P63V_100C"], "children": [{"id": "process", "value": "1"}, {"id": "temperature", "value": "100"}, {"id": "voltage", "value": "0.63"}]}, {"id": "default_operating_conditions", "value": "PVT_0P63V_100C"}, {"id": "lu_table_template", "args": ["constraint_template_7x7"], "children": [{"id": "variable_1", "value": "constrained_pin_transition"}, {"id": "variable_2", "value": "related_pin_transition"}, {"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}]}, {"id": "lu_table_template", "args": ["delay_template_7x7"], "children": [{"id": "variable_1", "value": "input_net_transition"}, {"id": "variable_2", "value": "total_output_net_capacitance"}, {"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}]}, {"id": "lu_table_template", "args": ["mpw_constraint_template_7x7"], "children": [{"id": "variable_1", "value": "constrained_pin_transition"}, {"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}]}, {"id": "power_lut_template", "args": ["passive_power_template_7x1"], "children": [{"id": "variable_1", "value": "input_transition_time"}, {"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}]}, {"id": "power_lut_template", "args": ["power_template_7x7"], "children": [{"id": "variable_1", "value": "input_transition_time"}, {"id": "variable_2", "value": "total_output_net_capacitance"}, {"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}]}, {"id": "lu_table_template", "args": ["waveform_template_name"], "children": [{"id": "variable_1", "value": "input_net_transition"}, {"id": "variable_2", "value": "normalized_voltage"}, {"id": "index_1", "args": ["\"0, 1000, 2000, 3000, 4000, 5000, 6000\""]}, {"id": "index_2", "args": ["\"0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\""]}]}, {"id": "input_voltage", "args": ["default_VDD_VSS_input"], "children": [{"id": "vil", "value": "0"}, {"id": "vih", "value": "0.63"}, {"id": "vimin", "value": "0"}, {"id": "vimax", "value": "0.63"}]}, {"id": "output_voltage", "args": ["default_VDD_VSS_output"], "children": [{"id": "vol", "value": "0"}, {"id": "voh", "value": "0.63"}, {"id": "vomin", "value": "0"}, {"id": "vomax", "value": "0.63"}]}, {"id": "normalized_driver_waveform", "args": ["waveform_template_name"], "children": [{"id": "driver_waveform_name", "value": "\"PreDriver20.5:rise\""}, {"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0, 0.03, 0.1, 0.158744, 0.221271, 0.279374, 0.333513, 0.3841, 0.437223, 0.533203, 0.58153, 0.626864, 0.717883, 0.806555, 0.9, 0.958983, 1\""]}, {"id": "values", "args": ["\"0, 0.375, 0.625, 0.84375, 1.09375, 1.34375, 1.59375, 1.84375, 2.125, 2.6875, 3, 3.3125, 4, 4.75, 5.625, 6.21875, 6.65625\"", "\"0, 0.75, 1.25, 1.6875, 2.1875, 2.6875, 3.1875, 3.6875, 4.25, 5.375, 6, 6.625, 8, 9.5, 11.25, 12.4375, 13.3125\"", "\"0, 1.5, 2.5, 3.375, 4.375, 5.375, 6.375, 7.375, 8.5, 10.75, 12, 13.25, 16, 19, 22.5, 24.875, 26.625\"", "\"0, 3, 5, 6.75, 8.75, 10.75, 12.75, 14.75, 17, 21.5, 24, 26.5, 32, 38, 45, 49.75, 53.25\"", "\"0, 6, 10, 13.5, 17.5, 21.5, 25.5, 29.5, 34, 43, 48, 53, 64, 76, 90, 99.5, 106.5\"", "\"0, 12, 20, 27, 35, 43, 51, 59, 68, 86, 96, 106, 128, 152, 180, 199, 213\"", "\"0, 24, 40, 54, 70, 86, 102, 118, 136, 172, 192, 212, 256, 304, 360, 398, 426\""]}]}, {"id": "normalized_driver_waveform", "args": ["waveform_template_name"], "children": [{"id": "driver_waveform_name", "value": "\"PreDriver20.5:fall\""}, {"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0, 0.03, 0.1, 0.158744, 0.221271, 0.279374, 0.333513, 0.3841, 0.437223, 0.533203, 0.58153, 0.626864, 0.717883, 0.806555, 0.9, 0.958983, 1\""]}, {"id": "values", "args": ["\"0, 0.375, 0.625, 0.84375, 1.09375, 1.34375, 1.59375, 1.84375, 2.125, 2.6875, 3, 3.3125, 4, 4.75, 5.625, 6.21875, 6.65625\"", "\"0, 0.75, 1.25, 1.6875, 2.1875, 2.6875, 3.1875, 3.6875, 4.25, 5.375, 6, 6.625, 8, 9.5, 11.25, 12.4375, 13.3125\"", "\"0, 1.5, 2.5, 3.375, 4.375, 5.375, 6.375, 7.375, 8.5, 10.75, 12, 13.25, 16, 19, 22.5, 24.875, 26.625\"", "\"0, 3, 5, 6.75, 8.75, 10.75, 12.75, 14.75, 17, 21.5, 24, 26.5, 32, 38, 45, 49.75, 53.25\"", "\"0, 6, 10, 13.5, 17.5, 21.5, 25.5, 29.5, 34, 43, 48, 53, 64, 76, 90, 99.5, 106.5\"", "\"0, 12, 20, 27, 35, 43, 51, 59, 68, 86, 96, 106, 128, 152, 180, 199, 213\"", "\"0, 24, 40, 54, 70, 86, 102, 118, 136, 172, 192, 212, 256, 304, 360, 398, 426\""]}]}, {"id": "normalized_driver_waveform", "args": ["waveform_template_name"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0, 0.03, 0.1, 0.158744, 0.221271, 0.279374, 0.333513, 0.3841, 0.437223, 0.533203, 0.58153, 0.626864, 0.717883, 0.806555, 0.9, 0.958983, 1\""]}, {"id": "values", "args": ["\"0, 0.375, 0.625, 0.84375, 1.09375, 1.34375, 1.59375, 1.84375, 2.125, 2.6875, 3, 3.3125, 4, 4.75, 5.625, 6.21875, 6.65625\"", "\"0, 0.75, 1.25, 1.6875, 2.1875, 2.6875, 3.1875, 3.6875, 4.25, 5.375, 6, 6.625, 8, 9.5, 11.25, 12.4375, 13.3125\"", "\"0, 1.5, 2.5, 3.375, 4.375, 5.375, 6.375, 7.375, 8.5, 10.75, 12, 13.25, 16, 19, 22.5, 24.875, 26.625\"", "\"0, 3, 5, 6.75, 8.75, 10.75, 12.75, 14.75, 17, 21.5, 24, 26.5, 32, 38, 45, 49.75, 53.25\"", "\"0, 6, 10, 13.5, 17.5, 21.5, 25.5, 29.5, 34, 43, 48, 53, 64, 76, 90, 99.5, 106.5\"", "\"0, 12, 20, 27, 35, 43, 51, 59, 68, 86, 96, 106, 128, 152, 180, 199, 213\"", "\"0, 24, 40, 54, 70, 86, 102, 118, 136, 172, 192, 212, 256, 304, 360, 398, 426\""]}]}, {"id": "cell", "args": ["ICGx1_ASAP7_75t_L"], "children": [{"id": "statetable", "args": ["\"CLK ENA SE\"", "\"IQ\""], "children": [{"id": "table", "value": "\"L L L : - : L , L L H : - : H , L H L : - : H , L H H : - : H , H - - : - : N \""}]}, {"id": "area", "value": "0.26244"}, {"id": "clock_gating_integrated_cell", "value": "latch_posedge_precontrol"}, {"id": "pg_pin", "args": ["VDD"], "children": [{"id": "pg_type", "value": "primary_power"}, {"id": "voltage_name", "value": "\"VDD\""}]}, {"id": "pg_pin", "args": ["VSS"], "children": [{"id": "pg_type", "value": "primary_ground"}, {"id": "voltage_name", "value": "\"VSS\""}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "30068.3"}, {"id": "when", "value": "\"(CLK * ENA * SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "0"}, {"id": "when", "value": "\"(CLK * ENA * SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "32232.6"}, {"id": "when", "value": "\"(CLK * ENA * SE * GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "0"}, {"id": "when", "value": "\"(CLK * ENA * SE * GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "32640.6"}, {"id": "when", "value": "\"(CLK * ENA * !SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "0"}, {"id": "when", "value": "\"(CLK * ENA * !SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "34805.4"}, {"id": "when", "value": "\"(CLK * ENA * !SE * GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "0"}, {"id": "when", "value": "\"(CLK * ENA * !SE * GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "32520.3"}, {"id": "when", "value": "\"(CLK * !ENA * SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "0"}, {"id": "when", "value": "\"(CLK * !ENA * SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "34685.1"}, {"id": "when", "value": "\"(CLK * !ENA * SE * GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "0"}, {"id": "when", "value": "\"(CLK * !ENA * SE * GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "29339.3"}, {"id": "when", "value": "\"(CLK * !ENA * !SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "0"}, {"id": "when", "value": "\"(CLK * !ENA * !SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "37524.3"}, {"id": "when", "value": "\"(CLK * !ENA * !SE * GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "0"}, {"id": "when", "value": "\"(CLK * !ENA * !SE * GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "24162.5"}, {"id": "when", "value": "\"(!CLK * ENA * SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "0"}, {"id": "when", "value": "\"(!CLK * ENA * SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "26736.7"}, {"id": "when", "value": "\"(!CLK * ENA * !SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "0"}, {"id": "when", "value": "\"(!CLK * ENA * !SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "26616.4"}, {"id": "when", "value": "\"(!CLK * !ENA * SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "0"}, {"id": "when", "value": "\"(!CLK * !ENA * SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "25034.9"}, {"id": "when", "value": "\"(!CLK * !ENA * !SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "0"}, {"id": "when", "value": "\"(!CLK * !ENA * !SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "30530.5"}, {"id": "related_pg_pin", "value": "VDD"}]}, {"id": "leakage_power", "children": [{"id": "value", "value": "0"}, {"id": "related_pg_pin", "value": "VSS"}]}, {"id": "pin", "args": ["IQ"], "children": [{"id": "direction", "value": "internal"}, {"id": "internal_node", "value": "\"IQ\""}]}, {"id": "pin", "args": ["GCLK"], "children": [{"id": "clock_gate_out_pin", "value": "true"}, {"id": "direction", "value": "output"}, {"id": "power_down_function", "value": "\"(!VDD) + (VSS)\""}, {"id": "related_ground_pin", "value": "VSS"}, {"id": "related_power_pin", "value": "VDD"}, {"id": "state_function", "value": "\"CLK & IQ\""}, {"id": "max_capacitance", "value": "46.08"}, {"id": "output_voltage", "value": "default_VDD_VSS_output"}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "sdf_cond", "value": "\"(ENA) | (~ENA & SE)\""}, {"id": "timing_sense", "value": "positive_unate"}, {"id": "timing_type", "value": "combinational_fall"}, {"id": "when", "value": "\"(ENA) + (!ENA * SE)\""}, {"id": "cell_fall", "args": ["delay_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}, {"id": "values", "args": ["\"14.0718, 17.1237, 22.8319, 33.9997, 56.2299, 100.643, 189.447\"", "\"15.4957, 18.5938, 24.2901, 35.4853, 57.7341, 102.145, 190.945\"", "\"17.9959, 21.1033, 26.8498, 38.0255, 60.2695, 104.688, 193.495\"", "\"21.3935, 24.6506, 30.5584, 41.8664, 64.1106, 108.52, 197.333\"", "\"26.4521, 29.8909, 35.9083, 47.3248, 69.7841, 114.195, 202.961\"", "\"34.2519, 37.9786, 44.3145, 55.9575, 78.4533, 123.151, 212.024\"", "\"46.1013, 50.2436, 57.2928, 69.462, 92.6295, 137.693, 227.218\""]}]}, {"id": "fall_transition", "args": ["delay_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}, {"id": "values", "args": ["\"9.44254, 15.0574, 26.4625, 49.562, 96.086, 189.35, 375.963\"", "\"9.50572, 15.0863, 26.4782, 49.565, 96.0854, 189.349, 375.963\"", "\"10.0393, 15.4839, 26.7182, 49.6432, 96.0932, 189.348, 375.962\"", "\"10.8752, 16.2868, 27.3656, 50.0932, 96.3135, 189.365, 375.961\"", "\"12.1588, 17.4109, 28.3427, 50.8442, 96.7949, 189.761, 376.064\"", "\"14.3471, 19.4996, 30.1191, 52.3127, 98.6691, 190.349, 376.539\"", "\"17.9547, 23.195, 33.5469, 55.8373, 100.79, 193.904, 378.255\""]}]}]}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "sdf_cond", "value": "\"(~ENA & ~SE)\""}, {"id": "timing_sense", "value": "positive_unate"}, {"id": "timing_type", "value": "combinational_fall"}, {"id": "when", "value": "\"(!ENA * !SE)\""}, {"id": "cell_fall", "args": ["delay_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}, {"id": "values", "args": ["\"14.2208, 17.3362, 23.1406, 34.3953, 56.6419, 101.041, 189.851\"", "\"15.6328, 18.7323, 24.5446, 35.8133, 58.0654, 102.468, 191.28\"", "\"18.1398, 21.2966, 27.1353, 38.4131, 60.6796, 105.096, 193.892\"", "\"21.5778, 24.8598, 30.8301, 42.1608, 64.4339, 108.841, 197.645\"", "\"26.7423, 30.2678, 36.3144, 47.7065, 70.0568, 114.473, 203.259\"", "\"34.8013, 38.5968, 44.8083, 56.2066, 78.4851, 122.99, 211.856\"", "\"47.2173, 51.2208, 57.5276, 68.73, 90.9361, 135.386, 224.213\""]}]}, {"id": "fall_transition", "args": ["delay_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}, {"id": "values", "args": ["\"9.58471, 15.2544, 26.6749, 49.7081, 96.1338, 189.248, 375.744\"", "\"9.6464, 15.2892, 26.6971, 49.7134, 96.1345, 189.236, 375.744\"", "\"10.1911, 15.6743, 26.9163, 49.7746, 96.1352, 189.24, 375.744\"", "\"11.1078, 16.5889, 27.5506, 50.1577, 96.286, 189.239, 375.745\"", "\"12.5208, 17.675, 28.4416, 50.7354, 96.5804, 189.413, 375.791\"", "\"14.9241, 19.7544, 29.9235, 51.7024, 97.2568, 189.582, 375.999\"", "\"18.2179, 22.4272, 31.7275, 52.5868, 97.3665, 191.092, 376.005\""]}]}]}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "timing_sense", "value": "positive_unate"}, {"id": "cell_rise", "args": ["delay_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}, {"id": "values", "args": ["\"14.5267, 18.4914, 25.9593, 40.6561, 69.8692, 128.254, 244.932\"", "\"15.753, 19.6846, 27.183, 41.8869, 71.1318, 129.505, 246.199\"", "\"17.4571, 21.4806, 29.0006, 43.7296, 72.9948, 131.38, 248.076\"", "\"19.363, 23.4521, 31.1453, 46.0338, 75.2911, 133.699, 250.403\"", "\"21.8809, 25.9901, 33.615, 48.5462, 78.0472, 136.474, 253.152\"", "\"24.7625, 28.9752, 36.7937, 51.9118, 81.3633, 140.5, 257.044\"", "\"26.9239, 31.4074, 39.69, 55.0447, 85.2663, 144.483, 261.561\""]}]}, {"id": "rise_transition", "args": ["delay_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}, {"id": "values", "args": ["\"12.7442, 20.7918, 37.1027, 69.993, 136.006, 268.14, 532.525\"", "\"12.8358, 20.848, 37.1365, 69.9939, 136.005, 268.107, 532.518\"", "\"13.3825, 21.2769, 37.4136, 70.0982, 136.018, 268.162, 532.524\"", "\"13.8849, 21.9686, 37.9227, 70.56, 136.296, 268.112, 532.528\"", "\"14.8684, 22.6277, 38.6272, 71.4443, 136.736, 268.601, 532.614\"", "\"16.7378, 24.2404, 40.0652, 72.2397, 138.711, 269.528, 533.271\"", "\"20.0526, 27.5174, 42.9796, 75.1584, 140.115, 271.995, 534.411\""]}]}, {"id": "cell_fall", "args": ["delay_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}, {"id": "values", "args": ["\"14.0718, 17.1237, 22.8319, 33.9997, 56.2299, 100.643, 189.447\"", "\"15.4957, 18.5938, 24.2901, 35.4853, 57.7341, 102.145, 190.945\"", "\"17.9959, 21.1033, 26.8498, 38.0255, 60.2695, 104.688, 193.495\"", "\"21.3935, 24.6506, 30.5584, 41.8664, 64.1106, 108.52, 197.333\"", "\"26.4521, 29.8909, 35.9083, 47.3248, 69.7841, 114.195, 202.961\"", "\"34.2519, 37.9786, 44.3145, 55.9575, 78.4533, 123.151, 212.024\"", "\"46.1013, 50.2436, 57.2928, 69.462, 92.6295, 137.693, 227.218\""]}]}, {"id": "fall_transition", "args": ["delay_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}, {"id": "values", "args": ["\"9.44254, 15.0574, 26.4625, 49.562, 96.086, 189.35, 375.963\"", "\"9.50572, 15.0863, 26.4782, 49.565, 96.0854, 189.349, 375.963\"", "\"10.0393, 15.4839, 26.7182, 49.6432, 96.0932, 189.348, 375.962\"", "\"10.8752, 16.2868, 27.3656, 50.0932, 96.3135, 189.365, 375.961\"", "\"12.1588, 17.4109, 28.3427, 50.8442, 96.7949, 189.761, 376.064\"", "\"14.3471, 19.4996, 30.1191, 52.3127, 98.6691, 190.349, 376.539\"", "\"17.9547, 23.195, 33.5469, 55.8373, 100.79, 193.904, 378.255\""]}]}]}, {"id": "internal_power", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "when", "value": "\"(ENA) + (!ENA * SE)\""}, {"id": "related_pg_pin", "value": "VDD"}, {"id": "rise_power", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "fall_power", "args": ["power_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}, {"id": "values", "args": ["\"0.460546, 0.462659, 0.463959, 0.464547, 0.464752, 0.464757, 0.464626\"", "\"0.455218, 0.458048, 0.459743, 0.460744, 0.46072, 0.461217, 0.461176\"", "\"0.460255, 0.462994, 0.465255, 0.466926, 0.466841, 0.46817, 0.468295\"", "\"0.490972, 0.492046, 0.494606, 0.496447, 0.496509, 0.497907, 0.497992\"", "\"0.568773, 0.569289, 0.57014, 0.571186, 0.572655, 0.574359, 0.574726\"", "\"0.739913, 0.738896, 0.737814, 0.739177, 0.740414, 0.740893, 0.741976\"", "\"1.09771, 1.09426, 1.08985, 1.08906, 1.08801, 1.0874, 1.0883\""]}]}]}, {"id": "internal_power", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "when", "value": "\"(ENA) + (!ENA * SE)\""}, {"id": "related_pg_pin", "value": "VSS"}, {"id": "rise_power", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "fall_power", "args": ["power_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}, {"id": "values", "args": ["\"0.0375592, 0.0396767, 0.041106, 0.0417588, 0.0419591, 0.041906, 0.0417108\"", "\"0.0323691, 0.0354654, 0.0369584, 0.0379977, 0.0391464, 0.0385323, 0.0382021\"", "\"0.0383556, 0.0402326, 0.0418532, 0.0426578, 0.0439411, 0.0432384, 0.0429405\"", "\"0.0687662, 0.0711187, 0.0726939, 0.0734702, 0.0752281, 0.0747164, 0.0745304\"", "\"0.1454, 0.147187, 0.148454, 0.150469, 0.151053, 0.150206, 0.149765\"", "\"0.316711, 0.315047, 0.316143, 0.318606, 0.323665, 0.317191, 0.317599\"", "\"0.672834, 0.667736, 0.66533, 0.666033, 0.663685, 0.672659, 0.668155\""]}]}]}, {"id": "internal_power", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "when", "value": "\"(!ENA * !SE)\""}, {"id": "related_pg_pin", "value": "VDD"}, {"id": "rise_power", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "fall_power", "args": ["power_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}, {"id": "values", "args": ["\"0.625043, 0.627334, 0.628589, 0.629177, 0.629311, 0.629339, 0.629183\"", "\"0.619767, 0.621867, 0.62352, 0.62439, 0.624772, 0.624848, 0.624793\"", "\"0.625255, 0.627596, 0.630329, 0.631819, 0.632232, 0.632996, 0.633131\"", "\"0.659128, 0.661114, 0.662704, 0.664371, 0.664976, 0.666188, 0.665973\"", "\"0.743474, 0.743334, 0.744805, 0.745828, 0.748006, 0.748674, 0.749253\"", "\"0.914974, 0.911888, 0.912428, 0.911527, 0.911997, 0.913647, 0.914416\"", "\"1.22204, 1.21757, 1.2153, 1.21236, 1.21116, 1.21168, 1.21109\""]}]}]}, {"id": "internal_power", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "when", "value": "\"(!ENA * !SE)\""}, {"id": "related_pg_pin", "value": "VSS"}, {"id": "rise_power", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "fall_power", "args": ["power_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"0.72, 1.44, 2.88, 5.76, 11.52, 23.04, 46.08\""]}, {"id": "values", "args": ["\"0.271907, 0.273991, 0.275327, 0.275952, 0.276098, 0.27603, 0.275783\"", "\"0.264913, 0.26756, 0.269137, 0.269921, 0.270254, 0.270208, 0.270045\"", "\"0.272594, 0.27389, 0.275432, 0.276671, 0.277258, 0.277271, 0.277077\"", "\"0.305443, 0.306113, 0.30712, 0.308545, 0.309853, 0.309461, 0.309648\"", "\"0.389309, 0.390135, 0.391657, 0.393292, 0.393004, 0.393329, 0.393358\"", "\"0.558708, 0.557673, 0.555797, 0.560282, 0.561224, 0.559089, 0.559914\"", "\"0.865949, 0.860969, 0.85947, 0.857108, 0.860787, 0.874687, 0.856786\""]}]}]}]}, {"id": "pin", "args": ["CLK"], "children": [{"id": "driver_waveform_fall", "value": "\"PreDriver20.5:fall\""}, {"id": "driver_waveform_rise", "value": "\"PreDriver20.5:rise\""}, {"id": "clock", "value": "true"}, {"id": "clock_gate_clock_pin", "value": "true"}, {"id": "direction", "value": "input"}, {"id": "input_signal_level", "value": "VDD"}, {"id": "related_ground_pin", "value": "VSS"}, {"id": "related_power_pin", "value": "VDD"}, {"id": "max_transition", "value": "320"}, {"id": "capacitance", "value": "2.13747"}, {"id": "rise_capacitance", "value": "2.06793"}, {"id": "rise_capacitance_range", "args": ["1.3935", "2.06793"]}, {"id": "fall_capacitance", "value": "2.13747"}, {"id": "fall_capacitance_range", "args": ["1.41695", "2.13747"]}, {"id": "input_voltage", "value": "default_VDD_VSS_input"}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "sdf_cond", "value": "\"adacond0\""}, {"id": "timing_type", "value": "min_pulse_width"}, {"id": "when", "value": "\"(ENA) + (!ENA * SE)\""}, {"id": "rise_constraint", "args": ["mpw_constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"10.9863, 10.9863, 20.752, 40.2832, 80.5664, 161.133, 321.045\""]}]}, {"id": "fall_constraint", "args": ["mpw_constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"29.6083, 32.9661, 36.1061, 45.3186, 80.5664, 161.133, 321.045\""]}]}]}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "sdf_cond", "value": "\"adacond1\""}, {"id": "timing_type", "value": "min_pulse_width"}, {"id": "when", "value": "\"(!ENA * !SE)\""}, {"id": "fall_constraint", "args": ["mpw_constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"21.0571, 23.1934, 23.1934, 40.2832, 80.5664, 161.133, 321.045\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(ENA * !GCLK) + (!ENA * SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}, {"id": "rise_power", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.534706, 0.532339, 0.533626, 0.548396, 0.589555, 0.703136, 0.980895\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(ENA * !GCLK) + (!ENA * SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}, {"id": "rise_power", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.15991, 0.156303, 0.158863, 0.172637, 0.214911, 0.327067, 0.60546\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(!ENA * !SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"-0.0829107, -0.0854096, -0.0830224, -0.0729023, -0.0445233, 0.0198838, 0.156399\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.263005, 0.261516, 0.265666, 0.27914, 0.310978, 0.378066, 0.517624\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(!ENA * !SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.22893, 0.227535, 0.229169, 0.240086, 0.268271, 0.332749, 0.469586\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"-0.0479163, -0.0500891, -0.0460394, -0.0334183, -0.00200902, 0.0653633, 0.204502\""]}]}]}]}, {"id": "pin", "args": ["ENA"], "children": [{"id": "driver_waveform_fall", "value": "\"PreDriver20.5:fall\""}, {"id": "driver_waveform_rise", "value": "\"PreDriver20.5:rise\""}, {"id": "clock_gate_enable_pin", "value": "true"}, {"id": "direction", "value": "input"}, {"id": "input_signal_level", "value": "VDD"}, {"id": "related_ground_pin", "value": "VSS"}, {"id": "related_power_pin", "value": "VDD"}, {"id": "max_transition", "value": "320"}, {"id": "capacitance", "value": "0.412581"}, {"id": "rise_capacitance", "value": "0.412358"}, {"id": "rise_capacitance_range", "args": ["0.315107", "0.412358"]}, {"id": "fall_capacitance", "value": "0.412581"}, {"id": "fall_capacitance_range", "args": ["0.279761", "0.412581"]}, {"id": "input_voltage", "value": "default_VDD_VSS_input"}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "sdf_cond", "value": "\"~SE\""}, {"id": "timing_type", "value": "hold_rising"}, {"id": "when", "value": "\"!SE\""}, {"id": "rise_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"-12.4731, -14.0987, -17.228, -21.792, -24.5975, -32.3853, -35.5725\"", "\"-13.3339, -14.9595, -18.0888, -19.8625, -25.4583, -33.2461, -36.4333\"", "\"-14.9911, -16.6166, -19.7459, -25.5172, -31.113, -34.9032, -38.0904\"", "\"-16.8994, -19.6737, -22.8029, -27.3047, -34.17, -37.9602, -39.9512\"", "\"-19.1353, -20.7609, -23.8902, -29.6615, -35.2572, -43.045, -42.2347\"", "\"-20.9506, -26.5736, -29.7029, -31.4767, -37.0725, -44.8602, -48.0474\"", "\"-20.8231, -26.4461, -29.5754, -34.2285, -40.9424, -44.7327, -47.9199\""]}]}, {"id": "fall_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"-18.1949, -17.9644, -17.528, -19.5825, -17.1641, -17.9858, -19.6292\"", "\"-19.3965, -19.166, -18.7296, -17.9549, -18.3657, -19.1874, -20.8308\"", "\"-21.7437, -21.5132, -21.0768, -20.302, -20.7129, -21.5346, -23.178\"", "\"-29.0625, -25.9832, -25.5468, -27.5391, -25.1829, -26.0046, -30.4687\"", "\"-34.2565, -34.026, -33.5896, -32.8148, -33.2257, -34.0474, -35.6908\"", "\"-46.7531, -46.5226, -42.0887, -41.3139, -41.7248, -42.5465, -44.1899\"", "\"-61.3879, -61.1575, -60.7211, -58.8281, -56.3596, -61.1789, -62.8223\""]}]}]}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "timing_type", "value": "hold_rising"}, {"id": "rise_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"-12.4731, -14.0987, -17.228, -21.792, -24.5975, -32.3853, -35.5725\"", "\"-13.3339, -14.9595, -18.0888, -19.8625, -25.4583, -33.2461, -36.4333\"", "\"-14.9911, -16.6166, -19.7459, -25.5172, -31.113, -34.9032, -38.0904\"", "\"-16.8994, -19.6737, -22.8029, -27.3047, -34.17, -37.9602, -39.9512\"", "\"-19.1353, -20.7609, -23.8902, -29.6615, -35.2572, -43.045, -42.2347\"", "\"-20.9506, -26.5736, -29.7029, -31.4767, -37.0725, -44.8602, -48.0474\"", "\"-20.8231, -26.4461, -29.5754, -34.2285, -40.9424, -44.7327, -47.9199\""]}]}, {"id": "fall_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"-18.1949, -17.9644, -17.528, -19.5825, -17.1641, -17.9858, -19.6292\"", "\"-19.3965, -19.166, -18.7296, -17.9549, -18.3657, -19.1874, -20.8308\"", "\"-21.7437, -21.5132, -21.0768, -20.302, -20.7129, -21.5346, -23.178\"", "\"-29.0625, -25.9832, -25.5468, -27.5391, -25.1829, -26.0046, -30.4687\"", "\"-34.2565, -34.026, -33.5896, -32.8148, -33.2257, -34.0474, -35.6908\"", "\"-46.7531, -46.5226, -42.0887, -41.3139, -41.7248, -42.5465, -44.1899\"", "\"-61.3879, -61.1575, -60.7211, -58.8281, -56.3596, -61.1789, -62.8223\""]}]}]}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "sdf_cond", "value": "\"~SE\""}, {"id": "timing_type", "value": "setup_rising"}, {"id": "when", "value": "\"!SE\""}, {"id": "rise_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"40.6011, 41.1678, 42.3245, 45.9375, 53.9089, 69.7474, 95.3467\"", "\"41.5923, 42.159, 43.3157, 49.7189, 54.9001, 70.7385, 96.3379\"", "\"43.5065, 44.0733, 45.23, 51.6332, 56.8143, 72.6528, 98.2522\"", "\"49.0625, 47.6293, 48.7859, 52.2271, 60.3703, 76.2088, 99.373\"", "\"53.0842, 53.651, 54.8076, 57.2133, 66.392, 82.2305, 103.832\"", "\"56.042, 56.6088, 57.7655, 60.1712, 69.3498, 85.1883, 106.79\"", "\"58.6873, 59.254, 60.4107, 64.1459, 71.9951, 87.8336, 109.435\""]}]}, {"id": "fall_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"35.354, 34.881, 33.9906, 33.6011, 33.7756, 36.4612, 49.8273\"", "\"36.6435, 36.1705, 35.2802, 37.7199, 35.0652, 37.7507, 47.1193\"", "\"39.1675, 38.6945, 37.8042, 40.2439, 37.5892, 40.2747, 49.6433\"", "\"45.144, 43.5223, 42.632, 42.3047, 42.417, 45.1025, 51.6504\"", "\"52.7702, 52.2972, 51.4069, 49.8491, 51.1919, 53.8774, 59.2485\"", "\"66.7969, 62.3264, 61.4361, 63.8758, 61.2211, 63.9066, 65.2802\"", "\"84.7556, 84.2825, 83.3922, 78.9551, 79.1797, 81.8652, 83.2388\""]}]}]}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "timing_type", "value": "setup_rising"}, {"id": "rise_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"40.6011, 41.1678, 42.3245, 45.9375, 53.9089, 69.7474, 95.3467\"", "\"41.5923, 42.159, 43.3157, 49.7189, 54.9001, 70.7385, 96.3379\"", "\"43.5065, 44.0733, 45.23, 51.6332, 56.8143, 72.6528, 98.2522\"", "\"49.0625, 47.6293, 48.7859, 52.2271, 60.3703, 76.2088, 99.373\"", "\"53.0842, 53.651, 54.8076, 57.2133, 66.392, 82.2305, 103.832\"", "\"56.042, 56.6088, 57.7655, 60.1712, 69.3498, 85.1883, 106.79\"", "\"58.6873, 59.254, 60.4107, 64.1459, 71.9951, 87.8336, 109.435\""]}]}, {"id": "fall_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"35.354, 34.881, 33.9906, 33.6011, 33.7756, 36.4612, 49.8273\"", "\"36.6435, 36.1705, 35.2802, 37.7199, 35.0652, 37.7507, 47.1193\"", "\"39.1675, 38.6945, 37.8042, 40.2439, 37.5892, 40.2747, 49.6433\"", "\"45.144, 43.5223, 42.632, 42.3047, 42.417, 45.1025, 51.6504\"", "\"52.7702, 52.2972, 51.4069, 49.8491, 51.1919, 53.8774, 59.2485\"", "\"66.7969, 62.3264, 61.4361, 63.8758, 61.2211, 63.9066, 65.2802\"", "\"84.7556, 84.2825, 83.3922, 78.9551, 79.1797, 81.8652, 83.2388\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(CLK * SE) + (!CLK * SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.00810169, 0.00814788, 0.00814993, 0.00815521, 0.00818881, 0.00822664, 0.00828062\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.00858057, 0.00852918, 0.00849917, 0.00847642, 0.00843645, 0.00838503, 0.00827868\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(CLK * SE) + (!CLK * SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.050885, 0.0511093, 0.0512512, 0.0514455, 0.0514773, 0.051275, 0.0511688\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"-0.0306126, -0.030186, -0.0305653, -0.0307287, -0.0308581, -0.0306667, -0.0309038\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(CLK * !SE)\""}, {"id": "related_pg_pin", "value": "VDD"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.0307042, 0.0295862, 0.0300129, 0.0335913, 0.0466722, 0.0801737, 0.154548\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.148657, 0.146565, 0.146331, 0.152056, 0.167598, 0.203812, 0.279443\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(CLK * !SE)\""}, {"id": "related_pg_pin", "value": "VSS"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.12187, 0.120762, 0.121193, 0.124677, 0.137755, 0.171456, 0.245781\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.0571933, 0.0557081, 0.05524, 0.0608062, 0.0762096, 0.112252, 0.188149\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(!CLK * !SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.313133, 0.311761, 0.31078, 0.314159, 0.327241, 0.36126, 0.440411\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.367756, 0.365506, 0.365004, 0.370289, 0.387316, 0.42585, 0.508547\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(!CLK * !SE * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.337714, 0.336537, 0.335606, 0.338675, 0.352125, 0.386273, 0.465528\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.3436, 0.342095, 0.341318, 0.346668, 0.363621, 0.401966, 0.484762\""]}]}]}]}, {"id": "pin", "args": ["SE"], "children": [{"id": "driver_waveform_fall", "value": "\"PreDriver20.5:fall\""}, {"id": "driver_waveform_rise", "value": "\"PreDriver20.5:rise\""}, {"id": "clock_gate_test_pin", "value": "true"}, {"id": "direction", "value": "input"}, {"id": "input_signal_level", "value": "VDD"}, {"id": "related_ground_pin", "value": "VSS"}, {"id": "related_power_pin", "value": "VDD"}, {"id": "max_transition", "value": "320"}, {"id": "capacitance", "value": "0.414674"}, {"id": "rise_capacitance", "value": "0.411955"}, {"id": "rise_capacitance_range", "args": ["0.335629", "0.411955"]}, {"id": "fall_capacitance", "value": "0.414674"}, {"id": "fall_capacitance_range", "args": ["0.338958", "0.414674"]}, {"id": "input_voltage", "value": "default_VDD_VSS_input"}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "sdf_cond", "value": "\"~ENA\""}, {"id": "timing_type", "value": "hold_rising"}, {"id": "when", "value": "\"!ENA\""}, {"id": "rise_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"-10.773, -12.035, -18.4701, -21.792, -26.676, -33.4107, -33.9676\"", "\"-11.6224, -16.8819, -19.3195, -23.8486, -27.5253, -34.26, -34.8169\"", "\"-13.2681, -18.5277, -20.9652, -25.4944, -29.1711, -35.9058, -36.4627\"", "\"-19.1968, -21.6075, -24.0451, -27.3047, -32.2509, -38.9856, -42.3437\"", "\"-21.6609, -22.9229, -25.3605, -29.8897, -37.5639, -44.2986, -44.8555\"", "\"-24.9022, -26.1643, -32.5994, -37.1285, -40.8052, -47.5399, -48.0968\"", "\"-25.8319, -31.0915, -33.529, -40.9375, -45.7324, -52.4671, -53.024\""]}]}, {"id": "fall_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"-18.3585, -18.1022, -17.6167, -19.5825, -17.1794, -18.0318, -19.7366\"", "\"-19.1861, -18.9298, -18.4443, -17.5808, -18.007, -18.8594, -20.5642\"", "\"-20.8076, -20.5514, -20.0659, -19.2024, -19.6286, -20.481, -22.1858\"", "\"-26.7651, -23.6601, -23.1745, -25.0781, -22.7373, -23.5897, -28.1152\"", "\"-29.5957, -29.3395, -28.8539, -27.9905, -28.4167, -29.2691, -30.9739\"", "\"-38.8026, -38.5463, -38.0608, -37.1973, -37.6235, -38.4759, -40.1807\"", "\"-52.6062, -52.35, -51.8644, -49.8828, -47.4297, -48.2821, -49.9869\""]}]}]}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "timing_type", "value": "hold_rising"}, {"id": "rise_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"-10.773, -12.035, -18.4701, -21.792, -26.676, -33.4107, -33.9676\"", "\"-11.6224, -16.8819, -19.3195, -23.8486, -27.5253, -34.26, -34.8169\"", "\"-13.2681, -18.5277, -20.9652, -25.4944, -29.1711, -35.9058, -36.4627\"", "\"-19.1968, -21.6075, -24.0451, -27.3047, -32.2509, -38.9856, -42.3437\"", "\"-21.6609, -22.9229, -25.3605, -29.8897, -37.5639, -44.2986, -44.8555\"", "\"-24.9022, -26.1643, -32.5994, -37.1285, -40.8052, -47.5399, -48.0968\"", "\"-25.8319, -31.0915, -33.529, -40.9375, -45.7324, -52.4671, -53.024\""]}]}, {"id": "fall_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"-18.3585, -18.1022, -17.6167, -19.5825, -17.1794, -18.0318, -19.7366\"", "\"-19.1861, -18.9298, -18.4443, -17.5808, -18.007, -18.8594, -20.5642\"", "\"-20.8076, -20.5514, -20.0659, -19.2024, -19.6286, -20.481, -22.1858\"", "\"-26.7651, -23.6601, -23.1745, -25.0781, -22.7373, -23.5897, -28.1152\"", "\"-29.5957, -29.3395, -28.8539, -27.9905, -28.4167, -29.2691, -30.9739\"", "\"-38.8026, -38.5463, -38.0608, -37.1973, -37.6235, -38.4759, -40.1807\"", "\"-52.6062, -52.35, -51.8644, -49.8828, -47.4297, -48.2821, -49.9869\""]}]}]}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "sdf_cond", "value": "\"~ENA\""}, {"id": "timing_type", "value": "setup_rising"}, {"id": "when", "value": "\"!ENA\""}, {"id": "rise_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"39.8602, 41.1682, 43.7431, 45.9375, 54.0393, 70.0169, 95.407\"", "\"41.3603, 42.6683, 45.2432, 50.2278, 55.5394, 71.517, 96.9071\"", "\"44.2538, 45.5618, 48.1367, 53.1213, 58.4329, 74.4105, 99.8006\"", "\"46.7651, 50.922, 49.4994, 55.9266, 63.7931, 79.7707, 102.258\"", "\"54.6296, 51.9401, 54.515, 59.4996, 68.8088, 80.7888, 106.179\"", "\"56.1666, 57.4746, 60.0495, 65.0341, 70.3457, 86.3233, 111.713\"", "\"64.9034, 62.214, 64.7888, 71.7734, 79.0826, 91.0627, 116.453\""]}]}, {"id": "fall_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"39.5151, 35.0148, 34.0713, 33.6011, 34.1272, 37.5159, 48.2907\"", "\"36.4369, 35.9341, 34.9906, 37.3497, 35.0465, 38.4352, 49.21\"", "\"38.2391, 37.7363, 36.7928, 39.1519, 36.8487, 40.2374, 51.0123\"", "\"42.8467, 41.1952, 40.2517, 39.8438, 40.3076, 43.6963, 51.6504\"", "\"48.0334, 47.5306, 46.5871, 44.9487, 46.643, 50.0317, 52.8115\"", "\"58.3748, 57.872, 56.9285, 55.2901, 56.9844, 56.3756, 59.1554\"", "\"73.7375, 73.2347, 72.2912, 67.7734, 68.3496, 67.7408, 74.5181\""]}]}]}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"CLK\""}, {"id": "timing_type", "value": "setup_rising"}, {"id": "rise_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"39.8602, 41.1682, 43.7431, 45.9375, 54.0393, 70.0169, 95.407\"", "\"41.3603, 42.6683, 45.2432, 50.2278, 55.5394, 71.517, 96.9071\"", "\"44.2538, 45.5618, 48.1367, 53.1213, 58.4329, 74.4105, 99.8006\"", "\"46.7651, 50.922, 49.4994, 55.9266, 63.7931, 79.7707, 102.258\"", "\"54.6296, 51.9401, 54.515, 59.4996, 68.8088, 80.7888, 106.179\"", "\"56.1666, 57.4746, 60.0495, 65.0341, 70.3457, 86.3233, 111.713\"", "\"64.9034, 62.214, 64.7888, 71.7734, 79.0826, 91.0627, 116.453\""]}]}, {"id": "fall_constraint", "args": ["constraint_template_7x7"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "index_2", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"39.5151, 35.0148, 34.0713, 33.6011, 34.1272, 37.5159, 48.2907\"", "\"36.4369, 35.9341, 34.9906, 37.3497, 35.0465, 38.4352, 49.21\"", "\"38.2391, 37.7363, 36.7928, 39.1519, 36.8487, 40.2374, 51.0123\"", "\"42.8467, 41.1952, 40.2517, 39.8438, 40.3076, 43.6963, 51.6504\"", "\"48.0334, 47.5306, 46.5871, 44.9487, 46.643, 50.0317, 52.8115\"", "\"58.3748, 57.872, 56.9285, 55.2901, 56.9844, 56.3756, 59.1554\"", "\"73.7375, 73.2347, 72.2912, 67.7734, 68.3496, 67.7408, 74.5181\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(CLK * ENA) + (!CLK * ENA * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"-0.00845708, -0.00882057, -0.00931684, -0.00935101, -0.0096385, -0.00940577, -0.0091272\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.0272488, 0.027392, 0.0271002, 0.0271236, 0.027268, 0.0271, 0.0270812\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(CLK * ENA) + (!CLK * ENA * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.0545878, 0.0539464, 0.0538561, 0.0530809, 0.0535583, 0.0529448, 0.0528108\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"-0.0354768, -0.0355948, -0.0353229, -0.0353766, -0.0356433, -0.0353771, -0.0354768\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(CLK * !ENA)\""}, {"id": "related_pg_pin", "value": "VDD"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.029774, 0.0291138, 0.0301641, 0.0346956, 0.0490316, 0.0852124, 0.167037\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.165709, 0.163907, 0.163106, 0.166887, 0.181949, 0.219699, 0.304404\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(CLK * !ENA)\""}, {"id": "related_pg_pin", "value": "VSS"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.144537, 0.14382, 0.144999, 0.149358, 0.163746, 0.199902, 0.281167\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.0508746, 0.04915, 0.0483723, 0.051993, 0.0670198, 0.104882, 0.189052\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(!CLK * !ENA * !GCLK)\""}, {"id": "related_pg_pin", "value": "VDD"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.311681, 0.310874, 0.310903, 0.314761, 0.329204, 0.367461, 0.454439\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.3848, 0.382973, 0.381795, 0.385598, 0.401202, 0.441275, 0.531178\""]}]}]}, {"id": "internal_power", "children": [{"id": "when", "value": "\"(!CLK * !ENA * !GCLK)\""}, {"id": "related_pg_pin", "value": "VSS"}, {"id": "rise_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.360193, 0.359485, 0.359102, 0.362956, 0.37755, 0.415865, 0.502628\""]}]}, {"id": "fall_power", "args": ["passive_power_template_7x1"], "children": [{"id": "index_1", "args": ["\"5, 10, 20, 40, 80, 160, 320\""]}, {"id": "values", "args": ["\"0.337367, 0.335497, 0.334415, 0.337938, 0.353928, 0.393711, 0.483696\""]}]}]}]}]}]} \ No newline at end of file diff --git a/test/example.include.lib b/test/example.include.lib new file mode 100644 index 0000000..20a24a8 --- /dev/null +++ b/test/example.include.lib @@ -0,0 +1,61 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + include_file(fragment_good); + include_file(fragment_bad); + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.052600, 0.077300, 0.113200",\ + " 0.102200, 0.107300, 0.115700, 0.135200, 0.123300",\ + " 0.223900, 0.225000, 0.222300, 0.252900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.162500 0.122222"); + } + fall_transition(scalar){ + values("0.2") ; + } + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.include.lib.ref b/test/example.include.lib.ref new file mode 100644 index 0000000..38449d2 --- /dev/null +++ b/test/example.include.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "include_file", "args": ["fragment_good"]}, {"id": "include_file", "args": ["fragment_bad"]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.052600, 0.077300, 0.113200\"", "\" 0.102200, 0.107300, 0.115700, 0.135200, 0.123300\"", "\" 0.223900, 0.225000, 0.222300, 0.252900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.162500 0.122222\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.lib b/test/example.lib new file mode 100644 index 0000000..57694b3 --- /dev/null +++ b/test/example.lib @@ -0,0 +1,59 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(scalar){ + values("0.2") ; + } + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.lib.ref b/test/example.lib.ref new file mode 100644 index 0000000..0090895 --- /dev/null +++ b/test/example.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.lut.lib b/test/example.lut.lib new file mode 100644 index 0000000..8c99dee --- /dev/null +++ b/test/example.lut.lib @@ -0,0 +1,88 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("-1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, -3.00, 4.00, 5.00"); + } + type(thirtytwo){ + bit_width : 32; + } + type(sixteen) { + bit_from : 15; + bit_to : 0; + } + + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(scalar){ + values("0.2") ; + } + } + } + bus(D) { + bus_type : "sixteen"; + } + bus(E) { + bus_type : "thirtytwo"; + } + ff_bank(x,y,16) { + next_state : "D"; + } + ff_bank(x4,y4,32) { + next_state : "E"; + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.lut.lib.ref b/test/example.lut.lib.ref new file mode 100644 index 0000000..f73ffc2 --- /dev/null +++ b/test/example.lut.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"-1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, -3.00, 4.00, 5.00\""]}]}, {"id": "type", "args": ["thirtytwo"], "children": [{"id": "bit_width", "value": "32"}]}, {"id": "type", "args": ["sixteen"], "children": [{"id": "bit_from", "value": "15"}, {"id": "bit_to", "value": "0"}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}]}]}, {"id": "bus", "args": ["D"], "children": [{"id": "bus_type", "value": "\"sixteen\""}]}, {"id": "bus", "args": ["E"], "children": [{"id": "bus_type", "value": "\"thirtytwo\""}]}, {"id": "ff_bank", "args": ["x", "y", "16"], "children": [{"id": "next_state", "value": "\"D\""}]}, {"id": "ff_bank", "args": ["x4", "y4", "32"], "children": [{"id": "next_state", "value": "\"E\""}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.lut2.lib b/test/example.lut2.lib new file mode 100644 index 0000000..d00b692 --- /dev/null +++ b/test/example.lut2.lib @@ -0,0 +1,246 @@ +library(example) { + technology(cmos); + nom_process : 1.0; + nom_temperature : "85" ; + nom_voltage : "3.0" ; + output_voltage( vout1) { + vomax : 27; + } + simulation : "false"; + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("-1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, -3.00, 4.00, 5.00"); + } + lu_table_template(template_3d) { + variable_1 : related_out_total_output_net_capacitance; + variable_2 : total_output_net_capacitance; + variable_3 : input_net_transition; + index_1 ("0.0, 1.5"); + index_2 ("0.0, 4.0"); + index_3 ("0.1, 2.0, 3.0"); + } + input_voltage ( iv1 ) { + vimax : 20.0; + } + type(thirtytwo){ + bit_width : 32; + } + type(sixteen) { + bit_from : 15; + bit_to : 0; + } + + cell(bank33) { + ff_bank (IQ, IQN, 4){ + clocked_on : "CK" ; + next_state : "SE|(CK)" ; + } + pin(SE) { + direction : input; + } + pin(CK) { + direction : input; + } + bundle(Q) { + members(Q0, Q1, Q2, Q3); + direction : output; + function : "IQ"; + } + } + + cell(AN2){ + area : 2; + interface_timing : false; + pin(A, B){ + direction : input; + capacitance : 1; + } + memory(memx) { + address_width : 11; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + timing_sense : positive_unate; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(scalar){ + values("0.2") ; + } + cell_rise(template_3d) { + values("0.00,0.23,0.3", "0.11,0.28,0.4", \ + "0.00,0.24,0.33", "0.10,0.33,0.41"); + } + cell_fall(template_3d) { + values("0.00,0.23,0.4", "0.11,0.28,0.43", \ + "0.00,0.24,0.32", "0.10,0.33,0.42"); + } + } + } + bus(D) { + bus_type : "sixteen"; + clock : "true"; + } + bus(E) { + bus_type : "thirtytwo"; + } + ff_bank(x,y,16) { + next_state : "D"; + } + ff_bank(x4,y4,32) { + next_state : "E"; + } + bundle( H0A ) { /* synopsys 3.0b add */ + members( H01, H02, H03, H04 ) ; + direction : input ; + pin( H01 ) { + capacitance : 0.015785 ; + timing( ) { + related_pin : "H05" ; + timing_type : setup_rising ; + rise_constraint( scalar ) { + values( "0.720000" ) ; + } + fall_constraint( scalar ) { + values( "0.720000" ) ; + } + } + } + } + ff_bank ( "QN01", "QN02", 4 ) { /* synopsys 3.0b add */ + clocked_on : "H05" ; + next_state : "H0A" ; + clear : "H06" ; + } + ff_bank ( "QN03", "QN04", 5 ) { /* synopsys 3.0b add */ + clocked_on : "H05" ; + next_state : "H0A" ; + clear : "H06" ; + } + bundle(CR) { + members (CR0,CR1); + direction : input; + capacitance : 1; + timing() { + timing_type : setup_rising; + intrinsic_rise : 1.6; + intrinsic_fall : 1.6; + related_pin : "CP"; + } + timing() { + timing_type : hold_rising; + intrinsic_rise : 0.2; + intrinsic_fall : 0.2; + related_pin : "CP"; + } + } + bundle(LD) { + members (LD0,LD1); + direction : input; + capacitance : 1; + timing() { + timing_type : setup_rising; + intrinsic_rise : 1.6; + intrinsic_fall : 1.6; + related_pin : "CP"; + } + timing() { + timing_type : hold_rising; + intrinsic_rise : 0.2; + intrinsic_fall : 0.2; + related_pin : "CP"; + } + } + ff_bank("IQ","IQN", 2) { + next_state : "CR (DW LD + IQ LD')"; + clocked_on : "CP"; + } + bundle(DW) { + members (D0,D1); + direction : input; + capacitance : 1; + timing() { + timing_type : setup_rising; + intrinsic_rise : 1.6; + intrinsic_fall : 1.6; + related_pin : "CP"; + } + timing() { + timing_type : hold_rising; + intrinsic_rise : 0.2; + intrinsic_fall : 0.2; + related_pin : "CP"; + } + } + bundle(Q) { + members (Q0,Q1,Q3); + direction : output; + function : "IQ"; + timing() { + timing_type : rising_edge; + intrinsic_rise : 1.09; + intrinsic_fall : 1.25; + rise_resistance : 0.1458; + fall_resistance : 0.0589; + related_pin : "CP"; + } + } + bundle(QN) { + members (QN0,QN1); + direction : output; + function : "IQN"; + timing() { + timing_type : rising_edge; + intrinsic_rise : 1.47; + intrinsic_fall : 1.55; + rise_resistance : 0.1523; + fall_resistance : 0.0589; + related_pin : "CP"; + } + } + + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.lut2.lib.ref b/test/example.lut2.lib.ref new file mode 100644 index 0000000..fbc855e --- /dev/null +++ b/test/example.lut2.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "nom_process", "value": "1.0"}, {"id": "nom_temperature", "value": "\"85\""}, {"id": "nom_voltage", "value": "\"3.0\""}, {"id": "output_voltage", "args": ["vout1"], "children": [{"id": "vomax", "value": "27"}]}, {"id": "simulation", "value": "\"false\""}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"-1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, -3.00, 4.00, 5.00\""]}]}, {"id": "lu_table_template", "args": ["template_3d"], "children": [{"id": "variable_1", "value": "related_out_total_output_net_capacitance"}, {"id": "variable_2", "value": "total_output_net_capacitance"}, {"id": "variable_3", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"0.0, 1.5\""]}, {"id": "index_2", "args": ["\"0.0, 4.0\""]}, {"id": "index_3", "args": ["\"0.1, 2.0, 3.0\""]}]}, {"id": "input_voltage", "args": ["iv1"], "children": [{"id": "vimax", "value": "20.0"}]}, {"id": "type", "args": ["thirtytwo"], "children": [{"id": "bit_width", "value": "32"}]}, {"id": "type", "args": ["sixteen"], "children": [{"id": "bit_from", "value": "15"}, {"id": "bit_to", "value": "0"}]}, {"id": "cell", "args": ["bank33"], "children": [{"id": "ff_bank", "args": ["IQ", "IQN", "4"], "children": [{"id": "clocked_on", "value": "\"CK\""}, {"id": "next_state", "value": "\"SE|(CK)\""}]}, {"id": "pin", "args": ["SE"], "children": [{"id": "direction", "value": "input"}]}, {"id": "pin", "args": ["CK"], "children": [{"id": "direction", "value": "input"}]}, {"id": "bundle", "args": ["Q"], "children": [{"id": "members", "args": ["Q0", "Q1", "Q2", "Q3"]}, {"id": "direction", "value": "output"}, {"id": "function", "value": "\"IQ\""}]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "interface_timing", "value": "false"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "memory", "args": ["memx"], "children": [{"id": "address_width", "value": "11"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "timing_sense", "value": "positive_unate"}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}, {"id": "cell_rise", "args": ["template_3d"], "children": [{"id": "values", "args": ["\"0.00,0.23,0.3\"", "\"0.11,0.28,0.4\"", "\"0.00,0.24,0.33\"", "\"0.10,0.33,0.41\""]}]}, {"id": "cell_fall", "args": ["template_3d"], "children": [{"id": "values", "args": ["\"0.00,0.23,0.4\"", "\"0.11,0.28,0.43\"", "\"0.00,0.24,0.32\"", "\"0.10,0.33,0.42\""]}]}]}]}, {"id": "bus", "args": ["D"], "children": [{"id": "bus_type", "value": "\"sixteen\""}, {"id": "clock", "value": "\"true\""}]}, {"id": "bus", "args": ["E"], "children": [{"id": "bus_type", "value": "\"thirtytwo\""}]}, {"id": "ff_bank", "args": ["x", "y", "16"], "children": [{"id": "next_state", "value": "\"D\""}]}, {"id": "ff_bank", "args": ["x4", "y4", "32"], "children": [{"id": "next_state", "value": "\"E\""}]}, {"id": "bundle", "args": ["H0A"], "children": [{"id": "members", "args": ["H01", "H02", "H03", "H04"]}, {"id": "direction", "value": "input"}, {"id": "pin", "args": ["H01"], "children": [{"id": "capacitance", "value": "0.015785"}, {"id": "timing", "children": [{"id": "related_pin", "value": "\"H05\""}, {"id": "timing_type", "value": "setup_rising"}, {"id": "rise_constraint", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.720000\""]}]}, {"id": "fall_constraint", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.720000\""]}]}]}]}]}, {"id": "ff_bank", "args": ["\"QN01\"", "\"QN02\"", "4"], "children": [{"id": "clocked_on", "value": "\"H05\""}, {"id": "next_state", "value": "\"H0A\""}, {"id": "clear", "value": "\"H06\""}]}, {"id": "ff_bank", "args": ["\"QN03\"", "\"QN04\"", "5"], "children": [{"id": "clocked_on", "value": "\"H05\""}, {"id": "next_state", "value": "\"H0A\""}, {"id": "clear", "value": "\"H06\""}]}, {"id": "bundle", "args": ["CR"], "children": [{"id": "members", "args": ["CR0", "CR1"]}, {"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}, {"id": "timing", "children": [{"id": "timing_type", "value": "setup_rising"}, {"id": "intrinsic_rise", "value": "1.6"}, {"id": "intrinsic_fall", "value": "1.6"}, {"id": "related_pin", "value": "\"CP\""}]}, {"id": "timing", "children": [{"id": "timing_type", "value": "hold_rising"}, {"id": "intrinsic_rise", "value": "0.2"}, {"id": "intrinsic_fall", "value": "0.2"}, {"id": "related_pin", "value": "\"CP\""}]}]}, {"id": "bundle", "args": ["LD"], "children": [{"id": "members", "args": ["LD0", "LD1"]}, {"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}, {"id": "timing", "children": [{"id": "timing_type", "value": "setup_rising"}, {"id": "intrinsic_rise", "value": "1.6"}, {"id": "intrinsic_fall", "value": "1.6"}, {"id": "related_pin", "value": "\"CP\""}]}, {"id": "timing", "children": [{"id": "timing_type", "value": "hold_rising"}, {"id": "intrinsic_rise", "value": "0.2"}, {"id": "intrinsic_fall", "value": "0.2"}, {"id": "related_pin", "value": "\"CP\""}]}]}, {"id": "ff_bank", "args": ["\"IQ\"", "\"IQN\"", "2"], "children": [{"id": "next_state", "value": "\"CR (DW LD + IQ LD')\""}, {"id": "clocked_on", "value": "\"CP\""}]}, {"id": "bundle", "args": ["DW"], "children": [{"id": "members", "args": ["D0", "D1"]}, {"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}, {"id": "timing", "children": [{"id": "timing_type", "value": "setup_rising"}, {"id": "intrinsic_rise", "value": "1.6"}, {"id": "intrinsic_fall", "value": "1.6"}, {"id": "related_pin", "value": "\"CP\""}]}, {"id": "timing", "children": [{"id": "timing_type", "value": "hold_rising"}, {"id": "intrinsic_rise", "value": "0.2"}, {"id": "intrinsic_fall", "value": "0.2"}, {"id": "related_pin", "value": "\"CP\""}]}]}, {"id": "bundle", "args": ["Q"], "children": [{"id": "members", "args": ["Q0", "Q1", "Q3"]}, {"id": "direction", "value": "output"}, {"id": "function", "value": "\"IQ\""}, {"id": "timing", "children": [{"id": "timing_type", "value": "rising_edge"}, {"id": "intrinsic_rise", "value": "1.09"}, {"id": "intrinsic_fall", "value": "1.25"}, {"id": "rise_resistance", "value": "0.1458"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"CP\""}]}]}, {"id": "bundle", "args": ["QN"], "children": [{"id": "members", "args": ["QN0", "QN1"]}, {"id": "direction", "value": "output"}, {"id": "function", "value": "\"IQN\""}, {"id": "timing", "children": [{"id": "timing_type", "value": "rising_edge"}, {"id": "intrinsic_rise", "value": "1.47"}, {"id": "intrinsic_fall", "value": "1.55"}, {"id": "rise_resistance", "value": "0.1523"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"CP\""}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.nolibnam.lib b/test/example.nolibnam.lib new file mode 100644 index 0000000..2869779 --- /dev/null +++ b/test/example.nolibnam.lib @@ -0,0 +1,40 @@ +library() { + technology(cmos); + + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.nolibnam.lib.ref b/test/example.nolibnam.lib.ref new file mode 100644 index 0000000..1511e0a --- /dev/null +++ b/test/example.nolibnam.lib.ref @@ -0,0 +1 @@ +{"id": "library", "children": [{"id": "technology", "args": ["cmos"]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.numident.lib b/test/example.numident.lib new file mode 100644 index 0000000..94ccadb --- /dev/null +++ b/test/example.numident.lib @@ -0,0 +1,4 @@ +library (L) { + cell (e0) { } + cell (e1) { } +} diff --git a/test/example.numident.lib.ref b/test/example.numident.lib.ref new file mode 100644 index 0000000..a6940f6 --- /dev/null +++ b/test/example.numident.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["L"], "children": [{"id": "cell", "args": ["e0"]}, {"id": "cell", "args": ["e1"]}]} \ No newline at end of file diff --git a/test/example.pin.lib b/test/example.pin.lib new file mode 100644 index 0000000..a905779 --- /dev/null +++ b/test/example.pin.lib @@ -0,0 +1,6 @@ +library(temp) { + cell(ex) { + pin(Q[0]) { + } + } +} diff --git a/test/example.pin.lib.ref b/test/example.pin.lib.ref new file mode 100644 index 0000000..21d28cc --- /dev/null +++ b/test/example.pin.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["temp"], "children": [{"id": "cell", "args": ["ex"], "children": [{"id": "pin", "args": ["Q"]}]}]} \ No newline at end of file diff --git a/test/example.powerlut.lib b/test/example.powerlut.lib new file mode 100644 index 0000000..c4b8e4f --- /dev/null +++ b/test/example.powerlut.lib @@ -0,0 +1,31 @@ +library(example) { + technology(cmos); + + power_lut_template(pwr_bcm_rf) { + variable_1 : input_transition_time; + index_1 ("0.15, 0.5, 0.7"); + } + cell(AN2){ + area : 2; + pin(A, B){ + internal_power() { + power(pwr_bcm_rf) { + values ( "4.7, 4.9" ); + } + rise_power(pwr_bcm_rf) { + values ( "4.7, 4.9" ); + } + fall_power(pwr_bcm_rf) { + values ( "4.7, 4.9" ); + } + } + direction : input; + capacitance : 1; + } + pin (P) { + internal_power(pwr_bcm_rf) { + values ( "4.7, 4.9" ); + } + } + } +} diff --git a/test/example.powerlut.lib.ref b/test/example.powerlut.lib.ref new file mode 100644 index 0000000..5290660 --- /dev/null +++ b/test/example.powerlut.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "power_lut_template", "args": ["pwr_bcm_rf"], "children": [{"id": "variable_1", "value": "input_transition_time"}, {"id": "index_1", "args": ["\"0.15, 0.5, 0.7\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "internal_power", "children": [{"id": "power", "args": ["pwr_bcm_rf"], "children": [{"id": "values", "args": ["\"4.7, 4.9\""]}]}, {"id": "rise_power", "args": ["pwr_bcm_rf"], "children": [{"id": "values", "args": ["\"4.7, 4.9\""]}]}, {"id": "fall_power", "args": ["pwr_bcm_rf"], "children": [{"id": "values", "args": ["\"4.7, 4.9\""]}]}]}, {"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["P"], "children": [{"id": "internal_power", "args": ["pwr_bcm_rf"], "children": [{"id": "values", "args": ["\"4.7, 4.9\""]}]}]}]}]} \ No newline at end of file diff --git a/test/example.preclear.lib b/test/example.preclear.lib new file mode 100644 index 0000000..00daf1a --- /dev/null +++ b/test/example.preclear.lib @@ -0,0 +1,67 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + bundle( bun1 ) { + members(X); + clock : true; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(scalar){ + values("0.2") ; + } + } + } + ff( ff1 ) { + preset : "wow"; + clear : "gee"; + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.preclear.lib.ref b/test/example.preclear.lib.ref new file mode 100644 index 0000000..a04ae30 --- /dev/null +++ b/test/example.preclear.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "bundle", "args": ["bun1"], "children": [{"id": "members", "args": ["X"]}, {"id": "clock", "value": "true"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}]}]}, {"id": "ff", "args": ["ff1"], "children": [{"id": "preset", "value": "\"wow\""}, {"id": "clear", "value": "\"gee\""}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.preclear2.lib b/test/example.preclear2.lib new file mode 100644 index 0000000..4c6e430 --- /dev/null +++ b/test/example.preclear2.lib @@ -0,0 +1,68 @@ +library(example) { + technology(cmos); + + lu_table_template(t111){ + variable_1 : total_output_net_capacitance; + variable_2 : input_net_transition; + index_1 ("1.00, 2.00, 3.00, 4.00"); + index_2 ("1.00, 2.00, 3.00, 4.00, 5.00"); + } + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + bundle( bun1 ) { + members(X); + clock : true; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + + rise_transition(t111) { + index_1("0.500000,4.000000,8.000000,20.000000"); + index_2("0.010000,0.300000,0.900000,3.100000,6.000000"); + values(\ + " 0.022100, 0.026300, 0.058600, 0.077300, 0.113200",\ + " 0.102800, 0.107300, 0.115700, 0.135200, 0.183300",\ + " 0.223900, 0.225000, 0.228300, 0.258900, 0.301700",\ + " 1.159500, 1.159300, 1.160100, 1.168500, 1.182000"); + } + fall_transition(scalar){ + values("0.2") ; + } + } + } + ff( ff1, ff2 ) { + preset : "wow"; + clear : "gee"; + clear_preset_var1 : H; + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.preclear2.lib.ref b/test/example.preclear2.lib.ref new file mode 100644 index 0000000..949b4e0 --- /dev/null +++ b/test/example.preclear2.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "lu_table_template", "args": ["t111"], "children": [{"id": "variable_1", "value": "total_output_net_capacitance"}, {"id": "variable_2", "value": "input_net_transition"}, {"id": "index_1", "args": ["\"1.00, 2.00, 3.00, 4.00\""]}, {"id": "index_2", "args": ["\"1.00, 2.00, 3.00, 4.00, 5.00\""]}]}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "bundle", "args": ["bun1"], "children": [{"id": "members", "args": ["X"]}, {"id": "clock", "value": "true"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}, {"id": "rise_transition", "args": ["t111"], "children": [{"id": "index_1", "args": ["\"0.500000,4.000000,8.000000,20.000000\""]}, {"id": "index_2", "args": ["\"0.010000,0.300000,0.900000,3.100000,6.000000\""]}, {"id": "values", "args": ["\" 0.022100, 0.026300, 0.058600, 0.077300, 0.113200\"", "\" 0.102800, 0.107300, 0.115700, 0.135200, 0.183300\"", "\" 0.223900, 0.225000, 0.228300, 0.258900, 0.301700\"", "\" 1.159500, 1.159300, 1.160100, 1.168500, 1.182000\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0.2\""]}]}]}]}, {"id": "ff", "args": ["ff1", "ff2"], "children": [{"id": "preset", "value": "\"wow\""}, {"id": "clear", "value": "\"gee\""}, {"id": "clear_preset_var1", "value": "H"}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.rangerr.lib b/test/example.rangerr.lib new file mode 100644 index 0000000..550e7dc --- /dev/null +++ b/test/example.rangerr.lib @@ -0,0 +1,41 @@ +library(example) { + technology(cmos); + default_max_utilization : 200.0; + + cell(AN2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A ^ B"; + timing () { + intrinsic_rise : 0.49; + intrinsic_fall : 0.77; + rise_resistance : 0.1443; + fall_resistance : 0.0523; + related_pin : "A B"; + } + } + } + cell(OR2){ + area : 2; + pin(A, B){ + direction : input; + capacitance : 1; + } + pin(Z){ + direction : output; + function : "A + B"; + timing () { + intrinsic_rise : 0.38; + intrinsic_fall : 0.85; + rise_resistance : 0.1443; + fall_resistance : 0.0589; + related_pin : "A B"; + } + } + } +} diff --git a/test/example.rangerr.lib.ref b/test/example.rangerr.lib.ref new file mode 100644 index 0000000..b996f8f --- /dev/null +++ b/test/example.rangerr.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["example"], "children": [{"id": "technology", "args": ["cmos"]}, {"id": "default_max_utilization", "value": "200.0"}, {"id": "cell", "args": ["AN2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A ^ B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.49"}, {"id": "intrinsic_fall", "value": "0.77"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0523"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}, {"id": "cell", "args": ["OR2"], "children": [{"id": "area", "value": "2"}, {"id": "pin", "args": ["A", "B"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"A + B\""}, {"id": "timing", "children": [{"id": "intrinsic_rise", "value": "0.38"}, {"id": "intrinsic_fall", "value": "0.85"}, {"id": "rise_resistance", "value": "0.1443"}, {"id": "fall_resistance", "value": "0.0589"}, {"id": "related_pin", "value": "\"A B\""}]}]}]}]} \ No newline at end of file diff --git a/test/example.sppm.lib b/test/example.sppm.lib new file mode 100644 index 0000000..b73a74b --- /dev/null +++ b/test/example.sppm.lib @@ -0,0 +1,56 @@ +library (sppm) { + + delay_model : polynomial; + power_model : polynomial; + + poly_template (delay_pt) { + variables (input_net_transition, voltage); + variable_1_range (1, 5); + variable_2_range (2.7, 3.6); + } + power_poly_template (power_pt) { + variables (input_net_transition, voltage); + variable_1_range (1, 5); + variable_2_range (2.7, 3.6); + } + + cell (IV) { + pin (A) { + direction : input; + } + pin (Z) { + direction : output; + function : "!A"; + timing () { + related_pin : A; + cell_rise (delay_pt) { + orders ("1, 1"); + coefs ("1, 1, 1, 1"); + } + cell_fall (delay_pt) { + orders ("1, 1"); + coefs ("1, 1, 1, 1"); + } + rise_transition (delay_pt) { + orders ("1, 1"); + coefs ("1, 1, 1, 1"); + } + fall_transition (delay_pt) { + orders ("1, 1"); + coefs ("1, 1, 1, 1"); + } + } + internal_power () { + related_pin : A; + rise_power (power_pt) { + orders ("1, 1"); + coefs ("2, 2, 2, 2"); + } + fall_power (power_pt) { + orders ("1, 1"); + coefs ("2, 2, 2, 2"); + } + } + } + } +} diff --git a/test/example.sppm.lib.ref b/test/example.sppm.lib.ref new file mode 100644 index 0000000..ed85c5c --- /dev/null +++ b/test/example.sppm.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["sppm"], "children": [{"id": "delay_model", "value": "polynomial"}, {"id": "power_model", "value": "polynomial"}, {"id": "poly_template", "args": ["delay_pt"], "children": [{"id": "variables", "args": ["input_net_transition", "voltage"]}, {"id": "variable_1_range", "args": ["1", "5"]}, {"id": "variable_2_range", "args": ["2.7", "3.6"]}]}, {"id": "power_poly_template", "args": ["power_pt"], "children": [{"id": "variables", "args": ["input_net_transition", "voltage"]}, {"id": "variable_1_range", "args": ["1", "5"]}, {"id": "variable_2_range", "args": ["2.7", "3.6"]}]}, {"id": "cell", "args": ["IV"], "children": [{"id": "pin", "args": ["A"], "children": [{"id": "direction", "value": "input"}]}, {"id": "pin", "args": ["Z"], "children": [{"id": "direction", "value": "output"}, {"id": "function", "value": "\"!A\""}, {"id": "timing", "children": [{"id": "related_pin", "value": "A"}, {"id": "cell_rise", "args": ["delay_pt"], "children": [{"id": "orders", "args": ["\"1, 1\""]}, {"id": "coefs", "args": ["\"1, 1, 1, 1\""]}]}, {"id": "cell_fall", "args": ["delay_pt"], "children": [{"id": "orders", "args": ["\"1, 1\""]}, {"id": "coefs", "args": ["\"1, 1, 1, 1\""]}]}, {"id": "rise_transition", "args": ["delay_pt"], "children": [{"id": "orders", "args": ["\"1, 1\""]}, {"id": "coefs", "args": ["\"1, 1, 1, 1\""]}]}, {"id": "fall_transition", "args": ["delay_pt"], "children": [{"id": "orders", "args": ["\"1, 1\""]}, {"id": "coefs", "args": ["\"1, 1, 1, 1\""]}]}]}, {"id": "internal_power", "children": [{"id": "related_pin", "value": "A"}, {"id": "rise_power", "args": ["power_pt"], "children": [{"id": "orders", "args": ["\"1, 1\""]}, {"id": "coefs", "args": ["\"2, 2, 2, 2\""]}]}, {"id": "fall_power", "args": ["power_pt"], "children": [{"id": "orders", "args": ["\"1, 1\""]}, {"id": "coefs", "args": ["\"2, 2, 2, 2\""]}]}]}]}]}]} \ No newline at end of file diff --git a/test/example.syntaxerr.lib b/test/example.syntaxerr.lib new file mode 100644 index 0000000..3717bef --- /dev/null +++ b/test/example.syntaxerr.lib @@ -0,0 +1,3 @@ + +library (AA { +} diff --git a/test/example.var.lib b/test/example.var.lib new file mode 100644 index 0000000..348f0db --- /dev/null +++ b/test/example.var.lib @@ -0,0 +1,10 @@ +library (test) { + FANOUT = 5; /* declaration */ + cell (AND) { + pin (Z) { + direction : output; + max_fanout : FANOUT * 2; /* usage, here max_fanout : 10 */ + } + } +} + diff --git a/test/generate_ref.py b/test/generate_ref.py new file mode 100644 index 0000000..8916e5f --- /dev/null +++ b/test/generate_ref.py @@ -0,0 +1,17 @@ +import json +from pathlib import Path +from typing import Dict +from libparse import LibertyParser, LibertyAst + +__file_dir__ = Path(__file__).absolute().parent + +files = __file_dir__.glob("*.lib") +for file in sorted(files): + print(file) + x = open(file, "r") + try: + parsed = LibertyParser(x) + with open(str(file) + ".ref", "w", encoding="utf8") as f: + json.dump(parsed.ast.to_dict(), fp=f) + except RuntimeError as e: + pass diff --git a/test/inverter_nldm.lib b/test/inverter_nldm.lib new file mode 100644 index 0000000..6603030 --- /dev/null +++ b/test/inverter_nldm.lib @@ -0,0 +1,214 @@ +library (inverter) { + delay_model : "table_lookup"; + + time_unit : "1ns"; + voltage_unit : "1V"; + current_unit : "1mA"; + capacitive_load_unit (1,pf); + pulling_resistance_unit : 1kohm; + + default_fanout_load : 1.0; + default_inout_pin_cap : 1.0; + default_input_pin_cap : 1.0; + default_output_pin_cap : 0.00; + + nom_voltage : 1.6; + + input_voltage(MY_CMOS_IN) { + vil : 0.3; + vih : 1.1; + vimin : -0.3; + vimax : VDD + 0.3; + } + + output_voltage(MY_CMOS_OUT) { + vol : 0.1; + voh : 1.4; + vomin : -0.3; + vomax : VDD + 0.3; + } + + noise_lut_template(my_noise_reject) { + variable_1 : input_noise_width; + variable_2 : total_output_net_capacitance; + index_1("0, 0.1, 0.3, 1, 2"); + index_2("0, 0.1, 0.3, 1, 2"); + } + + noise_lut_template(my_noise_reject_outside_rail) { + variable_1 : input_noise_width; + variable_2 : total_output_net_capacitance; + index_1("0, 0.1, 2"); + index_2("0, 0.1, 2"); + } + + iv_lut_template(my_current_low) { + variable_1 : iv_output_voltage; + index_1("-1, -0.1, 0, 0.1 0.8, 1.6, 2"); + } + + iv_lut_template(my_current_high) { + variable_1 : iv_output_voltage; + index_1("-1, 0, 0.3, 0.5, 0.8, 1.5, 1.6, 1.7, 2"); + } + + propagation_lut_template(my_propagated_noise) { + variable_1 : input_noise_width; + variable_2 : input_noise_height; + variable_3 : total_output_net_capacitance; + index_1("0.01, 0.2, 2"); + index_2("0.2, 0.8"); + index_3("0, 2"); + } + +cell ( INV ) { + area : 1 ; + pin ( A ) { + direction : input ; + capacitance : 1 ; + fanout_load : 1 ; + + input_voltage : MY_CMOS_IN ; + + hyperbolic_noise_low() { + height_coefficient : 0.4; + area_coefficient : 1.1; + width_coefficient : 0.1; + } + + hyperbolic_noise_high() { + height_coefficient : 0.3; + area_coefficient : 0.9; + width_coefficient : 0.1; + } + + hyperbolic_noise_below_low() { + height_coefficient : 0.1; + area_coefficient : 0.3; + width_coefficient : 0.01; + } + + hyperbolic_noise_above_high() { + height_coefficient : 0.1; + area_coefficient : 0.3; + width_coefficient : 0.01; + } + +} + +pin ( Y ) { + direction : output ; + max_fanout : 10 ; + function : " !A "; + output_voltage : MY_CMOS_OUT ; + + timing () { + related_pin : A ; + + steady_state_resistance_high : 1500; + steady_state_resistance_low : 1100; + steady_state_resistance_above_high : 200; + steady_state_resistance_below_low : 100; + + cell_rise(scalar) { values("0");} + rise_transition(scalar) { values("0");} + cell_fall(scalar) { values("0");} + fall_transition(scalar) { values("0");} + + noise_immunity_low (my_noise_reject) { + values ("1.5, 0.9, 0.8, 0.65, 0.6", \ + "1.5, 0.9, 0.8, 0.65, 0.6", \ + "1.5, 0.9, 0.8, 0.65, 0.6", \ + "1.5, 0.9, 0.8, 0.65, 0.6", \ + "1.5, 0.9, 0.8, 0.65, 0.6") ; + } + + noise_immunity_high (my_noise_reject) { + values ("1.3, 0.8, 0.7, 0.6, 0.55", \ + "1.5, 0.9, 0.8, 0.65, 0.6", \ + "1.5, 0.9, 0.8, 0.65, 0.6", \ + "1.5, 0.9, 0.8, 0.65, 0.6", \ + "1.5, 0.9, 0.8, 0.65, 0.6") ; + } + + noise_immunity_below_low (my_noise_reject_outside_rail) { + values ("1, 0.8, 0.5", \ + "1, 0.8, 0.5", \ + "1, 0.8, 0.5"); + } + + noise_immunity_above_high (my_noise_reject_outside_rail) { + values ("1, 0.8, 0.5", \ + "1, 0.8, 0.5", \ + "1, 0.8, 0.5"); + } + + steady_state_current_low(my_current_low) { + values("0.1, 0.05, 0, -0.1, -0.25, -1, -1.8"); + } + + steady_state_current_high(my_current_high) { + values("2, 1.8, 1.7, 1.4, 1, 0.5, 0, -0.1, -0.8"); + } + +/* + steady_state_current_tristate(my_current_high) { + values("1, 0.8, 0.7, 0.4, 1, 0.5, 0, -0.1, -0.8"); + } +*/ + + propagated_noise_width_high(my_propagated_noise) { + values ("0.01, 0.10", "0.15, 0.18", \ + "0.04, 0.14", "0.18, 0.25", \ + "0.07, 0.17", "0.32, 0.35"); + } + + propagated_noise_height_high(my_propagated_noise) { + values ("0.01, 0.10", "0.15, 0.18", \ + "0.04, 0.14", "0.18, 0.25", \ + "0.07, 0.17", "0.32, 0.35"); + } + + propagated_noise_width_low(my_propagated_noise) { + values ("0.01, 0.10", "0.15, 0.18", \ + "0.04, 0.14", "0.18, 0.25", \ + "0.07, 0.17", "0.32, 0.35"); + } + + propagated_noise_height_low(my_propagated_noise) { + values ("0.01, 0.10", "0.15, 0.18", \ + "0.04, 0.14", "0.18, 0.25", \ + "0.07, 0.17", "0.32, 0.35"); + } + + propagated_noise_width_above_high(my_propagated_noise) { + values ("0.01, 0.10", "0.15, 0.18", \ + "0.04, 0.14", "0.18, 0.25", \ + "0.07, 0.17", "0.32, 0.35"); + } + + propagated_noise_height_above_high(my_propagated_noise) { + values ("0.01, 0.10", "0.15, 0.18", \ + "0.04, 0.14", "0.18, 0.25", \ + "0.07, 0.17", "0.32, 0.35"); + } + + propagated_noise_width_below_low(my_propagated_noise) { + values ("0.01, 0.10", "0.15, 0.18", \ + "0.04, 0.14", "0.18, 0.25", \ + "0.07, 0.17", "0.32, 0.35"); + } + + propagated_noise_height_below_low(my_propagated_noise) { + values ("0.01, 0.10", "0.15, 0.18", \ + "0.04, 0.14", "0.18, 0.25", \ + "0.07, 0.17", "0.32, 0.35"); + } + + } + + } + + } + +} diff --git a/test/inverter_nldm.lib.ref b/test/inverter_nldm.lib.ref new file mode 100644 index 0000000..00597f3 --- /dev/null +++ b/test/inverter_nldm.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["inverter"], "children": [{"id": "delay_model", "value": "\"table_lookup\""}, {"id": "time_unit", "value": "\"1ns\""}, {"id": "voltage_unit", "value": "\"1V\""}, {"id": "current_unit", "value": "\"1mA\""}, {"id": "capacitive_load_unit", "args": ["1", "pf"]}, {"id": "pulling_resistance_unit", "value": "1kohm"}, {"id": "default_fanout_load", "value": "1.0"}, {"id": "default_inout_pin_cap", "value": "1.0"}, {"id": "default_input_pin_cap", "value": "1.0"}, {"id": "default_output_pin_cap", "value": "0.00"}, {"id": "nom_voltage", "value": "1.6"}, {"id": "input_voltage", "args": ["MY_CMOS_IN"], "children": [{"id": "vil", "value": "0.3"}, {"id": "vih", "value": "1.1"}, {"id": "vimin", "value": "-0.3"}, {"id": "vimax", "value": "VDD+0.3"}]}, {"id": "output_voltage", "args": ["MY_CMOS_OUT"], "children": [{"id": "vol", "value": "0.1"}, {"id": "voh", "value": "1.4"}, {"id": "vomin", "value": "-0.3"}, {"id": "vomax", "value": "VDD+0.3"}]}, {"id": "noise_lut_template", "args": ["my_noise_reject"], "children": [{"id": "variable_1", "value": "input_noise_width"}, {"id": "variable_2", "value": "total_output_net_capacitance"}, {"id": "index_1", "args": ["\"0, 0.1, 0.3, 1, 2\""]}, {"id": "index_2", "args": ["\"0, 0.1, 0.3, 1, 2\""]}]}, {"id": "noise_lut_template", "args": ["my_noise_reject_outside_rail"], "children": [{"id": "variable_1", "value": "input_noise_width"}, {"id": "variable_2", "value": "total_output_net_capacitance"}, {"id": "index_1", "args": ["\"0, 0.1, 2\""]}, {"id": "index_2", "args": ["\"0, 0.1, 2\""]}]}, {"id": "iv_lut_template", "args": ["my_current_low"], "children": [{"id": "variable_1", "value": "iv_output_voltage"}, {"id": "index_1", "args": ["\"-1, -0.1, 0, 0.1 0.8, 1.6, 2\""]}]}, {"id": "iv_lut_template", "args": ["my_current_high"], "children": [{"id": "variable_1", "value": "iv_output_voltage"}, {"id": "index_1", "args": ["\"-1, 0, 0.3, 0.5, 0.8, 1.5, 1.6, 1.7, 2\""]}]}, {"id": "propagation_lut_template", "args": ["my_propagated_noise"], "children": [{"id": "variable_1", "value": "input_noise_width"}, {"id": "variable_2", "value": "input_noise_height"}, {"id": "variable_3", "value": "total_output_net_capacitance"}, {"id": "index_1", "args": ["\"0.01, 0.2, 2\""]}, {"id": "index_2", "args": ["\"0.2, 0.8\""]}, {"id": "index_3", "args": ["\"0, 2\""]}]}, {"id": "cell", "args": ["INV"], "children": [{"id": "area", "value": "1"}, {"id": "pin", "args": ["A"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}, {"id": "fanout_load", "value": "1"}, {"id": "input_voltage", "value": "MY_CMOS_IN"}, {"id": "hyperbolic_noise_low", "children": [{"id": "height_coefficient", "value": "0.4"}, {"id": "area_coefficient", "value": "1.1"}, {"id": "width_coefficient", "value": "0.1"}]}, {"id": "hyperbolic_noise_high", "children": [{"id": "height_coefficient", "value": "0.3"}, {"id": "area_coefficient", "value": "0.9"}, {"id": "width_coefficient", "value": "0.1"}]}, {"id": "hyperbolic_noise_below_low", "children": [{"id": "height_coefficient", "value": "0.1"}, {"id": "area_coefficient", "value": "0.3"}, {"id": "width_coefficient", "value": "0.01"}]}, {"id": "hyperbolic_noise_above_high", "children": [{"id": "height_coefficient", "value": "0.1"}, {"id": "area_coefficient", "value": "0.3"}, {"id": "width_coefficient", "value": "0.01"}]}]}, {"id": "pin", "args": ["Y"], "children": [{"id": "direction", "value": "output"}, {"id": "max_fanout", "value": "10"}, {"id": "function", "value": "\" !A \""}, {"id": "output_voltage", "value": "MY_CMOS_OUT"}, {"id": "timing", "children": [{"id": "related_pin", "value": "A"}, {"id": "steady_state_resistance_high", "value": "1500"}, {"id": "steady_state_resistance_low", "value": "1100"}, {"id": "steady_state_resistance_above_high", "value": "200"}, {"id": "steady_state_resistance_below_low", "value": "100"}, {"id": "cell_rise", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "rise_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "cell_fall", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "noise_immunity_low", "args": ["my_noise_reject"], "children": [{"id": "values", "args": ["\"1.5, 0.9, 0.8, 0.65, 0.6\"", "\"1.5, 0.9, 0.8, 0.65, 0.6\"", "\"1.5, 0.9, 0.8, 0.65, 0.6\"", "\"1.5, 0.9, 0.8, 0.65, 0.6\"", "\"1.5, 0.9, 0.8, 0.65, 0.6\""]}]}, {"id": "noise_immunity_high", "args": ["my_noise_reject"], "children": [{"id": "values", "args": ["\"1.3, 0.8, 0.7, 0.6, 0.55\"", "\"1.5, 0.9, 0.8, 0.65, 0.6\"", "\"1.5, 0.9, 0.8, 0.65, 0.6\"", "\"1.5, 0.9, 0.8, 0.65, 0.6\"", "\"1.5, 0.9, 0.8, 0.65, 0.6\""]}]}, {"id": "noise_immunity_below_low", "args": ["my_noise_reject_outside_rail"], "children": [{"id": "values", "args": ["\"1, 0.8, 0.5\"", "\"1, 0.8, 0.5\"", "\"1, 0.8, 0.5\""]}]}, {"id": "noise_immunity_above_high", "args": ["my_noise_reject_outside_rail"], "children": [{"id": "values", "args": ["\"1, 0.8, 0.5\"", "\"1, 0.8, 0.5\"", "\"1, 0.8, 0.5\""]}]}, {"id": "steady_state_current_low", "args": ["my_current_low"], "children": [{"id": "values", "args": ["\"0.1, 0.05, 0, -0.1, -0.25, -1, -1.8\""]}]}, {"id": "steady_state_current_high", "args": ["my_current_high"], "children": [{"id": "values", "args": ["\"2, 1.8, 1.7, 1.4, 1, 0.5, 0, -0.1, -0.8\""]}]}, {"id": "propagated_noise_width_high", "args": ["my_propagated_noise"], "children": [{"id": "values", "args": ["\"0.01, 0.10\"", "\"0.15, 0.18\"", "\"0.04, 0.14\"", "\"0.18, 0.25\"", "\"0.07, 0.17\"", "\"0.32, 0.35\""]}]}, {"id": "propagated_noise_height_high", "args": ["my_propagated_noise"], "children": [{"id": "values", "args": ["\"0.01, 0.10\"", "\"0.15, 0.18\"", "\"0.04, 0.14\"", "\"0.18, 0.25\"", "\"0.07, 0.17\"", "\"0.32, 0.35\""]}]}, {"id": "propagated_noise_width_low", "args": ["my_propagated_noise"], "children": [{"id": "values", "args": ["\"0.01, 0.10\"", "\"0.15, 0.18\"", "\"0.04, 0.14\"", "\"0.18, 0.25\"", "\"0.07, 0.17\"", "\"0.32, 0.35\""]}]}, {"id": "propagated_noise_height_low", "args": ["my_propagated_noise"], "children": [{"id": "values", "args": ["\"0.01, 0.10\"", "\"0.15, 0.18\"", "\"0.04, 0.14\"", "\"0.18, 0.25\"", "\"0.07, 0.17\"", "\"0.32, 0.35\""]}]}, {"id": "propagated_noise_width_above_high", "args": ["my_propagated_noise"], "children": [{"id": "values", "args": ["\"0.01, 0.10\"", "\"0.15, 0.18\"", "\"0.04, 0.14\"", "\"0.18, 0.25\"", "\"0.07, 0.17\"", "\"0.32, 0.35\""]}]}, {"id": "propagated_noise_height_above_high", "args": ["my_propagated_noise"], "children": [{"id": "values", "args": ["\"0.01, 0.10\"", "\"0.15, 0.18\"", "\"0.04, 0.14\"", "\"0.18, 0.25\"", "\"0.07, 0.17\"", "\"0.32, 0.35\""]}]}, {"id": "propagated_noise_width_below_low", "args": ["my_propagated_noise"], "children": [{"id": "values", "args": ["\"0.01, 0.10\"", "\"0.15, 0.18\"", "\"0.04, 0.14\"", "\"0.18, 0.25\"", "\"0.07, 0.17\"", "\"0.32, 0.35\""]}]}, {"id": "propagated_noise_height_below_low", "args": ["my_propagated_noise"], "children": [{"id": "values", "args": ["\"0.01, 0.10\"", "\"0.15, 0.18\"", "\"0.04, 0.14\"", "\"0.18, 0.25\"", "\"0.07, 0.17\"", "\"0.32, 0.35\""]}]}]}]}]}]} \ No newline at end of file diff --git a/test/inverter_spdm.lib b/test/inverter_spdm.lib new file mode 100644 index 0000000..9b891f4 --- /dev/null +++ b/test/inverter_spdm.lib @@ -0,0 +1,484 @@ +library (inverter) { + + delay_model : "polynomial"; + + time_unit : "1ns"; + voltage_unit : "1V"; + current_unit : "1mA"; + capacitive_load_unit (1,pf); + pulling_resistance_unit : 1kohm; + + default_fanout_load : 1.0; + default_inout_pin_cap : 1.0; + default_input_pin_cap : 1.0; + default_output_pin_cap : 0.00; + + power_supply() { + default_power_rail : VDD; + power_rail(VDD1, 1.6); + power_rail(VDD2, 1.3); + } + + input_voltage(MY_CMOS_IN) { + vil : 0.3; + vih : 1.1; + vimin : -0.3; + vimax : VDD + 0.3; + } + + output_voltage(MY_CMOS_OUT) { + vol : 0.1; + voh : 1.4; + vomin : -0.3; + vomax : VDD + 0.3; + } + + poly_template ( my_noise_reject ) { + variables ( input_noise_width, voltage, voltage1, temperature, \ + total_output_net_capacitance); + mapping(voltage, VDD1); + mapping(voltage1, VDD2); + variable_1_range (0, 2); + variable_2_range (1.4, 1.8); + variable_3_range (1.1, 1.5); + variable_4_range (-40, 125); + variable_5_range (0.01, 1.0); + + domain (typ) { + variables ( input_noise_width, voltage, voltage1, \ + temperature, \ + total_output_net_capacitance); + variable_1_range (0, 2); + variable_2_range (1.5, 1.7); + variable_3_range (1.2, 1.4); + variable_4_range (25, 25); + variable_5_range (0.01, 1.0); + mapping(voltage, VDD1); + mapping(voltage1, VDD2); + } + + domain (min) { + variables ( input_noise_width, \ + voltage, voltage1, \ + temperature ); + variable_1_range (0, 2); + variable_2_range (1.7, 1.8); + variable_3_range (1.4, 1.5); + variable_4_range (-40, -40); + mapping(voltage, VDD1); + mapping(voltage1, VDD2); + } + + domain (max) { + variables ( input_noise_width, \ + voltage, voltage1, \ + temperature ); + variable_1_range (0, 2); + variable_2_range (1.6, 1.7); + variable_3_range (1.1, 1.2);variable_4_range (125, 125); + mapping(voltage, VDD1); + mapping(voltage1, VDD2); + } + } + + poly_template ( my_noise_reject_outside_rail ) { + variables ( input_noise_width, \ + voltage, voltage1, \ + temperature ); + mapping(voltage, VDD1); + mapping(voltage1, VDD2); + variable_1_range (0, 2); + variable_2_range (1.4, 1.8); + variable_3_range (1.1, 1.5); + variable_4_range (-40, 125); + } + + poly_template ( my_current_low ) { + variables ( iv_output_voltage, \ + voltage, voltage1, \ + temperature ); + mapping(voltage, VDD1); + mapping(voltage1, VDD2); + variable_1_range (-1, 2); + variable_2_range (1.4, 1.8); + variable_3_range (1.1, 1.5); + variable_4_range (-40, 125); + } + + poly_template ( my_current_high ) { + variables ( iv_output_voltage, \ + voltage, voltage1, \ + temperature ); + mapping(voltage, VDD1); + mapping(voltage1, VDD2); + variable_1_range (-1, 2); + variable_2_range (1.4, 1.8); + variable_3_range (1.1, 1.5); + variable_4_range (-40, 125); + } + + poly_template(my_propagated_noise) { + variables ( input_noise_width, \ + input_noise_height, \ + input_peak_time_ratio \ + total_output_net_capacitance, \ + voltage, \ + voltage1, \ + temperature ); + mapping(voltage, VDD1); + mapping(voltage1, VDD2); + variable_1_range (0.01, 2); + variable_2_range (0, 0.8); + variable_3_range (0.0, 1.0); + variable_4_range (0, 2); + variable_5_range (1.4, 1.8); + variable_6_range (1.1, 1.5); + variable_7_range (-40, 125); + } + + cell ( INV ) { + area : 1 ; + + pin ( A ) { + direction : input ; + capacitance : 1 ; + fanout_load : 1 ; + + input_voltage : MY_CMOS_IN ; + + hyperbolic_noise_low() { + height_coefficient : 0.4; + area_coefficient : 1.1; + width_coefficient : 0.1; + } + hyperbolic_noise_high() { + height_coefficient : 0.3; + area_coefficient : 0.9; + width_coefficient : 0.1; + } + hyperbolic_noise_below_low() { + height_coefficient : 0.1; + area_coefficient : 0.3; + width_coefficient : 0.01; + } + hyperbolic_noise_above_high() { + height_coefficient : 0.1; + area_coefficient : 0.3; + width_coefficient : 0.01; + } + } + + pin ( Y ) { + direction : output ; + max_fanout : 10 ; + function : " !A "; + + output_voltage : MY_CMOS_OUT ; + + timing () { + + related_pin : A ; + + cell_rise(scalar) { values("0");} + rise_transition(scalar) { values("0");} + cell_fall(scalar) { values("0");} + fall_transition(scalar) { values("0");} + + noise_immunity_low (my_noise_reject) { + domain (typ) { + orders ("1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + domain (min) { + orders("1 3 1 1"); + coefs("-0.0143963, 0.027248, 1.41943, -0.549705, \ + 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \ + 0.000114903, -0.00251275, -0.00190513, 0.0025968, \ + 0.00126903, -0.0109683, -0.00618697, 0.0342387, \ + 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \ + -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \ + -0.00194544, 0.000979011, 0.00657121, -0.000407383, \ + -0.0275888, -0.0163063"); + } + domain (max) { + orders("1 3 1 1"); + coefs("-0.0143963, 0.027248, 1.41943, -0.549705, \ + 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \ + 0.000114903, -0.00251275, -0.00190513, 0.0025968, \ + 0.00126903, -0.0109683, -0.00618697, 0.0342387, \ + 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \ + -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \ + -0.00194544, 0.000979011, 0.00657121, -0.000407383, \ + -0.0275888, -0.0163063"); + } + } + noise_immunity_high (my_noise_reject) { + domain (typ) { + orders ("1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + domain (min) { + orders("1 3 1 1"); + coefs("-0.0143963, 0.027248, 1.41943, -0.549705, \ + 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \ + 0.000114903, -0.00251275, -0.00190513, 0.0025968, \ + 0.00126903, -0.0109683, -0.00618697, 0.0342387, \ + 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \ + -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \ + -0.00194544, 0.000979011, 0.00657121, -0.000407383, \ + -0.0275888, -0.0163063"); + } + domain (max) { + orders("1 3 1 1"); + coefs("-0.0143963, 0.027248, 1.41943, -0.549705, \ + 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \ + 0.000114903, -0.00251275, -0.00190513, 0.0025968, \ + 0.00126903, -0.0109683, -0.00618697, 0.0342387, \ + 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \ + -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \ + -0.00194544, 0.000979011, 0.00657121, -0.000407383, \ + -0.0275888, -0.0163063"); + } + } + noise_immunity_below_low (my_noise_reject_outside_rail) { + orders("1 3 1 1"); + coefs("-0.0143963, 0.027248, 1.41943, -0.549705, \ + 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \ + 0.000114903, -0.00251275, -0.00190513, 0.0025968, \ + 0.00126903, -0.0109683, -0.00618697, 0.0342387, \ + 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \ + -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \ + -0.00194544, 0.000979011, 0.00657121, -0.000407383, \ + -0.0275888, -0.0163063"); + } + noise_immunity_above_high (my_noise_reject_outside_rail) { + orders("1 3 1 1"); + coefs("-0.0143963, 0.027248, 1.41943, -0.549705, \ + 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \ + 0.000114903, -0.00251275, -0.00190513, 0.0025968, \ + 0.00126903, -0.0109683, -0.00618697, 0.0342387, \ + 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \ + -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \ + -0.00194544, 0.000979011, 0.00657121, -0.000407383, \ + -0.0275888, -0.0163063"); + } + + steady_state_resistance_high : 1500; + steady_state_resistance_low : 1100; + steady_state_resistance_above_high : 200; + steady_state_resistance_below_low : 100; + + steady_state_current_low(my_current_low) { + orders("1 3 1 1"); + coefs("-0.0143963, 0.027248, 1.41943, -0.549705, \ + 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \ + 0.000114903, -0.00251275, -0.00190513, 0.0025968, \ + 0.00126903, -0.0109683, -0.00618697, 0.0342387, \ + 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \ + -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \ + -0.00194544, 0.000979011, 0.00657121, -0.000407383, \ + -0.0275888, -0.0163063"); + } + + steady_state_current_high(my_current_high) { + orders("1 3 1 1"); + coefs("-0.0143963, 0.027248, 1.41943, -0.549705, \ + 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \ + 0.000114903, -0.00251275, -0.00190513, 0.0025968, \ + 0.00126903, -0.0109683, -0.00618697, 0.0342387, \ + 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \ + -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \ + -0.00194544, 0.000979011, 0.00657121, -0.000407383, \ + -0.0275888, -0.0163063"); + } + +/* + steady_state_current_tristate(my_current_high) { + orders("1 3 1 1"); + coefs("-0.0143963, 0.027248, 1.41943, -0.549705, \ + 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \ + 0.000114903, -0.00251275, -0.00190513, 0.0025968, \ + 0.00126903, -0.0109683, -0.00618697, 0.0342387, \ + 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \ + -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \ + -0.00194544, 0.000979011, 0.00657121, -0.000407383, \ + -0.0275888, -0.0163063"); + } +*/ + + propagated_noise_width_high(my_propagated_noise) { + orders ("1, 1, 1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + + propagated_noise_height_high(my_propagated_noise) { + orders ("1, 1, 1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + + propagated_noise_peak_time_ratio_high(my_propagated_noise) { + orders ("1, 1, 1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + + propagated_noise_width_low(my_propagated_noise) { + orders ("1, 1, 1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + + propagated_noise_height_low(my_propagated_noise) { + orders ("1, 1, 1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + + propagated_noise_peak_time_ratio_low(my_propagated_noise) { + orders ("1, 1, 1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + + propagated_noise_width_above_high(my_propagated_noise) { + orders ("1, 1, 1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + + propagated_noise_height_above_high(my_propagated_noise) { + orders ("1, 1, 1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + + propagated_noise_peak_time_ratio_above_high(my_propagated_noise) { + orders ("1, 1, 1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + + propagated_noise_width_below_low(my_propagated_noise) { + orders ("1, 1, 1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + + propagated_noise_height_below_low(my_propagated_noise) { + orders ("1, 1, 1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + + propagated_noise_peak_time_ratio_below_low(my_propagated_noise) { + orders ("1, 1, 1, 1, 1, 1, 1") + coefs ("1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0" ); + } + + } + } + } +} diff --git a/test/inverter_spdm.lib.ref b/test/inverter_spdm.lib.ref new file mode 100644 index 0000000..cebdb55 --- /dev/null +++ b/test/inverter_spdm.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["inverter"], "children": [{"id": "delay_model", "value": "\"polynomial\""}, {"id": "time_unit", "value": "\"1ns\""}, {"id": "voltage_unit", "value": "\"1V\""}, {"id": "current_unit", "value": "\"1mA\""}, {"id": "capacitive_load_unit", "args": ["1", "pf"]}, {"id": "pulling_resistance_unit", "value": "1kohm"}, {"id": "default_fanout_load", "value": "1.0"}, {"id": "default_inout_pin_cap", "value": "1.0"}, {"id": "default_input_pin_cap", "value": "1.0"}, {"id": "default_output_pin_cap", "value": "0.00"}, {"id": "power_supply", "children": [{"id": "default_power_rail", "value": "VDD"}, {"id": "power_rail", "args": ["VDD1", "1.6"]}, {"id": "power_rail", "args": ["VDD2", "1.3"]}]}, {"id": "input_voltage", "args": ["MY_CMOS_IN"], "children": [{"id": "vil", "value": "0.3"}, {"id": "vih", "value": "1.1"}, {"id": "vimin", "value": "-0.3"}, {"id": "vimax", "value": "VDD+0.3"}]}, {"id": "output_voltage", "args": ["MY_CMOS_OUT"], "children": [{"id": "vol", "value": "0.1"}, {"id": "voh", "value": "1.4"}, {"id": "vomin", "value": "-0.3"}, {"id": "vomax", "value": "VDD+0.3"}]}, {"id": "poly_template", "args": ["my_noise_reject"], "children": [{"id": "variables", "args": ["input_noise_width", "voltage", "voltage1", "temperature", "total_output_net_capacitance"]}, {"id": "mapping", "args": ["voltage", "VDD1"]}, {"id": "mapping", "args": ["voltage1", "VDD2"]}, {"id": "variable_1_range", "args": ["0", "2"]}, {"id": "variable_2_range", "args": ["1.4", "1.8"]}, {"id": "variable_3_range", "args": ["1.1", "1.5"]}, {"id": "variable_4_range", "args": ["-40", "125"]}, {"id": "variable_5_range", "args": ["0.01", "1.0"]}, {"id": "domain", "args": ["typ"], "children": [{"id": "variables", "args": ["input_noise_width", "voltage", "voltage1", "temperature", "total_output_net_capacitance"]}, {"id": "variable_1_range", "args": ["0", "2"]}, {"id": "variable_2_range", "args": ["1.5", "1.7"]}, {"id": "variable_3_range", "args": ["1.2", "1.4"]}, {"id": "variable_4_range", "args": ["25", "25"]}, {"id": "variable_5_range", "args": ["0.01", "1.0"]}, {"id": "mapping", "args": ["voltage", "VDD1"]}, {"id": "mapping", "args": ["voltage1", "VDD2"]}]}, {"id": "domain", "args": ["min"], "children": [{"id": "variables", "args": ["input_noise_width", "voltage", "voltage1", "temperature"]}, {"id": "variable_1_range", "args": ["0", "2"]}, {"id": "variable_2_range", "args": ["1.7", "1.8"]}, {"id": "variable_3_range", "args": ["1.4", "1.5"]}, {"id": "variable_4_range", "args": ["-40", "-40"]}, {"id": "mapping", "args": ["voltage", "VDD1"]}, {"id": "mapping", "args": ["voltage1", "VDD2"]}]}, {"id": "domain", "args": ["max"], "children": [{"id": "variables", "args": ["input_noise_width", "voltage", "voltage1", "temperature"]}, {"id": "variable_1_range", "args": ["0", "2"]}, {"id": "variable_2_range", "args": ["1.6", "1.7"]}, {"id": "variable_3_range", "args": ["1.1", "1.2"]}, {"id": "variable_4_range", "args": ["125", "125"]}, {"id": "mapping", "args": ["voltage", "VDD1"]}, {"id": "mapping", "args": ["voltage1", "VDD2"]}]}]}, {"id": "poly_template", "args": ["my_noise_reject_outside_rail"], "children": [{"id": "variables", "args": ["input_noise_width", "voltage", "voltage1", "temperature"]}, {"id": "mapping", "args": ["voltage", "VDD1"]}, {"id": "mapping", "args": ["voltage1", "VDD2"]}, {"id": "variable_1_range", "args": ["0", "2"]}, {"id": "variable_2_range", "args": ["1.4", "1.8"]}, {"id": "variable_3_range", "args": ["1.1", "1.5"]}, {"id": "variable_4_range", "args": ["-40", "125"]}]}, {"id": "poly_template", "args": ["my_current_low"], "children": [{"id": "variables", "args": ["iv_output_voltage", "voltage", "voltage1", "temperature"]}, {"id": "mapping", "args": ["voltage", "VDD1"]}, {"id": "mapping", "args": ["voltage1", "VDD2"]}, {"id": "variable_1_range", "args": ["-1", "2"]}, {"id": "variable_2_range", "args": ["1.4", "1.8"]}, {"id": "variable_3_range", "args": ["1.1", "1.5"]}, {"id": "variable_4_range", "args": ["-40", "125"]}]}, {"id": "poly_template", "args": ["my_current_high"], "children": [{"id": "variables", "args": ["iv_output_voltage", "voltage", "voltage1", "temperature"]}, {"id": "mapping", "args": ["voltage", "VDD1"]}, {"id": "mapping", "args": ["voltage1", "VDD2"]}, {"id": "variable_1_range", "args": ["-1", "2"]}, {"id": "variable_2_range", "args": ["1.4", "1.8"]}, {"id": "variable_3_range", "args": ["1.1", "1.5"]}, {"id": "variable_4_range", "args": ["-40", "125"]}]}, {"id": "poly_template", "args": ["my_propagated_noise"], "children": [{"id": "variables", "args": ["input_noise_width", "input_noise_height", "input_peak_time_ratio", "total_output_net_capacitance", "voltage", "voltage1", "temperature"]}, {"id": "mapping", "args": ["voltage", "VDD1"]}, {"id": "mapping", "args": ["voltage1", "VDD2"]}, {"id": "variable_1_range", "args": ["0.01", "2"]}, {"id": "variable_2_range", "args": ["0", "0.8"]}, {"id": "variable_3_range", "args": ["0.0", "1.0"]}, {"id": "variable_4_range", "args": ["0", "2"]}, {"id": "variable_5_range", "args": ["1.4", "1.8"]}, {"id": "variable_6_range", "args": ["1.1", "1.5"]}, {"id": "variable_7_range", "args": ["-40", "125"]}]}, {"id": "cell", "args": ["INV"], "children": [{"id": "area", "value": "1"}, {"id": "pin", "args": ["A"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "1"}, {"id": "fanout_load", "value": "1"}, {"id": "input_voltage", "value": "MY_CMOS_IN"}, {"id": "hyperbolic_noise_low", "children": [{"id": "height_coefficient", "value": "0.4"}, {"id": "area_coefficient", "value": "1.1"}, {"id": "width_coefficient", "value": "0.1"}]}, {"id": "hyperbolic_noise_high", "children": [{"id": "height_coefficient", "value": "0.3"}, {"id": "area_coefficient", "value": "0.9"}, {"id": "width_coefficient", "value": "0.1"}]}, {"id": "hyperbolic_noise_below_low", "children": [{"id": "height_coefficient", "value": "0.1"}, {"id": "area_coefficient", "value": "0.3"}, {"id": "width_coefficient", "value": "0.01"}]}, {"id": "hyperbolic_noise_above_high", "children": [{"id": "height_coefficient", "value": "0.1"}, {"id": "area_coefficient", "value": "0.3"}, {"id": "width_coefficient", "value": "0.01"}]}]}, {"id": "pin", "args": ["Y"], "children": [{"id": "direction", "value": "output"}, {"id": "max_fanout", "value": "10"}, {"id": "function", "value": "\" !A \""}, {"id": "output_voltage", "value": "MY_CMOS_OUT"}, {"id": "timing", "children": [{"id": "related_pin", "value": "A"}, {"id": "cell_rise", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "rise_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "cell_fall", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "fall_transition", "args": ["scalar"], "children": [{"id": "values", "args": ["\"0\""]}]}, {"id": "noise_immunity_low", "args": ["my_noise_reject"], "children": [{"id": "domain", "args": ["typ"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}, {"id": "domain", "args": ["min"], "children": [{"id": "orders", "args": ["\"1 3 1 1\""]}, {"id": "coefs", "args": ["\"-0.0143963, 0.027248, 1.41943, -0.549705, \\\n 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \\\n 0.000114903, -0.00251275, -0.00190513, 0.0025968, \\\n 0.00126903, -0.0109683, -0.00618697, 0.0342387, \\\n 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \\\n -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \\\n -0.00194544, 0.000979011, 0.00657121, -0.000407383, \\\n -0.0275888, -0.0163063\""]}]}, {"id": "domain", "args": ["max"], "children": [{"id": "orders", "args": ["\"1 3 1 1\""]}, {"id": "coefs", "args": ["\"-0.0143963, 0.027248, 1.41943, -0.549705, \\\n 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \\\n 0.000114903, -0.00251275, -0.00190513, 0.0025968, \\\n 0.00126903, -0.0109683, -0.00618697, 0.0342387, \\\n 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \\\n -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \\\n -0.00194544, 0.000979011, 0.00657121, -0.000407383, \\\n -0.0275888, -0.0163063\""]}]}]}, {"id": "noise_immunity_high", "args": ["my_noise_reject"], "children": [{"id": "domain", "args": ["typ"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}, {"id": "domain", "args": ["min"], "children": [{"id": "orders", "args": ["\"1 3 1 1\""]}, {"id": "coefs", "args": ["\"-0.0143963, 0.027248, 1.41943, -0.549705, \\\n 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \\\n 0.000114903, -0.00251275, -0.00190513, 0.0025968, \\\n 0.00126903, -0.0109683, -0.00618697, 0.0342387, \\\n 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \\\n -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \\\n -0.00194544, 0.000979011, 0.00657121, -0.000407383, \\\n -0.0275888, -0.0163063\""]}]}, {"id": "domain", "args": ["max"], "children": [{"id": "orders", "args": ["\"1 3 1 1\""]}, {"id": "coefs", "args": ["\"-0.0143963, 0.027248, 1.41943, -0.549705, \\\n 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \\\n 0.000114903, -0.00251275, -0.00190513, 0.0025968, \\\n 0.00126903, -0.0109683, -0.00618697, 0.0342387, \\\n 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \\\n -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \\\n -0.00194544, 0.000979011, 0.00657121, -0.000407383, \\\n -0.0275888, -0.0163063\""]}]}]}, {"id": "noise_immunity_below_low", "args": ["my_noise_reject_outside_rail"], "children": [{"id": "orders", "args": ["\"1 3 1 1\""]}, {"id": "coefs", "args": ["\"-0.0143963, 0.027248, 1.41943, -0.549705, \\\n 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \\\n 0.000114903, -0.00251275, -0.00190513, 0.0025968, \\\n 0.00126903, -0.0109683, -0.00618697, 0.0342387, \\\n 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \\\n -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \\\n -0.00194544, 0.000979011, 0.00657121, -0.000407383, \\\n -0.0275888, -0.0163063\""]}]}, {"id": "noise_immunity_above_high", "args": ["my_noise_reject_outside_rail"], "children": [{"id": "orders", "args": ["\"1 3 1 1\""]}, {"id": "coefs", "args": ["\"-0.0143963, 0.027248, 1.41943, -0.549705, \\\n 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \\\n 0.000114903, -0.00251275, -0.00190513, 0.0025968, \\\n 0.00126903, -0.0109683, -0.00618697, 0.0342387, \\\n 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \\\n -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \\\n -0.00194544, 0.000979011, 0.00657121, -0.000407383, \\\n -0.0275888, -0.0163063\""]}]}, {"id": "steady_state_resistance_high", "value": "1500"}, {"id": "steady_state_resistance_low", "value": "1100"}, {"id": "steady_state_resistance_above_high", "value": "200"}, {"id": "steady_state_resistance_below_low", "value": "100"}, {"id": "steady_state_current_low", "args": ["my_current_low"], "children": [{"id": "orders", "args": ["\"1 3 1 1\""]}, {"id": "coefs", "args": ["\"-0.0143963, 0.027248, 1.41943, -0.549705, \\\n 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \\\n 0.000114903, -0.00251275, -0.00190513, 0.0025968, \\\n 0.00126903, -0.0109683, -0.00618697, 0.0342387, \\\n 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \\\n -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \\\n -0.00194544, 0.000979011, 0.00657121, -0.000407383, \\\n -0.0275888, -0.0163063\""]}]}, {"id": "steady_state_current_high", "args": ["my_current_high"], "children": [{"id": "orders", "args": ["\"1 3 1 1\""]}, {"id": "coefs", "args": ["\"-0.0143963, 0.027248, 1.41943, -0.549705, \\\n 1.85208, 1.83018, -5.58407, -2.96409, -0.000201525, \\\n 0.000114903, -0.00251275, -0.00190513, 0.0025968, \\\n 0.00126903, -0.0109683, -0.00618697, 0.0342387, \\\n 0.0150761, 2.08784, -0.221496, 4.13848, 2.44241, \\\n -14.0275, -7.83306, 7.09012e-05, -1.98323e-05, \\\n -0.00194544, 0.000979011, 0.00657121, -0.000407383, \\\n -0.0275888, -0.0163063\""]}]}, {"id": "propagated_noise_width_high", "args": ["my_propagated_noise"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}, {"id": "propagated_noise_height_high", "args": ["my_propagated_noise"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}, {"id": "propagated_noise_peak_time_ratio_high", "args": ["my_propagated_noise"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}, {"id": "propagated_noise_width_low", "args": ["my_propagated_noise"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}, {"id": "propagated_noise_height_low", "args": ["my_propagated_noise"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}, {"id": "propagated_noise_peak_time_ratio_low", "args": ["my_propagated_noise"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}, {"id": "propagated_noise_width_above_high", "args": ["my_propagated_noise"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}, {"id": "propagated_noise_height_above_high", "args": ["my_propagated_noise"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}, {"id": "propagated_noise_peak_time_ratio_above_high", "args": ["my_propagated_noise"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}, {"id": "propagated_noise_width_below_low", "args": ["my_propagated_noise"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}, {"id": "propagated_noise_height_below_low", "args": ["my_propagated_noise"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}, {"id": "propagated_noise_peak_time_ratio_below_low", "args": ["my_propagated_noise"], "children": [{"id": "orders", "args": ["\"1, 1, 1, 1, 1, 1, 1\""]}, {"id": "coefs", "args": ["\"1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, \\\n 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0\""]}]}]}]}]}]} \ No newline at end of file diff --git a/test/my_group.lib b/test/my_group.lib new file mode 100644 index 0000000..ec72a42 --- /dev/null +++ b/test/my_group.lib @@ -0,0 +1,46 @@ +library(typ) { + + define_group ( my_template, library ); + + define ( index_1, my_template, string ); + define ( variable_1, my_template, string ); + + define_group ( my_group, pin ); + + define ( when, my_group, string ); + + define ( index_1, my_group, string ); + define ( values, my_group, string ); + + my_template(my_template_name) { + variable_1 : input_net_transition; + index_1 : "0.05, 0.1, 0.2, 0.3, 0.5"; + } + +cell (AND2X1) { + + pin(A) { + direction : input; + } /* pin A */ + + pin(B) { + direction : input; + + my_group (my_template_name) { + when : "A" ; + values : "6.098e-11, 3.009e-10, 2.377e-10, 2.658e-10, 3.128e-10"; + } /* end my_group */ + + my_group (my_template_name) { + when : "!A" ; + values : "8.098e-11, 1.009e-10, 1.377e-10, 1.658e-10, 2.128e-10"; + } /* end my_group */ + + } /* pin B */ + + pin(Y) { + direction : output; + } /* pin Y */ + } /* cell AND2X1 */ +} /* library typ */ + diff --git a/test/my_group.lib.ref b/test/my_group.lib.ref new file mode 100644 index 0000000..5be5265 --- /dev/null +++ b/test/my_group.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["typ"], "children": [{"id": "define_group", "args": ["my_template", "library"]}, {"id": "define", "args": ["index_1", "my_template", "string"]}, {"id": "define", "args": ["variable_1", "my_template", "string"]}, {"id": "define_group", "args": ["my_group", "pin"]}, {"id": "define", "args": ["when", "my_group", "string"]}, {"id": "define", "args": ["index_1", "my_group", "string"]}, {"id": "define", "args": ["values", "my_group", "string"]}, {"id": "my_template", "args": ["my_template_name"], "children": [{"id": "variable_1", "value": "input_net_transition"}, {"id": "index_1", "value": "\"0.05, 0.1, 0.2, 0.3, 0.5\""}]}, {"id": "cell", "args": ["AND2X1"], "children": [{"id": "pin", "args": ["A"], "children": [{"id": "direction", "value": "input"}]}, {"id": "pin", "args": ["B"], "children": [{"id": "direction", "value": "input"}, {"id": "my_group", "args": ["my_template_name"], "children": [{"id": "when", "value": "\"A\""}, {"id": "values", "value": "\"6.098e-11, 3.009e-10, 2.377e-10, 2.658e-10, 3.128e-10\""}]}, {"id": "my_group", "args": ["my_template_name"], "children": [{"id": "when", "value": "\"!A\""}, {"id": "values", "value": "\"8.098e-11, 1.009e-10, 1.377e-10, 1.658e-10, 2.128e-10\""}]}]}, {"id": "pin", "args": ["Y"], "children": [{"id": "direction", "value": "output"}]}]}]} \ No newline at end of file diff --git a/test/newstuff.lib b/test/newstuff.lib new file mode 100644 index 0000000..f47bc2c --- /dev/null +++ b/test/newstuff.lib @@ -0,0 +1,39 @@ +library(newstuff) { + cell(cell1) { + retention_cell : "x"; + power_gating_cell : "y"; + pin(pin1) { + retention_pin( "pin2","z"); + power_gating_pin("pin2",2); + map_to_logic : "1"; + } + pin(pin2) { + retention_pin( "pin1","z"); + direction : "output"; + } + } + cell(cell2) { + is_level_shifter : true; + level_shifter_type : "LH"; + input_voltage_range(1,2); + output_voltage_range(1,2); + pin(pin1) { + power_gating_pin("pin2","2"); + } + pg_pin(pin2) { + std_cell_main_rail : true; + } + } + cell(cell3) { + level_shifter_type : "HL"; + input_voltage_range(1,2); + output_voltage_range(1,2); + + pin(pin1) { + power_gating_pin("pin2","2.7"); + } + pg_pin(pin2) { + std_cell_main_rail : true; + } + } +} diff --git a/test/newstuff.lib.ref b/test/newstuff.lib.ref new file mode 100644 index 0000000..989ee83 --- /dev/null +++ b/test/newstuff.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["newstuff"], "children": [{"id": "cell", "args": ["cell1"], "children": [{"id": "retention_cell", "value": "\"x\""}, {"id": "power_gating_cell", "value": "\"y\""}, {"id": "pin", "args": ["pin1"], "children": [{"id": "retention_pin", "args": ["\"pin2\"", "\"z\""]}, {"id": "power_gating_pin", "args": ["\"pin2\"", "2"]}, {"id": "map_to_logic", "value": "\"1\""}]}, {"id": "pin", "args": ["pin2"], "children": [{"id": "retention_pin", "args": ["\"pin1\"", "\"z\""]}, {"id": "direction", "value": "\"output\""}]}]}, {"id": "cell", "args": ["cell2"], "children": [{"id": "is_level_shifter", "value": "true"}, {"id": "level_shifter_type", "value": "\"LH\""}, {"id": "input_voltage_range", "args": ["1", "2"]}, {"id": "output_voltage_range", "args": ["1", "2"]}, {"id": "pin", "args": ["pin1"], "children": [{"id": "power_gating_pin", "args": ["\"pin2\"", "\"2\""]}]}, {"id": "pg_pin", "args": ["pin2"], "children": [{"id": "std_cell_main_rail", "value": "true"}]}]}, {"id": "cell", "args": ["cell3"], "children": [{"id": "level_shifter_type", "value": "\"HL\""}, {"id": "input_voltage_range", "args": ["1", "2"]}, {"id": "output_voltage_range", "args": ["1", "2"]}, {"id": "pin", "args": ["pin1"], "children": [{"id": "power_gating_pin", "args": ["\"pin2\"", "\"2.7\""]}]}, {"id": "pg_pin", "args": ["pin2"], "children": [{"id": "std_cell_main_rail", "value": "true"}]}]}]} \ No newline at end of file diff --git a/test/si2testcase.lib b/test/si2testcase.lib new file mode 100644 index 0000000..cc43a4c --- /dev/null +++ b/test/si2testcase.lib @@ -0,0 +1,25 @@ +/* this lib provided as a testcase by David Mallis of SI2 + and tests for the case where an error was wrongly generated, + when a newly defined group could be contained in multiple + places. */ + +library(q) { + + delay_model : table_lookup; + + define_group( sii, cell ); + define_group( sii, pin ); + define(siiattrib, sii, string); + + cell (siiCell) { + pin(A) { + direction : input; + capacitance : 0.3; + rise_capacitance : 0.1; + fall_capacitance : 0.2; + sii("9") { + siiattrib : "1" ; + } + } +} +} diff --git a/test/si2testcase.lib.ref b/test/si2testcase.lib.ref new file mode 100644 index 0000000..a22c4d8 --- /dev/null +++ b/test/si2testcase.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["q"], "children": [{"id": "delay_model", "value": "table_lookup"}, {"id": "define_group", "args": ["sii", "cell"]}, {"id": "define_group", "args": ["sii", "pin"]}, {"id": "define", "args": ["siiattrib", "sii", "string"]}, {"id": "cell", "args": ["siiCell"], "children": [{"id": "pin", "args": ["A"], "children": [{"id": "direction", "value": "input"}, {"id": "capacitance", "value": "0.3"}, {"id": "rise_capacitance", "value": "0.1"}, {"id": "fall_capacitance", "value": "0.2"}, {"id": "sii", "args": ["\"9\""], "children": [{"id": "siiattrib", "value": "\"1\""}]}]}]}]} \ No newline at end of file diff --git a/test/t2.lib b/test/t2.lib new file mode 100644 index 0000000..b567a5a --- /dev/null +++ b/test/t2.lib @@ -0,0 +1,6 @@ +library(sample) { +nom_voltage : 5; + cell(example) { + area : 12.00 ; + } +} diff --git a/test/t2.lib.ref b/test/t2.lib.ref new file mode 100644 index 0000000..c384b34 --- /dev/null +++ b/test/t2.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["sample"], "children": [{"id": "nom_voltage", "value": "5"}, {"id": "cell", "args": ["example"], "children": [{"id": "area", "value": "12.00"}]}]} \ No newline at end of file diff --git a/test/t28.lib b/test/t28.lib new file mode 100644 index 0000000..0149268 --- /dev/null +++ b/test/t28.lib @@ -0,0 +1,11 @@ +library (t28) { + define(aaa,pin,integer); + cell (c1) { + pin (A) { + aaa : 1; + } + pin (BB) { + aaa : 1.0000; + } + } +} diff --git a/test/t28.lib.ref b/test/t28.lib.ref new file mode 100644 index 0000000..ffd9e13 --- /dev/null +++ b/test/t28.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["t28"], "children": [{"id": "define", "args": ["aaa", "pin", "integer"]}, {"id": "cell", "args": ["c1"], "children": [{"id": "pin", "args": ["A"], "children": [{"id": "aaa", "value": "1"}]}, {"id": "pin", "args": ["BB"], "children": [{"id": "aaa", "value": "1.0000"}]}]}]} \ No newline at end of file diff --git a/test/test_parse.py b/test/test_parse.py new file mode 100644 index 0000000..2e98337 --- /dev/null +++ b/test/test_parse.py @@ -0,0 +1,18 @@ +import json +from pathlib import Path + +import pytest + +@pytest.mark.parametrize("test", pytest.parsing_tests, ids=lambda test: test.name) +def test_parse(test: Path): + from libparse import LibertyParser + ref = Path(str(test) + ".ref") + print(ref) + if not ref.is_file(): + with pytest.raises(RuntimeError): + LibertyParser(open(test)) + else: + ref_obj = json.load(open(ref, encoding="utf8")) + parser = LibertyParser(open(test)) + dict = parser.ast.to_dict() + assert ref_obj == dict, "parse result didn't match" diff --git a/test/ugroup.lib b/test/ugroup.lib new file mode 100644 index 0000000..8ce6d1f --- /dev/null +++ b/test/ugroup.lib @@ -0,0 +1,55 @@ + + +library(pg_sample) { + define_group(pg_cell_table, cell); + define(values, pg_cell_table, string); + + + define_group(pg_state_data, cell); + define(state, pg_state_data, string); + define(coefficients, pg_state_data, string); + + define_group(pg_timing_data, pin); + define(related_pin, pg_timing_data, string); + define(coefficients, pg_timing_data, string); + + cell (ad2) { + + pg_cell_table(ramps) { + values : "0.1, 3.313, 6.626" ; + } + + pg_cell_table(loads) { + values : "0, 0.02499, 0.156188, 0.312375, 0.62475,1.2495,2.499"; + } + + pin(A) { + pg_timing_data(fallSlewTab) { + related_pin : "y" ; + coefficients : " 0.110163, 0.141989, 0.11636, 0.0972482, \ + 0.0655029, 0.0673979, 0.161816, 0.147963, \ + 0.115873, 0.093776, 0.096074, 0.01363"; + } + pg_timing_data(riseSlewTab) { + related_pin : "y" ; + coefficients : " 0.162563, 0.144023, 0.137538, 0.0821456, \ + 0.103689, 0.102928, 0.116279, 0.162594, \ + 0.155714, 0.0783956, 0.162574, \ + 0.042222"; + } + } + + pg_state_data(pg_state1) { + state : "R1R"; + coefficients : " -1.388e-06, -1.20251e-06, -3.34395e-05, 2.75931e-07, \ + -3.87367e-08, -3.79891e-08, -1.1437e-08, -7.70073e-08, \ + 3.394e-09"; + } + pg_state_data(pg_state2) { + state : "FF1"; + coefficients : " -2.89987e-06, -1.34106e-06, 1.45341e-07, 2.49066e-07, \ + -2.18599e-08, -4.86238e-08, -4.94932e-09, -7.40283e-08, \ + 1.95244e-09"; + } + } +} diff --git a/test/ugroup.lib.ref b/test/ugroup.lib.ref new file mode 100644 index 0000000..45c4806 --- /dev/null +++ b/test/ugroup.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["pg_sample"], "children": [{"id": "define_group", "args": ["pg_cell_table", "cell"]}, {"id": "define", "args": ["values", "pg_cell_table", "string"]}, {"id": "define_group", "args": ["pg_state_data", "cell"]}, {"id": "define", "args": ["state", "pg_state_data", "string"]}, {"id": "define", "args": ["coefficients", "pg_state_data", "string"]}, {"id": "define_group", "args": ["pg_timing_data", "pin"]}, {"id": "define", "args": ["related_pin", "pg_timing_data", "string"]}, {"id": "define", "args": ["coefficients", "pg_timing_data", "string"]}, {"id": "cell", "args": ["ad2"], "children": [{"id": "pg_cell_table", "args": ["ramps"], "children": [{"id": "values", "value": "\"0.1, 3.313, 6.626\""}]}, {"id": "pg_cell_table", "args": ["loads"], "children": [{"id": "values", "value": "\"0, 0.02499, 0.156188, 0.312375, 0.62475,1.2495,2.499\""}]}, {"id": "pin", "args": ["A"], "children": [{"id": "pg_timing_data", "args": ["fallSlewTab"], "children": [{"id": "related_pin", "value": "\"y\""}, {"id": "coefficients", "value": "\" 0.110163, 0.141989, 0.11636, 0.0972482, \\\n 0.0655029, 0.0673979, 0.161816, 0.147963, \\\n 0.115873, 0.093776, 0.096074, 0.01363\""}]}, {"id": "pg_timing_data", "args": ["riseSlewTab"], "children": [{"id": "related_pin", "value": "\"y\""}, {"id": "coefficients", "value": "\" 0.162563, 0.144023, 0.137538, 0.0821456, \\\n 0.103689, 0.102928, 0.116279, 0.162594, \\\n 0.155714, 0.0783956, 0.162574, \\\n 0.042222\""}]}]}, {"id": "pg_state_data", "args": ["pg_state1"], "children": [{"id": "state", "value": "\"R1R\""}, {"id": "coefficients", "value": "\" -1.388e-06, -1.20251e-06, -3.34395e-05, 2.75931e-07, \\\n -3.87367e-08, -3.79891e-08, -1.1437e-08, -7.70073e-08, \\\n 3.394e-09\""}]}, {"id": "pg_state_data", "args": ["pg_state2"], "children": [{"id": "state", "value": "\"FF1\""}, {"id": "coefficients", "value": "\" -2.89987e-06, -1.34106e-06, 1.45341e-07, 2.49066e-07, \\\n -2.18599e-08, -4.86238e-08, -4.94932e-09, -7.40283e-08, \\\n 1.95244e-09\""}]}]}]} \ No newline at end of file diff --git a/test/ugroup_bad.lib b/test/ugroup_bad.lib new file mode 100644 index 0000000..46845e2 --- /dev/null +++ b/test/ugroup_bad.lib @@ -0,0 +1,55 @@ + + +library(pg_sample) { + define_group(pg_cell_table, cell); + define(values, pg_cell_table, string); + + + define_group(pg_state_data, cell); + define(state, pg_state_data, string); + define(coefficients, pg_state_data, string); + + define_group(pg_timing_data, pin); + define(related_pin, pg_timing_data, string); + define(coefficients, pg_timing_data, string); + + cell (ad2) { + + pg_cell_table(ramps) { + values : "0.1, 3.313, 6.626" ; + } + + pg_cell_table(loads) { + values : "0, 0.02499, 0.156188, 0.312375, 0.62475,1.2495,2.499"; + } + + pg_state_data(pg_state1) { + state : "R1R"; + coefficients : " -1.388e-06, -1.20251e-06, -3.34395e-05, 2.75931e-07, \ + -3.87367e-08, -3.79891e-08, -1.1437e-08, -7.70073e-08, \ + 3.394e-09"; + } + + pin(A) { + pg_timing_data(fallSlewTab) { + related_pin : "y" ; + coefficients : " 0.110163, 0.141989, 0.11636, 0.0972482, \ + 0.0655029, 0.0673979, 0.161816, 0.147963, \ + 0.115873, 0.093776, 0.096074, 0.01363"; + } + pg_state_data(pg_state2) { + state : "R1R"; + coefficients : " -1.388e-06, -1.20251e-06, -3.34395e-05, 2.75931e-07, \ + -3.87367e-08, -3.79891e-08, -1.1437e-08, -7.70073e-08, \ + 3.394e-09"; + } + pg_timing_data(riseSlewTab) { + related_pin1x : "y" ; + coefficients : " 0.162563, 0.144023, 0.137538, 0.0821456, \ + 0.103689, 0.102928, 0.116279, 0.162594, \ + 0.155714, 0.0783956, 0.162574, \ + 0.042222"; + } + } + } +} diff --git a/test/ugroup_bad.lib.ref b/test/ugroup_bad.lib.ref new file mode 100644 index 0000000..26b3951 --- /dev/null +++ b/test/ugroup_bad.lib.ref @@ -0,0 +1 @@ +{"id": "library", "args": ["pg_sample"], "children": [{"id": "define_group", "args": ["pg_cell_table", "cell"]}, {"id": "define", "args": ["values", "pg_cell_table", "string"]}, {"id": "define_group", "args": ["pg_state_data", "cell"]}, {"id": "define", "args": ["state", "pg_state_data", "string"]}, {"id": "define", "args": ["coefficients", "pg_state_data", "string"]}, {"id": "define_group", "args": ["pg_timing_data", "pin"]}, {"id": "define", "args": ["related_pin", "pg_timing_data", "string"]}, {"id": "define", "args": ["coefficients", "pg_timing_data", "string"]}, {"id": "cell", "args": ["ad2"], "children": [{"id": "pg_cell_table", "args": ["ramps"], "children": [{"id": "values", "value": "\"0.1, 3.313, 6.626\""}]}, {"id": "pg_cell_table", "args": ["loads"], "children": [{"id": "values", "value": "\"0, 0.02499, 0.156188, 0.312375, 0.62475,1.2495,2.499\""}]}, {"id": "pg_state_data", "args": ["pg_state1"], "children": [{"id": "state", "value": "\"R1R\""}, {"id": "coefficients", "value": "\" -1.388e-06, -1.20251e-06, -3.34395e-05, 2.75931e-07, \\\n\t \t-3.87367e-08, -3.79891e-08, -1.1437e-08, -7.70073e-08, \\\n\t\t 3.394e-09\""}]}, {"id": "pin", "args": ["A"], "children": [{"id": "pg_timing_data", "args": ["fallSlewTab"], "children": [{"id": "related_pin", "value": "\"y\""}, {"id": "coefficients", "value": "\" 0.110163, 0.141989, 0.11636, 0.0972482, \\\n\t\t\t 0.0655029, 0.0673979, 0.161816, 0.147963, \\\n\t\t\t 0.115873, 0.093776, 0.096074, 0.01363\""}]}, {"id": "pg_state_data", "args": ["pg_state2"], "children": [{"id": "state", "value": "\"R1R\""}, {"id": "coefficients", "value": "\" -1.388e-06, -1.20251e-06, -3.34395e-05, 2.75931e-07, \\\n\t\t\t -3.87367e-08, -3.79891e-08, -1.1437e-08, -7.70073e-08, \\\n\t\t\t 3.394e-09\""}]}, {"id": "pg_timing_data", "args": ["riseSlewTab"], "children": [{"id": "related_pin1x", "value": "\"y\""}, {"id": "coefficients", "value": "\" 0.162563, 0.144023, 0.137538, 0.0821456, \\\n\t\t\t 0.103689, 0.102928, 0.116279, 0.162594, \\\n\t\t\t 0.155714, 0.0783956, 0.162574, \\\n\t\t\t 0.042222\""}]}]}]}]} \ No newline at end of file diff --git a/yosys b/yosys index 73cb497..9c447ad 160000 --- a/yosys +++ b/yosys @@ -1 +1 @@ -Subproject commit 73cb4977b2e493b840b23419919a63be7c83e6df +Subproject commit 9c447ad9d4b1ea589369364eea38b4d70da2c599 From 168ac3a507240f5c20add724ad841530ce434634 Mon Sep 17 00:00:00 2001 From: Mohamed Gaber Date: Sat, 30 Aug 2025 06:21:26 +0300 Subject: [PATCH 4/6] fix hacks, skip pypy for now --- .github/workflows/ci.yml | 3 +++ libparse/wrapper.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4310e31..ef5a9cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,6 +74,9 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.21.1 env: + # * APIs not supported by PyPy + CIBW_SKIP: > + pp* CIBW_ARCHS: ${{ matrix.os.archs }} CIBW_BUILD_VERBOSITY: "1" CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 diff --git a/libparse/wrapper.cpp b/libparse/wrapper.cpp index bf0082d..da6a028 100644 --- a/libparse/wrapper.cpp +++ b/libparse/wrapper.cpp @@ -15,13 +15,14 @@ // 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. -#define private public -#include "libparse.h" -#undef private +#include +#include #include #include +#include "libparse.h" + #include "stdio_filebuf.h" namespace py = pybind11; From 214976f6a6f22f2ac21a093c12b940f7755a7e23 Mon Sep 17 00:00:00 2001 From: Mohamed Gaber Date: Sat, 30 Aug 2025 06:32:00 +0300 Subject: [PATCH 5/6] disable windows, yosys doesn't support MSVC by the looks of it --- .github/workflows/ci.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef5a9cd..ded50e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,8 +29,7 @@ jobs: strategy: fail-fast: false matrix: - os: - [ + os: [ { name: "Ubuntu 22.04", family: "linux", @@ -49,11 +48,11 @@ jobs: runner: "macos-14", archs: "x86_64,arm64", }, - { - name: "Windows Server 2022", - runner: "windows-2022", - archs: "AMD64,ARM64", - }, + # { + # name: "Windows Server 2022", + # runner: "windows-2022", + # archs: "AMD64,ARM64", + # }, ] name: Build Wheels | ${{ matrix.os.name }} | ${{ matrix.os.archs }} runs-on: ${{ matrix.os.runner }} From fda16babce652d95159f1f6040f4d3400cb2e621 Mon Sep 17 00:00:00 2001 From: Mohamed Gaber Date: Sat, 30 Aug 2025 06:44:29 +0300 Subject: [PATCH 6/6] misc: fix manifest, restrict wheel upload to `main` --- .github/workflows/ci.yml | 1 + MANIFEST.in | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ded50e7..16afe7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,6 +86,7 @@ jobs: path: ./wheelhouse/*.whl upload_wheels: name: Upload Wheels + if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest # Specifying a GitHub environment is optional, but strongly encouraged environment: pypi diff --git a/MANIFEST.in b/MANIFEST.in index fe6612e..6fa3d06 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include Readme.md +include libparse/stdio_filebuf.h include yosys/kernel/*.h include yosys/kernel/constids.inc include yosys/passes/techmap/libparse.*