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
253d8129
Commit
253d8129
authored
4 years ago
by
Florent Kermarrec
Browse files
Options
Downloads
Patches
Plain Diff
nexys4ddr: Integrate simple VideoFrameBuffer.
parent
51a0bbfa
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/nexys4ddr.py
+21
-14
21 additions, 14 deletions
litex_boards/targets/nexys4ddr.py
with
21 additions
and
14 deletions
litex_boards/targets/nexys4ddr.py
+
21
−
14
View file @
253d8129
...
...
@@ -18,7 +18,7 @@ from litex.soc.integration.soc import SoCRegion
from
litex.soc.integration.soc_core
import
*
from
litex.soc.integration.soc_sdram
import
*
from
litex.soc.integration.builder
import
*
from
litex.soc.cores.video
import
VideoVGAPHY
from
litex.soc.cores.video
import
VideoVGAPHY
,
VideoTimingGenerator
,
VideoFrameBuffer
from
litex.soc.cores.led
import
LedChaser
from
litedram.modules
import
MT47H64M16
...
...
@@ -55,7 +55,7 @@ class _CRG(Module):
# BaseSoC ------------------------------------------------------------------------------------------
class
BaseSoC
(
SoCCore
):
def
__init__
(
self
,
sys_clk_freq
=
int
(
75e6
),
with_ethernet
=
False
,
with_etherbone
=
False
,
with_video_terminal
=
False
,
**
kwargs
):
def
__init__
(
self
,
sys_clk_freq
=
int
(
75e6
),
with_ethernet
=
False
,
with_etherbone
=
False
,
with_video_terminal
=
False
,
with_video_framebuffer
=
False
,
**
kwargs
):
platform
=
nexys4ddr
.
Platform
()
# SoCCore ----------------------------------_-----------------------------------------------
...
...
@@ -100,6 +100,11 @@ class BaseSoC(SoCCore):
self
.
submodules
.
videophy
=
VideoVGAPHY
(
platform
.
request
(
"
vga
"
),
clock_domain
=
"
vga
"
)
self
.
add_video_terminal
(
phy
=
self
.
videophy
,
timings
=
"
800x600@60Hz
"
,
clock_domain
=
"
vga
"
)
# Video Framebuffer ------------------------------------------------------------------------
if
with_video_framebuffer
:
self
.
submodules
.
videophy
=
VideoVGAPHY
(
platform
.
request
(
"
vga
"
),
clock_domain
=
"
vga
"
)
self
.
add_video_framebuffer
(
phy
=
self
.
videophy
,
timings
=
"
800x600@60Hz
"
,
clock_domain
=
"
vga
"
)
# Leds -------------------------------------------------------------------------------------
self
.
submodules
.
leds
=
LedChaser
(
pads
=
platform
.
request_all
(
"
user_led
"
),
...
...
@@ -110,25 +115,27 @@ class BaseSoC(SoCCore):
def
main
():
parser
=
argparse
.
ArgumentParser
(
description
=
"
LiteX SoC on Nexys4DDR
"
)
parser
.
add_argument
(
"
--build
"
,
action
=
"
store_true
"
,
help
=
"
Build 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
(
"
--build
"
,
action
=
"
store_true
"
,
help
=
"
Build 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)
"
)
ethopts
=
parser
.
add_mutually_exclusive_group
()
ethopts
.
add_argument
(
"
--with-ethernet
"
,
action
=
"
store_true
"
,
help
=
"
Enable Ethernet support
"
)
ethopts
.
add_argument
(
"
--with-etherbone
"
,
action
=
"
store_true
"
,
help
=
"
Enable Etherbone support
"
)
ethopts
.
add_argument
(
"
--with-ethernet
"
,
action
=
"
store_true
"
,
help
=
"
Enable Ethernet support
"
)
ethopts
.
add_argument
(
"
--with-etherbone
"
,
action
=
"
store_true
"
,
help
=
"
Enable Etherbone support
"
)
sdopts
=
parser
.
add_mutually_exclusive_group
()
sdopts
.
add_argument
(
"
--with-spi-sdcard
"
,
action
=
"
store_true
"
,
help
=
"
Enable SPI-mode SDCard support
"
)
sdopts
.
add_argument
(
"
--with-sdcard
"
,
action
=
"
store_true
"
,
help
=
"
Enable SDCard support
"
)
parser
.
add_argument
(
"
--with-video-terminal
"
,
action
=
"
store_true
"
,
help
=
"
Enable Video Terminal (VGA)
"
)
sdopts
.
add_argument
(
"
--with-spi-sdcard
"
,
action
=
"
store_true
"
,
help
=
"
Enable SPI-mode SDCard support
"
)
sdopts
.
add_argument
(
"
--with-sdcard
"
,
action
=
"
store_true
"
,
help
=
"
Enable SDCard support
"
)
parser
.
add_argument
(
"
--with-video-terminal
"
,
action
=
"
store_true
"
,
help
=
"
Enable Video Terminal (VGA)
"
)
parser
.
add_argument
(
"
--with-video-framebuffer
"
,
action
=
"
store_true
"
,
help
=
"
Enable Video Framebuffer (VGA)
"
)
builder_args
(
parser
)
soc_sdram_args
(
parser
)
args
=
parser
.
parse_args
()
soc
=
BaseSoC
(
sys_clk_freq
=
int
(
float
(
args
.
sys_clk_freq
)),
with_ethernet
=
args
.
with_ethernet
,
with_etherbone
=
args
.
with_etherbone
,
with_video_terminal
=
args
.
with_video_terminal
,
sys_clk_freq
=
int
(
float
(
args
.
sys_clk_freq
)),
with_ethernet
=
args
.
with_ethernet
,
with_etherbone
=
args
.
with_etherbone
,
with_video_terminal
=
args
.
with_video_terminal
,
with_video_framebuffer
=
args
.
with_video_framebuffer
,
**
soc_sdram_argdict
(
args
)
)
if
args
.
with_spi_sdcard
:
...
...
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