For all product questions and inquiries contact a Cirrus Logic Sales Representative.
To find one nearest you go to www.cirrus.com
IMPORTANT NOTICE
“Preliminary” product information describes products that are in production, but for which full characterizati on data is not yet avai lable. Cirrus Logic, Inc. and
its subsidiaries (“Cirrus”) believe that the i nformati on contained in this document is accurate and reliabl e. However, the information is subject to change without
notice and is provided “AS IS” without warranty of any kind (express or implied). Customers are advised to obtain the latest versi on of r elevant information to
verify, before placing orders, that informati on being relied on is current and complete. All products are sold subject to the terms and condi tions of sale supplied
at the ti me of order acknowledgment, incl uding those pertai ning to warrant y, patent infringement, and limitatio n of liabili ty. No responsi bility is assumed by Cirr us
for the use of this information, including use of this information as the basis for manufacture or sale of any items, or for infringement of patents or other rights
of third parties. This document is the property of Ci rrus and by furni shing this information, Cirrus grants no license, express or implied under any patents, mask
work rights, copyrights, tr ademarks, trade secrets or other intellectual property rights. Cirrus owns the copyrights associated with the information contained
herein and gi ves consent for copies to be made of the information onl y for use with in your organizat ion with respect to Ci rrus integra ted circuit s or other product s
of Cirrus. This consent does not extend to other copying such as copying for general distr ibution, advertisi ng or promotional purposes, or for creating any work
for resale.
CERTAIN APPLICATIONS USI NG SEMI CONDUCTOR PRODUCTS MAY INVOLVE POTENTIAL RISKS OF DEATH, PERSONAL INJURY, OR SEVERE
PROPERTY OR ENVIRONMENTAL DAMAGE (“CRITICAL APPLICATIONS”). CIRRUS PRODUCTS ARE NOT DESIGNED, AUTHORIZED OR WARRANTED FOR USE IN AIRCRAFT SYSTEMS, MILITARY APPLICATIONS, PRODUCTS SURGICALLY IMPLANTED INTO THE BODY, LIFE SUPPORT PRODUCTS OR OTHER CRITICAL APPLICATIONS ( INCLUDING MEDICAL DEVICES, AIRCRAFT SYSTEMS OR COMPONENTS AND PERSONAL OR
AUTOMOTIVE SAFETY OR SECURITY DEVICES). I NCLUSION OF CIRRUS PRODUCTS IN SUCH APPLICATIONS IS UNDERSTOOD TO BE FULLY AT
THE CUSTOMER'S RISK AND CIRRUS DISCLAIMS AND MAKES NO WARRANTY, EXPRESS, STATUTORY OR IMPLIED, INCLUDING THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR PARTICULAR PURPOSE, WITH REGARD TO ANY CIRRUS PRODUCT THAT IS USED IN
SUCH A MANNER. IF THE CUSTOMER OR CUSTOMER'S CUSTOMER USES OR PERMITS THE USE OF CIRRUS PRODUCTS IN CRITICAL APPLICATIONS, CUSTOMER AGREES, BY SUCH USE, TO FULLY INDEMNIFY CIRRUS, ITS OFFICERS, DIRECTORS, EMPLOYEES, DISTRIBUTORS AND OTHER AGENTS FROM ANY AND ALL LIABILITY, I NCLUDING ATTORNEYS' FEES AND COSTS, THAT MAY RESULT FROM OR ARISE I N CONNECTION
WITH THESE USES.
Cirrus Logic, Cirrus, MaverickCrunch, MaverickKey, and the Cirrus Logic logo designs are trademarks of Cirrus Logic, Inc. All other brand and product names
in this document may be trademarks or service marks of their respective owners.
Microsoft and Windows are registered trademarks of Microsoft Corporation.
MicrowireTM is a trademark of National Semiconductor Corp. Nati onal Semiconductor is a registered trademark of National Semiconductor Corp.
Texas Instruments is a registered trademark of Texas Instruments, Inc.
Motorola is a registered trademark of Motorola, Inc.
LINUX is a registered trademark of Linus Torval ds.
2EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
About the EP9307 User’s Guide
This Guide describes the architecture, hardware, and operation of the Cirrus
Logic EP9307. It is intended to be used in conjunction with the EP9307
Datasheet, which contains the full electrical specifications for the device.
How to Use this Guide
Subject MatterLocation
AC’97Chapter 22 - AC’97 Controller
ARM920T Processor
Boot ROM, Hardware and SoftwareChapter 3 - Boot ROM
Booting From SROM or SyncFlashChapter 12 - SDRAM, SyncROM, and SyncFLASH Controller
Chapter 13 - ARM920T Core and Advanced High-Speed Bus
(AHB)
Chapter 6 - Raster Engine With Analog/LCD Integrated Timing
and Interface
Chapter 14 - UART1 With HDLC and Modem Control Signals
Chapter 15 - UART2
Chapter 16 - UART3 With HDLC Encoder
Related Documents from Cirrus Logic
1.EP9307 Data Sheet, Document Number - DS667
Reference Documents
1.ARM920T Technical Reference Manual
2.AMBA Specification (Rev. 2.0), ARM IHI 0011A, ARM Limited.
3.AHB Example AMBA System (Addendum 01), ARM DDI 0170A, ARM
Limited.
4EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
4.The coprocessor instruction assembler notation can be referenced from
ARM programming manuals or the Quick Reference Card, document
number ARM QRC 0001D.
5.The MAC engine is compliant with the requirements of ISO/IEC 8802-3
(1993), Sections 3 and 4.
6.OpenHCI - Open Host Controller interface Specification for USB, Release
1.0a; Compaq, Microsoft, National Semiconductor.
7.ARM Coprocessor Quick Reference Card, document number ARM QRC
0001D.
8.Information Technology, AT Attachment with Packet Interface - 5
(ATA/ATAPI-5) ANSI NCITS document T13 1321D, Revision 3, 29
February 2000
9.OpenHCI - Open Host Controller Interface Specification for USB,
Release: 1.0a, Released - 09/14/99 2:33 PM
10. ARM PrimeCell PL190-Rel1v1 Revision 1.7 Technical Reference Manual
DDI0181C
11. Audio Codec ‘97, Revision 2.3, April 2002, Intel Corporation
Notational Conventions
This document uses the following conventions:
• Internal and external Signal Names, and Pin Names use mixed upper and
lower case alphanumeric, and are shown in bold font: RDLED.
• Register Bit Fields are named using upper and lower case alphanumeric:
that is, SBOOT, LCSn1.
• Registers are named using mixed upper and lower case alphanumeric:
that is, SysCfg or PxDDR. (Where there are multiple registers with similar
names, a lower case “x” is used as a place holder. For example, in the
PxDDR registers, x represents a letter between A and H, indicating the
specific port being discussed.)
Caution: In the Internal Register Map in Table 13-7 on page 18-491, some
memory locations are listed as Reserved. These memory
locations should not be used. Reading from these memory
locations will yield invalid data. Writing to these memory locations
may cause unpredictable results.
(An example register description is shown below. This description is used for
the following examples.)
A specific bit may be specified in one of two ways:
The EP9307 is a highly integrated system-on-chip processor that paves the
way for a multitude of next-generation consumer and industrial electronic
products. Designers of digital media servers and jukeboxes, telematic control
systems, thin clients, set-top boxes, point-of-sale terminals, industrial controls,
biometric security systems, and GPS devices will benefit from the EP9307’s
integrated architecture and advanced features. In fact, with amazingly agile
performance provided by a 200 MHz ARM920T processor, and featuring an
incredibly wide breadth of peripheral interfaces, the EP9307 is well suited to
an even broader range of high volume applications. Furthermore, by enabling
or disabling the EP9307’s peripheral interfaces, designers can reduce
development costs and accelerate time-to-market by creating a single platform
that can be easily modified to deliver a variety of differentiated end products.
The EP9307 features an advanced ARM920T processor design with an MMU
that supports Linux®, Windows® CE, and many other embedded operating
systems. The ARM920T’s 32-bit microcontroller architecture, with a five-stage
pipeline, delivers impressive performance at very low power. The included 16
KByte instruction cache and 16 KByte data cache provide zero-cycle latency
to the current program and data, or can be locked to provide guaranteed nolatency access to critical instructions and data. For applications with
instruction memory size restrictions, the ARM920T’s compressed Thumb
instruction set provides a space-efficient design that maximizes external
instruction memory usage.
1.4.2 MaverickCrunch™ Coprocessor for Ultra-Fast Math Processing
The MaverickCrunch coprocessor is an advanced, mixed-mode math
coprocessor that greatly accelerates the single and double-precision integer
and floating-point processing capabilities of the ARM920T processor core.
The engine simplifies the end-user’s programming task by using predefined
coprocessor instructions, by utilizing standard ARM compiler tools, and by
requiring just one debugger session for the entire system. Furthermore, the
integrated design provides a single instruction stream and the advantage of
zero latency for cached instructions. To emulate this capability, competitors’
solutions add a DSP to the system, which requires separate
compiler/linker/debugger tool sets. This additional DSP requires programmers
to write two separate programs and debug them simultaneously, which can
result in frustration and costly delays.
®
The single-cycle integer multiply-accumulate instruction in the
MaverickCrunch coprocessor allows the EP9307 to offer unique speed and
performance while encoding digital audio and video formats, processing data
via Ethernet, and performing other math-intensive computing and dataprocessing functions in consumer and industrial electronics.
1.4.3 MaverickKey™ Unique ID Secures Digital Content and OEM
Designs
MaverickKey unique hardware programmed IDs provide an excellent solution
to the growing concern over secure Web content and commerce. With Internet
security playing an important role in the delivery of digital media such as books
or music, traditional software methods are quickly becoming unreliable. The
MaverickKey unique IDs provide OEMs with a method of utilizing specific
hardware IDs for DRM (Digital Rights Management) mechanisms.
32EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
Introduction
NN
MaverickKey uses a specific 32-bit ID and a 128-bit random ID that are
programmed into the EP9307 through the use of laser probing technology.
These IDs can then be used to match secure copyrighted content with the ID
of the target device that the EP9307 is powering, and then deliver the
copyrighted information over a secure connection. In addition, secure
transactions can benefit by matching device IDs to server IDs.
MaverickKey IDs can also be used by OEMs and design houses to protect
against design piracy by presetting ranges for unique IDs. For more
information on securing your design using MaverickKey, please contact your
Cirrus Logic sales representative.
1.4.4 Integrated Three-port USB 2.0 Full Speed Host with Transceivers
The EP9307 integrates three USB 2.0 Full Speed host ports. Fully compliant
to the OHCI USB 2.0 Full Speed specification (12 Mbps), the host ports can be
used to provide connections to a number of external devices including mass
storage devices, external portable devices such as audio players or cameras,
printers, or USB hubs. Naturally, the three-port USB host also supports the
USB 2.0 Low Speed standard. This provides the opportunity to create a wide
array of flexible system configurations.
1.4.5 Integrated Ethernet MAC Reduces BOM Costs
1
The EP9307 integrates a 1/10/100 Mbps Ethernet Media Access Controller
(MAC) on the device. With a simple connection to an MII-based external PHY,
an EP9307-based system has easy, high-performance, cost-effective Internet
capability.
1.4.6 8x8 Keypad Interface Reduces BOM Costs
The keypad circuitry scans an 8x8 array of 64 normally open, single pole
switches. Any one or two keys depressed will be de-bounced and decoded.
An interrupt is generated whenever a stable set of depressed keys is detected.
If the keypad is not utilized, the 16 column/row pins may be used as generalpurpose I/Os.
The processor includes a 16 KByte boot ROM to set up standard
configurations. Optionally, the processor may be booted from FLASH memory,
over the SPI serial interface, or through the UART. This boot flexibility makes it
easy to design user-controlled, field-upgradable systems. See Chapter 3 on
page 87, for additional details.
1.4.8 Abundant General Purpose I/Os Build Flexible Systems
The EP9307 includes both enhanced and standard general-purpose I/O pins
(GPIOs). The 16 different enhanced GPIOs may individually be configured as
inputs, outputs, or interrupt-enabled inputs. There are an additional 31
standard GPIOs that may individually be used as inputs, outputs, or opendrain pins. The standard GPIOs are multiplexed with peripheral function pins,
so the number available depends on the utilization of peripherals. Together,
the enhanced and standard GPIOs facilitate easy system design with external
peripherals not integrated on the EP9307.
1.4.9 General-Purpose Memory Interface (SDRAM, SRAM, ROM and
FLASH)
The EP9307 features a unified memory address model in which all memory
devices are accessed over a common address/data bus. A separate internal
bus is dedicated to the read-only Raster/Display refresh engine, while the rest
of the memory accesses are performed via the high-speed processor bus. The
SRAM memory controller supports 8, 16 and 32-bit devices and
accommodates an internal boot ROM concurrently with a 32-bit SDRAM
memory.
1.4.10 12-Bit Analog-to-Digital Converter (ADC) Provides an Integrated
Touch-Screen Interface or General ADC Functionality
The EP9307 includes a 12-bit ADC, which can be utilized either as a touchscreen interface or for general ADC functionality. The touch-screen interface
performs all sampling, averaging, ADC range checking, and control for a wide
variety of analog-resistive touchscreens. To improve system performance, the
controller only interrupts the processor when a meaningful change occurs.
The touch-screen hardware may be disabled, and the switch matrix and ADC
controlled directly for general ADC usage if desired.
1.4.11 Graphics Accelerator
The EP9307 includes a hardware graphics acceleration engine that improves
graphic performance by handling block copy, block fill and hardware line draw
operations. The graphics accelerator is used in the system to off load graphics
operations from the processor.
34EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
Chapter 2
OO
2.1 Introduction
The MaverickCrunch coprocessor accelerates IEEE-754 floating point
arithmetic and 32-bit and 64-bit fixed point arithmetic operations. It provides
an integer multiply-accumulate (MAC) that is considerably faster than the
native MAC implementation in the ARM920T. The MaverickCrunch
coprocessor significantly accelerates the arithmetic processing required to
encode/decode digital audio formats.
The MaverickCrunch coprocessor uses the standard ARM920T coprocessor
interface, sharing its memory interface and instruction stream. All
MaverickCrunch operations are simply ARM920T coprocessor instructions.
The coprocessor handles all internal inter-instruction dependencies by using
internal data forwarding and inserting wait states.
2.1.1 Features
Key features include:
2MaverickCrunch Coprocessor
2
•IEEE-754 single and double precision floating point
• 32/64-bit integer
• Add/multiply/compare
•Integer Multiply-Accumulate (MAC) 32-bit input with 72-bit accumulate
•Integer Shifts
• Floating point to/from integer conversion
• Sixteen 64-bit registers
•Four 72-bit accumulators
2.1.2 Operational Overview
The MaverickCrunch coprocessor is a true ARM920T coprocessor. It
communicates with the ARM920T via the coprocessor bus and shares the
instruction stream and memory interface of the ARM920T. It runs at the
ARM920T core clock frequency (either FCLK or BCLK).
The coprocessor supports four primary data formats:
•IEEE-754 single precision floating point (24-bit signed significand and 8bit biased exponent)
2
• IEEE-754 double precision floating point (53-bit signed significand and
11-bit biased exponent)
• 32-bit integer
• 64-bit integer
The coprocessor performs the following standard operations on all four
supported data formats:
•addition
•subtraction
•multiplication
• absolute value
• negation
•logical left/right shift
•comparison
In addition, for 32-bit integers, the coprocessor provides:
• multiply-accumulate (MAC)
• multiply-subtract (MSB)
Any of the four data formats may be converted to another of the formats. All
four data types may be loaded directly from and stored directly to memory via
the ARM920T coprocessor interface. They may also be moved to or from
ARM920T registers.
The MaverickCrunch coprocessor also provides a 72-bit extended precision
integer format that is used only in the accumulators. The accumulators may
also be used in MAC and MSB operations.
IEEE-754 rounding and exceptions are also provided. Four rounding modes
for floating point operations are:
• round to nearest
•round toward
•round toward -∞
•round toward 0
Exceptions include:
•Invalid operator
•Overflow
+∞
36EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
•Underflow
•Inexact
MaverickCrunch Coprocessor
OO
Note that the division by zero exception is not supported as the
MaverickCrunch coprocessor does not provide division or square root.
2.1.3 Pipelines and Latency
There are two primary pipelines within the MaverickCrunch coprocessor. One
handles all communication with the ARM920T, while the other, the “data path”
pipeline, handles all arithmetic operations (this one actually operates at one
half the MaverickCrunch coprocessor clock frequency).
The data path pipeline may run synchronously or asynchronously with respect
to the ARM instruction pipeline. If run asynchronously, data path computation
is decoupled from the ARM, allowing high throughput, though arithmetic
exceptions are not synchronous. If run synchronously, exceptions are
synchronous, but throughput suffers.
Assuming no inter-instruction dependencies causing pipeline stalls, arithmetic
instructions can produce a new result every two ARM920T clocks which is a
maximum throughput of one data path instruction per eight ARM920T clocks.
The only exception is 64-bit multiplies (CFMULD or CFMUL64), which require
six extra ARM920T clocks to produce their result, which is maximum
throughput of eight ARM920T clocks per instruction.
The normal latency for an arithmetic instruction is approximately nine
ARM920T clocks, from initial decode to the time the result is written to the
register file. A 64-bit multiply requires 15 clocks.
2
2.1.4 Data Registers
The MaverickCrunch coprocessor contains the following registers:
•16 64-bit general purpose registers, c0 through c15
• 4 72-bit accumulators, a0 through a3
• 1 status and control register, DSPSC
A single precision floating point value is stored in the upper 32 bits of a 64-bit
register and must be explicitly promoted to double precision to be used in
double precision calculations:
A 32-bit integer is stored in the lower 32 bits of a 64-bit register and signextended when written, provided the UI bit in the DSPSC is clear:
6332 31 300
Sign ExtensionSignData
Hence, 32-bit integers may be used directly in calculations with 64-bit
integers, which are stored as shown:
63620
Sign Data
2.1.5 Integer Saturation Arithmetic
By default, the coprocessor treats all 32-bit and 64-bit integers as signed
values and automatically saturates the results of most integer operations and
all conversions from floating-point to integer format. Instructions that may
saturate their results are:
• CFADD32 and CFADD64
•CFSUB32 and CFSUB64
• CFMUL32 and CFMUL64
• CFMAC32 and CFMSC32
• CFCVTS32 and CFCVTD32
• CFTRUNCS32 and CFTRUNCD32
This behavior, however, can be altered by setting the UI bit and the ISAT bit in
the DSPSC. With the UI bit clear (the default), 32-bit and 64-bit integer
operations are treated as signed with respect to overflow and underflow
detection and saturation as well as compare operations. Setting the UI bit
causes the MaverickCrunch coprocessor to treat all 32-bit and 64-bit integer
operations as unsigned with respect to overflow, underflow, saturation, and
comparison.
With saturation enabled (the default), the maximum representable value is
returned on overflow and the minimum representable value is returned on
38EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
underflow. The maximum and minimum values depends on the operand size
and whether the UI bit in the DSPSC is set, as shown in Table 2-1.
Table 2-1: Saturation for Non-accumulator Instructions
Signed
Overflow
Unsigned
Signed
Underflow
Unsigned
To disable saturation on overflow and underflow, set the ISAT bit in the
DSPSC.
Normally, arithmetic instructions that write to an accumulator do not saturate
their results on overflow or underflow. These instructions are:
However, the SAT[1:0] bits in the DSPSC may be set to select one of several
kinds of saturation to occur on the results of these instructions before they are
written to an accumulator.
Note: This action does not affect the operation of instructions that do not write their
result to an accumulator.
Enabling saturation also modifies the representation of data stored in the
accumulator. The three supported bit formats and their maximum and
minimum saturation values are shown in Table 2-2 on page 39.
The bit format x.yy represents x binary bits before the decimal point and yy
fraction bits after decimal point, as for example, when the bit format 2.62 has
two binary bits and sixty-two fraction bits. Though these formats utilize either
32- or 64-bit integers, the accumulators are 72 bits wide. If the accumulator
saturation mode is disabled (the default), the accumulator bit fields are
assigned as below for a 2’s complement integer.
If the saturation mode 1.63 is selected, the bit field assignments are:
7164 63620
Sign Extension SignData
If the saturation mode 1.31 is selected, the bit field assignments are:
7164 636232 310
Sign Extension SignDataUnused
If the saturation mode 2.62 is selected, the bit field assignments are:
7163 62610
Sign ExtensionSignData
2.1.6 Comparisons
The Crunch coprocessor provides four compare operations:
•CFCMP32 - 32-bit integer
•CFCMP64 - 64-bit integer
•CFCMPS - single floating point
• CFCMPD - double floating point
The DSPSC register bit UINT affects the operation of integer comparisons. If
clear, integers are treated as signed values, and if set, they are treated as
unsigned. DSPSC.UINT has no effect on floating point comparisons.
All compare operations update both the FCC[1:0] bits in the DSPSC register
and an ARM register. Though any of the ARM general purpose registers r0
through r14 may be specified as the destination, specifying r15 actually
updates the CPSR flag bits NZCV. This permits the condition code field of any
subsequent ARM instruction to gate the execution of that instruction based on
the result of a Crunch compare operation.
Table 2-3 on page 41 illustrates the legal relationships and, for each one, the
values written to the FCC bits and the NZCV flags. The FCC bits and the
NZCV flags provide the same information, but in different ways and in different
places. Their values depend only on the relationship between the operands,
regardless of whether the operands are considered signed integer, unsigned
integer, or floating point. The unordered relationship can only apply to floating
point operands.
40EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
Table 2-3: Comparison Relationships and Their Results
RelationshipFCC[1:0]NCZV
AB=
MaverickCrunch Coprocessor
000100
OO
2
AB<
AB>
Unordered110000
The NZCV flags are not computed exactly as with integer comparisons using
the ARM CMP instruction. Hence, when examining the result of Crunch
comparisons, the condition codes field of ARM instructions should be
interpreted differently, as shown in Table 2-4 on page 41. The same six
condition codes should be used whether the comparison operands were
signed integers, unsigned integers, or floating point. No other condition codes
are meaningful.
Table 2-4: ARM Condition Codes and Crunch Compare Results
Condition Code
Opcode[31:28] Mnemonic
0000EQEqualEqual
0001NENot EqualNot Equal
1010GESigned Greater Than or Equal Greater Than or Equal
The examples below show two algorithms, each implemented using the
standard programming languages and the MaverickCrunch instruction set.
2.2.1 Example 1
Sections 2.2.1.2, 2.2.1.3, and 2.2.1.4, show three coding samples performing
the same operation. Section 2.2.1.1 on page 42 shows common setup code
used by all three samples. Section 2.2.1.2 on page 42 shows the program
implemented in C code. Section 2.2.1.3 on page 42 uses ARM assembly
language, accessing the MaverickCrunch with ARM coprocessor instructions.
2.2.1.3 Accessing MaverickCrunch with ARM Coprocessor Instructions
ldc p5, c0, [r0, #0x0] ; data section preloaded with 0x0 (“num”)
ldc p5, c1, [r0, #0x4] ; data section preloaded with 0xa
ldc p5, c2, [r0, #0x8] ; data section preloaded with 0x1
ldc p5, c3, [r0, #0xc] ; data section preloaded with 0x5
loop
cdp p5, 1, c0, c0, c3, 0 ; c0 <= c0 * 5
cdp p5, 3, c0, c0, c2, 6 ; c0 <= c0 - 1
mrc p5, 0, r15 c0, c1, 4 ; c0 < 10 ?
blt loop ; yes
stc p5, c0, [r0, #0x0] ; no, store result
2.2.1.4 MaverickCrunch Assembly Language Instructions
cfldr32 c0, [r0, #0x0] ; data section preloaded with 0x0 (“num”)
cfldr32 c1, [r0, #0x4] ; data section preloaded with 0xa
cfldr32 c2, [r0, #0x8] ; data section preloaded with 0x1
cfldr32 c3, [r0, #0xc] ; data section preloaded with 0x5
loop
cfmul32 c0, c0, c3 ; c0 <= c0 * 5
cfsub32 c0, c0, c2 ; c0 <= c0 - 1
cfcmp32 r15, c0, c1 ; c0 < 10 ?
blt loop ; yes
cfstr32 c0, [r0, #0x0] ; no, store result
2.2.2 Example 2
The following function performs an FIR filter on the given input stream. The
variable “data” points to an array of floating point values to be filtered, “n” is the
number of samples for which the filter should be applied, “filter” is the FIR filter
42EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
MaverickCrunch Coprocessor
to be applied, and “m” is the number of taps in the FIR filter. The “data” array
must be “n + m - 1” samples in length, and “n” samples will be produced.
OO
2.2.2.1 C Code
void
ComputeFIR(float *data, int n, float *filter, int m)
{
int i, j;
float sum;
for(i = 0; i < n; i++)
{
sum = 0;
for(j = 0; j < m; j++)
{
sum += data[i + j] * filter[j];
}
data[i] = sum;
}
}
2.2.2.2 MaverickCrunch Assembly Language Instructions
MaverickCrunch Status and Control Register. Accessed only via the
MaverickCrunch instruction set. All bits, including status bits, are both
readable and writable. This register should generally be written only using a
read-modify-write sequence.
RSVD:Reserved. Unknown During Read.
INST: Exception Instruction. Whenever an unmasked exception
occurs, these 32 bits are loaded with the instruction that
caused the exception. Hence, this contains the instruction
that caused the most recent unmasked exception.
DAID: MaverickCrunch Architecture ID. This read-only value is
incremented for each revision of the overall
MaverickCrunch coprocessor architecture. These bits are
“000” for this revision.
HVID: Hardware Version ID. This read-only value is incremented
each time the hardware implementation of the architecture
named by DAID[2:0] is changed, typically done in
response to bugs. These bits are “000” for this version.
44EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
MaverickCrunch Coprocessor
ISAT:Integer Saturate Enable. This bit controls whether non-
accumulator integer operations, both signed and
unsigned, will saturate on overflow or underflow.
0 = Saturation enabled.
1 = Saturation disabled.
UI:Unsigned Integer Enable. This bit controls whether non-
accumulator integer operations treat their operands as
signed or unsigned. It also determines the saturation value
if the ISAT bit is clear.
0 = Signed integers.
1 = Unsigned integers.
INT:MaverickCrunch Interrupt. This bit indicates whether an
interrupt has occurred. This bit is identical to the external
interrupt signal.
0 = No interrupt signaled.
1 = Interrupt signaled.
OO
2
AEXC:Asynchronous Exception Enable. This bit determines
whether exceptions generated by the coprocessor are
signaled synchronously or asynchronously to the
ARM920T. Synchronous exceptions force all data path
instructions to be serialized and to stall the ARM920T. If
exceptions are asynchronous, they are signalled by
assertion of the DSPINT output of the coprocessor, which
may interrupt the ARM920T via the interrupt controller.
Enabling asynchronous exceptions does provide a
performance improvement, but makes it difficult for an
interrupt handler to determine the coprocessor instruction
that caused the exception because the address of the
instruction is not preserved. Exceptions may be
individually enabled by other bits in this register (IXE, UFE,
OFE, and IOE). This bit has no effect if no exceptions are
enabled.
0 = Exceptions are synchronous.
1 = Exceptions are asynchronous
SAT[1:0]:Accumulator saturation mode select. These bits are set to
select the saturation mode or to disable the saturation for
accumulator operations.
0X = Saturation disabled for accumulator operations
10 = Accumulator saturation enabled, bit formats 1.63 and
1.31
11 = Accumulator saturation enabled, bit format 2.62
00 = Operand A equals operand B.
01 = Operand A less than operand B.
10 = Operand A greater than operand B.
11 = Operands are unordered (at least one is NaN).
V:Overflow Flag. Indicates the overflow status of the
previous integer operation.
0 = No overflow.
1 = Overflow.
FWDEN:Forwarding Enable. This bit determines whether data path
writeback results are forwarded to the data path operand
fetch stage and to the STC/MRC execute stage. When
pipeline interlocks occur due to dependencies of data
path, STC, and MRC instruction source operands on data
path results, setting this bit will improve instruction
throughput.
0 = Forwarding not enabled.
1 = Forwarding enabled.
Invalid:0 = No invalid operations detected
1 = An invalid operation was performed.
Denorm: 0 = No denormalized numbers have been supplied as
instruction operands
1 = a denormalized number has been supplied as an
instruction operand.
trapping for IEEE 754 invalid operator exceptions.
0 = Disable software trapping for invalid operator
exceptions.
1 = Enable software trapping for invalid operator
exceptions.
IX:Inexact. Set when an IEEE 754 inexact exception occurs,
regardless of whether or not software trapping for inexact
exceptions is enabled. Writing a “0” to this position clears
the status bit.
0 = No inexact exception detected.
1 = Inexact exception detected.
UF:Underflow. Set when an IEEE 754 underflow exception
occurs, regardless of whether or not software trapping for
underflow exceptions is enabled. Writing a “0” to this
position clears the status bit.
0 = No underflow exception detected.
1 = Underflow exception detected.
OO
2
OF:Overflow. Set when an IEEE 754 overflow exception
occurs, regardless of whether or not software trapping for
overflow exceptions is enabled. Writing a “0” to this
position clears the status bit.
0 = No overflow exception detected.
1 = Overflow exception detected.
IO:Invalid Operator. Set when an IEEE 754 invalid operator
exception occurs, regardless of whether or not software
trapping for invalid operator exceptions is enabled. Writing
a “0” to this position clears the status bit.
0 = No invalid operator exception detected.
1 = Invalid operator exception detected.
2.4 ARM Coprocessor Instruction Format
The ARM V4T architecture defines five ARM coprocessor instructions:
• CDP - Coprocessor Data Processing
•LDC - Load Coprocessor
• STC - Store Coprocessor
•MCR - Move to Coprocessor Register from ARM Register
• MRC - Move to ARM Register from Coprocessor Register
The coprocessor instruction assembler notation is found in the ARM
programming manuals or the Quick Reference Card. (For additional
(U=1) or subtracted from a base register (U=0). This bit is ignored by the
MaverickCrunch coprocessor.
2
•N: Specifies the width of a data type involved in a move operation. The
MaverickCrunch coprocessor uses this bit to distinguish between single
precision floating point/32-bit integer numbers (N=0) and double precision
floating point/64-bit integer numbers (N=1).
•W: Specifies whether or not a calculated address is written back to a base
register (W=1) or not (W=0). This bit is ignored by the MaverickCrunch
coprocessor.
•offset: An 8-bit word offset used in address calculations. These bits are
ignored by the MaverickCrunch coprocessor.
Table 2-6, below, and Table 2-7, Table 2-8, and Table 2-9 on page 51, define
the bit values for opcode2, opcode1, and cp_num for all of the
MaverickCrunch instructions.
• CRd, CRn, and CRm each refer to any 16 general purpose
MaverickCrunch registers unless otherwise specified
• CRa refers to any of the MaverickCrunch accumulators
• Rd and Rn refer to any of the ARM920T general purpose registers
• <imm> refers to a seven-bit immediate value
The remainder of this section describes in detail each of the individual
MaverickCrunch instructions. The fields in the opcode for each
MaverickCrunch instruction are shown. When specific bit values are required
for the instruction, they are shown as either '1' or '0'. Any field whose value
may vary, such as a register index, is named as in the ARM programming
manuals, and its function described below.
Fields that are ignored by the coprocessor are shaded. Dark shading implies
that a field is processed by the ARM itself and can have any value, while light
shading indicates that the field, though ignored by both the ARM and the
coprocessor, should have the value shown.
Table 2-10: MaverickCrunch Instruction Set
Maverick
Crunch
Coprocessor
Instruction
Type
LoadsLDC
StoresSTC
Moves to
coprocessor
ARM
Coprocessor
Instruction
Typ e
MCR
InstructionDescription
cfldrs CRd, [Rn]Load CRd with single stored at address in Rn
cfldrd CRd, [Rn]Load CRd with double stored at address in Rn
cfldr32 CRd, [Rn]
cfldr64 CRd, [Rn]Load CRd with 64-bit integer stored at address in Rn
cfstrs CRd, [Rn]Store single in CRd at address in Rn
cfstrd CRd, [Rn]Store double in CRd at address in Rn
cflstr32 CRd, [Rn]Store 32-bit integer in CRd at address in Rn
cfstr64 CRd, [Rn]Store 64-bit integer in CRd at address in Rn
cfmvsr CRn, RdMove single from Rd to CRn[63:32]
cfmvdlr CRn, RdMove lower half of double from Rd to CRn[31:0]
cfmvdhr CRn, RdMove upper half of double from Rd to CRn[63:32]
cfmv64lr CRn, Rd
cfmv64hr CRn, RdMove upper half of 64-bit integer from Rd to CRn[63:32]
Load CRd with 32-bit integer stored at address in Rn, sign extend through
bit 63
Move lower half of 64-bit integer from Rd to CRn[31:0], sign extend bit 31
through bits [63:31]
52EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
Table 2-10: MaverickCrunch Instruction Set (Continued)
MaverickCrunch Coprocessor
OO
Maverick
Crunch
Coprocessor
Instruction
Type
Moves from
coprocessor
Moves to
accumulator
Moves from
accumulator
Move to
DSPSC
Move from
DSPSC
ARM
Coprocessor
Instruction
Typ e
MRC
CDP
CDP
CDP
InstructionDescription
cfmvsr Rd, CRnMove single from CRn[63:32] to Rd
cfmvrdl Rd, CRnMove lower half of double from CRn[31:0] to Rd
cfmvrdh Rd, CRnMove upper half of double from CRn[63:32] to Rd
cfmvr64l Rd, CRnMove lower half of 64-bit integer from CRn[31:0] to Rd
cfmvr64h Rd, CRnMove upper half of 64-bit integer from CRn[63:32] to Rd
cfmval32 CRd, CRnMove 32-bit integer from CRn [31:0] to accumulator CRd[31:0]
cfmvam32 CRd, CRnMove 32-bit integer from CRn [31:0] to accumulator CRd[63:32]
cfmvah32 CRd, CRn
cfmva32 CRd, CRn
cfmva64 CRd, CRn
cfmv32al CRd, CRnMove accumulator CRn[31:0] to 32-bit integer CRd[31:0]
cfmv32am CRd, CRnMove accumulator CRn[63:32] to 32-bit integer CRd[31:0]
cfmv32ah CRd, CRnMove accumulator CRn[71:64] to lower 8 bits of 32-bit integer CRd[31:0]
cfmv32a CRd, CRn
cfmv64a CRd, CRn
cfmvsc32 CRd, CRnMove CRd to DSPSC; CRn is ignored
cfmv32sc CRd, CRnMoves DSPSC to CRd; CRn is ignored
Move lower 8 bits of 32-bit integer from CRn [7:0] to accumulator
CRd[71:64]
Move 32-bit integer from CRn[31:0] to accumulator CRd[31:0] and sign
extend through bit 71
Move 64-bit integer from CRn to accumulator CRd[63:0] and sign extend
through bit 71
Saturate to 32-bit integer and move accumulator CRn[31:0] to 32-bit
integer CRd[31:0]
Saturate to 64-bit integer and move accumulator CRn[63:0] to 64-bit
integer CRd
Shifts a 32-bit integer left or right. The shift count is a two’s complement
integer stored in an ARM register; the count is positive for left shifts and
negative for right shifts. This instruction may also be used to copy a 32-bit
integer from one register to another by using a shift value of 0.
Mnemonic:
CFRSHL32<cond> CRm, CRn, Rd
Bit Definitions:
CRm: Destination register
CRn: Source register
Rd: Shift count register in ARM
Shift 64-bit Integer
31:2827:2423:22212019:1615:1211:87:543:0
cond1 1 1 00 000CRnRd0 1 0 10 1 11CRm
Definition:
Shifts a 64-bit integer left or right. The shift count is a two’s complement
integer stored in an ARM register; the count is positive for left shifts and
negative for right shifts. This instruction may also be used to copy a 64-bit
integer from one register to another using a shift value of 0.
Shift a 32-bit integer by the count specified in the seven bit, two’s complement
immediate value. A positive number indicates a left shift and a negative
number indicates a right shift. This instruction may also be used to copy a 32bit integer from one register to another using a shift value of 0.
Shifts a 64-bit integer by a count specifies in the seven bit, two’s complement
immediate value. A positive number indicates a left shift and a negative
number indicates a right shift. This instruction may also be used to copy a 64bit integer from one register to another by using a shift value of 0.
Compares two single precision floating point numbers and stores an integer
representing the result in the ARM920T register; the highest four bits of the
integer result match the N, Z, C, and V bits, respectively, in the ARM920T’s
program status register, while the bottom 28 bits are zeros. If Rd = 15, then the
four status bits are stored in the ARM status register, CPSR.
Mnemonic:
CFCMPS<cond> Rd, CRn, CRm
Bit Definitions:
CRn: First source register
CRm: Second source register
Rd: Destination ARM register. If Rd = 15, destination is ARM
N, C, Z, and V flags.
Compare Double Precision Floating Point
31:2827:2423:22212019:1615:1211:87:543:0
cond1 1 1 00 001CRnRd0 1 0 01 0 11CRm
Definition:
Compares two double precision floating point numbers and stores an integer
representing the result in the ARM920T register; the highest four bits of the
integer result match the N, Z, C, and V bits, respectively, in the ARM920T’s
program status register, while the bottom 28 bits are zeros. If Rd = 15, then the
four status bits are stored in the ARM status register, CPSR.
Mnemonic:
CFCMPD<cond> Rd, CRn, CRm
Bit Definitions:
CRn: First source register
CRm: Second source register
Rd: Destination ARM register. If Rd = 15, destination is ARM
N, C, Z, and V flags.
74EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
MaverickCrunch Coprocessor
Compare 32-bit Integers
31:2827:2423:22212019:1615:1211:87:543:0
cond1 1 1 00 001CRnRd0 1 0 11 0 01CRm
Definition:
Compares two 32-bit integers and stores an integer representing the result in
the ARM920T register; the highest four bits of the integer result match the N,
Z, C, and V bits, respectively, in the ARM920T’s program status register, while
the bottom 28 bits are zeros. If Rd = 15, then the four status bits are stored in
the ARM status register, CPSR.
Mnemonic:
CFCMP32<cond> Rd, CRn, CRm
Bit Definitions:
CRn: First source register
CRm: Second source register
Rd: Destination ARM register. If Rd = 15, destination is ARM
N, C, Z, and V flags.
OO
2
Compare 64-bit Integers
31:2827:2423:22212019:1615:1211:87:543:0
cond1 1 1 00 001CRnRd0 1 0 11 0 11CRm
Description:
Compares two 64-bit integers and stores an integer representing the result in
the ARM920T register; the highest four bits of the integer result match the N,
Z, C, and V bits, respectively, in the ARM920T’s program status register, while
the bottom 28 bits are zeros. If Rd = 15, then the four status bits are stored in
the ARM status register, CPSR.
Mnemonic:
CFCMP64<cond> Rd, CRn, CRm
Bit Definitions:
CRn: First source register
CRm: Second source register
Rd: Destination ARM register. If Rd = 15, destination is ARM
The Boot ROM allows a program or OS to boot from the following devices:
• SPI EEPROM
•FLASH/SyncFLASH or SROM/SDRAM
•Serial port
3.1.1 Boot ROM Hardware Operational Overview
PP
Chapter 3
3Boot ROM
3
The Boot ROM is an AHB slave device containing a 16 kbyte maskprogrammed ROM. The AHB slave always operates with one wait state, so all
data reads from the ROM use 2 HCLK cycles.
The ROM contains 3 code sections. The lower 8 kbytes contain the system
boot code. The next 4 kbytes contain the first secure code block, and the top
4 kbytes contain the second secure code block. In non-secure boot, the lower
8 kbytes are accessible. In secure boot, one of the two secure code blocks is
accessible. See Chapter 28, “Security,” for details.
On system reset, the ARM920T begins executing code at address zero. The
system follows the Hardware Configuration controls to select the boot device
that appears at address zero. If Internal Boot is selected, the Boot ROM is
mapped to address zero and the ARM920T will execute the Boot ROM code.
3.1.1.1 Memory Map
The Boot ROM base address (ROM base) is fixed in the EP9307 at
0x8009_0000. It will alias on 16 kbyte intervals. When internal boot is active,
the Boot ROM is double decoded and appears at its normal address space
and at address zero. (The Boot ROM writes the BootModeClr in order to remap
address 0x0 to be external memory while the Boot ROM code continues execution at
0x8009_0000.
)
3.1.2 Boot ROM Software Operational Overview
The Boot ROM is a 16 kbyte mask-programmed ROM that controls the source
of the first off-chip code executed by the EP9307. The code within the Boot
ROM supports the following sources for the EP9307 initialization program:
• UART1: Code is downloaded through UART1 into an on chip buffer and
executed.
•SPI Serial ROM: Code is copied from an SPI Serial ROM into an on-chip
buffer and executed.
3
•FLASH: Code present in FLASH memory is executed directly.
Note that the code retrieved via UART1 and the SPI Serial ROM is not
intended to be a complete operating system image. It is intended to be a small
(up to 2 kbyte) loader that will, in turn, retrieve a complete operating system
image. This small loader can retrieve this complete image through UART1 or
the SPI Serial ROM (just as the Boot ROM did) or it can be more sophisticated
and retrieve it through the IrDA, USB, or Ethernet interfaces.
The Boot ROM code disables the ARM920T’s MMU, so any loader program
that is downloaded sees physical addresses. The loader is free to initialize the
page tables and start the MMU and caches if needed.
The Boot ROM code also does not enable interrupts or timers, so that the
system delivered to the user is in a known safe state and is ready for an
operating system or for user code to be loaded.
3.1.2.1 Image Header
One of ASCII strings, “CRUS” or “SURC” must be present as a HeaderID
prefixed to an executable image. This HeaderID must be present in images
copied from the SPI serial ROM and from images programmed into FLASH.
3.1.2.2 Boot Algorithm
Following are the steps in the software boot process:
1.Remap memory.
2.Turn the green LED off and the red LED on.
3.Disable the watchdog.
4.Read the Boot State
5.Set up the Clocks to run from external clocks
6.Based on the Boot State memory width, do the following:
A. initialize the SDRAM and FLASH memory interfaces for slow
(maximum compatibility) operation.
B. Initialize SRAM interfaces for slow operation as well.
C. Perform minimal memory tests.
7.Based on the contents of the SysCfg register, start serial download.
A. Initialize UART1 to 9600 baud, 8 bits, no parity, 1 stop bit.
88EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
Boot ROM
B. Output a “<” character.
C. Read 2048 (decimal count) characters from UART1 and store these
in the internal Boot buffer (alias for the Ethernet Mac buffer)
D. Output a “>” to signify 2048 characters have been read.
PP
E. Turn on Green LED
F. Jump to the start of the internal Boot Buffer.
8.If it is not Serial Download, attempt to read from SPI serial ROM, and then
do the following:
A. Check if the first 4 bytes from the serial ROM are equal to “CRUS” or
to “SURC” in ASCII, verifying the HeaderID.
B. Read the next 2048 (decimal count) bytes into the Internal Boot
Buffer.
C. Turn on Green LED
D. Jump to the start of the Internal Boot Buffer.
9.Attempt to read the “CRUS” or “SURC” HeaderID in ASCII in FLASH
memory at (FLASH Base + 0x0000), verifying the HeaderID. This is read
in for each FLASH Chip select, then do the following:
A. Turn on Green LED
B. Jump to the start of FLASH memory plus four bytes.
10. Attempt to read the “CRUS” or “SURC” HeaderID in ASCII in FLASH
memory at (FLASH Base + 0x1000), verifying the HeaderID. This is read
in for each FLASH Chip select, and then do the following:
3
A. Turn on Green LED
B. Jump to the start of FLASH memory.
11. Attempt to read the “CRUS” or “SURC” HeaderID in ASCII in memory at
0xC000_0000 and 0xF000_0000, verifying the HeaderID. This is read in
for SDRAM or SyncFLASH boot.
A. Turn on Green LED
B. Jump to memory location 0xC000_0004 or 0xF000_0004.
12. Attempt to read the “CRUS” or “SURC” HeaderID in ASCII in memory at
0xC000_1000 and 0xF000_1000, verifying the HeaderID. This is read in
for SDRAM or SyncFLASH boot.
A. Turn on Green LED
B. Jump to memory location 0xC000_0000 or 0xF000_0000 .
External boot from Sync memory space selected by
DevCfg3 through the SDRAM Controller. The media
type must be either SROM or SyncFLASH. The
selection of the SRAM width is determined by latched
External boot from Async memory space selected by
nCS0 through Synchronous Memory Controller. The
selection of the SRAM width is determined by latched
CSn[7:6] value:
8-bit SRAM
16-bit SRAM
32-bit SRAM
32-bit SRAM
32-bit serial boot
32-bit serial boot
16-bit serial boot
Internal SPI boot from on-chip ROM, if HeaderID is
found.
Internal boot from on-chip ROM using Synchronous
memory at the chip select where the HeaderID exists.
The selection of the ROM width is determined by
latched CSn[7:6] value:
16-bit
16-bit
32-bit
32-bit
3
Internal boot from on-chip ROM using Asynchronous
memory at the chip select where the HeaderID exists.
The selection of the ROM width is determined by
latched CSn[7:6] value:
8-bit
16-bit
32-bit
32-bit
11 0 0 0
0 0
0 1
1 0
1 1
3.2.1 UART Boot
Make sure that the test pins are configured for internal boot mode. EEDAT
and LBOOT0 should be pulled high and LBOOT1 should be pulled low as
shown in Table 4-1 on page 97. UART 1 is configured at 9600 bps, 8-bits, No
Parity, No flow control. The code performs the following steps:
3.2048 characters are received by UART 1 and copied to the Ethernet
buffer at address 0x8001_4000.
3
4.The processor will jump to 0x8001_4000. The processor will be in ARM
SVC mode when the jump occurs.
3.2.2 SPI Boot
To boot from an SPI memory device, make sure that the test pins are
configured for internal boot mode. EEDAT should be pulled high and LBOOT1
and LBOOT0 should be pulled low as shown in Table 4-1 on page 97.
To boot from FLASH, put the “CRUS” or “SURC” HeaderID at the first location
in the SPI memory. The code will be copied from the SPI memory to the
Ethernet buffer at address 0x8001_4000 with a length of 2048 bytes. Code
execution will start at 0x8001_4000 (MAC base + 0x4000). Processor will be
in ARM SVC mode. At this point the user can use the code in the MAC RAM to
load the rest of the SPI memory data.
3.2.3 FLASH Boot
To enable FLASH boot, make sure that the pins are configured for normal boot
mode, as shown in Table 3-1. Also make sure that the FLASH word size is
correct as shown in Table 3-1.
To boot from FLASH, put the “CRUS” or “SURC” HeaderID at one of the
following locations (this location will be referred to as FLASH base + 0x0):
Code execution will start at address (FLASH base + 0x4). Processor will be in
ARM SVC mode.
Alternatively, to boot from FLASH, put the “CRUS” or “SURC” HeaderID at one
of the following locations (this location will be referred to as FLASH base
+0x1000):
Code execution will start at address (FLASH base + 0x0). The processor will
be in ARM SVC mode.
3.2.4 SDRAM or SyncFLASH Boot
Boot ROM
PP
To enable SDRAM or SyncFLASH boot, make sure that the pins are
configured for normal boot mode, as shown in Table 3-1. If booting with
SyncFLASH or a 32-bit SDRAM device, make sure the SDRAM or
SyncFLASH wordsize is correct, as shown in Table 3-1. If booting with a 16-bit
SDRAM device, follow the suggested software sequence of commands, as
shown in Figure 3-2.
Figure 3-2. Flow chart of Boot Sequence for 16-bit SDRAM Devices
Boot Internally with Asynchronous Device
Re-configure SDRAM for 16-bit access
Branch to desired SDRAM memory
To boot from SDRAM or SyncFLASH, put the “CRUS” or “SURC” HeaderID at
one of the following locations (this location is Base + 0x0):
0xC000_0000
0xF000_0000
Code execution will start at address (Base + 0x4). Processor will be in ARM
SVC mode.
3
Alternatively, to boot from SDRAM or SyncFLASH, put the “CRUS” or “SURC”
HeaderID at one of the following locations (this is Base + 0x1000):
0xC000_1000
0xF000_1000
Code execution will start at address (Base + 0x0). The processor will be in
ARM SVC mode.
3.2.5 Synchronous Memory Operation
If running from Synchronous memory, before issuing a software reset, perform
the following procedure:
1.Run from SDRAM.
2.Perform a software reset (because of the SWRST bit in DEVCFG).
The System Controller (Syscon) provides the EP9307 central clock and
control resources. These central resources are:
• Clock control
•Power management
•System configuration management.
These resources are controlled by a set of software-locked registers which
can be used to prevent accidental accesses. Syscon generates the various
bus and peripheral clocks as well as controls the system startup configuration.
4.1.1 System Startup
System startup begins with the assertion of a reset signal. There are five
different categories of reset events in the device. In order of decreasing effect,
the reset events are:
•PRSTn (external pin for power-on reset)
•RSTOn (external pin for user reset)
• Three-key reset (externally generated, behaves like user reset)
4
•Watchdog reset (internally generated)
• Software reset (internally generated)
During the time that any reset is active, the system is halted until it exits the
reset state.
When the device starts with an external PRSTn or RSTOn, certain hardware
configurations are determined, and some system configuration information will
be recorded so that software can access it. See the details in “System Reset”
on page 95 and “Hardware Configuration Control” on page 96.
4.1.2 System Reset
The device system reset consists of several events and signals. It has four
levels of reset control. They are:
•Power-on-reset, controlled by PRSTn pin. It resets the entire chip with no
exceptions.
• User reset, controlled by RSTOn pin. While active, it resets the entire
chip, except certain system variables such as RTC, SDRAM refresh
control/global configuration, and the registers in the Syscon.
Note: If PLLs are enabled, user reset does NOT disable or reset the PLLs. They retain
their frequency settings.
4
•Three-key reset. When F2, F4, and F7 are pressed, a user reset (above)
occurs.
•Software reset and watchdog reset. They perform the functions of the
user reset (above), but are under software control.
Watchdog and PwrSts registers contain the information regarding which reset
event occurred. Note that only the Watchdog timer contains information about
a user-generated 3-key reset.
4.1.3 Hardware Configuration Control
The Hardware Configuration controls provide a mechanism to place the
system into various boot configurations. In addition, one of several external
boot memory options can be selected at system wake up.
The Hardware Configuration controls are defined by a set of device pins that
are latched into configuration control bits on the assertion of chip reset on the
rising edge of the PRSTn or RSTOn pin. The different hardware configuration
bits define watchdog behavior, boot mode (internal or external), boot
synchronicity, and external boot width. The latched pins are:
CSn[1]- Disable Watchdog reset timer
CSn[2]- Disable Watchdog reset duration
CSn[3]- Should be pulled up to “1”
EECLK- Select internal or external boot
EEDAT- Should be pulled upto “1”
BOOT[1:0]- Select boot mode
ASDO- Select synchronous or asynchronous boot
CSn[7:6]- Select external boot width
The latched version of these signals have an “L” prefix, and are readable by
software in the SysCfg register. Note that the signals EECLK and EEDAT may
have 1 kΩ pull-ups if used in an open-drain two-wire serial port application.
(The default state assignments will assume this pull-up.)
The Hardware Control configurations are as show in Table 4-1.
The normal boot function is described in Chapter 3, Boot ROM.
96EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
System Controller
Serial boot is functionally identical to normal boot except that the SBoot bit in
the SysCfg register is set. This mode is available for a software configuration
option that is readable by the boot code.
In either normal boot or serial boot mode, once the chip starts up, it will begin
to execute the instruction at logical address 0x0000_0000. Various
configuration options are provided to select the different memory elements for
booting from location 0. The options are listed in Table 4-1.
External boot from Sync memory space selected by
DevCfg3 through the SDRAM Controller. The media
type must be either SROM or SyncFLASH. The
selection of the SRAM width is determined by latched
CSn[7:6] value:
16-bit SFLASH
16-bit SROM
32-bit SFLASH
32-bit SROM
External boot from Async memory space selected by
nCS0 through Synchronous Memory Controller. The
selection of the SRAM width is determined by latched
CSn[7:6] value:
8-bit SRAM
16-bit SRAM
32-bit SRAM
32-bit SRAM
32-bit serial boot
32-bit serial boot
16-bit serial boot
Internal SPI boot from on-chip ROM, if HeaderID is
found.
Internal boot from on-chip ROM using Synchronous
memory at the chip select where the HeaderID exists.
The selection of the ROM width is determined by
latched CSn[7:6] value:
Internal boot from on-chip ROM using Asynchronous
memory at the chip select where the HeaderID exists.
The selection of the ROM width is determined by
latched CSn[7:6] value:
8-bit
16-bit
32-bit
32-bit
4
System Controller
4.1.4 Software System Configuration Options
There are several system configuration options selectable by the DeviceCfg
and SysCfg registers. These registers provide the selection of several pin
multiplexing options and also provide software access to the system reset
configuration options. Please refer to the descriptions of the registers,
“DeviceCfg” on page 120 and “SysCfg” on page 128, for a detailed
explanation.
4.1.5 Clock Control
The device uses a flexible system to generate the required clocks. The goal of
the clock system is to generate as many as 20 independent clock frequencies,
some with very tight accuracy requirements, all from a single external lowfrequency crystal or other external clock source. The system was designed so
that once it has been configured, the processor speed, bus speeds, and video
clocks can be set to a number of different speeds without affecting the speeds
of the other clocks in the system.
4.1.5.1 Oscillators and Programmable PLLs
The device has an interface to two external crystal oscillators with the
frequency of 32 KHz and 14.7456 MHz. To generate the required highfrequency clocks, the system uses two phase-locked-loops (PLLs) to multiply
the incoming 14.7456 MHz low frequency signal to much higher frequencies
(up to about 400 MHz) that are then divided down by programmable dividers
to produce the needed clocks. The PLLs operate independently of one
another.
The system is split into two “trunks”, each of which is driven by one of the
PLLs. The processor and bus clocks are derived from trunk 1 (PLL1). The
USB and FIR clocks are derived from trunk 2 (PLL2). Other low-frequency
clocks are divided from the original crystal frequency. The MIR, audio, and
video clocks can be independently sourced from either trunk. Figure 4-1,
below, shows the PLL1 structure used in the EP9307. Since PLL2 is identical
to PLL1, wherever the phrase of “PLL1” is used in the figure, it applies to PLL2
as well.
98EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
Figure 4-1. Phase Locked Loop (PLL) Structure
System Controller
QQ
14.7456
MHz
PLL1_X1
Feedback Divider
PLL1_X1FBD
Both PLLs are software programmable (each value is defined in ClkSet1 and
ClkSet2 registers respectively). The frequency of output clock Fout shows in
the next equation:
Fout14.7456M Hz
Here PLL1_X1FBD, PLL1_X2FBD, PLL1_X2IPD and PLL1_PS are the bit
fields in ClkSet1 register. The user must be aware of the requirements of PLL
operation. They are:
Figure 4-3 shows the flow of generated system bus clocks, including the ARM
processor clock (FCLK), the AHB bus clock (HCLK), and the APB bus clock
(PCLK).
100EP9307 User’s Manual - DS667UM1
Copyright 2004 Cirrus Logic
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.