Home
DSP56307EVM User's Manual
Contents
1. 3 5 a Y L p 6 1945 sio dsq 8661 62 Udy 50 20295450 199 216 i tussa i 00 8 1 1 eni 01 6 0 5 2105 oIpnv 0976 0 poc ob a aos 00 0 I 9 oP ee 1018 1 1 004 43 e 0108 1 30 0W 092 168 219 Xv3 6169 168 218 00 93 gt Mos 9698 56 87 XL unsny m 139 uouue 1099 00772 0 T On t UOISIAIG 19 00 2 0 0 00 8v 0 0 B 54 san LAW oissa 325195 oues ES Qe cn re ES uinea 9NA 4 23009 0 9 21 H p gt 2098 Tp 1005 93 100087030007 8 Lp e oas v NIS 3000 9 s 0015 0 55 13839702000 4 4 0008 7 3108 030007 p 0305 sr veo 158 OL Wee 61H sn o 5 5 5 APER AES 2 860 E a z 1 e MUN NO on zzz 232 1no Z2 NHd ONIH d lt 2 5 te 11005 10008 09000 5 5 3198 4e 6 193 93905 ONASS Hee S 03000 Nad
2. 2 4 C 1 Example of Comment C 1 C 2 Example of Unreported Comment C 2 C 3 Example of Line Continuation C 2 C 4 Example of Macro C 3 C 5 Example of Use of Return Value C 3 C 6 Example of Return Hex Value Symbol Character C 4 C 7 Example of Local Label Override Character C 4 C 8 Example of a Macro String Delimiter Character C 5 C 9 Example of a Quoted String DEFINE Expression C 6 C 10 Example of a Function Delimiter C 6 C 11 Example of a Location Counter Substitution C 6 C 12 Example of a String Concatenation C 6 C 13 Example of a Substring C 7 C 14 Example of an I O Short Addressing Mode Force Operator C 7 C 15 Example of a Short Addressing Mode Force Operator C 8 C 16 Example of a Long Addressing Mode Force Operator C 8 C 17 Example of Immediate Addressing Mode C 9 C 18 Example of Immediate Short Addressing Mode Force Operator C 9 C 19 Example of an Immediate Long Addressing Mode Operator
3. C 61 C 4 5 Effects on the Programmer s Environment C 61 Motorola Table of Contents V vi DSP56307EVM User s Manual Motorola List of Tables 2 1 Assembler ioco etico p 2 6 2 2 Linker phe Se eat 2 13 3 1 Jil Jumper Options ples He Ie caper se 3 2 3 2 CS4218 Sampling Frequency Selection 3 7 3 3 JP5 Jumper Block Options 3 9 3 4 JP4 Jumper Block Options 3 9 3 5 On Board JTAG Enable Disable Option 3 11 3 6 Debug RS 232 Connector P2 Pinout 3 11 3 7 JTAG OnCE 16 Connector 3 12 3 8 SGI Header 3 13 3 9 DT Jumper Options ee cp Nayak ore Gt ke 3 13 3 10 DSP Serial Port P1 Connector Pinout 3 13 3 11 ESol0 Headert J5 Pinout xs 1c eher bang hes oe bs Janet 3 14 3 12 ESolO Headet JA ER ee OS Go dink ei 3 14 3 13 HIOS Header J3 3 15 3 14 Expansion Bus Control Signal Header J2 Pinout 3 15 3 15 Boot Mode Selection 3 16 B 1 DSP56307EVM Parts List ool iyo da Ure B 1 Motorola List of Tables vii
4. C 3 2 5 Return Hex Value of Symbol Character C 4 C 2 6 Macro Local Label 1 C 4 C 2 7 Macro String Delimiter or Quoted String DEFINE Expansion Character C 5 C 2 7 1 Macro Stin MD C 5 Bo Quoted String DEFINE Expansion C 5 C 2 8 Function C 6 C 2 9 Location Counter Substitution C 6 2 10 String Concatenation C 6 C 2 11 Substring Delimiter lt string gt lt offset gt lt length gt C 7 2 12 lt lt Short Addressing Mode Force Operator C 7 2 13 lt Short Addressing Mode Force C 7 2 14 gt Long Addressing Mode Force C 8 C 2 15 Imaediate Addressing Mode 9 C 2 16 fs Immediate Short Addressing Mode Force C 9 C 2 17 Immediate Long Addressing Mode Force Operator C 9 C 3 Assembler Direc yes ecce expen OS e ed abd pes C 10 C 3 1 BADDR Set Buffer Address C 10 C 3 2 BSB Block Storage Bit Reverse C 11 C 3 3 BSC Block Storage of
5. FFFFFF FFFFFF FFFFFF pesani Figure 2 2 Example Debugger Window Display When the command window 15 selected as in Figure 2 2 the tool bar at the top of the screen will change and show buttons for the commands used most often in the command window From left to right the commands are go stop step jump automatic update reset and radix e Go runs the DSP56307 from the program counter Stop stops the DSP56307 Step executes a single instruction e Jump is similar to the step except that subroutines are treated as one instruction Automatic update turns the automatic screen update mode on so that the DSP56307 is periodically interrupted to update the data and registers windows Reset resets the DSP56307 Radix can be used to change the radix of the selected window Other buttons appear when other windows are selected and they function as described in the Debug 56K Manual 2 18 DSP56307EVM User s Manual Motorola Running the Program 2 6 Running the Program To load the example program into the Debugger click in the command window and type load example The instruction at line 33 is highlighted in unassembly window because this is the first instruction to be executed However before executing the program verify that the values expected in data memory are there To do this type display x 0 and display y 0 The data is displayed in the da
6. 2102 b sn nr Mt yh n 3113533 VAS O n e1 0 S L06926 9N anol oo anvo any qup Jne o sS 60 99 gt NIA 2 t 2 5 ven 310001 100793 10073 19 4 4 M I Jh va A avag 44 z Loora 10004 E angeo S f 2a 2v t L06926 0N L ans L neeo 29 89 9 oo 55 At e O n 3 5 a Y A 7 DSP56307EVM User s Manual MOTOROLA 1 ssed g Z Y 2 4 3 a Y NP L 194 1001 4 euDiseq 8661 62 Aepseupem JOqunN eas sjojyoede2 ssed g ani 092 168 215 xv3 159 168 215 oc ann ios VTOHOLON Isam uouue 1089 UOISIAIG 299 1259 5 8 7 lt lt 3014070 3010 0 3010 0 3nro a 5 VE E 899 190 999 799 290 199 E anoo e i HIC A
7. 3 6 4 Host Port 108 Connection to the DSP s 108 port can be made at 13 Refer to Table 3 13 for the header s pinout 3 14 DSP56307EVM User s Manual Motorola Table 3 13 108 Header 43 Pinout Off Board Interfaces Pin Number DSP Signal Name Pin Number DSP Signal Name 1 2 3 H2 4 H3 5 H4 6 GND 7 H5 8 H6 9 H7 10 RESET 11 12 13 14 HCS 15 HREQ 16 HDS 17 43 3 V 18 HACK 19 HRW 20 GND 3 6 5 Expansion Bus Control Connection to the DSP s expansion BUS control signals can be made at J2 Refer to Table 3 14 for header s pinout Table 3 14 Expansion Bus Control Signal Header J2 Pinout Pin Number DSP Signal Name Pin Number DSP Signal Name 1 133 V 2 RD 3 WR 4 BG 5 BB 6 BR 7 TA 8 BCLK 9 BCLK 10 CAS 11 CLKOUT 12 AAI 13 AAO 14 AA2 15 AA3 16 GND Motorola DSP56307EVM Technical Summary 3 15 Mode Selector 3 7 Mode Selector Boot Up mode selection for the DSP56307 is made by jumper selections on header J1 Refer to Table 3 15 for header J1 jumper options Table 3 15 Boot Mode Selection Options J1 ae Boot Mode Selected Number D 1 2 C 3 4 B 5 6 7 8 8 OPEN JUMP JUMP JUMP Jump to program at 5008000 9 OPEN JUMP JUMP OPEN Bootstrap from byte wide memory 10 OPEN JUMP OPEN JUMP Boot
8. C 11 3 4 BSM Block Storage C 12 C 3 5 BUFFER Start Buffer si BA ahs C 12 C 3 6 Comment Object File C 13 C 3 7 COMMENT Start Comment Lines C 14 C 3 8 DG Define Constant sisse vocc DUR re qa be bot dH PER eu C 14 C39 DCB Define Constant C 15 C 3 10 DEFINE Define Substitution C 16 Coal DS Define Storage sse Si Ro Robe eO C 17 3 12 DSM Define Modulo Storage C 17 C 3 13 DSR Define Reverse Carry C 18 C 3 14 DUP Duplicate Sequence of Source C 18 Motorola Table of Contents iii C 3 15 DUPA Duplicate Sequence With Arguments C 19 C 3 16 DUPC Duplicate Sequence With C 20 C 3 17 Duplicate Sequence Im C 21 C348 END End of Source C 22 CoA ENDBUF C 23 C 3 20 ENDIF End of Conditional C 23 3 21 ENDM End of Macro C 23 C322 ENDSEC End Section uoo EORR
9. TW 4 vid aNo J Ho 29 ty 99 tar ano ano ano ano 4 1 998 tJ QNS ta 994 6N Ag e isn ax 59 axy WI rah ovv avy id EYY IN or 1SOH TOULNOD SNE 1X3 9 Sh MOWH 23 l WV SOH 5 2 0r 6 LYH 8 1 ius 9 8 08 amp 3 t IH er 9 B any 6 0 960 019 ano E o uasau lt p 13539 wA 21 re Oise 3nivo 919 10030 nono pn 39 IIR c SOH 800 NI dVHISIOOH Xov x Pm wu uo ma IOS 0 I Pun aaa 5 on m AHOWSW WOU dVHlSl1008 0 30 i ed Sa TN 8 ey SH yy SS SiH
10. 3 14 H st Port 14a cd ib Sor Cette rd hae aote DER EET 3 14 Expansion Bus Control lt 5 Uk Shs Kae aS Te E xS ee Maths 3 15 Mode Selectot oz vut e SR RAE DX DEUS 3 16 Appendix A DSP56307EVM Schematics DSP5630 d atas tea E EA GR Reese Rhee Emm icto T E A 2 External Memory ste os dex S A 3 R3232 Trterface Veo ele hn CB DOR Besant te ba s RS 4 Command Converter uses Er e rre e TR 5 COdec Sues no Rn s ctos A 6 Power Supply uso ERO RM eee ER EN eR i ERE A 7 esie 8 Appendix B DSP56307EVM Parts List Parts OU o By io eni uos qut een B 1 DSP56307EVM User s Manual Motorola Appendix C Motorola Assembler Notes CLE Introduction oce s ert a eoe aid pep Qa es C ac ERS C 1 C 2 Assembler Significant C 1 2 1 Comment Delimiter C 1 C22 Unreported Comment Delimiter Characters C 2 2 3 Line Continuation or Macro Argument Concatenation Character C 2 2 5 1 al hol Nuit dea ea a A C 2 232 Macro Argument C 2 C 2 4 Return Value of Symbol
11. kk Kok Ck CK CK CIS CI I A 2 2 Assembling the Program The following sections describe the format of the assembler command list the assembler special characters and directives and give instructions to assemble the example program 2 2 4 Assembler Command Format The Motorola DSP assembler is included with the DSP56307EVM on the Motorola Tools CD and can be installed by following the instructions in the Read Me file on the CD The Motorola DSP assembler is a program that translates assembly language source statements into object programs compatible with the DSP56307 The general format of the command line to invoke the assembler is asm56300 options lt filenames gt where asm56300 is the name of the Motorola DSP assembler program and lt filenames gt is a list of the assembly language programs to be assembled Motorola Example Test Program 2 5 Assembling the Program 2 2 2 Assembler Options Table 2 1 describes the assembler options To avoid ambiguity the option arguments should immediately follow the option letter with no blanks between them Table 2 1 Assembler Options Option Description Puts the assembler into absolute mode and generates an absolute object file when the B command line option is given By default the assembler produces a relocatable object file that is subsequently processed by the Motorola D
12. AA1656 1 2 2 Connecting the DSP56307EVM to the PC and Power Figure 1 2 shows the interconnection diagram for connecting the PC and the external power supply to the DSP56307EVM board 1 4 DSP56307EVM User s Manual Motorola Installation Procedure Cable PC Compatible Computer is Connect cable to RS 232 port External 9 V Power DSP56307EVM AA1602 Figure 1 2 Connecting the DSP56307EVM Cables Use the following steps to complete cable connections 1 Connect the DB9P end of the RS 232 interface cable to the RS 232 port connection on the PC 2 Connect the DB9S end of the cable to P2 shown in Figure 1 1 on the DSP56307EVM board This provides the connection to allow the PC to control the board function 3 Make sure that the external 7 9 V power supply does not have power supplied to it 4 Connect the 2 1 mm output power plug into P3 shown in Figure 1 1 on the DSP56307EVM board 5 Apply power to the power supply The green Power LED lights up when power is correctly applied Motorola Quick Start Guide 1 5 Installation Procedure 1 6 DSP56307EVM User s Manual Motorola Chapter 2 Example Test Program This section contains an example that illustrates how to develop a very simple program for the DSP56307 This example is for users with little or no experience with the DSP development tools The example demonstrates the form of assembly pr
13. C 23 C 42 ve oe sos acetate d dd ee atus oe du C ML ate ones C 24 C 43 ENDSEC DITCCllVes woes oa thd elect eee e aote M eode arat C 24 C 44 EQU Directive ascii QEON Cen XS OV TN RRA C 25 C 45 EXITM Dineclive sva ER opes sce dat eu C 25 C 46 a ee Sn een es C 26 C 47 FORCE DUITOCUVE ste cse oc utei voe He ci boo d CUM are d C 26 C 48 GLOBAL Direc ves sae oum ina o De tb p Ie RE p USA C 26 C 49 C Hec S Oe ee rte RE C 27 C 50 HIMENIDIFCCUVOSs cu ets Re qu da Od vx qu EC eb C 27 C 51 IDENT Directive wads aaa ea e ost tide ete C 28 C 52 IF Directive P PCT C 29 C 53 INCLUDE DD GU VO p ER acts ger exp opc Ses AIR tt des C 29 C 54 DIS en eate er Ue OR C 30 C 55 Directives Ie e eR pr NE kasha n s C 30 C 56 LONIBNEIWCCUNG exo sca a RS Ded C 31 C 57 ESICODBITUITCODVS s eit a heh iba m Oben Ed dis C 31 C 58 MACLIB DIIGCUVO oo xo c i eo sco Rees y ni d B RID C 32 C 59 MACRO e Yael vg Gee YO qve eas oe ut eee C 33 C 60 IIIB CONG esent aite to ae eo Ras tid ahead eh on C 33 Xii DSP56307EVM User s Manual Motorola C 61 NISCEIDUITOCHVS eae etu aes t t auod eov ase C 33 C 62 NOLIST Dire Ve as oe RU eee Ve LEO En ot t oe en C 34 C 63 OPT Direcfiyes octal Mod casada se ie ee aactor ra bes he C 41 C 64 ORG o
14. GS71024T FSRAM Debug 053384 LED JTAG LM4880 ws MOTOROLA elc P2 Serial E CS4218 IN 5v Power 25v LED J9 AA1657 Figure 3 1 DSP56307EVM Component Layout 3 2 DSP56307EVM User s Manual Motorola DSP56002 SCLK EXTAL Data Control Oscillator CS4128 CLKIN Memory AA1658 Figure 3 2 DSP56307EVM Functional Block Diagram 3 3 1 FSRAM The DSP56307EVM uses one bank of 64K x 24 bit fast static RAM GS71024T 10 labelled U4 for memory expansion The GS71024T 10 uses a single 3 3 V power supply and has an access time of 10 ns The following sections detail the operation of the FSRAM 3 3 1 1 FSRAM Connections The basic connection for the FSRAM is shown in Figure 3 3 DSP56307 0 15 00 023 FSRAM A0 A15 00 1023 m AA1607 Figure 3 3 FSRAM Connections to the DSP56307 Motorola DSP56307EVM Technical Summary 3 3 Memory The data input output pins IO0 IO23 for the FSRAM are connected to the DSP56307 D0 D23 pins The FSRAM write WE and output enable OE lines are connected to the DSP56307 write WR and read RD lines respectively The FSRAM chip enable CE1 is generated by the DSP56307 address attribute 0 0 The FSRAM activity is controll
15. map gt lt origin gt By default the linker generates instructions and data for the output file beginning at absolute location zero for all DSP memory spaces This option allows the programmer to redefine the start address for any memory space and associated location counter lt mem gt is one of the single character memory space identifiers X Y L P The letter can be upper or lower case The optional lt ctr gt is a letter indicating the high H or low L location counters If no counter is specified the default counter is used map is also optional and signifies the desired physical mapping for all relocatable code in the given memory space It can be for internal memory E for external memory R for ROM A for Port A and B for Port B If map is not supplied then no explicit mapping is presumed The origin is a hexadecimal number signifying the new relocation address for the given memory space The O option can be specified as many times as needed on the command line This option has no effect if incremental linking is being done See the I option Example dsp nk 200 myprog Lmylib Initializes the default P memory counter to hex 200 and maps the program space to external memory P pathname When the linker encounters input files it first searches the current directory or the directory given in the library specification for the file If it is not found and the P option is specified the linke
16. HIMEM XR S S7FFF YR S7FFF SET X Y RUN HIGH MEM BOUNDS C 3 30 IDENT Object Code Identification Record lt label gt IDENT lt expressionl gt lt expression2 gt The IDENT directive is used to create an identification record for the object module If lt label gt is specified it is used as the module name If lt label gt is not specified then the filename of the source input file is used as the module name lt expression1 gt is the version number lt expression2 gt is the revision number The two expressions must each evaluate to an integer result The comment field of the IDENT directive is also passed on to the object module Note See also COBJ Motorola Motorola Assembler Notes C 27 Assembler Directives Example C 51 IDENT Directive If the following line was included in the source file FFILTER IDENT 152 FIR FILTER MODULE then the object module identification record includes the module name FFILTER the version number 1 the revision number 2 and the comment field FIR FILTER MODULE C 3 31 IF Conditional Assembly Directive IF expression ELSE the ELSE directive is optional ENDIF Part of a program that is to be conditionally assembled must be bounded by an IF ENDIF directive pair If the optional ELSE directive is not present then the source statements following IF directive and up to the next ENDIF directive is inc
17. Inor CE mo nero TE n o i I on E Ez 169 659 3n89 0 T il OSO9NL 889 gt 10 AE ET HNL 3 5 a Y DSP56307EVM User s Manual MOTOROLA 4 19149AUO2 e1nBij 3 5 IE 30 p 19945 5001 4 eubiseg 8661 62 indy x Joaquin jusunaony 9215 48118AUO2 0 LEIOAN 0922 168 219 xv3 189 168 015 9658 G 8 unsny 159 1099 UOISIAIG 1 55 uadwn 318vN3 1008 E 0996 zT 5 erqeus 0119 ano ano nos 3 1 20H 99 52 ZWIS ES Z 1 or Cri 7HiW8099 81 1 99 S a 5 an n 2 e N ec ZH39 ST 8 eiqeui L RLH 18 iv
18. Statement lt 1 gt THEN stmtlist ELSE stmtlist ENDI If expression is true execute lt stmtlist gt following THEN the keyword THEN is optional if expression is false execute lt stmtlist gt following ELSE if present otherwise advance to the instruction following ENDI Note In the case of nested IF THEN ELSE statements each ELSE refers to the most recent IF THEN sequence Example 85 Statement IF EQ zero bit set ENDI C 56 DSP56307EVM User s Manual Motorola Structured Control Statements C 4 2 5 LOOP Statement LOOP cnt stmtlist ENDL Execute lt stmtlist gt cnt times This is similar to the FOR loop construct except that the initial counter and step value are implied to be 1 It is actually a shorthand method for setting up a hardware DO loop on the DSP without having to worry about addressing modes or label placement Since the LOOP statement generates instructions for a hardware DO loop the same restrictions apply as to the use of certain instructions near the end of the loop nesting restrictions etc One or more CONTINUE directives inside a LOOP construct generate a NOP instruction just before the loop address Example 86 LOOP Statement LOOP LPCNT hardware loop LPCNT times ENDL 4 2 6 REPEAT Statement REPEAT lt stmtlist gt UNTIL e
19. 1 CV L is used to refer to the value and memory space attribute of the load location counter This value and memory space attribute is assigned to the symbol COMPUTE C 3 24 EXITM Exit Macro EXITM The EXITM directive will cause immediate termination of a macro expansion It is useful when used with the conditional assembly directive IF to terminate macro expansion when error conditions are detected Note label is not allowed with this directive See also DUP DUPA MACRO Example C 45 EXITM Directive CALC MACRO XVAL YVAL lt 0 FAIL Macro parameter value out of range EXITM Exit macro ENDIF ENDM C 3 25 FAIL Programmer Generated Error FAIL lt str gt lt exp gt lt str gt lt exp gt lt str gt lt exp gt The FAIL directive will cause an error message to be output by the assembler The total error count is incremented as with any other error The FAIL directive is normally used in conjunction with conditional assembly directives for exceptional condition checking The assembly proceeds normally after the error has been printed An arbitrary number of strings and expressions in any order but separated by commas with no intervening white space can be specified optionally to describe the nature of the generated error Note A label is not allowed with this directive See also MSG WARN Motorola Motorola Assembler Notes C 25 Assembler Direct
20. MSG lt gt lt gt lt str gt lt exp gt lt str gt lt exp gt The MSG directive causes a message to be output by assembler The error and warning counts are not affected The MSG directive is normally used in conjunction with conditional assembly directives for informational purposes The assembly proceeds normally after the message has been printed An arbitrary number of strings and expressions in any order but separated by commas with no intervening white space can be specified optionally to describe the nature of the message Note A label is not allowed with this directive See also FAIL WARN Example C 61 MSG Directive MSG Generating sine tables Motorola Motorola Assembler Notes C 33 Assembler Directives C 3 44 NOLIST Stop Assembly Listing NOLIST Do not print the listing from this point on including the NOLIST directive Subsequent source lines will not be printed The NOLIST directive actually decrements a counter that is checked for a positive value and is symmetrical with respect to the LIST directive Note the following sequence Counter value currently 1 LIST Counter value 2 LIST Counter value 3 NOLIST Counter value 2 NOLIST Counter value 1 The listing still is not disabled until another NOLIST directive is issued Note A label is not allowed with this directive See also LIST OPT Example C 62 NOLIST Directive LI
21. then the resulting expansion would be as follows MSG This is a LONG STRING MSG This is a short sentence C 2 8 Function Delimiter assembler built in functions start with the symbol Example C 10 Example of a Function Delimiter Character SVAL EQ QSQT FVAL OBTAIN SQUARE ROOT C 2 9 Location Counter Substitution When used as an operand in an expression the asterisk represents the current integer value of the runtime location counter Example C 11 Example of a Location Counter Substitution ORG X 5100 XBASE EQU 520 XBASE 5120 2 10 String Concatenation Operator Any two strings can be concatenated with the string concatenation operator The two strings must each be enclosed by single or double quotes and there must be no intervening blanks between the string concatenation operator and the two strings Example C 12 Example of a String Concatenation Operator DEF ABCDEF C 6 DSP56307EVM User s Manual Motorola Assembler Significant Characters C 2 11 Substring Delimiter lt string gt lt offset gt lt length gt Square brackets delimit a substring operation The lt string gt argument is the source string lt offset gt is the substring starting position within lt string gt lt length gt is the length of the desired substring lt string gt may be any legal string combination including another substring An error is issued if either
22. Checksum C 37 codec 3 7 digital interface 3 8 digital interface connections 3 9 Codec Control Data Chip Select Pin MF4 CCS 3 10 Codec Control Data Clock Pin MF3 CCLK 3 10 Codec Control Data Input Pin MF2 CDIN 3 10 Codec Digital Interface 3 8 Codec Left Channel Output Pin LOUT 3 8 Codec Left Input 2 Pin LIN2 3 8 codec Master Clock Pin CLKIN 3 7 codec modes of serial operation 3 10 Codec Reset Pin RESET 3 10 Codec Right Channel Output Pin ROUT 3 8 Codec Right Input 2 Pin RIN2 3 8 Codec Serial Port Clock Pin SCLK 3 10 Codec Serial Port Data In Pin SDIN 3 10 Codec Serial Port Data Out Pin SDOUT 3 10 Codec Serial Sync Signal Pin SSYNC 3 10 command converter 3 1 3 10 command format assembler 2 5 Motorola Index Index i Comment C 14 delimiter C 1 object file C 13 unreported C 2 comment field 2 3 Conditional assembly C 28 C 37 Constant define C 14 C 15 storage C 11 Crystal Semiconductor CS4215 3 7 54218 3 7 Cycle count C 37 D D A converter 3 7 Data Pins D 0 23 3 4 3 6 data transfer fields 2 3 Debugger 2 1 2 17 running the 2 19 Debugger software 2 17 Debugger window display 2 18 development process flow 2 1 Directive C 10 BREAK C 54 CONTINUE C 55 FOR C 55 C 56 LOOP C 57 REPEAT C 57 WHILE C 57 BADDR C 10 BSB C 11 BSC C 11 BSM C 12 BUFFER C 12 COBJ C 13 COMMENT C 14 DC C 14 DCB C 15 DEFINE C 5 C 16 C 37 DS C 17 DSM C 17 DSR C 18 DUP C 18 DUPA C
23. If input source file contained the following statements DUPF NUM 0 7 MOVE 0 RNNUM ENDM then the assembled source listing shows DUPF NUM 0 7 MOVE 0 80 0 81 0 82 0 R3 MOVE 0 R4 MOVE 0 R5 MOVE 0 86 0 87 ENDM Note that the lines DUPF NUM 0 7 ENDM are only shown on the source listing if the MD option is enabled The lines MOVE 0 RO MOVE 0 R1 MOVE 0 R2 MOVE 0 R3 MOVE 0 R4 MOVE 0 R5 MOVE 0 R6 MOVE 0 R7 are only shown on the source listing if the MEX option is enabled Note See the OPT directive in this appendix for more information on the MD and MEX options C 3 18 END of Source Program END lt expression gt The optional END directive indicates that the logical end of the source program has been encountered Any statements following the END directive are ignored The optional expression in the operand field can be used to specify the starting execution address of the C 22 DSP56307EVM User s Manual Motorola Assembler Directives program expression may be absolute or relocatable but must have a memory space attribute of Program or None The END directive cannot be used in a macro expansion Note A label is not allowed with this directive Example C 39 END Directive END BEGIN BEGIN is the starting execution address 3 19 ENDBUF End Buffer ENDBUF The ENDBUF directive
24. Index iv DSP56307EVM User s Manual Motorola NOPS C 39 NORC C 39 NORP C 39 NOSCL C 39 NOU C 39 NOUR C 39 NOW C 39 NS C 36 C 39 PP C 35 C 40 PS C 36 C 40 PSM C 36 RC C 35 C 40 reporting C 35 RP C 36 C 40 RSV C 36 S C 35 C 40 SCL C 36 C 40 SCO C 36 C 40 SI C 36 SO C 36 C 40 SVO C 36 symbol C 36 U C 35 C 40 UR C 35 C 40 W C 35 C 40 WEX C 40 XLL C 36 C 40 XR C 36 C 41 P P Space Enable Bit BPEN 3 6 Packing Enable Bit BPAC 3 5 PC 3 10 PC requirements 1 2 PEROM 3 6 stand alone operation 3 6 power supply external 1 2 1 4 program assembling the 2 5 example 2 3 writing the 2 2 Program counter C 6 C 41 programming AARO 3 4 assembly 2 1 development 2 1 example 2 1 Q Quick Start Guide 1 1 R Read Enable Pin RD 3 4 3 6 Reset DSP56002 3 12 Reset DSP56307 3 7 RS 232 cable connection 1 4 RS 232 interface 3 10 RS 232 interface cable 1 2 RS 232 serial interface 3 10 running the Debugger program 2 19 S Sampling frequency 3 7 SCI DSP56002 3 10 Section C 47 end C 24 global C 26 C 38 C 48 local C 30 C 48 nested C 39 static C 38 C 48 Serial Clock Pin SCKO 3 10 Serial Communication Interface Port SCI 3 12 Serial Control Pin 0 00 3 10 Serial Control Pin 0 SC10 3 10 Serial Control Pin 1 SCO1 3 10 Serial Control Pin 1 SC11 3 10 Serial Control Pin 2 SC02 3 10 Serial Control Pin 2 SC12 3 10 serial interface 3 10 Serial Receive Data Pin SRDO 3 10 S
25. and load location counter are the same as the runtime memory space and runtime location counter In this case object code is being assembled to be loaded into the address and memory space where it is when the program is run it is not an overlay If the load memory space and counter are given in the operand field then the assembler always generates code for an overlay Whether the overlay is absolute or relocatable depends upon the current operating mode of the assembler and whether the load counter value is an absolute or relative expression If the assembler is running in absolute mode or if the load counter expression is absolute then the overlay is absolute If the assembler is in relative mode and the load counter expression is relative the overlay is relocatable Runtime relocatable overlay code is addressed relative to the location given in the runtime location counter expression This expression if relative may not refer to another overlay block Note See also MODE Example C 64 ORG Directive ORG 51000 Sets the runtime memory space to P Selects the default runtime counter counter 0 associated with P space to use as the runtime location counter and initializes it to 1000 The load memory space is implied to be P and the load location counter is assumed to be the same as the runtime location counter 42 DSP56307EVM User s Manual Motorola Assembler Directives Example C 64 ORG Directive Continued ORG PHE Se
26. arguments when the macro is expanded called Each dummy argument must obey the same rules as symbol names Dummy argument names that are preceded by an underscore are not allowed Within each of the three dummy argument fields the dummy arguments are separated by commas The dummy argument fields are separated by one or more blanks C 32 DSP56307EVM User s Manual Motorola Assembler Directives Macro definitions may be nested but the nested macro is not defined until the primary macro is expanded Note See also DUP DUPA DUPC DUPF ENDM Example C 59 MACRO Directive SWAP SYM MACRO REG1 REG2 swap REG1 REG2 using as temp MOVE R REG1 X0 MOVE RN REG2 RN REGI MOVE 2 3 39 MODE Change Relocation Mode MODE ABS OLUTE REL ATIVE gt The MODE directive causes the assembler to change to the designated operational mode This directive may be given at any time in the assembly source to alter the set of location counters used for section addressing Code generated while in absolute mode is placed in memory at the location determined during assembly Relocatable code and data are based from the enclosing section start address The MODE directive has no effect when the command line A option is issued Note A label is not allowed with this directive See also ORG Example C 60 MODE Directive MODE ABS Change to absolute mode C 3 40 MSG Programmer Generated Message
27. lt errfil gt must be present as an argument but can be any legal operating system filename including an optional pathname The EA option causes the standard error stream to be written to lt errfil gt if lt errfil gt exists the output stream is appended to the end of the file The EW option also writes the standard error stream to lt errfil gt if lt errfil gt exists it is overwritten Example asm56300 EWerrors prog asm Redirects the standard output to the file errors If the file already exists it is overwritten F lt argfil gt Indicates that the assembler should read command line input from lt argfil gt which can be any legal operation system filename including an optional pathname lt argfil gt is a text file containing further options arguments and filenames to be passed to the assembler The arguments in the file need to be separated only by white space A semicolon on a line following white space makes the rest of the line a comment Example asm56300 Fopts cmd Invokes the assembler and takes the command line options and source filenames from the command file opts cmd 2 6 DSP56307EVM User s Manual Motorola Assembling the Program Table 2 1 Assembler Options Option Description G Sends the source file line number information to the object file This option is valid only in conjunction with the B command line option Debuggers can use the generate
28. ot t P 13838 Hy 13538 03000 IS 77 2 402 yoz yoz anyo S60 pu on 308338 Ten ND ao 150 zzo INE eee Jnzz00 0 Jnzz00 0 129 pe 09s 120 920 nett js SNL ae 3127011 620 4 4 gr 1101 720 pe 0319S Ino dii 025 ureur ASZ Ind 5NIH 5 1108 Hz 9d Ta o a NI dir 2 3 5 NI ONE 900 05 812989 IN in 3 ance 619 M 960 ange 919 oane 9 820 669 3 5 a Y DSP56307EVM User s Manual MOTOROLA A 6 Ajddns 9 NOY jo 9 19945 5001 4 eubiseg 8661 62 Jequin 54 10895 azig Ajddng any LEIOAN 0922 168 219 xv3 189 168 015 8698 9681 XL utsny 159 uouue 1059 UOISIAIG 19911259 5 55 opz 90A 9 3nor 08H ove 10692660 avag 3118834 Age 4 110 9 3104 0515 4 Ir s1
29. the memory register assigned to this symbol contains the value which caused the exit from the loop A compare instruction is produced by the assembler whenever two operands are tested in a structured statement At runtime these assembler generated instructions set the condition codes of the CCR in the case of a loop the condition codes are set repeatedly Any user written code either within or following a structured statement that references CCR directly move or indirectly conditional jump transfer should be attentive to the effect of these instructions Jumps or branches generated by structured control statements are forced long because the number and address of intervening instructions between a control statement and its termination are not known by the assembler The programmer may circumvent this behavior by use of the SCSJMP directive In all structured control statements except those using only a single condition code expression registers are used to set up the required counters and comparandis In some cases these registers are effectively reserved the FOR loop uses two data registers to hold the step and target values respectively and performs no save restore operations on these registers The assembler in fact does no save restore processing in any structured control operation it simply moves the operands into appropriate registers to execute the compare The SCSREG directive may be used to reassign structured control statemen
30. viii DSP56307EVM User s Manual Motorola List of Figures 1 1 DSP56307EVM Component Layout 1 4 1 2 Connecting the DSP56307EVM 1 5 2 1 Development Process 2 2 2 2 Example Debugger Window Display 2 18 3 1 DSP56307EVM Component Layout 3 2 3 2 DSP56307EVM Functional Block Diagram 3 3 3 3 FSRAM Connections to the DSP56307 3 3 3 4 Example Memory Map with the Unified External Memory 3 5 3 5 Address Attribute Register AARO 3 5 3 6 Connections uere pe aet DOR QI inv aed en d edge 3 6 3 7 Codec Analog Input Output Diagram 3 8 3 8 Codec Digital Interface Connections 3 9 3 9 Serial em bero tea OL ERE 3 11 1 2 2 External Memory So qe RU S ene e d A 3 A 3 PRS 252 IntetI366 a asc e te o o bsc RECS Re IR t a yn 4 4 Command Converte oee Sestak oe P aevo ER PUR ue Edo S a A 5 A 5 Audio NC scc rcc A 6 A 6 BOWEL SUP BLY du be ee RETE SC RIO Ere aei e ec pH ES 7 7 Bypass Capacitors eco vea obey e qos rs be CE pide A 8 Motorola List of Figures ix DSP56307EVM User s Manual Motorola List of Examples 2 1 Simple DSP56307EVM Code
31. 11 gta sta vid 6 4a 9d sa ia oa ee gt uM Eg vn lt A 3 DSP56307EVM User s Manual MOTOROLA 22258 V 8 Y jo e 19945 1001 4 euDiseq 8661 6z Ve 2069549 ens eoBuelu 22254 n OVPOLOHPLON OPOLOHPLON 092 168 215 xv3 159 168 215 H X gt x sc ey VTOHOLON i Y 1seM eAug uouueo 1099 1991195415 sseJo 1M OVrOLOHSLON v POLOHP LOW ux gt X t TX 360 aen 86n QVt010HP 0N 1404 1viu3s 140d vidas asa T gt gt 00 13538 zd 4 ven 1919 11 19 T gt un xoo axu blk bbk hbt 9YOZIZXYW 7 Na o N as LEA wee gt gt uasau mo 188 1nosu aiqeua zezsu 125 dsa 1noru inocu 9 9 lt inozu 198 1noiu i z axy 1001 1 0 1 zr 600
32. 37 definition C 32 C 38 directive C 32 end C 23 exit C 25 expansion C 38 library C 31 C 38 purge C 44 Macro argument concatenation operator C 2 local label override operator C 4 return hex value operator C 4 return value operator C 3 MAX212 3 11 Memory limit C 27 C 30 utilization C 38 Memory space C 38 C 41 Mode Selection 3 16 Motorola DSP linker 2 12 N Number of Bits to Compare Bits BCN 3 0 3 6 Object file comment C 13 identification C 27 symbol C 40 C 50 object files 2 1 OnCE commands 3 10 OnCE JTAG conversion 3 10 operand field 2 3 operand fields 2 3 Operating Mode DSP56307 3 6 operation field 2 3 Option AE C 35 C 37 assembler operation C 36 CC C 36 C 37 CEX C 35 C 37 CK C 36 C 37 CL C 35 C 37 CM C 36 C 37 CONST C 36 C 37 CONTC C 37 CONTCK C 36 C 37 CRE C 35 C 37 DEX C 36 C 37 DLD C 36 C 37 DXL C 35 C 37 FC C 35 C 37 FF C 35 C 37 FM C 35 C 37 GL C 36 C 38 GS C 36 C 38 HDR C 35 C 38 IC 36 C 38 IL C 35 C 38 INTR C 36 C 38 LB C 36 C 38 LDB C 36 C 38 listing format C 35 LOC C 35 C 38 MC C 35 C 38 MD C 35 C 38 message C 35 MEX C 35 C 38 MI C 36 C 38 MSW C 35 C 38 MU C 35 C 38 NL C 35 C 38 NOAE C 38 NOCC C 38 NOCEX C 38 NOCK C 39 NOCL C 39 NOCM C 39 NODEX C 39 NODLD C 39 NODXL C 39 NOFC C 39 NOFF C 39 NOFM C 39 NOGS C 39 NOHDR C 39 NOINTR C 39 NOMC C 39 NOMD C 39 NOMEX C 39 NOMI C 39 NOMSW C 39 NONL C 39 NONS C 39 NOPP C 39
33. Access Type AA Pin Polarity Program Space Enable X Data Space Enable Y Data Space Enable Address Multiplexing Packing Enable Number of Address Bits to Compare AA1659 Figure 3 5 Address Attribute Register AARO Motorola DSP56307EVM Technical Summary 3 5 Memory The P X data and Y data space Enable bits BPEN BXEN and BYEN define whether the FSRAM is activated during external P X data or Y data space accesses respectively For this example the BXEN and BYEN bits are set and BPEN is cleared to allow the FSRAM to respond to X and Y data memory accesses only The number of address bits to compare BNC 3 0 and the address to compare bits BAC 11 0 determine which external memory addresses access the FSRAM The BNC bits define the number of upper address bits that are compared between the BAC bits and the external address to determine if the FSRAM is accessed For this example the FSRAM is assigned to respond to addresses between 5040000 and 04FFFF Thus the BNC bits are set to 8 and the BAC bits are set to 040 If the eight most significant bits of the external address are 00000100 the FSRAM is accessed 3 3 2 Flash The DSP56307EVM uses an Atmel AT29LV010A 20TC chip U3 to provide a 128Kx 8 bit CMOS Flash for stand alone operation 1 startup boot operation without accessing the DSP56307 through the JTAG OnCE port The AT29LV010 uses a 3 3 V power supply and has a read access time of 200 ns 3 3 2 1 Flash Co
34. C 10 C 20 Example BADDR C 10 C 21 xs odo emi d arti NO eene E EAA ERS C 11 C 22 Block Storage of Constant Directive C 12 C 23 Block Storage Modulo Directive C 12 C 24 opal satire X eat wt wipe ved Pea La eee C 13 C 25 COB VEC cime Dc Qon e me c De ACID a ett C 13 C 26 COMMENT Directive ov rd eee wA PORES dd C 14 C 27 Single Character String C 15 C 28 Multiple Character String Definition C 15 Motorola List of Examples xi C 29 DC DIPGCUVO Sms eie ate edm de etae aod eee a ha te nie dca a deal a iter C 15 C 30 pp a Poe tete Oi ed Qe ose Vp iut la C 16 C 31 DEFINE V6 ne Re e ee NH SVO Eee sed os C 16 C 32 DS ICC oa ties coa re eines on ED e Ur dS C 17 C 33 beet SEE VERE EU S EL S C 17 C 34 Dine Clive RR ok wot wd sha sp ES eh tue Se gg C 18 C 35 DUP DITECUVe ep Yoru e ror bI E e fone Vi acutis C 19 C 36 DUPA Ga ite doo Coe eode 4 Coo bes d a PU C 20 C 37 DUPC Chee EESTI E S eV pe unie Tee C 21 C 38 DUPE sia ei oun aae ES te Lebe C 22 C 39 os CONO os eee eee aay C 23 C 40 BNDBUE Directive owe oe n C 23 C 41 ENDIEDItGCDVes c hide eo deae
35. HE 8 E qe TOS SY pr X91 v aa 01 eg HH 101 5 pam 218 Mg lt SWL E ov E SS 0xl S lt 200 0785280 sn 39028 OAS anvo sparia 2210 aa poon 61 c su kn kn n H BERBER PPP bo E SOT NONO v 6 52552 255 55 you 7 NONS toon _ 255555 5 57 209989 328 9994 90830 13538 lt 1 00 13938 s ie A 10 L3 zan EM T m Seu em 68d 1VH yt Hons 0L8d 2VH gt gt CI 8d N3H 82 uoa ii osa pd SL 55 080 50 sz 0049 boon 1S0 X9S0 lt boon 08 Tg ou fy 00N9 dooa D AOL AOL yoa 4 iey en sn I 5 DSP56307EVM User s Manual MOTOROLA
36. ROO GREEN AO EATEN ST 24 324 EQU Equate Symbol to a C 24 C324 se Sheed o Sed C 25 C 3 25 FAIL Programmer Generated C 25 C 3 26 FORCE Set Operand Forcing Mode C 26 C 3 27 GLOBAL Global Section Symbol C 26 C 3 28 GSET Set Global Symbol to a C 26 3 29 Set High Memory C 27 C 3 30 IDENT Object Code Identification Record C 27 C 3 31 IF Conditional Assembly C 28 C 3 32 INCLUDE Include Secondary C 29 C333 ie oen aud sary Va ipe sedie dun C 29 C 3 34 LOCAL Local Section Symbol Declaration C 30 333 LOMEM Set Low Memory Bounds C 30 C 3 36 LSTCOL Set Listing Field Widths C 31 37 MACLIB C 31 C338 Definition C 32 C 3 39 MODE Change Relocation Mode C 33 C 3 40 MSG Programmer Generated C 33 341 Stop Assembly amp C 34 2342 Assembl
37. Resistor R16 R17 R29 R30 Xicor 260 5 6K 5 6 KO Resistor R10 NIC NRC12RF6040TR 604 Resistor R79 R80 Panasonic ERJ 6GEYJ240 240 Resistor R81 NIC 260 4 7K 4 7 KQ Resistor Motorola DSP56307EVM Parts List B 3 Parts Listing B 4 DSP56307EVM User s Manual Motorola Appendix C Motorola Assembler Notes C 1 Introduction This appendix supplements information in Chapter 3 of this document and provides a detailed description of the following components used with the Motorola Assembler Special characters significant to the assembler Assembler directives e Structure control statements C 2 Assembler Significant Characters Several one and two character sequences are significant to the assembler The following subsections define these characters and their use C 2 1 Comment Delimiter Character Any number of characters preceded by a semicolon but not part of a literal string is considered a comment Comments are not significant to the assembler but you can use them to document the source program Comments are reproduced in the assembler output listing Comments are normally preserved in macro definitions but this option can be turned off see the OPT directive Comments can occupy an entire line or can be placed after the last assembler significant field in a source statement A comment starting in the first column of the source file is aligned with the label field in the listing file Otherw
38. These symbols must either have been defined outside of any section or declared as globally accessible within another section using the XDEF directive If the XREF directive is not used to specify that a symbol is defined globally and the symbol is not defined within the current section an error is generated and all references within the current section to such a symbol are flagged as undefined The XREF directive must appear before any reference to lt symbol gt in the section Note A label is not allowed with this directive See also SECTION XDEF C 52 DSP56307EVM User s Manual Motorola Structured Control Statements Example C 81 XREF Directive SECTION FILTER XREF CC DD XDEFed symbols within section ENDSEC C 4 Structured Control Statements An assembly language provides an instruction set for performing certain rudimentary operations These operations in turn may be combined into control structures such as loops FOR REPEAT WHILE or conditional branches IF THEN IF THEN ELSE The assembler however accepts formal high level directives that specify these control structures generating the appropriate assembly language instructions for their efficient implementation This use of structured control statement directives improves the readability of assembly language programs without compromising the desirable aspects of programming in an assembly language C 4 1 Structured Control Directives T
39. a valid base address Unlike other buffer allocation directives the runtime location counter is not advanced by the value of the integer expression in the operand field the location counter remains at the buffer base address The result of expression may have any memory space attribute but must be an absolute integer greater than zero and cannot contain any forward references symbols that have not yet been defined If a modulo buffer is specified the expression must fall within the range 2 expression lt m where m is the maximum address of the target DSP If a Reverse carry buffer is designated and expression is not a power of two a warning is issued Note A label is not allowed with this directive See also BADDR BSM BSB DSM DSR ENDBUF Example C 24 Buffer Directive ORG X 100 BUFFER M 24 CIRCULAR BUFFER MOD 24 M_BUF DC DS 20 REMAINDER UNINITIALIZED ENDBUF C 3 6 COBJ Comment Object File COBJ string The directive is used to place a comment in the object code file The string is put in the object file as a comment Note A label is not allowed with this directive See also IDENT Example C 25 COBM Directive COBJ Start of filter coefficients Motorola Motorola Assembler Notes C 13 Assembler Directives C 3 7 COMMENT Start Comment Lines COMMENT lt delimiter gt lt delimiter gt The COMMENT
40. cause a page eject and is printed in the source listing Note A label is not allowed with this directive The arguments in order are as follows 1 PAGE WIDTH lt exp1 gt Page width in terms of number of output columns per line default 80 min 1 max 255 2 PAGE LENGTH lt exp2 gt Page length in terms of total number of lines per page default 66 min 10 max 255 As a special case a page length of zero turns off all headers titles subtitles and page breaks 3 BLANK TOP exp3 Blank lines at top of page default 0 min 0 max see below 4 BLANK BOTTOM exp4 Blank lines at bottom of page default 0 min 0 max see below 5 BLANK LEFT exp5 Blank left margin Number of blank columns at the left of the page default 0 min 0 max see below The following relationships must be maintained BLANK TOP BLANK BOTTOM PAGE LENGTH 10 BLANK LEFT PAGE WIDTH Note See also LSTCOL Example C 65 PAGE Directive PAGE 132 57 35 3 Set width to 132 3 line top bottom margins PAGE Page eject C 3 45 PMACRO Macro Definition PMACRO lt symbol gt lt symbol gt lt symbol gt The specified macro definition is purged from the macro table allowing the macro table space to be reclaimed C 44 DSP56307EVM User s Manual Motorola Assembler Directives Note A label is not allowed with this directive See also MACRO Example C 66 PMACRO Directive PMACRO MAC
41. checksumming of instruction and data values NOCL Do not print the conditional assembly directives not preserve comment lines of macros when they are defined NODEX default reset Do not expand DEFINE symbols within quoted strings e NODLD default reset Restrict use of certain directives in DO loop NODXL Do not expand DEFINE directive strings in listing NOFC default reset Inhibit folded comments NOFF default reset Use multiple line feeds for page ejects in the listing file NOFM default reset Do not format assembler messages e NOGS default reset in relative mode Do not make all sections global static NOHDR Do not generate listing header This also turns off titles and subtitles e NOINTR default reset in relative mode Do not perform interrupt location checks NOMC Do not print macro calls e NOMD Do not print macro definitions NOMEX default reset Do not print macro expansions NOMI default reset Do not scan directory paths for include files NOMSW Do not issue warning on memory space incompatibilities NONL default reset Do not display nesting levels on listing e NONS Do not allow scoping of symbols within nested sections NOPP Do not pretty print listing file Source lines are sent to the listing file as they are encountered in the source with the exception that tabs are exp
42. counter is not zero this directive first advances the runtime location counter to a base address that is a multiple of 2 where 2k gt lt expression gt An error is issued if there is insufficient memory remaining to establish a valid base address Next the runtime location counter is advanced by the value of the integer expression in the operand field lt expression gt can have any memory space attribute The block of memory reserved is not initialized to any given value The result of lt expression gt must be an absolute integer greater than zero and cannot contain any forward references symbols that have not yet been defined The expression also must fall within the range 2 expression lt m where m is the maximum address of the target DSP label if present is assigned the value of the runtime location counter after a valid base address has been established Note See also DS DSR Example C 33 DSM Directive ORG X 5100 M BUF DSM 24 CIRCULAR BUFFER MOD 24 Motorola Motorola Assembler Notes C 17 Assembler Directives C 3 13 DSR Define Reverse Carry Storage lt label gt DSR lt expression gt The DSR directive reserves a block of memory the length of which in words is equal to the value of lt expression gt If the runtime location counter is not zero this directive first advances the runtime location counter to a base address that is a multiple of where 27 gt express
43. directive is used to define one or more lines as comments The first non blank character after the COMMENT directive is the comment delimiter The two delimiters are used to define the comment text The line containing the second comment delimiter is considered the last line of the comment The comment text can include any printable characters and the comment text is reproduced in the source listing as it appears in the source file Note A label is not allowed with this directive Example C 26 COMMENT Directive COMMENT This is a one line comment COMMENT x This is a multiple line comment Any number of lines can be placed between th two delimiters C 3 8 DC Define Constant lt label gt DC lt arg gt lt arg gt lt arg gt The DC directive allocates and initializes a word of memory for each lt arg gt argument lt arg gt may be a numeric constant a single or multiple character string constant a symbol or an expression The DC directive may have one or more arguments separated by commas Multiple arguments are stored in successive address locations If multiple arguments are present one or more of them can be null two adjacent commas in which case the corresponding address location is filled with zeros If the DC directive is used in L memory the arguments are evaluated and stored as long word quantities Otherwise an error occurs if the evaluated argument value is too large to represent in a single DSP wor
44. files are logically recombined so that each section can be relocated as a unit Sections may be relocatable or absolute In the assembler absolute mode command line option all sections are considered absolute A full set of locations counters is reserved for each absolute section unless the GS option is given See the OPT directive In relative mode all sections are initially relocatable However a section or a part of a section may be made absolute either implicitly by using the ORG directive or explicitly through use of the MODE directive Note A label is not allowed with this directive See also MODE ORG GLOBAL LOCAL XDEF XREF Motorola Motorola Assembler Notes C 49 Assembler Directives Example C 72 SECTION Directive SECTION TABLES TABLES will be the section name C 3 52 SET Set Symbol to a Value label SET expression SET label expression The SET directive is used to assign the value of the expression in the operand field to the label The SET directive functions somewhat like the EQU directive However labels defined via the SET directive can have their values redefined in another part of the program but only through the use of another SET directive The SET directive is useful in establishing temporary or reusable counters within macros The expression in the operand field of a SET must be absolute and cannot include a symbol that is not yet defined No forward references are allowed No
45. is used to signify the end of a buffer block The runtime location counter will remain just beyond the end of the buffer when the ENDBUF directive is encountered Note A label is not allowed with this directive See also BUFFER Example 40 ENDBUF Directive ORG X 9100 BUF BUFFER R 64 uninitialized reverse carry buffer ENDBUF C 3 20 ENDIF End of Conditional Assembly ENDIF The ENDIF directive is used to signify the end of the current level of conditional assembly Conditional assembly directives can be nested to any level but the ENDIF directive always refers to the most previous IF directive Note A label is not allowed with this directive See C 3 31 IF Conditional Assembly Directive on page 28 Example C 41 ENDIF Directive IF REL SAVEPC SET Save current program counter ENDIF C 3 24 ENDM End of Macro Definition ENDM Every MACRO DUP DUPA and DUPC directive must be terminated by an ENDM directive Note label is not allowed with this directive See also DUP DUPA MACRO Motorola Motorola Assembler Notes C 23 Assembler Directives Example C 42 ENDM Directive SWAP SYM MACRO REG1 REG Swap REG1 REG2 using D4 L as temp MOVE R REG1 D4 L MOVE R 2 R REG1 MOVE D4 L R REG2 ENDM C 3 22 ENDSEC End Section ENDSEC Every SECTION directive must be terminated by an ENDSEC directive Note A label is not allowed with this direc
46. library Example dsplnk Ustart Lproj lib Declares the symbol start undefined so that it is resolved by code within the library proj lib Causes the linker to report linking progress beginning of passes opening and closing of input files to the standard error output stream This is useful to insure that link editing is proceeding normally Example dsplnk V Links the file myprog cln and sends progress lines to the standard error output Motorola Example Test Program 2 15 Linker Options Table 2 2 Linker Options Option Description X lt opt gt lt opt gt lt Provides for link time options that alter the standard operation of the linker The options opt gt are described below All options can be preceded by NO to reverse their meaning The X lt opt gt sequence can be repeated for as many options as desired Option Meaning ABC Perform address bounds checking AEC Check form of address expressions ASCEnable absolute section bounds checking CSLCumulate section length data ESODo not allocate memory below ordered sections OVLPWarn on section overlap RO Allow region overlap RSC Enable relative section bounds checking SVOPreserve object file on errors WEXAdd warning count to exit status means default Example XWEX filter cin fft cin fio cIn Allows the linker to add the warning count to the exit status so that a project build aborts
47. line of the source statement and the result is processed by the assembler as if it were a single line source statement The maximum source statement length the first line and any continuation lines is 512 characters Example C 3 Example of Line Continuation Character THIS COMMENT EXTENDS OVER THREE LINES C 2 3 2 Macro Argument Concatenation The backslash is also used to cause the concatenation of a macro dummy argument with other adjacent alphanumeric characters For the macro processor to recognize dummy arguments they must normally be separated from other alphanumeric characters by a non symbol character However sometimes it is desirable to concatenate the argument characters with other characters If an argument is to be concatenated in front of or behind some other symbol characters then it must be followed by or preceded by the backslash respectively C 2 DSP56307EVM User s Manual Motorola Assembler Significant Characters Example C 4 Example of Macro Concatenation Suppose the source input file contained the following macro definition SWAP REG MACRO REG1 REG2 swap REG1 REG2 using D4 L as temp MOVE R REG1 D4 L MOVE R REG2 R REG1 MOVE D4 L R REG2 ENDM The concatenation operator 1 indicates to the macro processor that the substitution characters for the dummy arguments are to be concatenated in both cases with the character R If this macro were called with the following sta
48. oe ees a oot opi arcad Rene ad 2 13 2 4 1 Linker Directives HMM I 2 16 Motorola Table of Contents i 2 5 2 6 3 1 3 2 2 3 33 1 3 3 1 1 3 3 1 2 3 3 2 3 3 2 1 330232 34 3 4 1 3 4 2 3 5 3 6 3 6 1 3 6 2 3 6 3 3 6 4 3 6 5 3 7 1 3 4 5 7 B 1 Introduction to the Debugger 2 17 Ronnitig the or RECESSION ad Se a EA 2 19 Chapter 3 DSP56307EVM Technical Summary DSP56307EVM Description and Features 3 1 D3P356307 DOSCHD OD S see ect r ae ene obi bs exe And dO eats 3 1 MEMO odia Roe trece pue eres betae 3 2 bab 3 3 COmmectiOns cs De TCR RATS 3 3 Example Programming AARO 3 4 lj Oe lake Ure Cue 3 6 Flash Connections ROAD RO CRY SAAS OE LEAS CREASES 3 6 Programming for Stand Alone Operation 3 6 Dunes Lat co Bh SAGAS SO asta keel E 3 7 Codec Analog Input Output 3 8 Codec Digital Interface oe sot Grut eit beet deett E ee etd 3 8 Command Converter sae esas ores de ee ones Mf 3 10 Off Board Interfaces oos SR 3 12 Serial Communication Interface Port 3 12 Enhanced Synchronous Serial Port 0 5510 3 13 Enhanced Synchronous Serial Port 1 511
49. simple expressions are evaluated left to right Note that this means the result of one simple expression could have an impact on the result of subsequent simple expressions because of the condition code settings stemming from the assembler generated compare If the compound expression is an AND expression and one of the simple expressions is found to be false any further simple expressions are not evaluated Likewise if the compound expression is an OR expression and one of the simple expressions is found to be true any further simple expressions are not evaluated In these cases the compound expression is either false or true respectively and the condition codes reflect the result of the last simple expression evaluated C 4 3 5 Statement Formatting The format of structured control statements differs somewhat from normal assembler usage Whereas a standard assembler line is split into fields separated by blanks or tabs with no white space inside the fields structured control statement formats vary depending on the statement being analyzed In general all structured control directives are placed in the opcode field with an optional label in the label field and white space separates all distinct fields in the statement Any structured control statement may be followed by a comment on the same logical line C 4 3 6 Expression Formatting Given an expression of the form lt opl gt LT lt op2 gt OR lt op3 gt GE lt op4 gt th
50. than DOWNTO lt op3 gt Makes use of a user defined operand lt 1 gt to serve as a loop counter FOR TO allows counting upward while FOR DOWNTO allows counting Motorola Motorola Assembler Notes C 55 Structured Control Statements downward The programmer may specify an increment decrement step size in op4 or elect the default step size of 1 by omitting the BY clause A FOR TO loop is not executed if op2 is greater than op3 upon entry to the loop Similarly a FOR DOWNTO loop is not executed if lt op2 gt is less than lt op3 gt lt 1 gt must be a writable register or memory location It is initialized at the beginning of the loop and updated at each pass through the loop Any immediate operands must be preceded by a pound sign Memory references must be preceded by a memory space qualifier X Y or P L memory references are not allowed Operands must be or refer to single word values The logic generated by the FOR directive makes use of several DSP data registers In fact two data registers are used to hold the step and target values respectively throughout the loop they are never reloaded by the generated code It is recommended that these registers not be used within the body of the loop or that they be saved and restored prior to loop evaluation Note The DO keyword is optional Example C 84 FOR Statement FOR X CNT 0 TO Y targ 2 114 loop on X CNT ENDF 4 2 4
51. than the assembly language file The L command line option to generate a listing file must be specified for this option to take effect LOC Include local labels in the symbol table and cross reference listing Local labels are not normally included in these listings If neither the 5 or CRE options are specified then this option has no effect The LOC option must be specified before the first symbol is encountered in the source file MC default reset Print macro calls MD default reset Print macro definitions MEX Print macro expansions MI Scan directory paths for include files The assembler ordinarily looks for included files only in the directory specified in the INCLUDE directory or in the paths given by the I command line option If the MI option is used the assembler also looks for included files in any designated directories MSW default reset Issue warning on memory space incompatibilities MU Include a memory utilization report in the source listing This option must appear before any code or data generation NL Display conditional assembly IF ELSE ENDIF and section nesting levels on listing NOAE Do not check address expressions NOCC default reset Disable cycle counts Does not clear total cycle count NOCEX default reset Do not print DC expansions C 38 DSP56307EVM User s Manual Motorola Assembler Directives NOCK default reset Disable
52. the audio data from the control data The SMODE pins are also set to enable the master sub mode with 32 bit frames the first 16 bits being the left channel and the second 16 bits being the right channel The DSP56307 ESSIO transfers the data information to and from the codec The DSP56307 serial transmit data STDO pin transmits data to the codec The DSP56307 serial receive data SRDO pin receives data from the codec These two pins are connected to the codec serial port data in SDIN and serial port data out SDOUT pins respectively In master sub mode the codec serial port clock SCLK pin provides the serial bit rate clock for the ESSIO interface It is connected to the DSP56307 bidirectional serial clock SCKO pin The DSP56307 serial control 0 5 00 pin is programmed to control the codec reset signal RESET The serial control 2 5 02 pin is connected to the codec serial port sync signal SSYNC signal A rising edge on SSYNC indicates that a new frame is about to start The DSP56307 ESSII pins are used as general purpose i o GPIO signals to transfer the control data to the codec The control data needs to be transferred only when it changes The DSP56307 serial control 0 SC10 pin is programmed to control the codec multi function pin 4 or the control data chip select pin MF4 CCS This pin must be low for entering control data The serial control 1 SC11 pin connects to the codec multi function pin 3 or the control data clock p
53. the resulting object file myprog cld The linker ordinarily produces an absolute executable file as output When the I option is given the linker combines the input files into a single relocatable object file suitable for reprocessing by the linker No absolute addresses are assigned and no errors are issued for unresolved external references Note that the B option must be used when performing incremental linking in order to give an explicit name to the output file If the filename is allowed to default it can overwrite an input file Example I Bfilter cln fft cin fio cIn Combines the files main cln fft cln and fio cln to produce the relocatable object file filter cln L lt library gt The linker ordinarily processes a list of input files that each contain a single relocatable code module Upon encountering the L option the linker treats the following argument as a library file and searches the file for any outstanding unresolved references If it finds a module in the library that resolves an outstanding external reference it reads the module from the library and includes it in the object file output The linker continues to search a library until all external references are resolved or no more references can be satisfied within the current library The linker searches a library only once so the position of the L option on the command line is significant Example dsplnk B filter main fir Lio
54. this section ENDSEC C 3 35 LOMEM Set Low Memory Bounds LOMEM mem rl expression The LOMEM directive establishes an absolute low memory bound for code and data generation mem corresponds to one of the DSP memory spaces X Y L P E rl is one of the letters R for runtime counter or L for load counter The expression is an absolute integer value within the address range of the machine If during assembly the C 30 DSP56307EVM User s Manual Motorola Assembler Directives specified location counter falls below the value given by expression a warning is issued Note A label is not allowed with this directive See also HIMEM Example C 56 LOMEM Directive LOMEM XR 100 YR 100 SET X Y RUN LOW MEM BOUNDS C 3 36 LSTCOL Set Listing Field Widths LSTCOL lt labw gt lt opcw gt lt oprw gt lt opc2w gt lt opr2w gt lt xw gt lt yw gt Sets the width of the output fields in the source listing Widths are specified in terms of column positions The starting position of any field is relative to its predecessor except for the label field which always starts at the same position relative to page left margin program counter value and cycle count display The widths may be expressed as any positive absolute integer expression However if the width is not adequate to accommodate the contents of a field the text is separated from the next field by at least one space Any fi
55. 1 1 1 psit eant cater Sees E 2 3 2 1 1 2 Operation sc esce tie Gg deb ep RE e v pe 2 3 2 1 1 3 s e eec tee alte ee albe Ae af 2 3 2 1 1 4 Data Transter Fields os sas asad Mosk sas ae A ay tec 2 3 2 1 1 5 Comment c oye ui ODE ep area n eee yeaa Ok Vl 2 4 2 1 2 Example Programas ous Wee ev be ou bt SERM ab MM S py let 2 4 2 2 Assembling the Prosram vov Ces PROOF a RE 2 5 2 2 1 Assembler Command Format ih ee P A RS 2 5 2 2 2 Assembler Options a v aed ss TL Es Ka 2 6 2 2 3 Assembler Directives RSE ee a Ree x ta bt Ra 2 7 2 2 3 1 Assembler Significant 2 8 2 2 3 2 Assembly Control hos eyes ave tak p yo Mob 2 8 2 2 3 3 Symbol 2 ivi d beeper SRI ERN RES om 2 9 2 2 3 4 Data Definition Storage Allocation 2 10 2 2 3 5 Listing Control and 2 10 2 2 3 6 Object Fl e dew Aare ee ae wer S Rae Rs 2 11 2 2 9 T Macros and Conditional 2 11 2 2 3 8 Structured amp 2 11 2 2 4 Assembling the Example 2 12 2 3 Motorola DSP 2 12 2A Linker ODUOBS tS
56. 1 MAC2 This statement would cause the macros named and to be purged C 3 46 PRCTL Send Control String to Printer PRCTL lt exp gt I lt string gt lt exp gt I lt string gt PRCTL simply concatenates its arguments and ships them to the listing file The directive line itself is not printed unless there is an error lt exp gt is a byte expression and lt string gt is an assembler string A byte expression would be used to encode non printing control characters such as ESC The string may be of arbitrary length up to the maximum assembler defined limits PRCTL may appear anywhere in the source file and the control string is output at the corresponding place in the listing file However if a PRCTL directive is the last line in the last input file to be processed the assembler insures that all error summaries symbol tables and cross references have been printed before sending out the control string This is so a PRCTL directive can be used to restore a printer to a previous mode after printing is done Similarly if the PRCTL directive appears as the first line in the first input file the control string is output before page headings or titles The PRCTL directive only works if the L command line option is given otherwise it is ignored Note A label is not allowed with this directive Example C 67 PRCTL Directive PRCTL S1B E Reset HP LaserJet printer C 3 47 RADIX Change Input Radix for Consta
57. 19 DUPC C 20 DUPF C 21 END C 22 ENDBUF C 23 ENDIF C 23 ENDM C 23 ENDSEC 24 EQU C 24 EXITM C 25 FAIL C 25 FORCE C 26 GLOBAL C 26 GSET C 26 HIMEM C 27 IDENT C 27 IF C 28 in loop C 37 INCLUDE C 29 LIST C 29 LOCAL C 30 LOMEM C 30 LSTCOL C 31 MACLIB C 31 MACRO C 32 MODE C 33 MSG C 33 NOLIST C 34 OPT C 34 ORG C 41 PAGE C 44 PMACRO C 44 PRCTL C 45 RADIX C 45 RDIRECT C 46 SCSJMP C 46 SCSREG C 47 SECTION C 47 SET C 50 STITLE C 50 SYMOBJ C 50 TABS C 51 TITLE C 51 UNDEF C 51 WARN C 51 XDEF C 52 XREF C 52 Domain Technologies Debugger 1 1 2 17 DSP development tools 2 1 DSP linker 2 12 DSP56002 3 10 DSP56002 Receive Data Pin RXD 3 11 DSP56002 Transmit Data Pin TXD 3 12 DSP56300 Family Manual 3 1 DSP56307 2 1 Chip Errata 3 2 Product Specification 1 1 Product Specification Revision 1 02 3 1 Technical Data 1 1 3 1 User s Manual 3 1 DSP56307 Features 3 1 DSP56307EVM additional requirements 1 2 Index ii DSP56307EVM User s Manual Motorola Component Layout 3 2 connecting to the PC 1 4 contents 1 1 description 3 1 features 3 1 Flash PEROM 3 2 functional block diagram 3 3 installation procedure 1 2 interconnection diagram 1 4 memory 3 2 power connection 1 4 Product Information 1 1 SRAM 3 2 User s Manual 1 1 E Enhanced Synchronous Serial Port 0 ESSIO 3 13 Enhanced Synchronous Serial Port 1 ESSI1 3 14 ESSIO 3 8 ESSII 3 8 example asse
58. 30xw directory created by the installation process from Section 2 2 1 Assembler Command Format on page 2 5 This creates two additional files example cld and 187 The example cld file is the absolute object file of the program it is downloaded into the DSP56307 The example Ist file is the listing file it gives full details of where the program and data are placed in the DSP56307 memory 2 3 Motorola DSP Linker Though not needed for our simple example the Motorola DSP linker is also included with the DSP56307EVM The Motorola DSP linker is a program that processes relocatable object files produced by the Motorola DSP assembler generating an absolute executable file which can be downloaded to the DSP56307 The Motorola DSP linker is included on the Motorola Tools CD and can be installed by following the instructions in Section 2 2 1 Assembler Command Format on page 2 5 The general format of the command line to invoke the linker is dsplnk options lt filenames gt where dsplnk is the name of the Motorola DSP linker program and lt filenames gt is a list of the relocatable object files to be linked 2 12 DSP56307EVM User s Manual Motorola Linker Options 2 4 Linker Options Table 2 2 describes the linker options To avoid ambiguity the option arguments should immediately follow the option letter with no blanks between them Table 2 2 Linker Options Option Description A Auto aligns circu
59. 957572 369856 dc 5247978 8a3407 734546 5344787 938482 304 82 dc 5123456 657784 567123 5675634 CUN RON ITS IRE STDS ITS BIDS NON DST PROGRAM eKKKKKKKK KK KK KK KKK KKK KK KK KKK KKK KKK KKK KKK KK KK KKKKKKKKKKKKKKKKKK org p 0 put following program in program memory starting at location 0 2 4 DSP56307EVM User s Manual Motorola Assembling the Program Example 2 1 Simple DSP56307EVM Code Example Continued jmp begin p 0 is the reset vector i e where the DSP looks for instructions after a reset org p PBASE Start the main program at p PBASE begin move 11851 0 set up pointer to start of listl move list2 r4 set up pointer to start of list2 clr a accumulator move x r0 0 y r4 yO load the value of X memory pointed to by the contents of r0 into 0 and post increment load the value of Y memory pointed to by the contents of r4 into yO and post increment r4 do 15 endloop do 15 times mac x0 y0 a x 0 0 y 4 multiply and accumulate and load next values endloop jmp K this is equivalent to label jmp label and is therefore a never ending empty loop END OF THE SIMPLE PROGRAM
60. D1 code ENDI 2100002 assembler generated label REPEAT subtract until DO D7 Z4 100034 assembler generated label SUB D7 DO code UNTIL LI bge Z L00034 code generated by assembler 4 3 3 Operand Comparison Expressions Two operands may be compared in a simple expression with subsequent transfer of control based on that comparison Such a comparison takes the form lt opl gt cc lt op2 gt where lt cc gt is a condition mnemonic enclosed in angle brackets as described in section 4 3 2 and lt 1 gt and lt op2 gt are register or memory references symbols or assembler expressions When processed by the assembler the operands are arranged such that a compare jump sequence of the following form always results CMP lt regl gt lt reg2 gt J B cc lt label gt where the jump conditional is the inverse of cc Ordinarily lt 1 gt is moved to the lt reg1 gt data register and lt op2 gt is moved to the reg2 data register prior to the compare This is not always the case however If 1 gt happens to be lt reg2 gt and lt op2 gt is lt reg1 gt an intermediate register is used as a scratch register In any event worstcase code generation for a given operand comparison expression is generally two moves a compare and a conditional jump Jumps or branches generated by structured control statements are forced long because the number and address of interve
61. EN 109195 SH SH 709 Hi So oid pA Be n Bae el viret bees Den tus Esta ipn Seriem EN _ ool PET SOIL Too yoz 101 FOIL o RU 201 EMS 3 ies aaow E woot s SY H aaon 52 adow 13s38 5 _________ SN 19539 25 n pe yoe Nn 100 FAS HT zoa ZMS cod zdi dl 700 0L soa sy YY st 900 900N 608 n oa zia xoi eld ag YY vid xoi YY ai A Sq Yt gi gt gt OL 0012920593454 Hu in DSP56307EVM User s Manual MOTOROLA A 2 nd 5 a v Vo J 2 19945 1001 8661 6z AepseupeM 2069949 Asowayy BUJ9 X3 enu LEIOAN 0922 168 219 xv3 189 168 015 8698 9681 XL utsny 1 8M 1099 UOISIAIG 1 59 1 O102 V0l0A1621V 06 ZE 0 sa 9d 99 99 99 QN9 99 99 99 99 99 99 8 19201189 6ta
62. F Undefine DEFINE C 51 C 3 58 WARN Programmer Generated Warning C 51 3 59 X XDEF External Section Symbol C 52 C 3 60 XREF External Section Symbol Reference C 52 C4 Structured Control C 53 4 1 Structured Control Directives C 53 C 4 2 S VID ee dut e Mrd a eo HR ae Bhi RE RES el X pii Bree C 54 4 2 1 BREAK St Sab teres 54 4 2 2 qp it et D DER Hs C 55 C 4 2 3 FOR Statem nt eate anh cack Mane P e STATA Blo eae C 55 4 2 4 JEStatement 2525 ta obe oh b RES EAE iss C 56 4 2 5 OOP State aie i d C 57 C 4 2 6 REPEAT Statements Coe Eo ve br ESI ERR Hee p s CR C 57 C 4 2 7 WHILE Statement oes x cn m E Eme eb Sore C 57 4 3 Simple and Compound Expressions C 58 C 4 3 3 Operand Comparison Expressions C 59 4 3 4 Compound EXprEsSsionS s EE 60 C 4 3 5 StatemenbEormattfig c tees C 60 C 4 3 6 Expression C 60 C 4 3 7 PORLLOOP Formatting sa and hs tex elm CREE btu bas C 61 4 4 Assembly Listing
63. IE RIED e vts o Fre eee uS EO EVIL eet Coleen ak ey C 57 C 87 REPEAT Statements M PE Mek pida C 57 C 88 WHILE Statements e o ar C 58 C 89 Condition Code Expression C 59 Motorola List of Examples xiii Xiv DSP56307EVM User s Manual Motorola Chapter 1 Quick Start Guide This section summarizes the evaluation module contents and additional requirements and provides quick installation and test information The remaining sections of this manual give details on the DSP56307EVM design and operation 1 1 Equipment The following subsections list the equipment required to use the DSP56307 Evaluation Module DSP56307EVM some of which is supplied with the module and some of which must be supplied by the user 1 1 1 What You Get with the 5 56307 The following material comes with the DSP56307EVM DSP56307 Evaluation Module board DSP56307EVM Product Brief DSP56307 Technical Data preliminary DSP56307 Chip Errata DSP56300 Family Manual DSP56307 Product Specifications Revision 1 03 DSP56307EVM User s Manual this document Crystal Semiconductor CS4218 16 bit Multimedia Audio Codec Data Sheet Domain Technologies Debug 56K Debugger manual for Motorola 16 and 24 bit DSPs The required software GUI Debugger from Domain Technologies 1 diskette Assembler linker software from Motorola 1 CD Motorola Quick Start Guide 1 1 Installation Pro
64. Illustrates linking with a library The files main cln and fir cln are combined with any needed modules in the library io lib to create the file filter cld M mapfil Indicates that a map file is to be created lt mapfil gt can be any legal operating system filename including an optional pathname If no filename is specified the linker uses the basename filename without extension of the first filename encountered in the input file list and append map to the basename If the M option is not specified then the linker does not generate a map file The M option is specified only once If the file named in the M option already exists it is overwritten Example dspink M filter cln gauss cin Links the files filter cln and gauss cln to produce a map file Because no filename is given with the M option the output file is named using the basename of the first input file in this case filter The map file is called filter map For the linker the case of symbol names is significant When the N option is given the linker ignores case in symbol names all symbols are mapped to lower case Example dspink N filter cin fft cIn fio cln Links the files filter cln fft cln and fio cln to produce the absolute executable file filetr cld Maps all symbol references to lower case 2 14 DSP56307EVM User s Manual Motorola Linker Options Table 2 2 Linker Options Option Description O mem ctr
65. NOP instructions to accommodate pipeline delay If an address register is loaded in one instruction then the contents of the register is not available for use as a pointer until after the next instruction Ordinarily when the assembler detects this condition it issues an error message The RP option will cause the assembler to output a NOP instruction into the output stream instead of issuing an error S Print symbol table at the end of the source listing This option has no effect if the CRE option is used SCL default reset Structured control statements generate non local labels that ordinarily are not visible to the programmer This can create problems when local labels are interspersed among structured control statements This option causes the assembler to maintain the current local label scope when a structured control statement label is encountered SCO Send structured control statement labels to object and listing files Normally the assembler does not externalize these labels This option must appear before any symbol definition SO Write symbol information to object file This option is recognized but performs no operation in COFF assemblers SVO Preserve object file on errors Normally any object file produced by the assembler is deleted if errors occur during assembly This option must be given before any code or data is generated U Print the unassembled lines skipped due to failure to satisfy the condition of a c
66. Note A label is not allowed with this directive The parameters used with the ORG directive are as follows lt rms gt Which memory space X Y L P or E is used as the runtime memory space If the memory space is L any allocated datum with a value greater than the target word size is extended to two words otherwise it is truncated If the memory space is E then depending on the memory space qualifier any generated words are split into bytes one byte per word or a 16 8 bit combination rlc Which runtime counter L or default if neither L is specified that is associated with the rms is used as the runtime location counter lt rmp gt lIndicates the runtime physical mapping to DSP memory I internal E external R ROM A port A B port B If not present no explicit mapping is done lt rce gt Non negative absolute integer expression representing the counter number to be used as the runtime location counter Must be enclosed in parentheses Should not exceed the value 65535 lt exp1 gt Initial value to assign to the runtime counter used as the lt rlc gt If lt exp1 gt is a relative expression the assembler uses the relative location counter If lt 1 gt is an absolute expression the assembler uses the absolute location counter If lt 1 gt is not specified then the last value and mode that the counter had is used Ims Which memory space X Y L P or E is u
67. Order this document by DSP56307EVMUM D Rev 1 4 7 98 DSP56307EVM User s Manual Motorola Incorporated amp _ Semiconductor Products Sector 6501 William Cannon Drive West AA MOTOROLA Austin TX 78735 8598 This manual is one of a set of three documents You need the following manuals to have complete product information the family manual the user s manual and the technical data INC 1998 All rights reserved This document contains information on a new product Specifications and information herein are subject to change without notice Motorola reserves the right to make changes without further notice to any products herein to improve reliability function or design Motorola does not assume any liability arising out of the application or use of any product or circuit described herein neither does it convey any license under its patent rights nor the rights of others Motorola products are not designed intended or authorized for use as components in systems intended for surgical implant into the body or other application in which the failure of the Motorola product could create a situation where personal injury or death may occur Should Buyer purchase or use Motorola products for any such unintended or unauthorized application Buyer shall indemnify and hold Motorola and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and r
68. P56002 as the command converter Refer to Figure 3 1 on page 3 2 for the location of J8 on the DSP56307EVM and to Figure 3 2 on page 3 3 for a functional diagram Figure 3 9 shows the RS 232 serial interface diagram Table 3 6 shows the 5 232 connectors pinout P2 Table 3 5 On Board JTAG Enable Disable Option J8 Option Selected 1 2 On Board Command Converter Enabled OPEN On Board Command Converter Disabled DSP56002 RS 232 TRANSCEIVER HOST PC 4 R4OUT RAIN TD TXD 21 T20UT RD RESET 44 R50UT R5IN AA1613 Figure 3 9 RS 232 Serial Interface Table 3 6 Debug RS 232 Connector P2 Pinout NEL Pin Number EC 1 6 2 TxD 7 3 RxD 8 4 RESET 9 5 GND Maxim s 3 V Powered RS 232 Transceiver MAX212 at U11 is used to transmit the signals between the host PC and the DSP56002 Serial data is transmitted from the host PC transmitted data TD signal and received on the DSP56002 receive data RXD pin Motorola DSP56307EVM Technical Summary 3 11 Off Board Interfaces Serial data is similarly transmitted from the DSP56002 transmit data TXD signal and received on the host PC received data RD signal The data terminal ready DTR pin asserts the RESET pin of the DSP56002 As an option the DSP56307EVM 14 pin JTAG OnCE connector at J6 allows th
69. S o E 2 gt Men 7 LIT gt NGINSANI 3nioo 3nioo 31100 anyo anro anyo LLI ar ee tame 099 850 180 952 59 789 590 290 189 089 H N eo 4 I S1ON 0 Er ZL ezio 210 Cz om et se ie er tyr See RES da etie Sp in acp EU E vast C E 03002 310N t T i anro anyo PAT EAN RC CL 1019 810 10 4 4 i E T t anoo 3nio 0 3ni0 o 301070 anyo anyo anyo anyo anvo anvo 6010 8010 1010 010 2010 10 10 210 i volo 9019 019 089 619 7 i i 4 4 4 as 4 i ME d HSVI3 310N WvHS 310N f 310N gt 3 5 8 Y Appendix B DSP56307EVM Parts List B 1 Parts Listing The following table contains information on the parts and devices on the DSP56307EVM Table B 1 DSP56307EVM Parts List Designator Manufacturer Part Number Description U1 Motorola DSP56307GC100 DSP U2 Motorola DSP56002PV80 DSP JTAG OnCE U4 GSI GS71024T 10 FSRAM U3 Atmel AT29LV010A 20TC Flash U5 Quality QS3384Q Bus Switch Semiconductor U6 Motorola MC34164D 3 Power On Reset U7 Crystal CS4218 KQ Audio Codec Semiconductor U8 Pioneer LM4880M Audio Amplifier 09 Moto
70. SP linker B objfil Specifies that an object file is to be created for assembler output lt objfil gt can be any legal operating system filename including an optional pathname The type of object file depends on the assembler operation mode If the A option is supplied on the command line the assembler operates in absolute mode and generates an absolute object cld file If there is no A option the assembler operates in relative mode and creates a relocatable object cln file If the B option is not specified the assembler does not generate an object file If no lt objfil gt is specified the assembler uses the basename filename without extension of the first flename encountered in the source input file list and appends the appropriate file type cln or cld to the basename The B option should be specified only once Example asm56300 Bfilter main asm fft asm fio asm This example assembles the files main asm fft asm and fio asm together to produce the relocatable object file filter cln D lt symbol gt lt string gt Replaces all occurrences of lt symbol gt with lt string gt in the source files to be assembled Example asm56300 DPOINTS 16 prog asm Replaces all occurrences of the symbol POINTS in the program prog asm by the string 16 EA errfil or EWeerrfil gt Allows the standard error output file to be reassigned on hosts that do not support error output redirection from the command line
71. STOFF NOLIST Turn the listing off ENDIF C 3 42 OPT Assembler Options OPT option option option comment The OPT directive is used to designate the assembler options Assembler options are given in the operand field of the source input file and are separated by commas Options also may be specified using the command line O option options have a default condition Some options are reset to their default condition at the end of pass one Some are allowed to have the prefix NO attached to them which then reverses their meaning Note A label is not allowed with this directive Options can be grouped by function into five different types e Listing format control e Reporting options e Message control Symbol options e Assembler operation C 34 DSP56307EVM User s Manual Motorola Assembler Directives C 3 42 1 Listing Format Control These options control the format of the listing file FC Fold trailing comments FF Form feeds for page ejects FM Format messages PP Pretty print listing RC Relative comment spacing C 3 42 2 Reporting Options These options control what is reported in the listing file CEX Print DC expansions CL Print conditional assembly directives CRE Print symbol cross reference DXL Expand DEFINE directive strings in listing HDR Generate listing headers IL Inhibit source listing LOC Print local labels in cross reference MC Print
72. TLE Initialize Program Title TITLE lt string gt The TITLE directive initializes the program title to the string in the operand field The program title is printed on the top of all succeeding pages until another TITLE directive is encountered The title is initially blank The TITLE directive is not printed in the source listing A TITLE directive with no string argument causes the current title to be blank Note A label is not allowed with this directive See also STITLE Example C 77 TITLE Directive TITLE FIR FILTER C 3 57 UNDEF Undefine DEFINE Symbol UNDEF lt symbol gt The UNDEF directive causes the substitution string associated with lt symbol gt to be released and lt symbol gt will no longer represent a valid DEFINE substitution See the DEFINE directive for more information Note A label is not allowed with this directive See also DEFINE Example C 78 UNDEF Directive UNDEF DEBUG UNDEFINES THE DEBUG SUBSTITUTION STRING C 3 58 WARN Programmer Generated Warning WARN lt str gt lt exp gt lt str gt lt exp gt lt str gt lt exp gt The WARN directive causes a warning message to be output by the assembler The total warning count is incremented as with any other warning The WARN directive is Motorola Motorola Assembler Notes C 51 Assembler Directives normally used in conjunction with conditional assembly directives for exce
73. TMT ENDM If this macro were called as follows NUM SET 10 GEN_LAB HEX NUM NOP The resulting expansion as it would appear in the listing file would be as follows HEXA NOP C 2 6 Macro Local Label Override The circumflex when used as a unary expression operator in a macro expansion causes any local labels in its associated term to be evaluated at normal scope rather than macro scope This means that any underscore labels in the expression term following the circumflex will not be searched for in the macro local label list The operator has no effect on normal labels or outside of a macro expansion The circumflex operator is useful for passing local labels as macro arguments to be used as referents in the macro Note The circumflex is also used as the binary exclusive OR operator Example C 7 Example of Local Label Override Character Consider the following macro definition LOAD MACRO ADDR MOVE P ADDR RO ENDM If this macro were called as follows _ LOCAL LOAD _ LOCAL the assembler would ordinarily issue an error since _LOCAL is not defined within the body of the macro With the override operator the assembler recognizes the LOCAL symbol outside the macro expansion and uses that value in the MOVE instruction C 4 DSP56307EVM User s Manual Motorola Assembler Significant Characters C 2 7 Macro String Delimiter or Quoted String DEFINE Expansion Character The following s
74. acro hex value substitution operator Macro local label override operator Macro string delimiter or quoted string DEFINE expansion character Function delimiter Location counter substitution String concatenation operator Substring delimiter lt lt I O short addressing mode force operator lt Short addressing mode force operator gt Long addressing mode force operator Immediate addressing mode operator lt Immediate short addressing mode force operator gt Immediate long addressing mode force operator 2 2 3 2 Assembly Control The directives used for assembly control are as follows COMMENT Start comment lines DEFINE Define substitution string END End of source program 2 8 DSP56307EVM User s Manual Motorola Assembling the Program FAIL Programmer generated error message FORCE Set operand forcing mode Set high memory bounds INCLUDE Include secondary file LOMEM Set low memory bounds MODE Change relocation mode MSG Programmer generated message ORG Initialize memory space and location counters RADIX Change input radix for constants RDIRECT Remove directive or mnemonic from table SCSJMP Set structured control branching mode SCSREG Reassign structured control statement registers UNDEF Undefine DEFINE symbol WARN Programmer generated warning 2 2 3 8 Symbol Definition The directives used to cont
75. and initializes a byte of memory for each lt arg gt argument lt arg gt may be a byte integer constant a single or multiple character string constant a symbol or a byte expression The DCB directive may have one or more arguments separated by commas Multiple arguments are stored in successive byte locations If multiple arguments are present one or more of them can be null two adjacent commas in which case the corresponding byte location is filled with zeros lt label gt if present is assigned the value of the runtime location counter at the start of the directive processing Integer arguments are stored as is but must be byte values i e within the range 0 255 floating point numbers are not allowed Single and multiple character strings are handled in the following manner e Single character strings are stored in a word whose lower seven bits represent the ASCII value of the character See Example C 27 Multiple character strings represent words whose bytes are composed of concatenated sequences of the ASCII representation of the characters in the string unless the NOPS option is specified see the OPT directive If the number of characters is not an even multiple of the number of bytes per DSP word then the last word will have the remaining characters left aligned and the rest of the word Motorola Motorola Assembler Notes C 15 Assembler Directives is zero filled If the NOPS option is given each character in
76. anded to spaces and continuation lines are concatenated into a single physical line for printing e NOPS Do not pack strings in DC directive Individual bytes in strings are stored one byte per word NORC default reset Do not space comments relatively e NORP default reset Do not generate instructions to accommodate pipeline delay e NOSCL Do not maintain the current local label scope when a structured control statement label is encountered NOU default reset Do not print the lines excluded from the assembly due to a conditional assembly directive e NOUR default reset Do not flag unresolved external references e NOW Do not print warning messages NS default reset Allow scoping of symbols within nested sections Motorola Motorola Assembler Notes C 39 Assembler Directives PP default reset Pretty print listing file The assembler attempts to align fields at a consistent column position without regard to source file formatting PS default reset Pack strings in DC directive Individual bytes in strings are packed into consecutive target words for the length of the string RC Space comments relatively in listing fields By default the assembler always places comments at a consistent column position in the listing file This option allows the comment field to float on a line containing only a label and opcode the comment begins in the operand field RP Generate
77. anual Motorola Assembler Directives Example C 37 DUPC Directive If input source file contained the following statements DUPC VALUE 123 DC VALUE ENDM then the assembled source listing would show DUPC VALUE 123 DC 1 2 DC 3 ENDM Note that the lines DUPC VALUE 123 ENDM will only be shown on the source listing if the MD option is enabled The lines DC HE DC 2 DC 3 will only be shown on the source listing if the MEX option is enabled Note See the OPT directive in this appendix for more information on the MD and MEX options 3 17 DUPF Duplicate Sequence In Loop lt label gt DUPF lt dummy gt lt start gt lt end gt lt increment gt ENDM The block of source statements defined by the DUPF and ENDM directives are repeated in general end lt start gt 1 times when increment is 1 start is the starting value for the loop index end represents the final value increment is the increment for the loop index it defaults to if omitted as does the start value The dummy parameter holds the loop index value and may be used within the body of instructions label if present is assigned the value of the runtime location counter at the start of the DUPF directive processing Note See also DUP DUPA DUPC ENDM MACRO Motorola Motorola Assembler Notes C 21 Assembler Directives Example C 38 DUPF Directive
78. be nested to any level lt label gt if present is assigned the value of the runtime location counter at the start of the DUP directive processing Note See also DUPA DUPC DUPF ENDM MACRO C 18 DSP56307EVM User s Manual Motorola Assembler Directives Example C 35 DUP Directive The sequence of source input statements COUNT SET 3 DUP COUNT ASR BY COUNT ASR DO ENDM would generate the following in the source listing COUNT SET 3 DUP COUNT ASR BY COUNT ASR DO ASR DO ASR DO ENDM Note that the lines DUP COUNT 7ASR BY COUNT ENDM will only be shown on the source listing if the MD option is enabled The lines ASR DO ASR DO ASR DO will only be shown on the source listing if the MEX option is enabled Note See the OPT directive in this appendix for more information on the MD and MEX options C 3 15 DUPA Duplicate Sequence With Arguments lt label gt dummy lt arg gt lt lt arg gt lt arg gt ENDM The block of source statements defined by the DUPA and ENDM directives are repeated for each argument For each repetition every occurrence of the dummy parameter within the block is replaced with each succeeding argument string If the argument string is a null then the block is repeated with each occurrence of the dummy parameter removed If an argument includes an embedded blank or other assembler significant character it must be enclosed
79. cedure 1 1 2 What You Need to Supply The user must provide the following 1 2 PC 486 class or higher with Windows95 Minimum of 16 Mbytes of memory 32 inch high density diskette drive CD ROM drive Hard drive with 20 Mbytes of free disk space Mouse RS 232 serial port supporting 9 600 115 200 bit per second transfer rates RS 232 interface cable DB9 male to DB9 female Power supply 7 9 V AC or DC input into 2 1 mm power connector Audio source tape player radio CD player etc Audio interface cable with 1 8 inch stereo plugs Headphones Installation Procedure Installation requires the following four basic steps 1 Preparing the DSP56307EVM board 2 Connecting the board to the PC and power 3 4 Testing the installation Installing the software DSP56307EVM User s Manual Motorola Installation Procedure 1 2 1 Preparing the DSP56307EVM CAUTION Because all electronic components are sensitive to the effects of electrostatic discharge ESD damage correct procedures should be used when handling all components in this kit and inside the supporting personal computer Use the following procedures to minimize the likelihood of damage due to ESD Always handle all static sensitive components only in a protected area preferably a lab with conductive antistatic flooring and bench surfaces Always use grounded wrist straps when handling s
80. cks LB Byte increment load counter LDB Listing file debug MI Scan MACLIB directories for include files PS Pack strings PSM Programmable short addressing mode RP Generate NOP to accommodate pipeline delay RSV Check reserve data memory locations SI Interpret short immediate as long or sign extended SVO Preserve object file on errors C 36 DSP56307EVM User s Manual Motorola Assembler Directives Following are descriptions of the individual options The parenthetical inserts specify default if the option is the default condition and reset if the option is reset to its default state at the end of pass one AE default reset Check address expressions for appropriate arithmetic operations For example this will check that only valid add or subtract operations are performed on address terms CC Enable cycle counts and clear total cycle count Cycle counts are shown on the output listing for each instruction Cycle counts assume a full instruction fetch pipeline and no wait states CEX Print DC expansions CK Enable checksumming of instruction and data values and clear cumulative checksum The checksum value can be obtained using the CHK function CL default reset Print the conditional assembly directives CM default reset Preserve comment lines of macros when they are defined Note that any comment line within a macro definition that starts with two consecutive semicolons is never
81. cur until the linking phase Note See also FORCE SCSREG A label is not allowed with this directive Example 70 SCSJMP Directive SCSJMP SHORT force all subsequent SCS jumps short C 3 50 SCSREG Reassign Structured Control Statement Registers SCSREG lt gt lt gt gt lt gt 11 The SCSREG directive reassigns registers used by structured control statement SCS directives It is convenient for reclaiming default SCS registers when they are needed as application operands within a structured control construct lt srcreg gt is ordinarily the source register for SCS data moves lt dstreg gt is the destination register lt tmpreg gt is a temporary register for swapping SCS operands lt extreg gt is an extra register for complex SCS operations With no arguments SCSREG resets the SCS registers to their default assignments The SCSREG directive should be used judiciously to avoid register context errors during SCS expansion Source and destination registers may not necessarily be used strictly as source and destination operands The assembler does no checking of reassigned registers beyond validity for the target processor Errors can result when a structured control statement is expanded and an improper register reassignment has occurred It is recommended that the MEX option see the OPT directive be used to examine structured control statement expansion for r
82. d lt label gt if present is assigned the value of the runtime location counter at the start of the directive processing Integer arguments are stored as is floating point numbers are converted to binary values Single and multiple character strings are handled in the following manner e Single character strings are stored in a word whose lower seven bits represent the ASCII value of the character C 14 DSP56307EVM User s Manual Motorola Assembler Directives Example C 27 Single Character String Definition ERS 000052 Multiple character strings represent words whose bytes are composed of concatenated sequences of the ASCII representation of the characters in the string unless the NOPS option is specified see the OPT directive If the number of characters is not an even multiple of the number of bytes per DSP word then the last word will have the remaining characters left aligned and the rest of the word is zero filled If the NOPS option is given each character in the string is stored in a word whose lower seven bits represent the ASCII value of the character Example C 28 Multiple Character String Definition ABCD 414243 440000 Note See also BSC DCB Example C 29 DC Directive TABLE DC 1426 253 2662 ABCD CHARS DC C 3 9 DCB Define Constant Byte lt label gt DCB lt arg gt lt arg gt lt arg gt The DCB directive allocates
83. d Both expressions can have any memory space attribute label if present is assigned the value of the runtime location counter after a valid base address has been established Only one word of object code is shown on the listing regardless of how large the first expression is However the runtime location counter is advanced by the number of words generated Note See also BSC BSM DC Example C 21 Buffer Directive BUFFER BSB BUFSIZ INITIALIZE BUFFER TO ZEROS C 3 3 BSC Block Storage of Constant lt label gt BSC lt expression gt lt expression gt The BSC directive causes the assembler to allocate and initialize a block of words The number of words in the block is given by the first expression which must evaluate to an absolute integer Each word is assigned the initial value of the second expression If there is no second expression an initial value of zero is assumed If the first expression contains symbols that are not yet defined forward references or if the expression has a value of less than or equal to zero an error is generated Both expressions can have any memory space attribute lt label gt if present is assigned the value of the runtime location counter at the start of the directive processing Only one word of object code is shown on the listing regardless of how large the first expression is However the runtime location counter is advanced by the number of words gene
84. d line number information to provide source level debugging Example asm56300 B Gmyprog asm Assembles the file myprog asm and sends the source file line number information to the resulting object file myprog cln I pathname Causes the assembler to look in the directory defined by pathname for any include file not found in the current directory pathname can be any legal operating system pathname Example asm56300 testprog Uses IBM PC pathname conventions and causes the assembler to prefix any include files not found in the current directory with the project pathname L Istfil Specifies that a listing file is to be created for assembler output lt lstfil gt can be any legal operating system filename including an optional pathname If no lt lstfil gt is specified the assembler uses the basename filename without extension of the first filename encountered in the source input file list and appends Ist to the basename The L option is specified only once Example asm56300 L filter asm gauss asm Assembles the files filter asm and gauss asm together to produce a listing file Because no filename is given the output file is named using the basename of the first source file in this case filter and the listing file is called filter Ist M pathname Causes the assembler to look in the directory defined by pathname for any macro file not found in the current directory pathname can be any legal opera
85. des known to the assembler that control the assembly process Macro call invocation of a previously defined macro that is to be inserted in place of the macro call 2 1 1 3 Operand Field The interpretation of the operand field depends on the contents of the operation field The operand field if present must follow the operation field and must be preceded by at least one space or tab 2 1 1 4 Data Transfer Fields Most opcodes specify one or more data transfers to occur during the execution of the instruction These data transfers are indicated by two addressing mode operands separated by a comma with no embedded blanks If two data transfers are specified they must be separated by one or more blanks or tabs Refer to the DSP56300 Family Manual for a complete discussion of addressing modes that are applicable to data transfer specifications Motorola Example Test Program 2 3 Writing the Program 2 1 1 5 Comment Field Comments are not considered significant to the assembler but can be included in the source file for documentation purposes A comment field is composed of any characters that are preceded by a semicolon 2 1 2 Example Program The example program discussed in this section takes two lists of data one in X memory and one in Y memory and calculates the sum of the products of the two lists Calculating the sum of products is the basis for many DSP functions Therefore the DSP56307 has a special instruction Multip
86. directive by white space The count itself may be any arbitrary assembler expression and therefore must not contain embedded blanks 4 4 Assembly Listing Format Structured control statements begin with the directive in the opcode field any optional label is output in the label field The rest of the statement is left as is in the operand field except for any trailing comment the X and Y data movement fields are ignored Comments following the statement are output in the comment field unless the unreported comment delimiter 1s used Statements are expanded using the macro facilities of the assembler Thus the generated code can be sent to the listing by specifying the MEX assembler option either via the OPT directive or the O command line option C 4 5 Effects on the Programmer s Environment During assembly global labels beginning with Z L are generated They are stored in the symbol table and should not be duplicated in user defined labels Because these non local labels ordinarily are not visible to the programmer there can be problems when local underscore labels are interspersed among structured control statements The SCL option Motorola Motorola Assembler Notes C 61 Structured Control Statements see the OPT directive causes the assembler to maintain the current local label scope when a structured control statement label is encountered In the FOR loop lt op1 gt is a user defined symbol When exiting the loop
87. e SECTION directive Note A label is not allowed with this directive See also UNDEF Example C 31 DEFINE Directive If the following DEFINE directive occurred in the first part of the source program DEFINE ARRAYSIZ 10 SAMPLSIZ then the source line below DS ARRAYSIZ would be transformed by the assembler to the following DS 10 SAMPLSIZ C 16 DSP56307EVM User s Manual Motorola Assembler Directives C 3 11 DS Define Storage lt label gt DS lt expression gt The DS directive reserves a block of memory the length of which in words is equal to the value of lt expression gt This directive causes the runtime location counter to be advanced by the value of the absolute integer expression in the operand field lt expression gt can have any memory space attribute The block of memory reserved is not initialized to any value The expression must be an integer greater than zero and cannot contain any forward references symbols that have not yet been defined lt label gt if present is assigned the value of the runtime location counter at the start of the directive processing Note See also DSM DSR Example C 32 DS Directive S_BUF DS 12 SAMPLE BUFFER C 3 12 DSM Define Modulo Storage lt label gt DSM lt expression gt The DSM directive reserves a block of memory the length of which in words is equal to the value of lt expression gt If the runtime location
88. e not yet been defined If a modulo buffer is specified the expression must fall within the range 2 expression lt m where m is the maximum address of the target DSP If a reverse carry buffer is designated and expression is not a power of two a warning is issued A label is not allowed with this directive Note See also BSM BSB BUFFER DSM DSR Example C 20 Example BADDR Directive ORG X 5100 M_BUF BADDR M 24 CIRCULAR BUFFER MOD 24 C 10 DSP56307EVM User s Manual Motorola Assembler Directives C 3 2 BSB Block Storage Bit Reverse lt label gt BSB lt expression gt lt expression gt The BSB directive causes the assembler to allocate and initialize a block of words for a reverse carry buffer The number of words in the block is given by the first expression which must evaluate to an absolute integer Each word is assigned the initial value of the second expression If there is no second expression an initial value of zero is assumed If the runtime location counter is not zero this directive first advances the runtime location counter to a base address that is a multiple of 2 where 2 is greater than or equal to the value of the first expression An error will occur if the first expression contains symbols that are not yet defined forward references or if the expression has a value of less than or equal to zero Also if the first expression is not a power of two a warning is generate
89. e user to connect an ADS command converter card directly to the DSP56307EVM if the DSP56002 command converter software is not used J8 jumper removed Pin 8 has been removed from J6 so that the cable cannot be connected to the DSP56307EVM incorrectly Table 3 7 shows the JTAG OnCE J6 connector pinout The JTAG cable from the ADS command converter is similarly keyed so that the cable cannot be connected to the DSP56307EVM incorrectly Table 3 7 JTAG OnCE J6 Connector Pinout Pin Number DSP Signal Name Pin Number DSP Signal Name 1 TDI 2 GND 3 TDO 4 GND 5 TCK 6 GND 7 8 KEY PIN 9 PRESET 10 TMS 11 13 3 V 12 13 DEZ 14 TRST 3 6 Off Board Interfaces The DSP56307EVM provides interfaces with off board devices via its on chip peripheral ports Most of the DSP ports are connected to headers on the EVM to facilitate direct access to these pins by using connectors or jumpers 3 6 1 Serial Communication Interface Port SCI Connection to the DSP s SCI port can be made at J7 Refer to Table 3 8 for pinout The signals at J7 are 43 3 V signals straight from the DSP If RS 232 level signals are required jumpers should be installed at J7 Refer to Table 3 9 to route the DSP s SCI signals through an RS 232 level converter to P1 The pinout of P1 is shown in Table 3 10 By installing a jumper at J10 the SCI port will be clocked by the on board 153 6 kHz oscillator instead of being clocked e
90. easonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part Motorola and are registered trademarks of Motorola Inc Motorola Inc is an Equal Opportunity Affirmative Action Employer OnCE and Mfax are trademarks of Motorola Inc Quick Start Guide Example Test Program DSP56307EVM Technical Summary DSP56307EVM Schematics DSP56307EVM Parts List Motorola Assembler Notes Index Quick Start Guide Example Test Program DSP56307EVM Technical Summary DSP56307EVM Schematics DSP56307EVM Parts List Motorola Assembler Notes Index Table of Contents Chapter 1 Quick Start Guide il Eg ipment e oet E UR S a on od E Rn 1 1 1 1 1 What You Get with the 05 56307 1 1 1 1 2 What You Need to Supply endete Sap xor aae Elem o ca eae 1 2 1 7 Installation Pr ced r oie cu eH In been Une beh SU e sue Pe ates 1 2 1 2 1 Preparing 5 56307 1 3 1 2 2 Connecting the DSP56307EVM to the PC and Power 1 4 Chapter 2 Example Test Program Zl Writing the Prostat Lose sxe ESQ UR OR Peu 2 2 2 1 1 Source Statement 2 2 2
91. ection conflict occurs i e the external address matches the address and the space that is specified in more than one If the APD bit is cleared when a selection conflict occurs only the highest priority AA pin is asserted If the APD bit is set when a selection conflict occurs the lower priority AA pins are asserted in addition to the higher priority AA pin For this example only one AA pin must be asserted AAO Thus the APD bit can be cleared 3 4 DSP56307EVM User s Manual Motorola Memory Memory Map MS 0 SC 0 Program X Data Y Data FFFFFF FF0000 050000 Unified FSRAM 040000 006000 004000 000000 AA1608 Figure 3 4 Example Memory Map with the Unified External Memory Figure 3 5 shows the settings of AARO for this example The external access type bits BATI and BATO are set to O and 1 respectively to denote FSRAM access The address attribute polarity bit BA AP is cleared to define AAO as active low Address multiplexing is not needed with the FSRAM therefore the address multiplexing bit BAM is cleared Packing is not needed with FSRAM thus the packing enable bit BPAC is cleared to disable this option 23 12 BAC11 BAC10 BAC9 BAC8 7 BAC6 5 4 BAC3 BAC2 BAC1 0 0 0 0 0 1 0 0 0 0 0 0 Address to Compare 11 0 BNC3 BNC2 BNC1 BPAC BAM BYEN BXEN BPEN BAAP BATO D l1 l1 E External
92. ed by AAO and the corresponding address attribute register 0 AARO The FSRAM address input pins A0 A 15 are connected to the respective port A address pins of the DSP This configuration selects a unified memory map of 64K words The unified memory does not contain partitioned X data Y data and program memory Thus access to P 1000 X 1000 and Y 1000 are treated as accesses to the same memory cell and 48 bit long memory data moves are not possible to or from the external FSRAM 3 3 1 2 Example Programming AARO As mentioned above the FSRAM activity is controlled by the DSP56307 pin AAO and the corresponding AARO AARO controls the external access type the memory type and which external memory addresses access the FSRAM Figure 3 4 shows the memory map that is attained with the AARO settings described in this example Note In this example the memory switch bit in the operating mode register OMR is cleared and the 16 bit compatibility bit in the status register is cleared In Figure 3 4 the FSRAM responds to the 64K of X and Y data memory addresses between 040000 and 04FFFF However with the unified memory map accesses to the same external memory location are treated as accesses to the same memory cell A priority mechanism exists among the four AAR control registers AAR3 has the highest priority and AARO had the lowest Bit 14 of the OMR the address priority disable APD bit controls which AA pins are asserted when a sel
93. ed in the section declaration Symbols that are defined outside of a section are considered global symbols and have no explicit section name associated with them Global symbols may be referenced freely from inside or outside of any section as long as the global symbol name does not conflict with another symbol by the same name in a given section If the GLOBAL qualifier follows the section name in the SECTION directive then all symbols defined in the section until the next ENDSEC directive are considered global The effect is as if every symbol in the section were declared with GLOBAL This is useful when a section needs to be independently relocatable but data hiding is not desired If the STATIC qualifier follows the section name in the SECTION directive then all code and data defined in the section until the next ENDSEC directive are relocated in terms of the immediately enclosing section The effect with respect to relocation is as if all code and data in the section were defined within the parent section This is useful when a section needs data hiding but independent relocation is not required If the LOCAL qualifier follows the section name in the SECTION directive then all symbols defined in the section until the next ENDSEC directive are visible to the immediately enclosing section The effect is as if every symbol in the section were defined within the parent section This is useful when a section needs to be independently
94. eld for which the default is desired may be null A null field can be indicated by two adjacent commas with no intervening space or by omitting any trailing fields altogether If the LSTCOL directive is given with no arguments all field widths are reset to their default values Note A label is not allowed with this directive See also PAGE Example C 57 LSTCOL Directive LSTCOL 40 20 20 Reset label X and Y data field widths 3 37 MACLIB Macro Library MACLIB lt pathname gt This directive is used to specify the lt pathname gt as defined by the operating system of a directory that contains macro definitions Each macro definition must be in a separate file and the file must be named the same as the macro with the extension ASM added For example BLOCKMV ASM would be a file that contained the definition of the macro called BLOCKMV If the assembler encounters a directive in the operation field that is not contained in the directive or mnemonic tables the directory specified by lt pathname gt is searched for a file of the unknown name with the ASM extension added If such a file is found the current source line is saved and the file is opened for input as an INCLUDE file When the end of the file is encountered the source line is restored and processing is resumed Because the Motorola Motorola Assembler Notes C 31 Assembler Directives source line is restored the processed file must have a macro definition
95. elevant constructs to determine default register usage and applicable reassignment strategies Note See also OPT MEX SCSJMP A label is not allowed with this directive Example C 71 SCSREG Directive SCSREG YO B reassign SCS source and dest registers C 3 51 SECTION Start Section SECTION symbol GLOBAL STATIC LOCAL lt section source statements gt ENDSEC The SECTION directive defines the start of a section All symbols that are defined within a section have the lt symbol gt associated with them as their section name This serves to Motorola Motorola Assembler Notes C 47 Assembler Directives protect them from like named symbols elsewhere in the program By default a symbol defined inside any given section is private to that section unless the GLOBAL or LOCAL qualifier accompanies the SECTION directive Any code or data inside a section is considered an indivisible block with respect to relocation Code or data associated with a section is independently relocatable within the memory space to which it is bound unless the STATIC qualifier follows the SECTION directive on the instruction line Symbols within a section are generally distinct from other symbols used elsewhere in the source program even if the symbol name is the same This is true as long as the section name associated with each symbol is unique the symbol is not declared public XDEF GLOBAL and the GLOBAL or LOCAL qualifier is not us
96. ements Each source statement may include up to six fields separated by one or more spaces or tabs a label field an operation field an operand field up to two data transfer fields and a comment field For example the following source statement shows all six possible fields trm mac x0 y0 a x 0 0 y 4 yO Text Label Operation Operand X Data Transfer Data Transfer Comment 2 2 DSP56307EVM User s Manual Motorola Writing the Program 2 1 1 1 Label Field The label field is the first field of a source statement and can take one of the following forms e A space or tab as the first character on a line ordinarily indicates that the label file is empty and that the line has no label An alphabetic character as the first character indicates that the line contains symbol called a label Anunderscore as the first character indicates that the label is local With the exception of some directives a label is assigned the value of the location counter of the first word of the instruction or data being assembled A line consisting of only a label is a valid line and assigns the value of the location counter to the label 2 1 1 2 Operation Field The operation field appears after the label field and must be preceded by at least one space or tab Entries in the operation field may be one of three types e Opcode mnemonics that correspond directly to DSP machine instructions Directive special operation co
97. ensitive components Do not remove components from antistatic packaging until required for installation Always transport sensitive components in antistatic packaging Locate jumper blocks J1 J4 J5 and J8 as shown in Figure 1 1 For block J1 make sure that there are jumpers connecting pins 3 and 4 and pins 5 and 6 For blocks 14 15 and 18 make sure that all positions on each block are jumpered These jumpers perform the following functions Jl controls the operating mode of the DSP56307 e 14 and 15 control the interface between the audio codec and the DSP56307 enhanced synchronous serial interface ESSIO e 18 controls the interface between the DSP56307 JTAG OnCE port and DSP56002 synchronous serial interface SSI Motorola Quick Start Guide 1 3 Installation Procedure J1 J2 LED MC74HQTO4 Q DSP56002 AT29LV010A swt SW3 Flash 44 34164 DSP56307 J10 lt E P6 OUT e T Debug 053384 J6 LED OnCE 33269 LM4880 MOTOROLA P2 Serial 54218 Power LED J4 J5 12 Figure 1 1 DSP56307EVM Component Layout
98. er Options C 34 C 3 42 1 Listing Format 35 3 42 2 Reporting Options 22 3454 C 35 3 42 3 Message o Oa Hie sce e C 35 C 3 42 4 symbol x t hU AST eg OE SCR Hee p ORT C 36 C 3 42 5 Assembler Operation 2o 255 5 tases TAN 5 Seabee eee ESI eS C 36 3 43 ORG Initialize Memory Space and Location Counters C 41 C 3 44 PAGE TopofPage Size C 44 C 3 45 Purge Macro Definition C 44 C 3 46 PRCTL Send Control String to Printer C 45 C 3 47 RADIX Change Input Radix for Constants C 45 C 3 48 RDIRECT Remove Directive or Mnemonic from Table C 46 C 3 49 SCSJMP Set Structured Control Statement Branching Mode C 46 iv DSP56307EVM User s Manual Motorola C 3 50 SCSREG Reassign Structured Control Statement Registers C 47 C351 SECTION Star Secu Ons oou oue 1t xn pes tice ee peo C 47 352 SEL 5et5ymbolto a Valle s De ERSTER UE BI Sub ds C 50 C353 SIITLE Initialize Program Sub Tille C 50 C 3 54 SYMOBJ Write Symbol Information to Object File C 50 C355 TABS Set Listi g Tab Stops AC LEES C 51 C 3 56 TITLE Initialize Program C 51 C 3 57 UNDE
99. er messages so that the message text is aligned and broken at word boundaries Motorola Motorola Assembler Notes C 37 Assembler Directives GL Make all section symbols global This has the same effect as declaring every section explicitly GLOBAL This option must be given before any sections are defined explicitly in the source file GS default reset in absolute mode Make all sections global static section counters and attributes are associated with the GLOBAL section This option must be given before any sections are defined explicitly in the source file HDR default reset Generate listing header along with titles and subtitles IC Ignore case in symbol section and macro names This directive must issued before any symbols sections or macros are defined IL Inhibit source listing This option will stop the assembler from producing a source listing INTR default reset in absolute mode Perform interrupt location checks Certain DSP instructions may not appear in the interrupt vector locations in program memory This option enables the assembler to check for these instructions when the program counter is within the interrupt vector bounds LB Increment load counter if different from runtime by number of bytes in DSP word to provide byte wide support for overlays in bootstrap mode This option must appear before any code or data generation LDB Use the listing file as the debug source file rather
100. ere must be white space blank tab between all operands and their associated operators including boolean operators in compound expressions Moreover there must be white space between the structured control directive and the expression and between the expression and any optional directive modifier THEN DO An assembler expression C 60 DSP56307EVM User s Manual Motorola Structured Control Statements used as an operand in a structured control statement expression must not have white space in it since it is parsed by the standard assembler evaluation routines IF CVI SQT 4 0 GT 2 no white space in first operand 4 3 7 FOR LOOP Formatting The FOR and LOOP directives represent special cases The FOR structured control statement consists of several fields lt opl gt lt op2 gt TO lt op3 gt BY lt op4 gt DO There must be white space between all operands and other syntactic entities such as TO BY and DO As with expression formatting an assembler expression used as an operand must not have white space in it X CNT 0 TO Y targ 2 1 BY CVI POW 2 0 CVF R In the example above the FOR loop operands represented as assembler expressions symbol function do not have embedded white space whereas the loop operands are always separated from structured control statement keywords by white space The count field of a LOOP statement must be separated from LOOP
101. erial Transmit Data Pin STDO 3 10 Source file end C 22 source statement format 2 2 SRAM 3 2 3 3 connections 3 3 SRAM Address Pins A 0 14 3 4 SRAM Chip Enable Pin E 3 4 SRAM Data Pins I0 0 23 3 4 SRAM memory map 3 4 SRAM Output Enable Pin OE 3 4 SRAM Write Enable Pin WE 3 4 stand alone operation 3 6 Stereo Headphones 3 8 Stereo Input 3 8 Stereo Output 3 8 String concatenation C 6 C 7 delimiter C 5 packed C 40 Symbol case C 38 cross reference C 37 Motorola Index Index v equate C 24 C 37 global C 38 listing C 40 set C 26 C 50 undefined C 40 U Unified Memory Map 3 4 W Warning C 40 Write Enable Pin WR 3 4 3 6 X X data transfer field 2 3 X Space Enable Bit BXEN 3 6 Y Y data transfer field 2 3 Y Space Enable Bit BYEN 3 6 Index vi DSP56307EVM User s Manual Motorola Quick Start Guide Example Test Program DSP56307EVM Technical Summary DSP56307EVM Schematics DSP56307EVM Parts List Motorola Assembler Notes Index Quick Start Guide Example Test Program DSP56307EVM Technical Summary DSP56307EVM Schematics DSP56307EVM Parts List Motorola Assembler Notes Index
102. gt GSET lt label gt lt expression gt The GSET directive is used to assign the value of the expression in the operand field to the label The GSET directive functions somewhat like the EQU directive However labels defined via the GSET directive can have their values redefined in another part of the program but only through the use of another GSET or SET directive The GSET C 26 DSP56307EVM User s Manual Motorola Assembler Directives directive is useful for resetting a global SET symbol within a section where the SET symbol would otherwise be considered local The expression in the operand field of a GSET must be absolute and cannot include a symbol that is not yet defined no forward references are allowed Note See also EQU SET Example C 49 GSET Directive COUNT GSET 0 INITIALIZE COUNT C 3 29 HIMEM Set High Memory Bounds HIMEM mem rl expression The HIMEM directive establishes an absolute high memory bound for code and data generation mem corresponds to one of the DSP memory spaces X Y L P E rl is one of the letters R for runtime counter or L for load counter The expression is an absolute integer value within the address range of the machine If during assembly the specified location counter exceeds the value given by expression a warning is issued Note A label is not allowed with this directive See also LOMEM Example C 50 HIMEM Directive
103. he following directives are used for structured control Note the leading period which distinguishes these keywords from other directives and mnemonics Structured control directives may be specified in either upper or lower case but they must appear in the opcode field of the instruction line i e they must be preceded either by a label a space or a tab ENDI LOOP CONTINUE ENDL REPEAT ELSE ENDW UNTIL ENDF FOR WHILE AF In addition the following keywords are used in structured control statements AND DOWNTO TO BY OR DO THEN Note AND DO and OR are reserved assembler instruction mnemonics Motorola Motorola Assembler Notes C 53 Structured Control Statements C 4 2 Syntax The formats for the BREAK CONTINUE FOR LOOP REPEAT and WHILE statements are given in sections 4 2 1 through C 4 2 7 Syntactic variables used in the formats are defined as follows e lt expression gt A simple or compound expression Section C 4 3 lt stmtlist gt Zero or more assembler directives structured control statements or executable instructions Note An assembler directive occurring within a structured control statement is examined exactly once at assembly time Thus the presence of a directive within a FOR LOOP REPEAT or WHILE statement does not imply repeated occurrence of an assembler directive nor does the presence of a directive within an F THEN ELSE structured control state
104. hen the assembler will always pick the shortest form of addressing consistent with the instruction format unless the FORCE LONG directive is active If this is not desired then the long absolute form of addressing can be forced by preceding the absolute address by the long addressing mode force operator Example C 16 Example of a Long Addressing Mode Force Operator Since the symbol DATAST is a not a forward reference in the following sequence of source lines the assembler would pick the short absolute form of addressing DATAST EQU Yi823 MOVE DO L Y DATAST If this is not desirable then the long absolute addressing mode can be forced as shown below DATAST EQU Y 923 MOVE DO L Y gt DATAST C 8 DSP56307EVM User s Manual Motorola Assembler Significant Characters C 2 15 Immediate Addressing Mode The pound sign is used to indicate to the assembler to use the immediate addressing mode Example C 17 Example of Immediate Addressing Mode CNST EQU 5 MOVE CNST DO L C 2 16 lt Immediate Short Addressing Mode Force Operator Many DSP instructions allow a short immediate form of addressing If the immediate data is known to the assembler on pass one not a forward or external reference or the FORCE SHORT directive is active then the assembler will always pick the shortest form of immediate addressing consistent with the instruction If the immediate data is a forward or external reference
105. in MF3 CCLK The control data is inputted on the rising edge of CCLK The serial control 2 SC12 pin is connected to the codec multi function pin 2 or the control data input pin MF2 CDIN This pin contains the control data for the codec 3 5 Command Converter The DSP56307EVM uses Motorola s DSP56002 to perform JTAG OnCE command conversion The DSP56002 serial communications interface SCI communicates with the host PC through an RS 232 connector The DSP56002 SCI receives commands from the host PC The set of commands may include read data write data reset OnCE module reset DSP56307 the HA2 pin of the DSP56002 is then used to reset the DSP56307 request OnCE module or release OnCE module The DSP56002 command converter software interprets the commands received from the PC and sends a sequence of instructions to the DSP56307 s JTAG OnCE port The DSP56307 may then continue to receive data or it may transmit data back to the DSP56002 The DSP56002 sends a reply to the host PC to give status information The set of replies may include acknowledge 3 10 DSP56307EVM User s Manual Motorola Command Converter good acknowledge bad in debug mode out of debug mode or data read When the DSP56307 is in the debug state the red debug LED LED2 is illuminated The DSP56002 connects to the DSP56307 JTAG OnCE port through the shorting jumper on J8 Table 3 5 shows the JTAG enable disable options The jumper must be present in J8 to use the DS
106. ion An error is issued if there is insufficient memory remaining to establish a valid base address Next the runtime location counter is advanced by the value of the integer expression in the operand field expression can have any memory space attribute The block of memory reserved is not initialized to any given value The result of expression must be an absolute integer greater than zero and cannot contain any forward references symbols that have not yet been defined Because the DSR directive is useful mainly for generating FFT buffers if expression is not a power of two a warning is generated label if present is assigned the value of the runtime location counter after a valid base address has been established Note See also DS DSM Example C 34 DSR Directive ORG 5100 R BUF DSR 8 REVERSE CARRY BUFFER FOR 16 POINT FFT C 3 14 DUP Duplicate Sequence of Source Lines lt label gt DUP lt expression gt ENDM The sequence of source lines between the DUP and ENDM directives are duplicated by the number specified by the integer lt expression gt lt expression gt can have any memory space attribute If the expression evaluates to a number less than or equal to zero the sequence of lines will not be included in the assembler output The expression result must be an absolute integer and cannot contain any forward references symbols that have not already been defined The DUP directive may
107. ise the comment is shifted right and aligned with the comment field in the listing file Example C 1 Example of Comment Delimiter THIS COMMENT BEGINS IN COLUMN 1 OF THE SOURCE FILE LOOP JSR COMPUTE THIS IS A TRAILING COMMENT THESE TWO COMMENTS ARE PRECEDED BY A TAB IN THE SOURCE FILE Motorola Motorola Assembler Notes C 1 Assembler Significant Characters C 2 2 Unreported Comment Delimiter Characters Unreported comments are any number of characters preceded by two consecutive semicolons that are not part of a literal string Unreported comments are not considered significant by the assembler and can be included in the source statement following the same rules as normal comments However unreported comments are never reproduced on the assembler output listing and are never saved as part of macro definitions Example C 2 Example of Unreported Comment Delimiter THESE LINES WILL NOT BE REPRODUCED IN THE SOURCE LISTING C 2 3 Line Continuation or Macro Argument Concatenation Character The following subsections define how the character can be used in two different instances C 2 3 1 Line Continuation The backslash character 1 if used as the last character on a line indicates to the assembler that the source statement continues on the following line The continuation line is concatenated to the previous
108. it the Debugger type quit at the command prompt Motorola Example Test Program 2 19 Running the Program 2 20 DSP56307EVM User s Manual Motorola Chapter 3 DSP56307EVM Technical Summary 3 1 DSP56307EVM Description and Features An overview description of the DSP56307EVM is provided in the DSP56307EVM Product Brief DSP56307EVMP D included with this kit The main features of the DSP56307EVM include the following e DSP56307 24 bit digital signal processor e FSRAM for expansion memory and Flash for stand alone operation e 16 bit CD quality audio codec Command converter circuitry 3 2 DSP56307 Description A full description of the DSP56307 including functionality and user information is provided in the following documents included as a part of this kit DSP56307 Technical Data Document order number DSP56307 D Provides features list and specifications including signal descriptions DC power requirements AC timing requirements and available packaging DSP56307 User s Manual Document order number DSP56307UM D Provides an overview description of the DSP and detailed information about the on chip components including the memory and I O maps peripheral functionality and control and status register descriptions for each subsystem DSP56300 Family Manual Document order number DSP56300FM AD Provides a detailed description of the core processor including internal status and con
109. ives Example C 46 FAIL Directive FAIL Parameter out of range 3 26 FORCE Operand Forcing Mode FORCE SHORT LONG NONE The FORCE directive causes the assembler to force all immediate memory and address operands to the specified mode as if an explicit forcing operator were used Note that if a relocatable operand value forced short is determined to be too large for the instruction word an error will occur at link time not during assembly Explicit forcing operators override the effect of this directive Note A label is not allowed with this directive See also gt lt gt Example C 47 FORCE Directive FORCE SHORT force operands short C 3 27 GLOBAL Global Section Symbol Declaration GLOBAL lt symbol gt lt symbol gt lt symbol gt The GLOBAL directive is used to specify that the list of symbols is defined within the current section and that those definitions should be accessible by all sections This directive is only valid if used within a program block bounded by the SECTION and ENDSEC directives If the symbols that appear in the operand field are not defined in the section an error is generated Note A label is not allowed with this directive See also SECTION XDEF XREF Example C 48 GLOBAL Directive SECTION IO GLOBAL LOOPA LOOPA will be globally accessible by other sections ENDSEC 3 28 GSET Set Global Symbol to a Value lt label gt GSET lt expression
110. lar buffers Any modulo or reverse carry buffers defined in the object file input sections are relocated independently in order to optimize placement in memory Code and data surrounding the buffer are packed to fill the space formerly occupied by the buffer and any corresponding alignment gaps Example dsplnk A myprog cin Links the file myprog cln and optimally aligns any buffers encountered in the input B objfil Specifies that an object file is to be created for linker output lt objfil gt can be any legal operating system filename including an optional pathname If no filename is specified or if the B option is not present the linker uses the basename filename without extension of the first filename encountered in the input file list and appends cld to the basename If the I option is present see below an explicit filename must be given because if the linker follows the default action it can overwrite one of the input files The B option is specified only once If the file named in the B option already exists it is overwritten Example Bfilter cld fft cin Links the files main cln fft cln and fio cln together to produce the absolute executable file filter cld EAcerrfil gt or Allows the standard error output file to be reassigned on hosts that do not support error EWeerrfil gt output redirection from the command line lt errfil gt must be present as an argument but it ca
111. les Additionally if a macro is defined through the MACLIB directive which has the same name as an existing directive or opcode it will not automatically replace that directive or opcode as previously described In this case the RDIRECT directive must be used to force the replacement Since the effect of this directive is global it cannot be used in an explicitly defined section see SECTION directive An error results if the RDIRECT directive is encountered in a section Note A label is not allowed with this directive Example C 69 RDIRECT Directive RDIRECT PAGE MOVE This causes the assembler to remove the PAGE directive from the directive table and the MOVE mnemonic from the mnemonic table C 3 49 SCSJMP Set Structured Control Statement Branching Mode SCSJMP SHORT LONG NONE The SCSJMP directive is analogous to the FORCE directive but it only applies to branches generated automatically by structured control statements See Section C 4 on page C 53 There is no explicit way as with a forcing operator to force a branch short or long when it is produced by a structured control statement This directive causes all branches resulting from subsequent structured control statements to be forced to the specified mode C 46 DSP56307EVM User s Manual Motorola Assembler Directives Just like the FORCE pseudo op errors can result if a value is too large to be forced short For relocatable code the error may not oc
112. lier Accumulate MAC which multiplies two values and adds the result to the contents of an accumulator Example 2 1 Simple DSP56307EVM Code Example ER ERER ER BRIBE KEK AREAL LOR CRE ARIK ERRER RAR ERRER EK 7A SIMPLE PROGRAM CALCULATING THE SUM OF PRODUCTS PBASE EQU 100 instruct the assembler to replace every occurrence of PBASE with 200 XBASE EQU 0 used to define the position of the data in X memory YBASE EQU 0 used to define the position of the data in Y memory X MEMORY org X XBASE instructs the assembler that we are referring to X memory starting at location XBASE 11551 5475638 5738301 592673 5898978 5091271 51 25067 dc 987153 3A8761 987237 345852 734623 233763 dc 5776156 5423423 324732 40029 RRR RARE TKK RAIL RAR RRA DARA Y MEMORY EERE RAE ELAR EEE ERRER AAR ADE KEKE BR BREAK RRR RR EER ERER RAL ALR EE org y YBASE instructs the assembler that we are referring to Y memory starting at location YBASE list2 dc 98734 800000 487327
113. lines the symbol CNST is known to the assembler on pass one and therefore the assembler would use the short immediate addressing form for the MOVE instruction CNST EQU 5 MOVE fCNST DO0 L If this is not desirable then the long immediate form of addressing can be forced as shown below CNST EQU 5 MOVE gt CNST DO L C 3 Assembler Directives The following subsections define each directive and its use C 3 1 BADDR Set Buffer Address BADDR lt M R gt lt expression gt The BADDR directive sets the runtime location counter to the address of a buffer of the given type the length of which in words is equal to the value of lt expression gt The buffer type may be either modulo or reverse carry If the runtime location counter is not zero this directive first advances the runtime location counter to a base address that is a multiple of 2k where 2 gt lt expression gt An error is issued if there is insufficient memory remaining to establish a valid base address Unlike other buffer allocation directives the runtime location counter is not advanced by the value of the integer expression in the operand field the location counter remains at the buffer base address The block of memory intended for the buffer is not initialized to any value The result of lt expression gt may have any memory space attribute but must be an absolute integer greater than zero and cannot contain any forward references symbols that hav
114. lt offset gt or lt length gt exceed the length of lt string gt Example C 13 Example of a Substring Delimiter DEFINE ID DSP56000 3 5 ID 56000 C 2 12 lt lt Short Addressing Mode Force Operator Many DSP instructions allow an I O short form of addressing If the value of an absolute address is known to the assembler on pass one then the assembler will always pick the shortest form of addressing consistent with the instruction format If the absolute address is not known to the assembler on pass one that is the address is a forward or external reference then the assembler picks the long form of addressing by default If this is not desired then the I O short form of addressing can be forced by preceding the absolute address by the I O short addressing mode force operator Example C 14 Example of an I O Short Addressing Mode Force Operator Since the symbol IOPORT is a forward reference in the following sequence of source lines the assembler would pick the long absolute form of addressing by default BTST 4 IOPORT EQU Y SFFF3 Because the long absolute addressing mode would cause the instruction to be two words long instead of one word for the I O short absolute addressing mode it would be desirable to force the I O short absolute addressing mode as shown below BIST 4 lt lt EQU Y SFFF3 C 2 13 Short Addressing Mode Fo
115. luded as part of the source file being assembled only if the expression has a nonzero result If the expression has a value of zero the source file is assembled as if those statements between the IF and the ENDIF directives were never encountered If the ELSE directive is present and expression has a nonzero result then the statements between the IF and ELSE directives are assembled and the statements between the ELSE and ENDIF directives are skipped Alternatively if expression has a value of zero then the statements between the IF and ELSE directives are skipped and the statements between the ELSE and ENDIF directives are assembled The expression must have an absolute integer result and is considered true if it has a nonzero result The expression is false only if it has a result of zero Because of the nature of the directive expression must be known on pass one no forward references allowed IF directives can be nested to any level The ELSE directive will always refer to the nearest previous IF directive as will the ENDIF directive Note A label is not allowed with this directive See also ENDIF C 28 DSP56307EVM User s Manual Motorola Assembler Directives Example C 52 IF Directive IF LST gt 0 DUP LST Unwind LIST directive stack NOLIST ENDM ENDIF C 3 32 INCLUDE Include Secondary File INCLUDE lt string gt lt lt string gt gt This directive is inser
116. macro calls MD Print macro definitions MEX Print macro expansions MU Print memory utilization report NL Print conditional assembly and section nesting levels S Print symbol table U Print skipped conditional assembly lines C 3 42 3 Message Control These options control the types of assembler messages that are generated AE Check address expressions MSW Warn on memory space incompatibilities UR Flag unresolved references W Display warning messages Motorola Motorola Assembler Notes C 35 Assembler Directives C 3 42 4 Symbol Options These options deal with the handling of symbols by the assembler DEX Expand DEFINE symbols within quoted strings IC Ignore case in symbol names NS Support symbol scoping in nested sections SCL Scope structured control statement labels SCO Structured control statement labels to listing object file SO Write symbols to object file XLL Write local labels to object file XR Recognize XDEFed symbols without XREF C 3 42 5 Assembler Operation These are miscellaneous options having to do with internal assembler operation CC Enable cycle counts CK Enable checksumming CM Preserve comment lines within macros CONST Make EQU symbols assembly time constants CONTCK Continue checksumming DLD Do not restrict directives in loops GL Make all section symbols global GS Make all sections global static INTR Perform interrupt location che
117. mbling the 2 12 example program 2 3 Expansion Bus Control 3 15 Expression address C 37 compound C 60 condition code C 58 formatting C 60 operand comparison C 59 radix C 45 simple C 58 External Access Type Bits BAT 1 0 3 5 F field comment 2 3 data transfer 2 3 label 2 2 operand 2 3 operation 2 2 X data transfer 2 3 Y data transfer 2 3 File include C 29 listing C 38 Flash 3 2 Flash Address Pins A 0 16 3 6 Flash Chip Enable Pin CE 3 6 Flash Data Pins I O 0 7 3 6 Flash Output Enable Pin OE 3 6 Flash PEROM 3 2 3 6 connections 3 6 stand alone operation 3 6 Flash Write Enable Pin WE 3 6 format assembler command 2 5 source statement 2 2 Function C 6 G GS71024T 10 3 3 H headphones 1 2 Host Address Pin HA2 3 10 host PC 3 10 Host PC Data Terminal Ready Pin DTR 3 12 Host PC Receive Data Pin RD 3 12 host PC requirements 1 2 Host PC Transmit Data Pin TD 3 11 Host Port 108 3 14 Include file C 29 J J1 1 3 J4 1 3 3 8 J5 1 3 3 8 J6 3 12 J7 3 7 J8 1 3 3 11 19 3 3 3 7 JTAG 3 10 K kit contents 1 1 L Label local C 38 C 40 label field 2 3 LED red 3 11 Line continuation C 2 linker 2 1 2 12 directives 2 16 options 2 13 linker directives 2 16 Listing file C 38 format C 31 C 37 C 38 C 40 C 44 C 51 Motorola Index Index iii sub title C 50 title C 51 LM4880 3 8 Location counter C 6 C 41 Long Memory Data Moves 3 4 Macro call C 38 comment C
118. ment imply conditional assembly e lt 1 gt user defined operand whose register memory location holds the FOR loop counter The effective address must use a memory alterable addressing mode i e it cannot be an immediate value e lt op2 gt The initial value of the FOR loop counter The effective address may any mode and may represent an arbitrary assembler expression e lt op3 gt The terminating value of the FOR loop counter The effective address may be any mode and may represent an arbitrary assembler expression e lt op4 gt The step increment decrement of the loop counter each time through the loop If not specified it defaults to a value of 1 The effective address may be any mode and may represent an arbitrary assembler expression lt cnt gt The terminating value in a LOOP statement This can be any arbitrary assembler expression structured control statements may be followed by normal assembler comments on same logical line C 4 2 1 BREAK Statement BREAK The BREAK statement causes an immediate exit from the innermost enclosing loop construct WHILE REPEAT FOR LOOP A BREAK statement does not exit an IF THEN ELSE construct If a is encountered with no loop statement active warning is issued Note BREAK should be used with care near ENDL directives or near the end of DO loops It generates a jump instruction which is illegal in those co
119. n be any legal operating system filename including an optional pathname The EA option causes the standard error stream to be written to lt errfil gt if lt errfil gt exists the output stream is appended to the end of the file The EW option also writes the standard error stream to lt errfil gt if lt errfil gt exists it is overwritten Example dspink EWerrors myprog cin Redirects the standard error output to the file errors If the file already exists it is overwritten F argfil Indicates that the linker should read command line input from lt argfil gt which can be any legal operating system filename including an optional pathname lt argfil gt is a text file containing further options arguments and filenames to be passed to the linker The arguments in the file need be separated only by white space A semicolon on a line following white space makes the rest of the line a comment Example dsplnk Fopts cmd This example invokes the linker and takes command line options and input filenames from the command file opts cmd Motorola Example Test Program 2 13 Linker Options Table 2 2 Linker Options Option Description Sends source file line number information to the object file The generated line number information can be used by debuggers to provide source level debugging Example dspink B Gmyprog cin Links the file myprog cln and sends source file line number information to
120. nects the ESSII pins of the DSP56307 to the control pins of the CS4218 Jumper block 15 connects the ESSIO pins of the DSP56307 to the data pins of the 54218 By removing these jumpers the user has full access to the ESSIO and ESSII pins of the DSP56307 The following sections describe the connections for the analog and digital sections of the codec 3 4 1 Codec Analog Input Output The DSP56307EVM contains 1 8 inch stereo jacks for stereo input output and headphones Figure 3 7 shows the analog circuitry of the codec CS4218 Headphones aleren RIN2 P5 Input P4 LIN2 LM4880 X HRIN1 nuse LOUT A utput ROUT i AA1611 Figure 3 7 Codec Analog Input Output Diagram The stereo jack labelled P4 IN on the DSP56307EVM connects to the codec right and left input pins RIN2 and LIN2 Standard line level inputs are 2 Vpp and the codec requires that input levels be limited to 1 Vpp Thus a voltage divider forms a 6 dB attenuator between P4 and the 54218 The codec right and left channel output pins ROUT and LOUT provide their output analog signals through the stereo jack labelled P6 OUT on the DSP56307EVM The outputs of the codec are also connected to the stereo jack labelled PS HDPHNE on the DSP56307EVM through National Semiconductor s LM4880 dual audio power amplifier at U8 The headphone stereo jack permits direct connection of stereo headphone
121. ning instructions between a control statement and its termination are not known by the assembler The programmer may circumvent this behavior by use of the SCSJMP directive Any immediate operands must be preceded by a pound sign Memory references must be preceded by a memory space qualifier X Y or P L memory references are not allowed Operands must be or refer to single word values Note that values in the lt reg1 gt and lt reg2 gt data registers are not saved before expression evaluation This means that any user data in those registers are overwritten each time the expression is evaluated at runtime The programmer should take care either to save needed Motorola Motorola Assembler Notes C 59 Structured Control Statements contents of the registers reassign data registers using the SCSREG directive or not use them at all in the body of the particular structured construct being executed C 4 3 4 Compound Expressions A compound expression consists of two or more simple expressions See Section C 4 3 1 joined by a logical operator AND or OR The boolean value of the compound expression is determined by the boolean values of the simple expressions and the nature of the logical operator Note that the result of mixing logical operators in a compound expression is undefined x1 lt GT gt B AND LS AND NE R2 this is Xl LE AND IC OR R5 GT R6 undefined The
122. nnections The basic connection for the Flash is shown in Figure 3 6 DSP56307 Flash 0 16 gt A0 A16 00 07 af 00 07 RD OE WE m AA1610 Figure 3 6 Flash Connections The flash address pins 0 16 connect the respective port A address pins on the DSP The flash data input output pins I O0 1 O7 are connected to the DSP56307 D0 D7 pins The flash write enable WE and output enable OE lines connect the DSP56307 write WR and read RD enable lines respectively Address attribute 1 AAT generates the flash chip enable CE 3 3 2 2 Programming for Stand Alone Operation The DSP56307 mode pins determine the chip operating mode and start up procedure when the DSP56307 exits the reset state The switch at SW1 resets the DSP56307 by 3 6 DSP56307EVM User s Manual Motorola Audio Codec asserting and then clearing the RESET pin of the DSP56307 The mode pins MODA MODB MODC and MODD are sampled as the DSP56307 exits the reset state The mode pins for the DSP56307EVM are controlled by jumper block J1 shown in Figure 3 1 on page 3 2 and Table 3 15 on page 3 16 The DSP56307 boots from the Flash after reset if there are jumpers connecting pins 3 and 4 and pins 5 and 6 on J1 Mode 1 MODA and MODD are set and MODB and MODC are cleared 3 4 Audio Codec The DSP56307EVM analog section uses Crystal Semiconductor s CS4218 KQ for two channels of 16 bit A D conve
123. nter is advanced by the number of words generated Note See also BSC BSB DC Example C 23 Block Storage Modulo Directive BUFFER BSM BUFSIZ SFFFFFFFF INITIALIZE BUFFER TO ALL ONES C 3 5 BUFFER Start Buffer BUFFER lt M R gt lt expression gt The BUFFER directive indicates the start of a buffer of the given type Data is allocated for the buffer until an ENDBUF directive is encountered Instructions and most data definition directives may appear between the BUFFER and ENDBUF pair although BUFFER directives may not be nested and certain types of directives such as MODE ORG SECTION and other buffer allocation directives may not be used The lt expression gt represents the buffer size If less data is allocated than the size of the buffer the remaining buffer locations are uninitialized If more data is allocated than the specified size of the buffer an error is issued C 12 DSP56307EVM User s Manual Motorola Assembler Directives The BUFFER directive sets the runtime location counter to the address of a buffer of the given type the length of which in words is equal to the value of expression The buffer type may be either modulo or reverse carry If the runtime location counter is not zero this directive first advances the runtime location counter to a base address that is a multiple of 2 where 27 gt expression An error is issued if there is insufficient memory remaining to establish
124. ntexts C 54 DSP56307EVM User s Manual Motorola Structured Control Statements Example C 82 BREAK Statement WHILE x rl GT 0 loop until zero is found SIE lt cs gt BREAK causes exit from WHILE loop ENDI any instructions here are skipped ENDW execution resumes here after BREAK 4 2 2 CONTINUE Statement CONTINUE The CONTINUE statement causes the next iteration of a looping construct WHILE REPEAT FOR LOOP to begin This means that the loop expression or operand comparison is performed immediately bypassing any subsequent instructions If a CONTINUE is encountered with no loop statement active a warning is issued Note CONTINUE should be used with care near ENDL directives or near the end of DO loops It generates a jump instruction which is illegal in those contexts One or more CONTINUE directives inside a LOOP construct will generate a NOP instruction just before the loop address Example C 83 CONTINUE Statement REPEAT lt cs gt CONTINUE causes immediate jump to UNTIL ENDI any instructions here are skipped UNTIL x 11 EQ 0 evaluation here after CONTINUE C 4 2 3 FOR Statement FOR lt 1 gt lt 2 gt TO DOWNTO op3 BY lt op4 gt DO stmtlist Initialize lt 1 gt to lt 2 gt and perform lt stmtlist gt until lt 1 gt is greater TO or less
125. nts RADIX lt expression gt Changes the input base of constants to the result of lt expression gt The absolute integer expression must evaluate to one of the legal constant bases 2 10 or 16 The default radix is 10 The RADIX directive allows the programmer to specify constants in a preferred radix without a leading radix indicator The radix prefix for base 10 numbers is the grave accent Note that if a constant is used to alter the radix it must be in the appropriate input base at the time the RADIX directive is encountered Note A label is not allowed with this directive Motorola Motorola Assembler Notes C 45 Assembler Directives Example C 68 RADIX Directive RAD10 DC 10 Evaluates to hex A RADIX 2 __ 2 DC 10 Evaluates to hex 2 RADIX 16 RAD16 DC 10 Evaluates to hex 10 RADIX 3 Bad radix expression C 3 48 RDIRECT Remove Directive or Mnemonic from Table RDIRECT lt direc gt lt direc gt lt direc gt The RDIRECT directive is used to remove directives from the assembler directive and mnemonic tables If the directive or mnemonic that has been removed is later encountered in the source file it is assumed to be a macro Macro definitions that have the same name as assembler directives or mnemonics will cause a warning message to be output unless the RDIRECT directive has been used to remove the directive or mnemonic name from the assembler s tab
126. nts a counter that is checked for a positive value and is symmetrical with respect to the NOLIST directive Motorola Motorola Assembler Notes C 29 Assembler Directives Note the following sequence Counter value currently 1 LIST Counter value 2 LIST Counter value 3 NOLIST Counter value 2 NOLIST Counter value 1 The listing still would not be disabled until another NOLIST directive was issued Note A label is not allowed with this directive See also NOLIST OPT Example C 54 LIST Directive IF LISTON LIST Turn the listing back on C 3 34 LOCAL Local Section Symbol Declaration LOCAL lt symbol gt lt symbol gt lt symbol gt The LOCAL directive is used to specify that the list of symbols is defined within the current section and that those definitions are explicitly local to that section It is useful in cases where a symbol is used as a forward reference in a nested section where the enclosing section contains a like named symbol This directive is only valid if used within a program block bounded by the SECTION and ENDSEC directives The LOCAL directive must appear before lt symbol gt is defined in the section If the symbols that appear in the operand field are not defined in the section an error is generated Note A label is not allowed with this directive See also SECTION XDEF XREF Example C 55 LOCAL Directives SECTION IO LOCAL LOOPA LOOPA local to
127. of the unknown directive name or else an error will result when the source line is restored and processed However the processed file is not limited to macro definitions and can include any legal source code statements Multiple MACLIB directives may be given in which case the assembler will search each directory in the order in which it is encountered Note A label is not allowed with this directive See also INCLUDE Example C 58 MACLIB Directive MACLIB macros mymacs IBM PC example MACLIB fftlib UNIX example C 3 38 MACRO Macro Definition label MACRO lt dummy argument list gt lt macro definition statements gt ENDM The dummy argument list has the following form lt dumarg gt lt dumarg gt lt dumarg gt The required label is the symbol by which the macro is called If the macro is named the same as an existing assembler directive or mnemonic a warning is issued This warning can be avoided with the RDIRECT directive The definition of a macro consists of three parts the header which assigns a name to the macro and defines the dummy arguments the body which consists of prototype or skeleton source statements and the terminator The header is the MACRO directive its label and the dummy argument list The body contains the pattern of standard source statements The terminator is the ENDM directive The dummy arguments are symbolic names that the macro processor replaces with
128. ograms gives instructions on how to assemble programs and shows how the Debugger can verify the operation of programs Figure 2 1 shows the development process flow for assembly programs The rounded blocks represent the assembly and object files The white blocks represent software programs to assemble and link the assemble programs The gray blocks represent hardware products The following sections give basic information on the assembly program the assembler the linker and the object files For detailed information on these subjects consult the assembler and linker manuals provided with the Motorola DSP CLAS software package available through your Motorola sales office or distributor The documentation is also available through the Motorola Wireless internet URL http www mot com SPS DSP documentation Motorola Example Test Program 2 1 Writing the Program Assembly Program asm Assembler Relocatable Object File Linker C Executable N Object File cld ADS Command DSP56002 Converter Card Y P DSP56307 DSP56307EVM Figure 2 1 Development Process Flow 2 1 Writing the Program The following sections describe the format of assembly language source statements and give an example assembly program 2 1 4 Source Statement Format Programs written in assembly language consist of a sequence of source stat
129. on warnings as well as errors 2 Allows the linker to strip source file line number and symbol information from the output file Symbol information normally is retained for debugging purposes This option has no effect if incremental linking is being done See the I option Example dspink Zfilter cln fft cln fio cln Links the files filter cln fft cln and fio cln to produce the absolute object file filter cln The output file contains no symbol or line number information 2 4 1 Linker Directives Similar to the assembler directives the linker includes mnemonic directives which specify auxiliary actions to be performed by the linker Following is a list of the linker directives BALIGN Auto align circular buffers BASE Set region base address IDENT Object module identification INCLUDE Include directive file MAP Map file format control MEMORY Set region high memory address REGION Establish memory region RESERVE Reserve memory block 2 16 DSP56307EVM User s Manual Motorola Introduction to the Debugger Software SBALIGN Auto align section buffers SECSIZE Pad section length Set section base address SET Set symbol value SIZSYM Set size symbol START Establish start address SYMBOL Set symbol value 2 5 Introduction to the Debugger Software This section briefly introduces the Domain Technologies Debugger giving only the details required to work
130. onditional assembly directive UR Generate a warning at assembly time for each unresolved external reference This option works only in relocatable mode W default reset Print all warning messages WEX Add warning count to exit status Ordinarily the assembler exits with a count of errors This option causes the count of warnings to be added to the error count XLL Write underscore local labels to object file This is primarily used to aid debugging This option if used must be specified before the first symbol in the source program is defined C 40 DSP56307EVM User s Manual Motorola Assembler Directives XR Causes XDEFed symbols to be recognized within other sections without being XREFed This option if used must be specified before the first symbol in the source program is encountered Example C 63 OPT Directive OPT CEX MEX Turn on DC and macro expansions OPT CRE MU Cross reference memory utilization C 3 43 ORG Initialize Memory Space and Location Counters ORG rms rlc rmp exp1 1ms 1l11c lmp lt 2 gt 1 ORG lt rms gt lt rmp gt lt rce gt lt 1 gt lt lms gt lt lmp gt lt 1 gt lt exp2 gt The ORG directive is used to specify addresses and to indicate memory space and mapping changes It also can designate an implicit counter mode switch in the assembler and serves as a mechanism for initiating overlays
131. or 25 V C124 C126 dc C9 C12 C13 C14 C15 C17 Murata GRM40 X7R104K025BL 0 1 uF Capacitor C18 C35 C37 C50 C51 C52 C53 C54 C61 C62 C64 C79 C80 C96 C101 C104 C105 C106 C110 C122 C123 C125 C16 C40 C55 C56 C57 Murata GRMA40 X7R103K050BL 0 01 uF Capacitor C58 C60 C65 C67 C68 C102 C103 C107 C108 C109 B 2 DSP56307EVM User s Manual Motorola Parts Listing Table B 1 DSP56307EVM Parts List Continued Designator Manufacturer Part Number Description C10 Panasonic PCS1475CT 4 7 Capacitor 6 3 V de C2 C3 C4 C23 C24 C39 Murata GRM42 6Y5V334Z025BL 0 33 uF Capacitor C21 C22 C25 Murata GRM42 6Y5V474Z025BL 0 47 uF Capacitor C38 Murata GRM42 6Y5V684Z025BL 0 68 uF Capacitor C19 C20 Xicon 140 CC501N331J 330 pF Capacitor C26 C27 Murata GRM40 COG222J050BL 2200 pF Capacitor C63 Murata GRM40 X7R821KO50BL 820 pF Capacitor C5 C6 C7 C8 AVX TPSV476 025R0300 47 uF Capacitor 10 V dc C32 C33 Panasonic PCE3028CT 470 uF Capacitor 6 3 V de C1 Xicon XAL16V1000 1000 Capacitor 16 V dc 112131415 Murata BLO1RN1 A62 Ferrite Bead L6 Murata LQH4N150K04M00 Inductor R1 R37 NIC NRC12RF1001TR 1 KQ Resistor R3 Xicor 260 5K 5 KQ Resistor R4 R7 R8 R9 R11 R12 NIC NRC12RF1002TR 10 Resistor R13 R14 R15 R18 R19 R20 R21 R22 R31 R32 R33 R34 R35 R36 R38 R39 R25 R26 R27 R28 Xicor 260 20K 20 Resistor R23 R24 NIC NRC12RF3922TR 39 2
132. preserved in the macro definition CONST EQU symbols are maintained as assembly time constants and will not be sent to the object file This option if used must be specified before the first symbol in the source program is defined CONTC Reenable cycle counts Does not clear total cycle counts The cycle count for each instruction is shown on the output listing CONTCK Reenable checksumming of instructions and data Does not clear cumulative checksum value CRE Print a cross reference table at the end of the source listing This option if used must be specified before the first symbol in the source program is defined DEX Expand DEFINE symbols within quoted strings Can also be done on a case by case basis using double quoted strings DLD Do not restrict directives in DO loops The presence of some directives in DO loops does not make sense including some OPT directive variations This option suppresses errors on particular directives in loops DxL default reset Expand DEFINE directive strings in listing FC Fold trailing comments Any trailing comments that are included in a source line are folded underneath the source line and aligned with the opcode field Lines that start with the comment character are aligned with the label field in the source listing The FC option is useful for displaying the source listing on 80 column devices FF Use form feeds for page ejects in the listing file FM Format assembl
133. ptional condition checking The assembly proceeds normally after the warning has been printed An arbitrary number of strings and expressions in any order but separated by commas with no intervening white space can be specified optionally to describe the nature of the generated warning Note A label is not allowed with this directive See also FAIL MSG Example C 79 WARN Directive WARN parameter too large C 3 59 XDEF External Section Symbol Definition XDEF lt symbol gt lt symbol gt lt symbol gt The XDEF directive is used to specify that the list of symbols is defined within the current section and that those definitions should be accessible by sections with a corresponding XREF directive This directive is only valid if used within a program section bounded by the SECTION and ENDSEC directives The XDEF directive must appear before lt symbol gt is defined in the section If the symbols that appear in the operand field are not defined in the section an error is generated Note A label is not allowed with this directive See also SECTION XREF Example C 80 XDEF Directive SECTION IO XDEF LOOPA LOOPA will be accessible by sections with XREF ENDSEC C 3 60 XREF External Section Symbol Reference XREF lt symbol gt lt symbol gt lt symbol gt The XREF directive is used to specify that the list of symbols is referenced in the current section but is not defined within the current section
134. r prefixes the filename and optional pathname of the file specification with pathname and searches the newly formed directory pathname for the file The pathname must be a legal operating system pathname The P option can be repeated as many times as desired Example testprog Uses IBM PC pathname conventions and causes the linker to prefix any library files not found in the current directory with the project pathname Rectifil gt Indicates that a memory control file is to be read to determine the placement of sections into DSP memory and other linker control functions lt ctlfil gt can be any legal operating system filename including an optional pathname If a pathname is not specified an attempt is made to open the file in the current directory If no filename is specified the linker uses the basename filename without extension of the first filename encountered in the link input file list and append ctl to the basename If the R option is not specified then the linker does not use a memory control file The R option is specified only once Example dsplnk Rproj filter cln gauss cin Links the files filter cln and gauss cln using the memory file proj ctl U lt symbol gt Allows the declaration of an unresolved reference from the command line lt symbol gt must be specified This option is useful for creating an undefined external reference in order to force linking entirely from a
135. ra dos TRI OI NR E IRIS ga RE Ue C 42 C 65 PAGE Ditectiye a carne Cth C 44 C 66 Directives ims sey sha Reste ee ect AR nee y eds wir Rios C 45 C 67 PRCTLEDIICGDVE Re AUR VINE Ee dto edel ten C 45 C 68 RADIX DIG Cui es too o eos esie o Cer a da Ri sand sed ca C 46 C 69 RDIRECT Directive ote aT questi se b Eae ee oes C 46 C 70 Direc cic aun Caen Cole et Oh ee ee A C 47 C 71 Cece case kia SG ey A eR Ae IE eae C 47 C 72 SECTION Directive 5 REA ES arto dE TRES C 50 C 73 SET DIG OHV eats otto o boe iot eed oa P s C 50 C 74 STETLE DIISGUVE s Deseo C 50 C 75 e M Bod a Aer ad o C 51 C 76 TABS Es ooo eoe aD S entes das UNI cd C 51 77 cae REST EOS esee sre C 51 C 78 UNDEF sion Sha st ES E NE ES C 51 C 79 WARN ory acetate ey Aah anh PvE Sea anc are hep C 52 C 80 DE DI eC eis acer end sa eic sa ac ale qos A RC PASA E C 52 C 81 XREF cad He ERO S CR ete eens Ree ud C 53 C 82 BREAK Statement c 65 4 cu paid ie ed eed e d dams C 55 C 83 CONTINUE Statements sib ees ar d a c sae Qu VEA C 55 C 84 FOR Sau po PRS ORDA Dawe ERE C 56 C 85 JE cS URS TAS Ny seg eae o De ent op sen ES ie ea Sa C 56 C 86 LOOP S
136. rated Motorola Motorola Assembler Notes C 11 Assembler Directives Note See also BSM BSB DC Example C 22 Block Storage of Constant Directive UNUSED BSC S2FFF LCV R SFFFFFFFF FILL UNUSED EPROM C 3 4 BSM Block Storage Modulo lt label gt BSM lt expression gt lt expression gt The BSM directive causes the assembler to allocate and initialize a block of words for a modulo buffer The number of words in the block is given by the first expression which must evaluate to an absolute integer Each word is assigned the initial value of the second expression If there is no second expression an initial value of zero is assumed If the runtime location counter is not zero this directive first advances the runtime location counter to a base address that is a multiple of 2 where is greater than or equal to the value of the first expression An error will occur if the first expression contains symbols that are not yet defined forward references has a value of less than or equal to zero or falls outside the range 2 lt lt expression gt lt m where m is the maximum address of the target DSP Both expressions may have any memory space attribute lt label gt if present is assigned the value of the runtime location counter after a valid base address has been established Only one word of object code is shown on the listing regardless of how large the first expression is However the runtime location cou
137. rce Operator Many DSP instructions allow a short form of addressing If the value of an absolute address is known to the assembler on pass one or the FORCE SHORT directive is active then the assembler will always pick the shortest form of addressing consistent with the instruction format If the absolute address is not known to the assembler on pass one that is the address is a forward or external reference then the assembler picks the long form of addressing by default If this is not desired then the short absolute form of addressing Motorola Motorola Assembler Notes 7 Assembler Significant Characters can be forced by preceding the absolute address by the short addressing mode force operator Example C 15 Example of a Short Addressing Mode Force Operator Since the symbol DATAST is a forward reference in the following sequence of source lines the assembler would pick the long absolute form of addressing by default MOVE DO L Y DATAST DATAST EQU Y 923 Because the long absolute addressing mode would cause the instruction to be two words long instead of one word for the short absolute addressing mode it would be desirable to force the short absolute addressing mode as shown below MOVE DO L lt DATAST DATAST EQU Y 23 C 2 14 gt Long Addressing Mode Force Operator Many DSP instructions allow a long form of addressing If the value of an absolute address is known to the assembler on pass one t
138. relocatable but data hiding within an enclosing section is not required The division of a program into sections controls not only labels and symbols but also macros and DEFINE directive symbols Macros defined within a section are private to that section and are distinct from macros defined in other sections even if they have the same macro name Macros defined outside of sections are considered global and may be used within any section Similarly DEFINE directive symbols defined within a section are private to that section and DEFINE directive symbols defined outside of any section are globally applied There are no directives that correspond to XDEF for macros or DEFINE C 48 DSP56307EVM User s Manual Motorola Assembler Directives symbols and therefore macros and DEFINE symbols defined in a section can never be accessed globally If global accessibility is desired the macros and DEFINE symbols should be defined outside of any section Sections can be nested to any level When the assembler encounters a nested section the current section is stacked and the new section is used When the ENDSEC directive of the nested section is encountered the assembler restores the old section and uses it The ENDSEC directive always applies to the most previous SECTION directive Nesting sections provides a measure of scoping for symbol names in that symbols defined within a given section are visible to other sections nested within it For example if
139. rol symbol definition are as follows ENDSEC End section EQU Equate symbol to a value GLOBAL Global section symbol declaration GSET Set global symbol to a value LOCAL Local section symbol declaration SECTION Start section SET Set symbol to a value XDEF External section symbol definition XREF External section symbol reference Motorola Example Test Program 2 9 Assembling the Program 2 2 3 4 Data Definition Storage Allocation The directives to control constant data definition and storage allocation are as follows BADDR Set buffer address BSB Block storage bit reverse BSC Block storage of constant BSM Block storage modulo BUFFER Start buffer DC Define constant DCB Define constant byte DS Define storage DSM Define modulo storage DSR Define reverse carry storage ENDBUF End buffer 2 2 3 5 Listing Control and Options The directives to control the output listing are as follows LIST List the assembly LSTCOL Set listing field widths NOLIST Stop assembly listing OPT Assembler options PAGE Top of page size page PRCTL Send control string to printer STITLE Initialize program subtitle TABS Set listing tab stops TITLE Initialize program title 2 10 DSP56307EVM User s Manual Motorola Assembling the Program 2 2 3 6 Object File Control The directives for control of the object file are as follows COBJ Commen
140. rola MC74HCTO4AD Hex Inverter U11 Maxim MAX212CAG RS 232 Transceiver U23 Motorola MC33269DT 3 3 3 3 V Regulator U24 Motorola MC33269DT 5 0 5 V Regulator U25 Motorola MC33269DT Adj Regulator D1 D2 D3 D4 D5 Rectron 4001 1 4001 Diode 06 D7 Motorola MMBD6050LT1 IN6050 Diode LED1 Quality HLMP1790 Green LED Technologies LED2 LED3 Quality HLMP1700 Red LED Technologies Motorola DSP56307EVM Parts List B 1 Parts Listing Table B 1 DSP56307EVM Parts List Continued Designator Manufacturer Part Number Description Y1 MMD MC100CA 12 288MHZ 12 288 MHz Oscillator Y2 ECS OECS 196 6 3 C3X1A 19 6608 MHz 153 6 kHz Oscillator SW1 SW2 SW3 Panasonic EVQ QS205K 6 mm Switch P1 P2 Mouser 152 3409 DB 9 Female Connector P3 Switchcraft RAPC 722 2 1 mm DC Power Jack P4 P5 P6 Switchcraft 35RAPC4BHN2 3 5 mm Miniature Stereo Jack J1 Robinson Nugent NSH 8DB S2 TG Header 8 pin double row J2 Robinson Nugent NSH 16DB S2 TG Header 16 pin double row J3 Robinson Nugent NSH 20DB S2 TG Header 20 pin double row J4 J5 Robinson Nugent NSH 12DB S2 TG Header 12 pin double row J6 Robinson Nugent NHS 14DB S2 TG Header 14 pin double row J7 J9 Robinson Nugent NSH 6SB S2 TG Header 6 pin double row J8 Robinson Nugent NSH 2SB S2 TG Header 2 pin single row C99 C120 C121 Panasonic PCS1106CT 10 uF Capacitor 6 3 V dc C28 C29 C30 C31 C34 Murata GRM42 6Y5V105Z025BL 1 0 uF Capacit
141. rsion and two channels of 16 bit D A conversion Refer to Figure 3 1 on page 3 2 for the location of the codec on the DSP56307EVM and to Figure 3 2 on page 3 3 for a functional diagram of the codec within the evaluation module The CS4218 uses a 3 3 V digital power supply and a 5 V analog power supply The CS4218 is driven by a 12 288 MHz signal at the codec Master Clock CLKIN input pin The oscillator at Y1 creates a 5 V 12 288 MHz signal The QS3384 at U5 then converts the 5 V signal to 3 3 V for input to the codec CLKIN pin and the DSP56307 EXTAL pin Refer to the CS4218 data sheet included with this kit for more information The CS4218 is very flexible offering selectable sampling frequencies between 8 kHz and 48 kHz The sampling frequency is selected using jumpers on jumper block J9 Table 3 2 shows jumper positions that select the possible sampling frequencies for the DSP56307EVM Table 3 2 CS4218 Sampling Frequency Selection J9 Pins 1 2 J9 Pins 3 4 J9 Pins 5 6 Sampling Frequency MF6 MF7 MF8 kHz Jumper Jumper Jumper 48 0 Jumper Jumper Open 32 0 Jumper Open Jumper 24 0 Jumper Open Open 19 2 Open Jumper Jumper 16 0 Open Jumper Open 12 0 Open Open Jumper 9 6 Open Open Open 8 Motorola DSP56307EVM Technical Summary 3 7 Audio Codec The codec is connected to the DSP56307 ESSIO through the shorting jumpers on J4 and J5 shown in Figure 3 1 on page 3 2 Jumper block J4 con
142. s to the DSP56307EVM 3 4 2 Codec Digital Interface Figure 3 8 shows the digital interface to the codec Table 3 3 and Table 3 4 show the jumper selections to Enable Disable the code s digital signals 3 8 DSP56307EVM User s Manual Motorola Audio Codec DSP56307 CS4218 STDO __ SDIN SRDO 4 SDOUT SCKO SCLK 0001 RESET 02 SSYNC SC10 MF4 CCS SC11 MF3 CCLK SC12 MF2 CDIN AA1612 Figure 3 8 Codec Digital Interface Connections Table 3 3 JP5 Jumper Block Options JP5 DSP Signal Name Code Signal Name 1 2 SCKO SCLK 3 4 SCO0 RESET 5 6 STDO SDIN 7 8 SRDO SDOUT 9 10 SCOI 11 12 5 02 SSYNC Table 3 4 JP4 Jumper Block Options JP4 DSP Signal Name Code Signal Name 1 2 SCKI 3 4 5 10 CCS 5 6 STDI 7 8 SRDI 9 10 SC12 CDIN 11 12 5 11 CCLK The serial interface of the codec transfers digital audio data and control data into and out of the device The codec communicates with the DSP56307 through the ESSIO for the data Motorola DSP56307EVM Technical Summary 3 9 Command Converter information and through the ESSII for the control information The codec has three modes of serial operation that are selected by the serial mode select SMODEI SMODE2 and SMODE3 pins The SMODE pins on the DSP56307EVM are set to enable serial mode 4 which separates
143. section B is nested inside section A then a symbol defined in section A can be used in section B without XDEFing in section A or XREFing in section B This scoping behavior can be turned off and on with the NONS and NS options respectively See the OPT directive Sections may also be split into separate parts That is section name can be used multiple times with SECTION and ENDSEC directive pairs If this occurs then these separate but identically named sections can access each others symbols freely without the use of the XREF and XDEF directives If the XDEF and XREF directives are used within one section they apply to all sections with the same section name The reuse of the section name is allowed to permit the program source to be arranged in an arbitrary manner for example all statements that reserve X space storage locations grouped together but retain the privacy of the symbols for each section When the assembler operates in relative mode the default sections act as the basic grouping for relocation of code and data blocks For every section defined in the source a set of location counters is allocated for each DSP memory space These counters are used to maintain offsets of data and instructions relative to the beginning of the section At link time sections can be relocated to an absolute address loaded in a particular order or linked contiguously as specified by the programmer Sections which are split into parts or among
144. sed as the load memory space If the memory space is L any allocated datum with a value greater than the target word size is extended to two words otherwise it is truncated If the memory space is E then depending on the memory space qualifier any generated words are split into bytes one byte per word or a 16 8 bit combination Motorola Motorola Assembler Notes C 41 Assembler Directives e lt llc gt Which load counter H L or default if neither or L is specified that is associated with the Ims is used as the load location counter e lt lmp gt Indicates the load physical mapping to DSP memory I internal E external R ROM A port A B port B If not present no explicit mapping is done e lt lce gt Non negative absolute integer expression representing the counter number to be used as the load location counter Must be enclosed in parentheses Should not exceed the value 65535 e lt exp2 gt Initial value to assign to the load counter used as the llc If lt exp2 gt is a relative expression the assembler uses the relative location counter If exp2 is an absolute expression the assembler uses the absolute location counter If lt 2 gt is not specified then the last value and mode that the counter had is used If the last half of the operand field in an ORG directive dealing with the load memory space and counter is not specified then the assembler assumes that the load memory space
145. ssions described below are evaluated at run time and are referred to in the following discussion simply as expressions A structured control statement expression may be simple or compound A compound expression consists of two or more simple expressions joined by either AND or OR but not both in a single compound expression C 4 3 1 Simple Expressions Simple expressions are concerned with the bits of the condition code register CCR These expressions are of two types The first type merely tests conditions currently specified by the contents of the CCR See Section C 4 3 2 The second type sets up a comparison of two operands to set the condition codes and afterwards tests the codes C 4 3 2 Condition Code Expressions A variety of tests identical to those in the Jcc instruction may be performed based on the CCR condition codes The condition codes in this case are preset by either a user generated instruction or a structured operand comparison expression Each test is expressed in the structured control statement by a mnemonic enclosed in angle brackets When processed by the assembler the expression generates an inverse conditional jump to beyond the matching ENDx UNTIL directive C 58 DSP56307EVM User s Manual Motorola Structured Control Statements Example C 89 Condition Code Expression IF EO zero bit set bne Z 100002 code generated by assembler CLR
146. strap from SCI 12 OPEN OPEN JUMP JUMP HI08 bootstrap in ISA DSP5630X mode 13 OPEN OPEN JUMP OPEN HI08 Bootstrap in HC11 non multiplexed bus mode 14 OPEN OPEN OPEN JUMP HI08 Bootstrap in 8051 multiplexed bus mode 15 OPEN OPEN OPEN HI08 Bootstrap in MC68302 bus mode 3 16 DSP56307EVM User s Manual Motorola Appendix A DSP56307EVM Schematics Motorola DSP56307EVM Schematics A 1 20595 5 anly L p 1994 1001 8661 62 40898451 JequnN jueuinooq 2089645 095 168 215 XVJ 189 168 015 8698 9681 XL unsny 1099 UOISIAIg 1 55 v1 30 0N ano fst SNL aa 91 0d1 3 191 32uo ovi ano QN9 se 99 E v e o 0o iV 0 2891 8 0 515 9 E aNd QN9 nono 1 9 aNd aNd 275 Aa and a 29 29 aNd aNd ano tJ eld ano ano 4 aNd 4
147. t object code IDENT Object code identification record SYMOBJ Write symbol information to object file 2 2 3 7 Macros and Conditional Assembly The directives for macros and conditional assembly are as follows DUP Duplicate sequence of source lines DUPA Duplicate sequence with arguments DUPC Duplicate sequence with characters DUPF Duplicate sequence in loop ENDIF End of conditional assembly ENDM End of macro definition EXITM Exit macro IF Conditional assembly directive MACLIB Macro library MACRO Macro definition Purge macro definition 2 2 8 8 Structured Programming The directives for structured programming are as follows Exit from structured loop construct CONTINUE Continue next iteration of structured loop ELSE Perform following statements when false ENDF End of FOR loop ENDI End of condition ENDL End of hardware loop Motorola Example Test Program 2 11 Motorola DSP Linker ENDW End of WHILE loop FOR Begin FOR loop IF Begin IF condition LOOP Begin hardware loop REPEAT Begin REPEAT loop UNTIL End of REPEAT loop WHILE Begin WHILE loop 2 2 4 Assembling the Example Program The assembler is an MS DOS based program thus to use the assembler you must exit Windows or open an MS DOS Prompt Window To assemble the example program type asm56300 a b l g example asm into the evm
148. t registers The MEX assembler option see the OPT directive may be used to send the assembler generated code to the listing file for examination of possible register use conflicts C 62 DSP56307EVM User s Manual Motorola Symbols 5 9 lt 9 gt 9 C 4 C 6 C 6 C 7 1 5 C2 C 7 lt lt C 7 gt 8 C 3 C 6 2 4 A D converter 3 7 AARO programming 3 4 Address Attribute Pin Polarity Bit BAAP 3 5 Address Attribute Pin AAO 3 4 Address Attribute Pin AA1 3 6 Address Attribute Register AARO 3 4 Address Muxing Bit BAM 3 5 Address Pins A 0 17 3 4 3 6 Address Priority Disable Bit APD 3 4 Address to Compare Bits BAC 11 0 3 6 Addressing I O short C 7 immediate C 9 long C 8 long immediate C 9 short C 7 short immediate C 9 Analog Input Output 3 8 Assembler 2 12 mode C 33 option C 34 warning C 40 assembler 2 1 control 2 8 data definition storage allocation 2 8 2 9 directives 2 8 INDEX listing control and options 2 10 macros and conditional assembly 2 11 object file control 2 10 options 2 6 significant characters 2 8 structured programming 2 11 symbol definition 2 8 2 9 assembler control 2 8 assembler directives 2 8 assembler options 2 6 assembling the example program 2 12 assembling the program 2 5 assembly programming 2 1 AT29LV010A 3 6 audio codec 3 1 3 7 audio interface cable 1 2 audio source 1 2 B Buffer address 10 end C 23
149. t to E and the qualifier 8 indicates a bytewise RAM configuration Instructions and data are generated eight bits per output word with byte oriented load addresses The default load counter is used and there is no explicit load origin ORG P 5 8000 Indicates code is generated for an absolute overlay The runtime memory space is P and the counter used as the runtime location counter is counter 5 It will not be initialized and the last previous value of counter 5 is used The load memory space is Y Since neither H L nor any counter expression was specified as the load counter the default load counter counter 0 is used as the load location counter The default load counter is initialized to 8000 Motorola Motorola Assembler Notes C 43 Assembler Directives C 3 44 PAGE Top of Page Size Page PAGE lt 1 gt lt 2 gt lt 5 gt The PAGE directive has two forms 1 If no arguments are supplied then the assembler advances the listing to the top of the next page In this case the PAGE directive is not output 2 The PAGE directive with arguments can be used to specify the printed format of the output listing Arguments may be any positive absolute integer expression The arguments in the operand field as explained below are separated by commas Any argument can be left as the default or last set value by omitting the argument and using two adjacent commas The PAGE directive with arguments will not
150. ta window To step through the program type step at the command window prompt For a shortcut click on the step button or type the start of the command and press the space bar and the debugger completes the remainder of the command To repeat the last command press return As you step through the code notice that the registers in the registers window are changed by the instructions After each cycle any register that has been changed is highlighted Once you have stepped through the program ensure that the program has executed correctly by checking that the result in accumulator is FE 9F2051 6DFCC2 Stepping through the program like this is good for short programs but it is impractical for large complex programs The way to debug large programs is to set breakpoints which are user defined points where execution of the code stops allowing the user to step through the section of interest In the example set a breakpoint to verify that the values in and r4 are correct before the do loop type break p 106 in the command window The line before the loop brightens in the unassembly window indicating the breakpoint has been set To point the DSP56307 back to the start point of the program type change pc 0 This changes the program counter so that it points to the reset vector To run the program type go or click on the go button The DSP56307 stops when it reaches the breakpoint and you can step through the remainder of the code To ex
151. te See also EQU GSET Example C 73 SET Directive COUNT SET 0 INITIALIZE COUNT C 3 53 STITLE Initialize Program Sub Title STITLE lt string gt The STITLE directive initializes the program subtitle to the string in the operand field The subtitle is printed on the top of all succeeding pages until another STITLE directive is encountered The subtitle is initially blank The STITLE directive will not be printed in the source listing An STITLE directive with no string argument causes the current subtitle to be blank Note A label is not allowed with this directive See also TITLE Example C 74 STITLE Directive STITLE COLLECT SAMPLES C 3 54 SYMOBJ Write Symbol Information to Object File SYMOBJ lt symbol gt lt symbol gt lt symbol gt The SYMOBJ directive causes information for each symbol to be written to the object file This directive is recognized but currently performs no operation in COFF assemblers Note A label is not allowed with this directive C 50 DSP56307EVM User s Manual Motorola Assembler Directives Example 75 SYMOBJ SYMOBJ XSTART HIRTN ERRPROC C 3 55 TABS SetListing Tab Stops TABS lt tabstops gt The TABS directive allows resetting the listing file tab stops from the default value of 8 Note A label is not allowed with this directive See also LSTCOL Example C 76 TABS Directive TABS 4 Set listing file tab stops to 4 C 3 56 TI
152. ted into the source program at any point where a secondary file is to be included in the source input stream The string specifies the filename of the secondary file The filename must be compatible with the operating system and can include a directory specification If no extension is given for the filename a default extension of ASM is supplied The file is searched for first in the current directory unless the lt lt string gt gt syntax is used or in the directory specified in string If the file is not found and the I option was used on the command line that invoked the assembler then the string specified with the I option is prefixed to lt string gt and that directory is searched If the lt lt string gt gt syntax is given the file is searched for only in the directories specified with the I option Note A label is not allowed with this directive See also MACLIB Example C 53 INCLUDE Directive INCLUDE headers io asm Unix example INCLUDE storage mem asm MS DOS example INCLUDE lt data asm gt Do not look in current directory C 3 33 LIST List the Assembly LIST Print the listing from this point on The LIST directive is not printed but the subsequent source lines are output to the source listing The default is to print the source listing If the IL option has been specified the LIST directive has no effect when encountered within the source program The LIST directive actually increme
153. tement SWAP REG 0 1 the resulting expansion would be MOVE RO D4 L MOVE 1 do pl C 2 4 Return Value of Symbol Character The symbol sequence when used in macro definitions is replaced by an ASCII string representing the value of symbol This operator may be used in association with the backslash operator The value of symbol must be an integer not floating point Example C 5 Example of Use of Return Value Character Consider the following macro definition SWAP SYM MACRO REG1 REG2 swap REG1 REG2 using D4 L as temp MOVE R REG1 D4 L MOVE R REG2 1 MOVE D4 L R REG2 ENDM If the source file contained the following SET statements and macro call AREG SET 0 BREG SET 1 SWAP SYM AREG BREG the resulting expansion as it would appear on the source listing would be MOVE RO D4 L MOVE R1 R0 MOVE D4 L R1 Motorola Motorola Assembler Notes C 3 Assembler Significant Characters C 2 5 Return Hex Value of Symbol Character The lt symbol gt sequence when used in macro definitions is replaced by an ASCII string representing the hexadecimal value of symbol This operator may be used in association with the backslash Y operator The value of symbol must be an integer not floating point Example C 6 Example of Return Hex Value Symbol Character Consider the following macro definition GEN LAB MACRO LAB VAL STMT LAB SVAL S
154. the string is stored in a word whose lower seven bits represent the ASCII value of the character See Example C 28 Note See also BSC DC Example C 30 DCB Directive TABLE DCB two 0 strings O0 CHARS DCB LOT C 3 10 DEFINE Define Substitution String DEFINE symbol string The DEFINE directive is used to define substitution strings that are used on all following source lines All succeeding lines are searched for an occurrence of symbol which is replaced by string This directive is useful for providing better documentation in the source program symbol must adhere to the restrictions for non local labels That is it cannot exceed 512 characters the first of which must be alphabetic and the remainder of which must be either alphanumeric or underscore _ A warning results if a new definition of a previously defined symbol is attempted The assembler output listing will show lines after the DEFINE directive has been applied and therefore redefined symbols are replaced by their substitution strings unless the NODXL option is in effect See C 3 42 OPT Assembler Options on page 34 Macros represent a special case DEFINE directive translations are applied to the macro definition as it is encountered When the macro is expanded any active DEFINE directive translations are applied again DEFINE directive symbols that are defined within a section will only apply to that section See th
155. then the assembler picks the long form of immediate addressing by default If this is not desired then the short form of addressing can be forced using the immediate short addressing mode force operator lt Example C 18 Example of Immediate Short Addressing Mode Force Operator In the following sequence of source lines the symbol CNST is not known to the assembler on pass one and therefore the assembler would use the long immediate addressing form for the MOVE instruction MOVE CNST DO L CNST EQU 5 Because the long immediate addressing mode makes the instruction two words long instead of one word for the immediate short addressing mode it may be desirable to force the immediate short addressing mode as shown below MOVE lt CNST DO L CNST EQU 5 C 2 17 gt Immediate Long Addressing Mode Force Operator Many DSP instructions allow a long immediate form of addressing If the immediate data is known to the assembler on pass one not a forward or external reference then the assembler will always pick the shortest form of immediate addressing consistent with the instruction unless the FORCE LONG directive is active If this is not desired then the long form of addressing can be forced using the immediate long addressing mode force operator gt Motorola Motorola Assembler Notes C 9 Assembler Directives Example C 19 Example of an Immediate Long Addressing Mode Operator In the following sequence of source
156. through this example For full details on the Debugger and an informative tutorial consult the Debug 56K Manual The Domain Technologies Debugger is a software development system for the DSP56307 The Domain Technologies Debugger is included with the DSP56307EVM on the Domain Technologies 3 2 inch diskette and can be installed by following the instructions in section 1 4 of the Debug 56K Manual To invoke the Debugger double click on the icon labelled evm30xw in the EVM5630x program group created when the Debugger was installed The Debugger display is similar to that shown in Figure 2 2 the screen is divided into four windows the command window the data window the unassembly window and the registers window The command window is the window selected which means that key strokes are placed into the command window The data window displays DSP56307 data The unassembly window displays the DSP56307 programs highlighting the next instruction to be executed The registers window shows the contents of the DSP56307 internal registers Motorola Example Test Program 2 17 Introduction to the Debugger Software jnp begin org PEASE begin EVM 563xx COM2 memory starting the reset he nsp looks after reset the mal pr a EEREN FEDCBR 957572 FE TE DELL LIEEL Far 00000200000008 FFTI12E38800009 BBBOSU 256198
157. ting system pathname Example asm56300 Mfftlib trans asm Uses IBM PC pathname conventions and causes the assembler to look in the fftlib subdirectory of the current directory for a file with the name of the currently invoked macro found in the source file trans asm Causes the assembler to report assembly progress to the standard error output stream Z Causes the assembler to strip symbol information from the absolute load file Normally symbol information is retained in the object file for symbolic references purposes This option is valid only with the A and B options Note Multiple options can be used A typical string might be as follows Example asm56300 A B L G filename asm 2 2 3 Assembler Directives In addition to the DSP56307 instruction set the assembly programs can contain mnemonic directives that specify auxiliary actions to be performed by the assembler These are the assembler directives These directives are not always translated into Motorola Example Test Program 2 7 Assembling the Program machine language The following sections briefly describe the various types of assembler directives 2 2 3 1 Assembler Significant Characters The following one and two character sequences are significant to the assembler Comment delimiter Unreported comment delimiter Line continuation character or macro dummy argument concatenation operator Macro value substitution operator M
158. tive See also SECTION Example C 43 ENDSEC Directive SECTION COEFF ORG Y VALUES BSC 100 Initialize to zero ENDSEC C 3 23 EQU Equate Symbol to a Value label EQU X Y L P E lt expression gt The EQU directive assigns the value and memory space attribute of expression to the symbol label If expression has a memory space attribute of None then it can optionally be preceded by any of the indicated memory space qualifiers to force a memory space attribute An error will occur if the expression has a memory space attribute other than None and it is different than the forcing memory space attribute The optional forcing memory space attribute is useful to assign a memory space attribute to an expression that consists only of constants but is intended to refer to a fixed address in a memory space The EQU directive is one of the directives that assigns a value other than the program counter to the label The label cannot be redefined any where else in the program or section if SECTION directives are being used The expression may be relative or absolute but cannot include a symbol that is not yet defined no forward references are allowed Note See also SET C 24 DSP56307EVM User s Manual Motorola Assembler Directives Example C 44 EQU Directive A D PORT EQU X 4000 This assigns the value 4000 with a memory space attribute of X to the symbol D PORT COMPUTE EQU
159. trol registers and a detailed description of the family instruction set Refer to these documents for detailed information about chip functionality and operation Motorola DSP56307EVM Technical Summary 3 1 Memory Note A detailed list of known chip errata is also provided with this kit Refer to the DSP56307 Chip Errata document for information that has changed since the publication of the reference documentation listed above The latest version can be obtained on the Motorola DSP worldwide web site at http www mot com SPS DSP chiperrata index html The core voltage of the DSP56307 can be selected to be 2 5 or 3 3Vpc by using jumper J11 Refer to Table 3 1 for jumper options Table 3 1 J11 Jumper Options J11 Voltage Selected 1 2 43 3 V 2 3 2 5 3 3 The DSP56307EVM includes following external memory 64K x 24 bit fast static RAM FSRAM for expansion memory e 128K x 8 bit flash memory for stand alone operation Refer to Figure 3 1 for the location of the FSRAM and Flash on the DSP56307EVM Figure 3 2 shows a functional block diagram of the DSP56307EVM including the memory devices J1 J2 J3 Test SW2 LED J1 MC74HCT04 DSP56002 AT29LV010A SW1 Sw3 Flash P1 J4 34164 DSP56307 J10 MAX212 P6 OUT
160. ts the runtime memory space to P Selects the H load counter counter 2 associated with P space to use as the runtime location counter The H counter will not be initialized and its last value is used Code generated hereafter is mapped to external E memory The load memory space is implied to be P and the load location counter is assumed to be the same as the runtime location counter ORG PI OVL1 Y Indicates code is generated for an overlay The runtime memory space is P and the default counter is used as the runtime location counter It is reset to the value of OVL1 If the assembler is in absolute mode via the A command line option then OVL1 must be an absolute expression If OVL1 is an absolute expression the assembler uses the absolute runtime location counter If OVL1 is a relocatable value the assembler uses the relative runtime location counter In this case OVL1 must not itself be an overlay symbol 1 defined within an overlay block The load memory space is Y Since neither H L nor any counter expression was specified as the load counter the default load counter counter 0 is used as the load location counter The counter value and mode is whatever it was the last time it was referenced ORG XL E8 Sets the runtime memory space to X Selects the L counter counter 1 associated with X space to use as the runtime location counter The L counter is not initialized and its last value is used The load memory space is se
161. ubsections define how the character can be used in two different instances C 2 7 1 Macro String The double quote when used in macro definitions is transformed by the macro processor into the string delimiter the single quote 2 The macro processor examines the characters between the double quotes for any macro arguments This mechanism allows the use of macro arguments as literal strings Example C 8 Example of a Macro String Delimiter Character Using the following macro definition CSTR MACRO STRING DC STRING ENDM and a macro call CSTR ABCD the resulting macro expansion would be DC ABCD C 2 7 2 Quoted String DEFINE Expansion A sequence of characters which matches a symbol created with a DEFINE directive is not expanded if the character sequence is contained within a quoted string Assembler strings generally are enclosed in single quotes 2 If the string is enclosed in double quotes then DEFINE symbols are expanded within the string In all other respects usage of double quotes is equivalent to that of single quotes Motorola Motorola Assembler Notes C 5 Assembler Significant Characters Example C 9 Example of a Quoted String DEFINE Expression Consider the source fragment below DEFINE LONG short STR MAC MACRO STRING MSG This is a LONG STRING MSG This is a LONG STRING ENDM If this macro were invoked as follows STR_MAC sentence
162. with single quotes lt label gt if present is assigned the value of the runtime location counter at the start of the DUPA directive processing Note See also DUP DUPC DUPF ENDM MACRO Motorola Motorola Assembler Notes C 19 Assembler Directives Example C 36 DUPA Directive If the input source file contained the following statements DUPA VALUE 12 32 34 DC VALUE ENDM then the assembled source listing would show DUPA VALUE 12 32 34 DC 12 DC 32 DC 34 ENDM Note that the lines DUPA VALUE 12 32 34 ENDM will only be shown on the source listing if the MD option is enabled The lines DC 12 DC 32 DC 34 will only be shown on the source listing if the MEX option is enabled Note See the OPT directive in this appendix for more information on the MD and MEX options C 3 16 DUPC Duplicate Sequence With Characters lt label gt DUPC lt dummy gt lt string gt ENDM The block of source statements defined by the DUPC and ENDM directives are repeated for each character of lt string gt For each repetition every occurrence of the dummy parameter within the block is replaced with each succeeding character in the string If the string is null then the block is skipped lt label gt if present is assigned the value of the runtime location counter at the start of the DUPC directive processing Note See also DUP DUPA DUPF ENDM MACRO C 20 DSP56307EVM User s M
163. xpression lt stmtlist gt is executed repeatedly until expression is true When expression becomes true advance to the next instruction following UNTIL The lt stmtlist gt is executed at least once even if expression is true upon entry to the REPEAT loop Example C 87 REPEAT Statement REPEAT UNTIL x rl EQ 0 loop until zero is found C 4 2 7 WHILE Statement WHILE expression DO stmtlist ENDW The expression is tested before execution of lt stmtlist gt While expression remains true lt stmtlist gt is executed repeatedly When expression evaluates false advance to the Motorola Motorola Assembler Notes C 57 Structured Control Statements instruction following the ENDW statement If expression is false upon entry to the WHILE loop lt stmtlist gt is not executed execution continues after the ENDW directive Note The DO keyword is optional Example C 88 WHILE Statement WHILE 1 GT 0 loop until zero is found ENDW C 4 3 Simple and Compound Expressions Expressions an integral part of REPEAT and statements Structured control statement expressions should not be confused with the assembler expressions The latter are evaluated at assembly time and are referred to here as assembler expressions they can serve as operands in structured control statement expressions The structured control statement expre
164. xternally via the serial port connector P1 or internally by an SCI timer If J10 is installed jumper 3 4 J7 must be removed 3 12 DSP56307EVM User s Manual Motorola Off Board Interfaces Table 3 8 SCI Header J7 Pinout Pin Number DSP Signal Pin Number DSP Signal Name Name 1 RxD 2 3 SCLK 4 5 TxD 6 Table 3 9 J7 Jumper Options J7 DSP Signal Name 1 2 RxD 3 4 SCLK 5 6 TxD Table 3 10 DSP Serial Port P1 Connector Pinout Pin Number DSP Signal Name Pin Number DSP Signal Name 1 m 6 2 TxD 7 SCLK 3 RxD 8 4 RESET 9 5 GND 3 6 2 Enhanced Synchronous Serial Port 0 ESSIO Connection to the DSP s ESSIO port can be made at J5 Refer to Table 3 11 for the header s pinout Motorola DSP56307EVM Technical Summary 3 13 Off Board Interfaces Table 3 11 ESSIO Header J5 Pinout Pin Number Sm Pin Number 1 SCKO 2 3 SCOO 4 5 STDO 6 7 SRDO 8 9 SC01 10 11 SC02 12 3 6 3 Enhanced Synchronous Serial Port 1 ESSI1 Connection to the DSP s ESSII port can be made at J4 Refer to Table 3 12 for the header s pinout Table 3 12 ESSIO Header J4 Pinout Pin Number DSP Signal Name Pin Number DSP Signal Name 1 SCKI 2 3 5 10 4 5 STDI 6 7 SRDI 8 9 5 12 10 11 SCII 12
Download Pdf Manuals
Related Search
Related Contents
Samsung 460DR-S Bruksanvisning EXSYS 4S Serial RS-232 ExpressCard Concord Camera 3040AF Digital Camera User Manual 3A1460D - EasyMax WP Cordless Paint Sprayer SUPERVISOR 24/48/72 - Logo éclairage théâtre Trevi GO 2100 HD to the SwissSTIM® PHYSIO user manual. ReFreeX user manual for H424W1 Copyright © All rights reserved.
Failed to retrieve file