Home

SCU DSP Assembler User`s Manual

image

Contents

1. incorrect Operators Operator Priority addition 1 monadic operator subtraction 2 Il j multiplication 3 division 4 lt lt gt gt remainder 5 amp bit negation 6 amp bit product bit sum es exclusive bit sum lt lt left shift gt gt right shift 1 2 3 4 5 6 Summary of Instructions Operation instructions NOP AND OR XOR ADD SUB AD2 SR RR SL RL RL8 CLR MOV Load immediate instruction MVI DMA instructions DMA DMAH JUMP instruction JMP LOOP BOTTOM instructions BTM LPS END instructions END ENDI Directive summary EQU 2 Defines labels ORG Specifies starting address where instructions are located ENDS Enter at the end of the program anything beyond this point is ignored IF numerical value label When the resulting calculated numerical or label value is any value other than 0 the program assembles from that point on to ELSE or ENDIF IFDEF label When labels are defined first the program assembles from that point to ELSE or ENDIF Up to 16 levels of IF and IFDEF nestings are supported SCU DSP Assembler User s Manual 5 Sample Programs 1 Copying internal RAMO data of the DSP to internal RAMI sample 1 start COPY SIZE 12 RAMO ADR 00 RAM1 ADR 00 MOV RAMO ADR CTO MOV RAM1 ADR CTI MOV COPY SIZE 1 LOP LPS MOV MC1 ENDI sSample 1 Copy
2. result from applications based on the examples describe herein It is possible that this document may contain reference to or information about SEGA products development hardware software or services that are not provided in countries other than Japan Such references information must not be construed to mean that SEGA intends to provide such SEGA products or services in countries other than Japan Any reference of a SEGA licensed prod uct program in this document is not intended to state or simply that you can use only SEGA s licensed products programs Any functionally equivalent hardware software can be used instead SEGA will not be held responsible for any damage to the user that may result from accidents or any other reasons during operation of the user s equipment or programs according to this document NOTE A reader s comment correction form is provided with this document Please address comments to SEGA of America Inc Developer Technical Support att Evelyn Merritt 150 Shoreline Drive Redwood City CA 94065 SEGA may use or distribute whatever information you supply in any way it believes appropriate without incurring any obligation to you 11 2 94 002 SEGA SEGA OF AMERICA INC Consumer Products Division SCU DSP Assembler User s Manual Doc ST 240 A 042795 1995 SEGA All Rights Reserved READER CORRECTION COMMENT SHEET Keep us updated If you should come across any incorr
3. 1 MOV MCO X MOV MCO X MOV MUL P AD2 MOV MUL P AD2 ENDI sample 2b Store 2 4 starting addresses Store 3 5 starting addresses Store results at this address MOV RAMO ADR CTO MOV RAM1 ADR CTI MOV RAMO ADR CTO MOV 1 ADR MOV 1 MOV RAM2 ADR CT2 MOV 1 MOV ALU A MOV ALL MC2 3 Calculating matrix multiplies RAMO X RAMI RAM2 M M 01 M 02 03 1 0 0 x M 00 M 01 M 02 M 03 IM10M11M12Mi3lloi10y M10M11M 12M 13 M 20 21 22 23 1001 20 21 22 23 sample 3 start DATA TOP 10000 gt gt 2 MAT SIZE 0C RAMO_ADR 00 RAM1 ADR 00 RAM2_ADR 00 oo001 External memory address is 4 byte units Array size Starting address that stores X Y Z changes Address for array work Original array address Transfers x 2 translation arrays from external memory to RAMO MVI DATA TOP RAO SCU DSP Assembler User s Manual MOV RAMO ADR CTO DMA DO MCO 02 Copy matrix operands from RAM2 to RAM1 MOV RAM2 ADR CT2 MOV RAM1 ADR CTI MOV MAT SIZE 1 LOP LPS MOV MC2 MC1 WAITING JMP TO WAITING Calculate arrays MOV RAMO ADR CTO MOV RAM1 ADR 1 MOV MCO X MOV 1 Y MOV MCO X MOV MUL P MOV MC1 Y CLR A AD2 MOV MCO X MOV MUL P MOV MC1 Y MOV ALU A MOV RAMO ADR CTO AD2 MOV MUL P MOV MC1 Y MOV ALU A MOV 1 RX AD2 MOV MCO X MOV MUL P MOV MC1 Y MOV ALU A MOV RA
4. General Notice When using this document keep the following in mind 1 This document is confidential By accepting this document you acknowledge that you are bound by the terms set forth in the non disclosure and confidentiality agreement signed separately and in the possession of SEGA If you have not signed such a non disclosure agreement please contact SEGA immediately and return this document to SEGA This document may include technical inaccuracies or typographical errors Changes are periodi cally made to the information herein these changes will be incorporated in new versions of the document SEGA may make improvements and or changes in the product s and or the program s described in this document at any time No one is permitted to reproduce or duplicate in any form the whole or part of this document without SEGA S written permission Request for copies of this document and for technical information about SEGA products must be made to your authorized SEGA Technical Services representative No license is granted by implication or otherwise under any patents copyrights trademarks or other intellectual property rights of SEGA Enterprises Ltd SEGA of America Inc or any third party Software circuitry and other examples described herein are meant merely to indicate the character istics and performance of SEGA s products SEGA assumes no responsibility for any intellectual property claims or other problems that may
5. M2 ADR 3 CT2 AD2 MOV MCO X MOV MUL P MOV MC1 Y CLRA MOV ALL MC2 AD2 MOV MCO X MOV MUL P MOV MC1 Y MOV ALU A MOV RAMO ADR CTO AD2 MOV MUL P MOV MC1 Y MOV ALU A MOV 1 RX AD2 MOV MCO X MOV MUL P MOV MC1 Y MOV ALU A MOV RAM2 ADR 7 CT2 AD2 MOV MCO X MOV MUL P MOV MC1 Y CLRA MOV ALL MC2 AD2 MOV MCO X MOV MUL P MOV MC1 Y MOV ALU A MOV RAMO ADR CTO AD2 MOV MUL P MOV MC1 Y MOV ALU A MOV 1 RX AD2 MOV MUL P MOV ALU A MOV RAM2 ADR 11 CT2 AD2 MOV ALL MC2 ENDI sample 3 end END
6. c rule is to write the operation and operand on one line however when this is not possible enter V before pressing Return to continue on to the next line To follow an operation after a comment enter before Also do not exceed 255 characters per line e Operations and operands are not case sensitive use either upper or lower case English letters Specify xx for hexadecimal xxx for decimal and xxxxxxxx for binary e Output code addresses can be specified by the ORG directive e Although the program area in DSP only has a maximum capacity of 256 instructions it can issue a warning and output code containing up to 2048 instructions to facili tate tasks such as the splitting of processes or optimization However only the SCU DSP Simulator can support this code Therefore it is necessary to edit the code down to its 256 instruction limit during assembly if the code is actually used in the DSP Also note that if the number of address labels exceeds 256 instructions assignment is not possible with 8 bit values Note on reserved words The following names are reserved for operands and may not be used for labels ALH ALL ALU MO M1 M2 M3 MCO MC1 MC2 MC3 MUL Note on numeric operations e The following operators can be used when setting values on labels or when using numerical values for operands When the following are used as operands do not enter any spaces Ex JMP 2 is correctly written while JMP 2 is
7. ect or outdated information while reading through the attached document or come up with any questions or comments please let us know so that we can make the required changes in subsequent revisions Simply fill out all information below and return this form to the Developer Technical Support Manager at the address below Please make more copies of this form if more space is needed Thank you General Information Your Name Document number ST 240 A 042795 Document name SCU DSP Assembler User s Manual Corrections Questions comments Where to send your corrections 415 802 1717 Mail SEGA OF AMERICA Attn Evelyn Merritt Attn Evelyn Merritt Developer Technical Support Developer Technical Support 150 Shoreline Dr Redwood City CA 94065 1 Overview The SCU DSP assembler is designed to develop DSP instruction code and to simulate their execution under MS DOS and UNIX environments Linking of code is not re quired since the assembler outputs code in Motorola S format The DSP assembler requires a substantial knowledge of the hardware therefore the user is advised to have a thorough understanding of the DSP hardware prior to use 2 1 2 3 1 2 3 Running the Assembler dspasm option lt source filename gt The following options are available files can be created only after the program terminates execution without errors l Filename Output list a Filename Output data in SH ass
8. embler format c Filename Output data in C format m To use the MODEL M development target There are no default file extensions set for source filenames Only the errors detected in the initial search are displayed Correct the errors and assemble the code repeatedly until all errors are eliminated How to Write a Program label Aoperation Aoperand comment s Ex LABEL MOV X comment s Labels Defined by the programmer and used as the destination address for the JMP instruction When writing labels begin from the first column or use a colon at the end of the word ex LABEL Labels can be as long as 32 characters in length and upper or lower case English letters numbers and underscores may be used Numbers may not be used as the first character Also the labels are not case sensitive Operations Write the DSP execution instructions When writing code that begins with an operation enter a blank space before the operation e As many as six operand instructions can be listed under one operation appli cable to operand instructions only Operands Listoperands required for the execution of operations e Insert a space between operands SCU DSP Assembler User s Manual 1 4 Comments e Comments can be written to make the program easier to understand e Start comments with a semi colon and end the comment at the end of the line Note on writing The basi
9. size Source address Destination address Set source RAMO address Set destination RAM1 address Set transfer size 1 in the LOP register Execute 1 instruction loop Transfer from RAMO to RAM1 2 Calculating 2x 3 4x 5 RAMO x RAMI RAMO x RAMI RAM Sample 2b is an optimization of 2a sample 2a start RAMO ADR 00 RAM1 ADR 00 RAM2 ADR 00 MOV RAMO ADR CTO MOV 1 ADR MVI 2 MCO MVI 3 MC1 MVI 4 MCO MVI 5 MC1 MOV RAMO_ADR CTO MOV RAM1_ADR MOV RAM2 ADR CT2 MOV MCO X MOV 1 Y MOV MUL P MOV MCO X MOV 1 Y CLR A AD2 MOV ALU A Store 2 4 starting addresses Store 3 5 starting addresses Store results at this address Set RAMO address Set RAM1 address Set 2 in RAMO Set 3 in RAMI Set 4 in RAMO Set 5 in RAMI Set RAMO address Set 1 address Set RAM2 address Transfer data from RAMO to RX Transfer data from RAM1 to RY Store the product of RX and RY at PH PL Transfer data from RAMO to RX Transfer data from RAM1 to RY Set ACH ACL to 0 Store the sum of PH PL and ACH ACL at ACH ACL MOV MUL P Store the product between RX and RY at PH PL AD2 MOV ALL MC2 Store the sum of PH PL and ACH ACL in RAM2 ENDI sample 2 sample 2b start RAMO ADR 00 RAM1_ADR 00 RAM2_ADR 00 E MVI 2 MCO MVI 3 MC1 MVI 4 MCO MVI 5 MC

Download Pdf Manuals

image

Related Search

Related Contents

Sunbeam Cooktop HP6000 User's Manual  LPF - Sony Asia Pacific  Git Magic - Stanford University  manual ART G3 en - Servi-Q  VAA-2E-G4-SE MANUAL  Specials - Wolf Seeberg Video  取扱説明書 - 三菱電機  『職業安定行政関係システム(仮称)LAN設備導入等一式  Positioning Module type A1SD71-S7 User`s Manual  Operating Instructions - VEGAWELL WL51/52.TX*******C/D  

Copyright © All rights reserved.
Failed to retrieve file