Hi @Xuan,
The socket connection error you are encountering during HDL Cosimulation with Cadence Xcelium can stem from several factors. Please see my comments below.
xmsim.log is below.
xmsim(64): 22.09-s004: (c) Copyright 1995-2022 Cadence Design Systems, Inc.
The SystemC(r) Code included in this Product is Copyright 1996 - 2016 by all Contributors. All rights reserved.
The SystemC Code included in this Product has been modified by Cadence Design Systems, Inc. and CoWare, Inc. All such modifications are Copyright (c) 2004-2016 Cadence Design Systems, Inc. and Copyright (c) 2004 CoWare, Inc. All Rights Reserved.
SystemC(r) is a registered trademark of Accellera Systems Initiative, Inc. in the United States and other countries and is used with permission.
********************************************************************** HDL server has been started in batch mode. The HDL simulator will be blocked until Simulink starts cosimulation. If you do not want to run in batch mode, restart the HDL simulator in a different run mode. To exit the HDL simulator without running a cosimulation session, issue the breakHdlSim('42755') command in MATLAB. Unexpected error from server thread: Shutting down xmsim: *E,IONOEN: file does not exist, exit. xcelium> exit xmsim: *W,NORUNCMD: No 'run' command issued.
Comment: The log indicates that the HDL server is running in batch mode. To resolve this, restart the HDL simulator in interactive mode. This can be done by modifying the simulation settings in your HDL simulator.
You mentioned, “Unfortunately, I get an error of socket connection.”
Comment: You have to make sure that there are no firewall settings or network configurations blocking the socket connection. Temporarily disabling the firewall can help identify if this is the issue. Also, verify that all paths to the necessary files and libraries are correctly set in your MATLAB environment. Missing files can lead to connection errors.
Your log file displayed message, “issue the breakHdlSim('42755') command in MATLAB.”
Comment: The log file is clearly giving you a clue that if you wish to exit the HDL simulator without running a cosimulation session, use the command breakHdlSim('42755') as suggested in the log.
Lastly, make sure that the versions of MATLAB, Simulink, and Cadence Xcelium are compatible with each other. Sometimes, version mismatches can lead to unexpected errors.
If the issue still persist, then please contact mathworks support by clicking the link below.
https://www.mathworks.com/support/contact_us.html
By following these suggestions, hopefully you should be able to resolve the socket connection issue and successfully run your HDL cosimulation.