本文整理汇总了Python中fusesoc.coremanager.CoreManager.setup方法的典型用法代码示例。如果您正苦于以下问题:Python CoreManager.setup方法的具体用法?Python CoreManager.setup怎么用?Python CoreManager.setup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fusesoc.coremanager.CoreManager
的用法示例。
在下文中一共展示了CoreManager.setup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: fetch
# 需要导入模块: from fusesoc.coremanager import CoreManager [as 别名]
# 或者: from fusesoc.coremanager.CoreManager import setup [as 别名]
def fetch(args):
core = CoreManager().get_core(args.core)
if core:
cores = CoreManager().get_depends(core.name)
try:
core.setup()
except URLError as e:
pr_err("Problem while fetching '" + core.name + "': " + str(e.reason))
exit(1)
except HTTPError as e:
pr_err("Problem while fetching '" + core.name + "': " + str(e.reason))
exit(1)
for name in cores:
pr_info("Fetching " + name)
core = CoreManager().get_core(name)
try:
core.setup()
except URLError as e:
pr_err("Problem while fetching '" + core.name + "': " + str(e.reason))
exit(1)
except HTTPError as e:
pr_err("Problem while fetching '" + core.name + "': " + str(e.reason))
exit(1)
else:
pr_err("Can't find core '" + args.core + "'")