Main Content

tclHdlSim

Execute Tcl command in Incisive or ModelSim simulator

    Description

    example

    tclHdlSim(tclCmd) executes a Tcl command on the Incisive® or ModelSim® simulator using a shared connection during a Simulink® cosimulation session.

    To use this function, the Incisive or ModelSim simulator must be connected to MATLAB® and Simulink using the HDL Verifier™ software (see either vsimulink or hdlsimulink).

    To execute a Tcl command on the Incisive or ModelSim simulator during a MATLAB cosimulation session, use the command hdldaemon('tclcmd','command').

    tclHdlSim(tclCmd,portNumber) executes a Tcl command on the Incisive or ModelSim simulator by connecting to the local host on port portNumber.

    tclHdlSim(tclCmd,hostname) executes a Tcl command on the Incisive or ModelSim simulator by connecting to the host hostname.

    Examples

    collapse all

    Display a message in the HDL simulator command window using port 5678 on host name msuser.

    >>tclHdlSim('puts "Done"','5678','msuser')

    Input Arguments

    collapse all

    Tcl command to execute in the HDL simulator, specified as a character vector or string scalar. You can specify any valid Tcl command. The Tcl command you specify cannot include commands that load an HDL simulator project or modify the simulator state. For example, this value cannot include commands such as start, stop, or restart for ModelSim or run, stop, or reset for Incisive.

    Example: 'puts "Hello World!"'

    Data Types: char | string

    TCP/IP port number for socket communication between the HDL-simulator and MATLAB, specified as a character vector or string scalar.

    Example: '32864'

    TCP/IP host name for socket communication between the HDL-simulator and MATLAB, specified as a character vector or string scalar.

    See Also

    | |

    External Websites

    Introduced in R2008a