Skip to content

Commit 0a29b74

Browse files
author
Sebastien Bourdeauducq
committedJul 1, 2012
framebuffer: fix sync generation
1 parent 6776e22 commit 0a29b74

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed
 

‎milkymist/framebuffer/__init__.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ def get_fragment(self):
109109
generate_en = Signal()
110110
hcounter = Signal(BV(_hbits))
111111
vcounter = Signal(BV(_vbits))
112-
hsync = Signal()
113-
vsync = Signal()
114112

115113
comb = [
116114
active.eq(hactive & vactive),
@@ -133,8 +131,8 @@ def get_fragment(self):
133131

134132
If(hcounter == 0, hactive.eq(1)),
135133
If(hcounter == tp.hres, hactive.eq(0)),
136-
If(hcounter == tp.hsync_start, hsync.eq(1)),
137-
If(hcounter == tp.hsync_end, hsync.eq(0)),
134+
If(hcounter == tp.hsync_start, self.token("dac").hsync.eq(1)),
135+
If(hcounter == tp.hsync_end, self.token("dac").hsync.eq(0)),
138136
If(hcounter == tp.hscan,
139137
hcounter.eq(0),
140138
If(vcounter == tp.vscan,
@@ -146,9 +144,9 @@ def get_fragment(self):
146144

147145
If(vcounter == 0, vactive.eq(1)),
148146
If(vcounter == tp.vres, vactive.eq(0)),
149-
If(vcounter == tp.vsync_start, vsync.eq(1)),
147+
If(vcounter == tp.vsync_start, self.token("dac").vsync.eq(1)),
150148
If(vcounter == tp.vsync_end,
151-
vsync.eq(0),
149+
self.token("dac").vsync.eq(0),
152150
self.endpoints["timing"].ack.eq(1)
153151
)
154152
)

0 commit comments

Comments
 (0)
Please sign in to comment.