lite*: finish ModuleTransformer adaptations (need to be tested on board)

This commit is contained in:
Florent Kermarrec 2015-04-08 23:27:22 +02:00
parent 3a2b677f85
commit 03aa972bb6
3 changed files with 10 additions and 10 deletions

View File

@ -29,15 +29,15 @@ class BufferizeEndpoints(ModuleTransformer):
# add buffer on sinks
for name, sink in sinks.items():
buf = Buffer(sink.description)
self.submodules += buf
submodule.submodules += buf
setattr(self, name, buf.d)
self.comb += Record.connect(buf.q, sink)
submodule.comb += Record.connect(buf.q, sink)
# add buffer on sources
for name, source in sources.items():
buf = Buffer(source.description)
self.submodules += buf
self.comb += Record.connect(source, buf.d)
submodule.submodules += buf
submodule.comb += Record.connect(source, buf.d)
setattr(self, name, buf.q)
class EndpointPacketStatus(Module):

View File

@ -270,15 +270,15 @@ class BufferizeEndpoints(ModuleTransformer):
# add buffer on sinks
for name, sink in sinks.items():
buf = Buffer(sink.description)
self.submodules += buf
submodule.submodules += buf
setattr(self, name, buf.d)
self.comb += Record.connect(buf.q, sink)
submodule.comb += Record.connect(buf.q, sink)
# add buffer on sources
for name, source in sources.items():
buf = Buffer(source.description)
self.submodules += buf
self.comb += Record.connect(source, buf.d)
submodule.submodules += buf
submodule.comb += Record.connect(source, buf.d)
setattr(self, name, buf.q)
class EndpointPacketStatus(Module):

View File

@ -35,7 +35,7 @@ class LiteSATALinkTX(Module):
# inserter CONT and scrambled data between
# CONT and next primitive
cont = BufferizeEndpoints(LiteSATACONTInserter(phy_description(32)), "source")
cont = BufferizeEndpoints("source")(LiteSATACONTInserter(phy_description(32)))
self.submodules += cont
# datas / primitives mux
@ -121,7 +121,7 @@ class LiteSATALinkRX(Module):
self.submodules += fsm
# CONT remover
cont = BufferizeEndpoints(LiteSATACONTRemover(phy_description(32)), "source")
cont = BufferizeEndpoints("source")(LiteSATACONTRemover(phy_description(32)))
self.submodules += cont
self.comb += Record.connect(phy.source, cont.sink)