diff --git a/edalize/flows/sim.py b/edalize/flows/sim.py index a57c2a48..d9fd7b89 100644 --- a/edalize/flows/sim.py +++ b/edalize/flows/sim.py @@ -80,5 +80,9 @@ def run(self, args=None): # Get run command from simulator (cmd, args, cwd) = run_tool.run() cocotb_module = self.flow_options.get("cocotb_module") - env = {"MODULE": cocotb_module} if cocotb_module else {} + env = ( + {"MODULE": cocotb_module, "COCOTB_TEST_MODULES": cocotb_module} + if cocotb_module + else {} + ) self._run_tool(cmd, args=args, cwd=cwd, env=env)