Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rkx7-litex-boards
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reform
rkx7-litex-boards
Commits
db91eda8
Commit
db91eda8
authored
3 years ago
by
Florent Kermarrec
Browse files
Options
Downloads
Patches
Plain Diff
linsn_rv901t.py: Update Ethernet and add Etherbone support.
parent
b9f2a4c4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
litex_boards/targets/linsn_rv901t.py
+21
-10
21 additions, 10 deletions
litex_boards/targets/linsn_rv901t.py
with
21 additions
and
10 deletions
litex_boards/targets/linsn_rv901t.py
+
21
−
10
View file @
db91eda8
...
@@ -24,7 +24,6 @@ from litedram.modules import M12L64322A
...
@@ -24,7 +24,6 @@ from litedram.modules import M12L64322A
from
litedram.phy
import
GENSDRPHY
from
litedram.phy
import
GENSDRPHY
from
liteeth.phy.s6rgmii
import
LiteEthPHYRGMII
from
liteeth.phy.s6rgmii
import
LiteEthPHYRGMII
from
liteeth.mac
import
LiteEthMAC
# CRG ----------------------------------------------------------------------------------------------
# CRG ----------------------------------------------------------------------------------------------
...
@@ -50,7 +49,7 @@ class _CRG(Module):
...
@@ -50,7 +49,7 @@ class _CRG(Module):
# BaseSoC ------------------------------------------------------------------------------------------
# BaseSoC ------------------------------------------------------------------------------------------
class
BaseSoC
(
SoCCore
):
class
BaseSoC
(
SoCCore
):
def
__init__
(
self
,
sys_clk_freq
=
int
(
75e6
),
with_ethernet
=
False
,
with_led_chaser
=
True
,
**
kwargs
):
def
__init__
(
self
,
sys_clk_freq
=
int
(
75e6
),
with_ethernet
=
False
,
with_etherbone
=
False
,
eth_phy
=
0
,
with_led_chaser
=
True
,
**
kwargs
):
platform
=
linsn_rv901t
.
Platform
()
platform
=
linsn_rv901t
.
Platform
()
# SoCCore ----------------------------------------------------------------------------------
# SoCCore ----------------------------------------------------------------------------------
...
@@ -71,12 +70,19 @@ class BaseSoC(SoCCore):
...
@@ -71,12 +70,19 @@ class BaseSoC(SoCCore):
l2_cache_size
=
kwargs
.
get
(
"
l2_size
"
,
8192
)
l2_cache_size
=
kwargs
.
get
(
"
l2_size
"
,
8192
)
)
)
# Ethernet
------------
---------------------------------------------------------------------
# Ethernet
/ Etherbone
---------------------------------------------------------------------
if
with_ethernet
:
if
with_ethernet
or
with_etherbone
:
self
.
submodules
.
ethphy
=
LiteEthPHYRGMII
(
self
.
submodules
.
ethphy
=
LiteEthPHYRGMII
(
clock_pads
=
self
.
platform
.
request
(
"
eth_clocks
"
,
eth_phy
),
clock_pads
=
self
.
platform
.
request
(
"
eth_clocks
"
,
eth_phy
),
pads
=
self
.
platform
.
request
(
"
eth
"
,
eth_phy
))
pads
=
self
.
platform
.
request
(
"
eth
"
,
eth_phy
),
self
.
add_ethernet
(
phy
=
self
.
ethphy
)
tx_delay
=
0e-9
)
if
with_ethernet
:
self
.
add_ethernet
(
phy
=
self
.
ethphy
,
with_timing_constraints
=
False
)
if
with_etherbone
:
self
.
add_etherbone
(
phy
=
self
.
ethphy
,
with_timing_constraints
=
False
)
# Timing Constraints.
platform
.
add_period_constraint
(
platform
.
lookup_request
(
"
eth_clocks
"
,
eth_phy
).
rx
,
1e9
/
125e6
)
platform
.
add_false_path_constraints
(
self
.
crg
.
cd_sys
.
clk
,
platform
.
lookup_request
(
"
eth_clocks
"
,
eth_phy
).
rx
)
# Leds -------------------------------------------------------------------------------------
# Leds -------------------------------------------------------------------------------------
if
with_led_chaser
:
if
with_led_chaser
:
...
@@ -91,15 +97,20 @@ def main():
...
@@ -91,15 +97,20 @@ def main():
parser
.
add_argument
(
"
--build
"
,
action
=
"
store_true
"
,
help
=
"
Build bitstream
"
)
parser
.
add_argument
(
"
--build
"
,
action
=
"
store_true
"
,
help
=
"
Build bitstream
"
)
parser
.
add_argument
(
"
--load
"
,
action
=
"
store_true
"
,
help
=
"
Load bitstream
"
)
parser
.
add_argument
(
"
--load
"
,
action
=
"
store_true
"
,
help
=
"
Load bitstream
"
)
parser
.
add_argument
(
"
--sys-clk-freq
"
,
default
=
75e6
,
help
=
"
System clock frequency (default: 75MHz)
"
)
parser
.
add_argument
(
"
--sys-clk-freq
"
,
default
=
75e6
,
help
=
"
System clock frequency (default: 75MHz)
"
)
parser
.
add_argument
(
"
--with-ethernet
"
,
action
=
"
store_true
"
,
help
=
"
Enable Ethernet support
"
)
ethopts
=
parser
.
add_mutually_exclusive_group
()
parser
.
add_argument
(
"
--eth-phy
"
,
default
=
0
,
type
=
int
,
help
=
"
Ethernet PHY: 0 (default) or 1
"
)
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-phy
"
,
default
=
0
,
type
=
int
,
help
=
"
Ethernet PHY: 0 (default) or 1
"
)
builder_args
(
parser
)
builder_args
(
parser
)
soc_core_args
(
parser
)
soc_core_args
(
parser
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
soc
=
BaseSoC
(
soc
=
BaseSoC
(
sys_clk_freq
=
int
(
float
(
args
.
sys_clk_freq
)),
sys_clk_freq
=
int
(
float
(
args
.
sys_clk_freq
)),
**
soc_core_argdict
(
args
)
with_ethernet
=
args
.
with_ethernet
,
with_etherbone
=
args
.
with_etherbone
,
eth_phy
=
int
(
args
.
eth_phy
),
**
soc_core_argdict
(
args
)
)
)
builder
=
Builder
(
soc
,
**
builder_argdict
(
args
))
builder
=
Builder
(
soc
,
**
builder_argdict
(
args
))
builder
.
build
(
run
=
args
.
build
)
builder
.
build
(
run
=
args
.
build
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment