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
98c80f0b
Unverified
Commit
98c80f0b
authored
Feb 24, 2021
by
enjoy-digital
Committed by
GitHub
Feb 24, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #177 from antmicro/arty-dynamic-ip
target/arty: add eth_ip_configurable switch
parents
aad8154e
ae0d4dc0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
litex_boards/targets/arty.py
litex_boards/targets/arty.py
+17
-13
No files found.
litex_boards/targets/arty.py
View file @
98c80f0b
...
...
@@ -56,7 +56,7 @@ class _CRG(Module):
# BaseSoC ------------------------------------------------------------------------------------------
class
BaseSoC
(
SoCCore
):
def
__init__
(
self
,
variant
=
"a7-35"
,
toolchain
=
"vivado"
,
sys_clk_freq
=
int
(
100e6
),
with_ethernet
=
False
,
with_etherbone
=
False
,
eth_ip
=
"192.168.1.50"
,
ident_version
=
True
,
**
kwargs
):
def
__init__
(
self
,
variant
=
"a7-35"
,
toolchain
=
"vivado"
,
sys_clk_freq
=
int
(
100e6
),
with_ethernet
=
False
,
with_etherbone
=
False
,
eth_ip
=
"192.168.1.50"
,
eth_dynamic_ip
=
False
,
ident_version
=
True
,
**
kwargs
):
platform
=
arty
.
Platform
(
variant
=
variant
,
toolchain
=
toolchain
)
# SoCCore ----------------------------------------------------------------------------------
...
...
@@ -92,7 +92,7 @@ class BaseSoC(SoCCore):
pads
=
self
.
platform
.
request
(
"eth"
))
self
.
add_csr
(
"ethphy"
)
if
with_ethernet
:
self
.
add_ethernet
(
phy
=
self
.
ethphy
)
self
.
add_ethernet
(
phy
=
self
.
ethphy
,
dynamic_ip
=
eth_dynamic_ip
)
if
with_etherbone
:
self
.
add_etherbone
(
phy
=
self
.
ethphy
,
ip_address
=
eth_ip
)
...
...
@@ -115,6 +115,7 @@ def main():
ethopts
.
add_argument
(
"--with-ethernet"
,
action
=
"store_true"
,
help
=
"Enable Ethernet support"
)
ethopts
.
add_argument
(
"--with-etherbone"
,
action
=
"store_true"
,
help
=
"Enable Etherbone support"
)
parser
.
add_argument
(
"--eth-ip"
,
default
=
"192.168.1.50"
,
type
=
str
,
help
=
"Ethernet/Etherbone IP address"
)
parser
.
add_argument
(
"--eth-dynamic-ip"
,
action
=
"store_true"
,
help
=
"Enable dynamic Ethernet IP addresses setting"
)
sdopts
=
parser
.
add_mutually_exclusive_group
()
sdopts
.
add_argument
(
"--with-spi-sdcard"
,
action
=
"store_true"
,
help
=
"Enable SPI-mode SDCard support"
)
sdopts
.
add_argument
(
"--with-sdcard"
,
action
=
"store_true"
,
help
=
"Enable SDCard support"
)
...
...
@@ -124,6 +125,8 @@ def main():
vivado_build_args
(
parser
)
args
=
parser
.
parse_args
()
assert
not
(
args
.
with_etherbone
and
args
.
eth_dynamic_ip
)
soc
=
BaseSoC
(
variant
=
args
.
variant
,
toolchain
=
args
.
toolchain
,
...
...
@@ -131,6 +134,7 @@ def main():
with_ethernet
=
args
.
with_ethernet
,
with_etherbone
=
args
.
with_etherbone
,
eth_ip
=
args
.
eth_ip
,
eth_dynamic_ip
=
args
.
eth_dynamic_ip
,
ident_version
=
args
.
no_ident_version
,
**
soc_sdram_argdict
(
args
)
)
...
...
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