build/vhd2v_converter: Create build_dir if not existing.

This commit is contained in:
Florent Kermarrec 2024-11-28 13:32:34 +01:00
parent 76829aa6c9
commit 30aeaf544a
1 changed files with 5 additions and 0 deletions

View File

@ -152,6 +152,11 @@ class VHD2VConverter(Module):
if len(v_list) != 0: if len(v_list) != 0:
inst_name += f"_{len(v_list)}" inst_name += f"_{len(v_list)}"
# Create build_dir if not existing.
if not os.path.exists(self._build_dir):
os.makedirs(self._build_dir)
verilog_out = os.path.join(self._build_dir, f"{inst_name}.v") verilog_out = os.path.join(self._build_dir, f"{inst_name}.v")
ip_params = dict() ip_params = dict()