Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 15 additions and 14 deletions.
  1. +15 −14 milkymist/framebuffer/__init__.py
View
29 milkymist/framebuffer/__init__.py
@@ -187,19 +187,20 @@ def get_fragment(self):
],
clkport="clk_write")
t = self.token("dac")
- return Fragment([
- asfifo.ins["read_en"].eq(1),
-
- self.endpoints["dac"].ack.eq(~asfifo.outs["full"]),
- asfifo.ins["write_en"].eq(self.endpoints["dac"].stb),
- asfifo.ins["data_in"].eq(Cat(~t.hsync, ~t.vsync, t.r, t.g, t.b)),
-
- self.busy.eq(0),
- asfifo.ins["rst"].eq(0)
- ], [
- Cat(self.vga_hsync_n, self.vga_vsync_n, self.vga_r, self.vga_g, self.vga_b).eq(asfifo.outs["data_out"])
- ],
- instances=[asfifo])
+ return Fragment(
+ [
+ asfifo.ins["read_en"].eq(1),
+
+ self.endpoints["dac"].ack.eq(~asfifo.outs["full"]),
+ asfifo.ins["write_en"].eq(self.endpoints["dac"].stb),
+ asfifo.ins["data_in"].eq(Cat(~t.hsync, ~t.vsync, t.r, t.g, t.b)),
+
+ self.busy.eq(0),
+ asfifo.ins["rst"].eq(0)
+ ], [
+ Cat(self.vga_hsync_n, self.vga_vsync_n, self.vga_r, self.vga_g, self.vga_b).eq(asfifo.outs["data_out"])
+ ],
+ instances=[asfifo])
class FakeDMA(Actor):
def __init__(self, port):
@@ -223,7 +224,7 @@ def get_fragment(self):
class Framebuffer:
def __init__(self, address, asmiport):
asmi_bits = asmiport.hub.aw
- alignment_bits = bits_for(asmiport.hub.dw//8)
+ alignment_bits = bits_for(asmiport.hub.dw//8) - 1
length_bits = _hbits + _vbits + 2 - alignment_bits
pack_factor = asmiport.hub.dw//_bpp
packed_pixels = structuring.pack_layout(_pixel_layout, pack_factor)

No commit comments for this range

Something went wrong with that request. Please try again.