Ensure rom_data dir exists

Otherwise, copying the ROM data fail as we're trying to copy from `macros/rom_configs/example_1kbyte.bin` -> `macros/sky130_rom_1kbyte/rom_configs/example_1kbyte.bin`, and the destination directory does not exist.
This commit is contained in:
Uri Shaked 2024-03-26 15:07:13 +02:00 committed by GitHub
parent b6a6f12642
commit 8e7f523ed8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -152,6 +152,7 @@ class rom():
start_time = datetime.datetime.now()
from shutil import copyfile
copyfile(OPTS.config_file, OPTS.output_path + OPTS.output_name + '.py')
os.makedirs(os.path.dirname(OPTS.output_path + self.rom_data), exist_ok=True)
copyfile(self.rom_data, OPTS.output_path + self.rom_data)
debug.print_raw("Config: Writing to {0}".format(OPTS.output_path + OPTS.output_name + '.py'))
print_time("Config", datetime.datetime.now(), start_time)