Skip to content

Commit 65d1a8e

Browse files
committed
fix arguments for mts functions
1 parent b73ca0b commit 65d1a8e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/rfdc.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ def set_coarse_delay(self, ntile, nblk, converter_type, coarse_delay, event_sour
770770
>>>> rfdc.set_coarse_delay(0, 0, rfdc.ADC_TILE, 12, rfdc.EVNT_SRC_TILE)
771771
{'CoarseDelay': 12, 'EventSource': 2}
772772
# trigger update event to apply
773-
rfdc.update_event(0, 0, rfdc.EVENT_COARSE_DELAY)
773+
rfdc.update_event(0, 0, rfdc.ADC_TILE, rfdc.EVENT_COARSE_DLY)
774774
"""
775775
t = self.parent.transport
776776

@@ -1798,11 +1798,13 @@ def run_mts(self, converter_type, tile_mask=15, target_latency=-1):
17981798

17991799
return True
18001800

1801-
def get_mts_latency(self, ntile):
1801+
def get_mts_latency(self, converter_type, ntile):
18021802
"""
1803-
Get the adc calibration freeze status for enabled tile "ntile" and block index "nblk". If a tile/block
1804-
pair is disabled an empty dictionary is returned and nothing is done.
1803+
Get the adc or dac mts latency for enabled tile "ntile" and block index "nblk". If a tile/block pair is
1804+
disabled or, no mts information is available, an empty dictionary is returned and nothing is done.
18051805
1806+
:param converter_type: Represents the target converter type, "adc" or "dac"
1807+
:type converter_type: str
18061808
:param ntile: Tile index of target adc tile to get mts latency, in the range (0-3)
18071809
:type ntile: int
18081810
@@ -1813,14 +1815,14 @@ def get_mts_latency(self, ntile):
18131815
18141816
Examples
18151817
----------
1816-
# get the calibration freeze status for ADC 00
1818+
# get the mts latency for ADC 00
18171819
>>>> ntile=0
1818-
>>>> rfdc.get_mts_latency(ntile)
1820+
>>>> rfdc.get_mts_latency(rfdc.ADC_TILE, ntile)
18191821
{'Latency': 160, 'DelayOffset': 2, 'DecFactor': 4}
18201822
"""
18211823
t = self.parent.transport
18221824

1823-
args = (ntile,)
1825+
args = ("adc" if converter_type == self.ADC_TILE else "dac",ntile)
18241826
reply, informs = t.katcprequest(name='rfdc-mts-tile-latency', request_timeout=t._timeout, request_args=args)
18251827

18261828
mts_latency = {}

0 commit comments

Comments
 (0)