| Link for ModelSim | ![]() |
Start the MATLAB server as follows:
Add the following hdldaemon function call:
hdldaemon('socket',0)This function call starts the server, such that it uses TCP/IP socket communication with a socket port number identified as available by the operating system.
Get the assigned port number by adding the following call to hdldaemon:
dstat = hdldaemon('status');The 'status' argument instructs the function to return the assigned port number. The returned value is stored in the structure dstat.
Assign the port number portion of dstat to a variable for future use:
portnum = dstat.ipc_id;
Both the server and client parts of an application link must use the same port number. Thus, at some point, your script needs to forward portnum over to ModelSim.
Add the following global variable definition:
global testisdone;
You will use this variable as a completion flag for each test. Because the variable is global, it can verify the state of test bench execution.
| Documenting the Script | Writing Script Code for the Decoder Test | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |