From 016ed6e8c1f86870b6cff21626dcdb509f998ffa Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Sat, 22 Jul 2023 22:51:54 +0300 Subject: [PATCH] fix: multi tile projects not placed correctly --- caravel.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/caravel.py b/caravel.py index 4b72312..bdc6eb7 100644 --- a/caravel.py +++ b/caravel.py @@ -39,8 +39,14 @@ class CaravelConfig(): configured_macros = set(map(lambda mod: mod['name'], module_config['modules'])) logging.info(f"found {len(configured_macros)} preconfigured macros: {configured_macros}") for project in self.projects: + tiles = project.yaml['project']['tiles'] + width, height = map(int, tiles.split('x')) if project.unprefixed_name not in configured_macros: - module_config['modules'].append({'name': project.unprefixed_name}) + module_config['modules'].append({ + 'name': project.unprefixed_name, + 'width': width, + 'height': height, + }) with open('tt-multiplexer/cfg/modules.yaml', 'w') as mux_modules_file: yaml.dump(module_config, mux_modules_file)