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
5091a1b4
Commit
5091a1b4
authored
5 years ago
by
Paul Sajna
Browse files
Options
Downloads
Patches
Plain Diff
WIP sdram module option
parent
3a6a9258
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
litex_boards/community/platforms/de10nano.py
+22
-3
22 additions, 3 deletions
litex_boards/community/platforms/de10nano.py
litex_boards/community/targets/de10nano.py
+37
-3
37 additions, 3 deletions
litex_boards/community/targets/de10nano.py
with
59 additions
and
6 deletions
litex_boards/community/platforms/de10nano.py
+
22
−
3
View file @
5091a1b4
...
...
@@ -32,8 +32,6 @@ _io = [
Subsignal
(
"
rx
"
,
Pins
(
"
AG13
"
),
IOStandard
(
"
3.3-V LVTTL
"
))
# Arduino_IO0
),
(
"
g_sensor
"
,
0
,
Subsignal
(
"
int
"
,
Pins
(
"
A17
"
)),
Subsignal
(
"
sclk
"
,
Pins
(
"
C18
"
)),
...
...
@@ -87,6 +85,26 @@ _io = [
),
]
_mister_sdram_module_io
=
[
(
"
sdram_clock
"
,
0
,
Pins
(
"
AD20
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
(
"
sdram
"
,
0
,
Subsignal
(
"
cke
"
,
Pins
(
"
AG10
"
)),
Subsignal
(
"
a
"
,
Pins
(
"
Y11 AA26 AA13 AA11 W11 Y19 AB23 AC23 AC22 C12 AB26 AD17 D12
"
)),
Subsignal
(
"
dq
"
,
Pins
(
"
E8 V12 D11 W12 AH13 D8 AH14 AF7 AE24 AD23 AE6 AE23 AG14 AD5 AF4 AH3
"
)),
Subsignal
(
"
ba
"
,
Pins
(
"
Y17 AB25
"
)),
Subsignal
(
"
dqmh
"
,
Pins
(
"
AF13
"
)),
Subsignal
(
"
dqml
"
,
Pins
(
"
AG13
"
)),
Subsignal
(
"
cas_n
"
,
Pins
(
"
AA18
"
)),
Subsignal
(
"
cs_n
"
,
Pins
(
"
Y18
"
)),
Subsignal
(
"
ras_n
"
,
Pins
(
"
W14
"
)),
Subsignal
(
"
we_n
"
,
Pins
(
"
AA19
"
)),
IOStandard
(
"
3.3-V LVTTL
"
),
Misc
(
"
SLEWRATE=FAST
"
)
),
]
# Platform -----------------------------------------------------------------------------------------
class
Platform
(
AlteraPlatform
):
...
...
@@ -94,7 +112,8 @@ class Platform(AlteraPlatform):
default_clk_period
=
1e9
/
50e6
def
__init__
(
self
):
AlteraPlatform
.
__init__
(
self
,
"
5CSEBA6U23I7
"
,
_io
)
# TODO uncancerify
AlteraPlatform
.
__init__
(
self
,
"
5CSEBA6U23I7
"
,
_io
+
_mister_sdram_module_io
)
def
create_programmer
(
self
):
return
USBBlaster
()
This diff is collapsed.
Click to expand it.
litex_boards/community/targets/de10nano.py
+
37
−
3
View file @
5091a1b4
...
...
@@ -11,8 +11,11 @@ from migen.genlib.resetsync import AsyncResetSynchronizer
from
litex_boards.platforms
import
de10nano
from
litex.soc.integration.soc_core
import
*
from
litex.soc.integration.soc_sdram
import
*
from
litex.soc.integration.builder
import
*
from
litedram.modules
import
AS4C16M16
from
litedram.phy
import
GENSDRPHY
# CRG ----------------------------------------------------------------------------------------------
...
...
@@ -71,21 +74,52 @@ class BaseSoC(SoCCore):
assert
sys_clk_freq
==
int
(
50e6
)
platform
=
de10nano
.
Platform
()
# SoC
SDRAM
---------------------------------------------------------------------------------
# SoC
Core
---------------------------------------------------------------------------------
SoCCore
.
__init__
(
self
,
platform
,
clk_freq
=
sys_clk_freq
,
**
kwargs
)
# CRG --------------------------------------------------------------------------------------
self
.
submodules
.
crg
=
_CRG
(
platform
)
# SDRAMSoC ------------------------------------------------------------------------------------------
class
SDRAMSoC
(
SoCSDRAM
):
def
__init__
(
self
,
sys_clk_freq
=
int
(
50e6
),
**
kwargs
):
assert
sys_clk_freq
==
int
(
50e6
)
platform
=
de10nano
.
Platform
()
# SoCSDRAM ---------------------------------------------------------------------------------
SoCSDRAM
.
__init__
(
self
,
platform
,
clk_freq
=
sys_clk_freq
,
**
kwargs
)
# CRG --------------------------------------------------------------------------------------
self
.
submodules
.
crg
=
_CRG
(
platform
)
# SDR SDRAM --------------------------------------------------------------------------------
self
.
submodules
.
sdrphy
=
GENSDRPHY
(
platform
.
request
(
"
sdram
"
))
sdram_module
=
AS4C16M16
(
self
.
clk_freq
,
"
1:1
"
)
self
.
register_sdram
(
self
.
sdrphy
,
geom_settings
=
sdram_module
.
geom_settings
,
timing_settings
=
sdram_module
.
timing_settings
)
# Build --------------------------------------------------------------------------------------------
def
main
():
parser
=
argparse
.
ArgumentParser
(
description
=
"
LiteX SoC on DE10 Nano
"
)
parser
.
add_argument
(
"
--with-sdram
"
,
action
=
"
store_true
"
,
help
=
"
enable MiSTer SDRAM expansion board
"
)
builder_args
(
parser
)
soc_core_args
(
parser
)
#soc_core_args(parser) # TODO figure out how to get args for both
# core and sdram SoCs without breaking shit
soc_sdram_args
(
parser
)
args
=
parser
.
parse_args
()
soc
=
None
if
args
.
with_sdram
:
soc
=
SDRAMSoC
(
**
soc_sdram_argdict
(
args
))
else
:
soc
=
BaseSoC
(
**
soc_sdram_argdict
(
args
))
soc
=
BaseSoC
(
**
soc_core_argdict
(
args
))
builder
=
Builder
(
soc
,
**
builder_argdict
(
args
))
builder
.
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