Placing a MATLAB Test Bench Function on the MATLAB Search Path

The MATLAB function associated with a VHDL entity must be on the MATLAB search path or reside in the current working directory (see the MATLAB cd function). To verify whether the function is accessible, use the MATLAB which function. The following call to which checks whether the function MyVhdlFunction is on the MATLAB search path:

which MyVhdlFunction
D:\work\modelsim\MySym\MyVhdlFunction.m

If the specified function is on the search path, which displays the complete path to the function's M-file. If the function is not on the search path, which informs you that the file was not found:

which MyVhdlFunction
MyVhdlFunction not found 

To add a MATLAB function to the MATLAB search path, open the Set MATLAB Path window by clicking File–>Set Path. Alternatively, for temporary access, you can change the MATLAB working directory to a desired location with the cd command.


Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS