• Nem Talált Eredményt

ADSP-21000 Family Development Tools Release Note

N/A
N/A
Protected

Academic year: 2022

Ossza meg "ADSP-21000 Family Development Tools Release Note"

Copied!
38
0
0

Teljes szövegt

(1)

ADSP-21000 Family Development Tools Release Note

for

3.3 PC Release

3.3.1 UNIX Release

(2)

1.1 DOCUMENTATION...1

1.2 CONTENTS OF ADSP-21000 FAMILY DEVELOPMENT TOOLS...1

1.3 SOFTWARE REGISTRATION...1

1.4 FOR TECHNICAL ASSISTANCE...2

1.5 WARRANTY...2

2 SALES PACKAGE ...3

3 SOFTWARE INSTALLATION ...4

3.1 PC VERSION...4

3.1.1 PC Requirements ...4

3.1.2 PC Installation Procedure for Windows 3.1 ...5

3.1.3 PC Environment Variables ...5

3.2 SUN VERSION...6

3.2.1 Sun Requirements ...6

3.2.2 Sun Installation Procedure ...6

3.2.3 Sun Environment Variables ...7

4 CHANGES FROM PREVIOUS RELEASE...8

4.1 BINARY EXECUTABLES DIRECTORY...8

4.2 ASSEMBLER...8

4.3 ASSEMBLY RUN-TIME LIBRARY...8

4.4 LOADER...8

4.4.1 Introduction ...8

4.4.2 Selecting The Booting Mode ...10

4.4.3 Switches ...15

4.5 LINKER...16

4.6 LIBRARIAN...16

4.7 SIMULATORS...16

4.8 EMULATOR...17

4.9 SPLITTER...17

4.10 C LANGUAGE TOOLS...17

4.10.1 G21K Compiler Driver ...17

4.10.2 G21K Preprocessor ...18

4.10.3 G21K Optimizing C Compiler...18

4.10.4 G21K Run Time Library ...19

4.10.5 Compactor ...20

4.11 COFF TOOLS...21

4.11.1 CSWAP...21

4.11.2 CDUMP ...21

5 RESTRICTIONS ...22

5.1 ASSEMBLER...22

5.2 ASSEMBLY RUN-TIME LIBRARY...22

5.3 LINKER...22

5.4 LOADER...23

5.5 LIBRARIAN...23

5.6 SIMULATORS...23

5.6.1 PC Version ...23

5.6.2 Restrictions ...23

(3)

5.7 EMULATOR...25

5.7.1 Restrictions ...25

5.7.2 ADSP-21010/ADSP-21020 EZ-ICE Specific Restrictions ...26

5.7.3 SHARC Software EZ-ICE Specific Restrictions ...27

5.7.4 SHARC Hardware EZ-ICE Specific Restrictions...27

5.8 SPLITTER...28

5.9 C LANGUAGE TOOLS...28

5.9.1 G21K Driver ...28

5.9.2 G21K Preprocessor ...28

5.9.3 G21K Optimizing C Compiler...28

5.9.4 G21K Run Time Library ...29

5.9.5 Compactor ...29

5.10 COFF TOOLS...29

5.10.1 CSWAP...29

5.10.2 CDUMP ...29

APPENDIX A: ADSP-2106X COMPACTOR REFERENCE MANUAL ...30

A.1 GENERAL INFORMATION...30

A.1.1 Introduction ...30

A.1.2 Optimizations Performed...30

A.1.3 Basic Blocks ...30

A.1.4 Calling Conventions ...31

A.1.5 gco Code Optimization ...31

A.2 USING THE COMPILER...32

A.2.1 Invocation...32

A.2.2 Code Options ...33

A.2.3 Suggestions for Using gco ...33

A.2.4 Status Report ...35

(4)

1.1 Documentation

To order additional copies of any of the following publications, contact an Analog Devices sales agent.

Documentation for use with this release includes the following:

ADSP-21000 Family Assembler Tools and Simulator Manual

ADSP-21000 Family C Tools Library Manual

ADSP-21000 Family C Runtime Library Manual

ADSP-21000 Family JTAG EZ-ICE User’s Guide & Reference

ADSP-21000 Family 3.3 Release Note

ADSP-2106x Compactor Reference Manual

ADSP-21020/ADSP-21010 User’s Manual

ADSP-2106x SHARC User’s Manual

1.2 Contents of ADSP-21000 Family Development Tools

This release note contains information on the following software development tools for ADSP-21000 Family DSP microprocessors that is not described in, or has changed from, the descriptions in the corresponding user’s manuals.

Assembler

Linker

Librarian

Simulator

Emulator (EZ-ICE® In-Circuit Emulator)

PROM Splitter

Loader

CSWAP

CDUMP

G21K Optimizing C Compiler

G21K C Runtime Library

Compactor

1.3 Software Registration

We can better support you if you register. Please register your software by returning the enclosed registration form.

SHARC, EZ-ICE, EZ-LAB, and the SHARC logo are registered trademarks of Analog Devices, Inc. Microsoft and Windows are registered trademarks, and Windows NT is a trademark of Microsoft Corporation. Sun Microsystems, Sun, Sun-04, SunOS, Solaris, and OpenWindows are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SPARC trademarks are trademarks or registered trademarks of SPARC International, Inc. in the United States and other countries. All other brand and product names are trademarks or registered trademarks of their respective organizations.

(5)

1.4 For Technical Assistance

Analog Devices’ Computer Products Division customer support staff is available to assist with your DSP installation or usage questions. Contact customer support as follows:

• Call (800) ANALOG-D to reach the Analog Devices automated customer support hotline.

• Call (617) 461-3881 in Norwood, Massachusetts, USA, for applications engineering or marketing information.

• Send application questions by email to: dsp_applications@analog.com or to the European center at dsp-europe@analog.com.

• Send application or marketing questions by FAX to: (617) 461-3010, or FAX questions to our European center at 49-89-7603-307.

• Send application or marketing questions by mail to the following address:

Analog Devices, Inc.

Computer Products Division Attention: Customer Support

One Technology Way, P.O. Box 9106 Norwood, MA 02062-9106 USA

• Contact customer support at the Norwood office by Telex: 924491, TWX: 710/394-6577, or cable: ANALOG NORWOODMASS.

You may get more information on Analog Devices’ products from the following sources:

• Contact your local Analog Devices sales representative or authorized distributor.

• Access the Analog Devices internet home page at: http://www.analog.com/

• Access the Computer Products Divsion’s Bulletin Board Service (BBS) at speeds up to 14,400 baud, no parity, 8 bits data, 1 stop bit, dialing (617) 461-4258. This BBS supports: V.32bis, error correction (V.42 and MNP classes 2,3, and 4), and data compression (V.42bis and MNP class 5).

• Access the Computer Products Division’s File Transfer Protocol (FTP) at: ftp ftp.analog.com or ftp 137.71.23.21 or from an internet browser ftp://ftp.analog.com/pub/dsp (This site is a mirror of the BBS).

1.5 Warranty

• Analog Devices warrants G21K for users who have purchased this program as part of an ADSP-21000 Family Development Software package according to the terms and conditions of the ADSP-2100 and ADSP-21000 Family Development Software License Agreement provided with this software distribution, subject to the GNU General Public License, also provided therein.

• The UNIX license grants the right to use this product on either Sun or Solaris, but not both.

(6)

2 SALES PACKAGE

This software package is available for PC workstations. The part numbers are:

Part Number Includes this software...

ADDS-210xx-SW-SUN Assembler, Linker, Librarian, Assembly Library, ADSP-21020 Simulator, ADSP-21020 Emulator, ADSP-2106x Simulator, ADSP-2106x Emulator, PROM Splitter, G21K C Compiler, C Runtime Library, ADSP-2106x Compactor (Beta version), ADSP-2106x Loader

ADDS-210xx-SW-PC Assembler, Linker, Librarian, Assembly Library, ADSP-21020 Simulator, ADSP-21020 Emulator, ADSP-2106x Simulator, ADSP-2106x Emulator, PROM Splitter, G21K C Compiler, C Runtime Library, ADSP-2106x Compactor (Beta version), ADSP-2106x Loader

(7)

3 SOFTWARE INSTALLATION

Note the requirements for your package and follow the appropriate instructions.

3.1 PC Version

The PC package contains a set of 3-1/2" high-density diskettes. Make sure that your disk drive is capable of reading the diskettes.

3.1.1 PC Requirements

• Microsoft® Windows® 3.1 or higher is required to run Windows-based tools. Because these tools have not been validated on either Windows 95 or Windows NT™, we do not support their use on either of these systems.

These tools may run on Windows 95 and Windows NT, but some errors can occur that are non-recoverable.

• This software requires up to13 MB of hard disk storage. The required system configuration to run the

development software is a 386, or higher, based PC with hard disk, high-density floppy disk drive, a color video card and VGA monitor, and a minimum of 2 MB extended RAM. DOS 3.1 or higher. A mouse is highly recommended.

• You must have at least 450 Kb of memory available in the lower 640 Kb in order for the software to run properly. Most device drivers and TSRs consume this lower memory. Maximize the low memory available to the software by moving as many of these device drivers and TSRs into high memory.

• The software opens many files and accesses these files frequently. Performance can be degraded, or fail in some cases, if DOS is not set up to support this. In the config.sysfile, be sure the following directives are present and the values for these directives are at least equal to the minimum shown below:

BUFFERS=25 FILES=40

• If you will be using the development software in native DOS, both Extended Memory Support (XMS) and Expanded Memory Support (EMS) are required. Use memory managers that support both standards and be sure not to disable EMS memory in your memory manager if you will be running native DOS. If you will not be using the development software in native DOS, but will use the software in DOS boxes under Windows, only XMS memory support is required.

If you are running TMS under Windows 3.1 (or 3.11) you will need to edit the DOSPPRMPT.PIF file as follows:

1. Start the PIF Editor.

2. Open the file DOSPRMPT.PIF. This file is normally located in the \WINDOWS directory.

3. Set the memory requirements (KB Desired) to -1 (minus one) for main memory, xms, and ems memory.

4. Save the changes and exit.

These changes allow images running in a DOS window to allocate as much real memory as needed and prevent memory allocation errors.

(8)

DPMI Server needed

• The 3.3 release requires you to have a DPMI server installed. As such the release will not work with vanilla DOS. An error such as “Load error: no DPMI” will result if you try and run the release without a DPMI server.

You may either obtain a commercial DPMI server (for example, run g21k in a DOS box from windows), or download and install CWSDPMI (v2misc\csdpmi3b.zip from Simtel.Net mirrors) which is a free DPMI server.

Windows 3.1

• Under Windows, be sure you’ve allocated a sufficiently large swap file (at least 40 Mbytes) from the Windows Control Panel and make sure the .PIF file for your program doesn’t have too low a limit on EMS/XMS usage.

• You must make sure the size of your Windows swap file can be at least two times the largest virtual memory size you need. Check if you have enough free disk space. If you don’t, run a defragger (Windows needs the swap file to be contiguous). This size is normally limited by the “virtual=4 times free physical” rule, but you can change that by inserting the line:

PageOverCommit=n

in the [386nh] section of your system.ini file. The parameter n is 4 by default, but can be set to be as large as 20.

3.1.2 PC Installation Procedure for Windows 3.1

The software uses a Windows installation utility to load the software onto your hard drive. To install the software:

1. Insert the floppy into your PC.

2. Start Windows if it is not already running.

3. From the Program Manager, File Manager or the Start Menu in Windows 95, select Run... from the File menu.

4. In the dialog box that appears, type the following 5. “a:\install” (or “b:\install”)

6. Follow the directions on the screen.

7. Reboot your PC after completing the installation for all changes to take effect.

The installation procedure installs the simulator and emulator initialization and help files into the c:\ADI_DSP directory. Copy these files to the c:\windowsdirectory before attempting to run the simulator or emulator.

This ensures proper functioning of these programs.

3.1.3 PC Environment Variables

The development software requires several environment variables in order to run properly and efficiently. Because the installation procedure is Windows based, these environment variables must be set manually. This section describes what these environment variables are used for and how to change them. In addition to these environment variables, remember to include the development tools executable directory in your search path. All environment variables are typically setup in your autoexec.bat file. See the Readme.txt file on the installation disk, and your installation directory, for more information.

Variable Name Typical Value Description

ADI_DSP C:\ADI_DSP Points to the root directory of the development tools software.

Insure there is no trailing white space after the pathname.

TMP C:\TMP Points to a directory that all tools, except the compiler, will use for temporary file storage. For optimum performance from the tools, this should point to a sufficiently large RAM drive.

(9)

3.2 Sun Version

The Sun package contains a CD-ROM.

3.2.1 Sun Requirements

The following is required for Sun Installations:

System SUN-4, SPARC-based

Operating System SunOS 4.1.1 or SunOS 5.5.1 (Solaris)

X Server X11R5 or OpenWindows 3.0

Window Manager mwm (Motif 1.2), olwm or twm

Disk Drive 22 MB plus 48M swap space

Tape Drive CD-ROM Drive

RAM 12 MB

Miscellaneous Color monitor highly recommended, keyboard and mouse required.

In addition, the development software, specifically the simulators, use the

gnuplot

graphics package for the Free Software Foundation for plotting memory. If you plan on using the plotting feature of the simulators, be sure you have versions 3.5 of gnuplot in your executable search path. You can obtain gnuplot from the official distribution site;ftp.darmouth.edu [129.170.16.4]. The file is called

/pub/gnuplot/gnuplot3.5.tar.Z. Official mirror sites, in Australia, monu1.cc.monash.edu.au [130.194.1.101] and in Europe, irisa.irisa.fr [131.254.254.2].

If you are using the Xnews server, be sure Xnews patch #100444-66 is installed. This patch can be obtained from Sun, via anonymous FTP, at sunsolve.sun.com. The file is called /pub/patches/100444-66.tar.z.

3.2.2 Sun Installation Procedure

The software uses an installation utility to load the software, from the CD-ROM, onto your hard drive. To install the software:

1. Insert the CD-ROM into the drive.

2. Create a directory where the software will be installed, typically named adi_dsp.

3. Use the cd command to make this the default directory.

4. Extract the software from the CD-ROM with the following command:

“tar -xvf ‘cd_mount_point'/sunos.tar”

or

“tar -xvf ‘cd_mount_point'/solaris.tar”

5. Move the “windows” directory created in the adi_dsp subdirectory to your home directory. This can be done by entering the following at the command line:

mv “full pathname of the adi_dsp directory”/windows ~/.

6. Create the ADI_DSP environment variable and add the executable directory to your default path. This is typically done in your .cshrc file by adding the lines:

setenv ADI_DSP “full pathname of the adi_dsp directory”

set path = $path ($ADI_DSP/bin) setenv MWHOME ${ADI_DSP}/mw

source ${MWHOME}/setup-mwuser.csh

7. Source your .cshrc file or, log out and then log back in for the changes to take effect.

(10)

3.2.3 Sun Environment Variables

When you followed the above installation procedure, you created all the environment variables needed by the software. This section describes what these environment variables are used for and how to change them.

Variable Name Typical Value Description

ADI_DSP adi_dsp

Points to the root directory of the development tools software. Insure there is no trailing white space after the pathname.

MWHOME adi_dsp/mw

Points to the directory that contains the windowing library routines needed to run the simulators.

(11)

4 CHANGES FROM PREVIOUS RELEASE

This section describes the changes from release 3.2 to release 3.3 and 3.3.1. The changes include:

• binary executables are in a different location

• Assembler, Loader, Linker, Simulator, Emulator, G21K Driver, G21K Preprocessor, G21K Compiler, G21K Run Time Library, and CSWAP have changed.

• A new tool, the compactor, is available in this release and is documented in Appendix A of this Release Note.

These changes are described in detail in this section.

4.1 Binary Executables Directory

• The binary executables have been moved from C:\ADI_DSP\21k\BIN to C:\ADI_DSP\BIN. You must change all paths and working directories to access these files in this new location.

4.2 Assembler

• Added new 21061 assembly instruction. A new instruction (IDLE16) has been implemented for the 21061. The IDLE16 instruction behaves identically to the IDLE instruction, except that during the IDLE16 instruction execution, the internal clocks of the chip runs at 1/16th the frequency while the processor waits for an interrupt.

When the IDLE16 instruction is executed, there should be no outstanding external memory operations. The interrupt recognition circuitry will also run at 1/16th the frequency.

4.3 Assembly Run-Time Library

• None.

4.4 Loader

• The loader has undergone major changes since the last release. This new documentation is to supersede anything currently in the SHARC User Manual and the Assembler Tools & Simulator manual.

4.4.1 Introduction

The loader is a utility program supplied with the ADSP-2106x Family Development Software. The loader coverts an ADSP-2106x executable program, generated by the linker, into a format which can be used to boot a target hardware system and initialize its memory. The loader’s invocation command is ldr21k.

The following naming conventions are used throughout this documentation.

The loader refers to ldr21k contained in the software release.

The boot loader or kernel refers to the executable file that performs the memory initialization on the target.

The boot file refers to the output of the loader that contains the boot loader and the formatted system configurations.

Booting refers to the process of loading the boot loader, initialization system memory, and starting the application on the target.

Memory is referred to as being either data memory, program memory, internal or external memory.

The ADSP2106x has a special hardware feature that load a small program into internal memory at chip reset. This program can come from external PROM, the host port, or the link port, based on how the chip’s external pins are hooked up. The ADSP-2106x supports three booting modes: EPROM, HOST, and LINK. The SHARC also supports 16-bit, 32-bit, 40-bit and 48-bit data memory. It is designed for use with systems that execute from RAM, internal,

(12)

external, or both. A boot file generated with EPROM or HOST boot mode and with one input file by the loader can be tested in the ADSP2106x Simulator.

Each booting mode packs boot data into 48-bit instructions and uses DMA channel 6 of the ADSP-2106x'’ on-chip DMA controller to transfer the instructions to internal memory. For EPROM booting via the external port, the ADSP-2106x reads data from an 8-bit external EPROM. For HOST booting , the ADSP-2106x accepts data from a 16/32-bit host microprocessor (or other external device). For LINK booting mode, the ADSP-2106x receives 4-bit wide data in link buffer4. If no boot mode is selected at reset, the ADSP-2106x starts executing instruction from address 0x0040 0004 in external memory.

The boot loader usually replaces the mem21k runtime memory initializer. Any executable file to be processed with the ldr21k boot loader should normally not be processed by mem21k. The

-nomem switch of the C compiler should be used when compiling any c source files to disable mem21k. When compiling with the -nomem switch, the architecture file’s seg_init section need only contain 16 slot/locations of space.

The DMAC6 control register is specially initialized for booting in each mode. DMA Channel 6 is configured as external port buffer 0 when used for EPROM and HOST booting, and configured as link port buffer 4 when used for LINK booting mode.

In general, the boot process begins by downloading the boot loader onto the target system. The boot loader then sets up the system as necessary, and begins to load initialization data. The boot loader initializes the entire system, with the exception of the area occupied by the loader itself. Once the boot loader has finished initializing the rest of the system, it needs to load over itself.

ldr21k can figure out the type of processor in the target and its memory configuration, and the widths of the memory segments from the coff file executable. The loader uses this information to initialize memory correctly.

Note that when using any of the power-up booting modes, address 0x20004 should not contain a valid instruction since it is not executed during the booting sequence. A NOP or IDLE instruction should be placed at this location.

The loader requires this location for last minute patching of the system state before starting the target executable.

The loader generates a warning if 20004 does not contain NOP or IDLE.

The SYSCON and WAIT registers should be configured with the correct value in the kernel before generating the boot file. During the boot procedure, external memory writes may happen with incorrect values in SYSCON (bank size) and WAIT (wait mode and counts), and the memory access may fail. The kernel source files 060_link.asm, 060_host.asm and 060_prom.asm should be edited to add the appropriate initializations of SYSCON and WAIT if external memory loading is required.

If the kernel for EPROM, HOST, and LINK booting modes is customized, be sure that segment named “seg_ldr”

(found in $ADI_DSP\21k\etc\060_ldr.ach) is defined. For JTAG boot on the ADSP-21020, the segment “boot_rom”

is used.

(13)

4.4.2 Selecting The Booting Mode

The booting mode is selected using the LBOOT, EBOOT, and ~BMS pins as shown in Table 1.1.

EPROM booting is selected when the EBOOT input is high. This causes ~BMS to become an output, to be used as the boot EPROM chip select. ~BMS is deasserted when ADSP-2106x is not the bus master. When EBOOT is low,

~BMS becomes an input used to select between HOST boot mode or no boot mode.

Pin Type Description

EBOOT I EPROM Boot Select. When EBOOT is high, The ADSP-2106x is configured for booting from an 8-bit EPROM. When EBOOT is low, the LBOOT and ~BMS inputs determine booting mode.

LBOOT I LINK Boot - HOST Boot Select. When LBOOT is high, the ADSP-2106x is

configured for link port booting. When LBOOT is low, the ADSP2106x is configured for host processor booting.

~BMS I/O/T* Boot Memory Select.

Output: Used as chip select for boot EPROM devices (when EBOOT=1, LBOOT=0).

In a multiprocessor system, ~BMS is output by the bus master.

Input: When low, indicates that no booting will occur and that ADSP-2106x will begin executing instructions from external memory.

*Tristatable only in EPROM boot mode(when ~BMS is an output).

EBOOT LBOOT BMS Booting Mode

1 0 output EPROM (connect ~BMS chip select)

0 0 1 (input) Host processor

0 1 1 (input) Link port

0 0 0 (input) No booting. Processor executes from external memory.

0 1 0 (input) reserved

1 1 x (input) reserved

Boot loader

060_prom.asm is the source file for the ADSP-2106x PROM default loader which is loaded into seg_ldr at reset. The architecture file is named 060_ldr.ach.

060_host.asm is the source file for the ADSP-2106x HOST default loader which is loaded into seg_ldr at reset. The architecture file is named 060_ldr.ach.

060_link.asm is the source file for the ADSP-2106x LINK default loader which is loaded into seg_ldr at reset. The architecture file is named 060_ldr.ach.

Each kernel begins with defining macros that contain addresses of various IOP registers that are used in the code following by table containing the interrupts vector, up to and including the DMAC6 interrupt. Most of these interrupts are not necessary for the operation of the boot loader. The only interrupts used by the kernel are the reset interrupt (00x20004-0x02007) and the DMA6 interrupt (0x20040-0x20043).

The kernel operates as the following sequence:

1. The External Port DMA Channel 6 interrupt (EP0I) is activated after the DMA transfers stop.

DMAC6 control setting is stored in R2 for later restore and DMAC6 is clear for new setting.

2. ~BMS is deactivated and normal external memory select are activated by clearing the BSO bit in SYSCON register. Three copies of SYSCON are used in the program; one that contains the original value of SYSCON, one

(14)

that contains SYSCON with BSO bit set which allows that ADSP-2106x gains access to the boot EPROM, and a third with the BSO bit cleared.

When BSO=1, the EPROM packing mode bits in the DMACx control register are ignored and 8-48 bit packing is forced. (Note that 8 bit packing is only available during EPROM booting or when BSO is set). When one of the external port DMA channels is being used in conjunction with the BSO bit, none of the other three channels may be used.

When BSO=1, ~BMS is not asserted by a core processor access, only by a DMA transfer. This allows your bootstrap program (running on the ADSP-2106x core) to perform other external accesses to non-boot memory.

3. Interrupts and nesting are enabled for DMA transfer. The IMASK register is set to allow DMA6 and MODE1 register is set to enable interrupts and allow nesting.

4. Get processor id from SYSTAT register. Find start address of boot section for this processor in the processor id- starting address table (for multiprocessor EPROM mode). The table has 7 48-bit entries formatted as:

Address(32 bit) Processor id (16 bit)

5. DMAC6 control register is set to 0x221 and DMAC6 parameters are set up to read data word by word from the starting address of boot section of corresponding processor id in EPROM. Each word is read in to address 0x20004 for dispatching. Each boot section for a specific processor could includes more than one initialization block. Each block is formatted as:

Not used (MSB 32 bits) Data type (LSB 16 bits) Address (MSB 32 bits) Length (LSB 16 bit) Boot Data (48 bit)

: :

16 LSB of the first word is the data type of each data block. 32 MSB of the second word is the starting address of internal memory and 16 LSB of the second word is the length of following data. Each initialization block is identified by a 16-bit tag which proceeds the block. Each type of initialization has a unique tag number.

Tag Number Initialization Type

0 FINAL INIT

1 ZERO DM16

2 ZERO DM32

3 ZERO DM40

4 INIT DM16

5 INIT DM32

6 INIT DM40

7 ZERO PM16

8 ZERO PM32

9 ZERO PM40

10 ZERO PM48

11 INIT PM16

12 INIT PM32

13 INIT PM40

14 INIT PM48

Kernel initializes both internal and external memory by reading the data form EPROM using a routine called read_PROM_word and write to specific location of memory. For zero-valued format data block whose tag is one of the 1,2,3,7,8,9,or 10, an initialization of 16 or 32 bit memory is done in a loop which writes a zero-value to memory. Any initialization of 40 or 48-bit PM memory uses a write with the PX register set to zero. For non-zero

(15)

writes the appropriate width value to memory. This loop is repeated once for each word being initialized. After kernel reads each value from EPROM, it locks the bus while it writes the value to memory. The bus is unlocked when the write is completed. After the boot loader completes initialization of this block, it reads the next tag and executes the appropriate initialization routine.

6. In the final initialization stage, the kernel loads the first 256 words of target executable file and overwrites itself.

The final initialization is indicated by a 0 value tag. When the loader detects this tag, it reads the next 48-bit word.

This word indicates the instruction that should be located at 0x20040 when the loading is completing. This instruction is loaded into the 48-bit PX register after the boot loader has finished initializing internal memory. The kernel requires that address 0x020040 contain an RTI instruction because a DMA6 interrupt is generated when the initialization is complete. The R9 register is loaded with 0xbdb0000; this is the encoded instruction PM(0,I8)=PX.

The next 256 48-bit words are loaded into memory over the boot loader. This process is executed with a DMA transfer sequence which, when completed, RTI is executed at address 0x20040, returning to address 0x20004. An instruction at this address sets SYSCON to its initialization value, and writes the correct instruction at address 0x20040. The code then proceeds to address 0x20005 which should be the beginning of user application code.

Note that the kernel assumes IMDW is 0 during booting process before it is set to 1 in the final boot stage of the kernel. Also remember that when using any of the power-up booting modes, location 0x20004 should not contain a valid instruction since it is not executed during the booting sequence. A NOP or IDLE instruction should be placed at this location.If kernel is going to initialize external memory, be sure the value set in SYSCON and WAIT register are correct, otherwise the processor may hang. Be aware that the value in DMAC6 is non-zero and that the IMASK is set to allow DMAC6 interrupts. Because the DMAC6 interrupt remains enabled in IMASK, it must be cleared before this DMA channel is used again. Otherwise, unintended interrupts may occur.

4.4.2.1 EPROM booting mode

EPROM booting mode is selected when the EBOOT input is high and LBOOT is low which causes ~BMS to become an output, to be used as the boot EPROM chip select. The byte-wide boot EPROM must be connected to data bus pin 23-16. The lowest address pins of the ADSP-2106x should be connected to the EPROM’s address lines.

The EPROM’s chip select should be connected to BMS~ and its output enable should be connected to RD~.

During reset, the ADSP-2106x’s ACK line is internally pulled high with a 2K Ω equivalent resistor and is held high with an internal keeper latch. It is not necessary to use an external pullup resistor on the ACK line during booting or at any other time.

The External Port DMA Channel 6 becomes active following reset; it is initialized to 0x02a1 which allows external port DMA enable and selects DTYPE for instruction words. The packing mode bits PMODE are ignored, and 8-to- 48 bit packing is forced with least-significant-word first. The UBWS and UBWM fields of the wait register are initialized to generate six wait states for the EPROM access in unbanked external memory space.

Parameter Register Initialization Value

II6 0x0002 0000

IM6 uninitialized (increment by 1 is automatic)

C6 0x0100 (256 instruction words)

CP6 uninitialized

GP6 uninitialized

EI6 0x0040 0000

EM6 uninitialized (increment by 1 is automatic)

EC6 0x0600 (256 words x 6 bytes/word)

Table 1.3 shows how the DMA Channel 6 parameter registers are initialized at rest for EPROM booting. The count (C6) is initialized to 0x0100 for transferring 256 words to internal memory. The external count register (EC6), which is used when external addresses are generated by the DMA controller, is initialized to 0x0600 (i.e. 0x0100 words with six bytes per word).

(16)

At system start-up, when the ADSP2106x’s ~RESET goes inactive, the following sequence occurs:

1: The ADSP-2106x goes into an idle state, identical to that caused by the IDLE instruction. The program counter (PC) is set to address 0x20004.

2: The DMA parameter registers for channel 6 are initialized (as shown in Table 1.3 above).

3: ~BMS becomes the boot EPROM chip select.

4: 8-bit DMA transfers from EPROM to internal memory begin, on the external port data bus lines 23-16.

5: The external address lines (ADDR31-0) start at 0x00040 0000 and increment after each access.

6: The ~RD strobe asserts as in a normal memory access, with six wait states (seven cycles).

The EPROM is automatically selected by the BMS~ pin after reset; other memory select pins are disabled. The ADSP-2106x’s DMA controller reads the 8-bit EPROM words, packs them into 48-bit instruction words, and transfers them to internal memory until 256 words have been loaded. The DMA external count register decrements after each EPROM transfer. When EC6 reaches zero, the DMA transfer stops and EP0I is activated. RTI return the program counter to 0x20004 where kernel begins.

For EPROM booting mode of a single processor with ID=0, the -id#exe switch should not be used and the first executable in the command line will be included in the boot file. For a single processor with ID=1, the

-id1exe

switch must be used (See the section on Switches 4.4.3)

The WAIT register UBWM (used for EPROM booting) is initialized at reset to both internal wait and external

acknowledge required. The ACK pin keeper latch initially holds acknowledge high (asserted). If acknowledge is driven low by another device during an EPROM boot, it is possible the keeper latch may latch acknowledge low. The SHARC will view the deasserted (low) acknowledge as a hold off from the EPROM. Wait states will continually be inserted thus preventing the EPROM boot from completing. It is recommended that the WAIT register be changed early within the first 256 word boot kernel so that UBWM is set to internal wait mode (01).

4.4.2.2 HOST booting mode

ADSP-2106x accepts data from an 16-bit host microprocessor (or other external device) via the external port EPB0 and pack boot data into 48-bit instructions using channel 6. HOST is selected when the EBOOT and LBOOT inputs are low and BMS~ is high. After reset the ADSP-2106x goes into an idle stage with the program counter set to address 0x20004. ADSP-2106x enters slave mode and wait for the host to download the boot program.

The parameter registers for External port DMA Channel 6 are initialized as below: The DMA Channel 6 Control register is initialized to 0x00a1, which allows external port DMA enable and selects DTYPE for instruction words, PMODE for 16-to-48 bit word packing, and least-significant-word first. Because the host processor is accessing the EPB0 external port buffer, the HPM host packing mode bits of the SYSCON register must be set to correspond to the external bus width specified by the PMODE bits of DMAC6 control register. If a different packing mode is desired, the host must write to DMAC6 and SYSCON to change the PMODE and HPM setting.

Parameter Register Initialization Value

II6 0x0002 0000

IM6 uninitialized (increment by 1 is automatic)

C6 0x0100 (256 instruction words)

GP6 uninitialized

GP6 uninitialized

IE6 uninitialized

EM6 uninitialized

EC6 uninitialized

(17)

The host boot file created by the loader requires the host processor to perform the following sequence of actions:

1: The host initiates the booting operation by asserting the ADSP-2106x’s ~HBR input.

This tells the ADSP-2106x that the default 16 bit bus width will be used. The host may also optionally assert the CS~

chip select input to allow asynchronous transfers.

2:After the host receives the HBG~ signal back from the ADSP-2106x, it can start downloading instructions by writing directly to the external port DMA buffer 0 or it can change the reset initialization conditions of the ADSP- 2106x by writing to any of the IOP control registers. The host must use data bus pins 31-16.

3: The host can continue to write 16-bit words to EPB0 until the entire program is booted. Between host’s each writing to external port DMA buffer 0, 12 cycles is the minimum intervention, i.e. there must be at least 12 cycles between host release bus and next bus request.

After 256 instructions have been downloaded, the DMA transfers stop and the following sequence occurs:

1: The External Port DMA Channel 6 interrupt (EP0I) is activated.

DMAC6 control setting is stored in R2 for later restore and DMAC6 is clear for new setting.

BUSLCK bit in MODE2 to lock out host.

2:SYSCON register value is stored in R12 for restore.

3: Interrupts and nesting are enabled for DMA transfer. The IMASK register is set to allow DMA6 and DMA7 interrupts, and MODE1 register is set to enable interrupts and allow nesting.

4: DMAC6 control register is set to 0x00a1, and DMAC6 parameters are set up to read the data word by word from external buffer 0. Each word is read in to address 0x20004 for dispatching. The data through this buffer has structure of boot section which could include more than one initialization block. BUSLCK bit in MODE2 is cleared to let host write in the external buffer 0 right after the DMA Channel 6 is activated. For the data structure of boot section and initialization please refer loader section in PROM booting.

5: In the final initialization stage, the kernel loads the first 256 words of target executable file and then overwrites itself. The final initialization works the same way as that of EPROM booting except that BUSLCK bit in MODE2 register is cleared to allow host to write to the external port buffer.

Note that kernel assumes IMDW is 0 during booting process except for the final initialization stage. Also remember that when using any of the power-up booting modes, location 0x20004 should not contain a valid instruction since it is not executed during the booting sequence. A NOP or IDLE instruction should be placed at this location. If kernel is going to initialize external memory, be sure the value set in SYSCON and WAIT register are correct, otherwise the processor may hang. Be aware that the value in DMAC6 is non-zero and that the IMASK is set to allow DMAC6 interrupts. Because the DMAC6 interrupt remains enabled in IMASK it must be cleared before the DMA channel can be used again. Otherwise, unintended interrupts may occur.

4.4.2.3 LINK booting mode

ADSP-2106x receives data from an 4-bit link buffer 4 and packs boot data into 48-bit instructions using channel 6.

LINK mode is selected when the EBOOT is low and both LBOOT and BMS~ are high. The external device must provide a clock signal to the link port assigned to link buffer 4. The clock can be any frequency, up to a maximum of the ADSP-2106x clock frequency. The clock’s falling edges strobe the data into the link port. The most significant 4- bit nibble of the 48-bit instruction must be downloaded first. The link port acknowledge signal generated by the ADSP-2106x can be ignored during booting since the link port cannot be preempted by another DMA channel.

The LINK port booting operation is similar to the HOST booting operation; the II6 and C6 parameter registers for DMA Channel 6 are initialized to the same values. The DMA Channel 6 Control Register initialized to 0x000a0. The LCTL and LCOM link port control registers are overridden during LINK port booting to allow link buffer 4 to receive 48-bit data.

Be aware that after booting completes, the IMASK remains set to allow DMAC6 interrupts. It must be cleared before link buffer 4 is enabled, otherwise unintended link interrupts may occur.

(18)

4.4.2.4 Multiprocessor Prom Booting

All ADSP-2106xs Boot in turn from a single EPROM.

The BMS~ signals from each ADSP-2106x may be wire-or’ed together to drive the chip select pin of the EPROM.

Each ADSP-2106x can boot in turn, according to its priority. When the last one has finished booting, it must inform the others that program execution can begin.

For multiprocessing EPROM booting, the -id#exe switch is used to specify which executable files are targeted for SHARCs specific SHARC IDs. For EPROM booting mode of a single processor with ID=0, the -id#exe switch should not be used and the first executable in the command line will be included in the boot file. For a single processor with ID=1, the -id1exe switch must be used.

Multiple files can only be specified in EPROM booting mode.

The WAIT register UBWM (assumed for EPROM booting) is initialized at reset to both internal wait and external acknowledge required. The ACK pin keeper latch initially holds acknowledge high (asserted). If acknowledge is driven low by another device during an EPROM boot, it is possible the keeper latch may latch acknowledge low. The SHARC will view the deasserted (low) acknowledge as a hold off from the EPROM. Wait states will continually be inserted thus preventing the EPROM boot from completing. It is recommended that the WAIT register be changed early within the first 256 word boot kernel so that UBWM is set to internal wait mode (01).

4.4.3 Switches

ldr21k [infile]/[-id#exe=file.exe …] [-b{type} -c{custom} -f{format}

-l file -o file -p{address} -v -h -t{timeout}]

Based on the requirements of your system design, you may need to modify the kernel file. If changed are made to the kernel, for example, if the kernel initializes external RAM, it may need to change the wait state configuration in the WAIT register of the external memory and select bank size MSIZE in the SYSCON register. There is a commented section area at the start of each kernel to place such modifications.

How to recompile:

Kernel for EPROM booting:

asm21k -adsp21060 060_prom ld21k -a 060_ldr.ach 060_prom Kernel for HOST booting:

asm21k -adsp21060 060_host ld21k -a 060_ldr.ach 060_ host Kernel for LINK booting:

asm21k -adsp21060 060_ link ld21k -a 060_ldr.ach 060_ link -id#exe=filename

Only for multiprocessor system, # should be the number > 0 and <= 6;

-b{type}: Where type indicates the method of booting to be used. The value of type can be prom, host, and link. The default is -bprom.

-c{custom} This switch causes the loader to change operation for a custom boot loader file. The value of custom can be 20004 or 20040. The loader will use this address as the dispatching register during the loading process. Since the default kernel has chosen 0x20004 as the dispatching register slot, this switch should not be used with default

(19)

-f(format) Where format describes the output format of the .ldr file. In EPROM booting mode, the value of format can only be hex which is also default value if no format is specified. In HOST and LINK booting mode, value of format can be one of ascii, binary, and include. Default format is ascii.

-h Display usage.

-l Specify an alternate boot loader for this boot file. If this option is not specified, the loader will use the boot loader in the current directory (if available), or from the ADI_DSP/21k/etc subdirectory.

-o Specify output file name.

-p(address): Specify EPROM starting address. Only used with EPROM booting mode. Without this switch, boot file is put at the very beginning of EPROM with starting address 0x0 which is SHARC’s external address 0x0040 0000.

-t(Timeout) Specify a timeout value. Timeout is in the range from 3 to 65530 and default is 65530. It limits the number of cycles that the SHARC will spend on initializations of external memory. The value of Timeout is linearly related to the number of cycles that the SHARC will lock the bus during booting. Specifically, the timeout instructs the SHARC to lock the bus for about 2*timeout cycles at most. So, if you have a very fast host that does not like to be locked out, use relatively small value for timeout value.

-v Verbose.

4.5 Linker

• Added new 21061 memory configuration support.

• Accepts new .ADSP21061 directive in architecture file.

4.6 Librarian

• None

4.7 Simulators

• ADSP-21020 Simulator - None.

• ADSP-2106x Simulator

Major simulator changes to last version:

1. Memory change: Support 21061 memory layout for 21061 processor.

2. Cache:

Add cache view function. It is listed under Core|Other|Cache Contents, which will show cache contents if cache is enabled.

Add cache Control register window. It is listed under Core|Other|Cache Control.

3. Peek: Add a Peek menu to main menu, which include the following two sub-menus.

Program name. It is listed under Peek |Program name, which will show which architecture file simulator is using, which program simulator is running, what is the target processor. It will help those people who run many programs on different processors frequently.

Architecture viewer. It is listed under Peek view Architecture, which will display architecture file.

4. Support IDLE16 instruction, that is, it supports single line assembler and dis-assembler of the instruction

(20)

5. Program will disable "IOP|Lport Ctrl" and "IOP|Lport LSRQ" menu item for 21061.

6. Implement AI and AF function under EXECUTION|Setup|Auto-Interrupt Control and Execution|Setup|Auto-Flag Control.

4.8 Emulator

ADSP-21020 Emulator - None.

ADSP-2106x Emulator

• Most of above simulator changes will also apply for the emulator, except those functions related to cache, AI, AF.

4.9 Splitter

• None.

4.10 C Language Tools 4.10.1 G21K Compiler Driver

• A new assembly-language optimizer, the compactor, has been added. See section 4.10.5.

• Optimization levels have changed from the previous release. The -O2 switch continues to perform full compiler optimizations. The -O3 switch now performs the same optimizations as -O2, but now also invokes the

compactor. The -O4 switch performs the optimizations of -O2, invokes the compactor, and then disables checks for negative loop counts (see below). The following table summarizes the new optimization levels:

Optimizer Switches Optimization

-O Perform some optimization

-O2 Perform full optimization, do not invoke the compactor -O3 Perform full optimization, then invoke the compactor

-O4 Perform full optimization, invoke the compactor, and disable loop checks

In the previous release, the -O3 switch performed full optimizations and also disabled loop checks. In Release 3.3(.1), to get the old -O3 behavior, use -O4 -no-CO.

One of the optimizations the compiler performs at optimization level -O4 is to disable loop checks, normally performed at runtime, which prevent a counted loop from executing if the count is zero or negative. For example, the following program, if compiled with the -O4 switch, would behave incorrectly whenever n were 0 or negative:

for (i = 0; i < n; i++) sum += a[i];

Use of the -O4 switch is only recommended after careful analysis of your program to ensure that all loops are executed at least once.

• Arbitrary switches can now be passed to several compiler stages by supplying g21k with a switch of the form -Ws,opts, where opts is a comma-separated list of arguments to pass and s indicates which stage (p for C preprocessor, o for compactor, a for assembler, or l for linker). For example, you could use g21k

-Wo,-ea,-gs,25 to pass the -ea and -gs 25 switches to the compactor.

• A new switch, -fno_short_double, has been added. This switch directs the compiler to use the 64 bit double precision IEEE floating point format for values of the C double type. By default, the compiler uses the

(21)

DSPs can operate more efficiently on 32 bit floating point values than on 64 bit values, so using the -fno_short_double switch will lead to significantly slower floating point operation.

4.10.2 G21K Preprocessor

• The preprocessor symbol __2106x__ is predefined for all 2106x processors, in addition to a processor- specific symbol (such as __ADSP21060__ or __ADSP21062__).

• The __FILE__ macro now handles backslashes in filenames better on the PC.

4.10.3 G21K Optimizing C Compiler

• A problem that caused incorrect code to be generated for some switch statements at -O2 has been fixed.

• The code generated for bitfield shifts is now correct for shift counts greater than 5.

• The compiler will no longer generate code in which a jump or branch can occur in the last three slots of a loop without padding it with no-ops.

• Problems with the generated code for the 64-bit floating point operations compare-to-zero and absolute value (available as the fabs() builtin) have been fixed.

• A potential code generation problem related to subtraction has been fixed. (While this was potentially a problem, no bad code has been reported or discovered to date.)

• The compiler will now generate code that avoids a hardware anomaly in pre-Version 2.0 silicon for the SHARC.

In the anomaly, the pre-modify address will be computed incorrectly if the result of the pre-modify references memory that is off-chip. The compiler is more conservative in its use of the pre-modify addressing mode to avoid this anomaly.

• For revision 1.2 of the 21060, code sequences of the form if cond move

move

don't work. The new -mjdwrite switch will cause the compiler not to generate such sequences.

• A problem in which function prologue and epilogue would still save and restore registers declared as reserved using the -mreserved switch has been fixed.

• The compiler previously didn't reserve registers when the architecture file reserved registers with the .REGISTER/RESERVED directive. This problem is fixed in this release.

• The compiler now correctly processes requests to reserve registers which are identified with two-digit numbers (e.g. R14).

• A problem with pointer arithmetic that could cause the compiler to crash has been fixed. The following example program will now compile successfully:

void f( int dm *p) {

*p-- = 0;

}

void g( int pm *p) {

int i = -1;

*(p-i) = 0;

g((void *)0);

*(p+i) = 0;

}

• A reported compiler crash related to register allocation has been fixed.

• The debug directives for longs generated by the previous compiler could cause the debugger to crash. The

(22)

• In previous releases of the PC-hosted SHARC compiler, the compile-time calculations for floating point values were slightly inaccurate. These differences have been fixed in this release.

• The PC-hosted compiler can now compile much larger programs than in earlier versions.

• The PC-hosted compiler and SPARC-hosted compiler now generate the same calling sequence in all cases.

• The compiler now generates more efficient code for comparing PM or DM values to zero.

• A second scheduler phase is now run to do further optimization.

• Max and min instructions are now generated for floating point numbers. Previous releases only generated max and min instructions for integer operations.

• A new optimization that has been added to recognize and reduce the code for a floating point dot product. The resulting code is pipelined for maximum efficiency on the SHARC.

• The order in which registers are allocated has been enhanced to better take advantage of the SHARC architecture.

• A problem with optimization of 64 bit double precision values has been eliminated. The problem only could happen at high optimization levels when passing arguments that were 64 bit doubles.

• When compiling code in which a loop-related variable was compared against zero, and the variable was also used in an expression of the form “-variable” or “expr >> variable”, the previous release of the compiler could sometimes generate the compare backwards.

4.10.4 G21K Run Time Library

• The TRUNC preprocessor macro defined in def21060.h conflicted with the processor instruction of the same name. The preprocessor macro (a mask for the truncation mode bit in the MODE1 register) has been renamed to TRUNCATE.

• Several macros in dma.h were incorrect and have been fixed.

• The macros in dspc.h now use __typeof instead of typeof to avoid problems with the -ansi switch.

• In stdlib.h, RAND_MAX was changed to 231–1 to reflect the actual range of values produced by rand().

• The routines used by the compiler for the signed modulo and unsigned divide operators could previously produce inaccurate results for several reasons. These problems have been fixed.

• A problem in the routine used to convert doubles to unsigned integers has been fixed. Previously, a single instruction immediately following such a conversion would be executed using truncating 40-bit arithmetic, because the machine mode restore at the end of the routine had a delayed effect.

• The following functions now work or work better with double-precision values:

exp() (used to cause a FLTII trap for large values) fabs()

rsqrt() sqrt()

• The following functions used to produce incorrect results for some ranges of input values. These problems have been fixed.

cabsf()

div() and ldiv() (failed when |numerator| < |denominator|) fmodf() (previously, could fail on negative numbers)

frexp() modff()

pow() and powf() (failed for negative base with integer exponent) rsqrt()

tan() (failed for negative inputs)

(23)

• atoi() and atol() now return the correct value when passed an empty string. In previous releases they would return random values.

• The function strtod() now works correctly for more inputs. There is a new function strtodf() which returns a 32-bit value; strtod() always returns a 64-bit value.

• The compiler now accepts without error calls to strtod() with all legal parameter types.

• The functions strcpy() and strcat() now work. In previous releases the terminating NUL was not copied.

• The function strcmpPD() is now correct. In the previous release there was an illegal jump in the implementation.

• strncat(a,b,0) randomly writes into string ‘a’.

• The runtime function histogram() has been fixed. It used to miscount some entries by 1.

• The zero_cross() functions now work correctly.

• The iir() function has been corrected. Previously, only the result produced by the first iteration was correct.

• The runtime function freep() is now part of the library. In previous releases the following code sequence would result in a link failure because _freep was not found:

int PM *p=0;

free (p);

• The macros LEFTZ and LEFT0 have been corrected.

• The routines setjmp() and longjmp() have been corrected and improved. They now correctly save all of the state that the compiler expects and are protected from interrupts. In addition, they have been made smaller and faster.

• The clear_interrupt() function has been fixed. In previous releases it was possible for the SHARC to miss interrupts that are not being cleared.

• In the previous release, signal() and interrupt() didn’t clear the correct bits in the IRPTL (interrupt latch register) before enabling global interrupts. System integrity could therefore be compromised since interrupts could happen during execution of critical code. These routines have been fixed.

Several problems were fixed in the interrupt dispatcher relating to saving scratch registers, popping them from run time stack in correct order, correct manipulations with the MODE1 register, and instruction latency issues.

More registers have been saved to better support nested interrupts.

• Registers I13 and I15 are now saved and restored around interrupt service routines, so that they can be used in scratch registers in the routines.

• The standard library function atof() now returns a 32-bit float; atoff()is the 64 bit version.

• The bsearch() function now works. Also, qsort() has been added since the last release.

4.10.5 Compactor

Note: The Compactor is only available for release with the full set of software of release 3.3 and on. The Compactor is not included with the EZ-KIT Lite software package.

• The compactor (also called GCO, the global code optimizer) is new in this release. The compactor takes assembly code, either compiler-generated or hand-written, and performs SHARC-specific optimizations. By taking advantage of multifunction instructions, pipelining, and various architecture nuances, the compactor is able to tailor the code to run faster.

• The compactor can be enabled by passing the -CO switch to the g21k driver when compiling a file (either C or assembly). The compactor is also enabled by default at optimization levels -O3 and higher. (Note that -O3 no

(24)

longer includes optimizations performed at -O3 in previous releases, but is now equivalent to -O2 -CO. See 4.10.1 for additional information on optimization changes.)

• For more information on using the compactor, see Appendix A of this Release Note.

4.11 COFF Tools 4.11.1 CSWAP

• Fixed bug in which bitfields were not being handled correctly.

4.11.2 CDUMP

• None.

(25)

5 RESTRICTIONS

This section details restrictions in this version of the ADSP-21000 Family Development Software. The restrictions described in this section are supplemental to those described in the corresponding user’s manual.

5.1 Assembler

• When using the backslash (\) line continuation character, do not put any characters after the backslash on the same line; it must be followed immediately by a carriage return. Otherwise, an assembler error occurs. For example, a comment or a space after a backslash causes an assembler error.

• When using the Rn=FDEP Rx BY <bit6>:<len6> instruction, use only positive numbers for <bit6>. A negative number for <bit6> results in a syntax error that is not properly reported.

• When multiple instructions are placed on a single line in the source file, the listing file shows only the last instruction on the line.

• Unprintable special characters in the source file may cause the assembler to crash.

• Macro substitutions made with a #define statement cannot begin with a number. The following example will fail:

#define 2me r0 = 1

• In the architecture file, the END value, must be greater than the BEGIN value when defining a segment. If not, when computing the size of a segment, the assembler incorrectly interprets the resulting negative number as a large positive number.

• In the include directory, there is a file called asm_sprt.h, in which are defined various macros to aid the user in writing assembly level implementations of ‘C’ functions. The use of this file is described in the ‘C’ Tools Manual. Omitted from the manual is a statement indicating this file is to be used only as an include file in ‘C’

programs. Unfortunately, when the file is included from an assembly level routine, the pre-processor defines that are automatically generated by the compiler, are not asserted. As such, what gets included from the file are ADSP-2106x definitions, which is fine if that is your target processor. If your target processor is an ADSP- 21020, you must manually define the processor define, __ADSP21020__, in order to include the proper ADSP-21020 definitions.

5.2 Assembly Run-Time Library

• None.

5.3 Linker

• The -s switch, used to strip symbolic information from an executable file does not work reliably.

• The -r switch is no longer supported.

• The linker will generate an error if the architecture file defines a multiprocessor memory space segment for processor 1, ID = 001, that defines locations 0x80000 through 0x9ffff. This is because that memory space is in fact locations 0x00000 through 0x7ffff of that processor.

• In the architecture file, the END value, must be greater than the BEGIN value when defining a segment. If not, when computing the size of a segment, the linker incorrectly interprets the resulting negative number as a large positive number.

(26)

5.4 Loader

• The boot loader does not make special provision for an executable that can be loaded by the automatic hardware boot alone. It creates a boot file that contains the boot loader, just to load over itself. Although this works without a problem, it generates a boot loader file that is significantly larger (more than twice the size) than necessary.

• The Loader does not efficiently pack the final initialization. Regardless of the size of the last initialization, the loader places 256 48-bit words in the boot file.

When using the loader, do not use the mem21k utility. Any executable that is going to be processed by ldr21k should not be processed with mem21k. See the “-nomem’ compiler switch. If mem21k is used with the loader, redundant initialization will occur and unnecessary internal memory is used up.

• The loader requires the use of address 0x20004 for booting an ADSP-2106x target. Any executable file that is going to be processed by ldr21k, should have a NOP or an IDLE instruction at address 0x20004. This only applies to ADSP-2106x targets.

• As noted in the users manual, the DMAC6 control register will not contain a zero when the program begins execution.

• The -fbinary switch has not been fully tested and, although implemented, is not supported for this release.

5.5 Librarian

• None.

5.6 Simulators 5.6.1 PC Version

• The source file sizes in CBUG are restricted to less than 64Kb.

5.6.2 Restrictions

• The following pulldown menus are not implemented for this release:

Save Layout Execute Instruction Counting Breakpoints Auto-Interrupt Auto-Flag Backtrace

• The ADSP-2106x silicon prioritizes DMA channels as follows: 0, 1, 2, 3, ChainLoad, ExtRW, 4, 5, 6, 7, 8, 9.

The simulator has reversed the priority of ChainLoad and ExtRW.

• When entering instructions into a PM window, “if ... else” instructions must be entered with a comma (,) before the else.

• The simulator allows writing to the following read-only and reserved bits in the IOP memory space:

LSRQ: 31-20 and 19-16 STCTLx: 28-24

LCTL: 31-30

LCOM: 31-26, 25-23, 11-0

LAR: 31-30

SYSCON: 7

STKY: 26-21

(27)

• The simulator incorrectly initializes the multiprocessing vector interrupt register, VIRPT, to 0x40014 (external).

The correct value should be 0x20014 (internal).

• The simulator’s display for the bus timeout counter, BCNT, incorrectly displays the bus timeout maximum value, BMAX.

• The simulator does not automatically clear it’s symbol table when a new executable is loaded.

• The simulator does not honor the short word sign extend bit, SSE, of the MODE1 register.

• Variable names which are identical to the segment name in which they reside cause the simulator to omit the variable name from the symbol table. The practice of naming symbols and segments with identical names should be avoided.

• The architecture file “.BANK” directive has no affect. The various “.BANK” qualifiers are not asserted by the simulator. In addition, wait states MSIZE, IMDWx bits etc., are not set automatically. These bits should be set by the user’s code at run time.

• The ADSP-2106x simulator does not support link ports. SPORT DMA transfers are supported. Because the external port master mode DMA transfers with external memory functionality has not been thoroughly tested, it is not a supported feature at this time.

• Host and PROM booting options are the only boot loading operation that the ADSP-2106x simulator supports.

Host boot files must be in ASCII format as created by the loader, ldr21k, with the -fascii switch.

• Arithmetic loops (i.e. non-counter-based loops) containing one or two instructions that terminate on the first iteration of the loop are not properly simulated. Workaround: Insert NOP instructions into the body of the loop to make it at least 3 instructions long.

• When enabling or disabling the timer through the MODE2 register, the timer may exhibit an extra cycle of latency before the change takes effect. This extra cycle of latency may also occur when the Auto-Interrupt Control and Auto-Flag Control functions are used.

• If an assembly label coincides with other labels, only the last label linked will be seen by the simulator symbols display and search.

• In the DAGs, when setting the base registers via the user interface, the corresponding index register gets set also.

This operation differs from the emulators where the index register does not get set.

• The simulator does not support both serial ports running in loopback simultaneously. The simulator does support loopback of either serial port, provided only 1 serial port is in loopback at a time.

• DMA SPORT transfers do not halt properly in the simulator. When a DMA count register decrements to zero, and no DMA chaining is called for, the DMA channel should disable itself. However, the DMA activity bit, in the DMASTAT register, is not cleared and the SPORT buffer status bits are incorrect.

• The Memory Dump command only supports hexadecimal syntax. If dumps in floating point format are required, use the plot memory command, and examine the resulting .plt file.

• In the ADSP-2106x simulator, if the multiplier underflow bit, MUS, of the STKY register is set, the simulator incorrectly clears the floating point underflow bit, FLTUI, of the IRPTL register when the FLTUI interrupt is serviced.

• In the status stack windows, the simulator allows the user to modify the FLAG bits, bits 19 through 22, of the ASTAT registers. These simulator should not allow modification of these bits.

• In the ADSP-21020 simulator, Program Memory windows do not support the floating point display mode.

• In the ADSP-21020 simulator, the BSET instruction will not simulate properly if the bit that is to be set lies in bit position 15 through 31. Note the following run-time library functions may not simulate properly as they employ use of this function; A-Law/ U-Law encoding, sin, atof, strtod, dtoi, dmult, dadd and dsub.

• In the ADSP-2106x simulator, memory references to reserved locations in IO space will result in the “Error --- Instruction Timed Out” message.

(28)

• The simulator does not support 40 bit fixed point values with the LOAD command; fixed point values are limited to 32 bits.

• After a chip reset, all simulators, include the 2 clock cycles that are used to fill the fetch/decode/execute pipeline, in their cycle counters. The EZ-ICEs do not count these 2 cycles.

• Note: This problem exists in the UNIX version only. The simulators (wsim06x and wsim020) hang if you invoke Help more than once during a session. If you invoke Help, exit Help, and invoke Help again, the simulator hangs. This hang-up occurs whether you invoke Help through the Help Menu choices (Contents, Context, or Using Help), through the F1 key, or some combination. To work around this problem, invoke Help once, “save” Help for later access by using the minimize function, and restore the minimized help as needed during the session. You can minimize Help from the Title Bar by selecting Minimize from the pull-down menu, or by clicking on the Down Arrow in the Windows Emulation or the Button in the Motif window.

• Certain conditions exist where an illegal memory segmentation definition in an architecture file may not be flagged as an error or warning by the linker, simulator or emulator. If a segment of memory is defined in short word space and again in normal word space, a segment overlap error may not be given even though two segments overlap. If finer granularity memory segmentation, as described in the top part of Figure 5.13 of the SHARC User's Manual, and 32 bit and 48 bit defined segments overlap, the tools may not detect the error.

Symptoms which may indicate such an error are runtime errors of "incorrect data in memory; code does not appear to be correct" and "untranslatable op code."

• When loading a file, the simulator sometimes fails to load very large executables (400k to 500k in size), resulting in a crash. The problem occurs because the executables contain an individual component that is larger than 64k. This problem exists in the simulator, emulator, and EZ-Kit only in the PC version of this release. You can get a patch that fixes this problem in the simulator, emulator, and EZ-Kit by contacting Analog Devices Technical Support.

5.7 Emulator

• This section describes the restrictions for each ADSP-210xx EZ-ICE emulator.

5.7.1 Restrictions

This section describes restrictions that are common to all ADSP-210xx EZ-ICE emulators.

• The following pulldown menus are not implemented for this release:

Save Layout Execute Instruction Counting Breakpoints Backtrace

• The Program Manager icons for the emulators are not included.

• The emulator does not automatically clear it’s symbol table when a new executable is loaded.

• The source file sizes in CBUG are restricted to less than 64Kb.

• The architecture file “.BANK” directive has no affect. The various “.BANK” qualifiers are not asserted by the emulator. In addition, wait states MSIZE, IMDWx bits etc., are not set automatically. These bits should be set by the user’s code at run time.

• Variable names which are identical to the segment name in which they reside cause the emulator to omit the variable name from the symbol table. The practice of naming symbols and segments with identical names should be avoided.

• The Memory Dump command only supports hexadecimal syntax. If dumps in floating point format are required, use the plot memory command, and examine the resulting .plt file.

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

(Remember that boot memory space does not exist for the ADSP-2100.) The remaining qualifiers specify the memory type, the starting address of the segment, what is stored (DATA

To remove some of these limitations, the simulator also allows the loading of the internal cloud’s properties via a file. In this file, users can define the topology of the

• SINGLE TEST mode: Measures power in the current remote end configuration (Smart Remote, Loopback, or Far End Source mode). You can save the power measurement in

In the Kernel window, you can add, modify, and delete kernel compo- nents: System, Thread Types, Boot Threads, Round-Robin Proper- ties, Semaphores, Event Bits, Events, Interrupts,

Application software can use the Shifter and ALU instructions on Register File locations or the System Register Bit Manipulation instruction on sys- tem registers to set

The CBUFEN bit in the MODE1 register enables circular buffering—a mode in which the DAG supplies addresses ranging within a constrained buffer length (set with an L

The processor core of the ADSP-21160 consists of two processing ele- ments (each with three computation units and data register file), a program sequencer, two data address

-id#exe=file The -id#exe (multiprocessor ID) switch directs the loader to use # processor ID for the corresponding executable file when producing a boot-loadable file for