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
aad8154e
Commit
aad8154e
authored
Feb 23, 2021
by
Florent Kermarrec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
targets/sds1104xe: Enable both Ethernet/Etherbone with hybrid LiteEthMAC.
parent
5b28c619
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
3 deletions
+45
-3
litex_boards/targets/sds1104xe.py
litex_boards/targets/sds1104xe.py
+45
-3
No files found.
litex_boards/targets/sds1104xe.py
View file @
aad8154e
...
...
@@ -94,11 +94,53 @@ class BaseSoC(SoCCore):
# Etherbone --------------------------------------------------------------------------------
if
with_etherbone
:
self
.
submodules
.
ethphy
=
LiteEthPHYMII
(
# FIXME: Simplify LiteEth Hybrid MAC integration.
from
liteeth.common
import
convert_ip
from
liteeth.mac
import
LiteEthMAC
from
liteeth.core.arp
import
LiteEthARP
from
liteeth.core.ip
import
LiteEthIP
from
liteeth.core.udp
import
LiteEthUDP
from
liteeth.core.icmp
import
LiteEthICMP
from
liteeth.core
import
LiteEthUDPIPCore
from
liteeth.frontend.etherbone
import
LiteEthEtherbone
# Ethernet PHY
ethphy
=
LiteEthPHYMII
(
clock_pads
=
self
.
platform
.
request
(
"eth_clocks"
),
pads
=
self
.
platform
.
request
(
"eth"
))
self
.
add_csr
(
"ethphy"
)
self
.
add_etherbone
(
phy
=
self
.
ethphy
,
ip_address
=
eth_ip
)
self
.
submodules
+=
ethphy
etherbone_ip_address
=
convert_ip
(
"192.168.1.51"
)
etherbone_mac_address
=
0x10e2d5000001
# Ethernet MAC
self
.
submodules
.
ethmac
=
LiteEthMAC
(
phy
=
ethphy
,
dw
=
8
,
interface
=
"hybrid"
,
endianness
=
self
.
cpu
.
endianness
,
hw_mac
=
etherbone_mac_address
)
# Software Interface.
self
.
add_memory_region
(
"ethmac"
,
self
.
mem_map
[
"ethmac"
],
0x2000
,
type
=
"io"
)
self
.
add_wb_slave
(
self
.
mem_regions
[
"ethmac"
].
origin
,
self
.
ethmac
.
bus
,
0x2000
)
self
.
add_csr
(
"ethmac"
)
if
self
.
irq
.
enabled
:
self
.
irq
.
add
(
"ethmac"
,
use_loc_if_exists
=
True
)
# Hardware Interface.
self
.
submodules
.
arp
=
LiteEthARP
(
self
.
ethmac
,
etherbone_mac_address
,
etherbone_ip_address
,
sys_clk_freq
,
dw
=
8
)
self
.
submodules
.
ip
=
LiteEthIP
(
self
.
ethmac
,
etherbone_mac_address
,
etherbone_ip_address
,
self
.
arp
.
table
,
dw
=
8
)
self
.
submodules
.
icmp
=
LiteEthICMP
(
self
.
ip
,
etherbone_ip_address
,
dw
=
8
)
self
.
submodules
.
udp
=
LiteEthUDP
(
self
.
ip
,
etherbone_ip_address
,
dw
=
8
)
# Etherbone
self
.
submodules
.
etherbone
=
LiteEthEtherbone
(
self
.
udp
,
1234
,
mode
=
"master"
)
self
.
add_wb_master
(
self
.
etherbone
.
wishbone
.
bus
)
# Timing constraints
eth_rx_clk
=
ethphy
.
crg
.
cd_eth_rx
.
clk
eth_tx_clk
=
ethphy
.
crg
.
cd_eth_tx
.
clk
self
.
platform
.
add_period_constraint
(
eth_rx_clk
,
1e9
/
ethphy
.
rx_clk_freq
)
self
.
platform
.
add_period_constraint
(
eth_tx_clk
,
1e9
/
ethphy
.
tx_clk_freq
)
self
.
platform
.
add_false_path_constraints
(
self
.
crg
.
cd_sys
.
clk
,
eth_rx_clk
,
eth_tx_clk
)
# 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