aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/liberiotable.py
diff options
context:
space:
mode:
authorRobertWalstab <robert.walstab@gmail.com>2020-07-14 10:55:35 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2020-07-20 16:01:03 -0500
commit1d3866bef4e4677b95d3364b94880d7823d2530f (patch)
tree4ab0fe6879f60c4c8c3e007ae92acd11b82fbd2f /mpm/python/usrp_mpm/liberiotable.py
parent46f61951e88d8936814095bf2f8db014b6ff67e6 (diff)
downloaduhd-1d3866bef4e4677b95d3364b94880d7823d2530f.tar.gz
uhd-1d3866bef4e4677b95d3364b94880d7823d2530f.tar.bz2
uhd-1d3866bef4e4677b95d3364b94880d7823d2530f.zip
uhd: remove liberio
Diffstat (limited to 'mpm/python/usrp_mpm/liberiotable.py')
-rw-r--r--mpm/python/usrp_mpm/liberiotable.py60
1 files changed, 0 insertions, 60 deletions
diff --git a/mpm/python/usrp_mpm/liberiotable.py b/mpm/python/usrp_mpm/liberiotable.py
deleted file mode 100644
index d732eedcb..000000000
--- a/mpm/python/usrp_mpm/liberiotable.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# Copyright 2017 Ettus Research, a National Instruments Company
-#
-# SPDX-License-Identifier: GPL-3.0-or-later
-#
-"""
-Liberio DMA dispatcher table control
-"""
-
-from builtins import str
-from builtins import object
-from usrp_mpm.mpmlog import get_logger
-from usrp_mpm.sys_utils.uio import UIO
-
-class LiberioDispatcherTable(object):
- """
- Controls a Liberio DMA dispatcher table.
-
- label -- A label that can be used by udev to find a UIO device
- """
-
- def __init__(self, label):
- self.log = get_logger(label)
- self._regs = UIO(label=label, read_only=False)
- self.poke32 = self._regs.poke32
- self.peek32 = self._regs.peek32
-
- def set_route(self, sid, dma_channel):
- """
- Sets up routing in the Liberio dispatcher. From sid, only the
- destination part is important. After this call, any CHDR packet with the
- appropriate destination address will get routed to `dma_channel`.
-
- sid -- Full SID, but only destination part matters.
- dma_channel -- The DMA channel to which these packets should get routed.
- """
- self.log.debug(
- "Routing SID `{sid}' to DMA channel `{chan}'.".format(
- sid=str(sid), chan=dma_channel
- )
- )
- def poke_and_trace(addr, data):
- " Do a poke32() and log.trace() "
- self.log.trace("Writing to address 0x{:04X}: 0x{:04X}".format(
- addr, data
- ))
- self.poke32(addr, data)
- # Poke reg for destination channel
- try:
- with self._regs:
- poke_and_trace(
- 0 + 4 * sid.dst_ep,
- dma_channel,
- )
- except Exception as ex:
- self.log.error(
- "Unexpected exception while setting route: %s",
- str(ex),
- )
- raise