fdfsfsdfsdf

APA Simulator for the MiMagic 6 Applications Processor Application Note 41 December 11, 2003 Revision 0.90 Copyright Notice This document provides information on NeoMagic products. No license, expressed or implied, by estoppel or otherwise, to any intellectual property is granted by this document. Except as provided in NeoMagic’s Terms and Conditions of Sale for such products, NeoMagic assumes no liability whatsoever. This product is not intended for use in medical, life saving, or life sustaining application. Copyright (circle logo ©) NeoMagic Corporation 2003 Printed in the United States of America. All Rights Reserved Trademarks The following terms are trademarks of the NeoMagic Corporation: NeoMagic and MiMagic. All other trademarks and registered trademarks are the property of their respective companies. Disclaimer NeoMagic disclaims any express or implied warranty, relating to sale and/or use of NeoMagic products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright, or other intellectual property right. NeoMagic may make changes to specifications and product descriptions contained in this document at any time without notice. Contact your local NeoMagic sales office to obtain the latest specifications before placing your purchase order. Version History Version Date Comments 0.9 11 December 2003 Initial Release of Document Contact Information NeoMagic Corporation 3250 Jay Street Santa Clara, CA 95054 USA Tel. (408) 988-7020 Fax (408) 988-7032 http://www.neomagic.com Table of Contents 1 APA Code Generation 4 2 Running the Simulator 6 3 Simulator Outputs 7 3.1 Compile-time Information 7 3.1.1 PrintAllocation() Function 7 3.1.2 STRT_C Function 8 3.2 Run-time Information 9 3.2.1 sout Method 9 3.2.2 SimOut::setvh(n) method 9 3.2.3 namev(var_name) method 9 3.2.4 printtag() Method 9 3.2.5 image_name << debug 9 3.2.6 Printtag() function 11 3.2.7 Info() Function 12 3.3 Performance Profiling 12 3.4 Simulator Output Files 13 1 APA Code Generation APA machine code generation is a two-step process: Step 1: Compilation: C++ code is written and compiled using Microsoft Visual C++ compiler Version 6.0. An executable file

.exe is generated. Step 2: Linking: Running the executable file performs the stage of code generation, linking the output to the APA libraries. Executing
.exe links the code to the APA libraries and generates APA machine code by creating first the file
.tst and then the APA machine code file
.axe. The APA machine code is run on the APA simulator and also on the APA unit in the MiMagic6 chip. Figure 1 illustrates the code development stages: Figure 1. Two-step code generation from C++ to APA machine code. As shown in the figure, APA has an on-chip program store and a microcontroller that functions as program decoder and sequencer. Figure 2 shows the structure of the
.tst file. The format of the file is Address (the physical address where the instruction is stored), Data (the instruction, in binary format) and Description (the disassembled instruction). ! MagiCAM Compiler Version =ver 1.0 !Thu Dec 11 12:00:46 2003 ! Source File = DebugUnitTest.tst ! Target File = DebugUnitTest.tst Address Data Description 9F800000 0000000000 nop 9F800001 4200000000 movl 0 R0 9F800002 D000000000 xor R0 R0 9F800003 30044000FF letmcc sct0 FF W_SET AR_WRITE M_NOP A_NOP 9F800004 300440FF00 letmcc sct0 FF00 W_SET AR_WRITE M_NOP A_NOP 9F800005 0000000000 nop 9F800006 0000000000 nop 9F800007 0000000000 begin_of_nmgc_program: nop 9F800008 7AF08CB400 call 9F8CB400 NOCOND Figure 2. Structure of
.tst file The following figure illustrates the Visual C++ window after compiling and linking an APA program. Figure 3. Compiling and linking a program 2 Running the Simulator To run the simulator, run “APA Simulator.exe” with the APA machine code file (
.axe file). The simulator output window is shown in Figure 4. Figure 4. Basic simulator window “Array height” is the number of associative processors in the associative array.

Essay Information


Words: 2446
Pages: 9.8
Rating: None

All Papers Are For Research And Reference Purposes Only. You must cite our web site as your source.