Skip to content

Commit

Permalink
Modified atlys_video target to include VGAIn module also.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rohitk-singh committed Aug 7, 2016
1 parent e092d9e commit ace5f7e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion targets/atlys_video.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
from gateware.i2c import I2C
from gateware.vga import VGAIn
from gateware.hdmi_in import HDMIIn
from gateware.hdmi_out import HDMIOut

from targets.common import *
from targets.atlys_base import default_subtarget as BaseSoC
from targets.atlys_base import BaseSoC as BaseSoC


def CreateVideoMixerSoC(base):

class CustomVideoMixerSoC(base):
csr_peripherals = (
"vga_in",
"vga_i2c",
"hdmi_out0",
"hdmi_out1",
"hdmi_in0",
Expand All @@ -19,13 +23,20 @@ class CustomVideoMixerSoC(base):
csr_map_update(base.csr_map, csr_peripherals)

interrupt_map = {
"vga_in" : 2,
"hdmi_in0": 3,
"hdmi_in1": 4,
}
interrupt_map.update(base.interrupt_map)

def __init__(self, platform, **kwargs):
base.__init__(self, platform, **kwargs)
vga_pads = platform.request("vga", 0)
self.submodules.vga_i2c = I2C(vga_pads)
self.submodules.vga_in = VGAIn(
vga_pads,
self.sdram.crossbar.get_master(),
fifo_depth=1024)
self.submodules.hdmi_in0 = HDMIIn(
platform.request("hdmi_in", 0),
self.sdram.crossbar.get_master(),
Expand Down

0 comments on commit ace5f7e

Please sign in to comment.