From 08a22cf2518b52274b9b9a7423cc8ee28d8477f6 Mon Sep 17 00:00:00 2001 From: Stefan Holst Date: Fri, 4 Dec 2020 17:58:33 +0900 Subject: [PATCH] move sources to src, add package info and release 0.0.1 --- LICENSE => LICENSE.txt | 0 MANIFEST.in | 7 +++++ README.md | 39 +++++++++++++++++++----- setup.py | 41 ++++++++++++++++++++++++++ {kyupy => src/kyupy}/__init__.py | 0 {kyupy => src/kyupy}/bench.py | 0 {kyupy => src/kyupy}/bittools.py | 0 {kyupy => src/kyupy}/circuit.py | 0 {kyupy => src/kyupy}/logic_sim.py | 0 {kyupy => src/kyupy}/packed_vectors.py | 0 {kyupy => src/kyupy}/saed.py | 0 {kyupy => src/kyupy}/sdf.py | 0 {kyupy => src/kyupy}/stil.py | 0 {kyupy => src/kyupy}/verilog.py | 0 {kyupy => src/kyupy}/wave_sim.py | 0 {kyupy => src/kyupy}/wave_sim_cuda.py | 0 16 files changed, 79 insertions(+), 8 deletions(-) rename LICENSE => LICENSE.txt (100%) create mode 100644 MANIFEST.in create mode 100644 setup.py rename {kyupy => src/kyupy}/__init__.py (100%) rename {kyupy => src/kyupy}/bench.py (100%) rename {kyupy => src/kyupy}/bittools.py (100%) rename {kyupy => src/kyupy}/circuit.py (100%) rename {kyupy => src/kyupy}/logic_sim.py (100%) rename {kyupy => src/kyupy}/packed_vectors.py (100%) rename {kyupy => src/kyupy}/saed.py (100%) rename {kyupy => src/kyupy}/sdf.py (100%) rename {kyupy => src/kyupy}/stil.py (100%) rename {kyupy => src/kyupy}/verilog.py (100%) rename {kyupy => src/kyupy}/wave_sim.py (100%) rename {kyupy => src/kyupy}/wave_sim_cuda.py (100%) diff --git a/LICENSE b/LICENSE.txt similarity index 100% rename from LICENSE rename to LICENSE.txt diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..11cee4f --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,7 @@ +include *.ipynb +include *.txt +recursive-include tests *.bench +recursive-include tests *.gz +recursive-include tests *.py +recursive-include tests *.sdf +recursive-include tests *.v diff --git a/README.md b/README.md index ccf43e7..2f11bf1 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,12 @@ non-hierarchical VLSI designs. Its purpose is to provide a rapid prototyping platform to aid and accelerate research in the fields of VLSI test, diagnosis and reliability. KyuPy is freely available under the MIT license. + Main Features ------------- -* Partial [lark](https://github.com/lark-parser/lark)-parsers for common files used with synthesized designs: bench, gate-level verilog, standard delay format (SDF), standard test interface language (STIL) +* Partial [lark](https://github.com/lark-parser/lark) parsers for common files used with synthesized designs: + bench, gate-level verilog, standard delay format (SDF), standard test interface language (STIL) * Bit-parallel gate-level 2-, 4-, and 8-valued logic simulation * GPU-accelerated high-throughput gate-level timing simulation * High-performance through the use of [numpy](https://numpy.org) and [numba](https://numba.pydata.org) @@ -18,16 +20,37 @@ Main Features Getting Started --------------- -KyuPy requires python 3.6+ and the following packages: -* [lark-parser](https://pypi.org/project/lark-parser) -* [numpy](https://pypi.org/project/numpy) -* [numba](https://pypi.org/project/numba) (required only for GPU/CUDA support) +KyuPy requires Python 3.6 or newer. +Install the latest release by running: +```commandline +pip3 install --user kyupy +``` +For best performance, ensure you have [numba](https://pypi.org/project/numba) installed: +```commandline +pip3 install --user numba +``` +GPU/CUDA support may [require some additional setup](https://numba.pydata.org/numba-doc/latest/cuda/index.html). +If CUDA or numba is not available, KyuPy will automatically fall back to slow, pure python execution. -GPU/CUDA support may [require some additional setup](https://numba.pydata.org/numba-doc/latest/cuda/index.html). If CUDA or numba is not available, the package will automatically fall back to pure python execution. +The Jupyter Notebook [UsageExamples.ipynb](https://github.com/s-holst/kyupy/blob/main/UsageExamples.ipynb) on GitHub +contains some useful examples to get familiar with the API. -This repository contains tests that can be run with: + +Development +----------- + +To contribute to KyuPy or simply explore the source code, clone the KyuPy [repository](https://github.com/s-holst/kyupy) on GitHub. +Within your local checkout, run: +```commandline +pip3 install --user -e . +``` +to make the kyupy package available in your python environment. +The source code comes with tests that can be run with: ``` pytest ``` -Usage examples to get familiar with the API can be found in the Jupyter Notebook [UsageExamples.ipynb](UsageExamples.ipynb). +KyuPy depends on the following packages: +* [lark-parser](https://pypi.org/project/lark-parser) +* [numpy](https://pypi.org/project/numpy) +* [numba](https://pypi.org/project/numba) (optional, required only for GPU/CUDA support) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..d56de0f --- /dev/null +++ b/setup.py @@ -0,0 +1,41 @@ +from setuptools import setup, find_packages + +with open('README.md', 'r') as f: + long_description = f.read() + +setup( + name='kyupy', + version='0.0.1', + description='High-performance processing and analysis of non-hierarchical VLSI designs', + long_description=long_description, + long_description_content_type='text/markdown', + packages=find_packages(where='src'), + package_dir={'': 'src'}, + url='https://github.com/s-holst/kyupy', + author='Stefan Holst', + author_email='mail@s-holst.de', + python_requires='>=3.6', + install_requires=[ + 'numpy>=1.15.0', + 'lark-parser>=0.8.0' + ], + extras_requires={ + 'dev': [ + 'pytest>=6.1', + ], + }, + classifiers=[ + 'Development Status :: 3 - Alpha', + 'Environment :: GPU :: NVIDIA CUDA', + 'Intended Audience :: Science/Research', + 'Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3 :: Only', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + ], +) diff --git a/kyupy/__init__.py b/src/kyupy/__init__.py similarity index 100% rename from kyupy/__init__.py rename to src/kyupy/__init__.py diff --git a/kyupy/bench.py b/src/kyupy/bench.py similarity index 100% rename from kyupy/bench.py rename to src/kyupy/bench.py diff --git a/kyupy/bittools.py b/src/kyupy/bittools.py similarity index 100% rename from kyupy/bittools.py rename to src/kyupy/bittools.py diff --git a/kyupy/circuit.py b/src/kyupy/circuit.py similarity index 100% rename from kyupy/circuit.py rename to src/kyupy/circuit.py diff --git a/kyupy/logic_sim.py b/src/kyupy/logic_sim.py similarity index 100% rename from kyupy/logic_sim.py rename to src/kyupy/logic_sim.py diff --git a/kyupy/packed_vectors.py b/src/kyupy/packed_vectors.py similarity index 100% rename from kyupy/packed_vectors.py rename to src/kyupy/packed_vectors.py diff --git a/kyupy/saed.py b/src/kyupy/saed.py similarity index 100% rename from kyupy/saed.py rename to src/kyupy/saed.py diff --git a/kyupy/sdf.py b/src/kyupy/sdf.py similarity index 100% rename from kyupy/sdf.py rename to src/kyupy/sdf.py diff --git a/kyupy/stil.py b/src/kyupy/stil.py similarity index 100% rename from kyupy/stil.py rename to src/kyupy/stil.py diff --git a/kyupy/verilog.py b/src/kyupy/verilog.py similarity index 100% rename from kyupy/verilog.py rename to src/kyupy/verilog.py diff --git a/kyupy/wave_sim.py b/src/kyupy/wave_sim.py similarity index 100% rename from kyupy/wave_sim.py rename to src/kyupy/wave_sim.py diff --git a/kyupy/wave_sim_cuda.py b/src/kyupy/wave_sim_cuda.py similarity index 100% rename from kyupy/wave_sim_cuda.py rename to src/kyupy/wave_sim_cuda.py