| Embedded IDE Link™ VS | ![]() |
vd = adivdsp
vd = adivdsp('propname1',propvalue1,'propname2',propvalue2,…,'timeout',value)
vd = adivdsp('my_session')
vd = adivdsp opens the VisualDSP++ software for the most recent active session, if the IDE is not running. After that, it creates an object vd that references the newly-opened session. If the IDE is running, adivdsp returns object vd that connects to the active session in the IDE.
adivdsp creates an interface between MATLAB software and Analog Devices VisualDSP++ software. If this is the first time you have used adivdsp, you must supply a session name as an input argument (refer to the next syntax).
Note The output (left-hand argument) object name you provide for adivdsp cannot begin with an underscore, such as _vd. |
vd = adivdsp('sessionname','name','procnum','number',...) returns an object handle vd that you use to interact with a processor in the IDE from MATLAB.
You use the debug methods (refer to Debug Operations for the methods available) with this object to access memory and control the execution of the processor. adivdsp also enables you to create an array of objects for a multiprocessor board, where each object refers to one processor on the board. When vd is an array of objects, any method called with vd as an input argument is sent sequentially to all processors connected to the adivdsp object. VisualDSP++ software provides the communication between the IDE and the processor.
Parameters that you pass as input arguments to adivdsp are interpreted as object property definitions. Each property definition consists of a property name followed by the desired property value (often called a PV, or property name/property value, pair). Although you can define any adivdsp object property when you create the object, there are several important properties that you must provide during object construction. These properties must be properly delineated when you create the object. The required input arguments are
sessionname—Specifies the session to connect to. This session must exist in the session list. adivdsp does not create new sessions. The resulting object refers to a processor in sessionname. To see the list of sessions, use listsessions at the MATLAB command prompt.
procnum—Specifies the processor to connect to in sessionname. The default value for procnum is 0 for the first processor on the board. If you omit the procnum argument, adivdsp connects to the first processor. procnum can also be an array of processor indexes on a multiprocessor board. Using an array results in the adivdsp object vd being an array of handles that correspond to the specified processors.
After you build the adivdsp object vd, you can review the object property values with get, but you cannot modify the sessionname and procnum property values.
To connect to the active session in IDE, omit the sessionname property in the syntax. If you do not pass sessionname as an input argument, the object defaults to the active session in the IDE.
Use listsessions to determine the number for the desired DSP processor(s). If your IDE session is single processor or to connect to processor zero, you can omit the procnum property definition. If procnum is not passed as an input argument, the object defaults to procnum = 0 (zero-based).
vd = adivdsp('propname1',propvalue1,'propname2',propvalue2,…,'timeout',value) sets the global time-out value to value in vd. MATLAB waits for the specified time-out value to get a response from the IDE application. If the IDE does not respond within the allotted time-out period, MATLAB exits from the evaluation of this function.
vd = adivdsp('my_session') connects to my_session if the session exists in the session list and the IDE is not already running. In this case, MATLAB starts VisualDSP++ IDE for the session named my_session.
The following list shows some other possible cases and results of using adivdsp to construct an object that refers to my_session.
If my_session does not exist in the session list and the IDE is not already running, MATLAB returns an error stating that my_session does not exist in the session list.
When my_session is the current active session and the IDE is already running, MATLAB connects to the IDE for this session.
If my_session is not the current active session, but exists in the session list, and the IDE is already running, MATLAB displays a dialog box asking if the you want to switch to my_session. If you choose to switch to my_session, all existing handles you have to other sessions in the IDE become invalid. To connect to the other sessions you need to use adivdsp to recreate the objects for those sessions.
If my_session does not exist in the session list and the IDE is already running, MATLAB returns an error, explaining that the session my_session does not exist in the session list.
These examples demonstrate some of the operation of adivdsp.
vd = adivdsp('sessionname','my_session','procnum',0);
returns a handle to the first DSP processor for session my_session.
vd = adivdsp('sessionname','my_multiproc_session','procnum',[0 1]);
returns a 1-by-2 array of handles to the first and second DSP processor for the multiprocessor session my_multiproc_session. vd(1) is the handle for first processor (0) vd(2) is the handle for second processor (1).
vd = adivdsp without input arguments constructs the object vd with the default property values, returning a handle to the first DSP processor for the active session in the IDE.
vd = adivdsp('sessionname','my_session'); returns a handle to the first DSP processor for the session my_session.
![]() | address | build | ![]() |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |