Main Content

matlabtbeval

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

    Description

    Note

    Enter this command in the HDL simulator, not in MATLAB®. This command is available only after the HDL simulator loads the MATLAB library.

    matlabtbeval instance performs these actions:

    • Starts the HDL Simulator client component of HDL Verifier™.

    • 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.

    Note

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

    example

    matlabtbeval instance -mfunc function_name associates the HDL instance with the MATLAB function specified by function_name.

    example

    matlabtbeval instance -socket tcp_spec establishes a communication link with a MATLAB function over a transmission control protocol (TCP) socket.

    example

    Examples

    collapse all

    Start the HDL simulator client component of the link software, associate an instance of the module myfirfilter with the function myfirfilter.m, and use a local TCP/IP socket-based communication link to TCP/IP port 4449 to execute the function myfirfilter.m.

     hdlsim> matlabtbeval myfirfilter -socket 4449:

    Input Arguments

    collapse all

    Instance of an HDL module that is associated with a MATLAB function, specified as a character vector or string scalar that indicates an HDL module instance. By default, the matlabtbeval command associates 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. The command ignores hierarchy names. For example, if the instance is top.myfirfilter, the matlabtbeval command associates only myfirfilter with the MATLAB function. To associate the specified instance with a MATLAB function that differs from the instance name, use the function_name input.

    Note

    If you specify an instance of an HDL module that is already associated with a MATLAB function (via matlabcp or matlabtb) the new association overwrites the existing one.

    Data Types: char | string

    Name of the MATLAB function to associate with the HDL instance, specified as a character vector and string scalar. If you omit this argument, matlabtbeval associates the instance with a MATLAB function that has the same name as the instance input. If you omit this argument and matlabtbeval does not find a MATLAB function with the same name as instance, the command displays an error message.

    Data Types: char | string

    TCP/IP socket communication for the link between the HDL simulator and MATLAB, specified as a TCP/IP port number, TCP/IP service name, or Internet address. If the MATLAB server is running on a remote host, you must also specify the name or internet address of the remote host. If you omit this argument, matlabtbeval uses shared memory communication.

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

    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.

    Example: -socket 4040

    Version History

    Introduced in R2008a