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
465a95d2
Commit
465a95d2
authored
Mar 03, 2021
by
Florent Kermarrec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
icebreaker/nexys4ddr: Use new LiteXSoC's add_video_terminal method to add the Video Terminal.
parent
3af8ec0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
35 deletions
+7
-35
litex_boards/targets/icebreaker.py
litex_boards/targets/icebreaker.py
+4
-16
litex_boards/targets/nexys4ddr.py
litex_boards/targets/nexys4ddr.py
+3
-19
No files found.
litex_boards/targets/icebreaker.py
View file @
465a95d2
...
...
@@ -31,8 +31,8 @@ from litex.soc.cores.clock import iCE40PLL
from
litex.soc.integration.soc_core
import
*
from
litex.soc.integration.soc
import
SoCRegion
from
litex.soc.integration.builder
import
*
from
litex.soc.cores.video
import
VideoDVIPHY
from
litex.soc.cores.led
import
LedChaser
from
litex.soc.cores.video
import
*
kB
=
1024
mB
=
1024
*
kB
...
...
@@ -110,21 +110,9 @@ class BaseSoC(SoCCore):
# Video Terminal ---------------------------------------------------------------------------
if
with_video_terminal
:
self
.
platform
.
add_extension
(
icebreaker
.
dvi_pmod
)
self
.
submodules
.
vtg
=
vtg
=
VideoTimingGenerator
(
default_video_timings
=
"800x600@60Hz"
)
self
.
add_csr
(
"vtg"
)
#self.submodules.vgen = vgen = ColorBarsPattern()
self
.
submodules
.
vgen
=
vgen
=
VideoTerminal
(
hres
=
800
,
vres
=
600
)
self
.
submodules
.
vphy
=
vphy
=
VideoDVIPHY
(
platform
.
request
(
"dvi"
),
clock_domain
=
"sys"
)
self
.
comb
+=
[
# Connect UART to Video Terminal.
vgen
.
uart_sink
.
valid
.
eq
(
self
.
uart
.
source
.
valid
&
self
.
uart
.
source
.
ready
),
vgen
.
uart_sink
.
data
.
eq
(
self
.
uart
.
source
.
data
),
# Connect Video Timing Generator to Video Terminal.
vtg
.
source
.
connect
(
vgen
.
vtg_sink
),
# Connect VideoTerminal to VideoDVIPHY.
vgen
.
source
.
connect
(
vphy
.
sink
),
]
platform
.
add_extension
(
icebreaker
.
dvi_pmod
)
self
.
submodules
.
videophy
=
VideoDVIPHY
(
platform
.
request
(
"dvi"
),
clock_domain
=
"sys"
)
self
.
add_video_terminal
(
phy
=
self
.
videophy
,
timings
=
"800x600@60Hz"
,
clock_domain
=
"sys"
)
# Leds -------------------------------------------------------------------------------------
self
.
submodules
.
leds
=
LedChaser
(
...
...
litex_boards/targets/nexys4ddr.py
View file @
465a95d2
...
...
@@ -18,6 +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.led
import
LedChaser
from
litedram.modules
import
MT47H64M16
...
...
@@ -25,8 +26,6 @@ from litedram.phy import s7ddrphy
from
liteeth.phy.rmii
import
LiteEthPHYRMII
from
litex.soc.cores.video
import
*
# CRG ----------------------------------------------------------------------------------------------
class
_CRG
(
Module
):
...
...
@@ -98,23 +97,8 @@ class BaseSoC(SoCCore):
# Video Terminal ---------------------------------------------------------------------------
if
with_video_terminal
:
self
.
submodules
.
vtg
=
vtg
=
ClockDomainsRenamer
(
"vga"
)(
VideoTimingGenerator
(
default_video_timings
=
"800x600@60Hz"
))
self
.
add_csr
(
"vtg"
)
#self.submodules.vgen = vgen = ClockDomainsRenamer("vga")(ColorBarsPattern())
self
.
submodules
.
vgen
=
vgen
=
ClockDomainsRenamer
(
"vga"
)(
VideoTerminal
(
hres
=
800
,
vres
=
600
))
self
.
submodules
.
vphy
=
vphy
=
VideoVGAPHY
(
platform
.
request
(
"vga"
),
clock_domain
=
"vga"
)
from
litex.soc.interconnect
import
stream
self
.
submodules
.
uart_cdc
=
stream
.
ClockDomainCrossing
([(
"data"
,
8
)],
cd_from
=
"sys"
,
cd_to
=
"vga"
)
self
.
comb
+=
[
# Connect UART to Video Terminal.
self
.
uart_cdc
.
sink
.
valid
.
eq
(
self
.
uart
.
source
.
valid
&
self
.
uart
.
source
.
ready
),
self
.
uart_cdc
.
sink
.
data
.
eq
(
self
.
uart
.
source
.
data
),
self
.
uart_cdc
.
source
.
connect
(
vgen
.
uart_sink
),
# Connect Video Timing Generator to Video Terminal.
vtg
.
source
.
connect
(
vgen
.
vtg_sink
),
# Connect VideoTerminal to VideoDVIPHY.
vgen
.
source
.
connect
(
vphy
.
sink
),
]
self
.
submodules
.
videophy
=
VideoVGAPHY
(
platform
.
request
(
"vga"
),
clock_domain
=
"vga"
)
self
.
add_video_terminal
(
phy
=
self
.
videophy
,
timings
=
"800x600@60Hz"
,
clock_domain
=
"vga"
)
# Leds -------------------------------------------------------------------------------------
self
.
submodules
.
leds
=
LedChaser
(
...
...
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