From cd7f2e511d4181b5803533a238aa06a05209cba8 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Thu, 6 Aug 2020 20:52:49 +0200 Subject: [PATCH] Initial commit --- .gitignore | 5 + fpga/__init__.py | 17 ++ fpga/ice40.py | 31 +++ poetry.lock | 495 +++++++++++++++++++++++++++++++++++++++++++++ poetry.toml | 2 + pyproject.toml | 19 ++ tests/__init__.py | 0 tests/test_fpga.py | 5 + 8 files changed, 574 insertions(+) create mode 100644 .gitignore create mode 100644 fpga/__init__.py create mode 100644 fpga/ice40.py create mode 100644 poetry.lock create mode 100644 poetry.toml create mode 100644 pyproject.toml create mode 100644 tests/__init__.py create mode 100644 tests/test_fpga.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..143bb20 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.venv/ +*.egg-infp +*.pyc +__pycache__ +build/ diff --git a/fpga/__init__.py b/fpga/__init__.py new file mode 100644 index 0000000..40a8fed --- /dev/null +++ b/fpga/__init__.py @@ -0,0 +1,17 @@ +__version__ = '0.1.0' + +def load_env(): + import os, shutil + + + if shutil.which("yowasp-yosys"): + os.environ["NEXTPNR_ICE40"] = "yowasp-nextpnr-ice40" + + if shutil.which("yowasp-nextpnr-ice40"): + os.environ["NEXTPNR_ICE40"] = "yowasp-nextpnr-ice40" + + if shutil.which("yowasp-nextpnr-ecp5"): + os.environ["NEXTPNR_ECP5"] = "yowasp-nextpnr-ecp5" + +load_env() +del load_env diff --git a/fpga/ice40.py b/fpga/ice40.py new file mode 100644 index 0000000..2d17d7c --- /dev/null +++ b/fpga/ice40.py @@ -0,0 +1,31 @@ +from nmigen import * +from nmigen.cli import main +from nmigen_boards.icebreaker import ICEBreakerPlatform + +class Blinker(Elaboratable): + def __init__(self, maxperiod: int): + self.maxperiod = maxperiod + + def elaborate(self, platform): + led = platform.request("led_r") + + m = Module() + + counter = Signal(range(self.maxperiod + 1)) + + with m.If(counter == 0): + m.d.sync += [ + led.eq(~led), + counter.eq(self.maxperiod) + ] + with m.Else(): + m.d.sync += counter.eq(counter - 1) + + return m + + +if __name__ == "__main__": + plat = ICEBreakerPlatform() + #main(plat, ports=[plat.led]) + plat.build(Blinker(10000000), do_program=True) + diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..4c64e8d --- /dev/null +++ b/poetry.lock @@ -0,0 +1,495 @@ +[[package]] +category = "dev" +description = "Atomic file writes." +marker = "sys_platform == \"win32\"" +name = "atomicwrites" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "1.4.0" + +[[package]] +category = "dev" +description = "Classes Without Boilerplate" +name = "attrs" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "19.3.0" + +[package.extras] +azure-pipelines = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "pytest-azurepipelines"] +dev = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "sphinx", "pre-commit"] +docs = ["sphinx", "zope.interface"] +tests = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] + +[[package]] +category = "dev" +description = "Cross-platform colored terminal text." +marker = "sys_platform == \"win32\"" +name = "colorama" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "0.4.3" + +[[package]] +category = "main" +description = "" +name = "dg" +optional = false +python-versions = "*" +version = "1.1.0+git" + +[package.source] +reference = "c5edc568997a3aefd910d4ca32b05623223f83c8" +type = "git" +url = "https://github.com/pbsds/dg" + +[[package]] +category = "dev" +description = "Read metadata from Python packages" +marker = "python_version < \"3.8\"" +name = "importlib-metadata" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +version = "1.7.0" + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["sphinx", "rst.linker"] +testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] + +[[package]] +category = "main" +description = "Read resources from Python packages" +marker = "python_version < \"3.9\"" +name = "importlib-resources" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +version = "3.0.0" + +[package.dependencies] +[package.dependencies.zipp] +python = "<3.8" +version = ">=0.4" + +[package.extras] +docs = ["sphinx", "rst.linker", "jaraco.packaging"] + +[[package]] +category = "main" +description = "A very fast and expressive template engine." +name = "jinja2" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "2.11.2" + +[package.dependencies] +MarkupSafe = ">=0.23" + +[package.extras] +i18n = ["Babel (>=0.8)"] + +[[package]] +category = "main" +description = "Safely add untrusted strings to HTML/XML markup." +name = "markupsafe" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" +version = "1.1.1" + +[[package]] +category = "dev" +description = "More routines for operating on iterables, beyond itertools" +name = "more-itertools" +optional = false +python-versions = ">=3.5" +version = "8.4.0" + +[[package]] +category = "main" +description = "Python toolbox for building complex digital hardware" +name = "nmigen" +optional = false +python-versions = "~=3.6" +version = "0.2" + +[package.dependencies] +Jinja2 = "*" +pyvcd = ">=0.1.4,<0.2.0" +setuptools = "*" + +[[package]] +category = "main" +description = "Board and connector definitions for nMigen" +name = "nmigen-boards" +optional = false +python-versions = "*" +version = "0.0" + +[package.dependencies] +nmigen = "*" +setuptools = "*" + +[[package]] +category = "main" +description = "" +name = "nmigen-dg" +optional = false +python-versions = "^3.7" +version = "0.1.0" + +[package.dependencies] +dg = "rev poetry" +nmigen = "^0.2" + +[package.source] +reference = "a9de8193144f3509ec762c6ce05764b6bd00a81c" +type = "git" +url = "https://github.com/pbsds/nmigen_dg" + +[[package]] +category = "dev" +description = "Core utilities for Python packages" +name = "packaging" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "20.4" + +[package.dependencies] +pyparsing = ">=2.0.2" +six = "*" + +[[package]] +category = "dev" +description = "plugin and hook calling mechanisms for python" +name = "pluggy" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "0.13.1" + +[package.dependencies] +[package.dependencies.importlib-metadata] +python = "<3.8" +version = ">=0.12" + +[package.extras] +dev = ["pre-commit", "tox"] + +[[package]] +category = "dev" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +name = "py" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "1.9.0" + +[[package]] +category = "dev" +description = "Python parsing module" +name = "pyparsing" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +version = "2.4.7" + +[[package]] +category = "dev" +description = "pytest: simple powerful testing with Python" +name = "pytest" +optional = false +python-versions = ">=3.5" +version = "5.4.3" + +[package.dependencies] +atomicwrites = ">=1.0" +attrs = ">=17.4.0" +colorama = "*" +more-itertools = ">=4.0.0" +packaging = "*" +pluggy = ">=0.12,<1.0" +py = ">=1.5.0" +wcwidth = "*" + +[package.dependencies.importlib-metadata] +python = "<3.8" +version = ">=0.12" + +[package.extras] +checkqa-mypy = ["mypy (v0.761)"] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] + +[[package]] +category = "main" +description = "Python VCD file support." +name = "pyvcd" +optional = false +python-versions = "*" +version = "0.1.7" + +[package.dependencies] +six = "*" + +[[package]] +category = "main" +description = "Python 2 and 3 compatibility utilities" +name = "six" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +version = "1.15.0" + +[[package]] +category = "main" +description = "A WebAssembly runtime powered by Wasmtime" +name = "wasmtime" +optional = false +python-versions = ">=3.6" +version = "0.19.0" + +[package.extras] +testing = ["coverage", "pytest", "pycparser", "pytest-flake8", "pytest-mypy"] + +[[package]] +category = "dev" +description = "Measures the displayed width of unicode strings in a terminal" +name = "wcwidth" +optional = false +python-versions = "*" +version = "0.2.5" + +[[package]] +category = "main" +description = "nextpnr-ice40 FPGA place and route tool" +name = "yowasp-nextpnr-ice40" +optional = false +python-versions = "~=3.5" +version = "0.0.post2658.dev17" + +[package.dependencies] +wasmtime = ">=0.19.0,<0.20.0" + +[package.dependencies.importlib-resources] +python = "<3.9" +version = "*" + +[[package]] +category = "main" +description = "nextpnr-ice40 FPGA place and route tool" +name = "yowasp-nextpnr-ice40-1k" +optional = false +python-versions = "~=3.5" +version = "0.0.post2658.dev17" + +[package.dependencies] +yowasp-nextpnr-ice40 = "0.0.post2658.dev17" + +[[package]] +category = "main" +description = "nextpnr-ice40 FPGA place and route tool" +name = "yowasp-nextpnr-ice40-384" +optional = false +python-versions = "~=3.5" +version = "0.0.post2658.dev17" + +[package.dependencies] +yowasp-nextpnr-ice40 = "0.0.post2658.dev17" + +[[package]] +category = "main" +description = "nextpnr-ice40 FPGA place and route tool" +name = "yowasp-nextpnr-ice40-5k" +optional = false +python-versions = "~=3.5" +version = "0.0.post2658.dev17" + +[package.dependencies] +yowasp-nextpnr-ice40 = "0.0.post2658.dev17" + +[[package]] +category = "main" +description = "nextpnr-ice40 FPGA place and route tool" +name = "yowasp-nextpnr-ice40-8k" +optional = false +python-versions = "~=3.5" +version = "0.0.post2658.dev17" + +[package.dependencies] +yowasp-nextpnr-ice40 = "0.0.post2658.dev17" + +[[package]] +category = "main" +description = "nextpnr-ice40 FPGA place and route tool" +name = "yowasp-nextpnr-ice40-all" +optional = false +python-versions = "~=3.5" +version = "0.0.post2658.dev17" + +[package.dependencies] +yowasp-nextpnr-ice40-1k = "0.0.post2658.dev17" +yowasp-nextpnr-ice40-384 = "0.0.post2658.dev17" +yowasp-nextpnr-ice40-5k = "0.0.post2658.dev17" +yowasp-nextpnr-ice40-8k = "0.0.post2658.dev17" +yowasp-nextpnr-ice40-u4k = "0.0.post2658.dev17" + +[[package]] +category = "main" +description = "nextpnr-ice40 FPGA place and route tool" +name = "yowasp-nextpnr-ice40-u4k" +optional = false +python-versions = "~=3.5" +version = "0.0.post2658.dev17" + +[package.dependencies] +yowasp-nextpnr-ice40 = "0.0.post2658.dev17" + +[[package]] +category = "main" +description = "Backport of pathlib-compatible object wrapper for zip files" +marker = "python_version < \"3.8\"" +name = "zipp" +optional = false +python-versions = ">=3.6" +version = "3.1.0" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] +testing = ["jaraco.itertools", "func-timeout"] + +[metadata] +content-hash = "8950bf75fe482f7ec6ea58cc84550c143b29885d62624f6224a4bcbd1fce3cf2" +python-versions = "^3.7" + +[metadata.files] +atomicwrites = [ + {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, + {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, +] +attrs = [ + {file = "attrs-19.3.0-py2.py3-none-any.whl", hash = "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c"}, + {file = "attrs-19.3.0.tar.gz", hash = "sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72"}, +] +colorama = [ + {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"}, + {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, +] +dg = [] +importlib-metadata = [ + {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, + {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, +] +importlib-resources = [ + {file = "importlib_resources-3.0.0-py2.py3-none-any.whl", hash = "sha256:d028f66b66c0d5732dae86ba4276999855e162a749c92620a38c1d779ed138a7"}, + {file = "importlib_resources-3.0.0.tar.gz", hash = "sha256:19f745a6eca188b490b1428c8d1d4a0d2368759f32370ea8fb89cad2ab1106c3"}, +] +jinja2 = [ + {file = "Jinja2-2.11.2-py2.py3-none-any.whl", hash = "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035"}, + {file = "Jinja2-2.11.2.tar.gz", hash = "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0"}, +] +markupsafe = [ + {file = "MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-win32.whl", hash = "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-win_amd64.whl", hash = "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e"}, + {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f"}, + {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-macosx_10_6_intel.whl", hash = "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_i686.whl", hash = "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-win32.whl", hash = "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-win_amd64.whl", hash = "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-win32.whl", hash = "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-win32.whl", hash = "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, + {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, +] +more-itertools = [ + {file = "more-itertools-8.4.0.tar.gz", hash = "sha256:68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5"}, + {file = "more_itertools-8.4.0-py3-none-any.whl", hash = "sha256:b78134b2063dd214000685165d81c154522c3ee0a1c0d4d113c80361c234c5a2"}, +] +nmigen = [ + {file = "nmigen-0.2.tar.gz", hash = "sha256:c8f6da9570fb6ee4e08b33ebe01015e4c99dbae06793a722d73ca161f04dfe9c"}, +] +nmigen-boards = [ + {file = "nmigen-boards-0.0.tar.gz", hash = "sha256:ee17c0cac669fa391c9b7bcb42897275477b21f495b3b6beee997915e034f8ff"}, +] +nmigen-dg = [] +packaging = [ + {file = "packaging-20.4-py2.py3-none-any.whl", hash = "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181"}, + {file = "packaging-20.4.tar.gz", hash = "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8"}, +] +pluggy = [ + {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, + {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, +] +py = [ + {file = "py-1.9.0-py2.py3-none-any.whl", hash = "sha256:366389d1db726cd2fcfc79732e75410e5fe4d31db13692115529d34069a043c2"}, + {file = "py-1.9.0.tar.gz", hash = "sha256:9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342"}, +] +pyparsing = [ + {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, + {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, +] +pytest = [ + {file = "pytest-5.4.3-py3-none-any.whl", hash = "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1"}, + {file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"}, +] +pyvcd = [ + {file = "pyvcd-0.1.7-py2.py3-none-any.whl", hash = "sha256:69a1f371c5fc7304a5415284517283de5a732da1c7b10988a5a5fe02500e55e6"}, + {file = "pyvcd-0.1.7.tar.gz", hash = "sha256:be8071c25abbc7fe9e743680b82b6d8979067eca09268d6040baa988016db7c7"}, +] +six = [ + {file = "six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"}, + {file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"}, +] +wasmtime = [ + {file = "wasmtime-0.19.0-py3-none-any.whl", hash = "sha256:def3773817a8923fc71ac1d677a939685b576bc47ac0a1905541f8176eea9049"}, + {file = "wasmtime-0.19.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:843ce6e737ef97bce411a34285d10fcbf14d5834b1020a798b7b8c5de5ce60e8"}, + {file = "wasmtime-0.19.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:b2b761379d0ce612754437b5dea351ce7371155803dae328f5265335611af3f9"}, + {file = "wasmtime-0.19.0-py3-none-win_amd64.whl", hash = "sha256:e986d1a5e9b30fc02ece9cfd55d44d01be0f4e2debd6b32cf52cee37d9b8c6a2"}, +] +wcwidth = [ + {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, + {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, +] +yowasp-nextpnr-ice40 = [ + {file = "yowasp_nextpnr_ice40-0.0.post2658.dev17-py3-none-any.whl", hash = "sha256:cc96293ea8fc160c7c97f40ca8f47837e61f47f5fb999f2cd174d470c95bc845"}, +] +yowasp-nextpnr-ice40-1k = [ + {file = "yowasp_nextpnr_ice40_1k-0.0.post2658.dev17-py3-none-any.whl", hash = "sha256:a53eff51f3907c7fc4f926bd7f1c8ede7241118eb0af983d4316183377fd8110"}, +] +yowasp-nextpnr-ice40-384 = [ + {file = "yowasp_nextpnr_ice40_384-0.0.post2658.dev17-py3-none-any.whl", hash = "sha256:81420f10a3d1f63be9936373ba38f2a581a7df1f4e66ec769b1231c6a0b4b430"}, +] +yowasp-nextpnr-ice40-5k = [ + {file = "yowasp_nextpnr_ice40_5k-0.0.post2658.dev17-py3-none-any.whl", hash = "sha256:7809f6b0532d0ff18fbd9968a42d2e0b7e47c96918c3c39e723432a71abbeda9"}, +] +yowasp-nextpnr-ice40-8k = [ + {file = "yowasp_nextpnr_ice40_8k-0.0.post2658.dev17-py3-none-any.whl", hash = "sha256:8caa9d001a956181ee8147623129b55441dd4d62ea7e9cc99ec8cc22e1ba5f6b"}, +] +yowasp-nextpnr-ice40-all = [ + {file = "yowasp_nextpnr_ice40_all-0.0.post2658.dev17-py3-none-any.whl", hash = "sha256:d899338055013bb6e7c86fd8f2e6e73125fca0795f84dd16dfb8cb2f9ff0aae1"}, +] +yowasp-nextpnr-ice40-u4k = [ + {file = "yowasp_nextpnr_ice40_u4k-0.0.post2658.dev17-py3-none-any.whl", hash = "sha256:ec0f897707addb1c33fdca70f94c4a55942dfccad78be54f54b16905bf7c08bc"}, +] +zipp = [ + {file = "zipp-3.1.0-py3-none-any.whl", hash = "sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b"}, + {file = "zipp-3.1.0.tar.gz", hash = "sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96"}, +] diff --git a/poetry.toml b/poetry.toml new file mode 100644 index 0000000..ab1033b --- /dev/null +++ b/poetry.toml @@ -0,0 +1,2 @@ +[virtualenvs] +in-project = true diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..59bb66d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,19 @@ +[tool.poetry] +name = "fpga" +version = "0.1.0" +description = "" +authors = ["Peder Bergebakken Sundt "] + +[tool.poetry.dependencies] +python = "^3.7" +yowasp-nextpnr-ice40-all = "^0.0.post2658.dev17" +nmigen-dg = {git = "https://github.com/pbsds/nmigen_dg"} +nmigen = "^0.2" +nmigen_boards = "^0.0" + +[tool.poetry.dev-dependencies] +pytest = "^5.2" + +[build-system] +requires = ["poetry>=0.12"] +build-backend = "poetry.masonry.api" diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_fpga.py b/tests/test_fpga.py new file mode 100644 index 0000000..ae4fff2 --- /dev/null +++ b/tests/test_fpga.py @@ -0,0 +1,5 @@ +from fpga import __version__ + + +def test_version(): + assert __version__ == '0.1.0'