Home

ANALOG DEVICES VisualDSP 5.0 Users Guide (Revision 3.0 August 2007)

image

Contents

1.
2. Peripheral Support Modeled Streamable Bootable SPORT v v NA UART v v NA PCI NP NP NP USB NP NP NP Flags v v NA System Timers v v NA RTC v NA NA EBIU NP NA NA SPI v v NP Watch Unit NP NA NA Trace Unit NP NA NA Core Timer vV V4 NA VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Table D 2 Peripheral Support in the ADSP BF535 Simulator Contd Peripheral Support Modeled Streamable Bootable MEMDMA v NA FR DMA v v FR PROM FR NA FR Table D 3 summarizes peripheral support in the ADSP BF535 compiled simulator Table D 3 Peripheral Support in the ADSP BF535 Compiled Simulator Peripheral Support Modeled Streamable Bootable SPORT V v FR UART FR FR FR PCI NP NP NP USB NP NP NP Flags v v NA System Timers v v NA RTC v NA NA EBIU NP NA NA SPI FR FR NP Watch Unit FR NA NA Trace Unit FR NA NA Core Timer vV FR NA MEMDMA 4 NA FR DMA v v FR PROM NP NA NP VisualDSP 5 0 User s Guide D 3 Peripheral Support in Simulators Table D 3 Peripheral Support in the ADSP BF535 Compiled Simulator Peripheral Support Modeled Streamable Bootable GPIO FR FR NA Watchdog Timer v NA NA D 4 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Table D 4 summarizes peripheral support for ADSP BF52x ADSP BF533 ADS
3. Figure 1 7 Example Project Options Dialog Box Showing Project Page For each code development tool compiler assembler linker splitter and loader one or more pages provide options that control how each tool processes inputs and generates outputs The available pages depend on your target Options correspond to tool command line switches You can define these options once or modify them to meet changing development needs Tools can also be accessed from the operating system s command line VisualDSP 5 0 User s Guide 1 47 Processor Projects Project options also specify the following information Project target e Tool chain Output file directories e Pre and post build options Project Groups A project group enables you to work with a number of projects at once A project group can be empty or contain any number of projects Opening a project adds it to the project group Closing a project removes it from the project group Similar functionality is found in Microsoft Visual Studio The Project window Figure 1 8 displays the project group icon and the projects opened in that workspace Project BTC_AsmDemo dpj CD x Project group 2 project s Project group icon 5 A vectadd indicates the number of 2 3 Source Files open projects E shel c Linker Files E vdk 2181 ldf Header Files Kernel Files BTC_AsmDemo Bold typeface indicates Source Files the active project Linker Files C
4. Cancel Figure B 1 Configure Simulator Event Dialog Box From this dialog box configure the simulator to handle the anomaly or event B 8 VisualDSP 5 0 User s Guide Simulation of SHARC Processors 3 Specify options described in Table B 1 Table B 1 Options in the Configure Simulator Event Dialog Box Item Purpose Event Fire These options specify the frequency of reporting an event Options Fire Once logs the event only the first time it occurs Fire Unique logs the event once for each unique event a unique set of occur rences which is specific to the event type Select this option to prevent the reporting of multiple messages for the same event Events for example FP Denorm If a PC has had this event before it is not unique and is not reported Anomalies for example Shadow Write SIMD FIFO or Short Word If the PC at the time of the memory write and the PC at the time of the mem ory read taken as a pair have had this event before it is not unique and is not reported Fire All logs every occurrence of the event Severity This option specifies the degree of the event INFO writes a message in black typeface to the Output window WARN writes a message in black typeface to the Output window ERROR writes a message in red typeface to the Output window and rings a bell FATAL writes a message in red typeface to the Output window and rings a bell Event Actions Print writes m
5. Refresh Rate Auto Refresh Specifies the refresh rate which is used when Auto Refresh is chosen The display is updated at the selected interval Enables the window to refresh itself at given intervals The rate is spec ified by Refresh Rate Auto Refresh mode is valid only while the pro cessor is running Channel Timeout Specifies the length of time to wait for any single response from the BTC If the timeout value is exceeded the current transaction ends Register Windows Access various register windows via the VisualDSP Register menu The available commands and subsequent windows depend on the processor 2 78 VisualDSP 5 0 User s Guide Environment Figure 2 53 shows an example Register menu tree for a SHARC processor Register File Program Counters Manage DAGI DM Loop Counters AEN DAG2 PM Cycle Count nori Interrupts Counters Loop Address Register Stacks Loop Counter Custom Status PC Stack Inactive Registers Status Core Other System IOP System Control DMA Addressing DMA Status External Port Control Register File SPORT Multichannel Control DAG1 DM SPORT Divisors DAG2Z PM SDRAM Control MR Registers Io Port Control PX Registers I O Ports Status I25 Mode Cache Control SPORT Control DSP Serial Mode Cache Contents Timer Control Multi Channel Mode Figure 2 53 Example Register Menu Tree for
6. Simulation of Blackfin Processors Table D 7 Stalls Detected Messages ADSP BF535 Processor Contd Message Explanation Example Regmv hazard preg to A register move of a preg to a dreg followed by RO P0 dreg gt dreg to sys preg another register move of that same dreg to a sys ASTAT RO RAW tem register or preg Regmv hazard sysreg A register move of a system register to a dreg fol RO ASTAT to dreg gt dreg to dreg lowed by another register move of that same dreg R1 RO RAW to a dreg Regmv hazard sysreg A register move of a system register to a dreg fol RO LCO to dreg gt dreg to sysreg lowed by another register move of that same dreg ASTAT RO RAW to a system register Regmv hazard sysreg A register move of a system register to an accu A0 w LCO to areg dreg to areg mulator register followed by another register A0 R0 WAW move of a dreg to the same accumulator register Regmv hazard sysreg A register move of a system register to an accu A0 w LCO to areg gt preg to areg mulator register followed by another register A0 P0 WAW move of a preg to that same accumulator register Regmv hazard sysreg A register move of a system register to an accu A0 w LCO to areg gt areg to areg mulator register followed by another register A0 Al WAW move of an accumulator register to that same accumulator register Regmv hazard s
7. VDSP subst space space VDSP_INTERMEDIATE 1 Define the command to use to delete files which is different 1 on Win95 98 and Windows NT 2000 ifeq 0S5 Windows NT RM cmd C del F Q else RM command C del endif Ji 1 Begin Debug configuration ifeq MAKECMDGOALS Debug Debug debug mean dxe debug mean doj mean c include stdio h VDSP cc21k c Mean c g proc ADSP 21062 o Debug Mean doj debug benchmark doj benchmark asm include asm_sprt h include def21060 h VDSP easm21k exe proc ADSP 21062 o Debug benchmark doj g benchmark asm debug mean dxe debug mean doj debug benchmark doj VDSP cc21k exe Debug Mean doj Debug benchmark doj proc ADSP 21062 L Debug flags link od Debug o Debug Mean dxe endif ifeq MAKECMDGOALS Debug_clean Debug clean RM Debug Mean doj RM Debug benchmark doj 1 54 VisualDSP 5 0 User s Guide Introduction to VisualDSP RM Debug Mean dxe RM Debug ipa RM Debug opa RM Debug ti endif 1 Begin Release configuration i ifeq MAKECMDGOALS Release Release release mean dxe release mean doj mean c VDSP cc21k c Mean c 01 proc ADSP 21062 o Release Mean doj release benchmark doj benchmark asm VDSP easm21k exe proc ADSP 21062 o Release benchmark doj Nbenchmark asm release mean dx
8. 2 9 Project Page Right Click Menus dcdassuisstenebs esasdtids Fani u i aiti 2 10 Project Group Icon Right Click Ment usscicxssescenenieenetenes 2 10 Project leon Right lick Meni auetescessiebivit ri eae 2 11 Folder Icon Right Click Meni ceserscrxarcrsssxancissncvisonarsincesavc 2 12 File Icon Right Click Menu i ed eibem tORI eeu atiis 2 12 Project Wiodew Rules odia sanatio etd oiii RP 2 13 Pile T I M 2 14 Automatic Ple Placement oou cpissie binder pinu a loui e Hp 2 15 Pile Placeundt RADI aiuasesevnientid blbqundiRitenubb bd epa d EE 2 15 lli rp ect T 2 16 db cii MEI 2 16 VisualDSP 5 0 User s Guide vii CONTENTS Editor Windies Penis Mem 2 17 Editor Window Symbols aasudvdibetsndibnfendsn dab oH o pM 2 18 uris rs PNE 2 19 BYE So nce hoger 2 19 Viewing Modes Source Mode vs Mixed Mode 2 20 Seure NOE serria M 2 20 hon B Los E E arene eee 2 20 Editor Tab Mode eneore m ea 2 21 Context Sensitive Expression Evaluation 12 nose ttis 2 23 ig ro doro c PT 2 24 Highlighting at Expression dudiucialind d evo eani dip bM IER 2 24 Euer SOUS ME arai a que te ud epi p itid 2 24 Ki ee o 2 27 LIU ROUEN sa esse eel Da Pi da dd 2 28 Build Page and Congole Pap 1 ucenddasedexpedtd n pit uade unit 2 29 Code Development Tools Batch Processing Messages 2 31 Message Severity Hierarchy iecit sciet pista tied aedis 2 31 Sy
9. EE boot thread E boot thread2 E Thread Type S amp S Round Robin Priorities amp Semaphores Maximum Active Semap mi Event Bits I Events Ep Interrupts Bs 1 0 Interface E Maximum 1 0 Objects El Device Drivers Es IPC sE Source File E Header File 2 Bootl O Objects Device Flags amp Memory Pools B Messages Maximum Messages El Maximum Running Threa Maximum Active Device Maximum Active Memory 5 1024 thread2 cpp thread2 h thread2 Total Size 0 0 Figure 2 3 Expanded View of Elements on the Kernel Tab Environment VisualDSP 5 0 User s Guide 2 5 Project Window Figure 2 4 shows how project dependencies appear in the Project view Project dsfs dpj Project group 3 project s D gt tiger Source Files 2 3 Linker Files c Header Files Component Files Documentation J acadia El acadia 3 Source Files c3 Linker Files E Component Files 9 Documentation The tiger project depends on the acadia project The acadia project has no project dependencies Ei dts Source Files amp Linker Files Cd Header Files d acadia The dts project gb tiger lt N Project depends on two projects Figure 2 4 Projects Dependencies Indicated in the Project View Project Nodes The Project wi
10. Figure 2 29 Example Current Source Line in the Disassembly Window The color of the current source line and other window items are user con figurable Refer to VisualDSP Help for detail Other Disassembly Window Features From the Disassembly window you can perform the operations described in Figure 2 11 Table 2 11 Disassembly Window Operations To Place the mouse pointer over Move to a different address Insert or remove a break point An address field and double click Then select the address from the ensuing Go To dialog box Note that you can also use the address bar to navigate to an address symbol or expression An instruction and double click Toggle enable or disable a breakpoint An instruction and right click Then choose the appropriate com mand from the ensuing menu VisualDSP 5 0 User s Guide 2 47 Debugging Windows Right Click Menu The Disassembly window s right click menu provides access to the com mands shown in Figure 2 30 Figure 2 30 Disassembly Window Right Click Menus 2 48 VisualDSP 5 0 User s Guide Environment Disassembly Window Symbols Symbols at the far left of the Disassembly window indicate program execution stages Figure 2 12 Table 2 12 Disassembly Window Symbols Symbol Description cy Gray arrow The current instruction is being aborted due to a branch or jump instruction Ena
11. 44 Bi n n j10 0 yr2 0 yr X us nop 45 ER GEM n yr3 4r3 j10 0 yr y yr4 0X5 46 ER GER GER pr r4 yr3 r3 r2 ji y yr3 OX1 47 i E j IF nyaeq is yra4 r4 r3 yr FERE yr2 0 48 y E Es IF nyaeq yra4 r4 r3 B 35 3 y j10 0 49 n y j j0 0X1 IF nyaeq JUM yr B y yr3 r3 r2 5 j n y j10 0 jO 0X1 xr IE Ses B yr3 r3 r2 51 x j n yr3 r3 j10 0 j0 Ts yr4 r4 r3 Figure C 2 Stall Due to Compute Block Dependency C 4 VisualDSP 5 0 User s Guide Simulation of TigerSHARC Processors Aborts The following examples show how the Pipeline Viewer displays different types of abort events for ADSP TS101 processors For a complete list of pipeline effects and memory transaction timing refer to the processor s hardware specification Aborts Due to an Unpredicted Change of Flow In the following example the abort at the Decode stage is due to an unpredicted jump predicated upon an IALU condition Aborted stages in the fetch unit pipe are marked with an BM and aborted instructions in the execution pipe are marked with an El Cycle F1 F2 F3 DECODE INT ACCESS EX1 EX2 3 i n yi j2 j2 0X1 zr9 r Bk B ki k j2 0X6 r13 r5 10 x j mn j2 _ j2 0X1 xr9 r Blk Blki B x kl 0X1 xr3 r2 1 Bj x j IF nile JUMP 0x5 NP jB ki Blk B ki 0X1 x
12. of each instruction executed with regard to a power change of the processor s core voltage These numbers are generated by measuring the core voltage while running test code for each instruction Utilizing these readings as absolute measurements would not be accurate enough considering factors such as leakage current temperature and fab rication process of the chip that play a part in an application s power Therefore these measurements are referred to as instruction ranking Example The following example demonstrates how energy aware programming can be used to profile the core power used by an application To set up the Linear Profiling window for power profiling 1 From the Tools menu choose Linear Profiling and then choose New Profile 2 Right click on the Linear Profiling window choose Properties and select Energy Units Then click OK VisualDSP 5 0 User s Guide 3 31 Energy Aware Programming When you profile your code each instruction ranking is converted to Energy and the PLL values are used for voltage and frequency scaling To create a project that enables Processor Clock and Power Settings l From the File menu choose New and then choose Project The Project Wizard appears In Name enter a name for the new project In Project types select Standard application Then click Next In Processor types select one of these processors ADSP BF531 ADSP BF532 or ADSP BF533 Then click N
13. All sessions append to the log file Occasionally open the file and delete parts of it or all of it to conserve disk space Output Window Customization You can specify preferences that Configure Output window fonts and colors Enable command auto completion Display file names only while building hide complete command lines 2 38 VisualDSP 5 0 User s Guide Environment By default the Output window resides at the bottom of the main applica tion window You can resize or move the Output window to a different portion of the screen by dragging it to the selected location You can dock hide or float the window The Output window s Console page interacts with script engines All script input and output is sent to the Console page as shown in Figure 2 24 Output Window Lx PO Loading C Convolution Convolution 060X PO Load complete dspsetbreak processor P3 020006 there is already a breakpoint at address LU Figure 2 24 Messages in the Output Window s Console Page These messages are saved to the log file VisualDSP Log txt which is located in the installation s Data directory Right Click Menu The Output window s right click menu is shown in Figure 2 25 This menu enables you to Load a script or enable the debugger Clear the text in the window or copy selected text Toggle bookmarks e Select a scripting language VisualDSP 5 0 User s Guide 2 39 Output Window Load S
14. B B B I0 RO RO 4 19 RS I0 R4 0 B B B I0 RO z Figure D 1 RAW Hazard Stall These stalls are detected in the Decode stage The instruction stalls there until all DAG registers required and updated in later pipeline stages are available In this example the instruction 10 R0 in the Executel stage cycle 16 Execute2 stage cycle 17 and Execute stage cycle 18 is stalling the R4 10 instruction in the Decode stage This stall is caused by the first instruction because it updates the value of 10 in the Writeback stage while the second instruction needs the value of 10 in the Address stage to increment I0 Figure D 2 shows a fetch stall Cycle Decode Address Executel Execute2 Execute3 Writeback 12 NOP NOP NOP NOP 13 NOP NOP NOP NOP 14 NOP NOP NOP NOP 15 NOP NOP NOP NOP F k Figure D 2 Fetch Stall VisualDSP 5 0 User s Guide D 11 Simulator Instruction Timing Analysis for ADSP BF535 Processors Fetch stalls are detected in the Decode stage and are caused by memory latencies when an instruction is fetched In this example two fetch stalls appear in the Decode stage cycles 14 and 15 because of a memory latency when the R1 0 instruction is fetched These fetch latencies are then propagated in the pipeline Address stage cycles 15 and 16 Execute 1 stage cycles 16 and 17 and so on Pipeline Viewer Window Messages When yo
15. Help Categories VisualDSP provides three processor specific Help categories one for each processor family that filter adjust the content of Help Each Help category for example Blackfin processor family Help displays the infor mation pertinent to that specific family of processors only A fourth category provides access to the entire documentation set of all three processor families similar to software releases prior to version 5 0 By selecting a Help category in effect you remove information about other families of processors from Help this improves your ability to quickly locate information in Help especially when running a search or looking up an entry in the Help Index You can also specify a user preference that selects a category You can also switch among the different Help categories Refer to VisualDSP online Help for details A 52 VisualDSP 5 0 User s Guide Reference Information Online Help VisualDSP online Help refers to the application product Help packaged together with the VisualDSP tool suite This section describes the following topics Portions of the VisualDSP Help window Context sensitive Help Copying example code from Help Printing from Help Bookmarking frequently used Help topics Navigating in online Help Search features Help Window The VisualDSP Help window comprises three parts The navigation pane provides tabbed pages Contents Index Search and Favori
16. Multiprocessor Sessions In a multiprocessor session you must configure the automatic breakpoints one processor at a time by setting focus on a processor opening the Automatic page of the Breakpoints dialog box and specifying enabling the breakpoints for the processor that has the focus Watchpoints Similar to breakpoints watchpoints stop program execution when user specified conditions are satisfied Watchpoints however are used to set a condition such as a memory read or stack pop for halting events Use watchpoints only during simulation Watchpoints unlike breakpoints are not attached to a specific address A watchpoint halts anywhere in your program once the watchpoint conditions are satisfied VisualDSP 5 0 User s Guide 3 15 Simulation Tools Hardware Breakpoints Similar to simulator watchpoints hardware breakpoints enable you to set breaks on instructions or data transfers within a user defined memory range Choosing Hardware Breakpoints from the Settings menu opens the Hardware Breakpoints dialog box from which to configure the hardware breakpoints Refer to VisualDSP Help for your processor family SHARC ICE TigerSHARC ICE or Blackfin ICE for details about configuring the hardware breakpoints Latency Hardware breakpoints do not assert until one 1 or two 2 instruction cycles after the actual break condition occurs Note that the program counter is not placed on the instruction that
17. Open the Breakpoints dialog box Alt F9 Enable disable a breakpoint Ctrl F9 Toggle between setting a software or hardware breakpoint Shift F9 Toggle add or remove a breakpoint F9 Obtaining VisualDSP Help To obtain VisualDSP Help use the keyboard shortcuts listed in Table A 16 Table A 16 Keyboard Shortcuts for Obtaining Online Help Action Key s View VisualDSP Help for the selected object Fl Obtain context sensitive Help for controls buttons fields Shift F1 menu items A 36 VisualDSP 5 0 User s Guide Reference Information Miscellaneous For windows and workspaces use the keyboard shortcuts listed in Table A 17 Table A 17 Miscellaneous Keyboard Shortcuts Action Key s Refresh all windows F12 Select workspace 1 through 10 Alt 1 Alt 0 Window Operations Similar to many Windows applications VisualDSP provides multiple ways to adjust the view of the user interface Window Manipulation The Window menu commands Figure A 16 enable you to manipulate your window display and update windows during program execution Refer to your Windows documentation for more information Window E Tile Horizontally T Tile vertically f Cascade Eff Close all Refresh EI Iw 1 dotprod main c Figure A 16 Window Menu Commands VisualDSP 5 0 User s Guide A 37 Window Operations Right Click Menu Options A men
18. R1 R4 L R5 H IS R2 I0 I1 R3 lt 1 cycle stall gt due to a collision in the second minibank in superbank A A collision occurs regardless of whether the accesses are both loads or a load and a store If the first access is a load DAGO and the second is a store DAGI the cycles incurred are seen by the store buffer see Store Buffer Overflow on page D 39 Since the SRAM BASE ADDRESS value must be 4 MB aligned thus each minibank starts at 0xXXXXX000 it is easy to determine whether two addresses are going to collide in a minibank If addr1 gt gt 12 addr2 gt gt 12 a collision occurs VisualDSP 5 0 User s Guide D 35 Multicycle Instructions and Latencies Cache Access 1 Cycle Stall This stall can occur only when one or both banks are configured as cache Only One Bank is Configured as Cache In this case data memory accesses are cached to the same superbank so you have to determine only the cache minibank First you must find out how much data bank memory is modeled in the implementation of the Blackfin processor that you are using The standard Blackfin processor architecture model is 16KB thus four 4 KB minibanks In this case you have to look at bits 13 and 12 only of the address to see which minibank the data memory access is cached Table D 24 Minibanks Selected for 16KB of Data Bank Memory Addr 13 12 Minibank Selected 00 minibank 1 0x0000 0x1000 01 m
19. Set as Active Project Close Build the project Clean delete intermediate and target files Specify the active project Add folders and files View and specify project options View project properties Project Options v Allow Docking Hide Float In Main Window Properties Figure 2 6 Project Icon s Right Click Menu VisualDSP 5 0 User s Guide 2 11 Project Window Folder Icon Right Click Menu The selected folder icon I or 23 right click menu Figure 2 7 pro vides a container context from which to perform these local operations e Add or delete a folder e Add files to the folder View folder properties New Folder Add File s to Folder Delete Folder Allow Docking Hide Float In Main Window Properties Figure 2 7 Folder Icon Right Click Menu File Icon Right Click Menu The selected file icon El or amp or E right click menu Figure 2 8 on page 2 13 provides a file context from which to Open the selected file for editing Build the file Remove the file from a project 2 12 VisualDSP 5 0 User s Guide Environment Specify options for the file View the file s properties Open File Build File Remove File from Project File Options Allow Docking Hide Float In Main Window Properties Figure 2 8 File Icon Right Click Menu File icon commands apply to the selected file i
20. Table 2 6 Editor Window Symbols Cont d Environment Symbol Indicates a Disabled software breakpoint e Enabled hardware breakpoint e CJ Disabled hardware breakpoint Bookmark Bookmarks Bookmarks are pointers in editor windows Place a bookmark in a location to return to it quickly at a later time Syntax Coloring Specifying colors can help you locate information in the types of files listed in Table 2 7 Table 2 7 File Types That Support Syntax Coloring File Type File Extension Assembly asm C 2t Linker Description Files ldf C CPP Header H Script Various extensions such as JS and VBS VisualDSP 5 0 User s Guide 2 19 Editor Windows Viewing Modes Source Mode vs Mixed Mode Specify an editor window to display in source mode or mixed mode Source Mode Source mode as shown in Figure 2 11 displays C code only Bi Convolution c OF x float index 0 0 Used for a float conversion 0 0 Conversic Ok first generate the Sine Table for is0 i lt 360 i Convert degrees to radians then clo j i conversion RADIANS ojs Table i sin conversion m AY Figure 2 11 Example Editor Window in Source Mode Mixed Mode Mixed mode displays assembled code immediately after the corresponding C code The assembly code takes a specified color 2 20 VisualDSP 5 0
21. WISUA DSP 5 0 User s Guide Revision 3 0 August 2007 Analog Devices Inc One Technology Way Norwood Mass 02062 9106 Part Number 82 000420 02 Copyright Information 2007 Analog Devices Inc ALL RIGHTS RESERVED This document may not be reproduced in any form without prior express written consent from Analog Devices Inc Printed in the USA Disclaimer Analog Devices Inc reserves the right to change this product without prior notice Information furnished by Analog Devices is believed to be accurate and reliable However no responsibility is assumed by Analog Devices for its use nor for any infringement of patents or other rights of third parties which may result from its use No license is granted by impli cation or otherwise under the patent rights of Analog Devices Inc Trademark and Service Mark Notice The Analog Devices logo the CROSSCORE logo VisualDSP SHARC TigerSHARC Blackfin and EZ KIT Lite are registered trade marks of Analog Devices Inc All other brand and product names are trademarks or service marks of their respective owners CONTENTS PREFACE Purpose otf This Manual ode pte dees reac Rand Quidem t c MNT Gn xxiii eter ed Audien ici cts ic tiwl Gadd Gb ae xxiii Konul CODD senes odio iiM D Me HVM aaea xxiv Thats New m This Mantal Lus rtr rtt ERES IR DEPO UE XXV Techies or Customer SRP Pet iude eine eee xxvi entem Mail i TT xxvil Product DUMAO s
22. float32 sub 35912000 127 init devdrvtab 93264 91 init devtab 74208 68 exit 52672 Total Samples 2368803 Figure 3 12 Power Savings Off PDDDYN V PDDDYN V0 V V0 2 F FO The voltage and frequency power scaling ratio derived via this calculation is very close to the power savings ratio obtained via the values displayed in Energy Units columns of Figure 3 11 and Figure 3 12 85 1 2 2 250 250 0 501736 In an application where voltage and frequency are manipulated dynami cally during different functions to achieve a more efficient energy profile proper tallying of energy at changing voltage and frequency settings is handled correctly so overall energy profile improvements can be seen by comparing different profiles of an application at different settings 3 34 VisualDSP 5 0 User s Guide A REFERENCE INFORMATION This appendix includes a glossary on page A 66 and collection of other reference material Take advantage of the many features in VisualDSP so you can speed up program development Sections include e Support Information on page A 2 e IDDE Command Line Parameters on page A 7 Extensive Scripting on page A 8 File Types on page A 12 e Parts of the User Interface on page A 15 e Keyboard Shortcuts on page A 31 e Window Operations on page A 37 Text Operations on page A 44 Online Documentation on page A 49 Online Help on page A 53 Glossary on
23. int Mum Figure 2 22 Viewing Details of an Error Message in Help 2 34 VisualDSP 5 0 User s Guide Environment Promoting Demoting and Suppressing Error Messages You can change the severity level of an error marked D discretionary Refer to the tools documentation for command line switches that override error message severity The Project Options dialog box provides options you can use to override severity A discretionary message can be promoted demoted or suppressed For example you might promote a remark or warning to an error or you might decide to demote an error to a warning or remark Say for example that a condition in the input is crashing the tool You could restrict the severity level of the problem to report an error instead of a fatal error Another way to suppress the reporting of an individual error message is to use pragmas in the input source via the tool s command line For more information about pragmas refer to your processor s VisualDSP C C Compiler and Library manual The following examples demonstrate how to promote demote and sup press messages The source file test c is being compiled include lt stdio h gt int foo void printf In foo n doesn t return a value int main void int x no initial value printf x d n x return foo VisualDSP 5 0 User s Guide 2 35 Output Window Example 1 Compiling from the Command Line
24. processor memory 3 19 grouping processors 2 86 groups multiprocessor 2 85 H halting programs 3 12 hardware specifying 3 5 hardware breakpoints 3 3 about 3 16 latency 3 16 restrictions 3 16 use 3 16 Hardware Breakpoints dialog box 3 16 hardware conditions simulating 1 16 header files 1 30 heaps usage in Expert Linker 1 38 Help about 1 61 bookmarking A 58 categories A 52 context sensitive A 54 copying example code A 57 features and operations A 53 invoking A 51 A 52 keyboard shortcuts A 36 navigating A 54 A 59 printing A 57 searching A 60 window A 53 h files A 12 A 13 h_ files A 13 hpp files A 12 hxx files A 12 I ICEs defined A 73 specifying as platform 3 2 ICE Test 1 18 A 87 icons editor windows 2 18 Pipeline Viewer events 2 91 Project window 2 6 ID processor B 10 I 8 VisualDSP 5 0 User s Guide IDDE 1 2 command line parameters A 7 invoking with command line parameters A 7 source code control 1 50 version A 3 idde exe command line parameters A 7 Idle thread time spent in 2 108 ILEE 3 31 images displaying 2 119 Image Viewer window automation interface 2 120 features 2 119 right click menu 2 121 status bar 2 121 toolbar 2 120 instruction groups Blackfin processors D 41 instruction latencies Blackfin processors D 26 accumulator to data register D 27 instruction alignment unit empty D 33 instructions wit
25. 112038 PowerProfile Mat 43848596 106042 PowerProfile Cal 41471746 96000 float32 adi lt 38028000 84000 float32 to int 33180000 70036 PowerProfile Set 27431639 68036 PowerProfile Mov 26643602 48000 float32 sub 18888000 2879 udiv32 2037437 341 adi ebiu pplyConfig 196800 263 adi pwr Init cons 206955 Total Samples 2373622 Figure 3 11 Power Savings On First we calculate the average Energy for the function by dividing the Energy Units by the number of cycles in the Count column Power Savings On 2160473 5639 383 13 Power Savings Off 4307328 5639 763 84 The ratio of these two numbers 383 13 763 84 is 0 501580 This is the power savings In the following example the ranking measurements are based on an EZ KIT Lite evaluation system configured at 1 2 volts and 250 MHz Having enabled power savings the voltage changes to 85 volts We apply these numbers to the Voltage and Frequency Scaling equation described in EE 229 VisualDSP 5 0 User s Guide 3 33 Energy Aware Programming 563948 float32 mul 430732847 480000 sinf 370920000 307970 int32 to float32 227936804 306000 float32 add 230307136 126039 PowerProfile Mem 98751979 112038 PowerProfile Mat 87445111 106042 PowerProfile Cal 82685403 96000 float32 adi lt 75844000 84000 float32 to int 66168000 70036 PowerProfile Set 46509201 68036 PowerProfile Mov 44939127 48000
26. 2 106 VisualDSP 5 0 User s Guide Environment Trace thread switched history by following the thin green line which winds through the display passing under threads to indicate the running thread at any particular time When a context switch occurs and changes the running thread a vertical green line is drawn from the previously run ning thread to the next running thread When you use the data cursor a yellow triangle to the left of a thread name identifies the currently running thread Window Operations The status bar at the bottom of the plot on the State History page shows the event s details and thread status when the data cursor is enabled Event details include the event type the tick when the event occurred and an event value The value for a thread switched event indicates the thread being switched in or out Right click on the plot and choose Data Cursor to activate the data cur sor which is used to display event and thread status details Based on the event that occurred the thread status changes Press the keyboard s right arrow key or left arrow key to move to the next or previous event When the data cursor hits a thread switched event it moves to the thread being switched in The yellow triangle to the left of the thread name indicates the currently active thread You can zoom in on a region to examine that area in more detail Perform this procedure 1 Hold the left mouse button down while dragging the mous
27. 2 35 INDEX switching among editor windows 2 21 symbols Disassembly window 2 49 editor window 2 18 syntax coloring editor windows 2 19 system components A 4 system configurator VDK defined A 85 system menu A 18 T tagged expressions finding and replacing A 47 Target Load window 2 108 targets 1 15 defined A 85 emulators 1 17 EZ KIT Lite evaluation systems 1 16 platforms 1 17 simulation 1 16 target status messages Output window 2 30 tc8 files A 13 Td interpreter 2 41 menu issuance A 9 running commands A 8 tcl files A 13 technical documentation locating xxxiii terms VisualDSP A 66 text locating using regular expressions A 44 text manipulation keyboard shortcuts A 33 text selection keyboard shortcuts A 34 VisualDSP 5 0 User s Guide I 17 INDEX third party tools 1 2 threads 2 103 defined A 86 idle 2 108 status 2 103 2 107 tracing 2 107 Timer TMR peripheral Blackfin D 8 title bar A 17 components A 16 indicating focus 3 6 TMR see Timer peripheral D 8 toggling breakpoints 3 13 toolbars A 20 built in A 20 button appearance A 27 customization A 21 docked vs floating A 28 Image Viewer window 2 120 list of buttons A 22 plot windows 2 111 shape A 28 tools code analysis 3 7 code development 1 2 command line invocation 1 47 context sensitive Help A 21 debugging 1 20 documentation A 50 file associations 2 14 options 1 26 third
28. 3 11 user tools A 21 INDEX comments rules for A 48 start and stop strings A 48 compiled simulation D 44 preparing a program from a dxe file D 44 compiler 1 28 annotations in editor windows 2 24 file associations for tools 2 14 input files 2 14 options 1 28 1 31 suppressing warnings and remarks 2 37 compiling C programs 1 28 C programs 1 28 conditional breakpoints 3 14 configurations customized 1 56 project 1 56 configurators VisualDSP Configurator 1 17 Configure Simulator Event dialog box B 8 connection type specifying 3 2 Console page about 2 30 constellation plots about 3 22 context switch defined A 68 control menu A 17 A 18 cpp files 2 14 A 12 C programs compiling 1 28 C programs compiling 1 28 critical region defined A 68 CROSSCORE defined A 68 C run time libraries 1 29 VisualDSP 5 0 User s Guide 1 3 INDEX current program counter value ADSP TS101 processors C 8 ADSP TS20x processors C 20 custom board support 2 82 custom build options 1 25 1 59 customizing Output window 2 38 plot windows 2 115 register windows 2 81 toolbars A 21 cxx files 2 14 A 12 D data files 1 30 I O simulation 3 17 plotting 3 19 simulating transfers 1 16 data collection methods 3 18 data logging displaying status in plot windows 2 111 data sets 2 115 definition 2 114 data streams purpose 3 17 data structures 1 13 dat files A 12 debug agen
29. Environment Figure 2 13 shows an editor window with the Editor Tab option enabled ActiveXUnd cpp This file contains CActiveXWnd anc classes used to contain and disple Copyright c 2001 Analog Devices ANB B M MM PB Bg CP wMRAWWAIARAMRWRO 9g 4B 4449 include stdafx h include debugapp h include comdef h Xinclude vdebug h include activexwnd h include utility h include mainfrm h include userprefs h He LDL nent ActiveWnd cp Click a tab to view the source file Figure 2 13 Switching Between Editor Windows Using Editor Tab Mode Context Sensitive Expression Evaluation When a dxe program has been loaded for debugging you can evaluate expressions in an editor window As you move the mouse pointer over a variable with the pointer still on top of the variable VisualDSP evaluates the variable If the variable is in scope the value appears in a tool tip window VisualDSP 5 0 User s Guide 2 23 Editor Windows Viewing an Expression Expressions can be viewed in different ways When the editor window is in mixed mode view an expression by moving the pointer over a register in an assembly instruction The register contents are displayed in a tool tip Highlighting an Expression Highlight an expression in the editor window and then move the pointer on top of the highlighted expression to display its value in a tool tip Compiler Annotations When enabled the compil
30. Help idescasctedtni dudit ptdq A 36 Miscellaneous Fee A 37 bir 14 07 A 37 bxc Per qj DID ttn A 37 Righe Click pa A 38 eral Bate and Resize Pall abe sarriro A 38 Windows Docked ve Floating 1 2 etti pei t etes aod auae ds A 39 Docked Windows A 39 Mouse V MAON rarai inan A ud vedi A 39 Window o 1500 Acn A 42 Standard Windows Buttons saciscinsnisecensoscranaedeadienaecaa A 42 Teet CIPEAN emer A 44 Regular Expressions ys Normal Searches A 44 Specific Special Characters scccseeueinensennlennemaaniousts A 45 special Rules for Seguente cnisricmrscenioinncannee A 46 Repetition and Combination Characters 1 A 46 htt v TD Jq HQ A 47 Tagged Expressions in Replace Operations cccccscavnsmenseesneseseess A 47 Cominent Start and Stop ONES sac cises cro rsctaimcicesinrrsesrsaicenct A 48 Pile LIA OR WMEMMEMAMM A 49 Pringnag Online Documentation 2xksgieletnporbdisbn dit hi pep A 50 xvi VisualDSP 5 0 User s Guide CONTENTS Invoking One Help aoiosbiuitrdimner bab te tkt evtl rt e ta A 51 ISI EA i o c MINOS A 52 EDOINE P e dois Bet n e oma ena ga dU Md MR MU KE A 53 He V A acto ei eee eae A 53 onte Sensitive Help MT ii A 54 Viewing Menu Toolbar or Window Help A 56 Views Dialog Bot Welt ioiosedentetu bini pd iros disti ds A 56 Viewing window Holp Pee n A 57 Copying Example Code From Help sccccsctcesecccacc
31. I3 R3 any processor op using dagreg l 4 lt 1 3 gt RO I3 dreg sysreg 1 1 gt RO LCO sysreg dreg 1 lt 1 1 gt ASTAT RO accreg sysreg 1 1 gt A0 w LCO accreg dreg 1 lt 1 1 gt A0 RO accreg sysreg 1 lt 1 gt A0 w LCO accreg preg 1 lt 1 1 gt A0 w PO D 28 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Table D 20 Register Move Latencies Cont d Description Example cycles stalls gt instruction ADSP BF532 ADSP BF535 accreg sysreg 1 lt 1 gt A0 w LCO accreg accreg 1 lt 1 1 gt Al AO accreg sysreg 1 1 gt A0 w LCO dreg accreg 1 lt 1 1 gt RO L A0 x accreg sysreg 1 1 gt A0 w LCO sysreg accreg 1 lt 1 1 gt ASTAT A0 w accreg sysreg 1 lt 1 gt Al x LC0 math op using accreg as src 1 lt 1 1 gt RI H A0 Al1 accreg sysreg 1 1 gt A0 w LCO POP to accreg 1 lt 1 1 gt A0 w SP POP to dagreg 1 1 gt I3 SP any processor op using dagreg 1 3 lt 1 3 gt RO I3 LOAD POP to preg 1 lt 1 gt P3 SP any processor op using preg 1 3 lt 1 3 gt R0 P3 RO L R1 L R2 L The 10x core considers register halves to be independent so R3 RO H R4 L this condition is not a register hazard VisualDSP 5 0 User s Guide D 29 Multicycle Instructions and Latencies Move Conditional and Move CC Latencies In each of the following cases
32. Interface Compiling test c yields two warning messages cc0117 and cc0549 cc21k c test c test c line 5 cc0117 D warning non void function foo should return a value test c line 10 cc0549 Dj warning variable x is used before its value is set printf x ZdWMn x build completed successfully Notice that the compiler appended the letter D to each warning message indicating that the message is discretionary Example 2 Promoting Warnings to Errors For example typing cc21k c test c Werror 549 in a command win dow promotes one of the two warnings cc0549 to an error cc21k c test c Werror 549 test c line 5 error cc0117 D warning non void function foo should return a value test c line 10 cc0549 D error variable x is used before its value is set printf x ZdWMn x 1 error detected in the compilation of test c cc2lk Fatal Error Compilation failed 2 36 VisualDSP 5 0 User s Guide Environment Example 3 Demoting Messages to Remarks You can demote messages to remarks By default the compiler does not display anything less significant than a warning The Wremarks flag in the following command outputs the two warnings plus additional remarks cc21k c test c Wremarks The Wremark 549 117 flag in the following command demotes two spe cific messages to remarks The command produces no output because all the messages a
33. Restarting the DIGEREUI ansoveustedestierde bM te Muri E EOM HE 3 12 Performing a Restart During Simulation 1 men 3 12 Performing a Restart During Emulation 1 2 3 13 bor Us D PENNE RR 3 13 Unconditional and Conditional Breakpoints 3 14 Automate Bees knots M 3 14 TE SNE am 3 15 Fish ee Breakpoint ee eee 3 16 E e Mn 3 16 rr o MM 3 16 Bunobome DE oei uva visum Fn ni Rui DM UR SER UE 3 16 ini J V7 ne 7 3 17 Inpur Ourpac Simulation Dara Streams 542p Rr euis 3 17 VisualDSP 5 0 User s Guide xiil CONTENTS Do 3 19 PI ETE ssa sa cesar tara dtp CoD IMMANE DUM t EE 3 20 IET MUT MNT NIU E RENT 3 21 EX PNE eee 3 21 Constellation unc e eei 3 22 Eye Diagrami AHO G 3 23 Tar CA y A 3 24 Spectora go MET T 3 26 PR DII oodd xtd dun iiia basia Mus 3 26 Stand Alone Flash Programmer sessirnir 3 28 cd o 9 3 29 Flash Programmer Ponce cicada eens 3 29 r gr f 3 30 Flash Programmer Window fe 3 30 cami lit Hel cn ror senienas 3 31 BRE a A T A OTO 3 31 io Dr H A 3 31 REFERENCE INFORMATION Support Info viroii desti aS M edis UU IN Ed TERENS A 2 IDDE Command Line Durameteis 122 2 ait ane te d Et aad ki sr Quads A 7 Ext
34. The jump is unpredicted because the branch target buffer is disabled in this particular example C 16 VisualDSP 5 0 User s Guide Aborted stages in the fetch pipe are marked with an BM and aborted Simulation of TigerSHARC Processors instructions in the execution pipe are marked with an fq x Cycle F1 F2 F3 F4 PD D I ale 2 10 j n y yi j ki 0X1 xr3 r2 B 11 x j n vB iB ki ox1 zr3 r2 BI j0 0X1 xr r4 r3 12 n x j n jB kli 0X1 xr3 r2 Bi IB j2 0X6 r13 r5 r3 13 n n x j Il j2 j2 0X1 xr9 B B B ki 0X1 xr3 r2 9 r4 14 X Oy IF njle JUMP loop B B B ki 0Xi xr3 r2 4 r4 15 ke BEA 1 B B ki 0Xi xr3 r2 0 r4 16 y v kB Be n IB ki 0X1 xr3 r2 4 r4 17 y vy v ke amp BB j2 j2 0X1 xr9 r2 18 y y y ya El Bee IF njle JUMP loop ki 19 y vy v v M BS ES Es 20 n y yl y j ki 0X1 x3 2 IER ER ER ER 21 j n y y I j2 j2 0X1 xr9 ES ES LE 22 4 EB OB M IF njle JUMP loop Be 23 v XE ES EH B 24 y v ke E n ki 0X1 xr3 r2 4 r4 lt Figure C 11 Abort Due to an Unpredicted Change of Flow VisualDSP 5 0 User s Guide C 17 ADSP TS20x Processors Abort Due to Mispredicted Change of Flow In the following example an abort appears at stage E2 because of a mispredicted change of flow at the end of a loop predicated on a compute block condition Cycle ri r2 rs
35. The priority of the BTC can impact the response time from when the host requests data and the processor responds Once the processor begins to service the request interrupts can still be serviced by the processor BTC performance can be affected by the frequency of system interrupts BTC Memory Window The BTC Memory window lets you view background telemetry channel contents in real time The window displays the contents of the address that you want to see Change the window s view to meet your needs VisualDSP 5 0 User s Guide 2 75 Debugging Windows Open this window by choosing View Debug Windows and BTC Memory Figure 2 51 shows the contents of a specified channel only for example Channell L2 BTC Memory F0002000 F0002010 F0002020 F0002030 F0002040 F0002050 F0002060 F0002070 F0002080 F0002090 F00020A0 F00020B0 F00020C0 F00020D0 F00020E0 03020101 13121110 23222120 33323130 43424140 07060504 0b0a0908 17161514 1b1ai918 27262524 2b2a2928 37363534 3b3a3938 47464544 4b4a4948 53525150 57565554 5b5385958 63626160 73727170 83828180 93929190 a3a2ala0 b3b2b1ib0 c3c2clc d3d2did0 e3e2ele 67666564 6b6a6968 77767574 7b7a7978 87868584 8b8a8988 97969594 95949998 a7a6a5a4 abaaa9a8 b b6b5b4 bbbab9b8 c 7c6c5c4 cbcac9c8 d 7d6d5d4 dbdad9d8 e 7e6e5e4 ebeae9e8 Of0e0d0c 1fleldic 2f2e2d2c 3f3e3d3c 4f4e4d4c 5f5e5d5c 6f6e6d6c 7f7e7d7c 8f8e8d8c 9f9e9d9c af
36. You can view context sensitive Help information pertinent to your current activity for various items toolbar buttons menu commands windows and dialog box controls in VisualDSP A 54 VisualDSP 5 0 User s Guide Reference Information Move through viewed topics Jump to the ADI DSP tools Web site E YisualDSP 3 0 Help for Blackfin DSPs Hide Locate amp Print Options C Run Time Libraries Note You must run VisualDSP to use the C run time libraries VisualIDSP does not support C The C and C run time libraries are collections of functions macros and class templates that can be Open a bookmarked topic Figure A 24 Help Window Navigational Aids Table A 26 Standard Microsoft HTML Help Buttons Button Purpose Hides the Help window s left pane This button narrows the Help window Displays the Help window s left pane This button restores a full view after you click Hide Show Highlights the name of the current topic on the Contents pane After you jump around the Help system this button shows the cur rent topic s relation to other topics Locate Note The Locate mechanism does not operate at all times It oper ates after using a search but does not operate after using the index VisualDSP 5 0 User s Guide A 55 Online Help Viewing Menu Toolbar or Window Help To view Help information for a menu toolba
37. for data initialization dlo Debugging files Binary output files from the linker in dxe ELF DWARE format ov l sm A 12 VisualDSP 5 0 User s Guide Reference Information Table A 2 Files Used With VisualDSP Contd Extension Name Purpose map Linker memory map file Optional output for the linker This text file contains memory and symbol infor mation for executable files Wel Tool Command Language Tcl scripting language files used to script tc8 files work obj Assembled object file Previous releases only replaced by doj Output of the assembler Ist Listing file Optional file output by the assembler bnm Loader format files The loader s output in ASCII format h Different varieties exist Used to create ldr boot PROMS hd PROM format files The loader s output in ASCII format s Different varieties exist Used to create Stk boot PROMs ach Architecture file Used in previous releases only replaced by 1df txt Linker command line file Used in previous releases only replaced by 1df ASCII text file that contains command line input for the linker exe Debugging file Used in previous releases only replaced by DXE exe Compiled simulation file Enables faster execution speed compared to a standard dxe program vdk VisualDSP kernel Enables VDK support support file js Script files Enable you to perform script work for vbs test applications Scr
38. invalid fetch This condition occurs when an instruction fetch pipe alignment buffer is full or the fetch pipe was flushed because of an abort in the execution pipeline Stall A stall has been generated at a stage of the pipeline Wait An instruction at a stage of the pipeline waits to be executed wl because of a stall down the pipeline Bubble The pipeline stage contains an invalid instruction as a result of B a stall up the pipeline Hit An instruction at a stage is a branch target buffer hit The address of the last slot of the instruction line was found in the branch target buffer The icons in the above table are listed in descending priority When more than one event occurs at a certain stage at a certain cycle only one icon displays the icon with highest priority For example if an instruction that was a Branch Target Buffer hit is aborted the Abort icon J appears VisualDSP 5 0 User s Guide 2 91 Debugging Windows Pipeline Instruction Event Details To view event details press and hold down the keyboard s Ctrl key and move the mouse pointer over the cell in the Pipeline Viewer window The pipeline event details appear in a tool tip message box as shown in Figure 2 61 S N LINK 0x44 Details for stage ADDRESS cycle 6369 Address Invalid Instruction Invalid Event 0 Type Stall Cause IAU empty Details Stall in stage DEC RO R1 RO 12 N LINK LINK LINK LINK LINK
39. original default settings e You can change the name of a user defined toolbar but not the name of a built in toolbar For example the File toolbar cannot be changed to a different name Refer to VisualDSP Help for details Status Bar The status bar which is located at the bottom of the main application window provides various informational messages Figure A 15 shows examples of information displayed on the status bar VisualDSP 5 0 User s Guide A 29 Parts of the User Interface Ready Halted Step one line Halted 00000000 For Help press F1 Line 21 Col 1 NUM Z7 Figure A 15 Status Bar Appearance Depends on Context The type of information that appears in the status bar depends on your context what you are doing Moving the mouse pointer over a toolbar button or a menu bar command displays a brief description of the button or command Halting program operation with a Halt command displays the address where the program halted When using script commands the status bar provides information such as when the menu item has focus While editing a file the right side of the status bar displays editor window information as described in Table A 7 Table A 7 Status Bar Information While Editing Item Indicates Line Cursor current line number Col Cursor current column number CAP The keyboard s Caps Lock key is latched down NUM The keyboard s
40. r4 pp p r a E E2 oOo J 100 E x x B nu M H yri r 4 r3 101 El B El x W I B i H IF nyaeq JUMP loop2 nop i BS EISE HB AH 5 j10 0 103 x El E El y H J B yr3 r3 r2 104 Bx El B VE 7 B yz3 r3 r2 105 IH VSVSBB B ES yr4 r4 r3 106 H y iff v E WII y H IF nyaeq JUMP loop2 nop 107 XS ES ES OE BC Bmp o v 108 n ng B B n n n yr3 r3 r2 109 j n n EN B B BB r r3 r2 110 E j n ni B BB yrs r4 r3 111 n Xx j n d n n IF nyaeq JUMP loop2 nop 112 n n x j y x n 113 y n n x X f x B 114 j y n n j 1 1 BR B Figure C 12 Abort Due to Mispredicted Change of Flow C 18 VisualDSP 5 0 User s Guide Simulation of TigerSHARC Processors Branch Target Buffer Hits In the following example the first iteration of the loop causes a four cycle penalty because of the unpredicted change of flow On the second itera tion the change of flow instruction was found in the branch target buffer and is marked with an Bl The branch is predicted and taken and no penalty is exacted for the change of flow EI Cycle F1 F2 F3 F4 PD D TANE EZ j 76 j ji y n W yri r4 r3 1 yr3 0X1 77 Ed EB ER Wii 2213 B yr2 0 78 Bee A IF nyaeq JUMP loop2 B j10 0 79 E amp amp BA 1 B yr3 r3 r2 80 Wy j BB n B yr3 r3 r2 81 My iM y jE K BA yr4 r4 r3 82 iy ily H Bee IF nyaeq JUMP loop2 nop 39 Wy M j 5 i100
41. route through the pipeline Disassembly disassembles the instruction at that address and shows the opcode mnemonic similar to a Disassembly window Use this format to determine why a particular event is occurring Opcode format is the hexadecimal representation of the disassembly mnemonic Save Opens the Save As dialog box where you export the collected data to a text file Properties Opens the Pipeline Viewer Properties dialog box where you view and specify properties buffer and display depth display format column widths grid lines and the appearance of stages for the Pipeline Viewer window You can also modify window colors VisualDSP 5 0 User s Guide 2 89 Debugging Windows Pipeline Viewer Properties Dialog Box From the Pipeline Viewer Properties dialog box you can specify how the Pipeline Viewer window displays pipeline events Display is specified in depth and format Table 2 20 describes the Pipeline Viewer properties Table 2 20 Pipeline Viewer Properties Property Item Purpose Buffer depth Specifies the total number of pipeline samples to retain at any time When this buffer overflows the oldest data shifts out to make room for new samples The default is 100 Display depth Specifies the number of samples to display Adjust this number to meet your performance needs The lower the depth the faster the target can run This option cannot be set greater than the Buffer depth The default is 2
42. window s Console view from a menu from an editor window or from a user tool Refer to Script Command Output on page 2 40 for details on scripting Command window issuance Load a script from a command window with an idde command by typing the following idde f script filename Optionally add s and the session name to specify a previously created session If no session name is specified the last session is used If the script encounters an error during execution VisualDSP automatically exits Output window issuance Load a script from the Output window s Console view by typing one of the following commands For the Microsoft ActiveX script engine type Idde LoadScript script_filename For Tcl type source filename Similar to C C use a backslash as an escape character If you specify paths in the Windows environment you must escape the escape character as shown in this example A 8 VisualDSP 5 0 User s Guide Reference Information c my_dir my_subdir my_file vbs For Tcl only you may also use forward slashes to delimit directories in a path as shown in this example source c my_dir my_subdir my_file tcl Command execution is deferred until a line is typed without a trailing backslash This permits the entry of an entire block of code or entire procedure for the script interpreter to evaluate at once Use the built in Idde object to easily access the properties and methods of t
43. xxii VisualDSP 5 0 User s Guide PREFACE Thank you for purchasing Analog Devices Inc development software for digital signal processing DSP applications Purpose of This Manual The VisualDSP 5 0 User s Guide describes the features components and functions of VisualDSP Use this guide as a reference for develop ing programs for SHARC TigerSHARC and Blackfin processors This manual does not include detailed procedures for building and debug ging projects For how to information refer to VisualDSP online Help and the VisualDSP 5 0 Getting Started Guide Intended Audience The primary audience for this manual is a programmer who is familiar with Analog Devices processors This manual assumes that the audience has a working knowledge of the appropriate processor architecture and instruction set Programmers who are unfamiliar with Analog Devices processors can use this manual but should supplement it with other texts such as the appropriate hardware reference and programming reference manuals that describe your target architecture VisualDSP 5 0 User s Guide xxiii Manual Contents Manual Contents The manual consists of Chapter 1 Introduction to VisualDSP Describes VisualDSP features license management project development code development tools and DSP projects Chapter 2 Environment Focuses on window features operations and customization for the main window and de
44. 00D1C0 34021 34021 00D1C2 34021 34105 E Figure 2 47 SHARC Memory Window in Unsigned Integer Format Memory Window Right Click Menu Memory windows provide a right click menu Choosing the Select For mat command enables you to change the display s number format Figure 2 48 shows the formats available for SHARC processors Available formats depend on the processor Expression Tracking in a Memory Window While you are stepping through code a memory window configured for expression tracking shows the memory at the address specified by the expression The title bar displays the tracking expression See Figure 2 49 When the target halts the tracking expression is evaluated and the mem ory window jumps to that address For example when the tracking expression is PC the memory window behaves like the Disassembly window Rules na memory window several expressions for tracking can be configured na memory window only one expression the active expression can be tracked at any time VisualDSP 5 0 User s Guide 2 69 Debugging Windows Go To Ctrl G Dump Fill Lock Columns v Address Bar Select Format A v Hexadecimal 7 Binary New Tracking Octal v Allow Docking Signed Integer Close Unsigned Integer Floating Point 32 bit Float In Main Window E Signed Fractional Unsigned Fractional Signed Integer 32 bit Signed Integer 16 bit Unsigned Integer 32 bit Availabl
45. 5 3 10 s files 2 14 A 12 s_ files A 13 shadow write FIFO anomaly B 2 shortcut keys See keyboard shortcuts short word anomaly B 4 SIMD FIFO B 3 VisualDSP 5 0 User s Guide I 15 INDEX simulating See also simulation booting 1 16 data transfers 1 16 external interrupts 1 16 hardware 1 16 input output data 3 17 random interrupts 1 16 SHARC processors B 1 TigerSHARC processors C 1 simulation See also simulating Blackfin processors D 1 compiled Blackfin D 44 debug session management 3 3 limitations ofsoftware models Blackfin D 7 loading a processor B 10 options B 1 platforms 1 17 restarting programs 3 12 SPI in slave mode B 13 targets 1 16 Timer TMR peripheral Blackfin D 8 UART peripheral in Blackfin D 7 vs emulation 3 3 simulator ADSP 21065L processors B 4 B 7 ADSP 2106x processors B 4 B 10 ADSP 21161 processors B 10 B 13 ADSP 2116x processors B 2 B 3 B 10 ADSP 21x6x processors B 2 B 7 B 11 ADSP TS101 processors C 1 ADSP TS20x processors C 12 Blackfin peripheral support D 2 instruction timing analysis ADSP TS101 processors C 2 instruction timing analysis ADSP TS20x processors C 12 sampling PC 3 8 simulator instruction timing analysis ADSP BF531 ADSP BF532 ADSP BF533 ADSP BF561 processors D 19 ADSP BF535 processors D 9 simulators as targets 1 16 Simulator submenu options SHARC B 10 simulator targets linear profiling 3 8 single steppi
46. 6212 Follow the prompts and a list of data sheet code numbers will be faxed to you If the data sheet you want is not listed check for it on the Web site XXXIV VisualDSP 5 0 User s Guide Preface Notation Conventions Text conventions in this manual are identified and described as follows Example Description Close command File menu Titles in reference sections indicate the location of an item within the VisualDSP environment s menu system for example the Close command appears on the File menu this that Alternative required items in syntax descriptions appear within curly brackets and separated by vertical bars read the example as this or that One or the other is required this that Optional items in syntax descriptions appear within brackets and sepa rated by vertical bars read the example as an optional this or that this Optional item lists in syntax descriptions appear within brackets delimited by commas and terminated with an ellipse read the example as an optional comma separated list of this SECTION Commands directives keywords and feature names are in text with letter gothic font filename Non keyword placeholders appear in text with italic style format Note For correct operation A Note provides supplementary infor mation on a related topic In the online version of this book the word Note appears instead of this symbol Cau
47. 8 bit 16 bit and 32 bit processors VisualDSP currently supports the following TigerSHARC processors ADSP TS101 ADSP TS201 ADSP TS202 ADSP TS203 SHARC ADSP 21xxx Processors The name SHARC refers to a family of high performance 32 bit floating point processors that can be used in speech sound graphics and imaging applications VisualDSP currently supports the following SHARC processors ADSP 21020 ADSP 21060 ADSP 21061 ADSP 21062 ADSP 21065L ADSP 21160 ADSP 21161 ADSP 21261 ADSP 21262 ADSP 21266 ADSP 21267 ADSP 21362 ADSP 21363 ADSP 21364 ADSP 21365 ADSP 21366 ADSP 21367 ADSP 21368 ADSP 21369 ADSP 21371 ADSP 21375 Blackfin ADSP BFxxx Processors The name Blackfin refers to a family of 16 bit embedded processors VisualDSP currently supports the following Blackfin processors VisualDSP 5 0 User s Guide xxvii Product Information ADSP BF531 ADSP BF532 ADSP BF533 ADSP BF535 ADSP BF561 ADSP BF534 ADSP BF536 ADSP BF537 ADSP BF538 ADSP BF539 ADSP BF522 ADSP BF525 ADSP BF527 ADSP BF542 ADSP BF544 ADSP BF548 ADSP BF549 Product Information You can obtain product information from the Analog Devices Web site from the product CD ROM or from the printed publications manuals Analog Devices is online at www analog com This Web site provides information about a broad range of products analog integrated circuits amplifiers converters and digital signal processors MyAnalog com M
48. Ba Ea Ea ey 84 Hs M s yr3 v3 r2 El E E 85 Ej ily iM OW yri r4 v3 BB 86 jS GN WI yr4 v4 c3 B B 87 Ms jH j Hosen JUMP loop2 B j10 0 88 Wy iN s 30500 NH B v3 3 c2 83 By j y j y yr3 r3 r2 m IB yr3 r3 r2 90 EE EEF SN E yrs n6 Ll W yri r4 r3 x Figure C 13 Branch Target Buffer Hits e e e e Pipeline Viewer and Disassembly Window e Operations This section includes the following topics Current Program Counter Value Stepping VisualDSP 5 0 User s Guide C 19 ADSP TS20x Processors Current Program Counter Value The program counter PC value marked by gt in the Disassembly win dow is the address of the instruction at stage E2 When a breakpoint is set at a certain address the simulator halts after the instruction at this address is executed at stage E2 You can specify which instruction the simulator executes next by manually changing the program counter value in the PC Register window Note however that the current instruction indicated by gt in the Disassembly window is executed prior to the user specified instruction When you change a PC value the simulator flushes the pipeline and aborts all its instructions After the pipeline is flushed normal execution resumes from a memory address indicated by the new PC value The simulator contin ues to run until an instruction at the new PC reaches stage E2 of the pipeline Manually changing the PC value du
49. Group Files You can save project group information to a file so you can restore that project group and share it conveniently VisualDSP 5 0 User s Guide 1 49 Processor Projects The project group file dpg which is in XML format contains a list of project entries Each project entry corresponds to a project in the group and contains project information including the path to the project file dpj and its dependent projects Batch build specifications are saved in the dpg file for later use so you can load and execute them without re specifying the same build targets In the Project window the root node shows the project group s file name without an extension Source Code Control SCC VisualDSP includes Source Code Control SCC which enables you to use the Microsoft Common Source Code Control MCSCC interface to connect the VisualDSP IDDE to SCC applications installed on your machine Various SCC products such as Microsoft Visual SourceSafe or PVCS Version Manager support the MCSCC interface From VisualDSP interface you can access the commonly used features of these applications without leaving the IDDE You can launch the SCC application from the plug in menu to use non supported features When you create a project you are prompted to add the project to SCC When you open a project in the IDDE the SCC plug in connects to the selected SCC application and locates a controlled copy of the project and its sou
50. Lite evaluation board or an emulator Your system can include multiple targets VisualDSP 5 0 User s Guide 1 15 Project Development For example the JTAG emulator communicates with one or more physical devices over the host PC s PCI bus and the HPUSB ICE emulator communicates with a device via the PC s USB port Simulation Targets A simulation target such as the ADSP 2106x Family Simulator is a pure software module and does not require the presence of a processor or any related hardware for debugging During simulation VisualDSP reads an executable DXE file and exe cutes it in software similar to the way a processor executes a processor image in hardware VisualDSP simulates the memory and I O devices specified in an 1df file Some processors permit you to run a compiled simulation Refer to Compiled Simulation on page D 44 Hardware Simulation When connected to a simulation target in VisualDSP you can simulate the following hardware conditions Random interrupts that can occur during program execution Data transfer through the processor s I O pins e Processor booting from a PROM or host processor Setting up VisualDSP to generate random interrupts during program execution enables you to exercise interrupt service routines ISR in your code EZ KIT Lite Targets An EZ KIT Lite target is a development board used to evaluate a particular processor Analog Devices provides EZ KIT Lite evaluation sy
51. Num Lock key is latched down SCRL The keyboard s Scroll Lock key is latched down A 30 VisualDSP 5 0 User s Guide Reference Information Keyboard Shortcuts VisualDSP includes keyboard shortcuts also called shortcut keys for commonly used operations These keyboard shortcuts appear in the tables below You can also access and run commands by Clicking on menu items and commands in the menu bar Clicking toolbar buttons Right clicking from a particular context such as from the Project window Clicking configured user tools for example Al Clicking buttons in dialog boxes Running scripts via the File menu Output window or editor window Choosing a command from a control menu Working With Files When working with files use the keyboard shortcuts listed in Table A 8 Table A 8 Keyboard Shortcuts for Working With Files Action Key s Open a new file Ctrl N Open an existing file Ctrl O Save a file Ctrl S Print a file Ctrl P VisualDSP 5 0 User s Guide A 31 Keyboard Shortcuts Table A 8 Keyboard Shortcuts for Working With Files Contd Action Key s Go to the next window F6 Go to the previous window Shift F6 Moving Within a File To move within a file use the keyboard shortcuts listed in Table A 9 Table A 9 Keyboard Shortcuts for Moving Within a File Action Key s Move the cursor to the left one character L
52. Ox TIME Oxes IIX Iadi X 1Hk wr LH 17 r i s i 1i iix Love om 6376 F Fli xl H FL H 0 s n M ZIHE M D ren n ree LI 12 100 is n 6378 Call ivaz F Fl FLH oO RI FE 4 fm ren LI s 12 gt r 11 amp 3 0 U U Fo Fle x F1 H wn mk nm NE n 0 W owim ia eren gt r Lu 6382 EE 1 Ox LyX Lil W ise 0x 0 I IHE 0x 0 c wn TEES lee gt IK Ha c B ok nm E 63 gt FE 1 Ox LIKE 0x20 W IHE 0x20 wt 1i lis Ii IK nem YJ w nm 6326 PE FE 1 Ox LJ la LIKE 0x20 X IHE 0x20 wa CEE pe c7 1h Is Y ow nm Figure 2 60 Pipeline Viewer Window For SHARC processors the Disassembly window displays symbols F D or E indicating an instruction s pipeline stage Column headings refer to pipeline stages for the processor s core registers Refer to your processor s hardware documentation for details 2 88 VisualDSP 5 0 User s Guide Environment Right Click Menu of Pipeline Viewer Window The Pipeline Viewer window s right click menu provides the commands described in Table 2 19 Table 2 19 Pipeline Viewer Right Click Menu Item Purpose Enabled Enables and disables collection of pipeline data while running or step ping Clear Empties the current sample buffer Display Format Controls the display format of data Address shows the hexadecimal formatted address of the pipeline stage for example 0x1234 Use this format to follow a particular address
53. Program Counter Value iusoosuestenddenie ri tace C 20 Sepping A C 21 ru rou Rr in MN C 22 SIMULATION OF BLACKFIN PROCESSORS Pernpheral Support in Simulators ccrscscrennsnnsenriosars D 2 Special Considerations for Porinbenls 5e sec t btt duit D 7 Universal Asynchronous Receiver Transmitter Peripheral D 7 VisualDSP 5 0 User s Guide xix CONTENTS Ticker TMR Peripheral ccresenonnorsnennon rnn D 8 Simulator Instruction Timing Analysis for ADSP BF535 Processors D 9 SO REONE ariii a A A d Esp D 9 E E a E E E dam Rede E D 10 Pipeline Viewer Window Examples crorrorssngvininticinovii D 11 Pipeline Viewer Window Messages iussssecettrrr eti ertet i nous D 12 Pipeline Viewer Detail View Stall Event Messages D 12 Kils Deped Menager couteau rebus beditrepel bebida D 16 Mo l gcycle Instructions 1oseoducmdidve aeui dust xti n n Edd D 17 Abbreviations in Pipeline Viewer Messages sccccsccsccsscoscesucccsons D 17 Simulator Instruction Timing Analysis for ADSP BF531 ADSP BF532 ADSP BP333 aud ADSP BF561 Processors 22 niae bat ituabis D 19 ol roo DT D 19 ROLE ocellos ied TS D 20 Pipeline Viewer Window Examples 11 5 antri Sa Ere d eid onpds D 20 Mul cvcle Instructions and Latencles ioo pti operit ttd b eU P dEd D 22 Mucio Distractions ence pd En eee D 22 Push Multiple or Pop Bl ple iasecizsevsshesasap epe pitt tani D 22 22 Bic Mubiply modulo 292 1seiuten pongas a aepo
54. Project Options dialog box For SHARC and TigerSHARC projects use the Create LDF Wizard to create and customize a new 1df file When opened in a project that already includes an 1df file Expert Linker parses the 1df file and graphically displays the target processor s memory map and the object mappings The memory map appears in the Expert 1 34 VisualDSP 5 0 User s Guide Introduction to VisualDSP Linker window Figure 1 4 on page 1 36 Use this display to modify the memory map or the object mappings When the project is ready to be built Expert Linker saves the changes to the 1df file Expert Linker can graphically display space allocated to program heap and stack After you load and run your program Expert Linker indicates the used portion of the heap and stack You can then reduce the size of the heap or stack to minimize the memory allocated for the heap and stack Freeing up memory in this way enables it to be used for storing other things like processor code or data You can launch the Expert Linker see Figure 1 4 from VisualDSP in three ways e Double click the 1df file in the Project window e Right click the 1df file in the Project window to display a menu and then choose Open in Expert Linker From the VisualDSP main menu choose Tools Expert Linker and Create LDF Expert Linker Window The Expert Linker window Figure 1 4 enables you to modify the mem ory map or the object mappings
55. SP L s Mi e Mt spi 22 R6 0 R7 0 SP L s Mri e Mi e 23 P5 0 R6 R7 0 L sP Mri e Mi e 24 P4 0 PS 0 R6 R7 20 r sei ur se1 25 P3 0 P4 0 PS 0 R6 0 R7 0 M s 26 NOP P3 0 P4 0 PS 0 R6 0 R7 0 27 NOP NOP P3 0 P4 0 PS 0 R 0 Figure D 3 Example of a Multicycle Instruction in the Pipeline Viewer For details about multicycle instructions see Multicycle Instructions and Latencies on page D 22 Abbreviations in Pipeline Viewer Messages Table D 9 shows abbreviations that may appear in the Pipeline Viewer window VisualDSP 5 0 User s Guide D 17 Simulator Instruction Timing Analysis for ADSP BF535 Processors Table D 9 Abbreviations in the Pipeline Viewer Window Abbreviation Meaning ALU Arithmetic Logic Unit operations Logical ops Bit ops Shift Rotate ops Arithmetic ops excluding Mult Vector ops excluding Mult MAC ALU2op A two operand ALU instruction AQreg CC2dreg CC register move to a dreg ccMV Conditional move CCreg CC register This multipurpose flag typically holds the result of an arithmetic comparison DAG Data Address Generator unit Dagreg A DAG register for example P5 0 13 0 M3 0 B3 0 and L3 0 dreg Data register for example R7 0 or A1 0 Dsp32alu A 32 bit DSP ALU instruction EXU Execution unit IAU Instruction Alignment U
56. about makefiles go to http www gnu org manual make A project can have multiple makefiles but only one makefile can be enabled active The project in Figure 1 10 includes an active makefile indicated by Er Js The active makefile with its explicit gmake command line builds the project When no makefile is enabled for a project VisualDSP uses specifications configured in the Project Options dialog box VisualDSP 5 0 User s Guide 1 51 Processor Projects Project 21050 9 5 dpj mj xj Source Files Header Files CJ Linker Files En dot product asm mak a TS Project Figure 1 10 Makefile in Project Window You can view a makefile s command line To change the makefile s target use the Configuration box shown in Figure 1 11 myMakeFite Target e amp 7 1 0 6 GG RD Figure 1 11 Makefile in Configuration Box When you close a project the Make commands and the target list associ ated with each makefile are serialized in the project DPJ file Rules You can enable only one makefile when building a project If you enable more than one makefile VisualDSP generates an error message After you build your project with an external makefile the executable file is not automatically loaded even when this option is configured 1 52 VisualDSP 5 0 User s Guide Output Window Introduction to VisualDSP Make command error messages and standard output appea
57. added to the display An entity is removed from the display when it is destroyed Initially information is displayed in a collapsed state which shows only the name of the entity and in some cases its current state When a thread is in the Ready state its priority displays Clicking the plus sign pep next to the name of an entity expands the view The possible thread states are as follows Running Ready e SemaphoreBlocked EventBlocked DeviceFlagBlocked MessageBlocked e SemaphoreBlockedWithTimeout e EventBlockedWithTimeout e DeviceFlagBlockedWithTimeout e MessageBlockedWithTimeout Sleeping Unknown See the VisualDSP Kernel VDK User s Guide for details 2 104 VisualDSP 5 0 User s Guide Environment VDK State History Window VDK state history is available only for executable files with VDK support During execution of a VDK enabled program if Full Instrumentation is specified for the project thread and event data are collected in a history buffer When a running program is halted the history buffer data is plot ted in the VDK State History window described in Figure 2 70 Some features become available only when the data cursor is enabled Open this window by choosing View VDK Windows and History The VDK State History window has the following components Acursor Horizontal bars representing threads The bar color indicates the thread state e A green vertical line indicating a thread
58. and data memory transfers SHARC processors only Locals on page 2 54 All local variables within a function Use this window with Step or Halt commands to display variables as you move through your program Linear Profiling on page 2 55 Simulation only Samples of the target s PC register taken at every instruction cycle which provides an accurate picture of where instructions were executed Linear profiling is much slower than statistical profiling Statistical Profiling on page 2 55 JTAG emulation only Random samples of the target processor s program counter PC and a graphical display of the resulting samples showing where the application spends time Call Stack on page 2 63 A means of moving the call stack back to the previous debug context Register on page 2 78 Pre configured windows display current values of registers You can change register contents and change the number format VisualDSP 5 0 User s Guide 2 43 Debugging Windows Table 2 10 Debugging Windows Contd Window Provides Custom Registers on page 2 81 User defined windows display the values of registers Select the Analog Devices processor memory mapped registers MMRs registers that you want to monitor Custom Registers on page 2 82 Custom board support Display contents of registers on custom boards View any register not just Analog Devices processor memory
59. and device drivers An RTOS enables structured scalable and expandable processor application development while hiding OS complexity rebuild all See build registers For information on available registers see the corresponding pro cessor documentation or view the associated online Help release configuration You can accept the default set of options or you can specify the options you want and save them The configuration refers to the specified options for all the tools in the tool chain See also Configuration reset This command resets the processor to a known state and clears processor memory VisualDSP 5 0 User s Guide A 81 Glossary restart This command sets your program to the first address of the inter rupt vector table Unlike a reset a restart does not reload memory right click This action opens a right click menu sometimes called a context menu pop up menu or shortcut menu The commands that appear depend on the context what you are doing Right click menus provide access to many commonly used commands round robin scheduling For VDK a scheduling scheme whereby all threads at a given pri ority are given processor time automatically in fixed duration intervals Round robin priorities are specified at build time scheduler For VDK a kernel component responsible for scheduling system threads and interrupt service routines VDK is a priority based kernel in which the highest prior
60. and minibank a 1 cycle stall is incurred IO is address 0x002348 I1 is address 0x002994 R1 R4 L R5 H IS R2 I0 I1 R3 lt 1 cycle stall due to a collision in minibank 3 A collision occurs regardless of whether the accesses are both loads or a load and a store If the first access is a load DAGO and the second is a store DAG1 the cycles incurred are seen by the store buffer see Store Buffer Overflow on page D 39 When DCBS is 0 and Addr1 14 12 Addr2 14 12 a collision occurs When DCBS is 1 and Addr1 23 13 12 Addr2 23 13 121 a collision occurs D 38 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Memory Mapped Register MMR Access A read from any MMR space on core and off core results in a 2 cycle stall because the Blackfin processor architecture must wait for acknowl edgement from the peripherals mapped to the MMRs being accessed IO contains an address between OxFFCO0000 and OxFFEO00000 R2 I0 In Supervisor Mode lt 2 cycle stall System Minibank Access Collision A system access occurs when an external device such as another processor in a multiple core system accesses the Blackfin processor s L1 memory Whenever the system accesses a minibank currently being accessed by the core a 1 cycle stall is incurred because system memory accesses have higher priority than core accesses Store Buffer Overflow The store buffer is a 5 entry FIF
61. as WinZip to decompress downloaded files Embedded Processing amp DSP Knowledge Base Search all our technical documents everything from application notes data sheets questions and answers to code examples manuals and more Point your browser to the following Analog Devices Web site http search analog com DSPKB home aspx Printed Manuals For general questions regarding literature ordering call the Literature Center at 1 800 ANALOGD 1 800 262 5643 and follow the prompts Hardware Tools Manuals To purchase EZ KIT LiteTM and In Circuit Emulator ICE manuals call 1 603 883 2430 The manuals may be ordered by title or by product number located on the back cover of each manual VisualDSP 5 0 User s Guide xxxiii Product Information Processor Manuals Hardware reference and instruction set reference manuals may be ordered through the Literature Center at 1 800 ANALOGD 1 800 262 5643 or downloaded from the Analog Devices Web site Manuals may be ordered by title or by product number located on the back cover of each manual Data Sheets All data sheets preliminary and production may be downloaded from the Analog Devices Web site Only production final data sheets Rev 0 A B C and so on can be obtained from the Literature Center at 1 800 ANALOGD 1 800 262 5643 they also can be downloaded from the Web site To have a data sheet faxed to you call the Analog Devices Faxback System at 1 800 446
62. can specify data processing options that determine sampling rate triggering and the data processing algorithm you want The following procedure assumes that the Settings dialog box is open To specify data processing for a data set 1 Click the Data Processing tab Figure A 27 Example Boolean Search To find information with a full text search 1 Click the Help viewer s Search tab 2 In Type in the word s to search for type the word or phrase you want to find 3 Select Search previous results to narrow the search 4 Select Match similar words to find words that are similar to the search string 5 Select Search titles only to search for words in topic titles only 6 Click the Options button E at the top of the Help Viewer window to highlight all instances of search terms found in topic files Then choose Search Highlight On 7 Click List Topics select the topic you want and then click Display Sort the list by clicking the Title Location or Rank column heading VisualDSP 5 0 User s Guide A 61 Online Help Rules for Full Text Searches Observe these rules when formulating queries e Searches are not case sensitive You may type search strings in uppercase or lowercase characters You can search for any combination of letters a z and numbers 0 9 e Searches ignore punctuation marks such as the period colon semicolon comma and hyphen Group the elements of your
63. debugging window s control menu only when the window is floating in the main window For more information see Debugging Windows on page 2 43 Menu Bar By default the menu bar Figure A 12 appears directly below the applica tion title bar It displays menu headings such as File and Edit File Edit Session View Project Register Memory Debug Settings Tools Window Help Figure A 12 VisualDSP Menu Bar To display menu commands and submenus click a menu heading You can also run many menu bar commands by Clicking toolbar buttons Typing keyboard shortcuts e Right clicking and choosing a command from a context menu Toolbars and User Tools A toolbar is a set of buttons You can run a command quickly by clicking a toolbar button VisualDSP 5 0 User s Guide A 19 Parts of the User Interface Use toolbars to organize the tasks that you use most often Position tool bars on the screen for fast access to the tools that you plan to use VisualDSP includes standard built in toolbars You can create custom toolbars Refer to Toolbar Operation on page A 27 for more informa tion about toolbars Built In Toolbars Table A 3 shows the standard default toolbars Table A 3 Built In Toolbars em Toolbar File ojew sle Edit sjej ajs o S Aala Projec sap eara ees BTC AsmDemo m Debuo Z Window ems err Debug seis eon em Debug Session Multiproc
64. declared in the MEMORY command The INPUT SECTIONS statement specifies the object file that the linker uses to resolve the mapping For details refer to the VisualDSP Linker and Utilities Manual VisualDSP 5 0 User s Guide 1 33 Code Development Tools Expert Linker Expert Linker is a graphical tool that enables you to Define a target processors memory map Place a project s object sections into that memory map View how much stack or heap has been used after you run a proces sor program This interactive tool speeds up the configuration of system memory It uses your application s target memory description object files and librar ies to create a memory map that you can manipulate to optimize your system s use of memory Expert Linker works with the linker For more information about linking refer to the VisualDSP Linker and Utilities Manual Expert Linker graphically displays the available project information in an 1df file as input This information includes object files LDF macros libraries and target memory descriptions Use the drag and drop function to arrange the object files in a graphical memory mapping representation When you are satisfied with the memory layout generate the executable file DXE via VisualDSP project options VisualDSP uses a default 1df file when a project does not have one For an exiting Blackfin project you can add an 1df file via the Add Startup Code LDF subpage of the
65. exist For a simulator the platform defaults to the identically named simulator When the debug target is an EZ KIT Lite board the platform is the board in the system on which to focus When the debug target is a JTAG emulator the platforms are the individual JTAG chains The processor connection type and platform specify the debug session By default a session name is generated automatically You can further identify the session by modifying the default name choosing a more meaningful name A well chosen name can prevent confusion later This section describes the following topics Debug Session Management on page 3 3 Simulation vs Emulation on page 3 3 Multiprocessor MP System Debugging on page 3 4 The processor connection type and platform specify the debug session By default a session name is generated automatically You can further identify the session by modifying the default name choosing a more meaningful name D A well chosen name can prevent confusion later 3 2 VisualDSP 5 0 User s Guide Debugging Debug Session Management You can run several debug sessions at once and can switch dynamically between sessions The typical reasons for running multiple debug sessions are To write different versions of your program to compare their operating efficiencies To debug completely different programs without having to run multiple instances of VisualDSP Simulati
66. files requires a browser such as Internet Explorer 6 0 or higher You can copy these files from the installation CD onto another disk VisualDSP 5 0 User s Guide 1 29 Code Development Tools Assembler The assembler generates an object file by assembling source header and data files The assembler s primary output is an object file with a doj extension To specify assembler options choose Project Project Options and click Assemble in the Project Options dialog box Assembler terms are defined as follows instruction set Set of assembly instructions that pertain to a specific processor For information about the instruction set refer to your processor s hardware documentation preprocessor commands Commands that direct the preprocessor to include files perform macro substitutions and control conditional assembly assembler directives Directives that tell the assembler how to process source code and set up processor features Use directives to structure your program into logical segments or sections that support the use of a Linker Description File 1df to construct an image suited to the target system For detailed information refer to the VisualDSP Assembler and Preprocessor Manual or VisualDSP Help 1 30 VisualDSP 5 0 User s Guide Introduction to VisualDSP Linker The linker links separately assembled files object files and library files to produce executable dxe files sh
67. hot or cold A 46 VisualDSP 5 0 User s Guide Reference Information Match Rules If multiple matches are possible the and characters match the long est candidates The character matches the left hand alternative first For more information see the many reference texts available on this topic such as Mastering Regular Expressions Powerful Techniques for Perl and Other Tools by Jeffrey E F Friedl c 1997 O Reilly amp Associates Inc Tagged Expressions in Replace Operations Use a tagged expression as part of the string in the Replace field for a replace operation A tagged expression must be enclosed between parentheses characters In the Replace field the operators in Table A 22 represent tagged expres sions from the Find field Table A 22 Using Tagged Expressions in Replace Operations Find Field Replace Field Entire matched substring 0 Tagged expressions within parentheses from left to right 1l 2 3 4 5 6 7 8 9 Entire match expression amp The replace expression can specify an ampersand amp character meaning that the amp represents the substring that was found For example if the sub string that matched the regular expression is abcd a replace expression of xyz amp xyz changes it to xyzabcdxyz The replace expression can also VisualDSP 5 0 User s Guide A 47 Text Operations be expressed as xyzVOxyz where th
68. instructions and cycles Table D 17 Interrupts and Emulation Instructions and Cycles Instruction ADSP BF532 ADSP BF535 RAISE 10 3 cycles 3 cycles EXCPT 3 3 cycles 7 cycles EMUEXCPT 3 cycles 3 cycles STI R4 3 cycles 3 cycles 1 Best case as determined by physical characteristics of external memory TESTSET The TESTSET instruction is a multicycle instruction that is executed in a variable number of cycles It depends on the cycles needed for a read acknowledge from off core L2 memory and whether the address being tested is both in the cache and dirty The number of cycles is determined as follows cycles 1 instruction 1 stall x read ack y cache penalty VisualDSP 5 0 User s Guide D 25 Multicycle Instructions and Latencies In an optimal environment x would be 5 and y would be zero If the address resides in a dirty line y is determined by the cycles to fill the dirty line plus any core boundary latencies The address should not reside dirty in the cache as the address contents are meant to be updated across multi ple processors and not be a local variable This instruction depends on off core conditions so it is not modeled by the simulation environment Table D 18 TESTSET Instruction Instruction ADSP BF535 TESTSET P0 7 cycles 1 Best case as determined by physical characteristics of external memory Instruction Latencies In addition to bein
69. of hardship imposed by the error Some messages display a D These are discretionary messages and can take more than one severity level You cannot change the severity level of non discretionary messages Recovery Extra information provided only if applicable Example Example code How to Fix The remedy for correcting the error Related Information Link s to more information 2 32 VisualDSP 5 0 User s Guide Environment Viewing Error Message Details Each tool error message includes associated explanatory text that can be viewed in the Help window To view Help information about an error message that appears in the Output window s Build page 1 Select the error identifier for example cc0276 then press F1 Note that selection is sometimes easier from right to left NIPC cpp line 33 namespace name const VDK ThreadIDkNog error nc wner static t ine 3 Build Output Window RAE IP KOE Error Code Figure 2 21 Error Code in Output Window VisualDSP 5 0 User s Guide 2 33 Output Window 2 The Help window appears showing the descriptive text Descriptive text ccO276 Compiler Fatal Error name followed by must be a class or namespace name Description The identifier followed by a was not a class symbol Severity Fatal Error Recovery The compiler cannot recover from this error Example class Base public
70. pages of the Cache Viewer window By default this option is enabled when a cache log file is opened for reading Properties Opens the Cache Viewer Properties dialog box where you specify the Cache Viewer window s appearance The cache events log file does not include icons Thus the Cache Viewer window s Detailed View page does not display icons Stepping enables you to execute one cache event at a time from the cache events log file The cache event displays on the Detailed View History and Histogram pages When stepping is configured a check mark appears next to the Step command on the right click menu By default this option is enabled when a cache events log file is opened for reading VisualDSP 5 0 User s Guide 2 95 Debugging Windows Configuration Page The Configuration page Figure 2 63 displays configuration information for configured cache DIXIT CO Item Value Cache Name Icache Number of Sets 128 Number of Ways 4 Cache Size D Kbytes Line Size 32 bytes Configuration History Performance Histogram Address Figure 2 63 Example Configuration Page The Cache Selection pull down box top of dialog box lists cache dis plays When multiple caches are configured use this list to change cache displays The Cache Configuration list box below the Cache Selection pull down box displays a list of items and their values The first three items Cache Name Number of Sets
71. paid D 23 ful and DENN gape Rene d bii d MnE He pd aiii QUEE D 23 Conditional o M D 23 Ir v eR T D 24 Core and System Synchronization Guudseseseeniir pa pt Fs ris D 24 LEY T D 25 Intertupus and NMI sienen D 25 xx VisualDSP 5 0 User s Guide CONTENTS TE ISET er n D 25 RGEC LERODDEE assai V RI Emi dne DmM dd M D 26 Accumulator co Data Register Latencieg sicccscccssecaccnssessrerts D 27 Register More LIE cence ees D 28 Move Conditional and Move CC Latencies D 30 Loop Semp Lotenciet ninco D 31 Latencies Due to Instructions Within Hardware Loops D 32 Instruction Alignment Unit Empty Latencies D 33 Li Dara Memory Stalls Loose otov dua cdit D 34 Minibank Access Collision sessirnir D 35 SRAM Access 1 Oyele Stall aisi ri Elo ti ePi tibl D 35 Cache Access UL ole Stall uenis e irt rm S Hb D 36 Memory Mapped Register MMR Access D 39 System Minibank Access Collision i2 rtr tratti D 39 Store Bufer CIMT cescipoteditevastuxdcadtiniiss aiana D 39 Store Buffer Load Collision snrresrineisirnesna D 40 Load Store Size Mismatch iaussdnsetonse pea bi niei uxi ea dti Ra D 40 Score Data Not Reidy e D 41 rites per o cad idee D 41 pf a foro Meme D 42 Compiled Ner ocn Me D 44 Specifying a Session for Compiled Simulation D 44 INDEX VisualDSP 5 0 User s Guide xxi
72. party 1 2 user configured A 21 Tools menu user tools A 21 traces 2 53 about 3 9 Trace windows 2 52 3 9 tracking expressions 2 69 txt files A 13 U UART peripheral in Blackfin D 7 unconditional breakpoints 3 14 updates VisualDSP 1 10 upgrades VisualDSP 1 10 user tools A 21 utilities ICE Test 1 18 A 87 V variables global vs local 2 52 vbs files A 13 VDK about 1 22 defined A 87 features 1 6 Kernel tab 2 4 load 2 108 overview of 1 6 Project window 2 4 VDK State History window 2 105 VDK Status window 2 103 vdk config cpp 2 4 vdk config h 2 4 vdk files A 13 VDK State History window 2 105 right click menu 2 108 VDK Status window 2 103 Visual Basic scripting with 2 41 VisualDSP 5 0 User s Guide VisualDSP Automation API 2 41 Configurator 1 17 control menu A 18 debugging facilities 1 20 debugging features 1 5 editing features 1 3 editor windows 2 16 environment 1 2 features 1 1 file association for tools 2 14 files A 12 glossary A 66 Help system 1 61 A 53 IDDE 1 2 kernel 1 22 keyboard shortcuts A 31 licenses A 3 log file 2 30 2 38 main window parts A 16 menu bar A 19 new features 1 7 Output window 2 28 overview of 1 1 printing documentation A 50 product updates 1 10 product upgrades 1 10 programming overview 1 12 project development 1 14 projects 1 43 Project window 2 2 software versions A 5 source code control 1 50
73. processors B 2 recording events B 7 shadow write FIFO B 2 short word B 4 SIMD FIFO B 3 Anomalies submenu SHARC B 1 Shadow Write B 2 SIMD FIFO B 3 API defined A 66 application estimated energy profile 3 31 archiver 1 41 asm files 2 14 A 12 assembler 1 30 file associations for tools 2 14 input files 2 14 options 1 30 terms 1 30 assembling language files into object files 1 30 assembly instructions profiling statistics 2 61 auto completion scripts 2 42 automatic breakpoints 3 15 automatic file loading 1 26 automatic file placement 2 15 automation Image Viewer 2 120 Automation API 2 41 B background telemetry channels See BTCs batches building 1 59 VisualDSP 5 0 User s Guide I 1 INDEX Blackfin processors peripherals supported in simulators D 2 bnm files A 13 bookmarks editor windows 2 17 2 19 Help A 58 keyboard shortcuts A 34 Output window 2 30 Boolean operators searching Help A 63 boot kernel 1 43 loading or booting B 12 options B 11 booting 1 43 simulating 1 16 boot loadable files B 12 boot loading 1 43 break condition defined A 66 breakpoints about 3 13 automatic 3 15 conditional 3 14 Disassembly windows 2 47 hardware 3 3 icons 3 13 keyboard shortcuts A 36 MP sessions 3 11 simulation vs emulation 3 3 symbols 3 13 unconditional 3 14 using 3 13 BTC MAP ENTRY ASM macro 2 74 BTC MAP ENTRY macro 2 74 BTC Memory win
74. search by using double quote characters or parentheses to set apart each element e You cannot search for quotation marks When searching for a file name with an extension group the entire string in double quotes for example filename ext Otherwise the period breaks the file name into two separate terms The default operation between terms is AND which creates the logical equivalent to filename AND ext Advanced Search Techniques Use the following search techniques to narrow your searches for more precise results e Wildcard expressions e Boolean operators e Nested expressions A 62 VisualDSP 5 0 User s Guide Reference Information Wildcard Expressions Wildcard expressions let you search for one or more characters by using a question mark or asterisk Table A 28 describes the results of these differ ent kinds of searches Table A 28 How to Use Wildcard Expressions to Define a Search Search Target Example Results A single word project Locates topics that contain the word project Other grammatical variations such as projects are located A phrase project window Locates topics that contain the literal phrase note the quotation project window and all its grammatical varia characters tions project window Without the quotation characters the query is equivalent to specifying project AND window which finds topics containing both of the individ ual words ins
75. searches library files for routines library members that are referred to from other objects and links them into your executable program linear profiling A debugging feature that samples the target s PC register at every instruction cycle Linear profiling gives an accurate picture of where instructions were executed since every PC value is collected The trade off however is that linear profiling is much slower than statistical profiling A display of the resulting samples appears in the Linear Profiling window which graphically indicates where the application is spending its time Simulator targets support lin ear profiling See also Statistical profiling linker The linker creates executable files shared memory files and overlay files from separately assembled object and library files It assigns memory locations to code and data in accordance with a user defined 1df file which describes the memory configuration of the target system Linker Description Files ldf files The 14f files describe the target system and map your program code within the system memory and processors The 1df file cre ates an executable file using the target system memory map and defined segments in your source files VisualDSP 5 0 User s Guide A 75 Glossary loader A utility that transforms an executable file into a boot file The loader creates a small kernel which is booted into internal memory at chip reset A program of ar
76. source file editing features 1 3 support A 6 system components A 4 toolbar buttons A 22 user interface A 15 INDEX VisualDSP Configurator about 1 17 multiprocessor debug sessions 3 4 VisualDSP_Log txt 2 39 script output 2 41 vps files 2 115 W warnings 2 31 watchpoints about 3 4 3 15 MP sessions 3 11 used with interrupts 3 17 using 3 15 waterfall plots about 3 24 grid of sampled data 3 25 rotating 3 24 ways cache 2 94 Windows standard buttons A 42 VisualDSP 5 0 User s Guide I 19 INDEX windows wizards BTC Memory 2 75 Project 1 23 A 81 buttons A 42 workspaces Call Stack 2 63 2 64 keyboard shortcuts A 37 custom register 2 81 debugging 2 43 x Disassembly 2 45 2 47 docked A 39 xml files 2 82 Expert Linker 1 35 X Y plots 3 21 Expressions 2 50 Flash Programmer 3 30 floating A 39 focus in an MP debug session 3 6 Help A 53 Image Viewer 2 119 keyboard shortcuts A 37 Linear Profiling 2 55 3 8 Locals 2 54 MDI A 38 Multiprocessor 2 84 operating on A 37 Output 2 28 Pipeline Viewer See Pipeline Viewer window plot 2 109 positions A 42 profiling 2 55 Project 2 2 pull tabs A 38 register 2 78 right click menus A 38 scroll bars A 38 stack 2 80 Statistical Profiling 2 55 3 8 Target Load 2 108 Trace 2 52 3 9 VDK State History 2 105 VDK Status 2 103 VisualDSP A 15 I 20 VisualDSP 5 0 User s Guide
77. switch Arrows representing thread events The arrow color indicates the event type Status bar showing event details e A green line indicating an active thread The length of the line indicates the time the thread was active e A thread status bar Each thread appears as a horizontal bar thread status bar The ThreadID and the name of the thread type appear to the left of the bar When a thread is destroyed the name of the thread type is no longer displayed Each thread event appears as an arrow above a thread VisualDSP 5 0 User s Guide 2 105 Debugging Windows Bar Cursor Thread Thread Cursor representing position switch event thread line arrow DK State History Idle Thread gt a ot oe oe re at ot ot rT so ud Tide ThreadStatusChange Tick 4 Value 0 Status From Ready State History Target Load E ini Status bar Active thread Thread status Active thread indication duration Figure 2 70 VDK State History Window Thread Status and Event Colors Threads and events are coded by color based on thread status and event type The colors appear in the horizontal bars threads and colored arrows events used throughout the plot Events of the same type are drawn in the same color Right click on the plot and choose Legend to display legends that define each color in the VDK State History window To customize colors right click on the plot and choose Properties
78. the custom board support file will augment and or override the specifications in the processor definition file Multiprocessor Window The SHARC and TigerSHARC simulators do not support multiprocessor MP debugging multiprocessing for these proces sors is available in emulator sessions only Multiprocessing support for Blackfin ADSP BF561 and ADSP BF566 processors is available in simulation VisualDSP 5 0 User s Guide 2 83 Debugging Windows Use the Multiprocessor window Figure 2 56 to select and control the different processors in a multiprocessor debug session a s PO Halted PT Halted e P2 Halted A P3 Halted P4 Halted qe P5 Halted Figure 2 56 Example Multiprocessor Window Multiprocessor Window Pages The Multiprocessor window has two tabbed pages Status and Groups Status Page The Status page Figure 2 57 shows the status of each processor in the multiprocessor system A horizontal bar highlights the processor with focus Change focus by clicking on a processor in the list 2 84 VisualDSP 5 0 User s Guide Environment Processor sd State Po Halted 8 P1 Halted P2 Halted A P3 Halted D P4 Halted Halted Figure 2 57 Multiprocessor Window Status Page Groups Page The Groups page Figure 2 58 shows the current list of multiprocessor groups A Default group is created with each new multiprocessor session The members of the Default group are the proc
79. the instruction executed The disassembled instruction Note the following For SHARC and TigerSHARC processors depth is limited by your system s virtual memory Trace is not supported in Blackfin simulator sessions but is sup ported in Blackfin emulator sessions The depth is limited by on board physical memory reserved for this feature VisualDSP 5 0 User s Guide 2 53 Debugging Windows Memory results have the following fields Access type RD or WR Memory type PM or DM e The address in brackets 1 The data value written or read Refer to Code Analysis Tools on page 3 7 for related information Locals Window The Locals window displays the value of local variables within a function as shown in Figure 2 33 Open this window from the View menu by choosing Debug Windows and Locals Locals Hexadecimal Name Value Address Type Size Format Bs Oxff901ea0 3 0x0000010c Hexadecimal ui 0x00000000 Oxf f901ea0 unsigned int 0x00000004 Hexadecimal s 0x0000 xff901ea4 short 0x00000002 Hexadecimal E s2 1 Oxff90leas S2 Ox00000104 Hexadecimal gm 0 1 xff90lea8 52 0x00000034 Hexadecimal 1 Oxf f90ledc 52 0x00000034 Hexadecimal gm 2 Oxff 901 10 52 0x00000034 Hexadecimal 3 xff901f44 S2 0x00000034 Hexadecimal 4 xff901f78 S2 0x00000034 Hexadecimal i 0x00000000 xff90lfcc int 0x00000004 Hexadecimal j 0x00000000 Oxff901fd0 int 0x00000004 Hexadecimal Figure 2
80. the stall condition occurs when the same register is used in both instructions Table D 21 Move Conditional and Move CC Latencies Description Example s cycles stalls gt instruction ADSP BF532 ADSP BF535 dreg CC 1 1 gt R0 CC if CC dreg dreg 1 141 if CCRI RO if CC dreg dreg 1 1 gt if CC R0 Rl multiply video op using dreg as src 1 1 1 1 R2 H R1 L RO H 1 lt 1 gt if CC RI R3 141 lt 1 1 gt SAA R32 R1 0 if CC dreg preg 1 lt 1 gt if CC RO PO math op using dreg as src 1 1 1 R2 RI RO 1 1 gt if CCR3 PI 1 lt 1 1 gt SAA R32 R1 0 dreg CC 1 1 gt R0 CC math op using dreg as src 1 lt 1 2 gt R2 H RI L RO H 1 1 gt RI CC 1 lt 1 2 gt SAA R3 2 R1 0 dreg CC 1 lt 1 gt R0 CC CC dreg 1 lt l 2 gt CC RO if CC preg dpreg 1 lt 1 gt if CC P0 RI any op using preg l 4 lt 1 3 gt R4 P0 if CC dreg dpreg 1 lt 1 gt if CC R0 Rl CC dreg 1 1 1 CC RO D 30 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Loop Setup Latencies Table D 22 Loop Setup Latencies Description Example cycles stalls gt instruction BF532 BF535 loop setup 1 lt 1 gt LSETUP topl bottom1 LCO P0 loop setup with same LC 1 6 lt 1 1 gt LSETUP top2 bottom2 LCO P1 modification of LT or LB 1 lt 1 gt LTO SP loop s
81. to drag and drop files into designated folders on the Project page in the Project window This saves time when you add files to a project File placement rules and the folder properties that you specify determine where files are placed By default project folders are associated with the file extensions listed in Table 2 5 Table 2 5 Default Files Associations in Project Folders Folder Default Associations Source Files C Cpp CXX asm dsp s Header Files h hpp hxx Linker Files ldf dlb doj Kernel Files vdk File Placement Rules The following rules dictate file placement when you add files to a project Dragging and dropping files When you drag and drop a file onto the Project page the file is added to the first folder associated with the file s extension The Project page accepts dragged files only when a project is opened Using menu commands to add files Files are added to the folders that you select on the Project page If you add a file to a project that has no folders the file is added at the project level root level If you select the project node or a file node the file is added to the first folder associated with the file s extension VisualDSP 5 0 User s Guide 2 15 Editor Windows Example You create a folder labeled C Source Files and specify it with c cpp and cxx file extensions You create a second folder labeled Asm Files and
82. tools Source files are the C C language or assembly language files that make up your project Processor projects can include additional files such as data files and a Linker Description File 1df which contains command input for the linker For more information about 1df files see Linker on page 1 31 Editor windows Open multiple editor windows source windows to view and edit related files or open multiple editor windows for a single file The VisualDSP editor is an integrated code writing tool that enables you to focus on code development Specify syntax coloring Configure options that specify the color of text objects viewed in an editor window This feature enhances the view and helps locate portions of the text because keywords quotes and comments appear in distinct colors Context sensitive expression evaluation Move the mouse pointer over a variable that is in the scope to view the variable s value Status icons View icons that indicate breakpoints bookmarks and the current PC position View error details and offending code From the Output window s Build view display error details by highlighting the error code such as cc0251 and pressing the F1 key Double click an error line to jump to the offending code in an editor window VisualDSP 5 0 User s Guide 1 3 VisualDSP Features Project Management Features VisualDSP provides flexible project management for the development of pr
83. window to understand how processor timing affects the execution of your program For information about configuring and using the Pipeline Viewer see Pipeline Viewer Window on page 2 88 or refer to VisualDSP online Help C 12 VisualDSP 5 0 User s Guide Simulation of TigerSHARC Processors Pipeline Stages The ADSP TS20x Pipeline Viewer window provides a representation of instruction flow through the processor s pipeline Table C 2 lists the pipe line stages Table C 2 Pipeline Stages ADSP TS20x Processors Stage Abbreviation in Pipeline Viewer Instruction Fetch 1 F1 Instruction Fetch 2 F2 Instruction Fetch 3 F3 Instruction Fetch 4 F4 Predecode PD Decode D Integer I Access A Execute Stage 1 EX1 Execute Stage 2 EX2 Stages F1 through F4 represent the fetch unit pipe Stages PD through EX2 represent the execution pipe Fetch unit pipe stages contain raw quads of 32 bit words fetched from memory not valid instruction lines When you view the Pipeline Viewer window in disassembly format by means of the right click menu instructions that appear in the fetch unit pipe are not valid instruction lines but merely bits and pieces Valid instruction lines appear in the execution pipe stages VisualDSP 5 0 User s Guide C 13 ADSP TS20x Processors Stalls The examples that follow illustrate the way that the Pipeline Viewer dis plays different types of stall events fo
84. write operations data is placed in the first stage of a two stage shadow write FIFO Data is moved from first to second stage B 2 VisualDSP 5 0 User s Guide Simulation of SHARC Processors when a second write is performed by processor core or IOP Similarly data is moved from the second stage of the FIFO to internal memory when neither the core nor the IOP accesses memory in a core cycle On read operations address compare logic allows data to be fetched from internal memory or from the FIFOs Note that each memory block has one shadow register FIFO which all core and IOP accesses to internal memory use The internal memory clock not visible to the user runs at twice the core clock frequency So each core cycle consists of two memory cycles with one memory cycle dedicated to the core and the other dedi cated to the IOP SIMD Read from Internal Memory With Shadow Write FIFO Hit Anomaly ADSP 2116x Only For examples and workarounds refer to anomaly 40 at the Analog Devices Web site This anomaly has been identified in the shadow write FIFOs that exist between the internal memory array of the ADSP 21160M and core IOP buses that access the memory Refer to the hardware documentation for details on shadow register operation When SIMD reads cross long word address boundaries that is odd normal word addresses or non long word boundary aligned short word addresses and the data for the read is in the shadow write FIF
85. 0 Display format Specifies the data s format Address includes the hexadecimal formatted address of the pipe line stage for example 0x1234 Disassembly includes the opcode mnemonic similar to the for mat displayed in a Disassembly window Opcode format is the hexadecimal representation of the disassem bly mnemonic Show gridlines Toggles the display of gridlines in the window The default is On Auto size columns Automatically sizes all columns to have the same width as samples are collected The default is On Stages to view Specifies the stages to appear in the window Note that all stages are collected but you view only the stages that you select to appear From the dialog box s Colors tab you can specify the colors that display in the Pipeline Viewer window The current color appears under Current Color Click a color in the color palette or click Other to specify a custom color Click the Reset button to restore the default colors 2 90 VisualDSP 5 0 User s Guide Environment Pipeline Viewer Window Event Icons Table 2 21 shows Pipeline Viewer window icons that indicate pipeline stage events for ADSP TS101 and ADSP TS20x TigerSHARC processors Table 2 21 Pipeline Viewer Event Icons Icon Event Description Abort A stage contains an instruction that has been aborted Invalid A stage contains a placeholder representing a result of an Instruction in
86. 0 User s Guide Introduction to VisualDSP Debug ceni A customized configuration named Version2 is added Figure 1 13 Selecting a Project Configuration Project Build The term build refers to the process of performing operations such as preprocessing assembling and linking on projects and files During a build VisualDSP processes project files that have been modified since the previous build as well as project files that include modified files A build differs from a rebuild all When you execute the Rebuild All command VisualDSP processes all the files in the project regardless of whether they have been modified Building a project builds all outdated files in the project and enables you to make your program An outdated file is a file that has been modified since the last time it was built or a file that includes include a modified file For example if a C file that has not been modified includes a header file that has been modified the C file is out of date VisualDSP 5 0 User s Guide 1 57 Processor Projects VisualDSP uses dependency information to determine which files if any must be updated during a build Note the following Afile with an unrecognized file extension is ignored at build time fan included header file is modified VisualDSP builds the source files that include include the header file regardless of whether the source files have been modified since the previ
87. 0023 yr3 0X7F800000 080025 yr4 OXFF800000 080027 yfrS r3 r4 080028 yfr5 r3 r3 72 080029 yfrS r3 r4 yfr6 r3 r4 080024 yrS MANT fr3 08002B yr 0X808FFFFF 08002D yfr8 RSQRTS r7 08002E j3 0X1 xr0 X p 0 E Figure C 14 Using the Program Counter Value ADSP TS20x Processors Stepping When single stepping through a program the simulator performs an instruction line step and skips invalid instructions aborted bubbles or slots occupied by an invalid fetch VisualDSP 5 0 User s Guide C 21 ADSP TS20x Processors Sometimes a step takes more than one cycle and the Pipeline Viewer win dow advances by several lines while the yellow arrow which marks the current program counter location in the Disassembly window moves to the next instruction line While skipping invalid instructions aborted bubbles or an invalid fetch the simulator still processes memory transactions When the step is completed and the memory window is updated a surpris ingly large number of new values may appear When debugging DMA be aware that a single step may cause several DMA transac tions to be completed Simulator Options The Simulator submenu under Settings provides the Select Loader Program command This command opens the Open File dialog box from which to specify a custom loader program Once selected the loader pro gram automatically runs befo
88. 0x00 Details for set 76 way 1 72 BERTIE 0200 cycle 23997 79 M ox000021e0 ox00q PC Address 0x00002980 Ref Address 0x00002980 80 MM 0x00002218 M 0x009 So TTE 81 MM 0x00002238 Jf ox000 valid ves 82 H Ox00g Event Type Compulsory Miss 83 H 0x00 Description Data was accessed For First time Configuration Detailed View Figure 2 62 Viewing a Cache Event s Details in the Cache Viewer VisualDSP 5 0 User s Guide 2 93 Debugging Windows Use the hit or miss information to increase an application s performance by locating instructions in the cache when they are needed Ensuring that no cache misses are located in frequently executed areas of an application as highlighted by the profiler utility is a critical step in optimizing your application s software performance As shown in Figure 2 62 the Cache Viewer window enables you to view the details of any cache event These descriptive details help you under stand the cause of the cache event Use this information to isolate areas where performance can be improved For example based on cache event details you might Modify an application s layout in memory to avoid cache thrashing e Prefetch instructions to avoid compulsory misses Lock down ways in the cache to avoid a conflict miss with a fre quently accessed instruction Open the Cache Viewer window by choosing View Debug Windows and Cache Viewer The Cache Viewer consists of several tabbed pages describe
89. 1065L Short Word Internal Memory 9th Column at Even Addresses An Access to ADSP 21065L 9th column Even Address event is a simula tor anomaly The event occurs during access to an ADSP 21065L short word internal memory 9th column even addresses The simulator allows the event but the processor does not The simulator issues a warning when the event occurs VisualDSP lets you suppress the warning in various ways Selecting this option lets you control the simulator s behavior when the event occurs When this option is not selected a message box pops up and a warning appears in the Out put window s Console view Recording a Simulator Anomaly or Event You can record various simulator anomalies and events for ADSP 21x6x processors VisualDSP 5 0 User s Guide B 7 Recording a Simulator Anomaly or Event To record a simulator anomaly or event 1 From the Settings menu choose Anomalies or Events 2 Choose the anomaly or event to record The anomalies are Shadow Write or SIMD FIFO The events are FP Denorm Short Word Anomaly or Access to 21065L 9th column Even Address The Configure Simulator Event dialog box Figure B 1 appears displaying the selected anomaly or event for example FP Denorm in the title bar of the dialog box Configure Simulator Event FP Denorm r Event Fire Options 4 Severity Options Fire Unique WARN m Event Actions Enabled M Verbose IV Print Halt
90. 12 VisualDSP 5 0 User s Guide I 13 INDEX program development steps adding and editing project source files 1 23 building a debug version of the project 1 26 building a release version of project 1 27 creating a project 1 23 setting project options 1 23 program execution commands 3 11 halting 3 11 keyboard shortcuts A 35 program icons A 18 programming tips 1 12 program operations breakpoints 3 13 execution commands 3 11 hardware breakpoints 3 16 restarting programs 3 12 selecting a debug session at startup 3 10 unconditional amp conditional breakpoints 3 14 watchpoints 3 15 programs debugging 1 26 optimizing 2 94 running 1 26 program sections 1 12 program traces 2 52 3 9 Project box showing active project 1 49 project build specifying options 1 24 project dependencies example of 1 60 project group files 1 49 project groups 1 48 project management features 1 4 Project Options dialog box 1 12 projects adding files 1 24 build options 1 25 1 58 configurations 1 56 customized configurations 1 56 debugging 1 5 1 20 defined A 80 dependencies 1 24 development overview 1 11 development stages 1 14 files 2 8 folders 2 2 keyboard shortcuts A 35 loading A 7 managing 1 4 nodes 2 2 programming overview 1 12 project groups 1 48 specifying tool options 1 47 subfolders 2 2 VisualDSP 1 43 project wide file and tool options 1 25 Project
91. 19 Project Development Debugging Overview Once you have successfully built a processor project and generated an executable file you can debug the project Projects developed in VisualDSP are run as hardware and software debug sessions In Table 1 2 Yes indicates the debugging tools that are available during the process of building and debugging a program Table 1 2 Tools Available During Simulation Evaluation and Emulation Tool Simulation Evaluation Emulation Linear profiles on page 3 8 Yes Interrupts on page 3 17 Yes Streams on page 3 17 Yes Traces SHARC processors only Yes on page 3 9 Pipeline Viewer not SHARC processors Yes on page C 2 Cache Viewer on page 2 93 Yes Breakpoints on page 3 13 Yes Yes Yes Watchpoints on page 3 15 Yes Hardware breakpoints on page 3 16 Yes Plotting on page 3 20 Yes Yes Yes Statistical profiles on page 3 8 Yes You can attach to and control the operation of any Analog Devices processors or simulator Download your application code to the processor and use VisualDSP s debugging facilities to ensure that your application functions as desired 1 20 VisualDSP 5 0 User s Guide Introduction to VisualDSP VisualDSP is a window into the inner workings of the target processor or simulator From this user interface you can e Run step and halt the program and set breakpoints and watchpoints V
92. 33 Example Locals Window Use the Locals window with a Step or Halt command to display the cur rent value of variables when moving through your program You can select the number format used by the window global format You can override the global format and specify each expression s format per expression basis Changing the window s global format overrides any per expression formatting for example if the global format is set to Hexa 2 54 VisualDSP 5 0 User s Guide Environment decimal and you set the format of a single expression to Integer changing the global format to Float will change the format of every expression to Float Complex variables C structures and C classes appear with a plus sign Click on the plus sign to display all variable information Statistical Linear Profiling Window To open a profiling results window choose Tools Statistical Profiling or Linear Profiling and New Depending on the target the window s title is Statistical Profiling or Linear Profiling The window comprises two panes as shown in Figure 2 34 Linear Profiling ADSP BF535 Blackfin Memory Instruction Samples 1 Histogram Execution Unit Line No 05 start 34X 60 main 04 34 foo int 30 58 _mi_initialize 29 barfint 90 exit 57 82 _ getargv 13 39 __install_ 13 39 PC Oxffa00610 91 134 PC xffa 06f6 47Z Total Samples 770 14 15 16 17 H Delme te
93. 5 0 User s Guide M CONTENTS ERST LESE Loesusn disent pP Fete IM E t Ep NadInibE 1 34 Depp Linker TORO spp onn 1 35 Memory Map Pane Right Click Menu ssec 1 36 Mou ML RN anniina 1 38 Lid 1 41 opo Mee 1 41 EIS amet 1 42 dcos duo PP 1 43 Project UE a ciclo sacha edid and Md Mcd udi 1 44 vp Ke c mr TTA ETNENDNE 1 45 NER File M 1 46 Projet O pubid M T 1 47 Project Groups A 1 48 Proe T a PONE 2oiauond odit oda d Diaeta des id 1 49 Sovrce Code Contin SCC use dede udin Fusce eiiie 1 50 EE NUN E OE E A A T an 1 51 Rules C ETR Ri 1 52 oy A i on hee es 1 53 Ecm ie Mabsbibs cornea ies 1 53 Project Coni ig orati MM 1 56 SO Puki ena EAN 1 57 cy S015 ira 1 58 File Building n 1 58 io gm pi erea a 1 59 vi VisualDSP 5 0 User s Guide CONTENTS Pre Build and Post Build Options ssroserrnsusierseasrisesn 1 59 EOD FAE onan 1 60 Project Dependencies ciusiuersminieneiini uisu Mp RUNE 1 60 Visas DS Help Systemi Laucaaedeiid eiie pm dd ee I dp iMd 1 61 ENVIRONMENT Project PHONE Lobos a Ies ER MEINER dde med 2 2 lari M PP 2 3 Kerpel Tab e 2 4 Project Depende ncios oa eee 2 4 Det noo Se 2 6 Project Polais nna 2 6 Project FURS osent ENT 2 8 Project Window Icons for Source Code Control SCC
94. CALL P0 rti change of flow kill Return from interrupt kills RTI mispredicted change of flow kill Kills due to mispredicted branches RO 0 CC RO If CC JUMP next bp hardware loop bottom kill interrupt kill Instructions in the pipeline are killed due to an interrupt RAISE 1 sync kill SYNC instructions force all speculative transient in the core system to be completed before proceeding killing instructions in the pipe SSYNC D 16 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Multicycle Instructions Multicycle instructions are a category of instructions that cannot complete in fewer than two cycles Consequently the extra cycles generated by such an instruction cannot be removed without removing the multicycle instruction itself In Figure D 3 multicycle instruction SP R7 6 P5 3 enters the pipeline Decode stage at cycle 16 and takes five cycles to complete 1 cycle per register to push on the stack SP The next instruction R7 0 takes only one cycle Cycle Decode Address Executel Execute2 Execute3 Writeback 15 NOP NOP NOP NOP 16 L S d NOP NOP NOP 17 SP L S d NOP NOP 18 SP SP SP NOP 19 SP L SP SP sP B F 20 SP SP SP t sPp Mc sei a 21 R7 0 SP
95. DEBUGGING This chapter describes VisualDSP debugging tools used during single processor and multiprocessor debug sessions The topics are organized as follows e Debug Sessions on page 3 1 Code Analysis Tools on page 3 7 Program Execution Operations on page 3 10 Simulation Tools on page 3 16 Plots on page 3 19 Flash Programmer on page 3 26 e Energy Aware Programming on page 3 31 Debug Sessions You run the projects that you develop as debug sessions sessions A session is defined by the elements listed in Table 3 1 Table 3 1 Specifying a Debug Session Element Description Processor When you create an executable file the processor is specified by the Linker Description File 1df and other source files VisualDSP 5 0 User s Guide 3 1 Debug Sessions Table 3 1 Specifying a Debug Session Cont d Connection type The connection type target is the software module that controls a type of debug target a simulator or an emulator A simulator is software that mimics the behavior of a processor chip Simula tors are used to test and debug processor code before a processor chip is man ufactured The choice of an EZ KIT Lite connection type uses a debug agent as the platform An emulator is software that talks to a hardware board that contains one or more actual processors Platform For a given debug target several platforms may
96. F561 D 20 Console page 2 30 kill reasons ADSP BF535 D 10 scripting 2 41 stage event icons in Pipeline Viewer 2 91 customization 2 38 stall reasons ADSP BF531 error messages 2 31 ADSP BF532 ADSP BF533 loading scripts 2 39 ADSP BF561 D 19 makefile errors 1 53 stall reasons ADSP BF535 D 9 parts of 2 29 pipeline stages printing 2 40 ADSP TS101 processors C 2 right click menu 2 39 ADSP TS20x processors C 13 scripts 2 39 Disassembly windows 2 50 scrolling previous commands 2 30 pipeline symbols overlays 1 13 1 32 mixed mode 2 21 overriding Pipeline Viewer project wide options 1 58 aborts ADSP TS101 C 5 ovl files 1 31 A 12 aborts ADSP TS20x C 15 current program counter value P ADSP TS101 C 8 current program counter value PE saitiplis ADSP TS20x C 20 filtering 2 62 event details 2 92 p erformance event icons 2 91 measuring 3 8 message abbreviations ADSP BF535 optimizing 2 94 D 17 peripherals pipeline stages ADSP TS101 C 2 Blackfin simulating D 1 pipeline stages ADSP TS20x C 13 limitations in simulation for Blackfin specifying properties 2 90 pid stalls ADSP TS101 C 3 support in simulators for Blackfin D 2 stalls ADSP TS20x C 14 Timer TMR Blackfin D 8 stepping ADSP TS101 C 9 UART for Blackfin D 7 stepping ADSP TS20x C 21 PGO window 2 88 C 20 defined A 79 window messages ADSP BF535 D 12 physical memory Pipeline Viewer window 2 88 C 2 defin
97. Information Component versions The Components page Figure A 3 displays a list of your system s components and provides information name version provider about your debug target symbol manager and processor library Figure A 3 Example of the Components Page A 4 VisualDSP 5 0 User s Guide e Software Versions The Versions page Figure A 4 displays a list of your system s tools Each tool includes a description version number and a timestamp day and time Reference Information Acc21k exe ccblkfn exe ccts exe coff2elf exe commentconverter exe danube exe easm21k exe AeasmBLKFN exe AeasmTS exe 12 20 2005 06 18 12 20 2005 06 18 12 20 2005 06 18 12 20 2005 06 18 12 20 2005 06 18 12 20 2005 06 18 12 20 2005 06 18 12 20 2005 06 18 12 20 2005 06 18 Figure A 4 Example of the Versions Page VisualDSP 5 0 User s Guide A 5 Support Information Links to support on the Web The Support page Figure A 5 provides direct links to various Web pages that contain support information such as application notes code examples the DSP Knowledgebase processor and tools anomalies and workarounds manuals and data sheets product comparisons tools updates and more You can also generate the body of an e mail that automatically contains your system s description gt About Figure A 5 Example of the Support Page A 6 VisualDSP 5 0 User s Guide Re
98. J Header Files E NN Project Figure 1 8 Project Window 1 48 VisualDSP 5 0 User s Guide Introduction to VisualDSP Each workspace has one project group When you switch among work spaces the project group is loaded and the same set of projects are opened just as when you last closed the workspace One project is active at a time The active project responds to commands and messages from menus and toolbars The Project window displays the active project with bold typeface A Project box located by default with the toolbar buttons displays the name of the active project see Figure 1 9 A Beate cx dA A o Ge j a erc AsmDemo peb Bap Project box 8 mune i amp l indicates the active project Figure 1 9 Project Box Showing the Active Project Though commands are sent to the active project they may also be carried out by a project on which the active project depends For example assume that project A is active and depends on project B Executing a Rebuild All command on project A builds project B first The same logic applies to the Clean command which deletes intermediate and target files Exporting a makefile exports one makefile for each open project In the makefile of a project depending on another project one sub target is cre ated for each project on which it depends Thus building a project builds all dependent projects first Project
99. LINK FP FP R1 L R1 H Figure 2 61 Example Tool Tip Box Showing Pipeline Event Details A pipeline event can include the details described in Table 2 22 Table 2 22 Pipeline Event Details Item Displays Address Address of the pipeline stage at that cycle if valid Instruction Assembly instruction of that address if valid Type Type of event Cause Cause of the event condition Details Further explanation of the cause of the event if applicable 2 92 VisualDSP 5 0 User s Guide Environment Cache Viewer Window Simulation only The VisualDSP Cache Viewer window provides a means to visualize a processor s cache and locate problem areas The tool shows how instructions are being executed Use this information to boost your application s performance The Cache Viewer window Figure 2 62 displays each instruction s exe cution characteristics Cache Viewer information indicates the type of cache event and describes the cause of the event Each instruction that exe cutes from cache is marked with an H hit or an M miss Hits represent cache instructions executed without a stall Misses identify instructions fetched from slower parts of memory because they were not found in cache gt Cache Viewer i IDE x Set Way 0 73 lf 0200002138 74 Mf 0200002158 Way 1 75 M3 ox00002168 W 0200002978 76 H 0x00002198 M 0x00002980 77 H 0x000021b8 H
100. O the result is Revision 0 0 behavior for the read VisualDSP 5 0 User s Guide B 3 Event Options Event Options The Events submenu provides the following options FP Denorm This command opens the Configure Simulator Event dialog box from which to configure the reporting of the generation of a floating point denormal result By default this option is OFF disabled Short Word Anomaly all ADSP 2106x processors except the ADSP 21065L This command opens the Configure Simulator Event dialog box from which to configure reporting for short word accesses that fail By default this option is OFF disabled e Access to 21065L 9th column Even Address ADSP 21065L processors only This command opens the Configure Simulator Event dialog box from which to configure reporting for invalid memory access By default this option is ON enabled FP Denorm You can configure what happens when an FP Denorm event occurs Denormal operands flush to zero when input to a computation unit and do not generate an underflow exception Refer to your processor s hard ware documentation for more information about floating point operations Short Word Anomaly This option applies to all ADSP 2106x processors except the ADSP 21065L processor B 4 VisualDSP 5 0 User s Guide Simulation of SHARC Processors Short word accesses read or write fail following a stalled instruction Any access read or write to short wor
101. O that manages Blackfin processor instruction stores to L1 and L2 memory All instruction stores must go through the store buffer Thus if the buffer is full the Blackfin processor stalls until the FIFO moves forward and a space is freed The earliest time that a store can leave the buffer is four instructions not cycles necessarily after it was entered Consequently under ideal circum stances a continuous series of stores will take up four out of the five slots in the store buffer If only one of the stores is delayed by an extra cycle no penalty is imposed as the store buffer has five slots Many scenarios can cause the store buffer to become full T o account for them you must keep track of the proximity of stores and how many cycles they each take VisualDSP 5 0 User s Guide D 39 Multicycle Instructions and Latencies If a multicycle store is required you must ensure that it is not followed too closely by other stores as they may become backed up Multicycle stores include e Stores to non cacheable memory for example MMR space e Stores to external L2 memory memory addressed beyond L1 SRAM e Minibank conflict where the store is from DAGI the second access in a load store multi issue instruction see Minibank Access Collision on page D 35 Store Buffer Load Collision This section describes cases in which a load access collides with a pending store access in the store buffer because they have the same a
102. P LSETUP both writing to the same LC reg LS LE LCO PO LSETUP LS LE LCO P1 loopsetup while lc is Using an LSETUP instruction and writing a LSETUP nonzero value other than zero to the Lcreg LS LE LCO PO 0p loop top bot RAW haz Writing to a loop top bottom register followed LTO RO ard by a read of the same register R2 LTO write to loop cnt stall A write to a LCreg followed by any op LCO RO op any op multicycle ALU2op A two operand ALU instruction requiring more RO R1 instruction than one cycle to complete multicycle DAG Pees Piste instruction R7 0 P5 0 CC2dreg RAW hazard Reading the CC register into a dreg and then RO CC reading that register CC RO Mac video after regmv Register move of a system register to a dreg fol RO LCO sysreg to dreg raw haz lowed by a MAC or video instruction R2 H R1 L RO H ard Regmv sysreg to dreg Writing a system register to a dreg followed by RO LCO followed by ALU op an ALU operation using that dreg as an operand R2 R1 RO dreg raw hazard Video after extracted 3 input add dreg raw hazard Extracted 3 input add followed by special dsp32 instruction Search followed by exu operation dreg raw haz ard A search instruction followed by any execution instruction with an operand of a dreg used in the search instruction R3 R0 search R1 LE R2 H R1 L RO H D 14 VisualDSP 5 0 User s Guide
103. P BF534 ADSP BF536 ADSP BF537 ADSP BF538 and ADSP BF539 processors ADSP BF54x processors have no support for any system peripherals Only the simulator core peripherals are supported Table D 4 Peripheral Support in the ADSP BF533 Simulator Peripheral Support Modeled Streamable Bootable SPORT v v FR UART v v FR Flags FR FR NA System Timers v v NA RTC v NA NA EBIU v NA NA PPI v v NP SPI FR FR NP Watch Unit v NA NA Trace Unit v NA NA Core Timer v NA NA Watchdog Timer FR NA NA PROM FR NA FR MEMDMA v NA FR DMA v v FR 1 SDRAM only Not all configuration settings affect simulation Table D 5 summarizes peripheral support in the ADSP BF533 compiled simulator VisualDSP 5 0 User s Guide D 5 Peripheral Support in Simulators Table D 5 Peripheral Support in the ADSP BF533 Compiled Simulator Peripheral Support Modeled Streamable Bootable SPORT v v FR UART FR FR FR Flags NP NP NA System Timers v v NA RTC v NA NA EBIU NP NA NA PPI FR FR NP SPI FR FR NP Watch Unit FR NA NA Trace Unit FR NA NA Core Timer v FR NA Watchdog Timer v NA NA GPIO FR FR NA PROM NP NA FR MEMDMA v NA FR DMA v vd FR Table D 6 summarizes peripheral support in the ADSP BF561 simulator Table D 6 Peripheral Support in the ADSP BF561 Simulator Peripheral Support Mode
104. PO and not LPO_ALLOWED VisualDSP 5 0 User s Guide D 19 Simulator Instruction Timing Analysis for ADSP BF531 ADSP BF532 ADSP BF533 and ADSP BF561 Processors e Awkward loop e Raise stall SS mode RET read after write Kill Reasons The kill reasons are as follows Branch Kill change of flow Mispredict mispredict conditional change of flow Interrupt interrupt exception e Refetch refetch such as following an IDLE instruction Pipeline Viewer Window Examples Figure D 4 shows a RAW hazard stall Cycle Decode Address E E Execute2 Execute3 Writeback aj 149 R4 Pl I0 R5 F E PlH Ox E 150 BO R4 R4 P1 1 E P1 L Ox P1 H Ox K 151 LO start_memdmaqu BO R4 F 1 RS Pi P1 L Ox P1 H Oxff80 152 M0 28 X2 LO star BE E Io RS RS f Pi P1 L 0x400 153 R4 L W I0 MO 8 I E R4 Pl I0 R5 R5 Pl 154 ISIRAL W IO X 1 BO R4 R4 Pl I0 R5 155 Details for stage Decode cycle 154 B L0 star B0 R4 R4 Pi 156 r iiei v BHE xo es L0 star BO R4 157 Event 0 FB B N0 8 LO start mendn Type Stall v FB B M0 8 X mi Cause Sequencer or Memory stalls 26 X t R4 L W B B xl Details DAG Read After Write Hazard Figure D 4 RAW Hazard Stall D 20 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors These stalls are detected in
105. Pipeline Stages The ADSP TS101 Pipeline Viewer window provides a representation of instruction flow through the processor s pipeline Table C 1 lists the pipe line stages Table C 1 Pipeline Stages ADSP TS101 Processor Stage Abbreviation in Pipeline Viewer Instruction Fetch 1 F1 Instruction Fetch 2 F2 Instruction Fetch 3 F3 Decode DECODE Integer INT Access ACCESS C 2 VisualDSP 5 0 User s Guide Simulation of TigerSHARC Processors Table C 1 Pipeline Stages ADSP TS101 Processor Cont Stage Abbreviation in Pipeline Viewer Execute Stage 1 EXI Execute Stage 2 EX2 Pipeline stages F1 through F3 represent the fetch unit pipe Stages DECODE through EX2 represent the execution pipe Fetch unit pipe stages contain raw quads of 32 bit words fetched from memory not valid instruction lines When you view the Pipeline Viewer window in disassembly format by means of the right click menu instructions that appear in the fetch unit pipe are not valid instruction lines but merely bits and pieces Valid instruction lines appear in the execution pipe stages Stalls The examples that follow illustrate how the Pipeline Viewer displays dif ferent types of stall events for ADSP TS101 processors For a complete list of pipeline effects and memory transaction timing refer to the processor s hardware specification Stalls Due to IALU Dependency The following sequenc
106. R3 H RI1 H rnd12 rnd20 using 1 lt 1 1 gt RO H R2 R4 RNDI12 dreg as src dreg Areg2Dreg op 1 1 gt R4 L A0 R3 H R1 H shift rotate op using 1 lt 1 1 gt RI ROT R2 BY R4 L dreg as src dreg Areg2Dreg op 1 lt 1 gt R0 H R0 L SIGN R2 H R3 H SIGN R2 L R3 L add on sign using 1 lt 1 1 gt R6 H R6 L SIGN RO H RI H SIGN RO L RI L dreg as src dreg math op 1 lt 1 gt R2 R3 R Areg2Dreg op using 1 lt 1 1 gt R4 H R2 L RO H dreg as src VisualDSP 5 0 User s Guide D 27 Multicycle Instructions and Latencies Register Move Latencies In each of the following cases the stall condition occurs when the same register is used in both instructions Table D 20 Register Move Latencies Description Example cycles stalls gt instruction ADSP BF532 ADSP BF535 dreg sysreg 1 1 gt RO LCO ALU op using dreg as src 1 lt 1 1 gt R2 RI RO or vector ALU op 1 lt 1 gt R2 LCO0 1 lt 1 1 gt R1 L R2 RND dreg preg 1 lt 1 gt R0 PO sysreg dreg 1 lt 1 1 gt ASTAT RO dreg sysreg 1 1 gt RO ASTAT dreg dreg 1 lt 1 1 gt RI RO dreg sysreg 1 1 gt RO LCO multiply video op with dreg as src 1 1 lt 1 2 gt R2 H R1 L RO H dreg sysreg 1 1 gt RO LCO0 accreg dreg 1 lt 1 1 gt A0 RO preg dreg 1 1 gt PO R3 any processor op using preg l 4 lt 1 3 gt RO P0 dagreg dreg 1 1 gt
107. SP 3 5 IDDE Properties alDSP 3 5 16 BitNSystemN dde ex Pf myseript is Script name Iv Runin separate Temm space Hun as differ ereer Nomalwindow FedTager _Chenge leon o cm Figure A 7 Example Loading a Script From a Shortcut VisualDSP 5 0 User s Guide A 11 File Types File Types Table A 2 describes processor project files Table A 2 Files Used With VisualDSP used by VisualDSP Extension Name Purpose asm Assembly source file Source file comprising assembly language instructions Ke C source file Source file comprising ANSI standard C code and Analog Devices extensions cpp C source file Preprocessed compiler files that are CXX inputs to the C C compiler These hpp files comprise ANSI standard C code hxx dpj Project file Contains a description of how your source files combine to build an execut able program staf Linker Description File Linker command source file is a text file that contains commands for the linker in the linker s scripting language Lis Intermediate files Preprocessed assembly files generated by pp the preprocessor S doj Assembler object file Binary output of the assembler dlb Archiver file Archiver s binary output in ELF format h Header file Dependency file used by the preproces sor and a source file for the assembler and compiler dat Data file Dependency file used by the assembler
108. Stalls L1 data memory DM stalls are incurred through reading from or writing to L1 data memory Accesses can be direct to or from DM SRAM or indirect to or from DM cache Some of these stalls are multicycle instruction conditions they occur as a result of a specific instruction Some stalls are latency conditions they occur only when the two offend ing instructions are too close The specifics are described in each entry The following memory configurations apply to the ADSP BF535 proces sor Note that the causal factors in offending instructions and the stall consequences appear in bold typeface D 34 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Minibank Access Collision This section describes the following stalls SRAM access e Cache access SRAM Access 1 Cycle Stall This stall can occur only when an instruction accesses a bank configured as SRAM The memory regions associated with SRAM banks are calcu lated when an offset is added to the value of SRAM_BASE_ADDRESS MMR The start addresses for banks A and B are Bank A SRAM BASE ADDRESS lt lt 22 0x000000 Bank B SRAM BASE ADDRESS lt lt 22 0x100000 The minibanks are contiguous 4096 byte 4 KB chunks within the A and B address space With two simultaneous accesses via a multi issue instruc tion to the same minibank a 1 cycle stall is incurred For example IO is address 0x001348 I1 is address 0x001994
109. User s Guide Environment Observe these conventions To be viewable in mixed mode the source file must be compiled with debugging information enabled The display of pipeline symbols can be enabled or disabled in mixed mode When optimized a program can re order the generated instruc tions so that they bear little resemblance to the order of the original source lines In mixed mode assembly instructions are re ordered again so that all the instructions for a given source line are gathered together under that source line Figure 2 12 shows an example of the mixed mode format Editor Tab Mode Editor Tab mode provides an alternative tab based user interface for managing multiple source files in editor windows When this mode is enabled via the View menu a tab for each open source file appears at the bottom of the editor window VisualDSP 5 0 User s Guide 2 21 Editor Windows Example3 c OF x void second int j main 00004E 00004F 000050 000051 000052 000053 000054 000055 000056 int x m4 m4 i4 dm i4d m7 si si toppcstack dm id m7 m5 Ox3ff2 modify i4 m5 si n0 dm id m7 int y 10 while 1 outside 10 000057 000058 ar 0x000a dm outside outsidel 10 000059 dm outsidel outside2 10 000054 ar 0x000a Figure 2 12 Example Editor Window in Mixed Mode 2 22 VisualDSP 5 0 User s Guide
110. User s Guide Reference Information Invoking Online Help Invoke VisualDSP Help from within VisualDSP or outside of VisualDSP You can also access Help manually via Windows Explorer Access online Help from the VisualDSP Help menu by choosing Contents Search or Index To access online Help from the Windows Start button click the Start button and choose Programs Analog Devices VisualDSP lt version gt VisualDSP Documentation and then VisualDSP Documentation for All Families or VisualDSP Documentation for Blackfin SHARC or TigerSHARC gt The Help function is programmed to look for the Help system in the VisualDSP Help folder By default the VisualDSP software installation procedure places the complete set of Help files in the installation s Help folder If you receive an error message after invoking Help the Help system e May not have been loaded onto your PC May have been deleted May reside in a directory other than the default directory To locate the help chm files manually use the Windows Search function as follows 1 Record the Help file chm named in the error message 2 From the Windows Start button choose Search and For Files or Folders Enter the name of the chm file from Step 1 3 After locating the file launch it manually by clicking the file name from the Search Results window or from Windows Explorer VisualDSP 5 0 User s Guide A 51 Online Documentation
111. Window Figure 2 1 shows a Project window with VDK enabled Project Test DK dpj Project group 1 project s lp TestvDK a Bl Source Files The project includes i yp a Kernel Files folder ay Header Files when the project has H Linker Files VisualDSP kernel H E Kermel Files support L gt Project Kernel tab displays a VDK view Project tab displays a project view Figure 2 1 Example Project Window With Kernel Tab An additional folder titled Generated Files may be present when a project includes startup files The Project window can include two sub tabs The Project tab Project which is always available displays a hierarchal representation of a debug session s projects folders files and dependencies The Kernel tab 2 Kernel appears when VDK is enabled for a project It displays VDK related information 2 2 VisualDSP 5 0 User s Guide Environment This section describes the following topics Project View on page 2 3 Kernel Tab on page 2 4 Project Dependencies on page 2 4 Project Nodes on page 2 6 Project Page Right Click Menus on page 2 10 File Associations on page 2 14 Automatic File Placement on page 2 15 Project View The Project view displays a project group which may contain any number of projects Only one project however is active at a time Nodes are arranged in a hierarchy similar to the file structure i
112. Window Pages iecit rne at nis 2 84 SIC PEE E E pq DACH imamate 2 84 o MET 2 85 Operating on Multiprocessor Groups acusaciones a teripids 2 86 FOCUS F errr yet 2 86 Rieke Giek Ment 2 87 Pipeline Ties MIB gecesi ee eee 2 88 Right Click Menu of Pipeline Viewer Window 2 89 Pipeline Viewer Properties Dialog Box iuuenes cens 2 90 Pipeline Viewer Window Event Icons 12 2 91 Pipeline Instruction Event Details 1 2 use aec oth teb did 2 92 Cache Viewer i Amr 2 93 eiui MIT Mem 2 96 Detaled Vior ent ieee 2 97 xg cec P 2 98 i caesarean at du 2 99 PROP Mil c M 2 100 Address View Vie m 2 102 bitid4o 0 Rojo Fer 2 103 VDE State History Ae odaasesiirehr tnpeietiqiatienipiciseidap eph 2 105 Thread Sratus and Ev nc Colors 1a iine etat os 2 106 Window Operations Meu 2 107 Right Click Menu M 2 108 Tresc Lene eT 2 108 VisualDSP 5 0 User s Guide xi CONTENTS Plor Windays iocesd b Nerii ER v Ne tuique Pea dR 2 109 Plot Window POSUERE Sonsdtoiskrapia d cide a etapa MODA dE 2 110 AUTE aa edes RIDERS MP AS dida pa MEE 2 110 Tool Da eodeni ome did ai cda ida ad dnd 2 111 DI DM Rr 2 111 Plot Window DEUM oseaan 2 112 Plor ConDe i aO ccna eum 2 114 Plac Window POSEE oxixsekestdbultotebund vukFAnctiR i e tustbstubap 2 116 Plot Present
113. You can specify a color for each type of object internal memory external memory unused memory reserved memory output sections object sections overlays in live space and over lays in run space The objects are displayed in color when you view the Memory Map pane in graphical memory map mode When the project is ready to be built Expert Linker saves the changes to the 1df file VisualDSP 5 0 User s Guide 1 35 Code Development Tools gt Expert Linker OO x Input Sections Memory Map constdata El dil SLIBRARIES w PROGRAM Oxf0000000 OxfO026ffF E libc dlb x HEAP Of0030000 Oxf0037 fff EE zi libevent dlb HEAP exception doj E libepp_blkfn dlb ctor raiseint doj STACK 040038000 OxfOOZdiff libsfiflt dib STACK E libcpp blkfn dib E ertdoj program NE libcpprt blk n dlb dotorod doi proaraml WE lihden dih CO Shared em 1sm Cpo QP Shared Mem 2 Fl Fe Figure 1 4 Expert Linker Window The Expert Linker window contains two main panes The Input Sections pane displays a tree structure of the input sections The Memory Map pane displays each memory map in a tree or graphical representation You can dock or float the Expert Linker window in the VisualDSP main window Memory Map Pane Right Click Menu Table 1 4 describes the commands on the Memory Map right click menu Table 1 4 Memory Map Pane Ri
114. a SHARC Processor VisualDSP 5 0 User s Guide 2 79 Debugging Windows Figure 2 54 shows an example of a data register file in a register window Active Register File E3 RO Figure 2 54 Example Register Window 0000001800 3EDO3FCS600 0000000100 0000000100 0000001900 oo00000000 0000001900 0000001900 RS R9 0000000100 0000000000 40CS0FDBOO 0000000 00 0000000100 0000000000 0000000000 0000000000 A register window enables you to View and change register contents Change the window s presentation number format Register window number formats include standard formats such as hexa decimal octal and binary Depending on the processor other formats may be available You can change a register s data directly from within a register window The modified register content is used during program execution Edits to data do not affect your source files To make changes permanent edit the source file and rebuild your project Stack Windows Depending on your processor access to various stack windows is available including PC stack Counter stack 2 80 VisualDSP 5 0 User s Guide Environment Loop tack e Status stack Access stack windows via the Register menu For more information about your processor s stack windows consult VisualDSP Help Custom Registers Windows While debugging you can configure and display Custom Registers windows To create a Custom Registers
115. a plot window g Line Plot Example Line Plot Example Figure 2 72 Plot Window From a plot window you can zoom in on a potion of a plot or view the values of a data point VisualDSP 5 0 User s Guide 2 109 Debugging Windows You can print a plot save the plot image to a file or save the plot s data to a file For details refer to VisualDSP Help Plot Window Features Plot windows include a status bar toolbar and a right click menu Status Bar The status bar located at the bottom of the plot window displays the plot type and other information depending on the plot type and other settings The following examples show different plot information displayed on the status bar Line Plot AZ 740 EL 220 Waterfall Plot Aru 45 1 Y1 Line Plot BTC Buffer Capacity 38 Live Line Plot Figure 2 73 Status Bar Information for Plots In a waterfall plot the status bar indicates the azimuth and elevation view ing angles If you zoom in on a region the status bar indicates that zoom is enabled When using the data cursor the status bar shows the selected point s data value When a plot window s auto refresh mode is enabled in BTC mode the status bar indicates current buffer capacity for example 3896 and data logging status 2 110 VisualDSP 5 0 User s Guide Environment Buffer capacity which dynamically changes between 0 and 100 indi cates the portion of the buffe
116. a points in each line trace 3 24 VisualDSP 5 0 User s Guide Debugging g Waterfall Plot Example Waterfall Plot Example Wee bii Ir arty D P d 10 u ee E ENE LHH LIBBEEDCCNN aq m T oao ay T E AZ 740 EL 22 0 Waterfall Plot FFT Figure 3 7 Waterfall Plot A time based signal is sampled at a predefined sampling rate and stored as a slice in the grid row 0 columns 0 J Figure 3 8 shows a grid of sampled data In the drawing the sampled points labelled 1 and 2 are stored in the first two cells of Slice 1 The next time a signal is sampled it is stored in row 1 columns 0 N slice 1 This process continues until all the rows are filled By default an FFT performed on each slice results in a frequency output display Use a color map on the 3 D Axis page of Color Settings dialog box to enhance the display Each color corresponds to a range of ampli tude values VisualDSP 5 0 User s Guide 3 25 Flash Programmer Slice 1 shaded row My Time Sampled points Time Figure 3 8 Grid of Sampled Data The plot output displays a legend showing each color and associated range of values You can rotate the waterfall plot to any desired azimuth and elevation by using the keyboard s arrow keys Spectrogram Plots A spectrogram plot Figure 3 9 displays the same data as a waterfall plot except in a two dimensional 2 D
117. aeadac bfbebdbc cfcecdcc dfdedddc efeeedec Figure 2 51 Example Viewing Contents of a Specified Channel Only 2 76 VisualDSP 5 0 User s Guide Environment Figure 2 52 shows the list of currently defined channels and the contents of the selected channel Lal BTC Memory 03020101 Figure 2 52 Defined Channels and Contents of a Selected Channel VisualDSP 5 0 User s Guide 2 77 Debugging Windows BTC Memory Window Right Click Menu Table 2 18 describes the BTC Memory window s right click menu Table 2 18 BTC Memory Window Right Click Menu Command Purpose Go To Opens the Go To dialog box in which you specify an address The specified address appears in the top left corner of the display The address must be within the range defined for the channel currently being displayed Tip Double clicking in the address column also opens the Go To dia log box Show Map Shows or hides a more informative map display of all the current chan or nel definitions Hide Map Show Map displays a channel list Double click a channel to display its contents in the lower portion of the window Hide Map removes the list of channels The selected channel remains in the display Lock Columns Locks or unlocks the number of columns currently displayed in the window Select Format Specifies how to display data in the window Choices include double words 32 bits words 16 bits and bytes 8 bits
118. age of Output window 2 30 kills detected ADSP BF535 D 16 Pipeline Viewer ADSP BF535 D 12 D 17 stalls detected ADSP BF535 D 12 VDK defined A 76 VisualDSP_Log txt file 2 38 Microsoft Script Debugger enabling 2 41 mixed mode 2 20 editor window 2 20 pipeline symbols 2 21 mk files See makefiles multicycle behavior D 22 INDEX multicycle instructions D 22 32 bit multiply D 23 ADSP BF535 D 17 call and jump D 23 conditional branch D 23 core and system synchronization D 24 interrupts and emulation D 25 linkage D 25 push or pop multiple D 22 return D 24 TESTSET D 25 multiprocessor debug sessions 3 4 debugging 3 5 focus and pinning 2 86 3 6 managing 2 84 program execution 3 11 setting up 3 4 multiprocessor groups 2 86 multiprocessor systems See multiprocessor debug sessions Multiprocessor window 2 83 debugging with 3 5 Groups page 2 85 Status page 2 84 N nested expressions defining Help searches A 64 nested folders 2 6 No Boot Mode command B 10 nodes Project window 2 2 O object files See obj files obj files 1 30 A 13 online Help See Help operations program execution 3 11 program execution commands 3 11 VisualDSP 5 0 User s Guide INDEX optimizing pinning programs 2 94 definition 3 6 Output window 2 28 2 43 pipeline bookmarks 2 30 kill reasons ADSP BF531 Build page 2 29 ADSP BF532 ADSP BF533 capturing messages to log file 2 38 ADSP B
119. am run and debug the program If the project is not current has outdated source files or dependency information VisualDSP prompts you to build the project before loading and debugging the executable file 1 26 VisualDSP 5 0 User s Guide Introduction to VisualDSP Step 8 Build a Release Version of the Project After you finish debugging your application build a Release version of your project to run on the product s processor Code Development Tools This section describes the following development tools Compiler on page 1 28 C Run Time Libraries on page 1 29 Assembler on page 1 30 Linker on page 1 31 Expert Linker on page 1 34 e Archiver on page 1 41 e Splitter on page 1 41 Loader on page 1 42 Available code development tools differ depending on the processor The options available on the pages of the Project Options dialog box enable you to specify tool preference VisualDSP supports ELF DWARF 2 Executable Linkable Format Debug With Arbitrary Records Format executable files VisualDSP supports all executable file formats produced by the linker If your system is configured with third party development tools you can select the compiler assembler or linker to be used for a particular target build VisualDSP 5 0 User s Guide 1 27 Code Development Tools Compiler The compiler processes C C programs into assembly code The term compiler refer
120. am as the ICE does Another benefit of this capability is in understanding the effects of a program sequence You can generate a core file step over a subroutine and then gen erate a second core file Then convert both core files to text file format and diff the files to show all the effects of the subroutine Categories in Help You can filter VisualDSP Help by setting a preference or by launching a particular category of Help via the Windows Start menu Now there are three processor specific Help categories one for each processor family and a complete Help that contains information about all processor families an automatic options displays Help for currently selected debug session Each Help category for example Blackfin processor family Help dis plays information pertinent to that specific family of processors By selecting a Help category in effect you remove information about other families of processors from Help this improves your ability to quickly locate information in Help especially when running a search or looking up an entry in the Help Index Enhanced Licensing and Registration Software licence borrowing for floating licenses allows you to check out a floating license from a server for a predetermined length of time On the Licenses page of the About dialog box when a client license is installed the server name appears under Serial Number client appears under Family and use server appears un
121. anch The number of cycles that a branch takes depends on the prediction as well as the actual outcome VisualDSP 5 0 User s Guide D 23 Multicycle Instructions and Latencies Table D 13 Conditional Branch Cycles Prediction taken not taken Outcome taken not taken taken not taken Cycle BF532 BF535 BF532 BF535 BF532 BF535 BF532 BF535 Ti T 4 cycles 4 cycles 8 cycles 7 cycles 8 cycles 7 cycles 1 cycle 1 cycle Return Table D 14 lists return instructions and cycles Table D 14 Return Instructions and Cycles Instruction ADSP BF532 ADSP BF535 RTX 5 cycles 7 cycles RTE 5 cycles 7 cycles RTN 5 cycles 7 cycles RTI 5 cycles 7 cycles RTS 5 cycles 4 cycles 1 Best case Core and System Synchronization Table D 15 lists core and system synchronization instructions and cycles Table D 15 Core and System Synchronization Instructions and Cycles Instruction ADSP BF532 ADSP BF535 CSYNC 10 cycles 7 cycles SSYNC 10 cycles 7 cycles D 24 VisualDSP 5 0 User s Guide Linkage Table D 16 lists linkage instructions and cycles Table D 16 Linkage Instructions and Cycles Simulation of Blackfin Processors Instruction ADSP BF532 ADSP BF535 LINK 8 3 cycles 4 cycles UNLINK 2 cycles 3 cycles Interrupts and Emulation Table D 17 lists interrupts and emulation
122. and Number of Ways are required The target may display additional items such as Cache Size and Line Size The list of items depends on the selection in the Cache Selection pull down box 2 96 VisualDSP 5 0 User s Guide Environment Detailed View Page The Detailed View page Figure 2 64 displays a grid depicting cache sets rows and cache ways columns Cache Views CO Set Way 0 11 lo oxf0000178 12 MM oxto000198 oxfo000598 13 MM oxf00001b8 WW oxf00005b8 14 f oxf00001as Mf oxfo0005a8 18 MM oxf0000a58 19 MM oxf0000a78 20 M Oxf0000a80 21 Configuration Detailed History Performance Histogram Address Figure 2 64 Example Detailed View Page Data received from a cache event is placed in the cell corresponding to the cache set and way The most recent cache events are highlighted Each cell has an icon and text entry The icon indicates the type of cache event hit miss and so on that occurred Depending on the selected objects details such as reference address PC address cycle count event type event description and so on can be shown VisualDSP 5 0 User s Guide 2 97 Debugging Windows Pressing down the keyboard s Ctrl key and moving the mouse over a cell displays a tooltip showing cache event and cache line information A lock icon in the column header indicates that the cache way is locked A reference map icon in the Set column indicates the results of the
123. applications For VDK API refers to a library of C C functions and assembly macros that define VDK services These services are essential for kernel based application programs The services include interrupt handling thread management and sema phore management archiver The VisualDSP archiver e1far exe combines object doj files into library DLB files which serve as reusable resources for project development The linker searches library files for routines library members that are referred to by other objects and links them in your executable program breakpoint User defined halt in an executable program Toggle breakpoints turn them on or off by double clicking on a location in a Disassembly window or editor window break condition Hardware condition under which the target breaks and returns control of the target back to the user For example a break condi tion could be set up to occur when address 0x8000 is read from or written to A 66 VisualDSP 5 0 User s Guide Reference Information build Performing a build or project build refers to the operations pre processing assembling and linking that VisualDSP performs on projects and files During a build VisualDSP processes the files in the project that have been modified or depend on files that have been modified since the previous build A build differs from a rebuild all During a rebuild all VisualDSP processes all the files in
124. ared memory sm files and overlay ov1 files which can be loaded onto the target The linker s output files dxe sm ov1 are binary executable and link able files ELF To make an executable file the linker processes data from a Linker Description File 1df and one or more object doj files The executable files contain program code and debugging information The linker fully resolves addresses in executable files To specify linker options choose Project gt Project Options and click Link tab on the Project Options dialog box From the Link page select a Category of options Linker options are grouped into the following subpages General LDF Preprocessing Elimination Processor Linker terms are defined as follows link against Functionality that enables the linker to resolve symbols to which multiple executables refer For instance shared memory sm executable files contain sections of code that other processor VisualDSP 5 0 User s Guide 1 31 Code Development Tools executable dxe files link against Through this process a shared item is available to multiple executable files without being duplicated link objects Object files doj that become linked and other items such as executable dxe sm ov1 files that are linked against LDF file File that contains the commands macros and expressions that control how the linker arranges your program in memory memory Def
125. assembly code Line number and symbol information help you to source level debug assembly files Run command line scripts Use scripts to customize key debug ging features Use memory expressions Use expressions that refer to memory Use breakpoints to view registers and memory Quickly add and remove and enable and disable breakpoints Set simulated watchpoints Set watchpoints on stacks registers memory or symbols to halt program execution Statistically profile the target processor s PC JTAG emulator debug targets only Take random samples and display them graph ically to see where the program uses most of its time Linearly profile the target processor s PC Simulation only Sample every executed PC and provide an accurate and complete graphical display of what was executed in your program Generate interrupts using streaming I O Set up serial port SPORT or memory mapped I O Create customized register windows Configure a custom register window to display a specified set of registers Plot values from processor memory Choose from multiple plot styles data processing options and presentation options VisualDSP 5 0 User s Guide 1 5 VisualDSP Features Trace program execution history Trace how your program arrives at a certain point and show reads writes and symbolic names View pipeline depth of assembly instructions Display the pipeline stage by querying the target processor s through the pip
126. associate it with asm files If you drag three files filel cpp filel asm and file2 c into the Project window filel cpp and file2 c go into the C Source Files folder and filel asm goes into the Asm Files folder After automatic file placement you can manually move a file anywhere by selecting and dragging the file Editor Windows Use editor windows to view and edit files Open as many editor windows as you like from the Project window by double clicking on a file or by choosing Open File from a file s right click menu This section describes the following topics Editor Window Features on page 2 17 Editor Window Symbols on page 2 18 Bookmarks on page 2 19 Syntax Coloring on page 2 19 Viewing Modes Source Mode vs Mixed Mode on page 2 20 Editor Tab Mode on page 2 21 e Context Sensitive Expression Evaluation on page 2 23 Compiler Annotations on page 2 24 e Right Click Menu on page 2 39 2 16 VisualDSP 5 0 User s Guide Environment Editor Window Features Figure 2 10 shows items that can be customized in editor windows Control menu Specify colors for text objects amp shell_asm coeff W fe Cip cat1pa aa Specify Specify comment start tab widths Specify font and end strings Figure 2 10 Customizable Items in Editor Windows Editor windows support e User defined color coded comments strings keywords and tab settings syntax coloring Two viewing
127. ation Options Gesn ou PRIN DUq mM MSN 2 117 lanto A d o a A A T 2 119 Efe cuna anpes aa 2 120 y or Zo ETIN 2 120 DEAS EAT cuisse ine o iba tbt onqi e EP I B RENE Que a pM Muni buE Zelal Pee GEE ENIM NUN UMOR NU CNIUENES 2 121 DEBUGGING Debye ll A i or A 3 1 Debug Sesion Management sesisceradrsuscarcssderrconetrassisarcaviarsebarse 3 3 Simulation ve Emmlatign oaov caa DU EN HA TI e MORI UM TRE 3 3 Ne Liechtenstein vdd AA M UEM dE 3 3 bcnc M 3 4 Multiprocessor MP System Debugging nnm 3 4 Setting Up a Multiprocessor Debug Session 3 4 Debugging a Multiprocessor Systemi seasinsissasnsscssiascrannosvaveacss 3 5 Focus uS DUI n i en MK M RR MM NMMS 3 6 xii VisualDSP 5 0 User s Guide CONTENTS Window Dole Bar DnPobioaf KI aussen eret hee reed 3 6 Additional Focus Ducato uode coda bes diamo Re de oM gie 3 7 Code Analysis Tople elei cds tu ondes isi vau Risa d miU i iutiE 3 7 Statistical Profiles and Linear Profiles iuo cuededeid e ti eededis 3 8 Simulation Linear Profiling uiiestcc ase en pibe cdit esae did us 3 8 Emulation Statistical Probling iae mcn 3 8 jio 3 9 Propam Execution Opera lobi rerata REE 3 10 Selecting a New Debug Session at Startup eoe cai emaa i tenis en 3 10 Loading the Executable Program cca ccse cu cisesensmlonsvadieusnsarccive 3 11 Program Execunon Commande nssdcnainssnnsicncasenoninens 3 11
128. ation of zero or more input streams with one PG0 output file Refer to the Visu alDSP Getting Started Guide for a tutorial and to VisualDSP Help for how to information profiling A technique used during simulation to examine program execution within selected ranges of code Profiling helps you determine per centage of time spent executing instructions number of clock cycles spent executing instructions number of instructions exe cuted and the number of times memory is read or written The profiler is non intrusive It does not report on execution within a called function daughter function Use profiling to monitor program memory By watching one or more profile ranges you can find areas of code that may be optimized for better performance A profile session must include one memory range at a minimum For each range specify a start and end address You can use symbols or hexadecimal numbers to represent addresses VisualDSP 5 0 User s Guide A 79 Glossary project This term refers to the collection of source files and tool configura tions used to create a processor program Through a project you can add source files define dependencies and specify build options related to producing your output executable program A project dpj file stores your program s build information VisualDSP helps you manage projects from start to finish in an integrated user interface Within the context of a processor projec
129. ator so that the appropriate IDDE debug ses sion can be established VisualDSP 5 0 User s Guide 1 17 Project Development gt isualDSP Configurator 21 x Platform Templates Platforms HF ADSP 21065L EZ KIT Lite BIB ADSP 21160 EZ KIT Lite BP ADSP 21161 EZ KIT Lite BIB ADSP 21262 EZ KIT Lite BIB ADSP 21364 EZ KIT Lite H3 ADSP 21369 EZ KIT Lite BIB ADSP 21375 EZ KIT Lite fia HPUSB ICE BIB ADSP BF533 EZ KIT Lite BP ADSP BF535 EZ KIT Lite H3 ADSP BF537 EZ KIT Lite BIB ADSP BF538F EZ KIT Lite BP ADSP BF561 EZ KIT Lite Copy New Modify Delete Delete Al Save Cancel Tex Hep Figure 1 2 VisualDSP Configurator After the EZ KIT Lite evaluation system or emulator has been connected powered up and recognized in the Windows Device Manager you can select or create the appropriate platform needed for configuring a debug session If the appropriate platform is not shown you can create or config ure one by specifying its name type and JTAG chain scan path You can also use the VisualDSP Configurator to run ICE Test a utility that checks the functionality of your emulator refer to Figure 1 3 Refer to VisualDSP Help for details about using the VisualDSP Configurator and the ICE Test utility 1 18 VisualDSP 5 0 User s Guide Introduction to VisualDSP Figure 1 3 ICE Test Utility VisualDSP 5 0 User s Guide 1
130. ay be swapped with a higher priority thread When the kernel switches threads the entire processor s state is saved and the processor s state for the thread being switched in is restored critical region A sequence of instructions whose execution cannot be interrupted or swapped out Suspending all interrupt service routines ISRs before calling the critical region ensures that the execution of a crit ical region is not interrupted Once the critical region routine concludes ISRs are enabled CROSSCORE Analog Devices processor development tools which provide easier and more robust methods for engineers to develop and optimize systems by shortening product development cycles for faster time to market CROSSCORE components include the Visu alDSP software development environment and EZ KIT Lite evaluation systems and emulators for rapid on chip debugging A 68 VisualDSP 5 0 User s Guide Reference Information current directory Directory where the DPJ file is saved The build tools use the current directory for all relative file path searches See also default directories data set A series of data values in processor memory used as input to a plot You can create data sets and configure the data for each data set You specify the memory location the number of values and other options that identify the data Additional specifications for row and column counts are required for 3 D plots Debug configurati
131. bitrary size can then be loaded into the processor s internal and external memory makefile VisualDSP can export a makefile make rule file based on your project options Use a makefile mak or mk to automate builds outside of VisualDSP The output make rule is compatible with the gnumake utility GNU Make V3 77 or higher or other make utilities memory pool An area of memory containing a specified number of uniformly sized blocks of memory available for allocation and subsequent use in an application The number and size of the blocks in a particular memory pool are defined at pool creation message For VDK a signal similar to an event or semaphore used to syn chronize two threads in a system or to communicate information between threads A message is sent to a specified channel on the recipient thread and can optionally pass a reference to a payload to facilitate the transfer of data between threads Posting a message takes a deterministic amount of time and may incur a context switch mixed mode One of the two editor window display formats the other being source mode Mixed mode displays assembled code after the line of the corresponding C code A 76 VisualDSP 5 0 User s Guide Reference Information multiprocessor group The assignment of one or more processors to a group enabling a single multiprocessor operation MP Run MP Halt MP Step MP Reset and MP Restart to affect the processors in th
132. bled software breakpoint Disabled software breakpoint Enabled hardware breakpoint Disabled hardware breakpoint e o o SHARC processors only This instruction is currently in the Fetch Address stage of the pipeline P ADSP 2136x SHARC targets only This instruction is currently in the Prede code Fetch2 stage of the pipeline D SHARC processors only This instruction is currently in the Instruction Decode stage of the pipeline A ADSP 2136x SHARC targets only This instruction is currently in the Address Decode stage of the pipeline VisualDSP 5 0 User s Guide 2 49 Debugging Windows Table 2 12 Disassembly Window Symbols Symbol Description E SHARC targets only The instruction is in the Execute pipeline stage Yellow arrow This instruction is currently in the Execute stage of the pipeline p The display of pipeline stages is available only when The session is connected to a SHARC simulator target Enable pipeline display is selected on the General page of the Preferences dialog box via the Settings menu Expressions Window The Expressions window Figure 2 31 lets you enter an expression to evaluate in your program Evaluations are based on the current debug con text Open this window by choosing View Debug Windows and Expressions The Name and Value columns are always visible Other columns Address Type Size and Format are
133. bugging windows Chapter 3 Debugging Describes debug sessions code analysis tools program execution operations simulation tools and utilities Appendix A Reference Information Describes file types keyboard shortcuts command line parameters scripting toolbar buttons and text operations also provides a glossary and describes online Help features and operations Appendix B Simulation of SHARC Processors Describes the simulator options available on the Anomalies Events Simulator Load Sim Loader and Select Processor ID submenus under Settings also explains how to record simulator anomalies and events and describes SPI simulation in slave mode Appendix C Simulation of TigerSHARC Processors Describes simulator instruction timing analysis pipeline stages the Pipeline Viewer stalls aborts the current program counter value stepping and the Select Loader Program command on the Simu lator submenu under Settings Appendix D Simulation of Blackfin Processors Provides an overview of peripheral support for Blackfin simulators and describes limitations of the simulation software models simu lator instruction timing analysis and compiled simulation XXIV VisualDSP 5 0 User s Guide Preface What s New in This Manual The VisualDSP 5 0 User s Guide supports all Analog Devices Inc processor families and processors listed in Supported Processors on page xxvil For a lis
134. by line character Working With Bookmarks in an Editor Window When working with bookmarks in an editor window use the keyboard shortcuts listed in Table A 12 A 34 VisualDSP 5 0 User s Guide Reference Information Table A 12 Keyboard Shortcuts for Bookmarks Action Key s Toggle a bookmark Crrl F2 Go to next bookmark F2 Building Projects To build projects use the keyboard shortcuts listed in Table A 13 Table A 13 Keyboard Shortcuts for Building Projects Action Key s Build the current project F7 Build only the current source file Ctrl F7 Using Keyboard Shortcuts for Program Execution For program execution use the keyboard shortcuts listed in Table A 14 Table A 14 Keyboard Shortcuts for Program Execution Action Key s Load a Program Ctrl L Reload a Program Ctrl R Dump to File Ctrl D Run F5 Multiprocessor Run Ctrl F5 Run to Cursor Ctrl F10 Halt Shift F5 Step Over F10 VisualDSP 5 0 User s Guide A 35 Keyboard Shortcuts Table A 14 Keyboard Shortcuts for Program Execution Contd Action Key s Step Into F11 Multiprocessor Step Ctrl F11 Step Out Of Alt F11 Halt a Script Ctrl H Working With Breakpoints When working with breakpoints use the keyboard shortcuts listed in Table A 15 Table A 15 Keyboard Shortcuts for Breakpoints Action Key s
135. caused the break Restrictions When using hardware breakpoints do not place breaks at any address where a JUMP CALL or IDLE instruction would be illegal Do not place breaks in the last few instructions of a D0 LOOP or in the delay slots of a delayed branch For more information on these illegal loca tions refer to your processor s hardware documentation Simulation Tools Before you have the processor you can use interrupts and data streams within VisualDSP to simulate the processor s behavior 3 16 VisualDSP 5 0 User s Guide Debugging Interrupts Use interrupts to simulate external interrupts in your program When you use interrupts with watchpoints and streams your program simulates real world operation of your processor system Input Output Simulation Data Streams In many products processors exist as part of a larger system where they can act as a host or a slave They can drive other devices or take part in processing a subset of data Because of their extensive I O capabilities Analog Devices processors excel in these roles Use data streams to transmit data between e A device and a file e A device and a device e A device in one processor and a device in another processor in a multiprocessor system Using background telemetry channel BTC technology VisualDSP permits the streaming of data from a target processor without halting the processor This capability applies to emulation targets on
136. click within the VisualDSP title bar or within the title bar of a child sub window Restore Move Size Minimize Maximize Close Alt F4 Figure A 10 Right Clicking in the VisualDSP Window s Title Bar VisualDSP 5 0 User s Guide A 17 Parts of the User Interface From the VisualDSP title bar s right click menu you can Resize or move the application window Close VisualDSP Control Menu Control menu system menu commands move size or close a window Restore Move Size Minimize Maximize Close Alt F4 Figure A 11 VisualDSP Control Menu Program Icons Click one of the following program icon to open a control menu Program icon for the application and debugging windows Program icon for editor windows Placing the mouse pointer over a control menu command displays a brief description of the command in the status bar at the bottom of the applica tion window Editor Windows A floating editor window s control menu includes the Next command which moves the focus to another window A 18 VisualDSP 5 0 User s Guide Reference Information When an editor window floats in the main application window its pro gram icon resides at the left side of its title bar When an editor window is maximized the program icon resides at the left end of the menu bar Editor windows are described on page 2 16 Debugging Windows Each debugging window has a control menu You can open a
137. cntessuacnsgoderees A 57 Pino Pep emt MEM A 57 Bookmarking Frequently Used Help Topics A 58 Navigating n Online Help iauqinidet uii o HEU ert GU A 59 ER TOU M A 60 Pall eet Sees te eee A 60 Rules for Palle Test Searches oscsscssccenscnstecesensedeusvarereaacase A 62 Advanced Search Techriguts 1 iaeedecoe i perd Fasti aas A 62 busto cs c A 63 Boolean CAPRI orsono oN A 63 Nerd Epes Oi ico ete DDR Da Rd A 64 Rules Tor Advanced Searches aunraprasiiersirianniiann A 65 DONDE E ETE E E E E EEE E E S eS A 66 SIMULATION OF SHARC PROCESSORS Anomaly ORTONE CETT B 1 ADSP 21x6x Processor Anomalies eee B 2 VisualDSP 5 0 User s Guide xvil CONTENTS Shadow Write FIFO Anomaly ADSP 2116x Only B 2 SIMD Read from Internal Memory With Shadow Write FIFO Hit Anomaly ADSP 21 16x Only aieuseendate ti bx bi uud M E pap Du Ma dE B 3 ors ER M aaan B 4 dro e B 4 ansia i iol i MR B 4 Access to ADSP 21065L Short Word Internal Memory 9th Column at Eyen Addresses 1oioseciblidi OR Hd cp dd pL RU HN UH bM M ibd MA AA ndi B 7 Recording a Simulator Anomaly or Event iicet tte men nter B 7 Select Procesor TU OPON cic deena B 10 cT pg s ONS MM B 10 No Boor DOE Codes a i ieee RU d dita In B 10 Load Sin NU oL AR or oe dee tecetoeceracieneeeenegesoneaesind B 11 SPI Simulation in Slave Mode 12a aseensiddibedraitas te p
138. control codes For example if you copy a hyphen with a parameter the actual code of the copied hyphen may be an ASCII 0x96 instead of an ASCII 0x2D The hyphen may look OK but it will cause an error when the command is run Printing Help You can print a specific Help topic or multiple Help topics an entire section of VisualDSP Help Table A 27 How to Print Help Topics To print Do this Current topic Right click within the help topic and choose Print Selected topic On the Contents page Right click the topic p and choose Print Entire section of On the Contents page Help Right click a book icon C or a and choose Print Then choose Print the selected heading and all subtopics VisualDSP 5 0 User s Guide A 57 Online Help Tip From the Help window s Contents page click amp located at the top of the window Bookmarking Frequently Used Help Topics Bookmarking a topic in VisualDSP Help is just like bookmarking a page in a book This feature is also called setting up favorite places Note Each time a Microsoft HTML Help topic is bookmarked a record is recorded in the file hh dat This file not only records VisualDSP Help bookmarks but also the bookmarks placed in other application Help systems that use chm files Once a bookmark is placed onto a topic you can view a list of book marked topics and quickly open one To place a bookmark at a topic 1 Dis
139. cript Enable Debugger Clear Copy SEI HIS Toggle Bookmark Ctrl F2 Language d Tcl VBScript JScript Print Find v Allow Docking Hide Float In Main Window Figure 2 25 Output Window s Right Click Menu Print or find text in the window Dock hide or float the window To display the hidden window choose Output Window from the View menu Script Command Output Scripts provide a powerful means of developing full blown test applica tions of processor systems VisualDSP includes a language independent scripting host that uses the Microsoft ActiveX script host framework This scripting host permits the use of multiple scripting languages that conform to the Microsoft ActiveX script engine 2 40 VisualDSP 5 0 User s Guide Environment The main benefit of calling scripts in these languages is that they have support for COM scripting which allows access to the VisualDSP Automation API VisualDSP supports the following Microsoft ActiveX script engines languages e Visual Basic Scripting Edition JScript The Tool Command Language Tcl interpreter included with VisualDSP is not a Microsoft ActiveX script engine VisualDSP permits the use of other script engines languages that are not supported by Analog Devices technical support Script output is logged to VisualDSP_Log txt for viewing and analysis By default this file is located in the installation s Data directo
140. ct overlay or input section This command is available after you link the project and then right click on the Memory Map pane for a processor memory segment output section or input section Expand All Expands all items in the memory map tree to make their con tents visible View Legend Opens the Legend dialog box which shows all possible icons in the tree window with a brief description of each icon The Colors page displays a list of colors used in the graphical memory map You can specify each object s color View Global Properties Opens the Global Properties dialog box for the selected object The dialog box s title and content depend on the selected object Stack and Heap Usage Expert Linker enables you to adjust the size of the stack and heap and make better use of memory 1 38 VisualDSP 5 0 User s Guide Introduction to VisualDSP Expert Linker can Locate stacks and heaps and fill them with a marker value This operation occurs after you load the program into a processor target The stacks and heaps are located by their memory segment names which may vary across processor families e Search the heap and stack for the highest memory locations written to by the processor program This operation occurs when the target halts after you run the pro gram Assume that these values are the start of the unused portion of the stack or heap Expert Linker updates the memory map t
141. ction line step and skips invalid instructions aborted bubbles or slots occupied by an invalid fetch VisualDSP 5 0 User s Guide C 9 ADSP TS101 Processors Sometimes a step takes more than one cycle and the Pipeline Viewer win dow advances by several lines while the yellow arrow which marks the current program counter location in the Disassembly window moves to the next instruction line While skipping invalid instructions aborted bubbles or an invalid fetch the simulator still processes memory transactions When the step is completed and the memory window is updated a surpris ingly large number of new values may appear When debugging DMA be aware that a single step may cause several DMA transac tions to be completed C 10 VisualDSP 5 0 User s Guide Simulation of TigerSHARC Processors Simulator Options The Simulator submenu under Settings menu provides the Configure DMA File I O command which opens the DMA File I O Configuration dialog box Figure C 7 This is used to specify files as sources destina tions or both for DMA transfers DMA File I O Configuration E res Enable Description 0 External Port 1 External Port Path Source 2 External Port OO 3 External Port E 4 Link Output Preview 5 Link Output 6 Link Output 7 Link Output 8 Link Input 9 Link Input 10 Lin
142. d in Table 2 23 Table 2 23 Cache Viewer Window Pages Page Displays Configuration Cache configuration information Detailed View Location set and way of cache event History List of cache events Performance Cache performance metrics Histogram A plot of cache activity Address View Cache events on an Address vs Cycle plot 2 94 VisualDSP 5 0 User s Guide Environment The Cache Viewer window s right click menu described in Table 2 24 enables you to read write and step a cache events log which is a file that records cache events Table 2 24 Cache Viewer Window s Right Click Menu Menu Option Description Enabled Enables and disables collection of cache data while the target is running or stepping Clear Clears all displays and deletes all stored cache data Map References Opens the Map References dialog box where you specify the cache reference map start address and end address Event Log gt Read Opens the File Open dialog box where you select and open a cache events log file The log file data is used by the Cache Viewer window s Configuration view Event Log Write Opens the File Save dialog box where you save a cache events log file Cache events are written to this log file Event Log Step Executes one cache event at a time from the cache events log file The cache event displays in the Detailed View History and Histogram
143. d memory space can fail if it follows a stalled instruction or causes an instruction stall see the example below A DMA process cannot cause this anomaly It is restricted to conditions set up in the core processor A DMA process is not impacted by this anomaly that is the DMA will function correctly even if the anomaly occurs Refer to your processor s hardware documentation The occurrence of the failure varies with temperature voltage and frequency An instruction can stall because of the following circumstances 1 DAG stalls An instruction that loads a DAG register followed by an instruc tion that uses the same DAG for a memory access causes the second instruction to stall L2 8 DMCIO MO R1 Both L2 and IO reside in DAGI causing this instruction to stall Failure can occur if 10 points to a short word space or if the above instruction sequence is followed by a short word access 2 PM memory data access cache misses Any instruction that uses the PM bus to perform a data access causes an instruction stall the first time it is executed PM I8 M8 R1 3 Memory block conflicts VisualDSP 5 0 User s Guide B 5 Event Options If an instruction requires two accesses to the same memory block the instruction stalls DMCIO MO RO PM I8 M8 R1 A stall will occur when both address pointers point to the same memory block 4 Wait states for external memory accesses An inst
144. ddress refer to section Store Buffer Overflow on page D 39 for a description of the store buffer Load Store Size Mismatch If the load access s size 8 bit 16 bit 32 bit is different from that of the store access the store buffer must be flushed before the load can be carried out The stall time depends on how many stores are currently in the buffer and how long they each take to complete W PO RO lt N cycle stall as the buffer is flushed gt Rl B PO D 40 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Store Data Not Ready The data portion of a store does not necessarily have to be ready when it is entered into the store buffer Store data coming from the DAG registers and pregs has no delay but all other store data is delayed by three instruc tions If a load access collides with a store whose data is not ready the Blackfin processor stalls for four cycles W PO RO PO PS 3 cycles 0 cycles R1 W PO Rl P0 Instruction Groups All instruction group members conform to naming conventions used in the Blackfin Processor Instruction Set Reference Instruction groups described are not necessarily mutually exclusive in that the same instruc tion can belong to multiple groups Table D 27 Math Ops Instruction Groups Math Ops Video Ops Mult Ops ALU Ops Video Pixel Ops Vector Multiply Logical Ops 32 bit Multiply Bit Ops Vector MAC Shift Rotate Ops Ari
145. ded onto external proces sor memory statistical profiling A debugging feature that provides a more generalized form of pro filing that is well suited to JTAG emulator debug targets With statistical profiling VisualDSP randomly samples the target pro A 84 VisualDSP 5 0 User s Guide Reference Information cessor s program counter PC and presents a graphical display of the resulting samples in the Statistical Profiling window This win dow graphically indicates where the application is spending time JTAG sampling is completely non intrusive so the process does not incur additional run time overhead See also linear profiling stepping A technique for moving through source or assembly code to observe instruction execution streams A debug tool used during simulation to drive other devices or take part in processing a subset of data Use streams to simulate data input and output symbols Labels for sections subroutines variables data buffers constants or port names For more information refer to the related build tool documentation system configurator For VDK the system configuration control is accessible from the Kernel page of the Project window The Kernel page provides a graphical representation of the data contained in the vdk h and vdk cpp files target also called debug target The communication channel between VisualDSP and a processor or group of processors Targets includ
146. der Status The Machine ID box displays the C drive s volume ID If you are running off a server based floating license this box displays the MAC address of the primary Ethernet controller in the machine New Project Types The Project Wizard has been changed to simplify the process of creating a new project 1 8 VisualDSP 5 0 User s Guide Introduction to VisualDSP Control over Automatic Breakpoints You can configure whether automatic breakpoints are set after a program is loaded You can specify additional breakpoints to be set after a load and you can specify each additional breakpoint as being a software breakpoint or a hardware breakpoint Enhancements to Call Stack Window To improve the debugging of Release configurations a call stack is provided regardless whether debug information is present When using the Call Stack window when debug information is not available double clicking on an item in the window will open a Disassembly window if one is not already open and jump to the address linked to the specific item in the Call Stack window From these two windows you can now set the display format on a per expression basis Additional columns are available to display the expression s type address size and format Stand Alone Flash Programmer This utility provides flash pro gramming support between the development prototype stage and early pre production runs The Stand Alone Flash Programmer
147. disse oe dea Sed nde dide 1 14 jo 1 15 Simulation MI JI irion 1 16 EZ KIT Lire TA 1 16 Emulator Tago onan 1 17 Pa OS a A T MET 1 17 iv VisualDSP 5 0 User s Guide CONTENTS Debugeiug VEE qusreossrbeneeit in n er adH npe b ntis 1 20 Val 4 5 7 a 1 22 Program Dievelbpanent Steps LLuiuoendisecc ie ei tendi mbi e ae dod 1 22 sup DL ota PIDE ana 1 23 Step 2 Configure Projest Optio iius e Iratus 1 23 Step 3 Add and Edir Project Source Files i eite 1 23 Adding Files t vonr Project ausecsdaude v dl ronda tir ee 1 24 Creating Files ta Add to Your Project esosasstmicrereeetesias 1 24 II mee 1 24 Managing Project Dependencies sac ciciciserseiesiessecenscasivsorer 1 24 Step 4 Specifying Project Build Options 1 24 uri l E 1 25 Project Wide Pile and Tool Options 1er 1 25 Individual File and Tool Options 2222 pr br Ertrag ed 1 26 Step 5 Build Debug Version of the Project ee 1 26 Step 6 Create a Debug Session and Load the Executable 1 26 Step 7 Run and Debug the Program iedessi rtt tentata ii 1 26 Step 8 Build a Release Version of the Project 15 1 27 Code Development Toob cece ai das qa E pb 1 27 uc 1o o 1 28 NU ME CE ri 0 TH a 1 29 Dinkum Abridged Ca Library siccccsesscccnscsessccsteseieievaccnccses 1 29 Assembler e 1 30 Bo chau L 1 31 VisualDSP
148. dition the Release Notes for past updates are appended to the current update s Release Notes Updates to VisualDSP address problems and stabilize the release Updates do not contain significant new functionality However incre mental support e g emulation example programs header files default 1 10 VisualDSP 5 0 User s Guide Introduction to VisualDSP LDF errata accommodations EZ KIT Lite software and so on for new semiconductor products will be added as these products become available and gain support within the VisualDSP tools Starting with VisualDSP 3 5 new versions of VisualDSP are discrete upgrades Your PC can maintain multiple versions of VisualDSP Refer to online Help for details on updating your software Help explains how to identify the update currently installed on your system Project Development During project development VisualDSP helps you interactively observe and alter the data in the processor and in memory This section describes Overview of Programming With VisualDSP on page 1 12 Project Development Stages on page 1 14 e Targets on page 1 15 Platforms on page 1 17 Debugging Overview on page 1 20 e VisualDSP Kernel on page 1 22 Program Development Steps on page 1 22 VisualDSP 5 0 User s Guide 1 11 Project Development Overview of Programming With VisualDSP Programming effectively with VisualDSP depends on how well you ma
149. ditional columns Refer to Energy Aware Programming on page 3 31 for more information 2 58 VisualDSP 5 0 User s Guide Environment Changing the Window View After you specify window properties for the Statistical Linear Profiling and enable profiling the profiler collects data when you run a program Depending on the filtering options selected the window s Execution Unit column displays Function names such as main Single addresses for example PC 0x2000 e Address ranges for example 2000 2050 Single addresses and address ranges display in hexadecimal format The 0x notation however appears beside single addresses only Displaying a Source File Double clicking on a function name in the Execution Unit column not only displays the source of the function in the right pane but also displays profiling data for each line of the function Table 2 35 shows an example of code displayed for a function ie a Eeeeetaen Tunt X r C Testrsb Generic 4 main foo int include lt stdlib h gt PC 0xf0000020 int foo int 1 PC 0xf00003fc PC Oxf00003fa i return i 6 PC O xf 00009c bar int Fe 0xf00000ac R void bar int i Pini S Nwe x Tl p o ra c bm z o 5 u D i Total Samples 364 Elapsed Time 00 00 00 Enabled Figure 2 35 Example Code Displayed for a Function Displaying Functions in Libraries The profiling window enables you to display functions
150. dow about 2 75 right click menu 2 78 BTCs about background telemetry channels 2 73 BTC Memory window 2 75 changing BTC priority 2 75 channel definitions 2 73 defining channels 2 73 list of defined channels 2 77 streams 3 17 build date A 3 building projects See projects build options about 1 58 custom 1 59 files 1 25 individual file 1 59 projects 1 25 project wide 1 58 specifying 1 24 Build page about 2 29 build status viewing 2 29 build type See configuration buttons appearance on toolbars A 27 built in toolbars A 20 standard Windows functions A 42 C cache events 2 93 log 2 95 cache hits 2 94 cache misses 2 94 cache thrashing 2 94 I 2 VisualDSP 5 0 User s Guide Cache Viewer about 2 93 Address View page 2 102 cache events log file 2 95 Configuration page 2 96 Detailed View page 2 97 Histogram page 2 100 History page 2 98 Performance page 2 99 right click menu 2 95 cache ways 2 94 Call Stack window 2 63 categories in Help A 52 c files 2 14 A 12 channels BTC 2 73 definition A 67 CLKOUT pin configuring B 10 clock doubling ADSP 21161 processors B 10 code analysis tools 3 7 code development tools about 1 2 batch processing messages 2 31 list of 1 27 COFF defined A 67 colors Output window 2 29 plots 3 26 command line parameters idde exe A 7 commands control menu A 18 DOS 1 60 program execution 3 11 single stepping 3 11 stepping
151. ds at the total number of cache events Use this plot to identify the most active cache sets 2 100 VisualDSP 5 0 User s Guide Environment RE Icache Histogram 5 100 et Number Configuration Detailed History Performance Histogram Address Figure 2 67 Example Histogram Page VisualDSP 5 0 User s Guide 2 101 Debugging Windows Address View Page The Address View page Figure 2 68 displays cache events on an Address versus Cycle plot Use this view to display the cache events for the speci fied addresses over time Icache Start address Oxto0000215 15 000 20 000 25 000 Cycle Configuration Detailed History Performance Histogram Address Figure 2 68 Example Address View Page Address Range View Cache events display as icons identical to the icons used in the detailed view A start address and count are required Enter the start address as a hexadecimal value or a symbol Click the browse button to browse for a symbol The count determines the number of addresses displayed After entering a start address and count click Update to display the cache event data Use horizontal and vertical scroll bars to scroll the view 2 102 VisualDSP 5 0 User s Guide VDK Status Window Environment The VDK Status window Figure 2 69 is available when an executable file is built with VDK support enabled Open this window by choosing View VDK Wind
152. e 0 indicates a tagged expression representing the entire matched substring Similarly you can have another tagged expression represented by M1 2 D Although the tagged expression 0 is always defined the tagged expressions 1 2 and so on are defined only when the regular expression used in the search has enough sets of parenthesis Some examples are shown in Table A 23 Table A 23 Examples of Replace Operations String Search Replace Result Mr Mr 1s 2 Mrs abc a b c amp 1 2 abc a c bed a b c d amp M bcd b abcde c amp 1 2 abcde ab de cde ab cd e amp M cde cd Comment Start and Stop Strings Use start comment strings and stop comment strings for comment highlighting colors Table A 24 describes the two types of comment strings that you can set for each file type Table A 24 Start and Stop Comment Strings String Purpose Starts an assembly style single line comment fe Starts a C C style multiline comment Starts a C C style single line comment Carriage return Ends a single line comment C and assembly A 48 VisualDSP 5 0 User s Guide Reference Information Table A 24 Start and Stop Comment Strings Contd String Purpose Ends a C C style multiline comment blank Ends a C C style single line comment Online Documentation VisualDSP includes three types
153. e release mean doj release benchmark doj VDSP cc21k exe Release Mean doj Release benchmark doj proc ADSP 21062 L Release flags link od Release o Release Mean dxe endif ifeq MAKECMDGOALS Release_clean Release clean CR NReleaseMMean doj R NReleaseNbenchmark doj R NReleaseMMean dxe R Release ipa R Release opa R Release ti endif VisualDSP 5 0 User s Guide 1 55 Processor Projects Project Configurations By default a project includes two configurations Debug and Release described in Table 1 5 In previous software releases the term configura tion was called build type Table 1 5 Default Project Configurations Configuration Description Debug Builds a project that enables the use of VisualDSP debugging capabilities Release Builds a project with optimization enabled Available configurations appear in the configuration box which by default is located in the Project toolbar as shown in Figure 1 12 Figure 1 12 Configuration Box You cannot delete the Release or Debug configuration Customized Project Configurations You can add a configuration to your project A customized project configuration can include various project options and build options to help you develop your project Figure 1 13 shows a customized configuration Version2 listed in the configuration box 1 56 VisualDSP 5
154. e Unsigned Integer 16 bit formats depend Signed Fractional 32 bit on processor Signed Fractional 16 bit Unsigned Fractional 32 bit Unsigned Fractional 16 bit Hex32 Hex16 Hex8 Binary 32 bit Binary 16 bit Binary 8 bit Character Assembly Figure 2 48 Example Memory Window Formats for SHARC Processors e The active expression appears in the memory window s title bar 2 70 VisualDSP 5 0 User s Guide Environment Title bar 1 Data DM Short Word Memory He 04006E 0002 OFOO 0000 142B 0402 4 040073 063E 8000 SFFE 0002 OF00 040078 0000 142B 0402 063E 8000 04007D SFFE 0002 OFO0 0000 142B 040082 0402 063E 8000 SFFE 0002 040087 OFOO 0000 142B 0402 063E 04008C 8000 SFFE 0002 OFO0 0000 040091 142B 0402 063E 8000 SFFE 040096 0002 OFOO 0000 142B 0402 040098 063E 8000 SFFE 0002 OFOO NJ Select the expression you want Select Tracking to track Figure 2 49 Expression Tracking in a Memory Window VisualDSP 5 0 User s Guide 2 71 Debugging Windows e The memory window s right click menu displays a list of config ured expressions from which to select only one expression for tracking To track multiple expressions open multiple memory windows and track one expression per window Memory Window Display Customization You can specify the colors used for symbols data address values modified values and undefined memory regions You can also adjust the w
155. e cur rently selected group multiprocessor system A system built with multiple processors Often performance based products require two or more processors A system built with a single processor is called a single processor system Debugging a multiprocessor system requires that you synchronously run step halt and observe program execution operations in all the proces sors at once The SHARC and TigerSHARC simulators do not support this capability non bootable PROM image file Splitter output consisting of PROM files that cannot be used to boot load a system outdated file A file that has been edited since the last build payload For VDK an arbitrary amount of data associated with a message A reference to the payload can be passed between threads as part of a message to enable the recipient thread to access the data buffer that contains the payload pinning a window A technique that statically associates a window to a specific processor VisualDSP 5 0 User s Guide A 77 Glossary pipelining A feature that helps you analyze and tune your code for optimal performance For TigerSHARC processors and Blackfin processors VisualDSP provides a simulation only debugging window Pipeline Viewer to help visualize the pipeline by displaying pipe line stalls and aborts For SHARC processors the Disassembly window displays symbols F D or E to indicate an instruction s pipeline stage platform The device with
156. e driver is a processor application that interfaces with the Flash Programmer and performs all the interaction with the flash device Analog Devices supplies sample drivers for use with certain EZ KIT Lite evaluation systems Flash Programmer Window Figure 3 10 shows an example of the Flash Programmer window Flash Programmer Programming Commands Ox00000000 OxO00003FFF Ox00004000 OxO000SFFF Ox00000800 OxO00007FFF Ox00008000 OxO000FFFF Ox00010000 OxO001FFFF Ox00020000 OxO0002FFFF Ox00030000 OxO003FFFF Ox00040000 OxODO4FFFF 0x00050000 OxODOSFFFF Ox00060000 OxO006FFFF Figure 3 10 Flash Programmer Window in Driver View 3 30 VisualDSP 5 0 User s Guide Debugging Energy Aware Programming Energy aware programming is the ability to use simulation to view the relative impact of instructions source lines functions programs frequency and voltage on an application s estimated energy profile This allows you to make trade offs that minimize power usage The technique used to estimate the energy of the application is a partial implementation of a process known as Instruction Level Energy Estimation ILEE For details on ILEE refer to EE 294 on the Analog Devices Web site Ranking The Linear Profiling window in the simulator displays an Energy Units column The numbers accumulated in the Energy Units column represent the ranking
157. e of instructions causes a cycle stall at the Decode stage J1020x0 xr5 J10 1 This instruction is stalled in Decode until previous instruction reaches E2 VisualDSP 5 0 User s Guide C 3 ADSP TS101 Processors 81 j y n j2 OX1 82 ij 3j y k10 0X15 83 Edi 3 j gio o 84 ER GEM jE e es BS GER GES GE x5 j10 see BS GER GES GB x5 0310 87 EN E xr5 j10 e8 ER GER jB j x5 j10 s9 jA jj o3 33 j2 90 EM jA jj IF niea JUMP 93i EB jA GBS jW IF njeq JUMP Figure C 1 Stall Due to Cycle F1 F2 F3 DECODE INT ACCESS EX1 EX2 j Er n nop m Ja x nop nop nop k j 3 xrb r5 rb 0X1 i kl i j3 0X5 0x1 Wj j1 k j2 0X1 0X1 B j B j1 i k10 OX15 0X1 B i B ii Bij jlo 0 0X1 W j Bj Bi B j10 0 x B j1 Bi B j10 0 loop Wj r Bj B j10 0 loop 3 B r s x B j10 0 w IALU Dependency Stalls Due to Compute Block Dependency The following sequence of instructions causes a one cycle stall at the Integer pipeline stage YR3 R3 R2 YRA RA R3 Ef This instruction is stalled in Integer for 1 cycle The source register R2 is a destination in the previous instruction 41 x j n yr OXS nop nop j j0 0X1 xr 42 n x j yr3 OX1 yr4 0X5 nop n j0 0X1 xr0 43 n n x yr2 0 yr3 X1 yr n nop
158. e project development For more information see Debugging Windows on page 2 43 You have to learn only one interface to debug all your processor applications VisualDSP supports ELF DWARF 2 executable files VisualDSP supports all executable file formats produced by the linker Title Bar Figure A 9 shows the different parts of the title bar which has been split into three parts to fit the page gt Analog Devices VisualDSP Target ADSP BF535 ADSP BF535 Family Simulator Project dot product asm dpj Figure A 9 Title Bar The title bar includes these components Control menu button m Application name Analog Devices VisualDSP Name of the active target A 16 VisualDSP 5 0 User s Guide Reference Information Project name File name when an editor window is maximized in the main window Standard Windows buttons Clicking the control menu button opens the control menu which contains commands for positioning resizing minimizing maximizing and closing the window Double clicking the control button closes VisualDSP The tide bar right click menu Figure A 10 and control menu Figure A 11 are identical Additional Information in Title Bars A register window s title bar displays its numeric format such as octal An editor window s title bar displays the name of the source file Title Bar Right Click Menu A menu like the one in Figure A 10 appears when you right
159. e reported Warning Identifies situations that do not prevent the tool from processing the input but may indicate potential problems Remark Provides information of possible interest You can change the severity level of a message marked with a D which means discretionary The severity level of a message without a 4 D is non discretionary and cannot be changed VisualDSP 5 0 User s Guide 2 31 Output Window Syntax of Help for Error Messages In VisualDSP Help each error message can include several parts The available information depends on the tool and the message Table 2 9 describes the syntax of the error message description in Help To view the details of a message it must be viewed from the Help window If you run a tool from a command line interface such as a Command Prompt window or MS DOS Prompt window the message shows only the ID code error text and error location Table 2 9 Syntax for Error Message Help Part Description Identification Code Six character code unique to the message The first two char acters identify the tool e ar archiver e cc compiler ea assembler e el expert linker id IDDE e ji linker e pp preprocessor e si simulator e xml custom board support Error Text Text that appears after the identification code in the Output window Description Detailed description of the message Severity The degree
160. e simulators emulators and EZ KIT Lite evaluation sys VisualDSP 5 0 User s Guide A 85 Glossary tems Several targets may be installed on your system Simulator targets such as the ADSP TS101 cycle accurate simulator differ from emulator targets in that the processor exists only in software The Summit ICE emulator communicates with one or more physi cal devices over the host PC s PCI bus The USB ICE emulator communicates with a device through the PC s USB port threads ticks For VDK a kernel system component that performs a predeter mined function and has its own share of system resources VDK supports multithreading a run time environment with concur rently executed independent threads Threads are dynamic objects that can be created and destroyed at runtime Thread objects can be implemented in C C or assem bly language A thread s properties include an ID priority and current state wait ready run or interrupted Each thread main tains its own C C stack The system level timing mechanism Every system tick is a timer interrupt tool chain trace The collection of tools utilities used to build a project configuration Provides a history of program execution A trace is sometimes called an execution trace or a program trace Trace results show how the program arrived at a certain point and show program reads writes and memory fetches Blackfin and TigerSHARC processors do not support trac
161. e to cre ate a selection box 2 Release the mouse button to expand the plot 3 To restore the plot to its original scale right click on the plot and choose Reset Zoom VisualDSP 5 0 User s Guide 2 107 Debugging Windows Right Click Menu The VDK State History window s right click menu provides easy access to operations that can be performed from the state history plot Target Load Window Clicking the Target Load tab from the VDK State History window dis plays the Target Load window A target load plot Figure 2 71 shows the percentage of time that the target spent in the Idle thread DSP O b Target Load Target Load Target Load Figure 2 71 Target Load Window Plot A load of 096 indicates that VDK spent all of its time in the Idle thread A load of 10096 indicates that the target did not spend any time in the Idle thread Load data is processed by means of a moving window average 2 108 VisualDSP 5 0 User s Guide Environment Plot Windows Use a plot window to display a memory plot which is a visualization of values obtained from processor memory You can display one or multiple plot windows by choosing View Debug Windows Plot and New In the Plot Configuration dialog box specify the contents of a plot In the Plot Settings dialog box specify the plot s presentation You can modify a plot s configuration and immediately view the revised plot Figure 2 72 shows an example of
162. eads or stack pops The program halts when the conditions are met SHARC processors do not support watchpoints workspace You can open multiple windows arrange them in any configura tion and save the layout as a workspace setting that can be recalled loaded at a later time Each debug session s default workspace is automatically saved when you close the session and is automatically restored when you load that session By default each session includes two workspaces You can create any number of workspaces and switch among them Suggested workspaces include an edit workspace a debug workspace and a plot workspace A 88 VisualDSP 5 0 User s Guide B SIMULATION OF SHARC PROCESSORS Depending on your selected target processor several simulator options are available on submenus under the Settings menu This appendix describes the options that help you simulate SHARC processors The information is organized as follows e Anomaly Options on page B 1 Event Options on page B 4 Recording a Simulator Anomaly or Event on page B 7 e Select Processor ID Options on page B 10 Simulator Options on page B 10 Load Sim Loader Options on page B 11 e SPI Simulation in Slave Mode on page B 13 Anomaly Options The Anomalies submenu under the Settings menu provides commands to help you determine where an anomaly might be affecting your code This submenu appears only when the simulator supports anomaly co
163. easons The stall reasons are grouped into three categories e Multicycle instructions latencies see Multicycle Instructions and Latencies on page D 22 Instructions latencies see Instruction Latencies on page D 26 Ll data memory latencies see L1 Data Memory Stalls on page D 34 They are reported in the Pipeline Viewer as e Data address generator DAG read after write RAW hazard e Data register dreg hazard two cycle VisualDSP 5 0 User s Guide D 9 Simulator Instruction Timing Analysis for ADSP BF535 Processors Dreg register dreg hazard one cycle Memory stall Memory mapped register MMR stall CSYNC stall SSYNC or IDLE SYNC stall Raise stall Single step SS mode RET read after write Unidentified stall Kill Reasons The kill reasons are as follows Branch Kill change of flow Mispredict mispredicted conditional change of flow Refetch refetch such as following an IDLE instruction Interrupt interrupt exception VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Pipeline Viewer Window Examples Figure D 1 shows a RAW hazard stall Iz ipeum Address Executel Execute2 Execute3 Writeback al 14 I0 RO R0 4 NOP NOP NOP 15 R4 10 I0 RO RO 4 NOP NOP 16 S RA 10 B I0 RO RO 4 NOP j 17 S RA I0 amp B B I0 RO RO 4 NOP 18 S RA I0
164. eft Arrow lt Move the cursor to the right one character Right Arrow gt Move the cursor to the beginning of the file Ctrl Home Move the cursor to the end of the file Ctrl End Move the cursor to the beginning of the line Home Move the cursor to the end of the line End Move the cursor down one line Down Arrow J Move the cursor up one line Up Arrow Move the cursor one page down Page Down Move the cursor one page up Page Up Move the cursor right one tab Shift Move the cursor left one tab Shift Tab Move the cursor left one word Ctrl Left Arrow lt Move the cursor right one word Ctrl Right Arrow gt Move to the matching brace character within a file Ctrl B Go to the next bookmark F2 A 32 VisualDSP 5 0 User s Guide Reference Information Table A 9 Keyboard Shortcuts for Moving Within a File Contd Action Key s Go to a line Ctrl G Find text Ctrl F Find the next occurrence of text F3 Cutting Copying Pasting Moving Text To edit text use the keyboard shortcuts listed in Table A 10 Table A 10 Keyboard Shortcuts for Editing Text Action Key s Copy text Ctrl C or Ctrl Insert Copy text Select with cursor and Ctrl drag Cut text Ctrl X or Shift Delete Delete text Delete selection or forward Delete text Backspace selection or backward Mo
165. eline interface For details refer to the VisualDSP Getting Started Guide and VisualDSP Help VDK Features The VisualDSP Kernel VDK is a scalable software executive specially developed for effective operations on Analog Devices processors The VDK is tightly integrated with VisualDSP The kernel enables you to abstract the details of the hardware implemen tation from the software design As a result you can concentrate on the processing algorithms The kernel provides all the basic building blocks required for application development Properties of the kernel can be characterized as follows Automatic VisualDSP automatically generates source code framework for each user requested object in the user specified language Deterministic VisualDSP specifies whether the execution time of a VDK API is deterministic Multitasking Kernel tasks threads are independent of one another Each thread has its own stack Modular The kernel comprises various components Future releases may offer additional functionality 1 6 VisualDSP 5 0 User s Guide Introduction to VisualDSP e Portable Most of the kernel components can be written in ANSI Standard C or C and are portable to other Analog Devices processors e Pre emptive The kernel s priority based scheduler enables the highest priority thread not waiting for a signal to be run at any time e Prototypical The kernel and VisualDSP create an init
166. enables the development engineer to script or automate this process with a license free tool allowing the manufacturing technician to repeatedly program any number of boards prior to major production Consult VisualDSP Help for details and how to use these new features VisualDSP 5 0 User s Guide 1 9 Product Updates and Upgrades Product Updates and Upgrades VisualDSP is a licensed software product Installation and licensing are described in the VisualDSP Licensing Guide which is available from Help This section describes product updates and upgrades Various support functions are available from the About dialog box as described in Support Information on page A 2 VisualDSP Product Upgrades From time to time Analog Devices releases new software versions upgrades Starting with VisualDSP 3 5 new versions of VisualDSP are discrete upgrades Your PC can maintain multiple versions of VisualDSP Refer to online Help for details on upgrading your software The upgrade procedure does not change the previous version s folder structure or license file The new installation process uses the previous version s path and license Check the Analog Devices Web site to ensure that you have the latest software version VisualDSP Product Updates As of VisualDSP Version 4 0 software updates are available from the Analog Devices Web site The content of an update is inclusive of all pre vious updates In ad
167. ency information de cplus cstddef de cplus exception de cplus new de cplus xstddef de def21060 h de limits h de cplus stddef de stdio h de string h de VDK_Internals h de VDK_Public h de yvals h PE M d OE c EE D ET P CY 43 IM HOR Ae 20 Qi 20 OY 1CY COO OD D t ME COE ER C PE P a wu Eu uM iue uM ues cuu um ius get geet 1 60 VisualDSP 5 0 User s Guide Introduction to VisualDSP VisualDSP Help System The VisualDSP Help system is designed to help you obtain information quickly Use the Help system s table of contents index full text search function and extensive hyperlinks to jump to topics Bookmark topics that you plan to revisit VisualDSP Help is comprised of multiple Help systems chm files Each file is identified with a book icon 2 in the software installation s Help folder The majority of the Help system files are VisualDSP manuals and hardware documentation These manuals are also available in PDF format on the installation disk for printing Manuals are also available from Analog Devices as printed books Each window toolbar button and menu bar command in VisualDSP is linked to a topic in Help Other portions of the VisualDSP Help system provide procedures for configuring and using tools Some chm files support pop up messages for dialog box controls buttons fields and so on These messages which appear in little yellow boxes comprise
168. ensive SONNE A S A 8 Lato mec E A 12 zr i Ro RU d 0 casino A 15 Tele 77 amen ie Pe A AOA A 16 xiv VisualDSP 5 0 User s Guide CONTENTS Additional Information in Title Dass 12er A 17 Tiie De PM lick Moin aenneren td i pu EM ME A 17 Control Menu srrneaaraiir ioen A A 18 qs i n AN A 18 Editor WOE douce istoc oH pibuRb ERU ni blu Mo prd a A 18 Debuiug WOROWI ccctrnccsesimeenineteinnee A 19 Mena Det ect Q A 19 Toolbars and User RON ouenovepactuegpebrdbibre banda nap Has Re ip A 19 Pie Toolbars sic ei ee ees A 20 Toolbar Customization 1 i saccccinadenchdecdetaiseae escemarcs kx adu da A 21 User Tools A 21 Toolbar DUON sranane ees A 22 Toolbar OO BEIM esamina aaa a A 27 Toolbar Bnin Appearance nee A 27 Bon Lc M A 28 Toolbars Docked ve Floating o exnn em ac tti dde a pix III A 28 Toolbar 1 TN m A 29 Drees Bal iiuedessendeintibn tb imd lv MEM dim dom hM eden iE A 29 Te bow IE pos hae wean RE Rad EM A 31 Working jug M A 31 Moving d e a Fe arsiciononan iniiai n A 32 Cutting Copying Pasting Moymg Text 1aosenceiebensna tenis A 33 Selecting Text Within a File cssssnioromssiesniocininoni A 34 Working With Bookmarks in an Editor Window A 34 VisualDSP 5 0 User s Guide xv CONTENTS Building Projecti Meme M A 35 Using Keyboard Shortcuts for Program Execution A 35 bus A regc i MP A 36 hte VISUIDSPee
169. er can perform a large number of optimizations in order to generate the assembly code The decisions taken by the com piler as to whether certain optimizations are safe or worthwhile may be viewed This information can help you understand how close to optimal a program is and what can be done to improve the generated code For more information about optimizing code refer to your processor s VisualDSP C C Compiler and Library Manual The compiler optimizer s feedback is provided as annotations made to the assembly file generated by the compiler You can view compiler annota tions in C C files in editor windows The annotations are inserted 2 24 VisualDSP 5 0 User s Guide Environment immediately below the corresponding source lines similar to mixed mode When first viewed the editor window displays an icon Figure 2 14 to indicate the presence of a compiler annotation B annot_vect_advice c Compiler int i T annotation int sl 0 e icon p for i20 i lt n i sl x i y i hf WZ Figure 2 14 Compiler Annotation Icon in Editor Window Hover the mouse cursor over an annotation icon to display the compiler annotations in a tooltip if it fits a tooltip When there are multiple anno tations the number of compiler annotations appears in the tooltip See Figure 2 15 int i int sl D for i20 i lt n i sl x i h vy i Figure 2 15 Displaying Compiler Annotatio
170. er s Guide 1 23 Project Development Adding Files to Your Project You can add any type of file to the project The development tools selec tively process only recognized file types when you build the project Creating Files to Add to Your Project You can create new text files The editor can read or write text files with arbitrary names Adding files to your project updates the project s file tree in the Project window Editing Files You can edit the file s that you add to the project To open a file for editing double click on the file icon in the Project window The editor has a standard Windows style user interface and supports normal editing operations and multiple open windows You can customize language and processor specific syntax coloring and create and search for bookmarks Managing Project Dependencies Project dependencies control how source files use information in other files and consequently determine the build order VisualDSP maintains a makefile which stores dependency information for each file in the project VisualDSP updates dependency information when you change the project s build options add a file to the project or choose Update Dependencies from the Project menu Step 4 Specifying Project Build Options After creating a project setting the target processor and adding or editing the project s source files configure your project s build options Specify options or accept the default option
171. er s Guide A 73 Glossary with higher priorities while executing the current ISR For VDK the ISRs are written in assembly language VDK reserves the timer and the lowest priority reschedule interrupt JTAG Joint Test Action Group This committee is responsible for imple menting the IEEE boundary scan specification enabling in circuit emulation of ICs JT AG ICE configurator See VisualDSP configurator kernel The main module of a real time operating system The kernel loads first and permanently resides in the main memory and manages other modules of the real time operating system Typical services include context switching and communication management between OS modules keyboard shortcuts The keyboard provides a quick means of running the commands used most often such as simultaneously typing the keyboard s Ctrl and G keys indicated with the symbols Ctrl G to go to a line ina file librarian A utility that groups object files into library files When linking your program specify a library file and the linker automatically links any file in the library that contains a label used in your pro gram Source code is provided so you can adapt the routines to your needs A 74 VisualDSP 5 0 User s Guide Reference Information library files The VisualDSP archiver e1far ex combines object 00J files into library d1b files which serve as reusable resources for project development The linker
172. ers in a session name but the Session List dialog box can display about 32 characters session type See connection type shortcuts See keyboard shortcuts signal For VDK a method of communicating between multiple threads VDK supports four types of signals semaphores events messages and device flags VisualDSP 5 0 User s Guide A 83 Glossary simulator The simulator is software that mimics the behavior of a processor chip Simulators are often used to test and debug code before the processor chip is manufactured The way a simulator runs an executable program in software is similar to the way a processor does in hardware The simulator also simulates the memory and I O devices specified in the 1df file VisualDSP lets you interactively observe and alter the data in the processor and in memory The simulator reads executable files A simulator s response time is slower than that of an emulator source files The C C language and assembly language files that make up your project Other source files that a project uses such as the 1df file contain command input for the linker and dependency files data files and header files View source files in editor windows source mode One of the two editor window display formats the other being mixed mode Source mode displays C code only splitter A PROM splitter utility that transforms an executable file into a non boot loadable image This file is loa
173. es A 86 VisualDSP 5 0 User s Guide Reference Information unscheduled regions For VDK a sequence of instructions whose execution can be inter rupted but cannot be swapped out The kernel acknowledges and services interrupts when an unscheduled region routine is running VDK See VisualDSP Kernel VDK VisualDSP An Integrated Development and Debugging Environment IDDE for Analog Devices processor development tools VisualDSP Configurator Previously called JTAG ICE Configurator or ICE Configurator use this utility to describe the hardware to VisualDSP when con necting to a JTAG emulator session VisualDSP requires this description to set up the debug session The VisualDSP Configurator also provides access to ICE Test a utility for testing the target VisualDSP Kernel VDK The RTOS kernel from Analog Devices a software executive between processor algorithms peripherals and control logic The kernel is integrated with the Integrated Development and Debug ging Environment IDDE assembler compiler and linker programs into the development tool chain Refer to the VisualDSP Kernel VDK Users Guide for details watchpoints For simulation only Similar to breakpoints watchpoints stop program execution Unlike breakpoints which are attached to specific addresses watchpoints are attached to user defined VisualDSP 5 0 User s Guide A 87 Glossary conditions such as memory r
174. es or when programs do not adhere to compiler standards Frame pointers in the call stack that do not have debug symbols associated with them may appear in the Call Stack window as man gled assembly labels or memory addresses with an offset Function YEITUETENTIMP function3 Ux6c gt function2 0x70 gt functionl 0x66 Double clicking on a function opens an editor window or the Disassembly window main Ox8 gt Disassembly ix unction4 ale zj FFA110AE RTS _function4 FFA110B0 LINK 0x28 FFA110B4 SP R7 4 7 P5 5 FFA110B6 IO L 0x4 FFA110B IO H Oxff90 FFA110BE SP 12 FFA110C0 PO FP m FF 110C2 P1 9 FFA110C4 NOP FFA110C6 NOP FFA110C8 RO IO FFA110CA PO 40 FFA110CC LSETUP 4 x 0 xFFA110D0x 4 x FF 110D0 MNOP PO RO RO FFA110D8 PO RO z Figure 2 43 Application Built When Debug Information is Not Available 2 66 VisualDSP 5 0 User s Guide Environment Memory Windows Use Memory windows to View and edit memory contents Display the address of a value Move the mouse pointer over the value and hold down the keyboard s Ctrl key Lock the number of columns currently displayed This action resizes the window horizontally without altering the display Track one expression You open memory windows from t
175. escribed in the next step 2 Invoke VisualDSP as you normally do Typical methods include using the Windows Start button sequences clicking desktop icons or using Windows Explorer The Session Wizard appears 3 Specify and activate a debug session When launching VisualDSP in stand alone mode ensure that the session is configured correctly before loading the program 3 10 VisualDSP 5 0 User s Guide Debugging Loading the Executable Program Once you have specified the debug session begin the session by loading the executable program After a successful build of the target executable program VisualDSP if configured loads the program automatically to the current session when the session processor type matches the project s processor If the cur rent session processor does not match the project s processor type you are prompted to choose another session If automatic load is not configured VisualDSP does not try to load the executable program automatically after a successful build The target must be an executable DXE file This debugging feature saves time because you do not have to load the executable target manually You can start to debug immediately after successfully building the project Program Execution Commands Run program execution commands from the Debug menu or from the toolbar Executable files run until an event such as a breakpoint watchpoint or user issued Halt command stop
176. essages to the Output window Halt stops processing after the event has occurred This option is similar to using a watchpoint Enabled Enables this event check Verbose Specifies that multi line messages are written to the Output window When this option is not selected messages are one line long 4 Click OK VisualDSP 5 0 User s Guide B 9 Select Processor ID Options Select Processor ID Options For ADSP 2106x or ADSP 2116x processors only you can configure the simulator processor ID Select Single Processor or a particular processor in a multiprocessor group for example Processor 1 Processor 2 and so on Simulator Options The Simulator submenu under the Settings menu provides the CLKDBL command for ADSP 21161 processors only Use this command to double the clock speed circuitry Clock doubling lets you set control bits but it does not affect how the simulator runs You can configure the processor s CLKOUT pin to be 1x or 2x the rate of CLKIN The appearance of a check mark beside the CLKDBL command on the Simulator submenu indicates that this option is selected No Boot Mode ADSP 2106x and ADSP 2116x processors only The Simulation submenu s NoBootMode command is available for ADSP 21x6x simulators to support development code in configurations where the processor is in NoBoot mode starting execution from exter nal memory for pre ADSP 2126x processors or starting exec
177. essor EEEE A 20 VisualDSP 5 0 User s Guide Reference Information Table A 3 Built In Toolbars Name Toolbar User Tools PIPIAIAIAIAILAILAILAILA Workspaces MIRE EE Ee To obtain information about a tool move the mouse pointer over the tool and press the keyboard s F1 key Toolbar Customization By default nine standard toolbars Table A 3 appear near the top of the application window below the menu bar You can change the appearance of toolbars by Moving docking or floating the toolbars Adding buttons to or removing from toolbars Displaying large buttons You can also Hide toolbars from view e Add and delete custom built toolbars User Tools Save time running commands by configuring user tools A maximum of ten user tools may be configured VisualDSP 5 0 User s Guide A 21 Parts of the User Interface A user tool runs a command which can Contain parameters to launch an application Beascript command Access configured user tools from the Tools menu or from the User Tools toolbar as shown in Figure A 13 Figure A 13 Default User Tools When a user tool is configured its menu name label appears in the Tools menu The label also appears when you move the mouse pointer over a user tool button Toolbar Buttons The toolbar comprises separate tool buttons and provides quick mouse access to commands The toolbar is a Windows docking ba
178. essors that you checked off under Multiprocessor System in the New Session dialog box Multiprocessor x Figure 2 58 Example Multiprocessor Window Groups Page VisualDSP 5 0 User s Guide 2 85 Debugging Windows From the Groups page you can assign one or more processors to a group Performing a multiprocessor operation MP Run MP Halt MP Step MP Reset and MP Restart affects only the processors in the currently selected group Right clicking on the Group page displays a context menu for adding or removing a group Operating on Multiprocessor Groups For example if a session contains three processors A B and C and a group is created that contains A and C Running the MP Run command runs A and C only and B remains unaffected Focus Processor focus changes depending on the window currently selected To move focus among the processors click on a processor listed in the Multiprocessor window Figure 2 56 You can pin a register window a memory window or Disassembly win dow to a specific processor Select the processor in the Multiprocessor window and right click in the window that you want to pin Then choose Pin to Processor to lock the window to the selected processor A window pinned to a processor always displays that processor s data regardless of the currently focused processor For example if a register window is pinned to Processor 1 and a memory window is pinned to Processor 2 selecting the re
179. ettings for the project and for individual files You can set up fold ers that contain your source files A project can include VDK support VisualDSP 5 0 User s Guide 1 43 Processor Projects Use the Project window to manage projects from start to finish Within the context of a project you can Specify code development tools Specify project wide and individual file options for Debug or Release configurations of project builds e Create source files VisualDSP facilitates movement among editing building and debug ging activities This section describes the following topics Project Wizard on page 1 44 Project Options on page 1 47 Project Groups on page 1 48 Source Code Control SCC on page 1 50 e Makefiles on page 1 51 Project Configurations on page 1 56 Project Build on page 1 57 Project Wizard VisualDSP provides a Project Wizard Figure 1 6 to simplify the creation of a new project The Project Wizard provides pages of options to configure your new project Depending on selections various page and options are available 1 44 VisualDSP 5 0 User s Guide Introduction to VisualDSP First the wizard queries you as to what you want configured Then it generates a custom startup code file based on your choices adds it to the project and modifies the linker settings to link in the customized 1df file After defining the project you can project changes later via the Pro
180. etup with same loop registers 1 9 143 LSETUP top bottom LCO P0 loop setup with LCO and LCO 0 1 1 gt LSETUP top bottom LCO P0 any processor op 1 lt 1 1 gt NOP loop setup with LC1 and LC1 0 1 1 gt LSETUP top bottom LC1 P0 any processor op 1 lt 1 1 gt NOP LCO LCI reg written to 1 lt 1 gt LCO RO any processor op 1 9 lt 1 4 gt NOP LT0 LBO written to and LCO 0 1 1 gt LTO SP any processor op 1 9 lt l 4 gt NOP LT1 LB1 written to and LC1 0 1 lt 1 gt LB1 PO any processor op 1 9 lt l 4 gt NOP kill while loop buffer is being 0 3 cycle stall written due to interrupt exception NMI emulation events VisualDSP 5 0 User s Guide D 31 Multicycle Instructions and Latencies Latencies Due to Instructions Within Hardware Loops The following stall conditions occur when the listed instruction or condi tion within a hardware loop results in a 3 cycle stall at the next iteration of the loop A move conditional or POP into any of the LC LB LT registers A loop setup through the use of the same loop count registers in the first three instructions of the loop A branch in the first three instructions of the loop JUMP CALL conditional branch An interrupt or exception in the first four instructions of the loop CSYNC or SSYNC The inner hardware loop s bottom is strictly within the outer hard ware loop s first four instructions If the in
181. ext Under Do you want to select Add startup code only Then click Next In the tree control left side of Project Wizard click Processor Clock and Power Settings Select Configure clock and power settings Then click Finish In the Project window add application source file s to the new project Build and run your application The numbers in the Energy Units column of the Linear Profiling window are an accumulation of the ranking of every instruction after it has been converted to Energy This display allows you to view the relationship between power settings in different parts of your code Use these numbers to verify your power savings Figure 3 11 shows the profiling results when the Configure clock and power settings option is enabled Figure 3 12 shows the results when Configure clock and power settings is disabled Note that both of these illustrations show only the left side of the Linear Profiling window 3 32 VisualDSP 5 0 User s Guide Debugging Using the profiled numbers in the Count and Energy Units columns of both displays and referring to 108t32 mul we can calculate a power savings of approximately 50 gt Linear Profiling ADSP BF537 Blackfin Memory Instruction Samples 1 Histogram Count Execution Unit Energy Units 563948 float32 mul 216047368 480000 sinf 186062000 307970 int32 to float32 122235457 306000 float32 add 116232000 126039 PowerProfile Mem 49527032
182. ference Information IDDE Command Line Parameters VisualDSP can be invoked from a command line or a shortcut Syntax idde exe f script name s session name p project name Note Specify the full path to idde exe Only one instance of each parameter is permitted Table A 1 describes the idde exe command line parameters Table A 1 idde exe Command Line Parameters Item Description f script_name Loads and executes the script specified by script_name Use this parameter to automate regression tests You can also manipulate Visu alDSP by running a script from a library of common commands that you create If an error is encountered while executing this script VisualDSP exits automatically s session_name Specifies the session to which VisualDSP connects when it starts The session must already exist Use this parameter when you debug more than one target board Having multiple shortcuts to idde exe allows you to run a different session This overrides VisualDSP default behavior of connecting to the last session p project name Specifies the project to load at startup The project must already exist Examples idde exe f c scripts myscript vbs idde exe s My BF535 JTAG Emulator Session idde exe p c projects myproject dpj VisualDSP 5 0 User s Guide A 7 Extensive Scripting Extensive Scripting You can issue script commands from a command window the Output
183. format Each X Y location displays as a color representing the amplitude of the data By default an FFT performed on each slice results in a frequency output display A legend displays the colors and associated range of values Flash Programmer The VisualDSP Flash Programmer provides a convenient generic inter face to numerous processors and flash memory devices This utility simplifies the process of changing data values on a flash device and modi fying its memory You no longer have to remove the flash memory from the board use a separate Flash Programmer and then replace the flash 3 26 VisualDSP 5 0 User s Guide Debugging 3 Spectrogram Example Spectrogram Example bu m pE n E Du E e 10 15 Frequency kHz Spectrogram Plot FFT Figure 3 9 Spectrogram Plot For complete details on using the Flash Programmer utility refer to VisualDSP Help Beginning with VisualDSP 5 0 the Stand Alone Flash Programmer provides flash programming support between the development prototype stage and early pre production runs Refer to VisualDSP Help for details Flash Programmer API The VisualDSP Flash Programmer API provides a generic interface between the VisualDSP Flash Programmer and the flash driver To use this tool you must load an accompanying flash driver into the processor The flash driver is the processor executable code that handles commands from the Flash Programmer and actua
184. g based on instructions instruction latencies are con tingent on placement of specific instruction pairs relative to one another Avoid latencies by separating them by as many instructions as the number of cycles incurred between them For example if a pair of instructions incur a 2 cycle latency separate them by two instructions to eliminate that latency In the tables that follow note that bold typeface identifies register depen dencies within the instruction pairs Non bold typface in an entry means that the latency condition occurs regardless of the registers used For a list of accumulator to data register Areg2Dreg math video multi ply and ALU operations as well as register groupings see Instruction Groups on page D 41 and Register Groups on page D 42 Instruction names are consistent with the Blackfin Processor Instruction Set Reference Calculate the total cycle time of each entry by adding the cycles taken by the instruction to the number of stall cycles for the instruction D 26 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Accumulator to Data Register Latencies Table D 19 Accumulator to Data Register Latencies Description Example cycles stalls gt instruction BF532 BF535 dreg Areg2Dreg op 1 1 gt RI R6 L R4 H IS video op using dreg l 1 lt 1 2 gt R5 BYTEOPIP R3 2 R1 0 as src dreg Areg2Dreg op 1 1 gt R4 L A0
185. ge and 1 end of sequence By placing these characters appropriately you can specify these characters to be part of the sequence To search for a right bracket character place 1 as the first character of the search string To search for a hyphen character place as the first charac ter of the search string after 1 if present Place a caret anywhere in the search string except at the front where it means not Repetition and Combination Characters Each character described in Table A 21 extends the meaning of the item that immediately precedes it This item may be a single character a sequence in braces or an entire regular expression in parentheses Table A 21 Match Characters Character Description An asterisk matches the preceding any number of times including none at all Thus ap 1e matches apple aple appppple and ale For example void matches only when void occurs at the beginning of a line and is preceded by zero or more spaces A plus character matches the preceding any number of times but at least one time Thus ap 1e matches apple and aple but does not match ale A question mark matches the preceding either zero or one time but not more Thus ap 1e matches ale and aple but nothing else The pipe character matches either the preceding or following item For example hot cold matches either hot or cold Spaces are characters Thus hot cold matches
186. ge or to view code when no source is available The Disassembly window enables you to examine the assembly code generated by the C C compiler Choosing View Source from the Disassembly window s right click menu enables you to view the C C source code for the loaded file A single processor debug session provides one Disassembly window only but multiple instances of the window may be opened for different views In a multiprocessor debug session multiple Disassembly windows are available To make changes permanent modify the code and rebuild the project Disassembly windows provide Number format and edit features similar to register windows Dump and fill capabilities Symbols at the far left of the window denoting program execution stages and pipeline stages 2 46 VisualDSP 5 0 User s Guide Environment You can enable and disable the display of pipeline symbols in mixed mode C C and assembly An optional address bar that enables you to navigate to an address symbol or expression The address bar maintains a most recently used history of visited locations To display the address bar right click in a Disassembly window and choose Address Bar A check mark next to this option on the right click menu indicates that this feature is enabled By default the current source line to be executed is highlighted by a light blue horizontal bar as shown in Figure 2 29 gt 003005 jump fftrad2 db 5 31
187. ght Click Menu Command Purpose View Mode gt Memory Map Displays the memory map in tree mode Tree View Mode gt Graphical Displays the memory map in graphical blocks Memory Map 1 36 VisualDSP 5 0 User s Guide Introduction to VisualDSP Table 1 4 Memory Map Pane Right Click Menu Cont d Command Purpose View gt Mapping Strategy Pre Link Displays the memory map which shows where you intended to place object sections View gt Link Results Post Link Displays the memory map which shows where the object sec tions are actually placed New gt Memory Segment Opens the Memory Segment Properties dialog box from which you specify the name address range type width and so on of the memory segment that you want to add New gt Output Section Adds an output section to the selected memory segment Note Right click on a memory segment to access this command New gt Shared Memory Opens the Shared Memory Properties dialog box from which you specify the name of the shared memory output file and pro cessors that share the memory This command is not available on single processor systems New gt Overlay Opens the Overlay Properties dialog box from which you add a new overlay to the selected output section or memory segment Note The new overlay s run space is in the selected output sec tion Delete Deletes the selected ob
188. gister window moves the focus to Processor 1 Selecting the memory window moves the focus to Processor 2 The Multiprocessor window s Status page reflects the change in focus 2 86 VisualDSP 5 0 User s Guide Environment Right Click Menu The Multiprocessor window s right click menu Figure 2 59 offers these commands Add New Group Rename Group Delete Group Select All Processors Unselect All Processors Allow Docking Hide Float in Main Window Add New Group Rename Group Delete Group Select All Processors Unselect All Processors Allow Docking Hide Float In Main Window Figure 2 59 Multiprocessor Window s Right Click Menu VisualDSP 5 0 User s Guide 2 87 Debugging Windows Pipeline Viewer Window TigerSHARC and Blackfin processors in simulation only The Pipeline Viewer window Figure 2 60 displays instructions in the pipeline and allows you to view event details Open this window by choosing View Debug Windows and Pipeline Viewer LINK 0x44 LINK 0x44 LINK 0x44 LINK 0x44 K S Y LINK 0x44 M M Liss mie m i TEET ET E 6 DOE Op Ox LF LIHE Oxes Lud WW LIBE Oxss siss wii It Ix pe o7 gees z NW ou 270 EE p Ox Li le LIN LIX Ld z RW is wt 1h dx peto HK Hae ET I k ne E Wm ou 372 EE 1 Ox 32 TIME Oxes e X IHE Oxes IIX Iadi wir P peo Il dx Y w ne a Los wat E nk 6375 FL H r E 4 3 EE 1
189. hat you specify The auto refresh timer starts Streaming data is read and displayed When this option is deselected the timer is stopped and streaming data is not processed You can specify auto refresh options such as BTC refresh rate and missing data indication Auto Refresh Settings Enables you to configure options that control auto refresh settings for plot windows These settings determine the method in which memory is transferred Plot Configuration A plot configuration comprises two parts data values and presentation configuration settings 2 114 VisualDSP 5 0 User s Guide Environment Audio Data Audio Data 0 75 0 6 iLine Plot Figure 2 76 Statistics Displayed for a Portion of Audio Data A plot window must contain at least one data set a series of data values in processor memory Create data sets in the Plot Configuration dialog box shown in Figure 2 77 Specify the type of plot for example waterfall the memory location the number of values the axis associated with each data set and other options that identify the data Note that three dimension 3 D plots require addi tional specifications for row and column counts The Settings button enables the configuration of presentation options such as titles grids fonts colors and axis presentation for each data set You can recall a plot from a saved settings file vps VisualDSP uses these settings and reads p
190. he Memory menu Memory windows provide Number format and edit features Fill and dump capabilities An optional address bar for fast navigation to recently used addresses symbols or expressions To display the address bar right click in a memory window and choose Address Bar A check mark next to this command on the right click menu indicates that this option is enabled Number Formats in Memory Windows The memory windows in the following figures show examples of different memory number formats VisualDSP 5 0 User s Guide 2 67 Debugging Windows Data DM Memory Binary 00D108 00000000000000001000000111110000 00D109 00000000000000001000000111110000 D Di0A 01111111111111111111111111111111 Data DM Memory Octal 00D108 00000100760 000109 00000100760 00D10A 17777777777 0 0D10B 00000100760 00D10C 00000100766 0 0D10D 37777777777 Data DM Memory Hexadecimal 0 0D1B8 00008509 00D1BA 000084E5 00D1BC D000084E5 00D1BE 000084E5 00D1C0 000084E5 00D1C2 000084E5 0DiO0B 00000000000000001000000111110000 00D10C 00000000000000001000000111110110 00D10D 11111111111111111111111111111111 Lg Figure 2 46 SHARC Memory Window in Hexadecimal Format 2 68 VisualDSP 5 0 User s Guide Environment Data DM Memory Unsigned Integer x 00D1B8 34057 34021 00D1BA 34021 34021 0D1BC 34021 34021 00D1BE 34021 34021
191. he VisualDSP Automation API when using a Microsoft ActiveX script engine For example Idde ActiveSession ActiveProcessor gt Evaluate expressions by using the character when a Microsoft ActiveX script engine is selected For example Idde FullName Menu issuance You can quickly issue frequently used scripts From the File menu choose Recent Scripts and then select the script VisualDSP 5 0 User s Guide A 9 Extensive Scripting e Editor window issuance In an open editor window that contains a script right click and choose Load Script as shown in Figure A 6 B test tcl Umag FUE GI for set iter puts Itera ur Sopy HASLE dspreset P Booker With wait tt dspreset CN UT LOTT tO UPS GT Lo ript SEIEGCEOTIIBU Figure A 6 Running a Script in an Editor Window e User tool issuance From the User Tools toolbar click a user tool Alternatively choose a user tool from the Tools menu A 10 VisualDSP 5 0 User s Guide Reference Information You can invoke a script such as js or vbs automatically when launch ing VisualDSP from a shortcut on your Window s desktop or Start button Right click on the shortcut and select Properties and the Shortcut tab Then append f and the name of the script file to the executable file in the Target text box The example shown in Figure A 7 runs myscript js automatically when idde exe is launched isualD
192. he VisualDSP installation directory VisualDSP 5 0 User s Guide A 49 Online Documentation Printing Online Documentation Besides printing topics from VisualDSP Help on page A 50 you can print large documents VisualDSP manuals hardware manuals and data sheets and more from the VisualDSP Tools Installation CD ROM To print documents l Insert the VisualDSP Tools Installation CD ROM in the CD ROM drive Open the Docs folder by using one of these options From the VisualDSP Tools Installation main menu click View Documentation If the main menu does not appear run setup exe In Windows Explorer select the CD ROM drive for example D and open the Docs folder Open the folder where the document is located The Data Sheets folder contains processor data sheets Be sure to check the Analog Devices Web site for updated versions The Hardware Manuals folder contains hardware manuals The Reference folder includes the HTML files that comprise the Dinkum Abridged C library and the FlexLM network license documentation The Tools Manuals folder contains VisualDSP tools manuals Double click the document that you want to print Selecting a pdf file opens Adobe Acrobat Reader and displays the document Selecting an htm1 file opens a browser and displays the document From the File menu choose Print and specify the pages that you want to print and other print options VisualDSP 5 0
193. he command Enter multiline script commands by adding a backslash character X to the end of a statement Use bookmarks Toggle a bookmark by pressing Ctrl F2 Move to the next bookmark by pressing the keyboard s F2 key All text that displays on the Console page is written to the VisualDSP log file 2 30 VisualDSP 5 0 User s Guide Environment Code Development Tools Batch Processing Messages The code development tools that perform batch processing can produce error and warning messages when returning a result These messages appear on the Build page in the Output window Every message is identified with a unique code such as pp0019 that is consistent between versions of VisualDSP Message descriptions include an explanation of the condition that caused the error warning message and a suggested remedy to fix the problem Where applicable messages include the source file s name and the line number of the offend ing code Message Severity Hierarchy Each message has one or more severity levels Table 2 8 Message Severity Levels Severity Level Description Fatal error Identifies errors so severe that further processing of the input is suspended Fatal errors are sometimes called catastrophic errors Error Identifies problems that cause the tool to report a failure An error might allow further processing of the input to permit the reporting of additional problems to b
194. he instruction line is executed while instructions in the beginning of the line are ignored C 8 VisualDSP 5 0 User s Guide Simulation of TigerSHARC Processors Figure C 6 shows how the program counter value is used for the ADSP TS101 processor g ai j 3 uum g Ze j10 0 y 48 y il j WIF yB y yr3 r3 r2 3s 49 n y j gO I y yr3 r3 r2 y 50 j ny 310 j I yr4 r4 r3 B y 5 51 x j n yr3 34 j IF nyaeq JUMP loop2 n gs E 52 n x j yr y EE jO 0X1 xr r4 r3 I H S3 EB IF y y ji0 0 i E 54 By jj WIF y Bl y yr3 r3 r2 j program a 000000 30 0X1 xr0 r r3 yrO r5 r6 000003 j2 0X6 r13 rb r3 loop 000005 ki 0X1 xr3 r2 r4 yrS r6 r7 yr8 r9 ril 000009 32 j2 0X1 xr9 r2 r4 yrl2 r6 r7 yrl3 r9 r10 00000D IF njle JUMP loop ki 0X1 yrS r6 r yr8 r9 ri0 000011 nop 000012 nop 000013 yr4 0X5 000014 yr3 0X1 000015 yr2 0 mi loop2 000016 310 0 000017 ri xd 32 000018 yr4 r4 r3 000012 IF nyaeq JUMP loop2 nopi 00001B nop 00001C nop nop nop 00001F xr5 r5 r5 000020 33 0X5 000021 j2 OXL 000022 k10 0X15 000023 310 0 4 E Figure C 6 Using the Program Counter Value ADSP TS101 Processor Stepping When single stepping through a program the simulator performs an instru
195. he miss XRO JO J31 Aborts The examples that follow illustrate how the Pipeline Viewer displays different types of abort events for ADSP TS20x processors For a com plete list of pipeline effects and memory transaction timing refer to the processor s hardware specification VisualDSP 5 0 User s Guide C 15 ADSP TS20x Processors xi Cycle Fi _F2 _F3 FA EDT D E E1 E2 4 33 n n n n n n x nop nop nop nop nop nop nop 34 n n n n n n n nop nop nop nop nop nop nop 35 n n n n n n xr 30 j31 nop nop nop nopi 36 n x n nW n W n nW B zr0 j0 j31 xr0 j0 331 nop nop nop 37 n n x nW nW nW nW B xr j0 331 B zr0 j0 331 nop nop nop 38 n n n xW n MI ni nW B zr0 j0 331 B zr0 30 331 nop nop nop 39 non n nW n MI ni nW B zr0 j0 331 B zr0 j0 331 nop nop nop 40 x n n nW n WI ni nW B zr0 j0 331 B zr0 j0 331 nop nop nop 41 BB n nW nMW nW nW B xr j0 j31 B xr0 j0 j31 nop nop nop 42 B B B n n n n nop nop nop P B xr j0 331 nop nop nop 43 B B B B n n n nop nop nop nop nop nop nop 44 B B B B n n n nop nop nop nop nop nop nop 124 Figure C 10 Stall Due to a Cache Miss Aborts Due to an Unpredicted Change of Flow In the following example the abort at the PreDecode stage is due to an unpredicted jump predicated upon an IALU condition
196. hin hardware loops D 32 loop setup D 31 move conditional and move CC D 30 register move D 28 instruction timing analysis ADSP TS101 processors C 2 ADSP TS20x processors C 12 interrupts about 3 17 defined A 73 simulating 1 16 INDEX interrupt service routines defined A 73 I O simulating data transfer 1 16 is files A 12 ISRs exercising 1 16 J JScript scripting with 2 41 js files A 13 JTAG emulator breakpoints 3 13 debug sessions 3 3 exchanging data without halting 2 73 platforms 3 2 project development 1 15 statistical profiles 3 8 statistical profiling 2 55 JTAG interface exchanging data 2 73 K kernel defined A 74 kernel See VDK Kernel tab about 2 4 keyboard shortcuts A 31 kills detected messages Pipeline Viewer ADSP BF535 D 16 VisualDSP 5 0 User s Guide I 9 INDEX L L1 data memory stalls D 34 cache access 1 cycle stall D 36 minibank access collision D 35 MMR access D 39 SRAM access 1 cycle stall D 35 store buffer load collision D 40 store buffer overflow D 39 system minibank access collision D 39 latencies D 22 df files 1 31 2 14 A 12 customized 1 46 dr files A 13 B 12 legends in plots 3 26 librarian defined A 74 libraries C run time 1 29 Dinkum abridged C 1 29 library functions displaying 2 59 licenses list of A 3 management 1 10 status A 3 linear profiling features 3 8 minimizing energy 3 31 Linear Profi
197. hnician to repeatedly program any number of boards prior to major production Refer to online Help for details 3 28 VisualDSP 5 0 User s Guide Debugging Flash Devices Flash memory parts are non volatile memories that can be read pro grammed and erased In most applications flash devices store Boot code that the processor loads at startup e Data that must persist over time and through the loss of power Typically flash device programming is performed with a device program mer at the factory or by an application developer When a flash device is wired appropriately to the processor the processor can program the flash device Flash Programmer Functions Use the Flash Programmer to Load a flash algorithm driver program onto the processor at any time Obtain the flash manufacturer and device codes Reset the flash Program the flash from a data file Fill portions of flash memory with a value and quickly punch in data Erase the entire flash or a single sector Send custom commands to the driver for batch processes or user defined behavior The Flash Programmer utility stores the most recently used information in the registry for retrieval when the utility is next started up A message box shows the utility s current state VisualDSP 5 0 User s Guide 3 29 Flash Programmer Flash Driver To use the Flash Programmer utility you must first load a flash driver onto the processor Th
198. host or ROM The loader creates programs that execute from internal memory The splitter generates programs that execute from external memory To specify loader options choose Project Project Options and open the Load pages Loader terms are defined as follows 1 42 VisualDSP 5 0 User s Guide Introduction to VisualDSP boot kernel The executable file that performs memory initialization on the target boot loadable file The loader s output 1dr which contains the boot loader and the formatted system configurations This is a bootable image file boot loading The process of loading the boot loader initializing system memory and starting the application on the target loader The loader application such as elf loader exe contained in the software release For more information about the loader refer to the VisualDSP Loader and Utilities Manual or VisualDSP Help Processor Projects Your goal is to create a program that runs on a single processor or multiprocessor system A project is the structure where programs are built All development in VisualDSP occurs within a project A project refers to the collection of source files and tool configurations used to create a processor program The project file dpj stores program build information VisualDSP provides flexibility for setting up projects You configure settings for code development tools and configurations and you specify build s
199. ial file set based on a series of template files The entire application is proto typed and ready to be tested Reliable The kernel provides run time error checking e Scalable If a project does not include a kernel feature the support code is not included in the target system VisualDSP 5 0 Features VisualDSP 5 0 includes the following new features and enhancements New Processor Support Refer to the processors listed in Supported Processors on page xxvii Binary File Support for Fill and Dump You can choose to fill from a binary file or dump to a binary file in addition to a text file You can also choose the byte order little endian or big endian of the data in the binary file Core File Support You can dump the entire state of registers and the memory content of a stopped target to a core file which can be loaded later by the IDDE to restore the saved target state so that the target can be examined This enables Analog Devices Support to diagnose customer problems The core file can also be used to migrate a running dxe from an ICE to a simulator session to study a sequence in greater detail You can set a breakpoint just before the sequence of interest then export the core file and load it to the VisualDSP 5 0 User s Guide 1 7 VisualDSP Features simulator This assumes that the simulator shares the same set of registers with the ICE and can access all the memory blocks rele vant to the progr
200. ically use project wide options New files added to the project inherit these settings VisualDSP 5 0 User s Guide 1 25 Project Development Individual File and Tool Options Occasionally you may want to specify tool settings for individual files Each file is associated with two property pages a General page which lets you choose output directories for intermediate and output files and a tool specific property page Compile Assemble Link and so on which lets you choose options For information about each tool s options see the online Help or the manual for each tool Step 5 Build a Debug Version of the Project Next build a debug version of the project Status messages from each code development tool appear in the Output window as the build progresses The output file type must be an executable DXE file to produce debugger compatible output Step 6 Create a Debug Session and Load the Executable After successfully building an executable file set up a debug session You run projects that you develop as hardware or software sessions After specifying the processor connection type and platform load your project s executable file From the General page of the Preferences dialog box you can configure VisualDSP to load the file automatically and advance to the main function of your code Step 7 Run and Debug the Program After successfully creating a debug session and building and loading your executable progr
201. ications and prototype applications focus Refers to the active processor in a multiprocessor MP debugging session A 72 VisualDSP 5 0 User s Guide Reference Information ICE In Circuit Emulator Analog Devices offers emulators that provide non intrusive target based debugging of processor systems An emulator can single step or execute a processor at full speed to facilitate viewing or altering a processor s register and memory contents IDDE Integrated Development and Debugging Environment for Analog Devices processor development tools interrupt An external or internal condition detected by the hardware inter rupt controller In response to an interrupt the kernel processes a subroutine call to a predefined interrupt service routine ISR Interrupts have the following specifications Latency interrupt disable time The period between the interrupt occurrence and the first ISR s executed instruction Response interrupt response time The period between the inter rupt occurrence and a context switch Recovery interrupt recovery time The period needed to restore the processor s context and to start the return from interrupt RTI routine interrupt service routine ISR A routine executed as a response to a software interrupt or hard ware interrupt VDK supports nested interrupts which means that the kernel recognizes other interrupts services interrupts or both VisualDSP 5 0 Us
202. ida und ai EUR M MES B 13 SIMULATION OF TIGERSHARC PROCESSORS AD P EAO TOS o 2oskiuubud tdm deaddueteda qm Rd ti Md DE C 1 Simulator Timing Analysis Overview scccicsicicciininsneicsaaiweaeianees C 2 ln nop J C 2 BINS We M PP C 3 Stalls Due to TALU Deere isadeeet nrbazieucedi te mn taps L3 Stalls Due to Compute Block Dependency e C 4 PUE adeo Rip ROI E dU KM DU I MAE C 5 Aborts Due to an Unpredicted Change of Flow C 5 Abort Due to Mispredicted Change of Flow C 6 xvili VisualDSP 5 0 User s Guide CONTENTS Branch Target Bulfer Fits iusssscenics ptit rd erem ren C 7 Pipeline Viewer and Disassembly Window Operations C 7 Current Program Counter Value scsscsarnasisrireneameasa C 8 ADE cs E A A E EA ME C 9 Mi AULEM C 11 ADSTP T 320x Processor sccm C 12 Simulator Timing Analysis Overview isset reor penitentia C 12 nj Doro WM T C 13 i BRNO UR RR ees tee eee as C 14 Stalls Dus te TALU D penidengy 1 neto tia ette iicuds C 14 Stalls Due to Compute Block Dependency C 15 Sells Due te Cache MEE nce ees C 15 Ln C 15 Aborts Due to an Unpredicted Change of Flow C 16 Abort Due to Mispredicted Change of Flow C 18 Branch Target Dulfer PI uos ci Mat FAT apad iD C 19 Pipeline Viewer and Disassembly Window Operations C 19 Current
203. idth of the window to display a particular number of data columns For example the memory window in Figure 2 50 is sized to display five columns TigerSharc Memory Hexadecimal data2 buf hi 100084 00000000 00000000 00000000 00000000 00100088 100089 00100089 0010008A 0010008B 0010008C 0010008D 10008E 0010008E 0010008F 00100090 00100091 00100092 100093 00100093 00100094 00100095 00100096 00100097 100098 00100098 00100099 00100094 0010009B 0010009c 10009D 0010009D 0010009E 0010009F 001000A0 00100041 100042 00100042 00100043 001000A4 001000A5 00100046 1000A7 00100047 00100048 00100049 001000AA O001000AB 1000AC 001000AC O01000AD 001000AE 001000AF 00100080 v b ud Figure 2 50 Example Memory Window Sized to Display Five Columns The commands available via the menu bar s Memory menu and the memory window s right click menu depend on the processor that you are debugging 2 72 VisualDSP 5 0 User s Guide Environment Background Telemetry Channels BTCs Background telemetry channels BTCs enable VisualDSP and a pro cessor to exchange data via the JTAG interface while the processor is executing Before BTC all communication between VisualDSP and a processor took place while the processor was in a halted state Background telemetry channels are supported only in SHARC and Blackfin emulator sessions For information about using BTCs refer to the VisualDSP Getting Started Guide and
204. iew the state of the processor s memory registers and stacks Perform a cycle accurate statistical profile or linear profile e Perform integrated multiprocessor debugging emulator sessions only VisualDSP 5 0 User s Guide 1 21 Project Development VisualDSP Kernel A project can optionally include the VisualDSP Kernel VDK which is a software executive between algorithms peripherals and control logic The Project window s Kernel tab accesses a tree control for structuring and scaling application development From this tree control you can add modify and delete Kernel elements such as thread types boot threads round robin priorities semaphores events event bits interrupts and device drivers Two VDK specific windows VDK State History and Target Load pro vide views of VDK information Another VDK window VDK Status provides thread status data when a VDK enabled program is halted Refer to the VisualDSP Kernel VDK Users Guide for details Program Development Steps In the VisualDSP environment program development consists of the following steps 1 Create a project Configure project options Add and edit project source files Specify project build options Create a debug session and load the executable 2 3 4 5 Build a debug version executable file of the project 6 7 Run and debug the program 8 Build a release version of the project 1 22 VisualDSP 5 0 User s G
205. ild a compiled simulation exe file from a dxe program file and then load and execute the program in a compiled simulation debug target In VisualDSP 4 0 the intermediate step is no longer required You can load the dxe program into the compiled simulation debug target directly When you run the debug target compiles the processor code into native code and executes the native code Specifying a Session for Compiled Simulation Blackfin processors only You must configure the debug session for com piled simulation 1 From the VisualDSP Session menu choose New Session The New Session dialog box appears 2 In Debug target select Blackfin Family Compiled Simulator 3 In Platform select Blackfin Family Compiled Simulator 4 In Processor select ADSP BF535 ADSP BF531 ADSP BF532 or ADSP BF533 5 In Session name enter a name for this session 6 Click OK D 44 VisualDSP 5 0 User s Guide INDEX Numerics 3 D waterfall plots See waterfall plots A abbreviations Pipeline Viewer messages ADSP BF535 D 17 aborts Pipeline Viewer for ADSP TS101 C 5 Pipeline Viewer for ADSP TS20x C 15 About dialog box A 2 Access to ADSP 21065L 9th column Even Address event B 7 ach files A 13 ActiveX script support 2 40 address bar Disassembly windows 2 45 memory window 2 67 ADSP 21x6x processors reporting anomalies B 2 annotations editor window 2 24 anomalies ADSP 2116x processors B 10 ADSP 21x6x
206. ile data saved from a previous run Save Profile Saves the current run s data to a file Concatenate Profile Merges profiling data stored from a previous run with current data Clear Profile Clears statistics saved from a previous run VisualDSP 5 0 User s Guide 2 57 Debugging Windows Table 2 16 Right Click Menu Commands in Profiling Windows Cont Command Description View Execution Percent Displays the execution percent in each execution unit or source line This value is the sample count for that execution unit divided by the total number of samples View Sample Count Displays the sample count for that execution unit Mixed Sets the display mode for C C source lines from the right pane or only Choose Mixed to display both C C source lines and assem Source bly lines C C source lines appear in black type and assembly lines appear in gray Profiling data appears for each assembly line Choose Source to display only the C C source lines Properties Opens the Profile Window Properties dialog box where you can view or change window settings When performing linear profiling you can select display options such as cache hits cache misses exe cution count reads and writes Window Operations You can select various options for the Statistical Linear Profiling window and perform various window operations For power estimation this window displays two ad
207. in libraries as shown in Figure 2 36 VisualDSP 5 0 User s Guide 2 59 Debugging Windows ADSP BF533 Blackfin Memory Instruction Samples 1 Execution Unit al start init devdrvtab init devtab mi initialize getargv PC xffa 44da P o fne tfFana nn PC xffa 46f2 Total Samples 556 nd Elapsed Time Figure 2 36 Profiling Window Showing Library Functions To use this feature right click in the profiling window and choose Properties to open the Profile Window Properties dialog box Next click the Filter tab select C C functions and click the Add but ton to open the Add Functions dialog box Then select the Show all functions option Working With Ranges Clicking on the icon in an address range expands or contracts the list of functions within that address range When expanded the list of functions appears and the profiling data appear immediately after the address range Switching Display Modes The right click menu s Mixed and Source commands simplify switching between two views Table 2 37 shows the source mode view and Figure 2 38 shows the mixed mode view Note that you can display the right pane in source mode while in mixed mode you can display C C source lines and assembly code 2 60 VisualDSP 5 0 User s Guide Environment C Program Files Analog D 4 8 void barfint i 10 lc 13 maint 14 4 15 int i r 16 17 for i 0 i 5 ic i18 1 19
208. in on it Plot Presentation Options Depending on the selected plot type many plot presentation options are available In the Plot Settings dialog box these options are grouped by function on tabbed pages as described in Table 2 28 You can specify a plot s presentation options before generating the plot while configuring the plot or after generating the plot VisualDSP 5 0 User s Guide 2 117 Debugging Windows g Line Plot Example Line Plot Example Yi and Y2 50 7 100 Time Line Plot Figure 2 80 Zooming in on a Selected Area Table 2 28 Plot Settings Options by Page Page Options That You Can Specify General Title and subtitle grid lines margins background colors and legend 2 D Axis For X axis and Y axis axis titles start and increment values scales 3 D Axis For X axis Y axis and Z axis axis titles Z axis settings step sizes scale multipliers color and mesh Font Font name color and size Style For a data set line type width color symbol and type Data Processing For a data set data processing algorithm sample rate and triggering 2 118 VisualDSP 5 0 User s Guide Environment Image Viewer The Image Viewer window reads and displays image data from processor memory or a file on your PC Use this window to configure image attributes and to view images This display is ideal for testing image pro cessing algorithms Figure 2 81 sho
209. indow must reside within the main window An editor window cannot be docked to the main window A window specified as an MDI child cannot be positioned over a docked window Unless the Output window is floating in the main window a window specified as an MDI child cannot be positioned over the Output window Standard Windows Buttons The standard Windows buttons are located on the right side of the title bar as shown in Figure A 22 Project MyProject dpi fir fr16 asm MEJ E3 Figure A 22 Example Title Bar Showing Standard Window Buttons These buttons resize and close the window as described in Table A 19 A 42 VisualDSP 5 0 User s Guide Reference Information Table A 19 Standard Windows Buttons Button Name Purpose Minimize reduces the window to its Windows icon Maximize enlarges the window to fill the screen Restore returns the window to its last non minimized non maximized m position after you maximize the window Close closes the application window and exits the program a x xX VisualDSP 5 0 User s Guide A 43 Text Operations Text Operations VisualDSP allows the use of regular expressions and tagged expressions in find replace operations and comments in your code Regular Expressions vs Normal Searches Normally when you search for text the search mechanism scans for an exact character by character match of
210. ing 1 33 I 12 VisualDSP 5 0 User s Guide pipelining defined A 78 platforms about A 78 definition 1 17 specifying 3 2 plots See also plot windows buffer capacity 2 111 colors 3 26 configuring 2 109 2 115 constellation 3 22 data logging status 2 111 data sets 2 115 DSP memory 3 19 eye diagram 3 23 legends 3 26 line 3 21 presentation options 2 117 spectrogram 3 26 types of 3 20 viewing statistics 2 112 waterfall 3 24 X Y 3 21 plot windows 2 109 See also plots BTC mode 2 110 configuring 2 114 features 2 110 operations in 2 114 presentation of 2 116 right click menu 2 111 status bar 2 110 streams 3 17 toolbar 2 111 types of 3 20 viewing statistics 2 112 INDEX positioning windows A 42 post build options 1 59 command syntax 1 60 power minimizing 3 31 power profiling setting up 3 31 pp files A 12 pragmas 2 35 pre build options 1 59 preferences load file and advance to main 1 26 VisualDSP and tool output color 2 29 Preferences dialog box 1 26 2 29 printing hardware manuals A 50 online Help A 57 VisualDSP manuals A 50 processor loading into simulator B 10 specifying 3 1 processor definition files 2 83 processor ID configuring B 10 product information A 3 profile guided optimization defined A 79 profiling about 3 8 assembly instructions 2 61 defined A 79 functions 2 60 profiling windows 2 55 Program Counter PC register setting 3
211. inibank 2 0x1000 0x2000 10 minibank 3 0x2000 0x3000 11 minibank 4 0x3000 0x4000 Every time the available bank memory is doubled another bit must be used For example if an implementation of Blackfin processor architec ture has 32KB of data bank memory eight 4 KB memory banks bits 14 13 and 12 must be used Table D 25 Minibanks Selected for 32KB of Data Bank Memory Addr 14 12 Minibank Selected 000 minibank 1 0x0000 0x1000 001 minibank 2 0x1000 0x2000 010 minibank 3 0x2000 0x3000 D 36 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Table D 25 Minibanks Selected for 32KB of Data Bank Memory Addr 14 12 Minibank Selected 011 minibank 4 0x3000 0x4000 100 minibank 5 0x4000 0x5000 101 minibank 6 0x5000 0x6000 110 minibank 7 0x6000 0x7000 111 minibank 8 0x7000 0x8000 For simplicity this document assumes the standard 16 KB data memory model If the addresses in a dual memory access multi issue instruction is cached to the same minibank a 1 cycle stall is incurred IO is address 0x002348 I1 is address 0x002994 R1 RA L R5 H IS R2 I0 I1 R3 lt 1 cycle stall due to a collision in minibank 3 A collision occurs regardless of whether the accesses are both loads or a load and a store If the first access is a load DAGO and the second is a store DAGI the cycles inc
212. initions that provide a description of your target processor sys tem to the linker overlays Files that your overlay manager swaps in and out of run time memory depending on code operations The linker produces overlay ov1 files sections Declarations that identify the content for each executable file that the linker produces For detailed information refer to the VisualDSP Linker and Utilities Manual or VisualDSP Help Linker Description File ldf A Linker Description File 1df describes the target system and maps your program code with the system memory and processors 1 32 VisualDSP 5 0 User s Guide Introduction to VisualDSP The 1df file creates an executable file by using The target system memory map Defined segments in your source files The parts of an 1df file from the beginning to the end of the file are described as follows e Memory map describes the processor s physical memory located at the beginning of the 1df file e SEARCH DIR LIBRARIES and 0BJECTS commands define the path names that the linker uses to search and resolve references in the input files e MEMORY command defines the system s physical memory and assigns labels to logical segments within it These logical segments define program memory and stack memory types SECTIONS command defines the placement of code in physical memory by mapping the sections specified in program files to the sections
213. ipting languages let you access the Automation API to inter act with the IDDE processor Assembly source file Source file comprising assembly language instructions VisualDSP 5 0 User s Guide A 13 File Types Table A 2 Files Used With VisualDSP Contd Extension Name Purpose mak Makefiles The output make rule file is used for mk project builds dpg Project group An xml file containing information about projects A 14 VisualDSP 5 0 User s Guide Reference Information Parts of the User Interface When you open VisualDSP the application s main window appears Figure A 8 shows an example of the VisualDSP main window P Analog Devices VisualDSP Target ADSP T5101 TigerSHARC curate Simulator Platform Project dft c dpj Ol x Project group 0 project s Figure A 8 VisualDSP Main Window This work area contains everything necessary to build manage and debug a project You can set up preferences that specify the appearance of appli cation objects fonts visibility and so on You can open project files by dragging and dropping them into the main window VisualDSP 5 0 User s Guide A 15 Parts of the User Interface The VisualDSP main window includes these parts Title bar and control menu Menu bar toolbars and status bar Project window Output window VisualDSP also provides access to many debugging windows to facili tat
214. it boundary Table D 23 Instruction Alignment Unit Empty Latencies Description Example s cycles stalls gt instruction BF532 BF535 Move register or POP to IO or I1 1 lt 1 gt Il SP SAA BYTEOP2P BYTEOP3P 1 4 lt 1 5 gt R0 BYTEOP3P RI1 0 R1 0 HI Move register or POP to IO or I1 1 1 gt I0 RO BYTEOPIP 16P 16M BYTEUNPACK 1 4 lt 1 5 gt R3 BYTEOPIP R3 2 R1 0 VisualDSP 5 0 User s Guide D 33 Multicycle Instructions and Latencies L1 Table D 23 Instruction Alignment Unit Empty Latencies Contd Description Example s cycles stalls gt instruction BF532 BF535 Write to return register RT S N E X I 1 lt 1 gt RETI P0 return op l 4 lt l 4 gt RTI 1 1 RETS P3 1 4 lt 1 4 gt RTS math op 1 lt 1 gt R3 R2 R4 video op with RAW data dependency l 1 141 SAA R3 2 R1 0 dreg search 1 1 gt R3 RO SEARCH R1 LE math op using dreg 1 2 lt 1 2 gt R2 H RI L RO H core and system MMR access lt 1 2 gt RO PO PO MMR address L0 BO dreg 14 4 1 gt LO RO I0 modulo update 1 4 lt 1 3 gt RI 10 1 4 1 B1 R2 In general any length and base dagreg 1 4 lt 1 3 gt Il 4 assignment to a dreg followed by the 1 4 1 gt L2 R3 corresponding index dagreg modulo 1 4 143 R4 I2 M2 update 1 4 lt 1 gt B3 R5 1 4 lt 1 3 gt 13 M2 Data Memory
215. ity thread is executed first scripting You can interact with the IDDE by using a single command or a script file Scripting languages include VBScript JavaScript and Tcl Output displays in the Console view of the Output window The output is also logged to the VisualDSP_log txt file semaphore For VDK a signal similar to an event or message used to synchro nize multiple threads in a system A semaphore is a data object whose value is zero or a positive integer limited by the maximum setup at creation time The two states available greater than zero and unavailable zero control thread execution Unlike an event A 82 VisualDSP 5 0 User s Guide Reference Information whose state is automatically calculated a semaphore is directly manipulated Posting a semaphore takes a deterministic amount of time and may incur a context switch serial port data You can automatically transfer serial port SPORT data to and from on chip memory by using DMA block transfers Each serial port offers a time division multiplexed TDM multichannel mode session See debug session session name Although the choice of target platform and processor define the session you may want to further identify the session To prevent confusion later modify the default session name when you first create the debug session A session name can be any string and can include space characters There is no limit to the number of charac t
216. ject Pin to Output Section Pins an object section to an output section to prevent it from overflowing to another output section This command is available only after you right click on an object section that is part of an output section set to overflow to another section View Section Contents Opens the Section Contents dialog box which displays the con tents of the input or output section This command is available only after you link or build the project and then right click on an input or object section VisualDSP 5 0 User s Guide 1 37 Code Development Tools Table 1 4 Memory Map Pane Right Click Menu Cont d Command Purpose Add Hardware Page Overlay Support Sets up hardware overlay live and run spaces for all available hardware pages by a Checking if memory segments are currently defined in all hardware pages If memory segments are located you are queried about whether to delete those segments b Creating a memory segment containing an overlay live space in each hardware page c Creating a memory segment containing all overlay run spaces in hardware page 0 d Creating a default mapping for each overlay The default mapping maps objects containing the section pmpage0 to the hardware overlay on PM page 0 pmpage1 to PM page 1 dmpage0 to DM page 0 and so on View Symbols Opens the View Symbols dialog box and displays the symbols for the proje
217. ject Options dialog box Project Wizard 2 xi Project Information Choose the type name and location of the project that you would like to create U Project Select Type Project vg Select Type GN Select Processor Project types Rd Application Settings 5j Standard application Rid Finish Library D LwlP Ethernet application F YDK application Name NewProiect Directory c Documents and Settings LLLLLLL My Documents VisualDS B lt Back Next gt Finish Cancel Figure 1 6 Example Project Wizard Upon Opening Startup Code The ability to add startup code is available for Blackfin processor projects only Startup code is a procedure that initializes and configures the processor before the application program s main function is executed It sets the machine to a known state initializes selected features and enables the standard Blackfin run time model VisualDSP 5 0 User s Guide 1 45 Processor Projects Generate customized startup code for your project if you want to config ure the processor s cache the processor s clock and power settings run time initialization options or compiler instrumented profiling If you do use startup code your application is built with the default behavior LDF File The ability to add a customized 1df file to a project via the Project Wizard is available for Blackfin processor projects only 1df file genera
218. k Input 11 Link Input F Circular 12 Auto DMA On New Sequence Rewind Continue 13 Auto DMA On Chain C Rewind Continue Path Destination Format Hexadecimal Comment On New Sequence Overwrite C Append Halt On Errors On Chain C Overwrite Append Cancel Save As Load From Figure C 7 DMA File I O Configuration Dialog Box VisualDSP 5 0 User s Guide C 11 ADSP TS20x Processors For information about dialog box options and simulating a DMA transfer in the simulator refer to VisualDSP online Help ADSP TS20x Processors This section includes the following topics which apply to the ADSP TS201 ADSP TS202 and ADSP TS203 processors e Simulator Timing Analysis Overview Pipeline Stages e Stalls e Aborts Pipeline Viewer and Disassembly Window Operations Simulator Timing Analysis Overview The ADSP TS20x simulator is a cycle accurate simulator which not only models the instruction set functionally but also correctly models pipeline effects stalls and aborts and internal memory transactions timing Currently the processor s external port and link ports are not mod eled in a cycle accurate manner The simulator cycle counts the code but the cycle counts used for the external port or link ports are rough estimates of cycle counts that you could obtain by run ning the code on the chip Do not rely on these counts for performance evaluation Use the Pipeline Viewer
219. lar sign character must precede register names Register names can be in uppercase or lowercase characters Registers have no context A register expression always evaluates to the current value of the register Trace Windows Perform a trace also called an execution trace or a program trace to analyze the run time behavior of a processor program to enable I O capabilities and to simulate source to target data streaming Figure 2 32 shows an example of data in a Trace window 2 52 VisualDSP 5 0 User s Guide Environment Clock cycle Address Buffer when the of the Disassembled deci instruction executed instruction ep occurred instruction Trace Lx 00000000 Cycle 99006d71 PM 6602023c r12 rl11 4r12 rll1 r11 r12 00000002 RD PM 0002023e 4dfe6e o000006 00000003 Cycle 00006d472 PM 0002023d if eq rO ro r2 99000005 RD PM 9002023f ae0b600600001 99000006 Cycle 99006d73 PM 6602023e il12 dm m7 i6 99000007 RD DM 6603fff3 6602013d 00000009 RD PM 00020240 ae0700000002 0000000a Cycle 00006d74 PM 0002023f r1l dm 0x1 i7 0000000b RD DM 6603fff1 00000000 0000000d RD PM 00020241 083134000000 Access Memory Address Data value Memory results type type written or read RD WR PM DM Figure 2 32 Example of Data in a Trace Window The Trace window displays Buffer depth Custom in the Trace Buffer Depth dialog box The clock cycle when the instruction occurred The address of
220. lders in Project window 2 6 object 1 31 options 1 26 overlay 1 31 placing into folders automatically 2 6 processor definition files 2 83 project 2 8 project group 1 49 Project window rules 2 13 PROM 1 41 1 42 2 14 vdk config cpp 2 4 INDEX vdk config h 2 4 VisualDSP log txt 2 39 vps 2 110 2 115 xml 2 82 file tree 2 2 icons 2 2 Project window 2 2 filling memory 2 67 filtering PC samples 2 62 finding regular expressions in find replace operations A 44 tagged expressions A 47 find replace operations regular expressions A 44 Flag IO FIO peripheral Blackfin D 2 flash programming 3 29 programming at production 3 28 programming in production 3 28 flash algorithm loading 3 29 flash devices changing data 3 26 flash drivers loading 3 29 flash memory about 3 29 erasing 3 29 filling 3 29 programming 3 26 resetting 3 29 VisualDSP 5 0 User s Guide 1 7 INDEX Flash Programmer about 3 26 flash driver 3 30 functions 3 29 Stand Alone 3 27 user interface 3 30 Flash Programmer window 3 30 floating toolbars A 28 floating windows A 39 focus definition 3 6 multiprocessor debug session 2 84 folders automatic file placement 2 15 project 2 6 Project window 2 2 2 6 Project window rules 2 13 font color in Output window 2 29 FP Denorm B 4 functions displaying 2 59 displaying local variables 2 54 G global build options 1 25 glossary A 66 graphing
221. led Streamable Bootable SPORT FR FR FR UART FR FR FR Flags FR FR NA System Timers v v NA D 6 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Table D 6 Peripheral Support in the ADSP BF561 Simulator Peripheral Support Modeled Streamable Bootable EBIU v NA NA PPI v v NP SPI FR FR NP Watch Unit v NA NA Trace Unit FR NA NA Core Timer v NA NA Watchdog Timer FR NA NA PROM FR NA FR MEMDMA v NA FR DMA v v FR 1 Not all configuration settings affect simulation Special Considerations for Peripherals This section describes the limitations of the simulation software models Universal Asynchronous Receiver Transmitter Peripheral You can manipulate all the UART configuration bits Currently you can not simulate the data error Framing Error Parity Error Break Interrupt conditions or the Modem Status register status bits Data Carrier Detect Ring Indicator Data Set Ready Clear To Send You can specify Set Break in the Line Control register but this setting has no effect The cur rent simulator does not model the IRCR register VisualDSP 5 0 User s Guide D 7 Special Considerations for Peripherals Timer TMR Peripheral In Width Capture WDTH CAP mode the timer counts the number of clocks in both the width and period The waveform that the timer reads is attached via the Streams dialog box in VisualDSP You ca
222. les 3 17 plot window data 3 17 executables automatic loading 1 26 loading 3 11 execution traces 2 52 3 9 exe files A 13 Expert Linker about 1 34 overview 1 34 stack and heap usage 1 38 window 1 35 expressions C expressions 2 52 context sensitive evaluation 2 23 evaluating in editor windows 2 23 Expressions window 2 52 memory windows 2 69 nested searching Help A 64 register 2 52 regular A 44 tagged A 47 tracking 2 69 tracking in memory windows 2 67 viewing value of 2 24 Expressions window about 2 50 valid expressions 2 51 external interrupts generating 3 17 simulating 1 16 eye diagrams about 3 23 example of 3 23 EZ KIT Lite evaluation systems as targets 1 16 flash drivers 3 30 planning 1 15 specifying as platform 3 2 F fatal errors 2 31 features new in VisualDSP 5 0 1 7 project management 1 4 VDK 1 6 VisualDSP 1 1 file building options 1 25 1 6 VisualDSP 5 0 User s Guide files asm 2 14 assembly 1 30 association with tools 2 14 automatic placement 2 15 building 1 58 1 59 c 2 14 cache events log 2 95 compiler 1 28 cpp 2 14 cxx 2 14 data 1 30 dib 2 14 doj 1 31 2 14 dpg 1 49 dpj 1 43 dsp 2 14 DSP project A 12 executable 1 32 extensions in VisualDSP A 12 keyboard shortcuts A 31 A 32 A 36 language 1 30 df 1 30 1 32 1 33 2 14 linker 1 31 1 32 list of A 12 log 2 38 2 39 mak 1 51 mk 1 51 nested fo
223. les these files are refer enced from a source file by a preprocessor include command device A single processor With regard to JTAG emulation and the JTAG EZ ICE Configurator a device refers to any physical chip in the JTAG chain device driver A user written model that abstracts the hardware implementation from the application code User code accesses device drivers through a set of device driver API functions DSP digital signal processor or processor A 70 VisualDSP 5 0 User s Guide Reference Information DWARF 2 Debug With Arbitrary Records Format A format for debugging source level assembly code via improved line and symbol information editor window source window A document window that displays a source file for editing When an editor window is active you can move about within the window and perform typical text editing activities such as searching replacing copying cutting pasting and so on ELF Executable Linking Format emulator Hardware used to connect a PC to a processor target board This hardware allows application software to be downloaded and debugged from within the VisualDSP environment Emulator software performs the communications that enable you to see how your code affects processor performance event A signal similar to a semaphore or message used to synchronize multiple threads in a system An event is a logical switch having two binary states available true and u
224. ling window 2 57 3 8 about 2 55 power savings 3 32 line plots about 3 21 linker file associations for tools 2 14 input files 2 14 overview 1 31 Linker Description Files See ldf files linking object files 1 31 1 32 loader about 1 42 specifying options 1 42 terms 1 42 loading executable programs 3 11 programs 3 11 scripts 2 42 scripts from a shortcut A 11 Load Sim Loader submenu options B 11 local build options 1 25 Locals window about 2 54 Locate button A 55 log file VisualDSP 2 38 Ist files A 13 M main window program icon A 18 status bar A 29 makefiles 1 51 A 14 example of 1 53 Output window 1 53 rules 1 52 mak files See makefiles manuals online A 49 printing A 50 map files A 13 MATLAB data files 3 17 plot window data 3 17 measuring performance 3 8 memory displaying an address s value 2 67 dumping 2 46 2 67 filling 2 46 2 67 I 10 VisualDSP 5 0 User s Guide memory map defining 1 33 using Expert Linker 1 40 memory plots 2 109 memory pool defined A 76 memory segments 1 12 memory windows customization 2 72 expression tracking 2 69 locking columns 2 67 number format examples 2 67 number formats 2 67 right click menu 2 69 tracking an expression 2 67 tracking expressions 2 69 menu bar about A 19 menus application menu bar A 19 control menu A 17 A 18 right click A 38 system A 18 title bar right click A 17 messages Console p
225. lly manipulates the flash VisualDSP 5 0 User s Guide 3 27 Flash Programmer Analog Devices supplies sample flash drivers for use with EZ KIT Lite evaluation systems or custom hardware that uses flash devices similar to those found on EZ KIT Lite boards You may write your own flash drivers by following this API specification This allows you to implement new algorithms modify existing ones or add support for a new flash device processor combination with the current Flash Programmer Flash drivers may be implemented in C or assembly language To provide a completely generic flash loader interface the VisualDSP Flash Programmer API uses a set of named symbols their associated addresses and a few numbered commands Stand Alone Flash Programmer The Stand Alone Flash Programmer provides flash programming support between the development prototype stage and early pre production runs Because of shortened development cycles and component lead times it is often necessary and desirable to build a large quantity of boards for early evaluation Typically these builds are on the order of a hundred or fewer units Programming each unit with the beta production image via VisualDSP is typically performed by a manufacturing technician worker rather than the development engineer The Stand Alone Flash Programmer enables the development engineer to script or automate this process with a license free tool allowing the manufacturing tec
226. ly The plot window receives and displays a stream of data from processor memory If the target supports background telemetry the plot window reads memory and updates the display without halting the target Other wise the plot window halts the processor reads memory updates the plot and resumes the processor The plot window allows data to be streamed to or from a binary data file The data file can be converted into ASCII format for input to other applications such as MATLAB and Excel VisualDSP 5 0 User s Guide 3 17 Simulation Tools The processor application may collect and transfer data in four different ways Sampling a test point over time ping P e Transferring a data array over BTC at a specified point in the application SHARC and Blackfin emulation targets only Using GetMem directly e Periodically halting the target to read memory For information about using BTC refer to the VisualDSP Getting Started Guide 3 18 VisualDSP 5 0 User s Guide Debugging Plots Use the VisualDSP data plotting capability to display data in processor memory as a plot graph in a plot window Figure 3 2 A data plot can assist you by allowing you to visualize data Refer to Plot Windows on page 2 109 for plot window configuration information For complete details on configuring plots refer to VisualDSP Help g Line Plot Example Line Plot Example Line Plot Figure 3 2 Plot Window Dis
227. m mands for the selected processor VisualDSP 5 0 User s Guide B 1 Anomaly Options ADSP 21x6x Processor Anomalies If you know that your silicon has anomalies the simulator lets you configure reporting for the following anomaly events By default these options are OFF disabled Shadow Write This command opens the Configure Simulator Event dialog box from which to configure reporting for shadow write anomalies e SIMD FIFO This command opens the Configure Simulator Event dialog box from which to configure reporting for SIMD FIFO anomalies Shadow Write FIFO Anomaly ADSP 2116x Only For examples and workarounds refer to anomaly 39 at the Analog Devices embedded processors and DSPs Web site This anomaly has been identified in the shadow write FIFOs that exist between the internal memory array of the ADSP 21160M and core I O processor IOP buses that access the memory Refer to the hardware doc umentation for more details on shadow register operation A particular sequence of a core write followed by a read of the same internal memory address in conjunction with a certain type of IOP activity can cause the core read to return incorrect data Under the circumstances described below the read from Addr 1 incor rectly returns the data for Addr 2 This problem is caused by the shadow write FIFO erroneously returning data for a core read when data should have been returned from internal memory During
228. mapped registers MMRs User defined layout Memory on page 2 67 BTC Memory on page 2 73 A view of processor memory Similar number format and edit features as register windows plus fill and dump capability A view of background telemetry channel contents in real time The win dow displays the contents of the address that you want to see SHARC and Blackfin emulator sessions only Plot on page 2 109 A graphical display of values from memory addresses The window sup ports linear and FFT real and complex visualization modes and allows you to export an image to a file the clipboard or to a printer Multiprocessor on page 2 83 Current status of each processor in a multiprocessor system emulator ses sions only This window allows you to define and manage groups of pro cessors for synchronous multiprocessor commands Pipeline Viewer on page 2 88 Display of instructions in the pipeline and event details TigerSHARC and Blackfin processors only Cache Viewer on page 2 93 Analysis of an application s use of cache which is helpful in optimizing application performance VDK State History on page 2 105 VDK enabled projects only History buffer of threads and events Target Load on page 2 108 VDK enabled projects only Percent of time the target spent in the idle thread VDK Status on page 2 103 VDK enabled projects only At a program halt thread state and s
229. modes source mode and mixed mode Printing print preview and user defined headers and footers Bookmarking Finding replacing with wrap around search and regular expression matching VisualDSP 5 0 User s Guide 2 17 Editor Windows Going to a line number and the display of line numbers Jumping to the next or previous syntax error Copying cutting pasting undoing and redoing functions Each open file has a deep stack 500 items Tabs for fast switching between source files Compiler annotations indications of optimizations Location of matching brace characters and auto positioning of brace characters to line up with the preceding opening brace Opening header files by right clicking on include statements Dragging and dropping highlighted sections of text usually a valid source statement to an open Expressions window When dropped the text is automatically added to the window and is evaluated Running scripts Many of these features are described next Refer to VisualDSP Help for how to information Editor Window Symbols The gutter left margin in an editor window displays icons to indicate breakpoints bookmarks and the current position of the program counter PC Table 2 6 describes these icons Table 2 6 Editor Window Symbols Symbol Indicates cy Current source line to be executed PC location Enabled software breakpoint VisualDSP 5 0 User s Guide
230. n Windows Explorer Figure 2 2 shows an example of information that displays in Project view Project Name of the group icon Number of projects in this project group active project s project file I tiger acadia Active project TS Project Figure 2 2 Project View VisualDSP 5 0 User s Guide 2 3 Project Window Kernel Tab The Kernel tab of the Project window is available only for VDK enabled projects From the Kernel view you can add modify and delete kernel elements such as thread types priorities semaphore and events VisualDSP automatically updates vdk config cpp and vdk config h to reflect the changes made on the Kernel view The example in Figure 2 3 shows an expanded view of the elements on the Kernel tab for a VDK enabled project For information about VDK refer to the VisualDSP Kernel VDK Users Guide Project Dependencies A project may depend on other projects The I icon indicates depen dency and identifies the dependency Building a project also builds the sub projects on which your project depends 2 4 VisualDSP 5 0 User s Guide Project Window System E Clock Frequency MHz Es Tick Period ms History Buffer Size Ez Instrumentation Level Threads 2 Thread Types 2 thread 2 thread2 Eg Priority E Stack Size E Source File i Es Header File E Boot Threads
231. n attach a file to the following device names e TIMERO WDTH CAP e IMERI WDTH CAP e T IMER2 WDTH CAP The format of the input file is as follows PERIOD COUNT WIDTH COUNT PERIOD COUNT WIDTH COUNT In WDTH CAP mode the timer reads two 32 bit values from the input file The first value is the number of pulses clocks in the period The second value is the number of pulses in the width When PULSE HI is set the timer delivers high widths and low periods When PULSE HI is not set the timer delivers low widths and high periods D 8 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Simulator Instruction Timing Analysis for ADSP BF535 Processors The ADSP BF535 Family Simulator is a core cycle accurate simulator with an eight stage pipeline The simulator models all the sequencer and memory events of the ADSP BF535 processor The Pipeline Viewer shows the flow of instructions through the pipeline and any stalls due to sequencer or memory events It enables you to understand the execution timing of your program For information about configuring and using the Pipeline Viewer see Pipeline Viewer Window on page 2 88 or VisualDSP online Help The Pipeline Viewer for the ADSP BF535 processor displays stages Decode through Writeback The first two stages of the pipeline IF1 and IF2 are not displayed because the information provided by the simulator in those stages is not significant Stall R
232. n in a Tooltip VisualDSP 5 0 User s Guide 2 25 Editor Windows Tip Double click to display the compiler annotations Double click again to hide the annotations Ry for i20 i lt n i Info This loop executes 1 iterations of the origina Info unknown trip count Info Succesfully found modulo schedule Info Modulo schedule parameters II 2 SC 2 MV Advice Consider using pragma loop count to specify Failure This loop would vectorize if alignment were sl px i py 1i Figure 2 16 Displaying the Compiler Annotations There are three types of messages Each compiler annotation is prefixed with info advice or failure to indicate its type Right clicking on the icon or the line of code provides commands to view the annotations at that line or all annotations This menu also allows you to select the annotation types failure information or advice that appear The compiler annotations toolbar provides a quick way to view hide annotations and to navigate the editor window to locate previous next compiler annotations DW eo 1G to Figure 2 17 Compiler Annotations Toolbar 2 26 VisualDSP 5 0 User s Guide Environment Right Click Menu The editor window s right click menu provides the commands shown in Figure 2 18 LJ n d nj Redo Cut Copy Paste Toggle Bookmark MextBookmark F2 Insert Breakpoint F9 Line Numbers Run to Cursor Ctrl F10 Match B
233. n the Project win dow not to a source file in an editor window Project Window Rules The Project window displays a project s files as shown in Figure 2 9 The following rules dictate how files and subfolders behave in the Project window s file tree You can include any file in a project Only one 1df file is permitted You cannot add the same file into the same project more than once Only one project project node is permitted VisualDSP 5 0 User s Guide 2 13 Project Window MyProject Asy source files Ef Asmi asm Asm2 asm C C source files E Filel cpp Bl File2 cpp CJ Debug n gl D Project Figure 2 9 Example of Project Files e A file with an unrecognized file extension is ignored at build time When you add a file to a project the file is placed in the first folder configured with the same extension If no such folders are present an added file goes to the project level File Associations VisualDSP associates the file extensions in Table 2 4 as the input to particular code development tools Table 2 4 File Associations Tool File Extensions Compiler C cpp and cxx Assembler asm s and dsp Linker ldf dlb and doj VisualDSP is case insensitive to file extensions 2 14 VisualDSP 5 0 User s Guide Automatic File Placement Environment Automatic file placement is a feature that enables you
234. naniii 2 59 Displaying Source File 2 59 Displaying Functions it LIBERIS ssrseissnsrssenisiisa 2 59 VisualDSP 5 0 User s Guide CONTENTS Working Wih 2 60 Swiieching Display Modis siciasdarsianesieianewsieentadwundan 2 60 Filtering PC Samples With No Debug Information 2 62 o Ros oro Pe 2 63 Applications Built With Debug Information 2 64 Applications Built When Debug Information is Not Available 2 64 Memor WOW Soissons dde d MN 2 67 Number Formats in Memory Windows 2 67 Memory Window Right Click Menu 2 2 69 Expression Tracking in a Memory Window 2 69 Memory Window Display Customization 2 72 Background Telemetry Channels BTUS 14st theres 2 73 BTC Detinitions in Your Program iusenban tibias 2 73 Enabling BTC on ADSP 2126x and ADSP BF36x Processors 2 74 PEG THON eet Snr rE or erer 2 75 BTO Memory Window A 2 75 BTC Memory Window Right Click Menu 2 78 Register anoo 2 78 2d MIS ase ope EM DRE dba AEn dim 2 80 Custom Registers WIndows 2 81 Cupton Board Suppt 1ooqedededia d PM DI ad a 2 82 Cusam Board Support Files aues re preti Up dtd E 2 82 Processor Definition Files 1uussecteise t eddie poca Eia cus aa ES 2 83 oiu ode iuro feet m 2 83 x VisualDSP 5 0 User s Guide CONTENTS Multiprocessor
235. navailable false that control thread execution When an event becomes available all pending waiting threads in the wait list are set to a ready to run state When an event is available and a thread pends on it the thread continues running and the event remains available To facilitate error handling threads can specify a timeout period when pending on an event VisualDSP 5 0 User s Guide A 71 Glossary An event is a code object of global scope so any thread can pend on any event Event properties include the Event8it mask EventBit value and combination type Events are statically allo cated and enumerated at run time An event cannot be destroyed but its properties can be changed event bit A flag set or cleared to post the event The event is posted available when the current values of the system Event Bits match the event bit s mask and event bits values defined by the event s combination type A system has only one Event Bits word the size of a data word minus one For ADSP TSxxx processors the size is 31 bits executable file A file or program written and built in VisualDSP EZ KIT Lite evaluation system A development board software and cable for evaluating a particu lar processor The kit includes fundamental debugging software to facilitate architecture evaluations via a PC hosted tool set Use the kit to evaluate Analog Devices processors learn about processor applications simulate and debug appl
236. nch Target Buffer Hits In the following example the jump instruction was found in the Branch Target Buffer and is marked with Ml The branch is predicted and taken and no penalty is exacted for the change of flow x Cycle F1 F2 F3 DECODE INT ACCESS EX1 EX2 23 y y x IF njle JUMP loop j ki j j0 0X1 xr0 r4 r3 yrl r5 24 My y y j0 0X1 zr0 r4 Wii j2 k j0 0X1 xr r4 r3 yr r5 25 kN y ki 0X1 xr3 r2 iH j kl 0X1 xr3 r2 4 r4 yr5 r6 26 y x HN y j2 j2 0X1 xr9 k j0 BN j2 j2 0X1 xr9 r2 r yrl 27 y y x IF njle JUMP loop ji kl j IF njle JUMP loop ki 0X1 yr5 28 My v y j0 0X1 xr0 r4 Mor 32 k j0 0X1 xr r4 r3 yr0 r5 29 x I y y ki 0X1 xr3 r2 iE IE 2 EPA ki 0X1 xr3 r2 r4 yr5 r6 30 y kN j2 j2 0X1 x k j0 W j2 j2 0X1 xr939 r2 r4 yri 31 y y k iE IF nile JUMP loop j kl ijo 6 IF nile JUMP loop ki 0X1 yr5 32 My y y j0 0x1 zr0 r4 Wii j2 k j0 0X1 xr r4 r3 yrO r5 33 x Ns y ki 0X1 xr3 r2 NH IF j ki 0X1 xr3 r2 r4 yrS r6 34 vo kWv i2 i2 0X1 x5 kid Mr i2 i2 0X1 xr9 r2 r4 vrl Figure C 5 Branch Target Buffer Hits Pipeline Viewer and Disassembly Window Operations This section includes the following topics Current Program Counter Value e Stepping Vis
237. nd po or imask C C statements Use standard C C arithmetic and logical operators Multiprocessor expression emulator sessions only Expressions can be evaluated on a particular processor by using the format processor_name expression where processor_name is the name of one of your MP proces sors and expression is the expression that you want to evaluate on that processor For example on an MP system with two processors master and slave this expression evaluates the PC register on master master PC VisualDSP 5 0 User s Guide 2 51 Debugging Windows As you step through your program the Expressions window displays the current value of each listed expression Expressions evaluation is based on the current debug context For example if you enter expression a and a global variable a exists you see its value If you then step into a function that has local variable a the local value displays until the debug context leaves the function When a variable goes out of context a string displays next to the variable informing you that the variable is out of context The expressions described above are C expressions The current syntax also allows the use of registers in expressions For example the following expression is valid RO 10 Register expressions and C expressions can be mixed in an expression Register expressions follow these rules A dol
238. nd register windows A custom board support file which is parsed after a processor definition file is parsed may override definitions in the processor definition file Custom board support files enable you to Customize the content and layout of register windows e Specify register reset values for your custom board 2 82 VisualDSP 5 0 User s Guide Environment View the content of any register on your custom board not just Analog Devices processor memory mapped registers MMRs e Display your custom register windows via the VisualDSP IDDE s Register menu you configure menu items that open the customized register windows For detailed information and examples on using custom board support refer to online Help Processor Definition Files Processor definition files are shipped with VisualDSP and are installed into the install path N isualDSPNSystemVArchDef directory These XML files contain definitions for a processor s registers register resets register windows and memory types Analog Devices recommends that you do not modify the standard processor definition files because they and any changes you might make to them may be overwritten when a VisualDSP update is installed Instead place your customizations in custom board sup port files which will not be overwritten by VisualDSP updates The processor definition file is parsed before the custom board support file if used is parsed Specifications in
239. ndow comprises the types of nodes described in Table 2 1 Project Folders Project window folders J and C3 organize files within a project You can specify properties for folders 2 6 VisualDSP 5 0 User s Guide Environment Table 2 1 Types of Nodes in the Project Window Node Icon Description Project group Only one project group permitted in a debug ses sion Project Multiple projects permitted but only one is active indicated with bold typeface Folder Closed folder Opened folder revealing its contents File File that uses project settings File whose options differ from the project options File excluded from the current configuration E pg pup D EP im md Enabled active makefile x Project dependency Project on which another project depends jm Folders can be nested to any depth Folders carry no attributes to the build process as they do not reflect the file system Folders do not appear in directory listings as in Windows Explorer When you add files to the project tree with automatic file placement each file is placed in the first folder configured with the same file extension After automatic placement you can manually move a file anywhere VisualDSP 5 0 User s Guide 2 7 Project Window To move a file out of one folder and into another folder select the file and drag it onto the other folder Project Files In the Project windo
240. ner hardware loop s bottom is equal to the outer hardware loop s bottom a 3 cycle stall applies to each iteration of the inner loop in addition to the 3 cycle stall of the outer loop RTS RIN RTE RIX RTI If the loop s top instruction is not executed in the first iteration of the loop a one time 3 cycle stall penalty is incurred at the begin ning of the second iteration for example a jump into the hardware loop to any instruction but the first D 32 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors e None of the above applies to the 10x core The 10x core stalls when the loop start does not directly follow the LSETUP This condition causes a one time 3 cycle stall while the loop buffer is filled at the beginning of the second loop iteration e LSETUP to the same loop count register in the shadow of a previous LSETUP is held in D code until the first LSETUP commits Instruction Alignment Unit Empty Latencies If the instruction alignment unit IAU is empty of the next instruction that next instruction incurs a 1 cycle stall while the IAU is being filled The following conditions can result in an IAU empty stall e An instruction cache miss or SRAM fetch miss Achange of flow to an instruction address aligned across a 64 bit boundary The second instruction after a hardware loop is aligned across a 64 bit boundary The sixth instruction within a hardware loop is aligned across a 64 b
241. ng available commands 3 11 sm files 1 31 A 12 software updates 1 10 upgrades 1 10 software versions A 5 source code control SCC about 1 50 Project window symbols 2 9 source files comments in A 48 editing features 1 3 management 1 4 project 2 8 source code control 1 50 source mode 2 20 spectrogram plots 3 26 example of 3 26 FFT output 3 26 SPI simulation in slave mode B 13 splitter about 1 41 specifying options 1 41 stacks usage in Expert Linker 1 38 stack windows 2 80 stalls Pipeline Viewer ADSP TS101 C 3 ADSP TS20x C 14 VisualDSP 5 0 User s Guide stalls detected messages ADSP BF535 D 12 Stand Alone Flash Programmer 3 27 3 28 about 3 28 standard output viewing 2 30 startup code 2 2 Project Wizard 1 45 statistical profiling 3 8 samples 3 9 Statistical Profiling window 2 55 2 57 3 8 statistics viewing in plots 2 112 status bar examples A 29 Image Viewer window 2 121 plot windows 2 110 status Icons editor window 2 18 Pipeline Viewer 2 91 status messages log file 2 38 stepping available commands 3 11 3 12 cache events log 2 95 into instructions 3 12 out of instructions 3 12 over instructions 3 12 Pipeline Viewer ADSP TS101 C 9 Pipeline Viewer ADSP TS20x C 21 stk files A 13 streams simulating data I O 3 17 used with interrupts 3 17 subfolders project tree 2 2 support VisualDSP A 6 support information A 2 suppressing error messages
242. nit MAC Multiplier Accumulator Unit MUL Multiplier Unit operations for example Vector Multiply 32 bit Multiply Vector MAC preg Pointer register for example P5 0 FP USP or SSP RAW Read after write regmv A register move sysreg System Register for example LC1 0 LB1 0 LT1 0 SYSCFG SEQSTAT ASTAT RETS RETI RETX RETN RETE CYCLES and CYCLE2 WAW Write after write Video Video operations video pixel operations D 18 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Simulator Instruction Timing Analysis for ADSP BF531 ADSP BF532 ADSP BF533 and ADSP BF561 Processors The simulator for the ADSP BF531 ADSP BF532 ADSP BF533 and ADSP BF561 processors is a core cycle accurate simulator with a ten stage pipeline The simulator models all sequencer and memory events The Pipeline Viewer shows the flow of instructions through the pipeline and any stalls due to sequencer or memory events It enables you to under stand the execution timing of your program For information about configuring and using the Pipeline Viewer see Pipeline Viewer Window on page 2 88 or VisualDSP online Help Stall Reasons The stall reasons are as follows e Data address generator DAG read after write RAW hazard Memory stall Memory mapped register MMR stall e Unidentified stall e Data register dreg hazard two cycle e Dreg hazard one cycle e CSYNC stall e SSYNC or IDLE SYNC stall LSETU
243. ntax of Help for Error Messages sssrosceconsiononerras 2 32 Viewing Error Message Det 12a oenediasnie beber etel 2 33 Promoting Demoting and Suppressing Error Messages 2 35 Example 1 Compiling from the Command Line Interface 2 36 Example 2 Promoting Warnings to Errors 2 36 Example 3 Demoting Messages to Remarks 2 37 Example 4 Suppressing Messages 2 rne 2 37 viii VisualDSP 5 0 User s Guide CONTENTS Suppressing Compiler Warnings and Remarks 2 37 foI42 M e 2 38 Qutput Window Customization 2 ccdinceste c etin ood obe R REN 2 38 Rib NOME srana aite enn diedtiqued dp t DRM 2 39 Soupe Command Se oiaendqibe aM reducit abis qu iket 2 40 Dibugginge fon A 2 43 Disassembly on eme ea 2 45 Other Disassembly Window Peat res 22er tears 2 47 ee Menu eee enemies 2 48 Disassembly Window Symbols 12er tier netiis 2 49 Expressions WIndOw MT Un 2 50 Expressions Permitted in an Expression Window 2 51 Rogo 2 52 Locale Io Av eU 2 54 Sudsamlr Linear Profiling Window Lee bist icipri oo dendo ttb ciis 2 55 Window E ii PENNE D 2 55 Polycom s 2 56 i d 2 56 Er Acc 2 57 Rie M LT X S 2 57 Window Operations Mem 2 58 Changing the Window View sacicnoaicaiiiine
244. ntd Button Purpose Zoom Out Zooms out by a factor of two Zoom Cancel Save Opens a Save dialog box from which to save the image Print E 3 L Copies the image to the Windows clipboard Ba Status Bar As you move the mouse over the image the status bar indicates e Zoom status Processor address where the selected pixel is located Pixel values for color images intensity values for gray scale images Pixel coordinates column and row Pixel color depth 24 bits for color images and 8 bits for gray scale images Right Click Menu The Image Viewer window s right click menu provides these commands VisualDSP 5 0 User s Guide 2 121 Debugging Windows Table 2 30 Right Click Menu Commands Command Purpose Configure Opens the Image Configuration dialog box from which to specify image attributes Refresh Reads the image data from processor memory Color Gamma Adjust Opens the Image Effects dialog box from which to adjust gamma and view the resulting image Rotate Provides four selections 0 90 180 or 270 Flip Provides four selections None Horizontal Vertical or Both Auto Refresh A black check mark indicates that auto refresh is enabled based user specified settings Auto Refresh Settings Opens the Auto Refresh Settings dialog box from which to config ure auto refresh settings 2 122 VisualDSP 5 0 User s Guide 3
245. o show how much of the stack and heap are unused Be aware of the following stack and heap restrictions The heap stack and system stack must be defined in output sections named HEAP STACK and SYSSTACK respectively The heap stack and system stack must be the only items in those output sections You cannot place other objects in those output sections For other processor families the restrictions on memory segment names differ according to what is used in the default 1df files If you do not heed these restrictions you cannot view stack and heap usage after run ning your program VisualDSP 5 0 User s Guide 1 39 Code Development Tools Figure 1 5 shows an example memory map after you run a SHARC C program Memory Map seg rth seg pmco ffffff 1000000 Figure 1 5 Memory Map Example After Running a SHARC Program 1 40 VisualDSP 5 0 User s Guide Introduction to VisualDSP Archiver The VisualDSP archiver e1far exe combines object doj files into library d1b files which serve as reusable resources for project develop ment The linker searches library files for routines library members referred to by other objects and links them in your executable program Run the archiver from within VisualDSP or from the command line From VisualDSP create a library file as your project s output To modify or list the contents of a library file or perform other operations on it
246. ocessor applications including access to all the activities necessary to create define and build processor projects Define and manage projects Identify files that the code develop ment tools process to build your project Create this project definition once or modify it to meet changing development needs Access and manage code development tools Configure options to specify how the code development tools process inputs and gener ate outputs Tool settings correspond to command line switches for code development tools Define these options once or modify them to meet your needs View and respond to project build results View project status while a build progresses and if necessary halt the build Double click on an error message in the Output window to view the source code causing the error or iterate through error messages Manage source files Manage source files and track file dependen cies in your project from the Project window to provide a display of software file relationships VisualDSP uses code development tools to process your project and to produce a processor program It also provides a source code control SCC interface which enables you to access SCC applications without leaving the IDDE 1 4 VisualDSP 5 0 User s Guide Introduction to VisualDSP Debugging Features While debugging your project you can View and debug mixed C C and assembly code View C C source code interspersed with
247. ocessors represented by the ADSP BF532 and the ADSP BF535 processor Multicycle Instructions All instructions not mentioned here are completed in one cycle This sec tion describes instructions that take more than one cycle Instruction names are consistent with the Blackfin Processor Instruction Set Reference The cycle counts in the following examples represent the entire cycle time of the instruction shown Push Multiple or Pop Multiple PushPopMultiple is completed in 7 cycles where n is the number of regis ters pushed or popped D 22 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Table D 10 PushPopMultiple Instructions and Cycles Instruction ADSP BF532 ADSP BF535 SP R7 0 P5 0 14 cycles 14 cycles R7 0 P5 3 SP 11 cycles 11 cycles 32 Bit Multiply modulo 2 Table D 11 lists bit multiply instructions and cycles Table D 11 Bit Multiply Instruction and Cycles Instruction ADSP BF532 ADSP BF535 RO R1 3 cycles 5 cycles Call and Jump Table D 12 lists call and jump instructions and cycles Table D 12 Call and Jump Instructions and Cycles Instruction ADSP BF532 ADSP BF535 CALL 0x22 5 cycles 4 cycles CALL PC P0 5 cycles 4 cycles CALL P0 5 cycles 4 cycles JUMP 0x22 5 cycles 4 cycles JUMP PC P0 5 cycles 4 cycles JUMP P0 5 cycles 4 cycles Conditional Br
248. of user documentation Help files PDF files and HTML files Table A 25 Types of User Documentation Files Purpose chm VisualDSP Help system files and VisualDSP manuals are provided in Microsoft HTML Help format Installing VisualDSP automatically copies these files to the lt installation gt Help folder VisualDSP Help is ideal for searching the entire tools manual set Invoke Help from the VisualDSP Help menu or via the Windows Start button The chm files require Internet Explorer 6 0 or higher or the installation of a component that provides a CHM file viewer pdf Manuals and data sheets in Portable Documentation Format are located in the instal lation CD s Docs folder Viewing and printing a pdf file requires a PDF reader such as Adobe Acrobat Reader 4 0 or higher Running setup exe on the installa tion CD provides easy access to these documents You can also copy PDF files from the installation CD onto another disk htm Dinkum Abridged C library and FLEXnet network license manager software doc or umentation is located on the installation CD in the Docs Reference folder View html ing or printing these files requires a browser such as Internet Explorer 6 0 or higher You can copy these files from the installation CD onto another disk The VisualDSP software installation procedure does not copy PDF versions of books and data sheets or supplemental reference documentation to t
249. ollar sign matches the end of the line A period matches any character abc A bracketed sequence of characters matches one character which may be any of the characters inside the brackets Thus abc matches an a b orc 0 9 This shorthand form is valid within the sequence brackets It specifies a range of characters from first through last exactly as if they had been written explicitly Ranges may be combined with explicit single characters and other ranges within the sequence Thus 0 9 matches any constituent character of a signed decimal number and a zA Z0 9_ matches a valid identi fier character either lowercase or uppercase Ranges follow the ordering of the ASCII character set Aabc A caret 4 that is the first character of a sequence matches all characters A0 9 except for the characters specified after the caret material The material inside the parentheses can be any regular expression It is treated as a unit which can be used in combination with other expres sions Parenthesized material is also assigned a numerical tag which may be referenced by a replace operation VisualDSP 5 0 User s Guide A 45 Text Operations Special Rules for Sequences The normal special character rules of regular expressions do not apply within a bracketed sequence Thus amp matches an asterisk or ampersand Certain characters have special meaning within a sequence These include not ran
250. ollowing sequence of instructions causes a one cycle stall at the Decode stage XR2 RO R1 XR3 RO R2 This instruction is stalled in Decode for 1 cycle The source register R2 is a destination in the previous instruction E Cycle Fl _B2 F3 F4 PD D i E E2 j 20 n n n n X nop nop nop nop nop no 1 nop nop nop nopi 21 n n n n x xr r rl nop nop no 1 nop nop nop nopi 22 x n n n n xr3 r r2 xr2 r rl 1 nop nop nop nop 23 n x n nW n xr3 r r2 B xr2 r rl 1 nop nop nop nopi 24 B n x n n nop nop nop xr3 r0 r2 B 1 nop nop nop nopi 25 B B n x n nop nop nop nop nop no B xr2 r0 rl nop nop 26 B B BR n n nop nop nop nop nop no 5 xr2 r0 rl nop nop 27 B B BR B n nop nop nop nop nop no 1 xr3 r r2 nop nop 28 ni x x n nop nop nop nop nop no 1 nop nop nop nopi 29 n ng x n nop nop nop nop nop no 1 nop nop nop nopi 30 n n nd n nop nop nop nop nop no 1 nop nop nop nopi 31 n n n n E nop nop nop nop nop no 1 nop nop nop nopi 32 n n n n n xr0 70 i3 nop nop no 1 nop nop nop nOD i Enmcc RUN A CNN Figure C 9 Stall Due to Compute Block Dependency Stalls Due to a Cache Miss The following register load transaction causes a six cycle stall because of a cac
251. on For a debug configuration you can accept the default options or specify your own options and save them The configuration refers to the specified options for all the tools in the tool chain See also configuration debug session The combination of a processor connection type and platform For example a debug session might consist of an ADSP 21262 processor an EZ KIT Lite connection and an ADSP 21262 EZ KIT Lite board Processor projects being developed are run as debug sessions The two types of sessions are hardware and software When setting up a session set the focus on a series of more specific elements debug target See target VisualDSP 5 0 User s Guide A 69 Glossary default intermediate and output file directories These file directories folders are Debug for the debug configura tion and Release for the release configuration By default VisualDSP creates these directories as children of the directory where the dpj file is saved which is called the project s current directory See also current directory dependencies VisualDSP uses dependency information to determine which files if any are updated during a build If an included header file is modified VisualDSP builds the source files that include include the header file regardless of whether the source files have been modified since the previous build dependency files Usually user files or system header h fi
252. on of audio data For details about viewing statistics refer to VisualDSP Help 2 112 VisualDSP 5 0 User s Guide Environment Figure 2 75 Plot Window s Right Click Menu VisualDSP 5 0 User s Guide 2 113 Debugging Windows Table 2 27 Plot Window Operations Feature Description Data Cursor Displays the data value associated with the position of the plot window s data cursor View the value on the left side of the plot window s status bar Press the keyboard s arrow keys to move around the graph Reset Zoom Resets the plot window to its initial full scale display Configure Modify Settings Opens the Plot Configuration dialog box where you add remove or modify data sets You can also change the plot type and rename the plot Opens the Plot Setting dialog box where you customize the plot s appearance You can specify plot settings grids colors margins fonts axes and so on and settings for each data set data process ing Save Settings Saves plot configuration settings for future use The configuration is stored but not the data You can retrieve settings VPS file and load new plot data Export Exports the plot image to various destinations including the Win dows clipboard Save the plot image as a file JPG GIF TIE EPS TXT or DAT format or print a hard copy Auto Refresh Enables a plot window to refresh automatically based on settings t
253. on or assembly source line in the left pane displays the corresponding source file in the right pane The top of the function or assembly source line is shown in the source file If you double click on a PC address with no debug information the Disassembly window opens to that address Right Pane The right pane includes the information described in Figure 2 15 2 56 VisualDSP 5 0 User s Guide Environment Table 2 15 Information in the Right Pane Column Displays 96 Execution percent in text format with two decimal places for example 1 0396 or the PC sample count for each source line Line Line numbers of the source file File Entire source file Each source line occupies one line in the grid control Status Bar The status bar at the bottom of the window indicates the total number of collected PC samples the total elapsed time and indicates whether statis tical profiling is enabled Right Click Menu The Statistical Profiling and Linear Profiling windows provide a right click menu The menu commands depend on the context whether you right click in the left pane or right pane and the current settings Table 2 16 describes the right click menu commands Table 2 16 Right Click Menu Commands in Profiling Windows Command Description Enable Enables or disables profiling Load Profile Opens the Select a Statistical Linear Profile to Load dialog box from which you can load prof
254. on vs Emulation While connected to a simulator session you may open as many sessions as your system s memory can handle While connected to actual hardware through an emulator only one debug session may be connected to one emulator at any time If multiple emula tors are installed and are connected to multiple target boards one debug session may be connected to each individual emulator In a JTAG emulator session only one debug session may be con nected to each physical target emulator combination Otherwise contention issues may arise Upon switching to a different session VisualDSP detaches from the old session before attaching to the new session Breakpoints In a simulator session a breakpoint can be set at any address in your executable program s memory Program execution halts at the address where the breakpoint is located Hardware breakpoints can be used in emulator debug sessions only see Hardware Breakpoints on page 3 16 VisualDSP 5 0 User s Guide 3 3 Debug Sessions Watchpoints Watchpoints are like breakpoints that trap on a specified condition You can set watchpoints on registers stacks and memory ranges Reaching the condition halts program execution and updates all windows D Watchpoints are available only during simulation Multiprocessor MP System Debugging Often performance based products require two or more processors A system built with multiple processors is called a multiprocess
255. onanu iu EE SUN o a asa i PME SN Ka MIS xxviii DD i doo T xxviii Processor Product Information 2e cc e en Eta cli kdo pida xxix Related Documents cee oe XXX Online Technical Documentation 2e rtr kae xxxi Accessing Documentation From VisualDSP xxxii Accessing Documentation From Windows xxxii Accessing Documentation From the Web xxxiii Embedded Processing amp DSP Knowledge Base xxxiii Printed Mbunals iaucoi eet ote tir dmi ariran rnrn xxxiii VisualDSP 5 0 User s Guide ili CONTENTS rra p MI E rU M a xxxiii Pinos Manmi i acsqusstodioddetdvi ndi DU aH do pHi iacula it XXXIV je Bic E E EE PRU ETUR XXXIV Nonton Te So detenta t PARU nde anes XXXV INTRODUCTION TO VISUALDSP TRI SP ae 2asodpsiuuu ede NIU MIU Meo E d Mu 1 1 Integrated Development and Debugging eerte 1 2 Code Development Tools 22 entre tbdla dieti bein dise diI dad 1 2 Source Ple Edidng Features scenes 1 3 Project Management Features oes oi pates ea eie 1 4 cpi qu lior m 1 5 bir wl ooo c C 1 6 ki 0 edo S0 Features A 1 7 Product Updates and Upgrades 1 ceiedze itii notitia REI doa eod dep die 1 10 VisualDSIee Product Upgrades Lucr otto Ert Reda 1 10 Vines Pes Producer Up 2c eee 1 10 Project Tere A 1 11 Overview of Programming With VisualDSP e 1 12 Project Development Stapes i
256. online Help BTC Definitions in Your Program Background telemetry channels are defined on a per program DXE basis The channels are defined when a specific program is loaded onto a proces sor Define channels in your program by using simple macros The following example code shows channel definitions jdinclude btc h section DM seg dmda for ADSP 2126x processors BTIC MAP BEGIN BTC MAP ENTRY ChannelO Oxf0001000 0x00100 BTC MAP ENTRY Channell Oxf0002000 0x01000 BTC MAP ENTRY Channel2 0xf0003000 0x10000 BTC MAP END The first step in defining channels in a program is to include the BTC macros by using the include btc h statement Then each channel is defined with the macros The definitions begin with BTC MAP BEGIN VisualDSP 5 0 User s Guide 2 73 Debugging Windows which marks the beginning of the BTC map Next each individual chan nel is defined with the BTC MAP ENTRY macro which takes the parameters described in Table 2 17 Table 2 17 Parameters for the BTC MAP ENTRY ASM Macro Parameter Description Name Name of the channel 32 characters max Starting address Starting address of the channel in memory Length Length of the channel in 32 bit words for ADSP 2126x processors Once the channels are defined end the BTC map by using the BTC MAP END macro Enabling BTC on ADSP 2126x and ADSP BF36x Processors After the channel definitions are added the BTC m
257. or system MP system A system built with a single processor is called a single pro cessor system The SHARC and TigerSHARC simulators do not support multiprocessor MP debugging multiprocessing for these proces sors is available in emulator sessions only Multiprocessing support for Blackfin ADSP BF561 and ADSP BF566 processors is available in simulation Setting Up a Multiprocessor Debug Session The first step in setting up a multiprocessor debug session is to develop a multiprocessor project by using the multiprocessing capabilities of the linker and an 1df file to describe the multiprocessor system Refer to the VisualDSP Linker and Utilities Manual especially sections about the SHARED MEMORY and MPMEMORY commands The second step is to use the VisualDSP Configurator utility to describe the hardware to the VisualDSP software if you are running a JTAG emulator session VisualDSP uses this description when you set up your debug session Refer to VisualDSP Help for information about using the VisualDSP Configurator 3 4 VisualDSP 5 0 User s Guide Debugging When running a multiprocessor simulator debug session select the desired configuration from the Select Platforms page of the Session Wizard After specifying your hardware system build your project The first time that you launch VisualDSP for a new project the Session Wizard opens to enable you to configure the MP session The next time Vi
258. ory of a time signal The eye diagram plot processes the input data and optionally looks for a threshold crossing point default is 0 0 A trace is plotted when the threshold crossing is reached Plotting continues for the remainder of the trace data When a breakpoint occurs or a step is performed the plot data is updated and a new trace is plotted The eye diagram uses a data shifting technique that stores the desired number of traces in a plot buffer default VisualDSP 5 0 User s Guide 3 23 Plots gt Eye Diagram Eye Diagram Eye Diagram Figure 3 6 Eye Diagram Plot is ten traces When the number of traces is exceeded the first trace shifts out of the buffer and the new trace shifts into the last buffer location This technique is referred to as first in first out FIFO You can modify options for threshold value rising trigger falling trigger and the number of overlapping traces Waterfall Plots A waterfall plot Figure 3 7 is typically used to show the change in fre quency content of signal over time The plot comprises multiple line plot traces in a three dimensional 3 D view Each line plot trace represents a slice of the waterfall plot The easiest way to create a waterfall plot is to define a 2 D array in C code a grid The first array dimension is the number of rows in the grid and the second dimension is the number of columns in the grid The number of columns is equal to the number of dat
259. oting information refer to the processor s hardware documentation or the VisualDSP Linker and Utilities Manual SPI Simulation in Slave Mode For ADSP 21161 processors the external SPI is not modeled in simula tion Since the master controls the timing there is no timing information for the transfers in slave mode Except during booting the BAUDR field of the slave SPICTL is used for the timing of the external master Since this field has no effect in slave mode in the hardware you can use it for simulation When the SPI is enabled in slave mode and the SP1TX buffer is not empty an SPI transmit receive operation occurs If the SPITX and the SPIRX buff ers are empty a word is read speculatively into SPIRX buffer The SPI reads a maximum of one word ahead Once the SPIRX buffer is emptied by a DMA operation or a read the SPI reads another word in the time speci fied by the BAUDR field of SPICTL During booting the SPI operates at its fastest supported baud rate When you rely on the BAUDR field in slave mode a maximum value of 0x5 is used for this field The End of file and File not connected errors are sup pressed until a read of SPIRX or a valid DMA is set up Refer to the ADSP 21161 SHARC DSP Hardware Reference for details VisualDSP 5 0 User s Guide B 13 SPI Simulation in Slave Mode B 14 VisualDSP 5 0 User s Guide C SIMULATION OF TIGERSHARC PROCESSORS This appendix describes how to simulate Tige
260. ource file Toggles the bookmark at selected line in the active editor window Goes to the next bookmarked line in the editor window Goes to the previous bookmarked line in the editor window Clears all bookmarks in the editor window Opens VisualDSP Help to the Search page Provides context sensitive Help for a button command or portion of VisualDSP Opens the About VisualDSP dialog box Adds a source file to the project Removes the selection from the project Opens an existing project le x pe pee EE ae ee eee A 24 VisualDSP 5 0 User s Guide Reference Information Table A 4 Toolbar Buttons Contd Button Purpose Saves the open project Opens the Project Options dialog box where you specify project options Ke EE E Builds the selected source file Builds the project update outdated files Builds all files in the project Stops the current project build Arranges windows as tall non overlapping tiles Arranges windows as wide non overlapping tiles Arranges windows so they overlap Closes all open windows Refreshes all the debugging windows Runs starts or continues the current program es gs s E Jam EN LE Restarts the current program VisualDSP 5 0 User s Guide A 25 Parts of the User Interface Table A 4 Toolbar Buttons Contd Button Purpose Sto
261. ous build File icons in the Project window indicate file status such as excluded files or files with specific options that override project settings This section describes the following topics Build Options on page 1 58 e File Building on page 1 58 Batch Builds on page 1 59 e Pre Build and Post Build Options on page 1 59 Project Dependencies on page 1 60 Build Options You can specify options for the entire project and for individual files Table 1 6 describes these build options File Building Building a file compiles or assembles the file and locates and removes errors You can build a single file or multiple files that you select 1 58 VisualDSP 5 0 User s Guide Introduction to VisualDSP Table 1 6 Build Options Options Description Project Specify these options from a tabbed page for example Compile or Link for each of the code development tools Individual file These settings override project wide settings Custom build For maximal flexibility edit the command line s issued to build a particular file For example you might call a third party utility The build process updates the selected source file s output 0bj file and the output file s debug information Building a single file is very fast Large projects however may require hours to build If you change a common header file that requires a full build you can build only the cur
262. ows and Status Thread H a Idle Thread H a Thread 0 kSystemStartT hread Template ID TO Priority Stack Address NumTimesRun CreationTime cycles RunStartTime cycles RunLastTime cycles RunTotalTime cycles CreationTime ticks RunStartTime ticks RunLastTime ticks 2 Thread 1 kPhilosopherThread 2 Thread 2 kPhilosopherT hread 2 Thread 3 kPhilosopherT hread Template ID gt Priority Stack Address NumTimesRun CreationTime cycles RunStartTime cycles RunLastTime cycles RunTotalTime cycles CreationTime ticks RunStartTime ticks RunLastTime ticks H a Thread 4 kPhilosopherT hread D E Value 5 Ready Ready kPriority10 Ox00000000 kSystemStartT hread 0x00000015 kPriority10 Oxf0030d24 6 8045 36088 39234 22274 0 1 1 Running kPriority5 Ready kPriority5 Sleeping 0 Ticks Remaining 000000001 kPhilosopherT hread 0x0000001 a kPriority5 Oxf0032894 3 22198 59793 59793 1407 0 3 3 Sleeping 0 Ticks Remaining Figure 2 69 Example VDK Status Window VisualDSP 5 0 User s Guide 2 103 Debugging Windows When the execution of a VDK enabled program is halted VisualDSP reads data for threads semaphores events event bits device flags mem ory pools and messages It then displays state and status data in this window When one of the above VDK entities is created it is
263. page 2 40 Build Page and Console Page The Output window s two tabs Console and Build provide different information and capabilities Build Page The Build page Figure 2 20 displays error messages generated during a build 1 error detected in the compilation of dft c ccts Fatal Error Compilation failed Tool failed with exit exception code 1 Build was unsuccessful x z D oa tS gt Figure 2 20 Example Error Messages in the Output Window Choosing Next Error or Prev Error from the Edit menu allows you to scroll through error messages Double clicking on an error message displays the offending code in an edi tor window For more information see Viewing Error Message Details on page 2 33 By default VisualDSP output is blue and tool output is black You can modify these colors by using the Preferences dialog box VisualDSP 5 0 User s Guide 2 29 Output Window Console Page The Output window s Console page Figure 2 24 on page 2 39 allows you to View VisualDSP or target status error messages View STDIO output from C C programs View I O streams messages Scroll through previous commands by pressing the keyboard s up arrow and down arrow keys Perform multiline selection copy paste and clear Issue script commands and view script command output Auto complete script commands Execute a previously issued script command by double clicking on t
264. page A 66 VisualDSP 5 0 User s Guide Support Information Support Information Choose the About VisualDSP command from the Help menu to open the About dialog box This dialog box provides access to the following types of support information gt About groogeeesesseseeeseesen General Licenses Components Versions Support gt VisualDSP 4 5 Copyright 1995 2005 Analog Devices Inc Registered User Author Arthur Company Analog Devices Inc Product Version 4 5 0 0 IDDE Version 7 0 0 0 Build Date Dec 25 2005 Installation Directory E 44 5 Heb Figure A 1 Example of the General Page Software versions The General page Figure A 1 which displays version information about the VisualDSP software This information includes the name of the registered user and company the version of IDDE and its build date and the directory path in which VisualDSP is A 2 VisualDSP 5 0 User s Guide Reference Information installed License management The Licenses page Figure A 2 provides a centralized view of your current licenses You can view license status and perform all neces sary licensing activities installing registering and validating gt About ADI 153 256 3434434 85 SHARC Validated Permanent ADI 150 256 3434434 117 Blackfin Validated Permanent Figure A 2 Example of the Licenses Page VisualDSP 5 0 User s Guide A 3 Support
265. part of the context sensitive Help in VisualDSP For more information about the Help system refer to Online Help on page A 53 and to Using this Help System in VisualDSP Help VisualDSP 5 0 User s Guide 1 61 VisualDSP Help System 1 62 VisualDSP 5 0 User s Guide 2 ENVIRONMENT VisualDSP is an intuitive easy to use user interface for programming Analog Devices processors This chapter introduces the VisualDSP work environment including the main window and debugging windows Graphics are used to illustrate concepts and available window options From the application s main window you can open the Project window editor windows the Output window and various debugging windows Customize VisualDSP to meet your needs Refer to VisualDSP Help for how to information This chapter is organized as follows Project Window on page 2 2 provides a project hierarchy Editor Windows on page 2 16 allow you to view and edit files Output Window on page 2 28 provides I O messages and a scripting input Debugging Windows on page 2 43 focuses on each debugging window presenting its purpose and features For information about the VisualDSP title bar menu bar and control menu toolbars and user tools and status bars refer to Parts of the User Interface on page A 15 VisualDSP 5 0 User s Guide 2 1 Project Window Project Window To open a Project window choose View and Project
266. piler standards the call stack cannot be guaranteed When debug information is not available at all the Call Stack window Figure 2 43 will provide limited information based on symbol table information If symbols have been stripped from the executable simple addresses will be displayed When debug information is not available for 2 64 VisualDSP 5 0 User s Guide Environment Call Stack NN x Double clicking on a function opens an editor window or the Disassembly window function3 function2 functionl main function Hi ES FFA110FC IF CC RO R1 FFA110FE RTS function4 FFA11100 LINK 0x38 FFA11104 R325 FFA11106 FP FF 11108 P1 L Ox4 FF 1110C P1 H Oxff90 B FF 11110 P2 FP FF 11112 P2 44 FFA11114 PO 10 FFA11116 LSETUP 4 xFFAllll x 6 FFA1111A R2 Pl FFA1111C P2 R2 FFA1111E RO L 184 BEC 1 co E co EXCCXCXEXEXEXEXEXEXEXEXEXEXEXEXEXEXEXEXEXEEXE A ivoid function4 void E 26 long myarray 10 1 2 3 4 5 6 7 8 9 10 printf hi from function 4 j 6 for j 5 j 10 j printf Zi myarray j 10 printf Sn Figure 2 42 Application Built With Debug Information VisualDSP 5 0 User s Guide 2 65 Debugging Windows example in a Release configuration the call stack may be invalid around function boundari
267. pinning a window to a processor you dedicate that window such as a memory window to a particular processor in a multiprocessor group Pinning associates a window to a specific processor statically Before debugging open and pin the register windows and memory windows that you plan to use If these windows are not pinned they display information for any processor that has focus When a window is pinned to a processor a pin icon appears in the win dow s upper left corner For example PRQGIEUESEEEING Window Title Bar Information Figure 3 1 shows a pinned window in a multiprocessor debug session The title bar of a pinned window shows A pushpin icon f to indicate that it is a pinned window The processor s name Window title Number format such as hexadecimal for windows that support multiple formats 3 6 VisualDSP 5 0 User s Guide Debugging X 30000 93600C D 030018 M 030024 E 030030 03003C EE 030048 E 1630054 Hi y Er eoo000000 o0000000 00000000 60000000 e0000000 o0000000 00000000 00000000 0000000 o000000 00000000 AAAA 0000060 oo0000000 o0000000 00000060 Figure 3 1 Pinned Window in a Multiprocessor Debug Session Additional Focus Indication If configured VisualDSP shades unfocused windows with a specified color You can specify the background color of focused and unfocused windows For details refer to VisualDSP Help Code Analysi
268. play the topic 2 On the left side of the Help window click the Favorites tab 3 Click Add Remove a bookmark by selecting the name and clicking Remove The Help system adds the topic and displays it in the alphabetized list To open a bookmarked topic 1 On the left side of the Help window click the Favorites tab 2 Perform one of these actions Double click the topic Select the topic and click Display A 58 VisualDSP 5 0 User s Guide Reference Information Navigating in Online Help To move around in the Help system click the following Ahyperlink within text The text is underlined and displayed in a color that is different from the regular black text A topic listed under a See Also heading The text is underlined and displayed in a color that is different from the regular black text Amini button or its associated text The button is a small gray square and the underlined text is in a different color Atopic name on the Contents page Figure A 25 E e How To Ei AB Reference Click a page icon c E Online Manuals 7 to view the topic E Glossary E C Run Time Libraries E DSP Project Files Figure A 25 Contents Page Online Manual Topics VisualDSP 5 0 User s Guide A 59 Online Help An index entry on the Index page Figure A 26 Build settings 4 Click an index entry custom 7 individual File to view the associated topics project wide Fig
269. playing Processor Memory VisualDSP 5 0 User s Guide 3 19 Plots When plotting processor memory you can Choose from multiple plot types and specify the plot s data and presentation Apply a data processing algorithm to the processor s memory data Modify a plot s configuration and immediately view the results Zoom in on a plot area or view data point values in a plot window e Print a plot save the plot image to a file or save the plot s data to a file Plot Types Each plot must be specified to be one of the plot types in Table 3 4 Table 3 4 Available Plot Types Plot Type Description Requires Line on page 3 21 Displays points connected by a line Y value for each data point X Y on page 3 21 Similar to a line plot but also uses X axis data X value and Y value for each data point Constellation on page 3 22 Displays a symbol at each data point X value and Y value for each data point Eye diagram on page 3 23 Typically used to show the sta bility of a time based signal Y value for each data point Waterfall on page 3 24 3 D plot typically used to show the change in frequency content of signal over time Z value for each data point Spectrogram on page 3 26 2 D plot displays amplitude data as a color intensity Z value for each data point The X Y and Z values are read from processor memory 3 20 Vi
270. provides commands for docking or floating the window The Allow Docking command and the Float In Main Win dow commands are mutually exclusive Docked Windows The Project window in Figure A 18 is docked The docking option Allow Docking is enabled To prevent a window from docking hold down the keyboard s Ctrl key while dragging the window to another position Floating Windows The Project window in Figure A 19 is floating in the main window Float In Main Window is enabled The presence of an icon in the top left corner of a window indicates that it is floating VisualDSP 5 0 User s Guide A 39 Window Operations e a n eo e m Um nr ae Gd s RO miiir B shell c Demum E DIRIIRc DSP Figure A 18 Example of a Docked Project Window BTC ve E 3 amp O Figure A 19 Project Window Floating in Main Window 1 of 2 The Project window in Figure A 20 is also floating in the main window Float In Main Window is enabled The Project window in Figure A 21 is floating but not in the main win dow Float In Main Window is not selected A 40 VisualDSP 5 0 User s Guide Reference Information aci setuplIRi dsp DIRIIRc DSP Figure A 21 Example Project Window is Not Floating in Main Window VisualDSP 5 0 User s Guide A 41 Window Operations Window Position Rules The following rules apply to window positions Unless Allow Docking is disabled a w
271. ps the current program Resets the target Toggles a breakpoint for the current line Clears all current breakpoints Enables or disables one breakpoint Disables all breakpoints Steps one line Steps over the current statement Steps out of the current function Runs the program to the line containing the cursor Opens the Expressions window Opens the Locals window Opens the Call Stack window AA REE p eee I ee A 26 VisualDSP 5 0 User s Guide Reference Information Table A 4 Toolbar Buttons Contd Button Purpose a Opens the Disassembly window A j Runs the command associated with the user tool one of ten 1 ry Opens the associated workspace one of ten Toolbar Operation This section describes the toolbars and shows how to customize their appearance Refer to Toolbars and User Tools on page A 19 for more information about toolbars Toolbar Button Appearance You can specify the appearance of the toolbar buttons An option large buttons increases the size of each button Table A 5 Table A 5 Toolbars in Different Viewing Options Option Settings Docked Floating Large buttons Off Large buttons On Iu VisualDSP 5 0 User s Guide A 27 Parts of the User Interface Toolbar Shape You can change the shape of a floating toolbar Table A 6 shows two tool ba
272. r fooi 20 H 21 Ze Figure 2 37 Source Mode View KI Line C Program Files Analog D fa F0000144 JUMP PO j 12 13 main FO00014C LINK 0x18 14 15 int i r 16 l7 for i D i 5 i F0000150 R3 Q0 F0000152 FP 12 F0000154 R2 FP F0000156 Ri 5 F0000158 CC R2 R1 F000015A IF CC JUMP 18 t v Figure 2 38 Mixed Mode View When you view the window in mixed mode profiling data for each assem bly line displays as shown in Table 2 39 Mixed mode displays profiling statistics for individual assembly instructions VisualDSP 5 0 User s Guide 2 61 Debugging Windows Execution Unit C TestLab Generic test te a maint foofint LINK bar int Ll Ti D a c i a 5 In Total Samples 268 Elapsed Time 00 00 00 Enabled Figure 2 39 Profiling Data for Each Assembly Line Mixed Mode Filtering PC Samples With No Debug Information Since you spend most of your time building a debug version of your code eliminate non debug code such as C run time library initialization code The profiling results in Table 2 40 show where a lot of time is spent before filtering f 0000022 00000b8 bar int foo int include lt stdlib h gt int foofint 1 filing Results return i void barfint i i i Elapsed Time 00 00 00 Enabled E 2 3 4 5 6 8 3 0 I Fig
273. r or window 1 Click the toolbar s Help button R or press Shift F1 The mouse pointer becomes a Help pointer R 2 Move the Help pointer over a menu command toolbar button or window 3 Click the mouse The Help window opens if not already open to the object s description which appears in the right pane Viewing Dialog Box Help To view Help for a dialog box control button or field perform one of the following actions Select a field or button in a dialog box and press F1 or Shift F1 e Click the question mark button in the top right corner of the dialog box The mouse pointer becomes a Help pointer hk Next move the Help pointer over a dialog box control button or field and click the mouse A description of the object appears in a yellow pop up window Position the mouse pointer over a label or control button or field in a dialog box and right click A What s This button Whats This appears Move the mouse pointer over the What s This button and click What s This Help is not configured for all items A 56 VisualDSP 5 0 User s Guide Reference Information Viewing Window Help To view window Help 1 Click the window to make it active 2 Press the F1 key A description of the window appears in the right pane Copying Example Code From Help You can copy code from Help and then paste it into your application Be aware that the copied text may carry unwanted
274. r ADSP TS20x processors For a complete list of pipeline effects and memory transaction timing refer to the processor s hardware specification Stalls Due to IALU Dependency The following sequence of instructions causes a cycle stall at the PreDecode stage JO 0x40000 J1 J31 90 This instruction is stalled in PreDecode until the previous instruction reaches E2 Cycle Fl F2 F3 F4 PD D i aA ri E2 1 lt x lt i Xe x x BE es EB 2 d ES EB SB E ELE EB BH 3 i 3E E E x EGE BH 4 i i EH Ea E E EB BH 5 n n j jA B E EE BH 6 n n n j j0 0X40000 B E BBEA B EB 7 n n n n 506 jo ox40000 EM ER EM EH 8 n n n nf ji 331 30 B jo ox40000 Be K 3 n n n ni 331 350 B jo ox4o000 B EH 10 n n n nf ji 331 j0 j0 ox40000 BB i 11 n n n n jl 331 j0 j0 0X40000 B B B i ij0 0X40000 nop nop 12 x n n n nop nop nop jl j31 j0 B B B B j0 ox40000 nop nop 13 E Xx n n nop nop nop nop nop n B B jB j0 0X40000 nop nonp 14 n x x n nop nop nop nop nop n B iB j0 0X40000 nop nop 15 n n x x nop nop nop nop nop n r jB j0 0X40000 nop nop 16 n n n x nop nop nop nop nop n y n ji 331 j0 nop nop n Figure C 8 Stall Due to IALU Dependency C 14 VisualDSP 5 0 User s Guide z Simulation of TigerSHARC Processors Stalls Due to Compute Block Dependency The f
275. r Options Boot from SPI 32 bit Host 16 bit Host or 8 bit Host for ADSP 2116x processors only None of Above disables boot mode Create a boot loader file 1dr based on the peripheral from which you are loading In a simulation target session choose a peripheral boot option and boot file as follows To create a boot loader file 1 From the Settings menu choose Load Sim Loader and a boot option such as Boot from Host to open the Open a Boot File dialog box Navigate to the 1dr file and select it Then click Open and OK A message instructs you to issue a reset instruction to execute the loader From the Debug menu choose Reset The simulator runs and boots in the boot kernel also called loader kernel A message instructs you to issue a run instruction which executes the loader From the Debug menu choose Run F5 to execute the loader The loader runs to completion and then displays a message indicating that the loader is finished and that it is OK to run the application Before clicking Run load the symbols for the program as follows a From the File menu choose Load Symbols to open the Load a Processor Program s Symbols dialog box b Select the dxe file that was used to create the 1dr file A message indicates that the selected symbols are loading From the Debug menu choose Run F5 to run the application VisualDSP 5 0 User s Guide Simulation of SHARC Processors For bo
276. r currently in use The ideal size is a little below 10096 Readings of 10096 indicate lost data Table 2 26 describes the data logging status indicators in a plot window Table 2 26 Data Logging Status Indicators in a Plot Window Status Indicates Record Real time data being displayed is also being saved logged to a BIN file Live Data is being displayed in real time Playback A previously saved data log file is being viewed Tool Bar The plot window s toolbar shown in Figure 2 74 provides buttons for recording and playing back streaming data and a box for specifying streamed data bin file names Right Click Menu The plot window s right click menu is shown in Figure 2 75 This menu provides access to the standard window options docking closing and floating in the main window and to the plot window features described in Table 2 27 on page 2 114 VisualDSP 5 0 User s Guide 2 111 Debugging Windows Play New Stop Record Open Filename a E o cr Left Time Sec Figure 2 74 Plot Window s Toolbar Plot Window Statistics View various statistics mean standard deviation signal to noise ratio SNR minimum data value and maximum data value while displaying a plot Note that statistics apply only to the portion of data that is visible When the plot is zoomed the statistics are recalculated only for the visible area Figure 2 76 shows statistics displayed for a porti
277. r in the Output window Double clicking on an error message position opens the makefile in an editor window to the line of code causing the error Keywords in the makefile are syntax colored Note The error message format of gmake is parsed correctly when you double click on an error message If you use another make utility the double click feature does not function Example Makefile An example of a makefile appears below 1 Generated by the Visu alDSP IDDE 1 Note Any changes made to this Makefile will be lost the next time the matching proj wish to preserve chan 1 externally to the IDDE 1 The syntax of this Ma higher is required ect file is loaded into the IDDE If you ges rename this file and run it kefile is such that GNU Make v3 77 or 1 The current working di 1 this Makefile resides Supported targets if Debug Debug_clean Release if Release_clean df Define ADI DSP if it rectory should be the directory in which is not already defined Define this 1 variable if you wish to run this Makefile on a host other than 1 the host that created 1 different directory it and VisualDSP may be installed in a VisualDSP 5 0 User s Guide 1 53 Processor Projects ifndef ADI DSP ADI_DSP C Program Files Analog Devices VisualDSP endif 1 VDSP is a gmake friendly version of ADI DIR empty space empty empty VDSP INTERMEDIATE subst ADI_DSP
278. r load and store SYNC with store pend SYNC instructions force all speculative transient SSYNC ing in the core system to be completed before pro ceeding EU gt MUL MAC RAW Execution unit Multiply or Multiply accumulate RO R1 RO hazard with a read after write hazard PO RO RETx RAW hazard Writing to one of the RETx RETS RETI RETX RO RETX RETN or RETE registers immediately RTX followed by the corresponding return instruc tions Dagreg WAW hazard Writing to one of the DAG registers and imme 13 R3 diately writing to it again I3 MO Dagreg RAW hazard Writing to one of the DAG registers and imme 13 R3 diately reading I3 R7 dsp32alu implied ireg dependency RAW haz ard ccMV preg gt dreg RAW A conditional move of a preg into a dreg fol If CC RO Pl hazard lowed by a read of the dreg RO R1 ccMV dreg gt dreg RAW A conditional move of a dreg into a dreg fol If CC RO R1 hazard lowed by a read of the source dreg R2 RO ccMV dpreg gt preg A conditional move of a dreg into a preg fol If CC PO R1 RAW hazard lowed by a read of the preg Pl PO VisualDSP 5 0 User s Guide D 13 Simulator Instruction Timing Analysis for ADSP BF535 Processors Table D 7 Stalls Detected Messages ADSP BF535 Processor Contd Message Explanation Example loopsetup WAW hazard A LSETUP instruction followed by another LSETU
279. r shapes Table A 6 Toolbars in Two Orientations Horizontal Vertical Help NEN ET DNE R R Depending on the number of tools in the toolbar you can create other length and width arrangements Toolbars Docked vs Floating By default toolbars are located under the application s menu bar but you can move them to these locations Over a docked window On the main window Anywhere on the desktop A toolbar attached to a window is called a docked toolbar You can tell when a toolbar is going to dock by the size and shape of its moving outline as you drag it Its outline becomes slightly smaller than its floating outline To prevent a toolbar from docking press and hold the Ctrl key while dragging the toolbar to a new location A 28 VisualDSP 5 0 User s Guide Reference Information A toolbar can be detached from a window and moved to another location anywhere on the desktop A floating toolbar is a stand alone window as it is not docked A docked toolbar does not show its name however a float ing toolbar displays its title Figure A 14 shows a floating Help toolbar Help F3 RIR Figure A 14 Floating Help Toolbar Toolbar Rules When working with toolbars be aware of these rules e You can customize a built in toolbar for example by removing a button from the File toolbar but you cannot delete a built in toolbar You can reset the buttons in a built in toolbar to their
280. r which you can move it to different areas of the screen by dragging it to the selected location Table A 4 Toolbar Buttons Button Purpose Connects to the debug target or disconnects from the debug target G Creates a new document 5 Opens an existing document A 22 VisualDSP 5 0 User s Guide Reference Information Table A 4 Toolbar Buttons Contd Button Purpose Saves the active document or template with the same name Saves all open files that have been modified including files not in the current project Prints the active document Loads a program into the target Reloads the most recent program into the target Cuts selected data from the document and store it on the clipboard Copies the selection to the clipboard Pastes the contents of the clipboard at the insertion point Undoes previous edit command multilevel undo Redoes the command undone by the previous Undo command multilevel redo Finds a text block in an editor window Finds again or repeats the previous find command Es p p p ps pm o We a Ln Replaces the selected text with other text VisualDSP 5 0 User s Guide A 23 Parts of the User Interface Table A 4 Toolbar Buttons Contd Button Purpose Searches through files for text or regular expressions Goes to or moves to the specified location Displays the current s
281. r3 r2 12 20 GER GEM nop I j2 Blk Blki 0X1 ur3 r2 13 y j j0 0X1 xr0 r4 r Hn IF jue B ki 0X1 xr3 r2 14 y y n j0 0X1 xr0 r4 r jo nop I j2 j2 0X1 xr9 15 n y y nop ji j0 Ba IF njle JUMP x5 NP 16 j n y yr4 0X5 n j0 Fes B nop 17 x j n yr3 0X1 y nop j j 0X1 xr0 r4 18 n Xx j yr2 0 LR yr n j0 0X1 xr0 r4 19 n n x jil0 0 y yr y nop Figure C 3 Abort Due to an Unpredicted Change of Flow VisualDSP 5 0 User s Guide C 5 ADSP TS101 Processors Abort Due to Mispredicted Change of Flow In the following example an abort appears at pipeline stage E1 because of a mispredicted change of flow at the end of a loop predicated on a com pute block condition Cycle F1 F2 F3 DECODE INT ACCESS EX1 EX2 a 72 UB iB Eu ji WF y B yr3 r3 r2 73 jmo vEh v6 y ji MI yr4 r4 r3 74 GEB OBS Be BG Bases JUMP loop2 75 n nM 30 Bi m Boso 76 j n nmn jo j Air By Bh yr3 r r2 77 x j n nop ju 30 Bi FR yr4 r4 r3 78 n x j no n j Jes Al IF nyaeq JUMP loop2 79 n n S xr n nop ds j 0X1 xrl r4 80 y n n j3 x no nc j 0X1 xrO r4 81 3 y n j2 dus XY n nop 82 j j y ki Jea j3 X nop nop nop Figure C 4 Abort Due to Mispredicted Change of Flow C 6 VisualDSP 5 0 User s Guide Simulation of TigerSHARC Processors Bra
282. rSHARC processors The information is organized as follows e ADSP TS101 Processors on page C 1 e ADSP TS20x Processors on page C 12 ADSP TS101 Processors This section includes the following topics which apply to ADSP TS101 processors Simulator Timing Analysis Overview on page C 2 Pipeline Stages on page C 2 e Stalls on page C 3 e Aborts on page C 5 Pipeline Viewer and Disassembly Window Operations on page C 7 e Simulator Options on page C 11 VisualDSP 5 0 User s Guide C 1 ADSP TS101 Processors Simulator Timing Analysis Overview The ADSP TS101 simulator is a cycle accurate simulator It not only models the instruction set functionally but also correctly models pipeline effects stalls and aborts Currently the processor s external port and link ports are not modeled in a cycle accurate manner The simulator cycle counts the code but the cycle counts used for the external port or link ports are rough estimates of cycle counts that you could obtain by running the code on the chip Do not rely on these counts for performance evaluation The Pipeline Viewer window shows the flow of instructions through the pipeline and any stalls due to sequencer or memory events It helps you understand how processor timing affects the execution of your program For information about configuring and using the Pipeline Viewer see Pipeline Viewer Window on page 2 88 or VisualDSP online Help
283. race Ctrl B Go To Ctrl G Find Ctrl F w Source Mixed Select Format A v Hexadecimal Float Unsigned Integer Integer Octal Figure 2 18 Example Editor Window Right Click Menu The available formats under Select Format depend on the target processor An additional command Source Script is available when you are editing a script VisualDSP 5 0 User s Guide 2 27 Output Window Output Window The Output window displays Standard I O text messages such as file load status Build status information for the current project build Code development tools messages and provides access to errors in source files The Output window also serves as a scripting interface The example Output window in Figure 2 19 shows build status informa tion Display the Output window by choosing View and Output Window C Program Files Analog Devices VisualDSP ccts c dft c g default C Program Files Analog Devices VisualDSP ccts exe Debug dft doj TS Build completed successfully Figure 2 19 Viewing Build Status Information in the Output Window This section describes the following topics Build Page and Console Page on page 2 29 Code Development Tools Batch Processing Messages on page 2 31 Log File on page 2 38 Output Window Customization on page 2 38 2 28 VisualDSP 5 0 User s Guide Environment Right Click Menu on page 2 39 Script Command Output on
284. rce files If a controlled copy is not located the SCC application must locate it Typically you are queried to browse for it If the controlled copy is successfully found or added the plug in keeps its application spe cific path in the project file and reconnects with this path in the future You can subsequently reconnect to the controlled copy without having to browse for it Operations executed on large numbers of files tend to take longer to fin ish A message box provides status information by displaying the operation currently executing A button on the message box cancels the operation 1 50 VisualDSP 5 0 User s Guide Introduction to VisualDSP The Output window s Console view displays finished operations Mes sages indicate what has been done Warnings and error messages may also appear in the Output window SCC applications provide dialog boxes and GUI displays for some file operations such as show history show difference and show properties These operations can be run from VisualDSP For complete details refer to VisualDSP Help Maketfiles Use a makefile mak or mk to automate builds within VisualDSP The output make rule is compatible with the gnumake utility GNU Make V3 77 or higher or other make utilities VisualDSP generates a project makefile that controls the orderly sequence of code generation in the target You can also export a makefile for use outside of VisualDSP For more information
285. rce is known or the Disassembly window if it is not already open and jumps to the specific item in the Call Stack window VisualDSP 5 0 User s Guide 2 63 Debugging Windows Use this debugging feature by walking up the call stack and viewing local variables in different scopes Use this window to analyze the state of par ent functions when erroneous data is being passed to the currently executing function and to see the context from which the current function is being called The Call Stack window provides call stack information when Debug information is available Debug information is not available Applications Built With Debug Information When debug information is available the call stack provides the C func tion names starting with current program context A program is built with debug information using the default Debug configuration or alternately by selecting Generate debug information on the Project Options dialog or manually using the compiler s g command line switch See Figure 2 42 Applications Built When Debug Information is Not Available An application may be build with limited or no debug information In this instance the Call Stack window will be based partly on debug informa tion and partly on the frame pointer alone This Call Stack window will provide a call stack that may contain assembly labels with offsets as well as C functions If code is being executed that does not adhere to the com
286. re a user program is loaded The simulator defaults to a standard loader program T520x prom dxe where x is 1 2 or 3 but you can define your own loader by compiling a program into a dxe file If you create your own loader your code must contain the label init debug end to ensure that the loader is executed C 22 VisualDSP 5 0 User s Guide D SIMULATION OF BLACKFIN PROCESSORS This appendix provides Blackfin simulator specific information The information is organized as follows Peripheral Support in Simulators on page D 2 Note that VisualDSP online Help includes the most recent information about Blackfin processor simulation support Special Considerations for Peripherals on page D 7 e Simulator Instruction Timing Analysis for ADSP BF535 Proces sors on page D 9 Simulator Instruction Timing Analysis for ADSP BF531 ADSP BF532 ADSP BF533 and ADSP BF561 Processors on page D 19 e Multicycle Instructions and Latencies on page D 22 Compiled Simulation on page D 44 VisualDSP 5 0 User s Guide D 1 Peripheral Support in Simulators Peripheral Support in Simulators Use the following key for the tables in this section Table D 1 Symbol v Implemented NA Not applicable NP Not planned for implementation FR Planned for a future release Table D 2 summarizes peripheral support in the ADSP BF535 simulator Table D 2 Peripheral Support in the ADSP BF535 Simulator
287. re changed to remarks which are not displayed cc21k c test c Wremark 549 117 The following command changes the two warnings to remarks and then displays all seven remarks cc21k c test c Wremark 549 117 Wremarks Example 4 Suppressing Messages The following command suppresses two specific warning messages The command outputs five remarks but the two warnings do not display even though the Wremarks flag requests all the remarks cc2lk c test c Wsuppress 549 117 Wremarks Suppressing Compiler Warnings and Remarks You can suppress compiler warnings as well as compiler remarks You cannot suppress compiler warnings without also suppressing remarks Specify warning options from the Compile page Warning subpage of the Project Options dialog box VisualDSP 5 0 User s Guide 2 37 Output Window Log File The VisualDSP log file contains all the status and error messages that have been written to the Output window s Console page Figure 2 23 shows a sample log file VisualDSP_Log_txt Notepad File Edit Search Help Loading C Program Files Analog Devices Vi Load complete Hit breakpoint at 6x18 Loading C Program Files Analog Devices Vi Load complete Hit breakpoint at 6x18 Loading C Program Files Analog Devices Vi Figure 2 23 Portion of a Sample Log File Messages are saved to the log file VisualDSP_Log txt which by default is located in the install path Data directory
288. refer ence mapper function Double clicking on a cell switches the display to the history view History page for the selected cell History Page The History page Figure 2 65 displays detailed information for each cache event that occurred in the selected set and way Cache Views Ci Set fal Way Ja indes LSet wapt cycle PC addess_ RelAddiets Sym vea OxfO00004b8 Oxf00004b8 OxfO00004b0 Oxf00004b0 Oxf0000488 Oxf00004a8 _init_argy OxfO0004d8 Oxf00004d8 Oxf00004d0 Oxf00004d0 OxfO0004e8 Oxf00004c8 OxfO0004c0 Oxf00004c0 Oxf00004d8 Oxf00004d8 OxfO0004d8 Oxf00004d8 OxfO0004d0 Oxf00004d0 Oxf00004e8 Oxf00004c8 OxfO0004c0 Oxf00004c0 OxfOO008F8 OxfO00088 Pis Fnnnnar Dinner Configuration Detailed History Histogram Address Figure 2 65 Example History Page 2 1 0 8 6 5 4 3 2 1 0 2 1 uN M Mm D N co c2occococoococcoccococc 2 98 VisualDSP 5 0 User s Guide Environment Select the set and way from the pull down control top of dialog box or by double clicking a cell on the Detailed View page You can specify the number of stored cache events Sort the rows by click ing on any column heading An up arrow in a column heading indicates an ascending sort order a down arrow indicates a decending sort order Table 2 25 describes cache event history information Table 2 25 History Information for Cache Events Item Description Index Show
289. rent file to ensure that your change fixes the error in the current file Batch Builds Performing a batch build builds one or more build targets in the open project group You must configure the batch build before you can build it A build target in a project group is formed by the combination of a project and a project configuration such as a Release configuration Refer to VisualDSP Help for details on configuring and running a batch build Pre Build and Post Build Options Pre build and post build options are typically DOS commands that are executed before building a project and after a successful project build These commands invoke external tools You can configure these options via the Project Options dialog box For example you can use a post build command to copy the final output file to another location on the hard drive or to invoke an application automatically VisualDSP 5 0 User s Guide 1 59 Processor Projects Automatically copying files and cleaning up intermediate files after a suc cessful build can be very useful Command Syntax Place c windows command com C at the beginning of each DOS command line For example to execute copy a txt b txt type c windows command com C copy a txt b txt The letter C after the slash character must be uppercase Project Dependencies Dependency data determines which files must be updated during a build The following are examples of depend
290. ring simulation can result in unpredictable program behavior VisualDSP does not safeguard against invalid PC values Ensure that the specified PC indicates a valid instruction within program address space An example of an invalid PC is a data memory address whose con tents is not recognized as an instruction by the simulator In this case the simulator generates an unhandled software exception Another example of an erroneous PC is the middle of an instruc tion line Only part of the instruction line is executed while instructions in the beginning of the line are ignored C 20 VisualDSP 5 0 User s Guide Simulation of TigerSHARC Processors Figure C 14 shows how the program counter value is used for ADSP TS20x processors Pipeline viewer CG Cycle Fi F2 F3 F4 PD 663 yd x y HB 664 H y x H 665 Faa H y x 666 H y i y 667 668 669 670 671 672 673 674 675 676 677 678 679 N a yrii yrl EE EBESESESERER yr20 0X80100 ivsw yr20 Bid Pil Pad al Pel Rod Pel ed d ud d d Le rd il P a y i y j i x j r x j3 0X30000000 r r xr 0 SB r r4 0X700000 y S y y y y y y y y y y w v mu Mo o3 VU Mo o9 VU JB r4 0X700000 STAT r4 OXFFFFFFFF oD Dd ee se 3 4 H A e bowocd wod od wocd U UH MURS Disassembly x bi 080020 yr0 XFFFFFFFF 080021 yri zz gt 080022 vfr2 r0 ri 08
291. rmance With VisualDSP At this stage you should understand how to access the features of the processor and how to use a structured approach to develop software Next optimize your software to take full advantage of the processor s computa tional power This entails Understanding the compiler optimizer Writing mixed C and assembly programs Accessing C C data structures in assembly Harnessing the power of C Setting up and using overlays Configuring emulation L1 memory for cache versus SRAM with cache visualization Using statistical profiling VisualDSP 5 0 User s Guide 1 13 Project Development Testing and Debugging With VisualDSP At this stage you should have a good understanding of the various facili ties available for producing optimal software The last step applying software testing and debugging techniques includes Collecting and viewing data using the advanced plot windows Using compiled simulation Using ActiveX and COM Automation to create regression test environments and taking advantage of interoperability with other applications Project Development Stages The typical project includes three phases simulation evaluation and emulation These phases are shown in Figure 1 1 Simulation No hardware is required EZ KIT Lite Evaluation gl E Board Jennie BEREIT Emulation Figure 1 1 Project Development Stages VisualDSP provides debugging tools for each of the
292. rocessor memory to display a plot window VisualDSP 5 0 User s Guide 2 115 Debugging Windows Plot Configuration e sets Plot Type Line Plot Title Untitled r Data Setting Name Daas iti S s S Memory pm sz Address Browse Offset p Add Count pooo Row count p Remove Stride Poo Column counto New Data Jenar x m Axis Selection 0150 OSE ish OK Cancel Settings Figure 2 77 Plot Configuration Dialog Box Plot Window Presentation Customize the presentation of a plot window to fit your needs Configure presentation settings from the Plot Settings dialog box which you can invoke by e Right click from within a plot window e Click the Settings button in the Plot Configuration dialog box 2 116 VisualDSP 5 0 User s Guide Environment The Plot Settings dialog box provides the tabs shown in Figure 2 78 Plot Settings 2 x General 20 Axis Font Style Data Processing Figure 2 78 Tabs in the Plot Setting Dialog Box Options on the tab pages enable you to configure the plot window s presentation On the Style page for example you can easily specify sym bols for a data set as well as line type and width as shown in Figure 2 79 H mH Figure 2 79 Specifying Line Styles In addition to the many presentation options you can select a rectangular area as shown in Figure 2 80 and zoom
293. roject file is checked out File includes a file specific build command and is checked out Makefile is checked out File is excluded from the build and is checked out VisualDSP 5 0 User s Guide 2 9 Project Window Project Page Right Click Menus Right click menus also called context menus or pop up menus operate on Project window objects the project group projects folders and files These menus provide fast access to many menu bar and toolbar com mands The commands available in a right click menu depend on context the selected object Project window right click menus offer these standard commands e Allow Docking dock the Project window to the frame Hide remove the Project window from view Float in Main Window Project Group Icon Right Click Menu The project group icon ff right click menu Figure 2 5 provides a project group context from which to Create a new project Open a project and add it to the project group View the project group s properties Mew Project Open Project Close All Projects v Allow Docking Hide Float In Main Window Properties Figure 2 5 Project Group Icon s Right Click Menu 2 10 VisualDSP 5 0 User s Guide Environment Project Icon Right Click Menu The project icon Is right click menu Figure 2 6 provides a project context from which to Build Project Clean New Folder Add File s to Project
294. ruction that contains an external memory access where the wait state setting for that memory bank is greater than 0 or the access is held off because of the ACK signal or through bus arbitra tion causes that instruction to stall 5 Multiple bus accesses to IOP registers in the same IOP register group An instruction may be stalled because of multiple buses trying to access IOP registers in the same group For this anomaly the only applicable case is if an external host or processor accesses the same group of registers at the same time as the core DM MSGRO R1 Instruction executed while the host or another processor writes to MSGR2 6 Executing instructions from external memory with wait states Any instruction being executed from external memory where the wait state setting for that memory bank is greater than 0 or the access is held off because of the ACK signal causes that instruction to stall A workaround for cases 1 5 above is to insert a NOP between the stallable instruction and the short word access or remove the stall condition B 6 VisualDSP 5 0 User s Guide Simulation of SHARC Processors Case 6 has no workaround Ensure that a failing sequence does not occur when you use the delayed branch DB option with jumps calls and returns For example ensure that the two instructions in RTI DB do not cause an instruction stall in a return to code that includes short word accesses Access to ADSP 2
295. rue where 7 represents the skip count When the expression is empty execution stops when the breakpoint is reached n times Automatic Breakpoints You can configure whether the automatic breakpoints are set after a pro gram is loaded In VisualDSP 4 0 and earlier releases after a program is loaded software breakpoints were automatically set at main Also you 3 14 VisualDSP 5 0 User s Guide Debugging can specify additional breakpoints to be set after a load and you can spec ify each additional breakpoint as being a software breakpoint or a hardware breakpoint You conifer the automatic breakpoints via the Automatic page of the Breakpoints dialog box Next to each label in the breakpoint list is a brief description of the breakpoint location like start of program for main end of program for lib prog term and so on User defined break points are labeled user breakpoint if you do not provide a description Automatic breakpoints may be set as software breakpoints or hardware breakpoints If the IDDE is connected to a simulator target the hard ware software specification is ignored since all breakpoints are software breakpoints If the IDDE is connected to an emulator target that supports hardware breakpoints you can specify each automatic breakpoint as being a hardware breakpoint or a software breakpoint in the target Automatic breakpoints are specified saved and restored on a per session basis
296. ry VisualDSP 5 0 User s Guide 1 1 VisualDSP Features Assembler and linker Simulator software Example programs This section briefly describes VisualDSP features Integrated Development and Debugging The VisualDSP IDDE provides complete graphical control of the edit build and debug process In this integrated environment you can move easily between editing building and debugging activities Code Development Tools Depending on the code development tools purchased VisualDSP includes one or more of the following components e C C compiler with run time library e Assembler linker preprocessor and archiver e Loader and splitter Simulator e EZ KIT Lite o evaluation system must be purchased separately Emulator must be purchased separately VisualDSP supports ELF DWARF 2 executable files VisualDSP supports all executable file formats produced by the linker If your system is configured with third party development tools you can select the compiler assembler linker or loader to use for a particular target build 1 2 VisualDSP 5 0 User s Guide Introduction to VisualDSP Source File Editing Features VisualDSP simplifies tasks involving source files All the activities necessary to create view print move within and locate information are easy to perform Edit text files Create and modify source files and view listing or map files generated by the code development
297. ry In the Output window s Console view you can Issue script commands and view script command output For more information about issuing script commands refer to Extensive Scripting on page A 8 Enable the Microsoft script debugger Right click in the Output window and choose Enable Debugger The debugger steps through code sets breakpoints and so on Once enabled the debugger stops on the first error encountered in the script Although most script engines languages support this option some may not Consult the script engine s documentation for fur ther details on whether it supports the debugging interfaces within the Microsoft ActiveX script engine framework VisualDSP 5 0 User s Guide 2 41 Output Window e Specify the scripting language Right click in the Console view and select a language from the list of scripting languages installed on your machine The name of the current scripting language appears in the status bar at the bottom of the VisualDSP main window as shown in Figure 2 26 Current scripting language Halted Figure 2 26 Scripting Language Displayed in Status Bar e Load a script You can load a script by selecting Load Script from the File menu from the Console view s right click menu or the editor window s right click menu The script loads and runs until it finishes run ning or until you halt the script by choosing Halt Script from the Debug menu The Console vie
298. s Tools You use code analysis tools to examine your code s behavior and locate areas that may be optimized for better performance VisualDSP provides these code analysis tools e Statistical Profiles and Linear Profiles on page 3 8 e Traces on page 3 9 Plot Windows on page 2 109 Pipeline Viewer Window on page 2 88 Cache Viewer Window on page 2 93 VisualDSP 5 0 User s Guide 3 7 Code Analysis Tools Statistical Profiles and Linear Profiles VisualDSP provides two profiling methods that measure program performance by sampling the target s Program Counter PC register to collect data Use linear profiling with simulator targets and use statistical profiling with emulator targets The Linear Profiling window and Statistical Profiling window display the data collected by these two profiling methods and indicate where the application is spending its time Refer to Statistical Linear Profiling Win dow on page 2 55 for details The window s title Linear Profiling or Statistical Profiling depends on whether this tool is used during simulation or emulation Simulation Linear Profiling Linear profiling with the simulator is not statistical because the simulator samples every PC executed This feature provides an accurate and com plete picture of program execution Linear profiling is much slower than statistical profiling Simulator targets support linear profiling but do not support sta
299. s execution When program execution halts all windows are updated to current addresses and values Multiprocessor MP commands operate like single processor commands with one exception they perform an action on all processors in the MP group MP Run MP Halt and MP Step are synchronous operations which means that all processors in the currently selected MP group exe cute on exactly the same clock cycle Some commands have keyboard shortcuts refer to Keyboard Shortcuts on page A 31 Use the commands described in Table 3 2 to control program execution VisualDSP 5 0 User s Guide 3 11 Program Execution Operations Table 3 2 Commands Used to Control Program Execution Command Description Run Runs an executable program The program runs until an event stops it such as a breakpoint or user intervention When program execution halts all windows update to current addresses and values Halt Stops program execution All windows are updated after the processor halts Register values that changed are highlighted and the status bar displays the address where the program halted Run to Cursor Runs the program to the line where you left your cursor You can place the cursor in editor windows and Disassembly windows Step Over C C code only in an editor window Single steps forward through program instructions If the source line calls a function the function executes com pletely without stepping through the f
300. s in VisualDSP before using the 1 24 VisualDSP 5 0 User s Guide Introduction to VisualDSP development tools that create your executable file You can specify options for a whole project or for individual files or you can specify a custom build VisualDSP retains your changes to the build options Settings reflect your last changes not necessarily the original defaults Configuration A project s configuration setting controls its build By default the choices are Debug or Release Selecting Debug and leaving all other options at their default set tings builds a project that can be debugged The compiler generates debug information Selecting Release and leaving all other options at their default set tings builds a project with limited or no debug capabilities Release builds are usually optimized for performance Your test suite should verify that the Release build operates correctly without introducing significant bugs You can modify VisualDSP s default operation for either configuration by changing the appropriate entries on the Compile Assemble and Link pages You can create custom configurations that include the build options and source files that you want Project Wide File and Tool Options Next you must decide whether to use project wide option settings or individual file settings For projects built entirely within VisualDSP with no pre existing object or archive library files you typ
301. s the order in which the cache events were received The index starts at zero and increments each time a cache event is received Set Displays the set number where the cache event occurred Way Displays the way number where the cache event occurred Cycle Displays the cycle count when the cache event occurred PC Address Displays the PC address of the cache event Ref Address Displays the reference address of the cache event Symbol Lookup Displays the symbol name when the reference address resolves to a symbol in memory Valid Displays the cache line valid flag The values are Yes or No Event Type Displays the cache event type such as Hit or Miss Description Displays the cache event s description Performance Page The Performance page Figure 2 66 shows a list of performance metrics items and values which are determined by the target The target updates this list The update rate however is not predetermined VisualDSP 5 0 User s Guide 2 99 Debugging Windows Cache Viewer CO Miss Count Capacity Miss Count Compulsory Miss Count Conflict Miss Count Hit Count Data Prefetch Count Penalty Count Configuration Detailed Figure 2 66 Example Performance Page Histogram Page The Histogram page Figure 2 67 shows a plot of the total number of cache events that occurred in each cache set A vertical line displays for each cache set The line starts at zero and en
302. s to the compiler utility shipped with the VisualDSP software The compiler generates a linkable object file by compiling one or more C C source files The compiler s primary output is a linkable object file with a D0J extension To specify compiler options for your build choose Project Project Options From the tree control of the ensuing Project Options dialog box expand Compile and click a subpage Compiler options are grouped into the subpages described in Table 1 3 Table 1 3 Compiler Option Subpages Category Provides General Optimization compilation and termination options Source Language Settings related to the dialect of C or C accepted by the compiler Settings Preprocessor Macro and directory search options Processor Processor specific options Profile guided Options used while performing profile guided optimization PGO Optimization Warning Warning and error reporting options The available subpages and options depend on your target proces sor and your code development tools For more information about compile options refer to your processor s VisualDSP C C Compiler and Library manual and VisualDSP Help 1 28 VisualDSP 5 0 User s Guide Introduction to VisualDSP C Run Time Libraries You must be running VisualDSP to use the C run time libraries The C and C run time libraries RTLs are collections of functions macros and class templa
303. se phases refer to Table 1 2 on page 1 20 1 14 VisualDSP 5 0 User s Guide Introduction to VisualDSP Simulation Project development typically begins in a simulation environment while hardware engineers are developing the new hardware cell phone com puter and so on Simulation mimics system memory and I O which allows portions of the target system hardware behavior to be viewed A simulator is software that mimics the behavior of a processor Running VisualDSP with a simulation target without a physical processor enables you to build edit and debug your program even before a proces sor is manufactured Evaluation Use an EZ KIT Lite evaluation system in your project s early planning stage to determine the processor that best fits your needs Your PC con nects to the EZ KIT Lite board via a cable enabling you to monitor processor behavior Emulation Once the hardware is ready move directly to a JTAG emulator which connects your PC to the actual processor target board Emulators provide fast communications between the board and your PC An emulator enables application software to be downloaded and debugged from within VisualDSP Emulator software performs the communications that enable you to see how your code affects processor performance Targets A target or debug target refers to the communication channel between VisualDSP and a processor or group of processors A target can bea simulator EZ KIT
304. site at ftp ftp analog comor ftp 137 71 25 69 ftp ftp analog com VisualDSP 5 0 User s Guide xxix Product Information Related Documents For information on product related development software see these publications VisualDSP 5 0 Product Release Bulletin VisualDSP 5 0 Getting Started Guide VisualDSP 5 0 Assembler and Preprocessor Manual VisualDSP 5 0 C C Compiler Manual for SHARC Processors VisualDSP 5 0 Run Time Library Manual for SHARC Processors VisualDSP 5 0 C C Compiler and Library Manual for TigerSHARC Processors VisualDSP 5 0 C C Compiler and Library Manual for Blackfin Processors VisualDSP 5 0 Linker and Utilities Manual VisualDSP 5 0 Loader and Utilities Manual VisualDSP 5 0 Device Drivers and System Services Manual for Blackfin Processors VisualDSP 5 0 Kernel VDK User s Guide VisualDSP 5 0 Installation Quick Reference Card VisualDSP 5 0 Licensing Guide Throughout this manual and online Help tools manuals are often identified by their titles but without their software version that is the 5 0 is not shown XXX VisualDSP 5 0 User s Guide Preface For hardware information refer to your processors s hardware reference instruction set reference or programming reference and data sheet All documentation is available online Most documentation is available in printed form Visit the Technical Library Web site to access all processor and tools man
305. st c i FFA 005D6 SSYN FFA005D8 LINK 0x14 int i r 1 5 Figure 2 34 Example of a Linear Profiling Window Window Components The window which comprises two panes and a status bar provides a right click menu for performing various window functions VisualDSP 5 0 User s Guide 2 55 Debugging Windows Left Pane The window s left pane displays a list of the executed functions assembly source lines and PCs with no debug information The time that each item spends on execution appears as a histogram and as a percent The order of the items in the display is determined by the percentage of global execution time for each item The left pane includes the information described in Table 2 14 Table 2 14 Left Pane Information Column Displays Purpose Histogram Horizontal bars Graphically represents the execution percentage 96 A percent with two decimal Displays execution in percent or as a or places for example count Right click and choose View Count Execution Percent to view execution 15 01 as a percent or choose View Sample or Count to view the PC sample count a number Execution Unit Functions assembly source lines These items are sorted by the percent and PCs for which no debug age of global execution time that each information exists item took to execute The highest per centage items appear at the top of the list Double clicking on a line with a functi
306. stems for each processor family and demonstration programs 1 16 VisualDSP 5 0 User s Guide Introduction to VisualDSP Emulator Targets An emulator target is a module that controls a physical processor con nected to a JTAG emulator system For example the USB ICE emulator communicates with one or more physical devices through the host USB port Platforms A platform refers to the configuration of processors with which a target communicates Several platforms may exist for a given debug target For example if three emulators are installed on your system you might select emulator 2 as the platform that you want to use The platform that you use depends on your project development stage See Table 1 1 Table 1 1 Development Stages and Supported Platforms Stage Platform Simulation Typically one or more processors of the same type By default the plat form name is the identical simulator Some processors support compiled simulation refer to Compiled Simulation on page D 44 Evaluation An EZ KIT Lite evaluation system Emulation Any combination of devices You configure the platform for a particular target with the VisualDSP Configurator When the debug target is a JTAG emulator platform refers to a JTAG chain of specific device types VisualDSP Configurator Use the VisualDSP Configurator Figure 1 2 to align the external hardware target with an emul
307. ster a four step process You must learn how to 1 2 3 4 Work with VisualDSP Implement structured software design with VisualDSP Optimize performance with VisualDSP Test and debug your programs with VisualDSP Working With VisualDSP You should have a working knowledge of VisualDSP the front end for all available targets and platforms You should know how and when to use its various features and have a firm foundation in these project basics Work with property pages These pages of the Project Options dialog box provide options analogous to command line switches Set up debug sessions Know the distinctions between the three development stages simulation evaluation via an EZ KIT Lite evaluation system and emulation Understand how program sections and memory segments relate to prog ry seg physical processor memory Become familiar with Expert Linker Access peripherals This task includes setting up and handling interrupts in both C and assembly VisualDSP 5 0 User s Guide Introduction to VisualDSP Designing Structured Software With VisualDSP Consider elements of software design code reuse and interoperability If you are new to embedded systems try to acquire a clear understanding of The role of and motivation behind component software The role of an RTOS How to use VDK to manage multiple threads of execution and the communication between those threads Optimizing Perfo
308. sualDSP 5 0 User s Guide Debugging Line Plots A line plot Figure 3 3 displays a range of processor memory values con nected by a line The values read from processor memory are assigned to the Y axis The corresponding X axis values are automatically generated gy Example 2 Example 2 Phase Maga tind Line Plot Figure 3 3 Line Plot Multiple data sets can be plotted on a single graph X Y Plots An X Y plot Figure 3 4 requires an X value and a Y value for each data point Unlike a line plot an X Y plot requires X axis data VisualDSP 5 0 User s Guide 3 21 Plots gv xY Plot Example XY Plot Example Figure 3 4 X Y Plot The X and Y data are specified separately in a user defined memory loca tion The number of X and Y points must be equal Constellation Plots A constellation plot Figure 3 5 displays a symbol at each X Y data point The X and Y data are specified separately in a user defined processor memory location The number of X and Y points must be equal 3 22 VisualDSP 5 0 User s Guide Debugging 3 Constellation Plot Example Constellation Plot Example Constellation Plot Figure 3 5 Constellation Plot Eye Diagrams An eye diagram plot Figure 3 6 is typically used to show the stability of a time based signal The more defined the eye shape the more stable the signal This plot works like a storage oscilloscope by displaying an overlapped his t
309. sualDSP is launched the debug session is configured automatically Debugging a Multiprocessor System Debugging a multiprocessor system requires that you synchronously run step halt and observe program execution operations in all the processors at once The following capabilities help to speed a multiprocessor debug session Multiprocessor debug commands Debug gt Multiprocessor operate similar to commands used to debug a single processor The only difference is that MP commands work synchronously on all active processors in the currently selected MP group Multiprocessor window refer to Multiprocessor Window on page 2 83 The Status page displays the status of each processor and lets you switch processor focus The Group page enables you to group processors into multiple logical units to which all MP commands are applied Window pinning Note that you can use pinning and the processor status items in the Multiprocessor window with single processor debug commands to debug individual processors in an MP session Window color specification see VisualDSP Help VisualDSP 5 0 User s Guide 3 5 Debug Sessions Focus and Pinning Often in a multiprocessor debug session you have to examine the behavior of a single processor to better understand its interaction with the other processors on the target When you debug a single processor in an MP session the processor being debugged has the focus By
310. t Do not use the amp or characters as Boolean operators You must use OR AND or NOT Nested Expressions Use nested expressions to create complex searches for information For example new AND plot OR waterfall NEAR window finds topics containing the word new along with the words plot and window close together or topics containing new along with the words water fall and window close together A 64 VisualDSP 5 0 User s Guide Reference Information Rules for Advanced Searches These rules apply to advanced searches Expressions in parentheses are evaluated before the rest of the query e Ifa query does not contain a nested expression it is evaluated from left to right For example folder NOT file OR project finds topics containing the word folder without the word file or topics containing the word project The expression folder NOT file OR project however finds topics contain ing the word folder without either of the words file or project You cannot nest expressions deeper than five levels VisualDSP 5 0 User s Guide A 65 Glossary Glossary The following terms are important toward understanding VisualDSP Application Programming Interface API functions A set of functions available to an applications programmer These functions which are part of an application can be accessed by other
311. t you define project and tool configurations specify project wide and individual file options for debug or release modes of project builds and create source files VisualDSP facilitates easy move ment among editing building and debugging activities project configuration This configuration includes all of the settings options for the tools used to build a project project file tree display See Project window Project window This window displays your project s files in a ree view which can include folders to organize your project files Right clicking on an icon the project itself a folder or a file opens a menu of actions that you can perform on the selected item Double clicking on the project icon or a folder icon opens or closes the tree list Double clicking a file icon opens the file in an editor window A 80 VisualDSP 5 0 User s Guide Reference Information Project wizard Simplifies the creation of a new project by opening a series of pages from which to specify options For Blackfin processors additional pages facilitate the inclusion of startup code You can modify project options at a later time via the Project Options dialog box property pages Refers to pages of the Project Options dialog box real time operating system RTOS A software executive that handles processor algorithms peripherals and control logic The RTOS comprises these components kernel communication manager support library
312. t 3 2 Debug configuration 1 56 debugging IDDE features 1 5 multiple processors 3 4 overview of 1 20 programs 1 26 tools list 1 20 VisualDSP features 1 5 debug sessions 1 20 about 3 1 compiled simulation D 44 defined A 69 definition 3 1 management 3 3 managing 3 3 multiple 3 3 selecting a new session at startup 3 10 selection at startup 3 10 setting up 3 1 specifying A 7 specifying for multiprocessing 3 4 switching 3 3 types 3 1 viewing list of 3 3 debug target See targets demoting error messages 2 35 dependencies project 1 57 device drivers defined A 70 Dinkum abridged C library 1 29 Disassembly windows 2 46 address bar 2 45 examples 2 45 features 2 46 2 47 going to an address 2 47 invoking 2 45 opening multiple 2 46 pipeline stages 2 50 right click menu 2 48 symbols 2 49 discretionary errors 2 31 discretionary messages 2 35 dlb files 2 14 A 12 dlo files A 12 docked windows A 39 debugging windows docking control menu A 19 toolbars A8 list of 2 43 4 VisualDSP 5 0 User s Guide documentation printing A 50 doj files 1 28 1 30 1 31 2 14 A 12 DOS commands running 1 60 dpg files 1 49 A 14 dpj files 1 43 A 12 dsp files 2 14 A 13 DSPs See processors dumping memory 2 67 DWARF 2 1 27 defined A 71 dxe files 1 31 A 12 automatic loading 1 26 E editing features 1 3 files 1 24 keyboard shortcuts A 33 editor files commen
313. t of new VisualDSP 5 0 user interface features refer to VisualDSP 5 0 Features on page 1 7 See VisualDSP Help for details Also refer to the VisualDSP 5 0 Product Release Bulletin for information on features that are new updated or removed This document provides release specific information and should be of particular interest to those users who are familiar with previous versions of VisualDSP VisualDSP 5 0 User s Guide xxv Technical or Customer Support Technical or Customer Support You can reach Analog Devices Inc Customer Support in the following ways Visit the Embedded Processing and DSP products Web site at http www analog com processors technicalSupport E mail tools questions to processor tools support analog co E mail processor questions to processor support analog com World wide support processor europe analog com Europe support processor china analog com China support Phone questions to 1 800 ANALOGD Contact your Analog Devices Inc local sales office or authorized distributor Send questions by mail to Analog Devices Inc One Technology Way P O Box 9106 Norwood MA 02062 9106 USA xxvi VisualDSP 5 0 User s Guide Preface Supported Processors The following is the list of Analog Devices Inc processors supported in VisualDSP 5 0 TigerSHARC ADSP TSxxx Processors The name TigerSHARC refers to a family of floating point and fixed point
314. tatus data Image Viewer on page 2 119 A view of BMP JPEG PPM or MPEG data from processor memory or from a file on your PC You can edit copy print or export image data 2 44 VisualDSP 5 0 User s Guide Environment Disassembly Windows By default a Disassembly window appears when you open a new session You can open a Disassembly window by choosing View Debug Win dows and Disassembly Figure 2 27 and Figure 2 28 show examples of Disassembly windows one with and one without the address bar enabled The address bar shows recently used addresses symbols and expressions Address bar 920119 r2 m3 02011A dm Oxfffffff9 iG r2 920118 r2 6 92011C dm Oxfffffffd iG r2 92011D dm Oxfffffffc iG r2 e 92011E 92011F dm Oxfffffffb iG r1 920120 dm Oxfffffffa iG r1 920121 r620 Figure 2 27 Example Disassembly Window Showing Address Bar VisualDSP 5 0 User s Guide 2 45 Debugging Windows Disassembly Lx 020119 r2 m3 2 02011A dm Oxfffffff9 iG r2 926118 r2 6 2 11C dm Oxfffffffd iG r2 92011D dm Oxfffffffc iG r2 e 92011E C E E AN D 92011F dm Oxfffffffb iG6 r1l 920120 dm Oxfffffffa i 6 r1 920121 FO 0 Figure 2 28 Example Disassembly Window Without Address Bar Disassembly windows display code in disassembled form which is useful for temporarily modifying the code to test a chan
315. tead of the phrase Wildcard link Locates topics that contain the terms linker expressions linking links and so on The asterisk cannot or be the only character in the term c Locates topics that contain the terms cpp or cxx The question mark cannot be the only character in the term Boolean Operators Use the Boolean AND OR NOT and NEAR operators to precisely define your search by creating a relationship between search terms Insert a Boolean operator by typing the operator AND OR NOT or NEAR or by clicking the arrow button When no operator is specified AND is used For example the query call stack is equivalent to call AND stack VisualDSP 5 0 User s Guide A 63 Online Help Table A 29 describes the results of using Boolean operators to define a search Table A 29 Examples Boolean Operators Used to Define a Search Search Target Example Results Both terms in the same new AND plot Locates topics that contain both the words topic new and plot Either term in a topic new OR plot Locates topics that contain either the word new or the word plot or both The first term without the new NOT plot Locates topics that contain the word second term new but not the word plot Both terms in the same new NEAR plot Locates topics that contain the word topic close together new within eight words of the word plo
316. tes that provide different views The viewing pane displays the selected object Help topic Web page video pdf file application Toolbar buttons provide navigation and allow you to specify options VisualDSP 5 0 User s Guide A 53 Online Help Figure A 23 shows the parts of the VisualDSP Help window Viewing pane E visualDSP 3 5 Helo for 16 Bit Proces Toolbar Fu 5 A buttons Locate Back Forward Home Print Er Options Content F jl a Contents index Search Favorites New Features in This Version Click below for a brief description of what s new LJ MW acome to YisualDSP 3 5 Help gj Assistance LE Organization of this Help Sy te RE New Features Support for new Multiple project Navigation Software License Managemen processor support S t pane lg Data streaming License Graphical Environment and logging management in GQ Manuals IDDE 2 Technical Articles on the Web Profile guided Integrated iI Using this Help System optimization in source code IDDE control SCC Automation Profiling code aware scripting with Expert engine Linker Figure A 23 Parts of the VisualDSP Help Window Move through the Help system and view Help topics by using the Help window s navigational aids as shown in Figure A 24 Other standard Microsoft HTML Help buttons are described in Table A 26 Context Sensitive Help
317. tes that can be called from source programs Many functions are implemented in the processor assembly language C and C programs depend on library functions to perform operations that are basic to the C and C programming languages These operations include memory allocations character and string conversions and math calculations The libraries also include multiple signal processing func tions that ease processor code development The RTL simplifies software development by providing code for a variety of common needs The compiler provides a broad collection of C functions including those required by the ANSI standard and additional Analog Devices supplied functions of value for processor programming This release of the compiler software includes both the Standard C Library and the Abridged Library a conforming subset of the Standard C Library For more information about the algorithms on which many of the C library s math functions are based refer to the Cody and Waite text Software Manual for the Elemen tary Functions from Prentice Hall 1980 For more information about the C library portion of the ANSI ISO Standard for C refer to the Plauger text Draft Standard C Library from Prentice Hall 1994 ISBN 0131170031 Dinkum Abridged C Library The Dinkum Abridged C library software documentation is located on the VisualDSP installation CD in the lt install_path gt Docs Reference folder Viewing or printing these
318. the Decode stage The instruction stalls until all the required DAG registers which are updated in later pipeline stages are available In the example 10 R5 in the Execute stage is stalling the instruction in decode which wants to increment IO Figure D 5 shows an MMR stall p ewe mile Es Cycle Decode Address Execute Execute2 Execute3 Writeback I 53 PO RO H 96 RO L 228 RO H 96 RO L 226 54 RO L 230 PO RO H 96 Details for stage Execute cycle 53 RO H 96 NE z ES Address Oxffa00070 55 RO H 96 RO L 230 PO 1 ruin PO 1 RO PO Bl 56 PO RO H 96 RO L 230 Event 0 RO L 228 PO zl Type Stall Cause Sequencer or Memory stalls Details MMR Stall Figure D 5 MMR Stall MMR stalls occur in E1 while the MMR value is being returned Figure D 6 shows a branch kill peline Viewe iix Cycle Decode Address Execute Executel Execute2 Execute3 Writeback 140 CALL mend R3 L 256 R3 H 1 R1L H 4 R1 L 64 RO L 0 RO H 128 ii mW CALL nend R3 L 256 R3 H 1 RL H 4 R1 L 64 R L 0 142 Details for stage Decode cycle 141 memd R3 L 256 R3 H 1 R1 H 4 R1 L 64 143 nee a CALL mend R3 L 256 R3 H 1 Rl H 4 144 Esant K CALL nend R3 L 256 R3 H 128 145 Type Kal PE a K CALL nend R3 L 256 a
319. the project regardless of whether they have been modified build type Replaced by configuration channel A transmission path between two communicating locations usually the smallest subdivision of a transmission system For VDK chan nel refers to a FIFO queue into which messages sent to a thread are placed Each thread has 15 channels Messages are received in priority order from the lowest numbered channel to the highest COFF Common Object File Format VisualDSP does not support files formatted in COFF configuration or project configuration A project is developed in stages configurations By default a project includes two configurations Debug and Release A configuration refers to the collection of options tool chain and individual options for files specified for the configuration You can add a configuration to your project at any time You can delete a customized configuration that you created but you cannot delete the Debug or Release configurations VisualDSP 5 0 User s Guide A 67 Glossary connection type A simulator EZ KIT Lite development system or an emulator Previously called session type context switch A process of saving restoring the processor s state The scheduler performs the context switch in response to the system change A hardware interrupt can occur and change the state of the system at any time Once the processor s state has changed the currently running thread m
320. the search string which does not have to be an entire word Every character in the search string is examined If there are embedded spaces for instance the exact number is matched Regular expression matching provides much more flexibility and power than a normal search A regular expression can be a simple string which yields the same matches as normal searches Some characters in a regular expression string however have special interpretations which provide greater flexibility For example with regular expression matching you can find the following e All occurrences of either hot or cold e Occurrences of for followed by a left parenthesis with any number of intervening spaces Asemicolon only when it is the last character on a line The string ADSP followed by a sequence of digits Using a regular expression as the search pattern for replacement provides ways to identify and recover the variable portions of the matched strings A 44 VisualDSP 5 0 User s Guide Reference Information Specific Special Characters Regular expressions assign special meaning to the following characters If you have to match on one of these characters you must escape it by preceding it with a backslash Thus matches the character yet matches the beginning of the line Table A 20 Special Search Characters Character Description d A caret matches the beginning of the line A d
321. thmetic Ops except Mult Vector Ops except Mult MAC VisualDSP 5 0 User s Guide D 41 Multicycle Instructions and Latencies Table D 28 Areg2Dreg Ops Instruction Groups Areg2Dreg Ops MAC to half reg MAC to data reg Vector Multiply RND12 RND20 Add on Sign Modify Increment only this case dreg dreg hi dreg lo A0 Al Register Groups Table D 29 lists register groups Table D 29 Allreg Register Groups allreg Dreg Preg sysreg dagreg RO PO ASTAT 10 R1 P1 RETS I1 R2 P2 RETX D R3 P3 RETI I3 R4 P4 RETN MO R5 P5 RETE MI R6 FP LCO M2 R7 SP LTO M3 statbits accreg LBO LO ASTAT 0 AZ AO LCl Ll ASTAT 1 AN AO x LT1 L2 ASTAT 2 AC AO w LB1 L3 ASTAT 3 AVO Al CYCLES BO ASTAT 4 AV1 Al x CYCLES2 Bl D 42 VisualDSP 5 0 User s Guide Table D 29 Allreg Register Groups Simulation of Blackfin Processors allreg ASTAT 5 CC Al w SEQSTAT B2 ASTAT 6 AQ SYSCFG B3 VisualDSP 5 0 User s Guide D 43 Compiled Simulation Compiled Simulation A traditional simulator decodes and interprets one instruction at a time Each executed instruction often requires repeated decoding Compiled simulation removes the overhead of having to decode each instruction repeatedly In VisualDSP 3 5 compiled simulation required you to first bu
322. tion Incorrect device operation may result if Caution Device damage may result if A Caution identifies conditions or inappropriate usage of the product that could lead to undesirable results or product damage In the online version of this book the word Caution appears instead of this symbol Warning Injury to device users may result if A Warning identifies conditions or inappropriate usage of the product that could lead to conditions that are potentially hazardous for devices users In the online version of this book the word Warning appears instead of this symbol VisualDSP 5 0 User s Guide XXXV Notation Conventions XXXVI VisualDSP 5 0 User s Guide 1 INTRODUCTION TO VISUALDSP This manual describes VisualDSP a flexible management system that provides a suite of tools for developing processor applications and projects This chapter contains the following topics e VisualDSP Features on page 1 1 Product Updates and Upgrades on page 1 10 Project Development on page 1 11 Code Development Tools on page 1 27 Processor Projects on page 1 43 e VisualDSP Help System on page 1 61 VisualDSP Features VisualDSP includes all the tools needed to build and manage processor projects VisualDSP includes Integrated Development and Debugging Environment IDDE with VisualDSP Kernel VDK integration C C optimizing compiler with run time libra
323. tion options relate to the user heap system stack system heap external memory and so on At a later time you can modify the 1df file via the Project Options dialog box There are also special sections in the 1df file in which you can insert your own LDF commands comments and so on These sections are preserved each time the 1df is re generated the information is stored in the basiccrt s file 1 46 VisualDSP 5 0 User s Guide Project Options Introduction to VisualDSP Project options apply to the entire project Specify project options in the Project Options dialog box Figure 1 7 shows an example of this multi paged dialog box d General El Compile S General Rd Source Language Setti d Preprocessor gd Processor 1 gd Processor 2 E Profile quided Optimize R Warning dy Assemble f Link d General IET LDF Preprocessing Tad Elimination Rd Processor z El Load R Options ads Kernel fy Splitter FEM i 341 4 gt Project Options for BTC_audio_demo m ifs Project MEI DSP BF533 v Revision Automatic bal Type Executable file Name BTC audio demo r Tool Chain Compiler C C Compiler for Blackfin Assembler Blackfin Family Assembler Linker Blackfin Family Linker Loader Blackfin Family Loader m Splitter Settings for configuration Debug bal Cancel
324. tistical profiling Emulation Statistical Profiling A statistical profile measures the performance of a user program by sampling the target s PC register at random intervals while the target is running the program Most of the execution time in the program is in the areas where most of the PC registers are concentrated Statistical profiling provides a more generalized form of profiling that is well suited to JTAG emulator debug targets Emulator targets do not sup port linear profiling JT AG sampling is completely non intrusive so the process does not incur additional run time overhead 3 8 VisualDSP 5 0 User s Guide Debugging Statistical Profiling of Short Run Programs Statistical profiling of short run programs does not display any results Statistical profiling requires a minimum number of samples The more samples the more accurate Below a minimum it is not worth reporting For a 600 MHz Blackfin processor at 10 MHz the emulator collects about 60000 samples per second which is about a 10000 to 1 ratio versus the number of instructions the processor executes per second If the pro gram has fewer than 10000 instructions the profile will contain only one sample at most which is not useful information Statistical profiling is meant to be run in an operational system over time allowing you to evaluate repetitive code such as FFTs and ISRs which are called often in the running system This requires a longer time
325. to become statistically stable Traces SHARC processors only A trace captures a history of processor activity during program execution Run a trace execution trace or a program trace to analyze the run time behavior of your application program enable I O capabilities and simulate source to target data streaming VisualDSP provides a Trace window Refer to Trace Windows on page 2 52 and to Help for details A trace includes the following information e Buffer depth instruction lines e Cycle count Instructions executed such as memory fetches program memory writes and data memory transfers Viewing the disassembled instructions that were performed can also help in analyzing code behavior VisualDSP 5 0 User s Guide 3 9 Program Execution Operations Program Execution Operations By default when VisualDSP starts up it attaches to the previous ses sion You can override this behavior and instead force VisualDSP to start a new session When loading and running your program use VisualDSP features to step break and halt the program Selecting a New Debug Session at Startup If you had a problem such as a corrupted workspace in your last debug session use the following procedure to force a fresh session at startup D VisualDSP must be closed before performing the following procedure 1 Hold down the keyboard s Ctrl key Do not release the Ctrl key until the Session Wizard appears as d
326. ts in A 48 Editor Tab mode 2 21 editor windows about 2 16 bookmarks 2 17 2 19 breakpoints 3 13 compiler annotations 2 24 Editor Tab mode 2 21 expression evaluation 2 24 operations 2 17 parts of 2 17 program icon A 18 right click menu 2 27 source mode vs mixed mode 2 20 switching among 2 23 symbols 2 18 syntax coloring 2 19 INDEX ELF defined 1 27 ELF DWARE format A 12 elfloader exe 1 42 Embedded Processing amp DSP Knowledgebase xxxiii emulation available tools 1 20 debug session management 3 3 restarting programs 3 12 targets 1 17 vs simulation 3 3 emulator defined A 71 when to use 1 15 emulator targets statistical profiling 3 8 energy calculating for functions 3 33 energy aware programming 3 31 error messages 2 43 demoting 2 35 displaying offending code 2 29 log file 2 38 2 39 Output window 2 28 2 31 promoting 2 35 scrolling in Output window 2 29 severity hierarchy 2 31 suppressing 2 35 syntax 2 32 errors discretionary 2 31 estimated energy profile 3 31 evaluating expressions in editor windows 2 23 evaluation available tools 1 20 event bit defined A 72 VisualDSP 5 0 User s Guide I 5 INDEX events cache 2 93 defined A 71 Pipeline Viewer 2 91 thread 2 107 using data cursor 2 107 events log cache 2 95 Events submenu SHARC B 4 Access to ADSP 21065L 9th column Even Address B 7 FP Denorm B 4 Short Word Anomaly B 4 Excel data fi
327. u appears when you right click in a window or on its title bar The menu options in Table A 18 affect window behavior Table A 18 Window Right Click Menu Commands Option Description Allow Docking Enables or disables docking Close Closes the window Float in Main Window Causes the window to become a normal MDI child window like an editor window and disables its docking ability Scroll Bars and Resize Pull Tab Scroll bars appear along the right and bottom edges of the application or document window as shown in Figure A 17 Scroll bar Scroll box Pull tab Figure A 17 Scrolling the View Area The scroll boxes inside the scroll bars indicate the vertical and horizontal location in the document Use the mouse to scroll to other parts of the document A 38 VisualDSP 5 0 User s Guide Reference Information When the application window is not maximized the resize pull tab appears in the lower right corner of the window Click and drag the pull tab to resize the application window Windows Docked vs Floating A window attached to the application s frame is referred to as a docked window You can detach a window from the main window and move it to another location anywhere on the desktop A floating window stands alone because it is not docked Depending on your needs you can e Dock a window to the application s main window frame Float a window A window s right click menu
328. u hold down the Ctrl key and pause the mouse over a pipeline viewer event icon indicating instructions the Pipeline Viewer window displays informational messages An example is shown in Figure D 4 on page D 20 These types of messages may appear e Stalls detected Kills detected Multicycle instruction messages Pipeline Viewer Detail View Stall Event Messages Table D 7 shows the messages that occur when a stall is detected Table D 7 Stalls Detected Messages ADSP BF535 Processor Message Explanation Example ICache miss Instruction cache miss IAU empty Instruction alignment unit empty DCache miss Data cache miss DCache store buffer Data cache buffer overflow The processor stalls full until the FIFO moves forward and a space is free D 12 VisualDSP 5 0 User s Guide Simulation of Blackfin Processors Table D 7 Stalls Detected Messages ADSP BF535 Processor Contd Message Explanation Example DCache load while A load access collides with a pending store access store pending in the store buffer They are tying to access the same address DCache load while Load access size is different from that of the store store pending w size access The buffer must be flushed before the mismatch load can be carried out DCache bank collision The addresses in a dual memory access com mand are accessing the same minibank It does not matter whether both are loads o
329. ualDSP From the VisualDSP environment Access VisualDSP online Help from the Help menu s Contents Search and Index commands e Open online Help from context sensitive user interface items tool bar buttons menu commands and windows Accessing Documentation From Windows In addition to any shortcuts you may have constructed there are many ways to open VisualDSP online Help or the supplementary documenta tion from Windows Help system files CHM are located in the VisualDSP software installa tion s Help folder and PDF files are located in the Docs folder of your VisualDSP installation CD ROM The Docs folder also contains the Dinkum Abridged C library and the FlexLM network license manager software documentation Using Windows Explorer e Double click the vdsp help chm file which is the master Help sys tem to access all the other CHM files Double click any file that is part of the VisualDSP documenta tion set xxxii VisualDSP 5 0 User s Guide Preface Using the Windows Start Button Access VisualDSP online Help by clicking the Start button and choosing Programs Analog Devices VisualDSP and VisualDSP Documentation Accessing Documentation From the Web Download manuals at the following Web site http www analog com processors manuals Select a processor family and book title Download archive Z1P files one for each manual Use any archive management software such
330. ualDSP 5 0 User s Guide C 7 ADSP TS101 Processors Current Program Counter Value The program counter value marked by gt in the Disassembly window is the address of the instruction at pipeline stage E1 When a breakpoint is set at a certain address the simulator halts after the instruction as this address is executed at stage E1 You can specify which instruction the simulator executes next by manually changing the program counter PC value in the PC Register window Note however that the current instruction indicated by amp in the Disas sembly window is executed prior to the user specified instruction When you change a PC value the simulator flushes the pipeline and aborts all its instructions After the pipeline is flushed normal execution resumes from a memory address indicated by the new PC value The simulator contin ues to run until an instruction at the new PC reaches stage E1 of the pipeline M Manually changing the PC value during simulation can result in unpredictable program behavior VisualDSP does not safeguard against invalid PC values Ensure that the specified PC indicates a valid instruction within program address space An example of an invalid PC is a data memory address whose con tents is not recognized as an instruction by the simulator In this case the simulator generates an unhandled software exception Another example of an erroneous PC is the middle of an instruc tion line Only part of t
331. uals and data sheets http www analog com processors resources technicalLibrary Online Technical Documentation Online documentation comprises the VisualDSP Help system software tools manuals hardware tools manuals processor manuals the Dinkum Abridged C library and Flexible License Manager FlexLM network license manager software documentation You can easily search across the entire VisualDSP documentation set for any topic of interest For easy printing supplementary PDF files of most manuals are also provided Each documentation file type is described as follows File Description CHM Help system files and manuals in Help format HTM Dinkum Abridged C library and FlexLM network license manager software doc or umentation Viewing and printing the HTML files requires a browser such as HTML Internet Explorer 6 0 or higher PDF VisualDSP and processor manuals in Portable Documentation Format PDF Viewing and printing the PDF files requires a PDF reader such as Adobe Acrobat Reader 4 0 or higher If documentation is not installed on your system as part of the software installation you can add it from the VisualDSP CD ROM at any time by running the Tools installation Access the online documentation from the VisualDSP environment Windows Explorer or the Analog Devices Web site VisualDSP 5 0 User s Guide xxxi Product Information Accessing Documentation From Vis
332. uide Introduction to VisualDSP By following these steps you can build projects consistently and accu rately with minimal project management This process reduces development time and lets you concentrate on code development These steps described below are covered in detail in VisualDSP Help and in the Basic Tutorial chapter of the VisualDSP Getting Started Guide Step 1 Create a Project All development in VisualDSP occurs within a project The project dpj file stores your program s build information source files list and development tools option settings VisualDSP includes a Project wizard that simplifies the creation of a new project Refer to the VisualDSP Getting Started Guide for a tutorial or to VisualDSP Help Step 2 Configure Project Options Define the target processor and set up your project options or accept default settings before adding files to the project The Project Options dialog box also called property pages provides access to project options which enable the corresponding build tools to process the project s files correctly Step 3 Add and Edit Project Source Files A project normally contains one or more C C or assembly language source files After creating a project and defining its target processor add new or existing files to the project by importing or writing them Use the VisualDSP editor to create new files or edit any existing text files VisualDSP 5 0 Us
333. unction instructions Step Into editor window or Disassembly window Single steps through the program one C C or assembly instruction at a time Encountered functions are entered Step Out Of C C code only in an editor window Performs multiple steps until the cur rent function returns to its caller and stops at the instruction immediately fol lowing the call to the function Restarting the Program You can set the Program Counter PC to the first address of the interrupt vector table Performing a Restart During Simulation In the simulator restart works like a reset however the target s memory does not change All registers are reset to their initial values Memory is not reset Thus C and assembly global variables are not reset to their original values Your program may behave differently after a restart To re initialize these values reload your DXE file 3 12 VisualDSP 5 0 User s Guide Debugging Performing a Restart During Emulation In the emulator a restart works exactly like a reset Only registers with default reset values are affected All other registers remain unchanged Breakpoints An enabled breakpoint halts program execution at a specific instruction or address You can enable and disable breakpoints as well as add and delete breakpoints A disabled breakpoint is set up but not turned on A disabled breakpoint does not stop program execution It is dormant and may be
334. ure 2 40 Profiling Results Before Filtering The profiling results after filtering Table 2 41 reflect the difference 2 62 VisualDSP 5 0 User s Guide Environment x H Execution Unit C TestLab Generic test _ zx 33 58 f0000022 00000b8 1 fy 1 87 bar int 2 include lt stdlib h gt ELI 5 604 foo int 3 73X 3 int foo int i 4d E 1 87 5 return i z 6 S 7 0 75 8 void bar int i 2 E 0 75 10 i ti Total Samples 268 Elapsed Time 00 00 00 Enabled Figure 2 41 Profiling Results After Filtering Call Stack Window The Call Stack window enables you to double click on a stack location to move the call stack back to a previous debug context Open this window by choosing View Debug Windows and Call Stack The Call Stack window cannot be guaranteed to provide correct information when code does not adhere to compiler standards Two such instances are when main is not used or when lib prog term or exit is not used The unrolling of the stack depends on the existence of these points if they do not exist the stack may unroll beyond the valid frames Use the Call Stack window to analyze the state of parent functions when erroneous data is being passed to the currently executing function and to see the context from which the current function is being called Double clicking on an item in the Call Stack window opens an editor window if the sou
335. ure A 26 Index Entries on the Index Page e A topic name on the Search page The bottom portion of the Search page displays the located topics hits that include your search string Searching Help VisualDSP Help provides full text and advanced search capabilities for finding information Full Text Searches A full text search locates every occurrence of a text string within the Help system Specify a particular word or phrase to find only the topics that contain that word or phrase You can search previous results match similar words and search through the topic titles only A basic search consists of the word or phrase that you want to locate Use similar word matches a previous results list or topic titles to further define your search You can run an advanced search which uses Boolean operators and wild card expressions to further narrow the search criteria Figure A 27 shows an example of a Boolean search for new AND plot A 60 VisualDSP 5 0 User s Guide Contents Index Search Favorites Type in the word s to search for new AND plot i List Topics Display Select topic Found 7 R 1 Specifying Data VisualD Plot Window Fe VisualD Configuring a Plot VisualD Plot Window Pre VisualD Viewing a Plot VisualD New Features in VisualD 2 3 4 5 5 Reference Information Specifying Data Processing for a Data Set For each data set in a MI you
336. urred are seen by the store buffer see Store Buffer Overflow on page D 39 If Addr1 13 12 Addr2 13 12 a collision occurs Both Banks Are Configured as Cache If both banks are cacheable you must determine which superbank the accesses are cached to in addition to the minibank to determine whether a stall exists This information depends on the value of the DC85 bit of the DMEM CONTROL memory mapped register If DCBS is 1 address bit 23 is used as bank select If DCBS is 0 address bit 14 is used as bank select Note that these values are used for the 16 KB implementation of Blackfin processor data memory Refer to Cache Access 1 Cycle Stall on page D 36 for details about how to determine the minibank The follow ing table assumes that DCBS is 0 VisualDSP 5 0 User s Guide D 37 Multicycle Instructions and Latencies Table D 26 Superbank Minibank Selected When DCBS is 0 Addr 14 12 Superbank Minibank Selected 000 superbank A minibank 1 0x0000 0x1000 001 superbank A minibank 2 0x1000 0x2000 010 superbank A minibank 3 0x2000 0x3000 011 superbank A minibank 4 0x3000 0x4000 100 superbank B minibank 1 0x0000 0x1000 101 superbank B minibank 2 0x1000 0x2000 110 superbank B minibank 3 0x2000 0x3000 111 superbank B minibank 4 0x3000 0x4000 If the addresses in a dual memory access multi issue instruction is cached to the same superbank
337. use Mispredict Interrupt hetel t Detais Branch Ki r K CALL memdm 148 Ox P1 H Ox W K K 149 P1 Pl L Ox P1 H 0x M 150 RS RS Pi PLL Ox P1H ox W zl Figure D 6 Branch Kill In this example an unconditional control transfer kills several stages that were behind it Fetching begins at the destination of the control transfer instruction after the killed stages VisualDSP 5 0 User s Guide D 21 Multicycle Instructions and Latencies Multicycle Instructions and Latencies This section contains a description of all Blackfin processor multicycle instructions and latencies Multicycle behavior exists when an instruction sometimes only under cer tain circumstances is completed in more than one cycle This cycle loss cannot be avoided without removing the instruction that caused it A latency condition exists when a pair of instructions incur extra cycles between them because of their proximity to each other in the code Avoid a latency condition s cycle loss by separating the two instructions by as many instructions as the cycles lost Each multicycle and latency entry indicates whether it is currently supported in the simulation environment All multicycle and latency conditions described here are native to the first implementation of the Blackfin processor architecture Future implemen tations may be different The tables in this section show the cycle latencies of the 10x core pr
338. used later A break occurs when the conditions that you specify are met You can quickly place an unconditional breakpoint at an address in a Disassembly window or editor window by Selecting an address and clicking Toggle Breakpoint button w e Double clicking a line in a Disassembly window or editor window Symbols in the left margin of a Disassembly window or editor window indicate breakpoint status as shown in Table 3 3 Table 3 3 Breakpoint Status Symbols Symbol Indicates Enabled set software breakpoint Disabled software breakpoint recognized but cleared VisualDSP 5 0 User s Guide 3 13 Program Execution Operations Table 3 3 Breakpoint Status Symbols Symbol Indicates Enabled hardware breakpoint o Disabled hardware breakpoint el Unconditional and Conditional Breakpoints A breakpoint configured to occur when the Program Counter reaches a specific address is an unconditional breakpoint The breakpoint occurs when it is reached A breakpoint configured to occur when various conditions criteria are met is called a conditional breakpoint The conditions may include e A user defined expression that must evaluate to TRUE e A skip count that specifies the number of times to skip over the breakpoint before finally halting If both an expression and skip are set execution stops when the break point is reached n times when the expression is t
339. user defined You can select the number format used by the window global format You can override the global format and specify each expression s format per expression basis Changing the window s global format overrides any per expression for matting for example if the global format is set to Hexadecimal and you set the format of a single expression to Integer changing the global format to Float will change the format of every expression to Float Because of the way registers are saved and restored on the stack the register value on which the expression relies may be incorrect if you change VisualDSP s context from the Call Stack window 2 50 VisualDSP 5 0 User s Guide Environment Hexadecimal Unsigned Integer Float Expressions Hexadecimal O OOOO OA Address index 0x00000004 Ox0002fffa 0x00000001 primes 4 11 0x00028004 int 0x00000001 pi 3 14159 Ox0002fffd float 0x00000001 EH primes 0x00028000 int 0x00000014 Hexadecimal Figure 2 31 Expressions Window Expressions Permitted in an Expression Window Figure 2 13 lists and describes the types of expressions that may be entered in an Expressions window Table 2 13 Types of Expressions Permitted in an Expressions Window Expression Description Memory address Precede memory identifiers with a sign for example dm 0xF0000000 Register expression Precede register names with a sign for example r0 r1 ipe
340. ust be initialized with a call to the btc init function during the application s start up code After initialization BTC commands from the host are processed via the low priority emulator interrupt EMULI A vector to the interrupt service routine must first be installed In assembly language the vector can be installed with a jump to a btc isr instruction placed at the EMULI vector location JUMP _btc_isr After the interrupt vector is installed the interrupt itself must be enabled with the following code setup imask ustatl imask BIT SET ustatl EMULI imask ustatl 2 74 VisualDSP 5 0 User s Guide Environment enable interrupts ustatl model BIT SET ustatl IRPTEN model ustatl In C C the vector can be installed with the interrupt function as follows interrupt SIG EMUL btc_isr In C C the interrupt function enables the interrupt for you After adding code to initialize BTC and enable the BTC interrupt you must link with the BTC library 1ibbtc26x d1b for assembly applications or libcbtc26x d1b for C C applications This library contains the ini tialization function interrupt service routine and other functions that permit data transfer over the BTC BTC Priority On ADSP 2126x and ADSP BFBF36x SHARC processors BTC data transfer is handled through the low priority emulator interrupt EMULI Since the priority of this interrupt is fixed the priority of BTC is also fixed
341. ution from internal ROM for ADSP 2126x and ADSP 2136x processors B 10 VisualDSP 5 0 User s Guide Simulation of SHARC Processors When this mode is selected check mark appears beside the NoBoot Mode command in the Simulation submenu Also a message displays reminding you to load a program or choose Debug Reset to complete the mode change Changing to NoBoot mode is not persistent Each time you bring up the simulator and or change sessions the mode reverts back to its default state which is Boot Mode The processor has a boot mode and a NoBoot mode In boot mode the 1 IVT bit is ignored and the interrupt vector table IVT and starting PC are in internal memory In NoBoot mode the 11VT bit is significant and the initial location of the IVT and PC are in external memory pre ADSP 2126x processors and in internal ROM ADSP 2126x processors and later Before VisualDSP 4 0 all of the SHARC ADSP 21x6x simulators supported Boot mode only regardless whether an 1df file was being booted because most users develop code whose final form is booted into the processor Load Sim Loader Options Depending on the target processor the Load Sim Loader submenu provides these boot options e Boot from Host 32 bit Host 16 bit Host or 8 bit Host Boot from PROM e Boot from Link ADSP 21060 ADSP 21062 and ADSP 2116x processors only VisualDSP 5 0 User s Guide B 11 Load Sim Loade
342. ve text Select with cursor and drag Move selected text right one tab Tab Move selected text left one tab Shift Tab Paste text Ctrl V or Shift Insert Undo the last edit Ctrl Z or Alt Backspace Redo an edit command Shift Ctrl Z Replace text Ctrl H or Ctrl R VisualDSP 5 0 User s Guide A 33 Keyboard Shortcuts Selecting Text Within a File To select text within a file use the keyboard shortcuts listed in Table A 11 Table A 11 Keyboard Shortcuts for Selecting Text Within a File Action Key s Select all text in a file Ctrl A Select the character on the left Shift Left Arrow lt Select the character on the right Shift Right Arrow 2 Select all text to the beginning of the file Shift Ctrl Home Select all text to the end of the file Shift Ctrl End Select all text to the beginning of the line Shiftt Home Select all text to the end of the line Shift End Select all text to the line below Shift Down Arrow 4 Select all text to the line above Shift Up Arrow t Select all text to the next page Shift PgDn Select all text to the above page Shift PgUp Select the word on the left Shift Ctrl Left Arrow lt Select the word on the right Shift Ctrl Right Arrow gt Select by column Place cursor press and hold down Alt and drag the cursor selects by column character instead of
343. w files are represented by the icons in Table 2 2 Table 2 2 File Icons in the Project Window Icon Description Files that use project options Files that use options that differ from project options Files excluded from the current configuration Hu Enabled active makefile The files appear in an expandable and collapsible node tree Source files are the C C language or assembly language files in your project Source files provide the project with code and data You can add delete and modify source files Each project must include one 1df file which contains command input for the linker If an 1df file is not included in the project the project is built with a default 1df file A project can also include data files and header files 2 8 VisualDSP 5 0 User s Guide Environment Project Window Icons for Source Code Control SCC Icons in the Project window indicate source code control SCC status An icon with a green check mark w indicate that the file is under SCC and is checked in An icon with a red check mark Ww indicate that the file is under SCC and is checked out Files that are not connected to a controlled copy under SCC do not display a check mark Table 2 3 shows examples of file icons used to indicate SCC status Table 2 3 SCC Status Icons Icon Description File is under SCC and is checked in File is under SCC and is checked out P
344. w supports script command auto completion which you can enable on the General page of the Preferences dialog box accessible via the Settings menu The VisualDSP installation directory includes example scripts in the Scripting Examples folder located under the processor family name for example 21k and the Examples folder 2 42 VisualDSP 5 0 User s Guide Environment Debugging Windows VisualDSP provides debugging windows to display program operation and results Table 2 10 describes these windows Table 2 10 Debugging Windows Window Provides Output on page 2 28 A Console page that displays standard I O text messages such as file load status and error messages and streams and a Build page that displays build messages You can interactively enter script commands and view script output Editor on page 2 16 Syntax coloring context sensitive expression evaluation and status icons that indicate breakpoints bookmarks and the current PC position Disassembly on page 2 45 Code in disassembled format This window provides fill and dump capa bility Expressions on page 2 50 The means to enter an expression and see its value as you step through program execution Trace on page 2 52 A history of processor activity during program execution including buffer depth instruction lines cycle count and instructions executed such as memory fetches program memory writes
345. which a target communicates For simulation a platform is typically one or more processors of the same type For emulation you specify the platform with the VisualDSP config urator and the platform can be any combination of devices The platform represents the hardware upon which one or more devices reside You typically define a platform for a particular tar get For example if three emulators are installed on your system a platform selection might be emulator two Several platforms may exist for a given debug target For a simula tor the platform defaults to the identical processor simulator When the debug target is a JTAG emulator the platforms are the individual JTAG chains When the debug target is an EZ KIT Lite board the platform is the board in the system on which you wish to focus pre emptive kernel A priority based kernel in which the currently running thread of the highest priority is pre empted or suspended to give system resources to the new highest priority thread A 78 VisualDSP 5 0 User s Guide Reference Information processor DSP An individual chip contained on a specific platform within a target system When you create the executable file the processor is specified in the Linker Description File 1af file and other source files profile guided optimization PGO A process that involves setting up and executing data sets to pro duce an optimized application A data set is the associ
346. window 2 2 about 2 2 files 2 2 folders 2 6 Kernel tab 1 22 2 4 makefiles 1 51 nodes 2 3 2 6 Project view 2 3 right click menu 2 10 rules 2 13 source code control icons 2 9 Project Wizard about 1 44 Project wizard 1 23 A 81 PROM files 1 41 1 42 promoting error messages 2 35 VisualDSP 5 0 User s Guide property pages 1 23 definition 1 12 pull tabs A 38 R ranking 3 31 register expressions 2 52 register groups Blackfin processors D 42 register windows about 2 78 custom 2 81 regression tests 1 14 regular expressions A 44 reference texts A 47 special characters A 45 Release configuration 1 56 remarks 2 31 replace operations tagged expressions A 47 replacing tagged expressions A 47 restarting programs 3 12 running programs 1 26 3 12 running to cursor 3 12 S SCC See source code control SCC scripting about 2 40 specifying the language 2 42 INDEX scripts auto completion 2 42 examples 2 42 issuing 2 30 loading 2 42 loading from a shortcut A 11 loading from Output window 2 39 running A 7 viewing script command status A 9 scroll bars using A 38 searches normal A 44 regular expressions vs normal A 44 special character rules A 46 searching Help A 60 Select Processor ID submenu options B 10 semaphores defined A 82 sequences special characters A 46 sessions configuring 3 5 sessions See debug sessions Session Wizard 3
347. window choose Register Custom and Manage Then configure and add the registers that you want to display The Custom Registers window appears immediately after it is created Each Custom Registers window displays a customizable title and the registers that you choose to monitor The Custom Registers window shown in Figure 2 55 displays the contents of five registers Custom Registers RO 0000204200 R4 0000204200 R3 0000000000 R5 0000000000 USTAT1 00000000 Figure 2 55 Example A Customized Registers Window VisualDSP 5 0 User s Guide 2 81 Debugging Windows Custom Board Support VisualDSP 5 0 allows you to Maintain custom board support files New versions upgrades of VisualDSP or software updates will not overwrite these files Associate a custom board support file with a particular debug ses sion There is no need to rename files as there was with previous versions of VisualDSP This feature is available only when using Emulator and EZ KIT debug sessions As of VisualDSP 5 0 you no longer need to edit the xm1 files supplied by Analog Devices in the install path VSystemVArchDef directory Instead you can construct custom board support files that modify base specifications and add new content Custom Board Support Files Custom board support files are XML files created by end users A custom board support file may contain definitions for custom registers register resets a
348. ws a typical Image Viewer window The status bar indi cates the DSP address RGB values and pixel coordinates Tools Image Viewer Address x10C475 RGB 0xB 0x17 0x23 col 200 row 139 gt Zoom status Status bar Figure 2 81 Image Viewer Window VisualDSP 5 0 User s Guide 2 119 Debugging Windows You select the image source from processor memory or a file on your PC and specify image attributes If the image is located in processor memory you must specify the image s address size and format The Image Viewer supports the following pixel formats Grayscale 8 Grayscale 12 Grayscale 16 RGB555 RGB565 RGB24 and RGB32 To open the Image Viewer window choose View Debug Windows and Image Viewer Refer to Help for information about format types packed data and detailed how to information Automation Interface The Image Viewer has an automation interface that permits COM aware languages to access Image Viewer functions such as loading retrieving displaying and saving data Toolbar The top of the window provides these tools Table 2 29 Image Viewer Window Toolbar Buttons Button Purpose Configure Opens the Image Configuration dialog box Refresh Reads processor memory and updates the image display t3 Zoom In Zooms in by a factor of two R 2 120 VisualDSP 5 0 User s Guide Environment Table 2 29 Image Viewer Window Toolbar Buttons Co
349. yAnalog com is a free feature of the Analog Devices Web site that allows customization of a Web page to display only the latest information on products you are interested in You can also choose to receive e mail notifications containing updates to the Web pages that meet your inter ests including documentation errata against all manuals MyAnalog com provides access to books application notes data sheets code examples and more xxviii VisualDSP 5 0 User s Guide Preface Registration Visit www myanalog com to sign up Click Register to use MyAnalog com Registration takes about five minutes and serves as a means to select the information you want to receive If you are already a registered user just log on Your user name is your e mail address Processor Product Information For information on embedded processors and DSPs visit our Web site at www analog com processors which provides access to technical publica tions data sheets application notes product overviews and product announcements You may also obtain additional information about Analog Devices and its products in any of the following ways E mail questions or requests for information to processor supportGanalog com World wide support processor europe analog com Europe support processor china analog com China support Fax questions or requests for information to 1 781 461 3010 North America 49 89 76903 157 Europe Access the FTP Web
350. you must run the archiver from a command line For details refer to the VisualDSP Linker and Utilities Manual Splitter The splitter e1fsp121k exe processes executable files to prepare non bootable programmable read only memory PROM image files These files are executed from the processor s external memory The splitter s primary output is a PROM file with these extensions e ss fh h d and stk SHARC processors e 1dr Blackfin and TigerSHARC processors For TigerSHARC processors output from the splitter is 32 bit For SHARC processors output from the splitter is 32 bit 40 bit 48 bit or 64 bit To specify splitter options choose Project Project Options and in the tree control click the Split page or the Splitter subpage Splitter terms are defined as follows VisualDSP 5 0 User s Guide 1 41 Code Development Tools non bootable PROM image files The splitter s output which consists of PROM files that cannot be used to boot load a system splitter The splitter application such as e1fsp121k exe contained in the software release For more information about the splitter and options used to generate loader files refer to the VisualDSP Loader and Utilities Manual or VisualDSP Help Loader The loader e1f10oader exe generates boot loadable files by processing executable files in addition to a loader kernel The loader output 1dr file enables the processor to boot from an external device
351. ysreg A register move of a system register to an accu A0 w LCO to areg gt areg to dreg mulator register followed by another register RO A0 RAW move of that same accumulator register to a dreg Regmv hazard sysreg A register move of a system register to an accu A0 w LCO to areg gt areg to sysreg mulator register followed by another register ASTAT A0 w RAW move of that same accumulator register to a sys tem register Regmv hazard sysreg A register move of a system register to an accu A0 w LCO to areg gt load to areg mulator register followed by a load to the same A0 w 10 WAW accumulator register Regmv hazard sysreg A register move of a system register to an accu A0 w LCO to areg gt exu op using mulator register followed by any execution unit A0 A0 S areg RAW operation using that accumulator register as an operand VisualDSP 5 0 User s Guide D 15 Simulator Instruction Timing Analysis for ADSP BF535 Processors Table D 7 Stalls Detected Messages ADSP BF535 Processor Contd Message Explanation Example AQreg hazard move to AQ exu op using AQ RAW CCreg hazard move to CC exu op using CC RAW Kills Detected Messages Table D 8 shows the messages that occur when a kill is detected Table D 8 Kills Detected Messages ADSP BF535 Processor Message Explanation Example change of flow kill A branch

Download Pdf Manuals

image

Related Search

ANALOG DEVICES VisualDSP 5.0 Users Guide (Revision 3.0 August 2007)

Related Contents

          ANALOG DEVICES AD9430 English products handbook        National Semiconductor LMH6672 Dual High Output Current High Speed Op Amp handbook  

Copyright © All rights reserved.
DMCA: DMCA_mwitty#outlook.com.