humpback: fixed migen mapping

This commit is contained in:
occheung 2020-08-07 17:16:56 +08:00
parent f6ccae48f3
commit 3026099264
1 changed files with 35 additions and 3 deletions

View File

@ -31,7 +31,7 @@ class HumpbackPlatform(LatticeICE40Platform):
Attrs(IO_STANDARD="SB_LVCMOS") Attrs(IO_STANDARD="SB_LVCMOS")
), ),
# Define UART interfaces # TODO: Define UART interfaces somewhere else, make it optional
UARTResource(0, UARTResource(0,
rx="T11", tx="M13", rts="M15", cts="T10", rx="T11", tx="M13", rts="M15", cts="T10",
attrs=Attrs(IO_STANDARD="SB_LVCMOS", PULLUP=1) attrs=Attrs(IO_STANDARD="SB_LVCMOS", PULLUP=1)
@ -46,6 +46,7 @@ class HumpbackPlatform(LatticeICE40Platform):
# ), # ),
# Define SPI interfaces # Define SPI interfaces
# TODO; Make it optional, define it in a block
# Note: Use "role=device" to make humpback a SPI slave # Note: Use "role=device" to make humpback a SPI slave
# The ~CS pin is a global pin, but not being configured global. # The ~CS pin is a global pin, but not being configured global.
SPIResource(0, SPIResource(0,
@ -54,6 +55,7 @@ class HumpbackPlatform(LatticeICE40Platform):
), ),
# Define I2C interface # Define I2C interface
# TODO: Make it optional, declare it in a block itself
# Use "role=device" to make humpback a I2C slave # Use "role=device" to make humpback a I2C slave
I2CResource(0, I2CResource(0,
sda="T16", scl="M12", sda="T16", scl="M12",
@ -126,11 +128,14 @@ class HumpbackPlatform(LatticeICE40Platform):
}), }),
# STM32 Nucleo/ Arduino Connector # STM32 Nucleo/ Arduino Connector
# TODO: SPI signal matching
Connector("stm32", "pins", { Connector("stm32", "pins", {
"PA0": "A2", "PA0": "A2",
"PA1": "P14", "PA1": "P14",
"PA2": "B8", "PA2": "B8",
"PA3": "L13", "PA3": "L13",
"PA5": "C8",
"PA6": "T2",
"PA7": "N12", "PA7": "N12",
"PA8": "M9", "PA8": "M9",
"PA9": "P10", "PA9": "P10",
@ -140,7 +145,10 @@ class HumpbackPlatform(LatticeICE40Platform):
"PB0": "A1", "PB0": "A1",
"PB1": "G12", "PB1": "G12",
"PB2": "B6", "PB2": "B6",
"PB5": "N5",
"PB6": "A7", "PB6": "A7",
"PB8": "M12",
"PB9": "T16",
"PB10": "C3", "PB10": "C3",
"PB11": "F7", "PB11": "F7",
"PB12": "B13", "PB12": "B13",
@ -164,20 +172,44 @@ class HumpbackPlatform(LatticeICE40Platform):
"PD0": "T9", "PD0": "T9",
"PD1": "N9", "PD1": "N9",
"PD2": "K13", "PD2": "K13",
"PD3": "T10",
"PD4": "A6",
"PD5": "T11",
"PD6": "M13",
"PD7": "L12", "PD7": "L12",
"PD11": "E5", "PD11": "E5",
"PD12": "D5", "PD12": "D5",
"PD13": "C5", "PD13": "C5",
"PD14": "R2",
"PE0": "D3",
"PE2": "P15",
"PE3": "N10",
"PE4": "R15",
"PE5": "T15",
"PE6": "M8",
"PE7": "E6",
"PE8": "D6",
"PE9": "F12",
"PE10": "A5",
"PE11": "G11",
"PE12": "B4",
"PE13": "F11",
"PE14": "C4",
"PE15": "B3",
"PF7": "L9", "PF7": "L9",
"PF8": "L10", "PF8": "L10",
"PF9": "P9", "PF9": "P9",
"PF14": "B9", "PF14": "B9",
"PF15": "B16",
"PG0": "M7", "PG0": "M7",
"PG1": "P8", "PG1": "P8",
"PG2": "K14", "PG2": "K14",
"PG3": "K15", "PG3": "K15",
"PG9": "T13",
"PG10": "M11",
}), }),
# Beaglebone Black Connector # Beaglebone Black Connector