From b1de8ee4d9f4f6a2d70656c425f448a4f6b949bc Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Wed, 6 Sep 2017 12:52:47 +0100 Subject: [PATCH 1/2] platforms/juno: Add more info to juno.json This info is derived by the TestEnv when connected to the target. But when not connected, it can still be useful for passing to the Trace class for analysis. Therefore provide it in a JSON file for convenience. --- libs/utils/platforms/juno.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libs/utils/platforms/juno.json b/libs/utils/platforms/juno.json index d8a427000..053831990 100644 --- a/libs/utils/platforms/juno.json +++ b/libs/utils/platforms/juno.json @@ -1,5 +1,16 @@ { - // JUNO Energy Model + "abi": "arm64", + "clusters": { + "big": [1, 2], + "little": [0, 3, 4, 5]}, + "cpus_count": 6, + "freqs": { + "big": [450000, 625000, 800000, 950000, 1100000], + "little": [450000, 575000, 700000, 775000, 850000] + }, + "topology": [ + [0, 3, 4, 5], [1, 2] + ], "nrg_model" : { "little" : { "cpu" : { -- GitLab From 638389dc8c3c0d39271018df45fa03f8da54b513 Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Wed, 6 Sep 2017 13:05:32 +0100 Subject: [PATCH 2/2] libs/utils/platforms: Automatically parse platform JSON files This means you can do, for example: from libs.utils.platforms import juno Instead of having to manually load the JSON. This is useful for analysing traces when not connected to a taret (i.e. having no TestEnv object). --- libs/utils/platforms/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libs/utils/platforms/__init__.py b/libs/utils/platforms/__init__.py index e69de29bb..b6558e37e 100644 --- a/libs/utils/platforms/__init__.py +++ b/libs/utils/platforms/__init__.py @@ -0,0 +1,12 @@ +import json +import os +from conf import JsonConf + +# Add identifiers for each of the platforms we have JSON descriptors for +this_dir = os.path.dirname(__file__) +for file_name in os.listdir(this_dir): + name, ext = os.path.splitext(file_name) + if ext == '.json': + platform = JsonConf(os.path.join(this_dir, file_name)).load() + identifier = name.replace('-', '_') + globals()[identifier] = platform -- GitLab