Checking the MATLAB Server's Link Status

The first step to starting a ModelSim and MATLAB test bench session is to check the MATLAB server's link status. Is the server running? If the server is running, what mode of communication and, if applicable, what TCP/IP socket port is the server using for its links? You can retrieve this information by using the MATLAB function hdldaemon with the 'status' option. For example:

hdldaemon('status')

The function displays a message that indicates whether the server is running and, if it is running, the number of connections it is handling. For example:

HDLDaemon socket server is running on port 4449 with 0 connections

If the server is not running, the message reads

HDLDaemon is NOT running

To determine the mode of communication and TCP/IP socket port in use, assign the return value of the function call to a variable. For example:

x=hdldaemon('status')
HDLDaemon socket server is running on port 4449 with 0 connections
x = 
           comm: 'sockets'
    connections: 0
         ipc_id: '4449'

This function call indicates that the server is using TCP/IP socket communication with socket port 4449 and is running with no connections. If a shared memory link is in use, the value of comm is 'shared memory' and the value of ipc_id is a file system name for the shared memory communication channel. For example:

x=hdldaemon('status')
HDLDaemon shared memory server is running with 0 connections
x = 
           comm: 'shared memory'
    connections: 0
         ipc_id: [1x45 char]


Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS