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
cae51c0c
Commit
cae51c0c
authored
4 years ago
by
Blake Smith
Browse files
Options
Downloads
Patches
Plain Diff
ULX3S: Make spiflash optionally accessible from the SoC, and bootable
parent
23760e2e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
litex_boards/platforms/ulx3s.py
+15
-0
15 additions, 0 deletions
litex_boards/platforms/ulx3s.py
litex_boards/targets/ulx3s.py
+10
-1
10 additions, 1 deletion
litex_boards/targets/ulx3s.py
with
25 additions
and
1 deletion
litex_boards/platforms/ulx3s.py
+
15
−
0
View file @
cae51c0c
...
...
@@ -81,6 +81,21 @@ _io_common = [
IOStandard
(
"
LVCMOS33
"
)
),
# SPIFlash
(
"
spiflash
"
,
0
,
Subsignal
(
"
cs_n
"
,
Pins
(
"
R2
"
)),
Subsignal
(
"
miso
"
,
Pins
(
"
V2
"
)),
Subsignal
(
"
mosi
"
,
Pins
(
"
W2
"
)),
Subsignal
(
"
wp
"
,
Pins
(
"
Y2
"
)),
Subsignal
(
"
hold
"
,
Pins
(
"
W1
"
)),
IOStandard
(
"
LVCMOS33
"
)
),
(
"
spiflash4x
"
,
0
,
Subsignal
(
"
cs_n
"
,
Pins
(
"
R2
"
)),
Subsignal
(
"
dq
"
,
Pins
(
"
W2
"
,
"
V2
"
,
"
Y2
"
,
"
W1
"
)),
IOStandard
(
"
LVCMOS33
"
)
),
# OLED
(
"
oled_spi
"
,
0
,
Subsignal
(
"
clk
"
,
Pins
(
"
P4
"
)),
...
...
This diff is collapsed.
Click to expand it.
litex_boards/targets/ulx3s.py
+
10
−
1
View file @
cae51c0c
...
...
@@ -81,8 +81,10 @@ class _CRG(Module):
class
BaseSoC
(
SoCCore
):
def
__init__
(
self
,
device
=
"
LFE5U-45F
"
,
revision
=
"
2.0
"
,
toolchain
=
"
trellis
"
,
sys_clk_freq
=
int
(
50e6
),
sdram_module_cls
=
"
MT48LC16M16
"
,
sdram_rate
=
"
1:1
"
,
**
kwargs
):
sys_clk_freq
=
int
(
50e6
),
sdram_module_cls
=
"
MT48LC16M16
"
,
sdram_rate
=
"
1:1
"
,
spiflash
=
False
,
**
kwargs
):
platform
=
ulx3s
.
Platform
(
device
=
device
,
revision
=
revision
,
toolchain
=
toolchain
)
if
spiflash
:
self
.
mem_map
=
{
**
SoCCore
.
mem_map
,
**
{
"
spiflash
"
:
0x80000000
}}
# SoCCore ----------------------------------------------------------------------------------
SoCCore
.
__init__
(
self
,
platform
,
sys_clk_freq
,
...
...
@@ -135,6 +137,8 @@ def main():
parser
.
add_argument
(
"
--revision
"
,
default
=
"
2.0
"
,
help
=
"
Board revision: 2.0 (default) or 1.7
"
)
parser
.
add_argument
(
"
--sys-clk-freq
"
,
default
=
50e6
,
help
=
"
System clock frequency (default: 50MHz)
"
)
parser
.
add_argument
(
"
--sdram-module
"
,
default
=
"
MT48LC16M16
"
,
help
=
"
SDRAM module: MT48LC16M16 (default), AS4C32M16 or AS4C16M16
"
)
parser
.
add_argument
(
"
--with-spiflash
"
,
action
=
"
store_true
"
,
help
=
"
Make the SPI Flash accessible from the SoC
"
)
parser
.
add_argument
(
"
--flash-boot-adr
"
,
type
=
lambda
x
:
int
(
x
,
0
),
default
=
None
,
help
=
"
Flash boot address
"
)
parser
.
add_argument
(
"
--with-spi-sdcard
"
,
action
=
"
store_true
"
,
help
=
"
Enable SPI-mode SDCard support
"
)
parser
.
add_argument
(
"
--with-sdcard
"
,
action
=
"
store_true
"
,
help
=
"
Enable SDCard support
"
)
parser
.
add_argument
(
"
--with-oled
"
,
action
=
"
store_true
"
,
help
=
"
Enable SDD1331 OLED support
"
)
...
...
@@ -151,6 +155,7 @@ def main():
sys_clk_freq
=
int
(
float
(
args
.
sys_clk_freq
)),
sdram_module_cls
=
args
.
sdram_module
,
sdram_rate
=
args
.
sdram_rate
,
spiflash
=
args
.
with_spiflash
,
**
soc_sdram_argdict
(
args
))
assert
not
(
args
.
with_spi_sdcard
and
args
.
with_sdcard
)
if
args
.
with_spi_sdcard
:
...
...
@@ -159,6 +164,10 @@ def main():
soc
.
add_sdcard
()
if
args
.
with_oled
:
soc
.
add_oled
()
if
args
.
with_spiflash
:
soc
.
add_spi_flash
(
mode
=
"
1x
"
,
dummy_cycles
=
8
)
if
args
.
flash_boot_adr
:
soc
.
add_constant
(
"
FLASH_BOOT_ADDRESS
"
,
args
.
flash_boot_adr
)
builder
=
Builder
(
soc
,
**
builder_argdict
(
args
))
builder_kargs
=
trellis_argdict
(
args
)
if
args
.
toolchain
==
"
trellis
"
else
{}
...
...
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