Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 1 file changed
  • 0 comments
  • 1 contributor

Showing 1 changed file with 15 additions and 14 deletions. Show diff stats Hide diff stats

  1. 29  milkymist/framebuffer/__init__.py
29  milkymist/framebuffer/__init__.py
@@ -187,19 +187,20 @@ def get_fragment(self):
187 187
 			],
188 188
 			clkport="clk_write")
189 189
 		t = self.token("dac")
190  
-		return Fragment([
191  
-			asfifo.ins["read_en"].eq(1),
192  
-			
193  
-			self.endpoints["dac"].ack.eq(~asfifo.outs["full"]),
194  
-			asfifo.ins["write_en"].eq(self.endpoints["dac"].stb),
195  
-			asfifo.ins["data_in"].eq(Cat(~t.hsync, ~t.vsync, t.r, t.g, t.b)),
196  
-			
197  
-			self.busy.eq(0),
198  
-			asfifo.ins["rst"].eq(0)
199  
-		], [
200  
-			Cat(self.vga_hsync_n, self.vga_vsync_n, self.vga_r, self.vga_g, self.vga_b).eq(asfifo.outs["data_out"])
201  
-		],
202  
-		instances=[asfifo])
  190
+		return Fragment(
  191
+			[
  192
+				asfifo.ins["read_en"].eq(1),
  193
+				
  194
+				self.endpoints["dac"].ack.eq(~asfifo.outs["full"]),
  195
+				asfifo.ins["write_en"].eq(self.endpoints["dac"].stb),
  196
+				asfifo.ins["data_in"].eq(Cat(~t.hsync, ~t.vsync, t.r, t.g, t.b)),
  197
+				
  198
+				self.busy.eq(0),
  199
+				asfifo.ins["rst"].eq(0)
  200
+			], [
  201
+				Cat(self.vga_hsync_n, self.vga_vsync_n, self.vga_r, self.vga_g, self.vga_b).eq(asfifo.outs["data_out"])
  202
+			],
  203
+			instances=[asfifo])
203 204
 
204 205
 class FakeDMA(Actor):
205 206
 	def __init__(self, port):
@@ -223,7 +224,7 @@ def get_fragment(self):
223 224
 class Framebuffer:
224 225
 	def __init__(self, address, asmiport):
225 226
 		asmi_bits = asmiport.hub.aw
226  
-		alignment_bits = bits_for(asmiport.hub.dw//8)
  227
+		alignment_bits = bits_for(asmiport.hub.dw//8) - 1
227 228
 		length_bits = _hbits + _vbits + 2 - alignment_bits
228 229
 		pack_factor = asmiport.hub.dw//_bpp
229 230
 		packed_pixels = structuring.pack_layout(_pixel_layout, pack_factor)

No commit comments for this range

Something went wrong with that request. Please try again.