Skip to content

Commit

Permalink
Try a global lock for all libraries to prevent more than one concurre…
Browse files Browse the repository at this point in the history
…nt vopt operation.

This is a temp fix to try if that resolves identified problems
  • Loading branch information
LarsAsplund committed Sep 9, 2024
1 parent 9c3524b commit 0e278a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vunit/sim_if/modelsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def __init__(self, prefix, output_path, persistent=False, gui=False):
self._optimized_designs = {}
self._optimized_libraries = {}
self._vopt_lock = Lock()
self._library_lock = Lock()

def _create_modelsim_ini(self):
"""
Expand Down Expand Up @@ -370,7 +371,7 @@ def _optimize(self, config, script_path):
optimize = True

if not self._optimized_libraries.get(config.library_name, None):
self._optimized_libraries[config.library_name] = Lock()
self._optimized_libraries[config.library_name] = self._library_lock

simulation_target, vopt_event = self._optimized_designs[design_to_optimize].values()

Expand Down

0 comments on commit 0e278a8

Please # to comment.