changeset 7d74a97c525f in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=7d74a97c525f
description:
        scripts: Fix to ensure that port connection count is always set

        This patch ensures that the port connection count is set to zero in 
those
        cases when the port is not connected.

diffstat:

 src/python/m5/SimObject.py |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (15 lines):

diff -r 0541a014b811 -r 7d74a97c525f src/python/m5/SimObject.py
--- a/src/python/m5/SimObject.py        Fri Mar 16 07:47:03 2012 -0500
+++ b/src/python/m5/SimObject.py        Mon Mar 19 06:34:02 2012 -0400
@@ -993,9 +993,8 @@
         port_names.sort()
         for port_name in port_names:
             port = self._port_refs.get(port_name, None)
-            if port != None:
-                setattr(cc_params, 'port_' + port_name + '_connection_count',
-                        len(port))
+            setattr(cc_params, 'port_' + port_name + '_connection_count',
+                    len(port) if port != None else 0)
         self._ccParams = cc_params
         return self._ccParams
 
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to