summaryrefslogtreecommitdiff
path: root/grc/base/Block.py
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-07-15 15:15:41 -0400
committerTom Rondeau <tom@trondeau.com>2013-07-17 18:04:15 -0400
commit2a0b62dd7d73ad595d60fe2d2ede96befe9c65e6 (patch)
treebad9364f4ac617d35e6669aacc4e0153c81fe722 /grc/base/Block.py
parentb2cfe7d00a5c89670d16fd491af51ea3d8a2373e (diff)
runtime: added support for setting thread affinity to all blocks under a hier_block2.
grc: added field to all blocks to set the thread affinity to a list of processors. docs: updated docs on thread affinity for new features. Conflicts: grc/base/Block.py grc/python/flow_graph.tmpl
Diffstat (limited to 'grc/base/Block.py')
-rw-r--r--grc/base/Block.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/grc/base/Block.py b/grc/base/Block.py
index 30b0ca2f60..453023e456 100644
--- a/grc/base/Block.py
+++ b/grc/base/Block.py
@@ -125,7 +125,16 @@ class Block(Element):
self.get_sinks().append(sink)
self.back_ofthe_bus(self.get_sinks())
self.current_bus_structure = {'source':'','sink':''};
-
+
+ if len(sources) or len(sinks):
+ self.get_params().append(self.get_parent().get_parent().Param(
+ block=self,
+ n=odict({'name': 'Core Affinity',
+ 'key': 'affinity',
+ 'type': 'int_vector',
+ 'hide': 'part',
+ })
+ ))
def back_ofthe_bus(self, portlist):
portlist.sort(key=lambda a: a.get_type() == 'bus');
@@ -374,7 +383,6 @@ class Block(Element):
elif len(bussinks) > 0:
self.bussify({'name':'bus','type':'bus'}, 'sink')
self.bussify({'name':'bus','type':'bus'}, 'sink')
-
bussrcs = n.findall('bus_source');
if len(bussrcs) > 0 and not self._bussify_source:
self.bussify({'name':'bus','type':'bus'}, 'source')