Send HDL simulator event and process IDs to MATLAB server


notifyMatlabServer EventID -socket tcp-spec


notifyMatlabServer EventID -socket tcp-spec sends the HDL simulator event ID and process identification (PID) to the MATLAB® server (hdldaemon) using the specified connection methods (socket or shared memory). For MATLAB to receive this message, hdldaemon must be running with the same communication mode as specified with the notifyMatlabServer command. The event ID and the PID queue in hdldaemon. notifyMatlabServer is often used in conjunction with waitForHdlClient to make sure the HDL simulator is ready to begin or continue processing.

This command issues in the HDL simulator.

Input Arguments


Specifies the event ID to be sent to hdldaemon. The ID requires a positive number less than the maximum value of 32-bit signed integer. This parameter contains the event ID expected by the command waitForHdlClient in MATLAB.

Default: 1

socket tcp_spec

Specifies that TCP/IP socket communication be used for the link between the HDL simulator and MATLAB. For TCP/IP socket communication on a single computer, tcp_spec requires either a TCP/IP port number or service name (alias). To set up communication between computers, you must also specify the name or Internet address of the remote host that is running the MATLAB server (hdldaemon).

When you omit the socket option, MATLAB and the HDL simulator use shared memory communication.


In MATLAB, use the function waitForHdlClient to verify whether the HDL simulator event ID has been received. In the following example, the function returns the HDL Simulator PID if EventID = 5 is received within 100 seconds. If a time-out occurs, the function returns –1.

>> hdldaemon('socket',5002);
>> hdlpid = waitForHdlClient(100,5);

In the HDL simulator, issue the notifyMatlabServer command to send event ID 5 to hdldaemon running on the same machine using TCP/IP socket port 5002.

>> notifyMatlabServer 5 -socket 5002
Was this topic helpful?