matlabtbeval

Initiate an immediate call to a MATLAB function on behalf of an instance of a VHDL entity

Syntax

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

Arguments

<instance>

Specifies the instance of a VHDL entity that attaches to a MATLAB function. By default, matlabtbeval attaches the instance to a MATLAB function that has the same name as the instance. For example, if the instance is myfirfilter, matlabtbeval associates the 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 ModelSim and MATLAB. For TCP/IP socket communication on a single computing system, 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. The following table lists different ways of specifying <tcp_spec>.

FormatExample
<port-num>4449 on this computer
<port-alias>matlabservice on this computer
<port-num>@<host>4449@compa
<host>:<port-num>compa:4449
<port-alias>@<host-ia>matlabservice@123.34.55.23

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

If ModelSim and MATLAB are running 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 omit -socket <tcp-spec> from the command line.

-mfunc <name>

The name of the MATLAB function that is attached to the entity you specify for instance. If you omit this argument, matlabtbeval attaches the entity to a MATLAB function that has the same name as the entity. For example, if the entity is myfirfilter, matlabtbeval associates the entity with the MATLAB function myfirfilter . If you omit this argument and matlabtbeval does not find a MATLAB function with the same name, the command displays an error message.

Description

The matlabtbeval command,

  1. Starts the ModelSim client component of the Link for ModelSim.

  2. Associates a specified instance of a VHDL entity created in ModelSim with a MATLAB function.

  3. Executes the specified MATLAB function once and immediately on behalf of the specified entity instance.

Examples

The following command starts the ModelSim client component of the Link for ModelSim, associates an instance of the entity 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.

vsim> matlabtbeval myfirfilter -socket 4449

The following command starts the ModelSim client component of the Link for ModelSim, associates an instance of the entity filter with the function myfirfilter.m, and uses a remote TCP/IP socket-based communication link to host compb and TCP/IP port 4449 to execute the function myfirfilter.m.

vsim> matlabtbeval myfirfilter -socket 4449@compa


Learn more about the latest releases of MathWorks products:

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