pingHdlSim

Block cosimulation until HDL simulator is ready

Description

example

pID = pingHdlSim(timeout) attempts to connect to the HDL simulator using a shared connection. The function blocks cosimulation until the HDL server loads or the specified timeout occurs. pingHdlSim returns the process ID pID of the HDL simulator or -1 if a timeout occurs. When you automate a cosimulation, use this function to determine if the HDL server is loaded before your script continues the simulation.

example

pID = pingHdlSim(timeout,portnumber) attempts to connect to the local host on the port portnumber.

example

pID = pingHdlSim(timeout,portnumber,hostname)attempts to connect to the host hostname on port portnumber.

Examples

Block Cosimulation Until HDL Simulator Is Ready

The following function call blocks further cosimulation until the HDL server loads or 30 seconds pass.

>>pingHdlSim(30)

If the server loads within 30 seconds, pingHdlSim returns the process ID. Otherwise, pingHdlSim returns -1.

The following function call blocks further cosimulation on port 5678 until the HDL server loads or 20 seconds pass.

>>pingHdlSim(20,'5678')

The following function call blocks further cosimulation on port 5678 on host name msuser until the HDL server loads or 20 seconds pass:

>>pingHdlSim(20,'5678','msuser')

Input Arguments

collapse all

Number of seconds to wait for a response from the HDL simulator, specified as a positive scalar.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Port number to connect, specified as a character vector or string scalar. The HDL simulator attempts to connect to a host on the specified port number.

Data Types: char | string

Name of the host to connect, specified as a character vector or string scalar.

Data Types: char | string

See Also

Introduced in R2008a