matlabtbeval

Call specified MATLAB function once and immediately on behalf of instantiated HDL module

Syntax

matlabtbeval <instance> [-socket <tcp_spec>]
[-mfunc <name>]

Description

The matlabtbeval command has the following characteristics:

  • Starts the HDL simulator client component of the HDL Verifier™ software.

  • Associates a specified instance of an HDL design created in the HDL simulator with a MATLAB® function.

  • Executes the specified MATLAB function once and immediately on behalf of the specified module instance.

This command is issued in the HDL simulator.

Note

The matlabtbeval command executes the MATLAB function immediately, while matlabtb provides several options for scheduling MATLAB function execution.

Notes

The communication mode that you specify for matlabtbeval must match the communication mode you specified for hdldaemon when you established the server connection.

For socket communications, specify the port number you selected for hdldaemon when you issue a link request with the matlabtbeval command in the HDL simulator.

Arguments

<instance>

Specifies the instance of an HDL module that is associated with a MATLAB function. By default, matlabtbeval associates the HDL module instance with a MATLAB function that has the same name as the HDL module instance. For example, if the HDL module instance is myfirfilter, matlabtbeval associates the HDL module instance with the MATLAB function myfirfilter. Alternatively, you can specify a different MATLAB function with the -mfunc property.

-socket <tcp_spec>

Specifies TCP/IP socket communication for the link between the HDL simulator and MATLAB. For TCP/IP socket communication on a single computer, the <tcp_spec> can consist of just a TCP/IP port number or service name (alias). If you are setting up communication between computers, you must also specify the name or Internet address of the remote host.

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

If you run the HDL simulator and MATLAB on the same computer, you have the option of using shared memory for communication. Shared memory is the default mode of communication and takes effect if you do not specify -socket <tcp-spec> on the command line.

Note

The communication mode that you specify with the matlabtbeval command must match what you specify for the communication mode when you call the hdldaemon command to start the MATLAB server. For more information on communication modes, see Communications for HDL Cosimulation. For more information on establishing the MATLAB end of the communication link, see Start the HDL Simulator from MATLAB.

-mfunc <name>

The name of the associated MATLAB function. If you omit this argument, matlabtbeval associates the HDL module instance with a MATLAB function that has the same name as the HDL module instance. If you omit this argument and matlabtbeval does not find a MATLAB function with the same name, the command displays an error message.

Examples

This example starts the HDL simulator client component of the link software, associates an instance of the module myfirfilter with the function myfirfilter.m, and uses a local TCP/IP socket-based communication link to TCP/IP port 4449 to execute the function myfirfilter.m:

 hdlsim> matlabtbeval myfirfilter -socket 4449:
Introduced in R2008a