Commit graph

49 commits

Author SHA1 Message Date
Catherine 9102738274 Update authorship notice. 2023-01-31 21:51:43 +00:00
Catherine 47551e8c71 Add PEP 518 pyproject.toml.
See also commits:
 * 7fca037f (adding it)
 * 416b2531 (reverting it)
 * a2ef4cb6 (adding it)
 * 810c19dd (reverting it)

Third time's the charm?
2023-01-31 19:48:54 +00:00
Catherine f133646e9b Remove all remaining code references to nmigen and the namespace.
Closes #741.
2023-01-31 13:49:13 +00:00
Catherine 64771a065a Drop support for Python 3.6. 2022-04-04 09:39:28 +00:00
Catherine 9a5a6142d9 setup: relax pyvcd version constraint to >=0.2.2,<0.4.
Fixes #690.
2022-04-04 09:21:11 +00:00
Irides 85d56a74a5 build.plat,setup: fix Jinja2 dependency.
Jinja2 version 2.11 has a broken dependency constraint that allows its
dependency on markupsafe to pull in a version that it is not actually
compatible with the interface of. Fix this by upgrading the dependency
to `~=3.0`. This requires a small patch to the code to replace the
deprecated `@jinja2.contextfunction` decorator with the replacement
`@jinja2.pass_context`since `@jinja2.contextfunction` is removed in
Jinja2 version 3.1.0.
2022-03-30 21:38:58 +00:00
Tobias Müller c6dc08cbdd
setup: loosen dependency on Jinja2 version. 2022-01-17 19:28:46 +00:00
Catherine 39a83f4d99 setup: fix documentation URL for releases. 2021-12-16 18:02:11 +00:00
Catherine e2b3e8caf9 CI: publish documentation at https://amaranth-lang.org/docs/amaranth/ 2021-12-16 17:51:53 +00:00
Catherine 22c7453783 Revert "setup: add workaround for pypa/pip#7953."
This reverts commit b1f5664b05.
2021-12-16 15:02:16 +00:00
Irides b1f5664b05 setup: add workaround for pypa/pip#7953. 2021-12-14 16:03:31 +00:00
whitequark b452e0e871 hdl.ast: support division and modulo with negative divisor.
Fixes #621.

This commit bumps the Yosys version requirement to >=0.10.
2021-12-11 10:25:48 +00:00
whitequark 909a3b8be7 Rename nMigen to Amaranth HDL. 2021-12-10 10:34:13 +00:00
Ben Newhouse 765c15c709
setup: link to latest docs if VCS information is not available. 2020-10-27 01:16:25 +00:00
Xiretza 12327aedf8 setup.py: Exclude "tests" package
67b957d moved the tests from nmigen/test/ to tests/, and removed the
exclude= parameter from find_packages() in setup.py. However, even if
the new location is not inside the module tree, it is still found by
find_packages(), resulting in a stray "tests" module on the system.
2020-10-19 22:59:33 +00:00
whitequark d12c7827a0 setup: synchronize builtin-yosys dependency. 2020-08-27 13:46:55 +00:00
whitequark 67b957d4f4 tests: move out of the main package.
Compared to tests in the repository root, tests in the package have
many downsides:
  * Unless explicitly excluded in find_packages(), tests and their
    support code effectively become a part of public API.
    This, unfortunately, happened with FHDLTestCase, which was never
    intended for downstream use.
  * Even if explicitly excluded from the setuptools package, using
    an editable install, or setting PYTHONPATH still allows accessing
    the tests.
  * Having a sub-package that is present in the source tree but not
    exported (or, worse, exported only sometimes) is confusing.
  * The name `nmigen.test` cannot be used for anything else, such as
    testing utilities that *are* intended for downstream use.
2020-08-27 00:33:31 +00:00
William D. Jones ef7a3bcfb1
build.run: implement SSH remote builds using Paramiko. 2020-08-26 22:49:49 +00:00
whitequark 0a90aa1b17 sim.pysim: use VCD aliases to reduce space and time overhead.
On Minerva SoC, this reduces VCD file size by about 35%, and reduces
runtime overhead of writing VCDs by 10% or less.
2020-07-11 12:26:34 +00:00
whitequark 14845af235 setup: add wheel as setup dependency.
See commit 416b2531ae.
See commit 7fca037f9c.
2020-07-01 21:05:57 +00:00
whitequark ba1b4c20c8 setup: gracefully recover from missing setuptools_scm. 2020-07-01 21:04:04 +00:00
whitequark d5d3bc4b1a setup: link to the right documentation version from pip metadata. 2020-07-01 20:49:41 +00:00
whitequark 416b2531ae Revert "Add PEP 518 pyproject.toml."
This reverts commit 7fca037f9c.

This broke editable installs and has to be reverted due to a number
of pip issues:
  * pypa/pip#6375
  * pypa/pip#6434
  * pypa/pip#6438

We can put this back once PEP 517/518 support editable installs.
Until then the legacy behavior will suffice, and we should just teach
people to install the dependencies in virtualenvs or something...
2020-07-01 08:24:47 +00:00
whitequark 7fca037f9c Add PEP 518 pyproject.toml.
This is necessary to be able to install nMigen into a virtualenv that
does not have `wheel` installed in certain cases.

See #349.
2020-07-01 05:58:34 +00:00
whitequark 39c3bacb79 setup: link to proper location for docs. 2020-06-30 23:13:44 +00:00
whitequark 8dacbbb2b2 Don't use pkg_resources.
This package is deprecated and introduces a massive amount of startup
latency. On my machine with 264 installed Python packages, it reduces
the time required to `import nmigen` from ~100ms to ~200ms.
2020-06-30 22:11:47 +00:00
whitequark eddc397509 _yosys: add a way to retrieve Yosys data directory.
This is important for CXXRTL, since that's where its include files
are located.
2020-06-14 00:31:34 +00:00
whitequark 9c80c32c30 setup: exclude tests.
The inclusion of tests in the package was completely unintentional
and a result of my lack of knowledge of setuptools. If you are using
nmigen.test.utils, please copy the parts you need to your own code
because the nmigen.test code can and will change without notice.
2020-05-31 14:14:27 +00:00
whitequark b9799b4c4a back.verilog: fall back to nmigen_yosys package.
The nmigen-yosys PyPI package provides a custom, minimal build of
Yosys that uses (at the moment) wasmtime-py to deliver a single
WASM binary that can run on many platforms, and eliminates the need
to build Yosys from source.

Not only does this lower barrier to entry for new nMigen developers,
but also decouples nMigen from Yosys' yearly release cycle, which
lets us use new features and drop workarounds for Yosys bugs earlier.

The source for the nmigen-yosys package is provided at:
  https://github.com/nmigen/nmigen-yosys
The package is built from upstream source and released automatically
with no manual steps.

Fixes #371.
2020-05-22 16:51:00 +00:00
whitequark c79caead33 setup: bump pyvcd to ~=0.2.
We don't use any of the deprecated functionality, and the added
requirement of Python 3.6+ matches ours.

Having a requirement for pyvcd ~=0.1.4 was actually the cause of
the error I tried to fix in commit 6e1145e2. It had nothing to do
with Jinja2 (though it is definitely still good to have the tighter
requirement on Jinja2); the cause of the error was that pip would
install Jinja2, schedule installing markupsafe, install pyvcd 0.2.0
and then choke on the pyvcd 0.1.4 requirement, which would prevent
it from installing markupsafe &c. Why it does that is beyond me.
2020-04-02 11:23:49 +00:00
whitequark 6e1145e2e7 setup: tighten version constraint on Jinja2.
I remember thinking that not constraining it properly might bite us
someday, but assumed that Jinja2 will always stay version 2. Now it
looks like Jinja2 3.0.0a1 got released, pip picks it by default, and
it's currently broken (something about markupsafe missing).

Do what needed to be done in the first place.
2020-04-02 01:35:39 +00:00
whitequark 38aa9fb671 setup: update project URLs. 2020-02-09 17:03:06 +00:00
whitequark 7df70059d1 back.pysim: redesign the simulator.
The redesign introduces no fundamental incompatibilities, but it does
involve minor breaking changes:
  * The simulator commands were moved from hdl.ast to back.pysim
    (instead of only being reexported from back.pysim).
  * back.pysim.DeadlineError was removed.

Summary of changes:
  * The new simulator compiles HDL to Python code and is >6x faster.
    (The old one compiled HDL to lots of Python lambdas.)
  * The new simulator is a straightforward, rigorous implementation
    of the Synchronous Reactive Programming paradigm, instead of
    a pile of ad-hoc code with no particular design driving it.
  * The new simulator never raises DeadlineError, and there is no
    limit on the amount of delta cycles.
  * The new simulator robustly handles multiclock designs.
  * The new simulator can be reset, such that the compiled design
    can be reused, which can save significant runtime with large
    designs.
  * Generators can no longer be added as processes, since that would
    break reset(); only generator functions may be. If necessary,
    they may be added by wrapping them into a generator function;
    a deprecated fallback does just that. This workaround will raise
    an exception if the simulator is reset and restarted.
  * The new simulator does not depend on Python extensions.
    (The old one required bitarray, which did not provide wheels.)

Fixes #28.
Fixes #34.
Fixes #160.
Fixes #161.
Fixes #215.
Fixes #242.
Fixes #262.
2019-11-28 21:05:34 +00:00
whitequark 045f5e19a2 setup: fix commit 5198d99b. 2019-10-16 14:57:40 +00:00
whitequark 5198d99b5e setup: don't append local version for tags.
PyPI rejects any archives with local version.
2019-10-15 04:05:13 +00:00
whitequark 52f36025a9 rpc: add support for Yosys RPC protocol. 2019-09-30 17:38:54 +00:00
Emily f2550021c3 setup: improve repository detection. 2019-09-20 14:01:18 +00:00
Emily 6f12272533 setup: add setuptools dependency. 2019-09-20 14:01:18 +00:00
whitequark 284b533995 setup: replace versioneer with setuptools_scm.
Has the same problems with git-archive but is much less invasive.
2019-09-06 05:20:42 +00:00
whitequark 1b54eb80da vendor.board: split off into nmigen-boards package.
The iCE40 programmers are also moved, since they're board-specific.
(It looks like iceprog isn't, but it only works with Lattice
evaluation kits.)

Fixes #80.
2019-06-04 09:52:33 +00:00
whitequark 578dba263f Add versioneer. 2019-05-26 11:20:13 +00:00
Alain Péteut 342bdbe75a setup.py: constrain Python version
Installation should be constraint to supported Python versions, using `python_requires`,
refer to [1] for details.

[1] https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
2019-02-22 08:45:28 +00:00
whitequark 8cc900c4ef setup: update pyvcd dependency, for var_type="string". 2018-12-19 17:17:25 +00:00
whitequark 7fa82a70be back.pysim: eliminate most dictionary lookups.
This makes the Glasgow testsuite about 30% faster.
2018-12-18 16:36:54 +00:00
whitequark 1580b6e542 Lower Python version requirement to 3.6. 2018-12-15 17:03:23 +00:00
whitequark 55e729f68a setup: add missing import. 2018-12-14 02:32:37 +00:00
whitequark fb27c2520b back.pysim: new simulator backend (WIP). 2018-12-13 18:02:46 +00:00
whitequark 48330f8742 setup: check Python version. 2018-12-13 07:47:07 +00:00
whitequark 4d3258013d Initial commit. 2018-12-12 03:18:44 +00:00