aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/topology.py
diff options
context:
space:
mode:
authorxinfengx <xinfengx.zhao@intel.com>2023-09-21 08:39:39 +0000
committerPeter Mikus <peter.mikus@protonmail.ch>2024-02-06 10:52:14 +0000
commit27668008077fd69b29b83f8e3e736b2dc67df361 (patch)
tree3ef06e5ffa8fa9e0e22102930fbf3469cf1d3770 /resources/libraries/python/topology.py
parent9b72b5f8018de7863903a7e3b3b8a914a29feb3c (diff)
Add memif with DMA test suites
Change-Id: I8c27b5956c0c26bb2de48321675e285ed961412f Signed-off-by: xinfengx <xinfengx.zhao@intel.com>
Diffstat (limited to 'resources/libraries/python/topology.py')
-rw-r--r--resources/libraries/python/topology.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/resources/libraries/python/topology.py b/resources/libraries/python/topology.py
index 7e53a4ba60..22ed3666c3 100644
--- a/resources/libraries/python/topology.py
+++ b/resources/libraries/python/topology.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2022 Cisco and/or its affiliates.
+# Copyright (c) 2024 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -1087,6 +1087,19 @@ class Topology:
except KeyError:
return None
+ def get_bus(node):
+ """Return bus configuration of the node.
+
+ :param node: Node created from topology.
+ :type node: dict
+ :returns: bus configuration string.
+ :rtype: str
+ """
+ try:
+ return node[u"bus"]
+ except KeyError:
+ return None
+
@staticmethod
def get_uio_driver(node):
"""Return uio-driver configuration of the node.