summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c35de3e)
raw | patch | inline | side by side (parent: c35de3e)
author | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Wed, 18 Mar 2020 13:14:59 +0000 (18:44 +0530) | ||
committer | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Wed, 18 Mar 2020 13:15:01 +0000 (18:45 +0530) |
Introduce a new command line option --allow_all
when passed, the script ignores all the partitioning
and generates a boardconfig where are resources are
assigned with HOST_ID_ALL.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
when passed, the script ignores all the partitioning
and generates a boardconfig where are resources are
assigned with HOST_ID_ALL.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
respart/RM-autogen.py | patch | blob | history |
diff --git a/respart/RM-autogen.py b/respart/RM-autogen.py
index dbe8fe01f47ed17e730f15f8761587087df4a207..c2fdecfdfb40ac1c83cff833069f5e1ab15c41f5 100755 (executable)
--- a/respart/RM-autogen.py
+++ b/respart/RM-autogen.py
COL_RES_TYPE = 1
COL_SUB_TYPE = 2
COL_RES_FIELD = 3
+COL_RES_COUNT = 5
COL_RES_START = 6
COL_HOST_START = 7
comment = sheet.cell_value(res, COL_COMMENT)
restype = sheet.cell_value(res, COL_RES_TYPE)
subtype = sheet.cell_value(res, COL_SUB_TYPE)
+ count = sheet.cell_value(res, COL_RES_COUNT)
start = sheet.cell_value(res, COL_RES_START)
- if (restype == '' or subtype == '' or start == ''):
+ if (restype == '' or subtype == '' or start == '' or count == ''):
continue
start = int(start)
+ count = int(count)
comments[(restype, subtype)] = comment
+ if (args.allow_all):
+ rmcfg.append((start, count, restype, subtype, "HOST_ID_ALL"))
+ continue
+
for host in range(COL_HOST_START, sheet.ncols):
#print ("##v(%d, %d) = '%s'" % (res, host, sheet.cell_value(res, host)))
shared_host = pair[1]
rmcfg.append((start, num, restype, subtype, shared_host))
-
start += int(num)
+
return rmcfg
def print_rmcfg(rmcfg):
action='append', nargs=2, metavar=('HOST_ID_A', 'HOST_ID_B'),
help='Share resource with HOST_ID_A for HOST_ID_B')
+parser.add_argument('--allow_all', dest='allow_all',
+ action='store_true',
+ help='Create the minimal boardconfig to allow all hosts to access all resources')
+
parser.add_argument('workbook', help='Input excel sheet with assigned resources')
args = parser.parse_args()