From: Nikhil Devshatwar Date: Thu, 26 Mar 2020 05:49:12 +0000 (+0530) Subject: RM-autogen*.py: Update ROW/COL constants X-Git-Url: https://git.ti.com/gitweb?p=glsdk%2Fhost-tools.git;a=commitdiff_plain;h=4cf897cc8f93575e4468afd25692877d1b257f83 RM-autogen*.py: Update ROW/COL constants Signed-off-by: Nikhil Devshatwar --- diff --git a/respart/RM-autogen-data.py b/respart/RM-autogen-data.py index a47cf4b..3afaf88 100755 --- a/respart/RM-autogen-data.py +++ b/respart/RM-autogen-data.py @@ -7,13 +7,12 @@ from xlwt.Utils import rowcol_to_cell COL_COMMENT = 0 COL_RES_TYPE = 1 COL_SUB_TYPE = 2 -COL_RES_FIELD = 3 -COL_RES_COUNT = 5 -COL_RES_START = 6 -COL_HOST_START = 7 +COL_RES_COUNT = 3 +COL_RES_START = 4 +COL_HOST_START = 5 ROW_HOST_ID = 0 -ROW_RES_START = 2 +ROW_RES_START = 1 dict_dev = {} dict_subtype = {} diff --git a/respart/RM-autogen.py b/respart/RM-autogen.py index bae6f81..ef8fd83 100755 --- a/respart/RM-autogen.py +++ b/respart/RM-autogen.py @@ -13,14 +13,15 @@ import re COL_COMMENT = 0 COL_RES_TYPE = 1 COL_SUB_TYPE = 2 -COL_RES_COUNT = 5 -COL_RES_START = 6 -COL_HOST_START = 7 +COL_RES_COUNT = 3 +COL_RES_START = 4 +COL_HOST_START = 5 ROW_HOST_ID = 0 -ROW_RES_START = 2 +ROW_RES_START = 1 comments = {} +resasg = {} def gen_rmcfg_data(sharing): global comments @@ -54,6 +55,12 @@ def gen_rmcfg_data(sharing): continue num = int(num) + key = (restype, subtype, host_id) + value = (start, num) + if (key in resasg): + resasg[key].append(value) + else: + resasg[key] = [value] rmcfg.append((start, num, restype, subtype, host_id)) for pair in sharing: