Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 2 files changed
  • 0 comments
  • 1 contributor
1  milkymist/dvisampler/edid.py
@@ -186,3 +186,4 @@ def __init__(self, pads, default=_default_edid):
186 186
 
187 187
 		for state in fsm.actions.keys():
188 188
 			fsm.act(state, If(start, NextState("RCV_ADDRESS")))
  189
+			fsm.act(state, If(~self._r_hpd_en.storage, NextState("WAIT_START")))
30  top.py
@@ -9,8 +9,7 @@
9 9
 from mibuild.generic_platform import ConstraintError
10 10
 
11 11
 from milkymist import mxcrg, lm32, norflash, uart, s6ddrphy, dfii, lasmicon, \
12  
-	identifier, timer, minimac3, framebuffer, dvisampler, \
13  
-	counteradc, gpio, memtest
  12
+	identifier, timer, minimac3, framebuffer, dvisampler, gpio, memtest
14 13
 from milkymist.cif import get_macros
15 14
 
16 15
 version = get_macros("common/version.h")["VERSION"][1:-1]
@@ -106,10 +105,21 @@ def __init__(self, platform, platform_name, with_memtest):
106 105
 		self.submodules.lasmicon = lasmicon.LASMIcon(self.ddrphy.phy_settings, sdram_geom, sdram_timing)
107 106
 		self.submodules.dficon1 = dfi.Interconnect(self.lasmicon.dfi, self.dfii.slave)
108 107
 
109  
-		n_lasmims = 7 if with_memtest else 5
  108
+		n_lasmims = 1 # wishbone bridging
  109
+		if platform_name == "mixxeo":
  110
+			n_lasmims += 4 # framebuffer (2-channel mixing) + 2 DVI samplers
  111
+		if platform_name == "m1":
  112
+			n_lasmims += 1 # framebuffer (single channel)
  113
+		if with_memtest:
  114
+			n_lasmims += 2 # writer + reader
110 115
 		self.submodules.lasmixbar = lasmibus.Crossbar([self.lasmicon.lasmic], n_lasmims, self.lasmicon.nrowbits)
  116
+
111 117
 		lasmims = list(self.lasmixbar.masters)
112  
-		lasmim_wb, lasmim_fb0, lasmim_fb1, lasmim_dvi0, lasmim_dvi1 = (lasmims.pop() for i in range(5))
  118
+		lasmim_wb = lasmims.pop()
  119
+		if platform_name == "mixxeo":
  120
+			lasmim_fb0, lasmim_fb1, lasmim_dvi0, lasmim_dvi1 = (lasmims.pop() for i in range(4))
  121
+		if platform_name == "m1":
  122
+			lasmim_fb = lasmims.pop()
113 123
 		if with_memtest:
114 124
 			lasmim_mtw, lasmim_mtr = lasmims.pop(), lasmims.pop()
115 125
 		assert(not lasmims)
@@ -150,15 +160,15 @@ def __init__(self, platform, platform_name, with_memtest):
150 160
 		self.submodules.uart = uart.UART(platform.request("serial"), clk_freq, baud=115200)
151 161
 		self.submodules.identifier = identifier.Identifier(0x4D31, version, int(clk_freq))
152 162
 		self.submodules.timer0 = timer.Timer()
153  
-		self.submodules.fb = framebuffer.MixFramebuffer(platform.request("vga"), lasmim_fb0, lasmim_fb1)
154  
-		self.submodules.dvisampler0 = dvisampler.DVISampler(platform.request("dvi_in", 0), lasmim_dvi0)
155  
-		self.submodules.dvisampler1 = dvisampler.DVISampler(platform.request("dvi_in", 1), lasmim_dvi1)
  163
+		if platform_name == "mixxeo":
  164
+			self.submodules.leds = gpio.GPIOOut(platform.request("user_led"))
  165
+			self.submodules.fb = framebuffer.MixFramebuffer(platform.request("vga"), lasmim_fb0, lasmim_fb1)
  166
+			self.submodules.dvisampler0 = dvisampler.DVISampler(platform.request("dvi_in", 2), lasmim_dvi0)
  167
+			self.submodules.dvisampler1 = dvisampler.DVISampler(platform.request("dvi_in", 3), lasmim_dvi1)
156 168
 		if platform_name == "m1":
157  
-			pots_pads = platform.request("dvi_pots")
158  
-			self.submodules.pots = counteradc.CounterADC(pots_pads.charge,
159  
-				[pots_pads.blackout, pots_pads.crossfade])
160 169
 			self.submodules.buttons = gpio.GPIOIn(Cat(platform.request("user_btn", 0), platform.request("user_btn", 2)))
161 170
 			self.submodules.leds = gpio.GPIOOut(Cat(*[platform.request("user_led", i) for i in range(2)]))
  171
+			self.submodules.fb = framebuffer.Framebuffer(platform.request("vga"), lasmim_fb)
162 172
 		if with_memtest:
163 173
 			self.submodules.memtest_w = memtest.MemtestWriter(lasmim_mtw)
164 174
 			self.submodules.memtest_r = memtest.MemtestReader(lasmim_mtr)

No commit comments for this range

Something went wrong with that request. Please try again.