Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
litex-boards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kestrel Collaboration
Kestrel LiteX
litex-boards
Commits
760b8ff9
Commit
760b8ff9
authored
Jul 24, 2020
by
Florent Kermarrec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arty: improve xy_pmod_io genericity (allow selecting the PMOD) and enable SDCard.
parent
04fc98f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
53 deletions
+68
-53
litex_boards/platforms/arty.py
litex_boards/platforms/arty.py
+58
-51
litex_boards/targets/arty.py
litex_boards/targets/arty.py
+10
-2
No files found.
litex_boards/platforms/arty.py
View file @
760b8ff9
...
...
@@ -145,57 +145,6 @@ _io = [
),
]
_usb_uart_pmod_io
=
[
# USB-UART PMOD on JA:
# - https://store.digilentinc.com/pmod-usbuart-usb-to-uart-interface/
(
"usb_uart"
,
0
,
Subsignal
(
"tx"
,
Pins
(
"pmoda:1"
)),
Subsignal
(
"rx"
,
Pins
(
"pmoda:2"
)),
IOStandard
(
"LVCMOS33"
)
),
]
_i2s_pmod_io
=
[
# I2S PMOD on JD:
# - https://store.digilentinc.com/pmod-i2s2-stereo-audio-input-and-output/
(
"i2s_rx_mclk"
,
0
,
Pins
(
"pmodd:4"
),
IOStandard
(
"LVCMOS33"
)),
(
"i2s_rx"
,
0
,
Subsignal
(
"clk"
,
Pins
(
"pmodd:6"
)),
Subsignal
(
"sync"
,
Pins
(
"pmodd:5"
)),
Subsignal
(
"rx"
,
Pins
(
"pmodd:7"
)),
IOStandard
(
"LVCMOS33"
),
),
(
"i2s_tx_mclk"
,
0
,
Pins
(
"pmodd:0"
),
IOStandard
(
"LVCMOS33"
)),
(
"i2s_tx"
,
0
,
Subsignal
(
"clk"
,
Pins
(
"pmodd:2"
)),
Subsignal
(
"sync"
,
Pins
(
"pmodd:1"
)),
Subsignal
(
"tx"
,
Pins
(
"pmodd:3"
)),
IOStandard
(
"LVCMOS33"
),
),
]
_sdcard_pmod_io
=
[
# SDCard PMOD on JD:
# - https://store.digilentinc.com/pmod-microsd-microsd-card-slot/
# - https://github.com/antmicro/arty-expansion-board
(
"spisdcard"
,
0
,
Subsignal
(
"clk"
,
Pins
(
"pmodd:3"
)),
Subsignal
(
"mosi"
,
Pins
(
"pmodd:1"
),
Misc
(
"PULLUP True"
)),
Subsignal
(
"cs_n"
,
Pins
(
"pmodd:0"
),
Misc
(
"PULLUP True"
)),
Subsignal
(
"miso"
,
Pins
(
"pmodd:2"
),
Misc
(
"PULLUP True"
)),
Misc
(
"SLEW=FAST"
),
IOStandard
(
"LVCMOS33"
),
),
(
"sdcard"
,
0
,
Subsignal
(
"data"
,
Pins
(
"pmodd:2 pmodd:4 pmodd:5 pmodd:0"
),
Misc
(
"PULLUP True"
)),
Subsignal
(
"cmd"
,
Pins
(
"pmodd:1"
),
Misc
(
"PULLUP True"
)),
Subsignal
(
"clk"
,
Pins
(
"pmodd:3"
)),
Subsignal
(
"cd"
,
Pins
(
"pmodd:6"
)),
Misc
(
"SLEW=FAST"
),
IOStandard
(
"LVCMOS33"
),
),
]
# Connectors ---------------------------------------------------------------------------------------
_connectors
=
[
...
...
@@ -289,6 +238,64 @@ _connectors = [
}
),
]
# PMODS --------------------------------------------------------------------------------------------
def
usb_pmod_io
(
pmod
):
return
[
# USB-UART PMOD: https://store.digilentinc.com/pmod-usbuart-usb-to-uart-interface/
(
"usb_uart"
,
0
,
Subsignal
(
"tx"
,
Pins
(
f"
{
pmod
}
:1"
)),
Subsignal
(
"rx"
,
Pins
(
f"
{
pmod
}
:2"
)),
IOStandard
(
"LVCMOS33"
)
),
]
_usb_uart_pmod_io
=
usb_pmod_io
(
"pmoda"
)
# USB-UART PMOD on JA.
def
i2s_pmod_io
(
pmod
):
return
[
# I2S PMOD: https://store.digilentinc.com/pmod-i2s2-stereo-audio-input-and-output/
(
"i2s_rx_mclk"
,
0
,
Pins
(
f"
{
pmod
}
:4"
),
IOStandard
(
"LVCMOS33"
)),
(
"i2s_rx"
,
0
,
Subsignal
(
"clk"
,
Pins
(
f"
{
pmod
}
:6"
)),
Subsignal
(
"sync"
,
Pins
(
f"
{
pmod
}
:5"
)),
Subsignal
(
"rx"
,
Pins
(
f"
{
pmod
}
:7"
)),
IOStandard
(
"LVCMOS33"
),
),
(
"i2s_tx_mclk"
,
0
,
Pins
(
f"
{
pmod
}
:0"
),
IOStandard
(
"LVCMOS33"
)),
(
"i2s_tx"
,
0
,
Subsignal
(
"clk"
,
Pins
(
f"
{
pmod
}
:2"
)),
Subsignal
(
"sync"
,
Pins
(
f"
{
pmod
}
:1"
)),
Subsignal
(
"tx"
,
Pins
(
f"
{
pmod
}
:3"
)),
IOStandard
(
"LVCMOS33"
),
),
]
_i2s_pmod_io
=
i2s_pmod_io
(
"pmodd"
)
# I2S PMOD on JD.
def
sdcard_pmod_io
(
pmod
):
return
[
# SDCard PMOD:
# - https://store.digilentinc.com/pmod-microsd-microsd-card-slot/
# - https://github.com/antmicro/arty-expansion-board
(
"spisdcard"
,
0
,
Subsignal
(
"clk"
,
Pins
(
f"
{
pmod
}
:3"
)),
Subsignal
(
"mosi"
,
Pins
(
f"
{
pmod
}
:1"
),
Misc
(
"PULLUP True"
)),
Subsignal
(
"cs_n"
,
Pins
(
f"
{
pmod
}
:0"
),
Misc
(
"PULLUP True"
)),
Subsignal
(
"miso"
,
Pins
(
f"
{
pmod
}
:2"
),
Misc
(
"PULLUP True"
)),
Misc
(
"SLEW=FAST"
),
IOStandard
(
"LVCMOS33"
),
),
(
"sdcard"
,
0
,
Subsignal
(
"data"
,
Pins
(
f"
{
pmod
}
:2
{
pmod
}
:4
{
pmod
}
:5
{
pmod
}
:0"
),
Misc
(
"PULLUP True"
)),
Subsignal
(
"cmd"
,
Pins
(
f"
{
pmod
}
:1"
),
Misc
(
"PULLUP True"
)),
Subsignal
(
"clk"
,
Pins
(
f"
{
pmod
}
:3"
)),
Subsignal
(
"cd"
,
Pins
(
f"
{
pmod
}
:6"
)),
Misc
(
"SLEW=FAST"
),
IOStandard
(
"LVCMOS33"
),
),
]
_sdcard_pmod_io
=
sdcard_pmod_io
(
"pmodd"
)
# SDCARD PMOD on JD.
# Platform -----------------------------------------------------------------------------------------
class
Platform
(
XilinxPlatform
):
...
...
litex_boards/targets/arty.py
View file @
760b8ff9
...
...
@@ -105,13 +105,21 @@ def main():
builder_args
(
parser
)
soc_sdram_args
(
parser
)
vivado_build_args
(
parser
)
parser
.
add_argument
(
"--with-ethernet"
,
action
=
"store_true"
,
help
=
"Enable Ethernet support"
)
parser
.
add_argument
(
"--with-etherbone"
,
action
=
"store_true"
,
help
=
"Enable Etherbone support"
)
parser
.
add_argument
(
"--with-ethernet"
,
action
=
"store_true"
,
help
=
"Enable Ethernet support"
)
parser
.
add_argument
(
"--with-etherbone"
,
action
=
"store_true"
,
help
=
"Enable Etherbone support"
)
parser
.
add_argument
(
"--with-spi-sdcard"
,
action
=
"store_true"
,
help
=
"Enable SPI-mode SDCard support"
)
parser
.
add_argument
(
"--with-sdcard"
,
action
=
"store_true"
,
help
=
"Enable SDCard support"
)
args
=
parser
.
parse_args
()
assert
not
(
args
.
with_ethernet
and
args
.
with_etherbone
)
soc
=
BaseSoC
(
with_ethernet
=
args
.
with_ethernet
,
with_etherbone
=
args
.
with_etherbone
,
**
soc_sdram_argdict
(
args
))
assert
not
(
args
.
with_spi_sdcard
and
args
.
with_sdcard
)
soc
.
platform
.
add_extension
(
arty
.
_sdcard_pmod_io
)
if
args
.
with_spi_sdcard
:
soc
.
add_spi_sdcard
()
if
args
.
with_sdcard
:
soc
.
add_sdcard
()
builder
=
Builder
(
soc
,
**
builder_argdict
(
args
))
builder
.
build
(
**
vivado_build_argdict
(
args
),
run
=
args
.
build
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment