Skip to content

Commit 217d4ea

Browse files
committed
Rename nMigen to Amaranth HDL.
1 parent d0e6c70 commit 217d4ea

23 files changed

+60
-54
lines changed

.coveragerc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[run]
22
branch = True
33
include =
4-
nmigen_soc/*
4+
amaranth_soc/*
55
omit =
6-
nmigen_soc/test/*
6+
amaranth_soc/test/*
77
*/__init__.py
88

99
[report]

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-
# System on Chip toolkit for nMigen
1+
# System on Chip toolkit for Amaranth HDL
22

3-
## CPU and peripheral building blocks
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.txt](LICENSE.txt) file for full copyright and license info.

amaranth_soc/__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:
File renamed without changes.

nmigen_soc/csr/bus.py renamed to amaranth_soc/csr/bus.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import enum
2-
from nmigen import *
3-
from nmigen.utils import log2_int
2+
from amaranth import *
3+
from amaranth.utils import log2_int
44

55
from ..memory import MemoryMap
66

nmigen_soc/csr/event.py renamed to amaranth_soc/csr/event.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# nmigen: UnusedElaboratable=no
1+
# amaranth: UnusedElaboratable=no
22

3-
from nmigen import *
3+
from amaranth import *
44

55
from . import Element, Multiplexer
66
from .. import event

nmigen_soc/csr/wishbone.py renamed to amaranth_soc/csr/wishbone.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from nmigen import *
2-
from nmigen.utils import log2_int
1+
from amaranth import *
2+
from amaranth.utils import log2_int
33

44
from . import Interface as CSRInterface
55
from ..wishbone import Interface as WishboneInterface

nmigen_soc/event.py renamed to amaranth_soc/event.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import enum
22
from collections import OrderedDict
33

4-
from nmigen import *
4+
from amaranth import *
55

66

77
__all__ = ["Source", "EventMap", "Monitor"]

nmigen_soc/memory.py renamed to amaranth_soc/memory.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import bisect
22

3-
from nmigen.utils import bits_for
3+
from amaranth.utils import bits_for
44

55

66
__all__ = ["ResourceInfo", "MemoryMap"]

nmigen_soc/periph.py renamed to amaranth_soc/periph.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from collections import OrderedDict
22
from collections.abc import Mapping
33

4-
from nmigen.utils import bits_for
4+
from amaranth.utils import bits_for
55

66
from .memory import MemoryMap
77
from . import event
File renamed without changes.

nmigen_soc/test/test_csr_bus.py renamed to amaranth_soc/test/test_csr_bus.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# nmigen: UnusedElaboratable=no
1+
# amaranth: UnusedElaboratable=no
22

33
import unittest
4-
from nmigen import *
5-
from nmigen.hdl.rec import Layout
6-
from nmigen.back.pysim import *
4+
from amaranth import *
5+
from amaranth.hdl.rec import Layout
6+
from amaranth.back.pysim import *
77

88
from ..csr.bus import *
99
from ..memory import MemoryMap

nmigen_soc/test/test_csr_event.py renamed to amaranth_soc/test/test_csr_event.py

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

33
import unittest
4-
from nmigen import *
5-
from nmigen.back.pysim import *
4+
from amaranth import *
5+
from amaranth.back.pysim import *
66

77
from ..csr import *
88
from .. import event

nmigen_soc/test/test_csr_wishbone.py renamed to amaranth_soc/test/test_csr_wishbone.py

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

33
import unittest
4-
from nmigen import *
5-
from nmigen.back.pysim import *
4+
from amaranth import *
5+
from amaranth.back.pysim import *
66

77
from .. import csr
88
from ..csr.wishbone import *

nmigen_soc/test/test_event.py renamed to amaranth_soc/test/test_event.py

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

33
import unittest
4-
from nmigen import *
5-
from nmigen.back.pysim import *
4+
from amaranth import *
5+
from amaranth.back.pysim import *
66

77
from ..event import *
88

nmigen_soc/test/test_memory.py renamed to amaranth_soc/test/test_memory.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def test_add_window_wrong_frozen(self):
283283
memory_map.freeze()
284284
with self.assertRaisesRegex(ValueError,
285285
r"Memory map has been frozen. Cannot add window "
286-
r"<nmigen_soc\.memory\.MemoryMap object at .+?>"):
286+
r"<amaranth_soc\.memory\.MemoryMap object at .+?>"):
287287
memory_map.add_window(MemoryMap(addr_width=1, data_width=8))
288288

289289
def test_add_window_wrong_window(self):
@@ -325,15 +325,15 @@ def test_add_window_wrong_overlap(self):
325325
memory_map.add_window(MemoryMap(addr_width=10, data_width=8))
326326
with self.assertRaisesRegex(ValueError,
327327
r"Address range 0x200\.\.0x600 overlaps with window "
328-
r"<nmigen_soc\.memory\.MemoryMap object at .+?> at 0x0\.\.0x400"):
328+
r"<amaranth_soc\.memory\.MemoryMap object at .+?> at 0x0\.\.0x400"):
329329
memory_map.add_window(MemoryMap(addr_width=10, data_width=8), addr=0x200)
330330

331331
def test_add_window_wrong_twice(self):
332332
memory_map = MemoryMap(addr_width=16, data_width=8)
333333
window = MemoryMap(addr_width=10, data_width=8)
334334
memory_map.add_window(window)
335335
with self.assertRaisesRegex(ValueError,
336-
r"Window <nmigen_soc\.memory\.MemoryMap object at .+?> is already added "
336+
r"Window <amaranth_soc\.memory\.MemoryMap object at .+?> is already added "
337337
r"at address range 0x0\.\.0x400"):
338338
memory_map.add_window(window)
339339

File renamed without changes.

nmigen_soc/test/test_wishbone_bus.py renamed to amaranth_soc/test/test_wishbone_bus.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# nmigen: UnusedElaboratable=no
1+
# amaranth: UnusedElaboratable=no
22

33
import unittest
4-
from nmigen import *
5-
from nmigen.hdl.rec import *
6-
from nmigen.back.pysim import *
4+
from amaranth import *
5+
from amaranth.hdl.rec import *
6+
from amaranth.back.pysim import *
77

88
from ..wishbone.bus import *
99
from ..memory import MemoryMap
File renamed without changes.

nmigen_soc/wishbone/bus.py renamed to amaranth_soc/wishbone/bus.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from enum import Enum
2-
from nmigen import *
3-
from nmigen.hdl.rec import Direction
4-
from nmigen.utils import log2_int
2+
from amaranth import *
3+
from amaranth.hdl.rec import Direction
4+
from amaranth.utils import log2_int
55

66
from ..memory import MemoryMap
77

@@ -72,7 +72,7 @@ class Interface(Record):
7272
7373
Attributes
7474
----------
75-
The correspondence between the nMigen-SoC signals and the Wishbone signals changes depending
75+
The correspondence between the Amaranth-SoC signals and the Wishbone signals changes depending
7676
on whether the interface acts as an initiator or a target.
7777
7878
adr : Signal(addr_width)
@@ -99,7 +99,7 @@ class Interface(Record):
9999
Optional. Corresponds to Wishbone signal ``STALL_I`` (initiator) or ``STALL_O`` (target).
100100
lock : Signal()
101101
Optional. Corresponds to Wishbone signal ``LOCK_O`` (initiator) or ``LOCK_I`` (target).
102-
nmigen-soc Wishbone support assumes that initiators that don't want bus arbitration to happen in
102+
amaranth-soc Wishbone support assumes that initiators that don't want bus arbitration to happen in
103103
between two transactions need to use ``lock`` feature to guarantee this. An initiator without
104104
the ``lock`` feature may be arbitrated in between two transactions even if ``cyc`` is kept high.
105105
cti : Signal()

nmigen_soc/__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-soc",
18+
name="amaranth-soc",
1919
use_scm_version=scm_version(),
2020
author="whitequark",
2121
author_email="[email protected]",
22-
description="System on Chip toolkit for nMigen",
22+
description="System on Chip toolkit for Amaranth HDL",
2323
#long_description="""TODO""",
2424
license="BSD",
2525
setup_requires=["wheel", "setuptools", "setuptools_scm"],
26-
install_requires=["nmigen>=0.2,<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-soc",
30-
"Bug Tracker": "https://github.com/nmigen/nmigen-soc/issues",
32+
"Source Code": "https://github.com/amaranth-lang/amaranth-soc",
33+
"Bug Tracker": "https://github.com/amaranth-lang/amaranth-soc/issues",
3134
},
3235
)

0 commit comments

Comments
 (0)