Documentation

pingHdlSim

Block cosimulation until HDL simulator is ready for simulation

Syntax

pingHdlSim(timeout)
pingHdlSim(timeout, 'portnumber')
pingHdlSim(timeout, 'portnumber', 'hostname')

Description

pingHdlSim(timeout) blocks cosimulation by not returning until the HDL server loads or until the specified time-out occurs. pingHdlSim returns the process ID of the HDL simulator or -1 if a time-out occurs. You must enter a time-out value. You may find this function useful if you are trying to automate a cosimulation and need to know that the HDL server has loaded before your script continues the simulation.

pingHdlSim(timeout, 'portnumber') tries to connect to the local host on port portnumber and times out after timeout seconds you specify.

pingHdlSim(timeout, 'portnumber', 'hostname') tries to connect to the host hostname on port portname. It times out after timeout seconds you specify.

Examples

The following function call blocks further cosimulation until the HDL server loads or until 30 seconds have passed:

>>pingHdlSim(30)

If the server loads within 30 seconds, pingHdlSim returns the process ID. If it does not, pingHdlSim returns -1.

The following function call blocks further cosimulation on port 5678 until the HDL server loads or until 20 seconds have passed:

>>pingHdlSim(20, '5678')

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

>>pingHdlSim(20, '5678', 'msuser')
Was this topic helpful?