liteeth: fix example_designs generation

This commit is contained in:
Florent Kermarrec 2015-02-26 10:23:38 +01:00
parent 00862a383c
commit 02b3f51382
2 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@ from migen.bank.description import CSRStatus
from mibuild import tools from mibuild import tools
from mibuild.xilinx_common import * from mibuild.xilinx_common import *
sys.path.append("../../../") # Temporary
from misoclib.liteeth.common import * from misoclib.liteeth.common import *
def get_csr_csv(regions): def get_csr_csv(regions):
@ -60,7 +61,7 @@ if __name__ == "__main__":
args = _get_args() args = _get_args()
# create top-level Core object # create top-level Core object
target_module = _import("targets", args.target) target_module = _import("misoclib.liteeth.example_designs.targets", args.target)
if args.sub_target: if args.sub_target:
top_class = getattr(target_module, args.sub_target) top_class = getattr(target_module, args.sub_target)
else: else:
@ -70,7 +71,7 @@ if __name__ == "__main__":
platform_name = top_class.default_platform platform_name = top_class.default_platform
else: else:
platform_name = args.platform platform_name = args.platform
platform_module = _import("platforms", platform_name) platform_module = _import("misoclib.liteeth.example_designs.platforms", platform_name)
platform_kwargs = dict((k, autotype(v)) for k, v in args.platform_option) platform_kwargs = dict((k, autotype(v)) for k, v in args.platform_option)
platform = platform_module.Platform(**platform_kwargs) platform = platform_module.Platform(**platform_kwargs)