Skip to content

Commit ace5f7e

Browse files
committed
Modified atlys_video target to include VGAIn module also.
VGAIn modules gives VGA capture functionality to atlys. Also, we are now inheriting BaseSoC class directly instead of MinoSoC class because VGA signals' 3.3V logic-level conflicts with ethernet's 2.5V logic-level. MiniSoC instantiates ethernet modules so we are bypassing it and inheriting BaseSoC class.
1 parent e092d9e commit ace5f7e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

targets/atlys_video.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1+
from gateware.i2c import I2C
2+
from gateware.vga import VGAIn
13
from gateware.hdmi_in import HDMIIn
24
from gateware.hdmi_out import HDMIOut
35

46
from targets.common import *
5-
from targets.atlys_base import default_subtarget as BaseSoC
7+
from targets.atlys_base import BaseSoC as BaseSoC
68

79

810
def CreateVideoMixerSoC(base):
911

1012
class CustomVideoMixerSoC(base):
1113
csr_peripherals = (
14+
"vga_in",
15+
"vga_i2c",
1216
"hdmi_out0",
1317
"hdmi_out1",
1418
"hdmi_in0",
@@ -19,13 +23,20 @@ class CustomVideoMixerSoC(base):
1923
csr_map_update(base.csr_map, csr_peripherals)
2024

2125
interrupt_map = {
26+
"vga_in" : 2,
2227
"hdmi_in0": 3,
2328
"hdmi_in1": 4,
2429
}
2530
interrupt_map.update(base.interrupt_map)
2631

2732
def __init__(self, platform, **kwargs):
2833
base.__init__(self, platform, **kwargs)
34+
vga_pads = platform.request("vga", 0)
35+
self.submodules.vga_i2c = I2C(vga_pads)
36+
self.submodules.vga_in = VGAIn(
37+
vga_pads,
38+
self.sdram.crossbar.get_master(),
39+
fifo_depth=1024)
2940
self.submodules.hdmi_in0 = HDMIIn(
3041
platform.request("hdmi_in", 0),
3142
self.sdram.crossbar.get_master(),

0 commit comments

Comments
 (0)