- moduleDict[moduleName]["harvard"] = harvard
- del moduleDefinition[const.MODULE_DEFINITION["module_harvard"]]
- moduleDict[moduleName]["constants"] = moduleDefinition
- moduleDict[moduleName]["enabled"] = False
- return toBeParsed, moduleDict
-
-def loadDefineLists(commentList):
- defineList = {}
- for comment in commentList:
+ module_dict[module_name]["harvard"] = harvard
+ del module_definition[const.MODULE_DEFINITION["module_harvard"]]
+ if const.MODULE_DEFINITION["module_hw"] in module_definition.keys():
+ hw = module_definition[const.MODULE_DEFINITION["module_hw"]]
+ del module_definition[const.MODULE_DEFINITION["module_hw"]]
+ if type(hw) == str:
+ hw = (hw, )
+ module_dict[module_name]["hw"] = hw
+ else:
+ module_dict[module_name]["hw"] = ()
+ if const.MODULE_DEFINITION["module_supports"] in module_definition.keys():
+ supports = module_definition[const.MODULE_DEFINITION["module_supports"]]
+ del module_definition[const.MODULE_DEFINITION["module_supports"]]
+ module_dict[module_name]["supports"] = supports
+ module_dict[module_name]["constants"] = module_definition
+ module_dict[module_name]["enabled"] = False
+ return to_be_parsed, module_dict
+
+def isSupported(module, project):
+ tag_dict = project.info("ALL_CPU_TAGS")
+ module = project.info("MODULES")[module]
+ if "supports" in module:
+ support_string = module["supports"]
+ for tag, value in tag_dict.items():
+ while support_string.find(tag) != -1:
+ support_string = support_string.replace(tag, value)
+ supported = {}
+ try:
+ exec "supported = " + support_string in {}, supported
+ except:
+ raise SupportedException(support_string)
+ return supported["supported"]
+ else:
+ return True
+
+
+def loadDefineLists(comment_list):
+ define_list = {}
+ for comment in comment_list: