hdldaemon

Start the MATLAB server component of the Link for ModelSim interface

Syntax

hdldaemon
hdldaemon('PropertyName', 'PropertyValue'...)
hdldaemon('status')
hdldaemon('kill')

Description

Server Activation

hdldaemon starts the MATLAB server component of the Link for ModelSim with the following default settings:

Use shared memory communication when your application configuration consists of a single system.

hdldaemon('PropertyName', 'PropertyValue'...) starts the MATLAB server component of the Link for ModelSim with property-value pair settings that specify the mode of the communication for the link between MATLAB and ModelSim and the time resolution for the MATLAB simulation function output ports. See Property Name/Property Value Pairs for details.

Link Status

hdldaemon('status') returns the following message indicating that a link (connection) exists between MATLAB and ModelSim:

HDLDaemon socket server is running on port 4449 with 0
connections

You can also use this function to check on the mode of communication being used, the number of existing connections, and that an interprocess communication identifier (ipc_id) being used for a link by assigning the return value of hdldaemon to a variable. The ipc_id identifies a port number for TCP/IP socket links or the file system name for a shared memory communication channel. For example:

x=hdldaemon('status')
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 active ModelSim clients. 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.

Server Shutdown

hdldaemon('kill') Shuts down the MATLAB server without shutting down MATLAB.

Property Name/Property Value Pairs

'socket', tcp_spec

Specifies the TCP/IP socket mode of communication for the link between MATLAB and ModelSim. If you omit this argument, the server uses the shared memory mode of communication.

The tcp_spec can be a TCP/IP port number, TCP/IP port alias or service name, or the value zero, indicating that the port is to be assigned by the operating system. Some valid tcp_spec examples follow:

OptionExamples
Port number'4449' or 4449
Alias or service name'MATLAB Service'
Operating system assigned'0' or 0

For more information on choosing TCP/IP socket ports, see Choosing TCP/IP Socket Ports.

'time', 'sec' | 'time', 'int64'

Specifies the time resolution for MATLAB function output ports and simulation times (tnow).

Specify... For...
'time' 'sec' (default)A double value that is scaled to seconds based on the current ModelSim simulation resolution
'time' 'int64'64–bit integer representing the number of simulation steps

If you omit this argument, the server uses scaled resolution time.

Examples

The following function call starts the MATLAB server with shared memory communication enabled and a 64–bit time resolution format for the MATLAB function's output ports.:

hdldaemon('time', 'int64')

The following function call starts the MATLAB server with TCP/IP socket communication enabled on socket port 4449. Although it is not necessary to use TCP/IP socket communication on a single-computer application, you can use that mode of communication locally. A time resolution is not specified. Thus, the default, scaled simulation time resolution is applied to the MATLAB function's output ports:

hdldaemon('socket', 4449)

The following function call starts the MATLAB server with TCP/IP socket communication enabled on port 4449. A 64–bit time resolution format is also specified:

hdldaemon('socket', 4449, 'time', 'int64')


Learn more about the latest releases of MathWorks products:

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