framebuffer: clean shutdown

This commit is contained in:
Sebastien Bourdeauducq 2012-07-12 20:13:31 +02:00
parent b7aec21a47
commit 99b889a551
1 changed files with 10 additions and 4 deletions

View File

@ -69,9 +69,10 @@ class _FrameInitiator(Actor):
def get_fragment(self): def get_fragment(self):
# TODO: make address updates atomic # TODO: make address updates atomic
token = self.token("frame") token = self.token("frame")
stb = self.endpoints["frame"].stb
ack = self.endpoints["frame"].ack
comb = [ comb = [
self.busy.eq(0), self.busy.eq(stb),
self.endpoints["frame"].stb.eq(self._enable.field.r),
token.hres.eq(self._hres.field.r), token.hres.eq(self._hres.field.r),
token.hsync_start.eq(self._hsync_start.field.r), token.hsync_start.eq(self._hsync_start.field.r),
token.hsync_end.eq(self._hsync_end.field.r), token.hsync_end.eq(self._hsync_end.field.r),
@ -80,10 +81,15 @@ class _FrameInitiator(Actor):
token.vsync_start.eq(self._vsync_start.field.r), token.vsync_start.eq(self._vsync_start.field.r),
token.vsync_end.eq(self._vsync_end.field.r), token.vsync_end.eq(self._vsync_end.field.r),
token.vscan.eq(self._vscan.field.r), token.vscan.eq(self._vscan.field.r),
token.base.eq(self._base.field.r[self._alignment_bits:]),
token.length.eq(self._length.field.r[self._alignment_bits:]) token.length.eq(self._length.field.r[self._alignment_bits:])
] ]
return Fragment(comb) sync = [
If(ack | ~stb,
stb.eq(self._enable.field.r),
token.base.eq(self._base.field.r[self._alignment_bits:])
)
]
return Fragment(comb, sync)
class VTG(Actor): class VTG(Actor):
def __init__(self): def __init__(self):