rtio: fix RTIO/DRTIO timestamp resolution discrepancy

This commit is contained in:
Sebastien Bourdeauducq 2016-11-28 15:01:46 +08:00
parent 9fdd29ddae
commit 85f2467e2c
2 changed files with 5 additions and 12 deletions

View File

@ -265,17 +265,10 @@ class LogChannel:
class Core(Module):
def __init__(self, channels, guard_io_cycles=20):
data_width = max(rtlink.get_data_width(c.interface)
for c in channels)
address_width = max(rtlink.get_address_width(c.interface)
for c in channels)
fine_ts_width = max(rtlink.get_fine_ts_width(c.interface)
for c in channels)
self.data_width = data_width
self.address_width = address_width
self.fine_ts_width = fine_ts_width
def __init__(self, channels, fine_ts_width=None, guard_io_cycles=20):
if fine_ts_width is None:
fine_ts_width = max(rtlink.get_fine_ts_width(c.interface)
for c in channels)
self.cri = cri.Interface()
self.comb += self.cri.arb_gnt.eq(1)

View File

@ -54,7 +54,7 @@ class Master(MiniSoC, AMPSoC):
phy = ttl_simple.Inout(platform.request(sma))
self.submodules += phy
rtio_channels.append(rtio.Channel.from_phy(phy))
self.submodules.rtio_core = rtio.Core(rtio_channels)
self.submodules.rtio_core = rtio.Core(rtio_channels, 4)
self.submodules.cridec = rtio.CRIDecoder([self.drtio.cri, self.rtio_core.cri])
self.submodules.rtio = rtio.KernelInitiator(self.cridec.master)