| Link for ModelSim | ![]() |
Initiate an immediate call to a MATLAB function on behalf of an instance of a VHDL entity
matlabtbeval <instance> [-socket <tcp_spec>] [-mfunc <name>]
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.
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>.
| Format | Example |
|---|---|
| <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.
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 modes of communication, see Modes of Communication. For more information on establishing the MATLAB end of the communication link, see Starting the MATLAB Server. |
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.
The matlabtbeval command,
Starts the ModelSim client component of the Link for ModelSim.
Associates a specified instance of a VHDL entity created in ModelSim with a MATLAB function.
Executes the specified MATLAB function once and immediately on behalf of the specified entity instance.
Note For ModelSim to establish a communication link with MATLAB, the MATLAB hdldaemon must be running with the same communication mode and, if appropriate, the same TCP/IP socket port as you specify with the matlabtbeval command. |
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
| matlabtb | nomatlabtb | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |