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
5e67853a
Commit
5e67853a
authored
Oct 09, 2020
by
Konrad Beckmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
versa_ecp5: Add --eth-phy to select ethernet phy
This also simplifies the logic a bit.
parent
fcf3e44e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
litex_boards/targets/versa_ecp5.py
litex_boards/targets/versa_ecp5.py
+11
-14
No files found.
litex_boards/targets/versa_ecp5.py
View file @
5e67853a
...
...
@@ -78,7 +78,7 @@ class _CRG(Module):
# BaseSoC ------------------------------------------------------------------------------------------
class
BaseSoC
(
SoCCore
):
def
__init__
(
self
,
sys_clk_freq
=
int
(
75e6
),
device
=
"LFE5UM5G"
,
with_ethernet
=
False
,
with_etherbone
=
False
,
toolchain
=
"trellis"
,
**
kwargs
):
def
__init__
(
self
,
sys_clk_freq
=
int
(
75e6
),
device
=
"LFE5UM5G"
,
with_ethernet
=
False
,
with_etherbone
=
False
,
eth_phy
=
0
,
toolchain
=
"trellis"
,
**
kwargs
):
platform
=
versa_ecp5
.
Platform
(
toolchain
=
toolchain
,
device
=
device
)
# FIXME: adapt integrated rom size for Microwatt
...
...
@@ -112,21 +112,16 @@ class BaseSoC(SoCCore):
l2_cache_reverse
=
True
)
# Ethernet
------------
---------------------------------------------------------------------
if
with_ethernet
:
# Ethernet
/ Etherbone
---------------------------------------------------------------------
if
with_ethernet
or
with_etherbone
:
self
.
submodules
.
ethphy
=
LiteEthPHYRGMII
(
clock_pads
=
self
.
platform
.
request
(
"eth_clocks"
),
pads
=
self
.
platform
.
request
(
"eth"
))
clock_pads
=
self
.
platform
.
request
(
"eth_clocks"
,
eth_phy
),
pads
=
self
.
platform
.
request
(
"eth"
,
eth_phy
))
self
.
add_csr
(
"ethphy"
)
self
.
add_ethernet
(
phy
=
self
.
ethphy
)
# Etherbone --------------------------------------------------------------------------------
if
with_etherbone
:
self
.
submodules
.
ethphy
=
LiteEthPHYRGMII
(
clock_pads
=
self
.
platform
.
request
(
"eth_clocks"
),
pads
=
self
.
platform
.
request
(
"eth"
))
self
.
add_csr
(
"ethphy"
)
self
.
add_etherbone
(
phy
=
self
.
ethphy
)
if
with_ethernet
:
self
.
add_ethernet
(
phy
=
self
.
ethphy
)
if
with_etherbone
:
self
.
add_etherbone
(
phy
=
self
.
ethphy
)
# Leds -------------------------------------------------------------------------------------
self
.
submodules
.
leds
=
LedChaser
(
...
...
@@ -148,6 +143,7 @@ def main():
parser
.
add_argument
(
"--device"
,
default
=
"LFE5UM5G"
,
help
=
"ECP5 device (LFE5UM5G (default) or LFE5UM)"
)
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
(
"--eth-phy"
,
default
=
0
,
type
=
int
,
help
=
"Ethernet PHY 0 or 1 (default=0)"
)
args
=
parser
.
parse_args
()
assert
not
(
args
.
with_ethernet
and
args
.
with_etherbone
)
...
...
@@ -155,6 +151,7 @@ def main():
device
=
args
.
device
,
with_ethernet
=
args
.
with_ethernet
,
with_etherbone
=
args
.
with_etherbone
,
eth_phy
=
args
.
eth_phy
,
toolchain
=
args
.
toolchain
,
**
soc_sdram_argdict
(
args
))
builder
=
Builder
(
soc
,
**
builder_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