Skip to content

Commit 73c6211

Browse files
committed
Rename PinSignature to IOSignature\n\nAvoids clash with amaranth-soc entity of same name
1 parent 8cf168a commit 73c6211

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

amaranth_orchard/io/gpio.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from amaranth_soc import csr, gpio
66

7-
from chipflow_lib.platforms import BidirPinSignature
7+
from chipflow_lib.platforms import BidirIOSignature
88

99
__all__ = ["GPIOPeripheral"]
1010

@@ -17,14 +17,14 @@ def __init__(self, pin_count=1):
1717
raise ValueError(f"Pin pin_count must be lesser than or equal to 32, not {pin_count}")
1818
self._pin_count = pin_count
1919
super().__init__({
20-
"gpio": Out(BidirPinSignature(pin_count, all_have_oe=True))
20+
"gpio": Out(BidirIOSignature(pin_count, all_have_oe=True))
2121
})
2222

2323
@property
2424
def pin_count(self):
2525
return self._pin_count
2626

27-
"""Wrapper for amaranth_soc gpio with chipflow_lib.PinSignature support
27+
"""Wrapper for amaranth_soc gpio with chipflow_lib.IOSignature support
2828
2929
Parameters
3030
----------
@@ -42,7 +42,7 @@ def pin_count(self):
4242
----------
4343
bus : :class:`csr.Interface`
4444
CSR bus interface providing access to registers.
45-
pins : :class:`list` of :class:`wiring.PureInterface` of :class:`PinSignature`
45+
pins : :class:`list` of :class:`wiring.PureInterface` of :class:`IOSignature`
4646
GPIO pin interfaces.
4747
alt_mode : :class:`Signal`
4848
Indicates which members of the :attr:`Peripheral.pins` array are in alternate mode.

amaranth_orchard/io/i2c.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
from amaranth.lib.wiring import In, Out, connect, flipped
44

55
from amaranth_soc import csr
6-
from chipflow_lib.platforms import BidirPinSignature
6+
from chipflow_lib.platforms import BidirIOSignature
77
from .glasgow_i2c import I2CInitiator
88

99
__all__ = ["I2CPeripheral", "I2CSignature"]
1010

1111
I2CSignature = wiring.Signature({
12-
"scl": Out(BidirPinSignature(1)),
13-
"sda": Out(BidirPinSignature(1))
12+
"scl": Out(BidirIOSignature(1)),
13+
"sda": Out(BidirIOSignature(1))
1414
})
1515

1616

amaranth_orchard/io/spi.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
from amaranth.lib.wiring import In, Out, connect, flipped
44

55
from amaranth_soc import csr
6-
from chipflow_lib.platforms import InputPinSignature, OutputPinSignature
6+
from chipflow_lib.platforms import InputIOSignature, OutputIOSignature
77

88
__all__ = ["SPISignature", "SPIPeripheral"]
99

1010
SPISignature = wiring.Signature({
11-
"sck": Out(OutputPinSignature(1)),
12-
"copi": Out(OutputPinSignature(1)),
13-
"cipo": Out(InputPinSignature(1)),
14-
"csn": Out(OutputPinSignature(1)),
11+
"sck": Out(OutputIOSignature(1)),
12+
"copi": Out(OutputIOSignature(1)),
13+
"cipo": Out(InputIOSignature(1)),
14+
"csn": Out(OutputIOSignature(1)),
1515
})
1616

1717
class SPIController(wiring.Component):

amaranth_orchard/io/uart.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from amaranth_soc import csr
66
from amaranth_stdio.serial import AsyncSerialRX, AsyncSerialTX
77

8-
from chipflow_lib.platforms import OutputPinSignature, InputPinSignature
8+
from chipflow_lib.platforms import OutputIOSignature, InputIOSignature
99

1010
from . import rfc_uart
1111

@@ -123,12 +123,12 @@ class UARTPeripheral(wiring.Component):
123123
class Signature(wiring.Signature):
124124
def __init__(self):
125125
super().__init__({
126-
"tx": Out(OutputPinSignature(1)),
127-
"rx": Out(InputPinSignature(1)),
126+
"tx": Out(OutputIOSignature(1)),
127+
"rx": Out(InputIOSignature(1)),
128128
})
129129

130130

131-
"""Wrapper for amaranth_soc RFC UART with PHY and chipflow_lib.PinSignature support
131+
"""Wrapper for amaranth_soc RFC UART with PHY and chipflow_lib.IOSignature support
132132
133133
Parameters
134134
----------
@@ -143,7 +143,7 @@ def __init__(self):
143143
----------
144144
bus : :class:`csr.Interface`
145145
CSR bus interface providing access to registers.
146-
pins : :class:`list` of :class:`wiring.PureInterface` of :class:`PinSignature`
146+
pins : :class:`list` of :class:`wiring.PureInterface` of :class:`IOSignature`
147147
UART pin interfaces.
148148
149149
"""

amaranth_orchard/memory/hyperram.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from amaranth_soc import csr, wishbone
1414
from amaranth_soc.memory import MemoryMap
1515

16-
from chipflow_lib.platforms import BidirPinSignature, OutputPinSignature
16+
from chipflow_lib.platforms import BidirIOSignature, OutputIOSignature
1717

1818
__all__ = ["HyperRAM"]
1919

@@ -22,11 +22,11 @@ class HyperRAM(wiring.Component):
2222
class Signature(wiring.Signature):
2323
def __init__(self, *, cs_count=1):
2424
super().__init__({
25-
"clk": Out(OutputPinSignature(1)),
26-
"csn": Out(OutputPinSignature(cs_count)),
27-
"rstn": Out(OutputPinSignature(1)),
28-
"rwds": Out(BidirPinSignature(1)),
29-
"dq": Out(BidirPinSignature(8)),
25+
"clk": Out(OutputIOSignature(1)),
26+
"csn": Out(OutputIOSignature(cs_count)),
27+
"rstn": Out(OutputIOSignature(1)),
28+
"rwds": Out(BidirIOSignature(1)),
29+
"dq": Out(BidirIOSignature(8)),
3030
})
3131

3232
class CtrlConfig(csr.Register, access="rw"):

amaranth_orchard/memory/qspi_flash.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from amaranth_orchard.io.glasgow_iostream import PortGroup
1010
from amaranth_orchard.memory.glasgow_qspi import QSPIMode, QSPIController
1111

12-
from chipflow_lib.platforms import BidirPinSignature, OutputPinSignature
12+
from chipflow_lib.platforms import BidirIOSignature, OutputIOSignature
1313

1414
__all__ = ["QSPIFlash"]
1515

@@ -252,9 +252,9 @@ class QSPIFlash(wiring.Component):
252252
class Signature(wiring.Signature):
253253
def __init__(self):
254254
super().__init__({
255-
"clk": Out(OutputPinSignature(1)),
256-
"csn": Out(OutputPinSignature(1)),
257-
"d": Out(BidirPinSignature(4, all_have_oe=True)),
255+
"clk": Out(OutputIOSignature(1)),
256+
"csn": Out(OutputIOSignature(1)),
257+
"d": Out(BidirIOSignature(4, all_have_oe=True)),
258258
})
259259

260260
def __init__(self, *, addr_width, data_width):

0 commit comments

Comments
 (0)