| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → EDA Simulator Link |
| Contents | Index |
| Learn more about EDA Link Simulator |
hdldaemon
s=hdldaemon
hdldaemon('ParameterName',ParameterValue)
s=hdldaemon('ParameterName',ParameterValue)
hdldaemon('Option')
hdldaemon starts the HDL Link MATLAB server using shared memory interprocess communication. Only one hdldaemon per MATLAB session can be running at any given time.
s=hdldaemon starts the MATLAB server using shared memory and returns the server status connection in structure s.
hdldaemon('ParameterName',ParameterValue) starts the MATLAB server using shared memory and accepts optional inputs as one or more comma-separated parameter-value pairs. ParameterName is the name of the parameter inside single quotes. ParameterValue is the value corresponding to ParameterName. To start the server in socket mode, use the 'socket' parameter.
s=hdldaemon('ParameterName',ParameterValue) works the same as hdldaemon('ParameterName',ParameterValue) and returns the server status connection in structure s.
hdldaemon('Option') accepts a single optional input. Only one option may be specified in a single call. You must establish the server connection before calling hdldaemon with one of these options.
Option |
Select one of the following options:
|
'time' |
Specifies how the MATLAB server sends and returns time values.
Default: 'sec' |
'quiet' |
Suppresses printing diagnostic messages. Errors still appear. Use this option to suppress the MATLAB server shutdown message when using hdldaemon to get an unused socket number.
Default: 'false' |
'socket' |
Defines the TCP/IP port used for communication. The socket value can be:
If you specify the operating system option (0), use hdldaemon('status') to acquire the assigned socket port number. See Specifying TCP/IP Socket Communication for more information about TCP/IP ports. |
'tclcmd' |
Transmits a Tcl command to all connected clients. You may specify any valid Tcl command string. The Tcl command string you specify cannot include commands that load an HDL simulator project or modify simulator state. For example, the string cannot include commands such as run, stop, or reset. |
s |
s is a structure with these fields:
|
Start the MATLAB server using shared memory communication and use an integer representation of time:
hdldaemon('time', 'int64')
Start MATLAB server and specify socket communication on port 4449:
hdldaemon('socket', 4449)
Start MATLAB server with socket communication and use a 64-bit representation of time:
hdldaemon('socket', 4449, 'time', 'int64')
Check hdldaemon server status:
hdldaemon('status')Returns, for example,
HDLDaemon socket server is running on port 4449 with 1 connections
Or
HDLDaemon shared memory server is running with 0 connections
Or
HDLDaemon is NOT running
Check connection information for communication mode, number of existing connections, and the interprocess communication identifier (ipc_id) the MATLAB server is using for a link:
x=hdldaemon('status')For a socket connection, returns:
x =
comm: 'sockets'
connections: 0
ipc_id: '4449'
For shared memory, returns:
x =
comm: 'shared memory'
connections: 0
ipc_id: [1x45 char]
You can examine ipc_id by entering it at the MATLAB command prompt:
>>x.ipc_id
Shut down server without shutting down MATLAB:
hdldaemon('kill')Issue simple Tcl commands:
hdldaemon('tclcmd','puts "This is a test"')Issue complex Tcl commands:
See the demo for Implementing the Filter Component of an Oscillator in MATLAB for an extensive example of a compound Tcl command.
![]() | dec2mvl | matlabcp | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |