configs: Fix MemorySize division
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Sun, 8 Nov 2020 14:38:04 +0000 (15:38 +0100)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Tue, 10 Nov 2020 19:47:49 +0000 (19:47 +0000)
The memory size is expected to be an integer.

Jira: https://gem5.atlassian.net/browse/GEM5-806

Change-Id: I44b2d423a3478d2598950779222151f09970cbd8
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37255
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Srikant Bharadwaj <srikant.bharadwaj@amd.com>
configs/topologies/MeshDirCorners_XY.py
configs/topologies/Mesh_XY.py

index 7d065de5b9aba791c1ca092acc8490e79430c20a..e0aea5212c32cba7eff099ef7651daa1e26fdb08 100644 (file)
@@ -218,6 +218,6 @@ class MeshDirCorners_XY(SimpleTopology):
         for n in numa_nodes:
             if n:
                 FileSystemConfig.register_node(n,
-                    MemorySize(options.mem_size) / num_numa_nodes, i)
+                    MemorySize(options.mem_size) // num_numa_nodes, i)
             i += 1
 
index 64a8506160e11028c4854b6478f8797c2947a6aa..faec1e3c3b70a708cde80b0ede57fa65efc7e96d 100644 (file)
@@ -178,4 +178,4 @@ class Mesh_XY(SimpleTopology):
     def registerTopology(self, options):
         for i in range(options.num_cpus):
             FileSystemConfig.register_node([i],
-                    MemorySize(options.mem_size) / options.num_cpus, i)
+                    MemorySize(options.mem_size) // options.num_cpus, i)