RM-autogen*.py: Update ROW/COL constants
authorNikhil Devshatwar <nikhil.nd@ti.com>
Thu, 26 Mar 2020 05:49:12 +0000 (11:19 +0530)
committerNikhil Devshatwar <nikhil.nd@ti.com>
Thu, 26 Mar 2020 05:50:39 +0000 (11:20 +0530)
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
respart/RM-autogen-data.py
respart/RM-autogen.py

index a47cf4b0c76a0242f90d3fc446d33afea2607086..3afaf885ab895e549a8ddb32497a976a136f8c31 100755 (executable)
@@ -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 = {}
index bae6f81ce6dfece14ce3cf0d21b1e86a8e55ac1f..ef8fd8386ee4f8f3ee356ff9ff7fe223ece45742 100755 (executable)
@@ -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: