Skip to content

Commit ae74f17

Browse files
committed
Rename nMigen to Amaranth HDL.
1 parent 9e222b9 commit ae74f17

File tree

9 files changed

+38
-30
lines changed

9 files changed

+38
-30
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
/.eggs
55
/dist
66

7-
# nMigen
7+
# Amaranth
88
*.vcd

LICENSE.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Copyright (C) 2019-2020 whitequark
2-
Copyright (C) 2019 M-Labs Limited
1+
Copyright (C) 2019-2021 Amaranth HDL contributors
32

43
Redistribution and use in source and binary forms, with or without modification,
54
are permitted provided that the following conditions are met:

README.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
# Industry standard I/O for nMigen
1+
# Industry standard I/O for Amaranth HDL
22

3-
## Modules for standard I/O such as UART, SPI, I²C, ...
3+
TODO
44

5-
TBD
5+
## License
66

7-
### License
8-
9-
nMigen is released under the very permissive two-clause BSD license. Under the terms of this license, you are authorized to use nMigen for closed-source proprietary designs.
7+
Amaranth is released under the very permissive two-clause BSD license. Under the terms of this license, you are authorized to use Amaranth for closed-source proprietary designs.
108

119
See LICENSE file for full copyright and license info.

amaranth_stdio/__init__.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
try:
2+
try:
3+
from importlib import metadata as importlib_metadata # py3.8+ stdlib
4+
except ImportError:
5+
import importlib_metadata # py3.7- shim
6+
__version__ = importlib_metadata.version(__package__)
7+
except ImportError:
8+
# No importlib_metadata. This shouldn't normally happen, but some people prefer not installing
9+
# packages via pip at all, instead using PYTHONPATH directly or copying the package files into
10+
# `lib/pythonX.Y/site-packages`. Although not a recommended way, we still try to support it.
11+
__version__ = "unknown" # :nocov:

nmigen_stdio/serial.py renamed to amaranth_stdio/serial.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from nmigen import *
2-
from nmigen.lib.cdc import FFSynchronizer
3-
from nmigen.utils import bits_for
1+
from amaranth import *
2+
from amaranth.lib.cdc import FFSynchronizer
3+
from amaranth.utils import bits_for
44

55

66
__all__ = ["AsyncSerialRX", "AsyncSerialTX", "AsyncSerial"]

amaranth_stdio/test/__init__.py

Whitespace-only changes.

nmigen_stdio/test/test_serial.py renamed to amaranth_stdio/test/test_serial.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
# nmigen: UnusedElaboratable=no
1+
# amaranth: UnusedElaboratable=no
22

33
import unittest
44

5-
from nmigen import *
6-
from nmigen.lib.fifo import SyncFIFO
7-
from nmigen.lib.io import pin_layout
8-
from nmigen.back.pysim import *
5+
from amaranth import *
6+
from amaranth.lib.fifo import SyncFIFO
7+
from amaranth.lib.io import pin_layout
8+
from amaranth.back.pysim import *
99

1010
from ..serial import *
1111

1212

1313
def simulation_test(dut, process):
14-
with Simulator(dut, vcd_file=open("test.vcd", "w")) as sim:
14+
sim = Simulator(dut)
15+
with sim.write_vcd("test.vcd"):
1516
sim.add_clock(1e-6)
1617
sim.add_sync_process(process)
1718
sim.run()
@@ -35,10 +36,11 @@ def process():
3536
while not (yield self.dut.rdy):
3637
yield
3738
if data is not None:
38-
self.assertFalse((yield self.dut.err))
39+
self.assertFalse((yield self.dut.err.overflow))
40+
self.assertFalse((yield self.dut.err.frame))
41+
self.assertFalse((yield self.dut.err.parity))
3942
self.assertEqual((yield self.dut.data), data)
4043
if errors is not None:
41-
self.assertTrue((yield self.dut.err))
4244
for error in errors:
4345
self.assertTrue((yield getattr(self.dut.err, error)))
4446
simulation_test(self.dut, process)

nmigen_stdio/__init__.py

-5
This file was deleted.

setup.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,21 @@ def local_scheme(version):
1515

1616

1717
setup(
18-
name="nmigen-stdio",
18+
name="amaranth-stdio",
1919
use_scm_version=scm_version(),
2020
author="whitequark",
2121
author_email="[email protected]",
22-
description="Industry standard I/O for nMigen",
22+
description="Industry standard I/O for Amaranth HDL",
2323
#long_description="""TODO""",
2424
license="BSD",
2525
setup_requires=["wheel", "setuptools", "setuptools_scm"],
26-
install_requires=["nmigen>=0.1,<0.5"],
26+
install_requires=[
27+
"amaranth>=0.2,<0.5",
28+
"importlib_metadata; python_version<'3.8'",
29+
],
2730
packages=find_packages(),
2831
project_urls={
29-
"Source Code": "https://github.com/nmigen/nmigen-stdio",
30-
"Bug Tracker": "https://github.com/nmigen/nmigen-stdio/issues",
32+
"Source Code": "https://github.com/amaranth-lang/amaranth-stdio",
33+
"Bug Tracker": "https://github.com/amaranth-lang/amaranth-stdio/issues",
3134
},
3235
)

0 commit comments

Comments
 (0)