Skip to content

Commit 534e776

Browse files
make sure io has 2 rt cores also
1 parent 84bb70e commit 534e776

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/hde2e.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ def _realtime_core_io(self, instance_num: str) -> Optional[str]:
8383
# Example mapping: IO_PLC_01 → cores 8-11, IO_PLC_02 → cores 12-15
8484
t_cpus = self.config.demo.io_system.get("t_cpus")
8585
t_cpus = t_cpus.split(",")
86-
return str(t_cpus[instance_num - 1])
86+
if len(t_cpus) < 2:
87+
print("[WARN] Not enough t_cpus specified for io_system. Expected at least 2.")
88+
return None
89+
return str(t_cpus[int(instance_num) - 1])
8790
# Low-level helpers
8891
@staticmethod
8992
def _run_command(cmd: List[str], capture: bool = False) -> subprocess.CompletedProcess:

0 commit comments

Comments
 (0)