Primecell Ahb Sram/Nor Memory Controller (Pl241) : Technical Reference Manual
Primecell Ahb Sram/Nor Memory Controller (Pl241) : Technical Reference Manual
Revision: r0p1
Issue
Confidentiality
Change
17 March 2006
Non-Confidential
20 December 2006
Non-Confidential
Proprietary Notice
Words and logos marked with or are registered trademarks or trademarks of ARM Limited in the EU and
other countries, except as otherwise stated below in this proprietary notice. Other brands and names
mentioned herein may be the trademarks of their respective owners.
Neither the whole nor any part of the information contained in, or the product described in, this document
may be adapted or reproduced in any material form except with the prior written permission of the copyright
holder.
The product described in this document is subject to continuous developments and improvements. All
particulars of the product and its use contained in this document are given by ARM Limited in good faith.
However, all warranties implied or expressed, including but not limited to implied warranties of
merchantability, or fitness for purpose, are excluded.
This document is intended only to assist the reader in the use of the product. ARM Limited shall not be liable
for any loss or damage arising from the use of any information in this document, or any error or omission in
such information, or any incorrect use of the product.
Where the term ARM is used it means ARM or any of its subsidiaries as appropriate.
Confidentiality Status
This document is Non-Confidential. The right to use, copy and disclose this document may be subject to
license restrictions in accordance with the terms of the agreement entered into by ARM and the party that
ARM delivered this document to.
Product Status
The information in this document is final, that is for a developed product.
Web Address
http://www.arm.com
ii
Contents
PrimeCell AHB SRAM/NOR Memory Controller
(PL241) Technical Reference Manual
Preface
About this manual .......................................................................................... x
Feedback ..................................................................................................... xiv
Chapter 1
Introduction
1.1
1.2
Chapter 2
Functional Overview
2.1
2.2
2.3
2.4
Chapter 3
Programmers Model
3.1
3.2
3.3
iii
Contents
Chapter 4
Chapter 5
Appendix A
Signal Descriptions
A.1
A.2
A.3
A.4
A.5
A.6
A.7
A.8
A-2
A-3
A-4
A-5
A-6
A-7
A-8
A-9
Glossary
iv
List of Tables
PrimeCell AHB SRAM/NOR Memory Controller
(PL241) Technical Reference Manual
Table 2-1
Table 2-2
Table 2-3
Table 2-4
Table 2-5
Table 2-6
Table 2-7
Table 2-8
Table 2-9
Table 2-10
Table 2-11
Table 2-12
Table 2-13
Table 2-14
Table 2-15
Table 2-16
Table 2-17
Table 2-18
Table 2-19
Table 2-20
List of Tables
Table 2-21
Table 3-1
Table 3-2
Table 3-3
Table 3-4
Table 3-5
Table 3-6
Table 3-7
Table 3-8
Table 3-9
Table 3-10
Table 3-11
Table 3-12
Table 3-13
Table 3-14
Table 3-15
Table 3-16
Table 3-17
Table 3-18
Table 3-19
Table 3-20
Table 3-21
Table 3-22
Table 3-23
Table 4-1
Table 4-2
Table 4-3
Table 4-4
Table A-1
Table A-2
Table A-3
Table A-4
Table A-5
Table A-6
Table A-7
vi
Synchronous read and asynchronous write opmode chip register settings ............ 2-37
Register summary ..................................................................................................... 3-4
smc_memc_status Register bit assignments ........................................................... 3-6
smc_memif_cfg Register bit assignments ................................................................ 3-7
smc_memc_cfg_set Register bit assignments ......................................................... 3-9
smc_memc_cfg_clr Register bit assignments .......................................................... 3-9
smc_direct_cmd Register bit assignments ............................................................. 3-10
smc_set_cycles Register bit assignments .............................................................. 3-11
smc_set_opmode Register bit assignments ........................................................... 3-13
smc_refresh_period_0 Register bit assignments .................................................... 3-15
smc_sram_cycles Register bit assignments ........................................................... 3-16
smc_opmode Register bit assignments .................................................................. 3-17
smc_user_status Register bit assignments ............................................................ 3-18
smc_user_config Register bit assignments ............................................................ 3-19
smc_periph_id Register bit assignments ................................................................ 3-19
smc_periph_id_0 Register bit assignments ............................................................ 3-20
smc_periph_id_1 Register bit assignments ............................................................ 3-21
smc_periph_id_2 Register bit assignments ............................................................ 3-21
smc_periph_id_3 Register bit assignments ............................................................ 3-21
smc_pcell_id Register bit assignments ................................................................... 3-22
smc_pcell_id_0 Register bit assignments ............................................................... 3-23
smc_pcell_id_1 Register bit assignments ............................................................... 3-23
smc_pcell_id_2 Register bit assignments ............................................................... 3-24
smc_pcell_id_3 Register bit assignments ............................................................... 3-24
SMC test register summary ...................................................................................... 4-2
smc_int_cfg Register bit assignments ...................................................................... 4-3
smc_int_inputs Register bit assignments ................................................................. 4-3
smc_int_outputs Register bit assignments ............................................................... 4-4
Clocks and resets ..................................................................................................... A-3
AHB signals .............................................................................................................. A-4
SMC memory interface signals ................................................................................. A-5
SMC miscellaneous signals ...................................................................................... A-6
Low-power interface signals ..................................................................................... A-7
Configuration signal .................................................................................................. A-8
Scan chain signals .................................................................................................... A-9
List of Figures
PrimeCell AHB SRAM/NOR Memory Controller
(PL241) Technical Reference Manual
Figure 1-1
Figure 2-1
Figure 2-2
Figure 2-3
Figure 2-4
Figure 2-5
Figure 2-6
Figure 2-7
Figure 2-8
Figure 2-9
Figure 2-10
Figure 2-11
Figure 2-12
Figure 2-13
Figure 2-14
Figure 2-15
Figure 2-16
Figure 2-17
Figure 2-18
Figure 2-19
vii
List of Figures
Figure 2-20
Figure 2-21
Figure 2-22
Figure 2-23
Figure 3-1
Figure 3-2
Figure 3-3
Figure 3-4
Figure 3-5
Figure 3-6
Figure 3-7
Figure 3-8
Figure 3-9
Figure 3-10
Figure 3-11
Figure 3-12
Figure 3-13
Figure 3-14
Figure 3-15
Figure 3-16
Figure 3-17
Figure 3-18
Figure 3-19
Figure 4-1
Figure 4-2
Figure 4-3
Figure 4-4
Figure 5-1
Figure 5-2
Figure 5-3
Figure A-1
viii
Preface
This preface introduces the PrimeCell AHB SRAM/NOR Memory Controller (MC)
(PL241) Technical Reference Manual. It contains the following sections:
ix
Preface
Preface
Conventions
Conventions that this manual can use are described in:
Typographical
italic
bold
monospace
monospace
monospace italic
monospace bold
xi
Preface
Note
Angle brackets can also enclose a permitted range of values. The
example, <0-3>, shows that in name extensions, only one of the
values 0, 1, 2, or 3 is valid.
Timing diagrams
The figure named Key to timing diagram conventions explains the components used in
timing diagrams. Variations, when they occur, have clear labels. You must not assume
any timing information that is not explicit in the diagrams.
Shaded bus and signal areas are undefined, so the bus or signal can assume any value
within the shaded area at that time. The actual level is unimportant and does not affect
normal operation.
&ORFN
+,*+WR/2:
7UDQVLHQW
+,*+/2:WR+,*+
%XVVWDEOH
%XVWRKLJKLPSHGDQFH
%XVFKDQJH
+LJKLPSHGDQFHWRVWDEOHEXV
Signals
The signal conventions are:
xii
Signal level
Lower-case n
Prefix A
Prefix AR
Prefix AW
Preface
Prefix B
Prefix C
Prefix H
Prefix P
Prefix R
Prefix W
Numbering
The Verilog numbering convention is:
<size in bits>'<base><number>
This is a Verilog method of abbreviating constant numbers. For example:
Further reading
This section lists publications by ARM Limited, and by third parties.
ARM Limited periodically provides updates and corrections to its documentation. See
http://www.arm.com for current errata sheets, addenda, and the Frequently Asked
Questions list.
ARM publications
This manual contains information that is specific to the AHB MC. See the following
documents for other relevant information:
xiii
Preface
Feedback
ARM Limited welcomes feedback on the AHB MC and its documentation.
Feedback on this product
If you have any comments or suggestions about this product, contact your supplier
giving:
the title
the number
xiv
Chapter 1
Introduction
This chapter introduces the AHB MC. It contains the following sections:
1-1
Introduction
1.1
$+%
$+%LQWHUIDFH
6
60&
$+%
FRQILJXUDWLRQ
SRUW
$+%WR$3%
EULGJH
ELW65$0125
IRXUFKLSV
$3%6
1-2
Introduction
1.1.1
AHB interface
The interface converts the incoming AHB transfers to the protocol used internally by
the AHB MC.
The interface has the following features:
all AHB fixed length burst types are directly translated to fixed length bursts
the bufferable bit of the HPROT signal determines if the interface must wait for
a write transfer to complete internally
a Read After Write (RAW) hazard detection buffer avoids RAW hazards
This interface is a fully validated component. This ensures that it obeys both the AHB
protocol and the internal protocol that the interconnect uses.
See Chapter 2 Functional Overview for more information.
1.1.2
1-3
Introduction
1.1.3
SMC
The SMC is a high-performance, area-optimized SRAM memory controller.
The SMC is pre-configured and validated for:
NOR flash
support for the PL220 External Bus Interface (EBI) PrimeCell, enabling sharing
of external address and data bus pins between memory controller interfaces
Clock domains
The memory controller has two clock domains:
1.1.5
Low-power interfaces
The memory controller has two low-power interfaces, one for each clock domain.
See Chapter 2 Functional Overview for more information.
1-4
Introduction
1.2
Supported devices
The SMC supports SRAM/NOR, see SMC on page 1-4. The Release Note provides a
specific list of memory devices tested with each configuration.
Some memory devices or series of memory devices have specific requirements:
Intel W18 series NOR FLASH, for example 28f128W18td
These devices, when in synchronous operation, use a WAIT pin.
However non-array operations when in synchronous mode do not use the
WAIT pin and it is always asserted. The controller cannot differentiate
between array and non-array accesses and therefore cannot support these
non-array accesses.
Therefore, W18 devices can only carry out non-array operations such as
Read Status in asynchronous modes of operation.
1-5
Introduction
1-6
Chapter 2
Functional Overview
This chapter describes the major components of the AHB MC and how they operate. It
contains the following sections:
2-1
Functional Overview
2.1
Functional description
Figure 2-1 shows an AHB MC (PL241) configuration.
$+%0&3/
$+%LQWHUIDFH
$+%
6
60&
$+%
FRQILJXUDWLRQ
SRUW
$+%WR$3%
EULGJH
ELW65$0125
IRXUFKLSV
$3%6
AHB interface
AHB interface
The AHB MC fully supports the AMBA AHB 2.0 specification. This interface
component converts the incoming AHB transfers to the required transfers of the internal
interconnect protocol. Because of the design of the internal interconnect, some
optimizations are made in the interface to improve performance.
See AHB interface operation on page 2-7 for more information.
2.1.2
2-2
Functional Overview
2.1.3
Clock domains
The memory controller has two clock domains:
AHB clock domain
This is clocked by hclk, smc_aclk and reset by hresetn.
Static memory clock domain
This is clocked by smc_mclk0, smc_mclk0n and reset by
smc_mreset0n.
Figure 2-2 shows the two clock domains.
$+%FORFNGRPDLQ
$+%LQWHUIDFH
$+%
6WDWLFPHPRU\FORFNGRPDLQ
$+%0&3/
VPFBDFON
65$0
PHPRU\
60&
$+%
FRQILJXUDWLRQ
SRUW
$+%WR$3%
EULGJH
$3%6
KFON
VPFBPFON
The memory controller supports many different options for clocking the different
domains.
See Clock domain operation on page 2-11 for more information.
2.1.4
Low-power interface
The memory controller has two low-power interfaces, one for each clock domain. These
operate with a simple three signal protocol. It is expected that a system clock controller
drives these interfaces and associated clocks. Each domain has individual control to
enable independent handshaking with the system clock controller.
See Low-power interface operation on page 2-12 for more information.
2-3
Functional Overview
2.2
SMC
Figure 2-3 shows a block diagram of the SMC.
0HPRU\FORFNGRPDLQ
$+%FORFNGRPDLQ
$3%VODYH
LQWHUIDFH
0HPRU\
PDQDJHU
(%,
LQWHUIDFH
/RZSRZHU
LQWHUIDFH
0HPRU\
LQWHUIDFH
3DG
LQWHUIDFH
65$0
PHPRU\
LQWHUIDFH
)RUPDW
60&
LQWHUIDFH
,QWHUUXSWV
2-4
Functional Overview
2.2.1
SMC interface
The SMC interface processes the incoming AHB transfers and sends them to the
command format block.
2.2.2
2.2.3
Format
The format block receives memory accesses from the SMC interface and the memory
manager. Read and write requests are arbitrated on a round robin basis. Requests from
the manager have the highest priority. The format block also maps AHB memory
transfers onto appropriate memory transfers and passes these to the memory interface
through the command FIFO.
See Format block on page 2-19 for more information.
2.2.4
Memory manager
The memory manager tracks and controls the current state of smc_aclk domain logic.
The block is responsible for:
controlling entry-to and exit-from low-power mode through the APB interface
2.2.5
Memory interface
The SRAM memory interface consists of command, read data and write data FIFOs,
plus a control FSM. To support an EBI, the memory interface also contains an EBI
FSM. This controls interaction with the EBI and prevents the memory interface FSM
from issuing commands until it has been granted the external bus.
See Memory interface operation on page 2-27 for more information.
2-5
Functional Overview
2.2.6
Pad interface
The pad interface module provides a registered I/O interface for data and control
signals. It also contains interrupt generation logic.
Figure 2-4 shows the SRAM pad interface external signals. Clock and reset signals are
omitted.
VPFBGDWDBLQB>@
VPFBIEFONBLQB
65$0
SDGLQWHUIDFH
VPFBLQWB
VPFBZDLWB
VPFBDGYBQB
VPFBEDDBQB
VPFBEOVBQB>@
VPFBFONBRXWB>@
VPFBFUHB
VPFBFVBQB>@
VPFBGDWDBHQB
VPFBGDWDBRXWB>@
VPFBRHBQB
VPFBZHBQB
2.2.7
Interrupts
The SRAM memory interface support interrupts. The interrupt is triggered on the rising
edge of the smc_int_0 input for the SRAM memory interface.
See Interrupts operation on page 2-27 for more information.
2-6
Functional Overview
2.3
Functional operation
This section is divided into:
2.3.1
2-7
Functional Overview
2-8
Functional Overview
If transfers are described as non-bufferable then the bridge must wait for the write
response to indicate that the transfer has been completed to memory. If numerous
bufferable writes are performed, followed by a non-bufferable write, then the bridge
must wait until it receives the write response associated with the final write.
Read after write hazard detection buffer
A RAW hazard detection buffer avoids potential RAW hazards. The protocol used
internally to AHB MC does not perform memory coherency checks to catch Write After
Read (WAR) or RAW hazards.
Because of the nature of the AHB protocol, WAR hazards never occur because the read
must have completed before the write can be accepted.
Because the bridge permits writes to be buffered internally, there is a potential for a
RAW hazard to occur. If you perform a bufferable write then it might not complete
immediately. If a read to that same memory location is performed then both transfers
can be in the queue and the internal memory controller can reorder these transactions
for performance reasons so that the read occurs before the write. This means that the
data read might be the value before the most recent write. The bridge has to detect these
potential cases and stall the read transfer until any buffered writes that might cause a
RAW hazard have been completed.
The bridge contains logic to monitor up to four outstanding write addresses. If an
incoming read occurs to a 4KB region that has been written to, then it is stalled. If four
bufferable writes occur then the AHB is stalled until a response is seen for the first of
the four writes in the buffer.
AHB response signals
The interconnect used within the AHB MC contains many combinatorial paths that link
different AHB input ports. To improve the synthesis timing, the AHB responses are
registered to limit these paths to within the design.
Locked transfers
AHB MC supports locked transfers, within a 512MB region. This is because of the way
the interconnect processes locked transfers. There is a significant performance penalty
in using locked transfers. Transfers that are locked together wait for all other ports to
complete any outstanding transfers before they can begin. While a locked sequence
occurs to a specific 512MB memory region, all other access to that region is stalled. All
locked writes are processed as non-bufferable writes and so have to wait for the
appropriate write response before indicating their completion.
2-9
Functional Overview
Registered HWDATA
The interconnect used within the AHB MC contains combinatorial paths for the write
data. To improve the synthesis timing, HWDATA is registered and makes these paths
internal to the design.
Big-endian 32-bit mode
The AHB MC supports the option of storing data to memory in big-endian 32-bit mode.
Each bridge contains the logic to implement this data mapping depending on the
big_endian input tie-off. Figure 2-5 shows that if the tie off is asserted then the data
buses are reordered.
ELW
/LWWOHHQGLDQGHIDXOW
%LJHQGLDQPRGH
2-10
Functional Overview
[))))
5HDGDV]HUR
[
60&FRQILJ
[
5HVHUYHG
[
$+%&PHPRU\PDS
The other fourteen 4KB regions are read as zero. The lower 16 bits of the AHB address
decode the memory controller that is being used. An external AHB decoder determines
where in the system memory map, this 64KB region is located. See About the
programmers model on page 3-2 for information on the internal memory controller
configuration registers. The configuration port of the internal memory controller is
APB, so only word reads and writes are supported.
2.3.3
2-11
Functional Overview
Tie-off values
Fully synchronous
hclk = smc_mclk0
smc_async0 = smc_msync0 = 1
smc_a_gt_m0_sync = 0
Synchronous multiples
hclk = n x smc_mclk0
where:
n = integer value
smc_async0 = smc_msync0 = 1
smc_a_gt_m0_sync = 0
m x hclk = smc_mclk0
where:
m = integer value
smc_async0 = smc_msync0 = 1
smc_a_gt_m0_sync = 1
Asynchronous
Extra registers are used to avoid metastability when
crossing the asynchronous clock boundary.
2.3.4
smc_async0 = smc_msync0 = 0
smc_a_gt_m0_sync = 0
2-12
Functional Overview
an active output
<domain>_cactive
Where:
<domain> is ahb or smc.
Figure 2-7 explains the protocol for the interface by showing a request to enter
low-power mode.
7
7
7
7
7
KFON
DKEBFV\VUHT
DKEBFV\VDFN
DKEBFDFWLYH
7
7
7
KFON
DKEBFV\VUHT
DKEBFV\VDFN
DKEBFDFWLYH
When ahb_csysack is asserted LOW, the ahb_cactive signal is HIGH, as shown at T3,
indicating the AHB domain is busy and the clock cannot be switched off. The
handshake must be completed.
2-13
Functional Overview
The AHB domain accepts or denies requests based on whether it is busy performing any
transfers. Figure 2-9 shows that static memory controllers always accept requests after
they have performed the required operations to prepare the external memory for the
clock to be switched off.
7
7
7
7
7
VPFBDFON
VPFBFV\VUHT
VPFBFV\VDFN
VPFBFDFWLYH
The low-power request smc_csysreq is driven LOW at time T1. When the memory
controller is happy for the clock to be switched off, the smc_csysack signal is driven
LOW to acknowledge the request, as shown at T2. smc_cactive is driven LOW, so the
system clock controller knows the request has been accepted. When acknowledged, the
system clock controller can disable both the smc_aclk and smc_mclk0 signals.
The two domains have separate interfaces to enable individual handshaking with the
system clock controller. The only usage model is to switch off both domains. Each
individual low-power interface protocol must be observed before all the clocks can be
disabled.
2-14
Functional Overview
2.4
Operating states
2.4.1
Operating states
The operation of the SMC is based on three operating states. In this section, each state
is described. Figure 2-10 shows the state machine.
5HVHW
5HDG\
/RZSRZHU
Ready
Normal operation of the device. You can access the SMC register bank
through the AHB configuration port and external memory devices
accessed through the SMC interface.
Low-power The device does not accept new AHB transfers, and only certain registers
are accessible through the APB interface. You can stop the SMC clocks
to reduce power consumption.
2-15
Functional Overview
Clocking
smc_aclk
smc_mclk0
smc_mclk0n.
2-16
Functional Overview
smc_mreset0n
This is the reset signal for the smc_mclk0 domain.
2-17
Functional Overview
You can change both reset signals asynchronously to their respective clock domain.
Internally to the SMC the deassertion of the hresetn signal is synchronized to
smc_aclk. The deassertion of smc_mreset0n is synchronized internally to smc_mclk0
and smc_mclk0n.
2.4.3
Miscellaneous signals
You can use the following signals as general-purpose control signals for logic external
to the SMC:
smc_user_config[7:0]
General purpose output ports that are driven directly from the
write-only APB register. If you do not require these ports leave
them unconnected. See also the SMC User Configuration Register
at 0x1204 on page 3-19.
smc_user_status[7:0]
General purpose input ports that are readable from the APB
interface through the smc_user_status Register. If you do not
require these ports then tie them either HIGH or LOW. These ports
are connected directly to the APB interface block. Therefore, if
they are driven from external logic that is not clocked by the SMC
smc_aclk signal, then you require external synchronization
registers. See also the SMC User Status Register at 0x1200 on
page 3-18.
You can use the following miscellaneous signals as tie-offs to change the operational
behavior of the SMC:
smc_a_gt_m0_sync
When HIGH, indicates that smc_aclk is greater than and synchronous to
smc_mclk0.
smc_async0 When HIGH, indicates smc_aclk is synchronous to smc_mclk0.
Otherwise they are asynchronous. Ensure that smc_async0 is tied to the
same value as smc_msync0.
smc_dft_en_clk_out
Use this signal for Automatic Test Pattern Generator (ATPG) testing
only. Tie it LOW for normal operation.
2-18
Functional Overview
smc_msync0
When HIGH, indicates smc_mclk0 is synchronous to smc_aclk.
Otherwise they are asynchronous. Ensure that smc_msync0 is tied to the
same value as smc_async0.
smc_rst_bypass
Use this signal for ATPG testing only. Tie it LOW for normal operation.
smc_use_ebi
When HIGH, indicates that the SMC must operate with a PrimeCell EBI.
See the ARM PrimeCell External Bus Interface (PL220) Technical
Reference Manual.
2.4.4
2.4.5
when a direct command is received and there are outstanding commands that
prevent a new command being stored in the command FIFO
when an APB access is received and a previous direct command has not
completed.
Format block
This section describes:
Hazard handling
2-19
Functional Overview
The SMC ensures the ordering of read transfers from a single port is maintained RAR,
and additionally that the ordering of write transfers from a single master is maintained
WAW.
SRAM memory accesses
This section describes:
To produce the address presented to the memory device, the AHB address is aligned to
the memory width. This is done because the AHB address is a byte-aligned address,
while the memory address is a memory-width-aligned address.
Note
During initial configuration of a memory device, the memory mode register can be
accessed with a sequence of transfers to specific addresses. You must take into
consideration the shifting performance by the SMC when accessing memory mode
registers.
Memory burst alignment
The SMC provides a programmable option for controlling the formatting of memory
transfers with respect to memory burst boundaries, through the burst_align bit of the
opmode registers.
When set, the burst_align bit causes memory bursts to be aligned to a memory burst
boundary. This setting is intended for use with memories that use the concept of internal
pages. This can be an asynchronous page mode memory, or a synchronous PSRAM. If
a burst crosses a memory burst boundary, the SMC partitions the transfer into multiple
2-20
Functional Overview
memory bursts, terminating a memory transfer at the burst boundary. Also ensure the
page size is an integer multiple of the burst length, to avoid a memory burst crossing a
page boundary.
When the burst_align bit is not set, the SMC ignores the memory burst boundary when
mapping commands onto memory commands. This setting is intended for use with
devices such as NOR flash. These devices have no concept of pages.
Memory burst length
The SMC enables you to program the memory burst length on an individual chip basis,
from length 1 to 32 beats, or a continuous burst. However, the length of memory bursts
are limited by the size of the read and write data FIFOs, and the programmed memory
burst must not exceed this upper limit.
For read transfers, the maximum memory burst length is the depth of the read data
FIFO, and it is four. For writes, the burst length is the depth of the write FIFO, and is
four.
Booting using the SRAM
The SMC enables the lowest SRAM chip select, normally chip 0, to be bootable. To
enable SRAM memory to be bootable, the SRAM interface does not require any special
functionality, other than knowing the memory width of the memory concerned. This is
indicated by a top-level tie-off. To enable the SMC to work with the slowest memories
the timing registers reset to the worst case values. When the smc_remap_0 port signal
is HIGH, the memory with the bootable chip select is set by the smc_sram_mw_0[1:0]
tie-off port signal.
Additionally, while the SMC input smc_remap_0 is HIGH, the bootable chip is aliased
to base address 0x0.
2-21
Functional Overview
2.4.6
Low-power operation
2-22
Functional Overview
The APB registers smc_set_cycles and smc_set_opmode act as holding registers, the
configuration registers within the manager are only updated if either:
The chip configuration registers are available as read only registers in the address map
of the APB interface.
DSEBLI
PDQDJHU
PHPFBFIJ
VHWF\FOHV
VHWRSPRGH
'
FKLSF\FOHV
FKLSRSPRGH
'
FKLSBFIJ
FKLSF\FOHV
FKLSRSPRGH
'
FKLSBFIJ
FKLSF\FOHV
FKLSRSPRGH
'
FKLSBFIJ
FKLSF\FOHV
FKLSRSPRGH
'
FKLSBFIJ
2-23
Functional Overview
Direct commands
The SMC enables code to be executed from the memory while simultaneously, from the
software perspective, moving the same chip to a different operating mode. This is
achieved by synchronizing the update of the chip configuration registers from the
holding registers with the dispatch of the memory configuration register write.
The SMC provides two mechanisms for simultaneously updating the controller and
memory configuration registers.
Device pin mechanism
For memories that use an input pin to indicate that a write is
intended for the configuration register, for example in some
PSRAM devices, the write mechanism can be done through the
APB direct command register. Figure 2-12 on page 2-25 shows
the sequence of events.
Software mechanism
For memories that require a sequence of read and write
commands, for example, most NOR Flash devices use the SMC
interface, with the write data bus indicating when the last transfer
has completed and when it is safe for the SMC to update the chip
configuration registers. Figure 2-13 on page 2-26 shows the
sequence of events.
2-24
Functional Overview
6WDUW
:ULWHWLPLQJSDUDPHWHUV
DQGRSHUDWLQJPRGHWR
WKHPHPRU\FRQWUROOHU
KROGLQJUHJLVWHUV
:ULWHUHTXLUHGH[WHUQDOFKLS
VHOHFWQXPEHUDQGUHTXLUHG
PRGHUHJLVWHUYDOXHWRWKH
'LUHFW&RPPDQG5HJLVWHU
7KHPHPRU\FRQWUROOHUSDVVHVWKLVPRGHUHJLVWHU
FRPPDQGWRWKHPHPRU\LQWHUIDFHDQGVHWVDUHTXHVW
UHTVLJQDO7KHPHPRU\FRQWUROOHUGRHVQRWDFFHSWDQ\
PRUHFRQILJXUDWLRQSRUWFRPPDQGVXQWLO
UHTLVFOHDUHG
:KHQWKHPHPRU\LQWHUIDFHLVVXHVWKHPRGHUHT
FRPPDQGWRPHPRU\LWUHVSRQGVWRWKHUHTVLJQDOZLWKDQ
DFNUHVSRQVHVLJQDO7KHPHPRU\LQWHUIDFHEORFNVDQ\
PRUHDFFHVVHVWRWKDWFKLSVHOHFWXQWLOUHTLVFOHDUHG
7KHPHPRU\FRQWUROOHUGHWHFWVWKHDFNVLJQDODQGXSGDWHV
WKHPRGHDQGWLPLQJUHJLVWHUVRIWKHUHOHYDQWFKLSVHOHFW
DQGQHJDWHVUHT
7KHPHPRU\LQWHUIDFHGHWHFWVWKHQHJDWLRQRIUHTFOHDUV
DFNDQGUHHQDEOHVDFFHVVHVWRWKHXSGDWHGFKLSVHOHFW
PHPRU\
(QG
2-25
Functional Overview
6WDUW
$
:ULWHWLPLQJSDUDPHWHUV
DQGRSHUDWLQJPRGHWR
WKHPHPRU\FRQWUROOHU
KROGLQJUHJLVWHUV
:ULWHUHTXLUHGH[WHUQDOFKLS
VHOHFWQXPEHUDQGUHTXLUHG
PRGHUHJLVWHUYDOXHWRWKH
'LUHFW&RPPDQG5HJLVWHU
7KHPHPRU\FRQWUROOHUGHWHFWVWKHDFNVLJQDODQGXSGDWHV
WKHPRGHDQGWLPLQJUHJLVWHUVRIWKHUHOHYDQWFKLSVHOHFW
DQGQHJDWHVUHT
7KHPHPRU\LQWHUIDFHGHWHFWVWKHQHJDWLRQRIUHTFOHDUV
DFNDQGUHHQDEOHVDFFHVVHVWRWKHXSGDWHGFKLSVHOHFW
PHPRU\
(QG
7KHPHPRU\FRQWUROOHUSDVVHVWKLVPRGHUHJLVWHU
FRPPDQGWRWKHPHPRU\LQWHUIDFHDQGVHWVDUHTXHVWUHT
VLJQDO7KHPHPRU\FRQWUROOHUGRHVQRWDFFHSWDQ\PRUH
FRQILJXUDWLRQSRUWFRPPDQGVXQWLO
UHTLVFOHDUHG
:KHQWKHPHPRU\LQWHUIDFHGHWHFWVWKHUHTVLJQDOLWWULHV
WRPDWFKDOOFRPPDQGVLVVXHGWRWKHUHTXLUHGFKLSVHOHFW
ZLWKWKHPDWFKYDOXH
:ULWHWKHUHTXLUHGPHPRU\PRGHUHJLVWHUYDOXHV
:KHQWKHPHPRU\LQWHUIDFHPDWFKHVWKHUHTXLUHGFKLSVHOHFWDQG
PDWFKYDOXHWRWKHGDWDEXVXVLQJE\WHODQHVWUREHVWRGHWHUPLQH
YDOLGLW\LWDVVHUWVDFNDQGEORFNVDQ\PRUHDFFHVVHVWRWKDWFKLS
VHOHFWXQWLOUHTLVFOHDUHG
2-26
Functional Overview
2.4.7
Interrupts operation
The next read to any chip select on the appropriate memory interface clears the
interrupt.
The interrupt outputs are generated through a combinational path from the relevant
input pin. This enables you to place the SMC in Low-power state, and to stop the clocks
while waiting for an interrupt.
When interrupts are disabled, a synchronized version of the interrupt input is still
readable through the APB interface.
2.4.8
2-27
Functional Overview
Read data output by the memory device is also registered on the rising edge of
smc_mclk0n, equivalent to the falling edge of smc_mclk0, for asynchronous reads. For
synchronous reads, read data is registered using the fed back clock, smc_fbclk_in. For
synchronous and asynchronous accesses, the data is then pushed onto the read data
FIFO to be returned by the SMC interface.
This subsection describes:
Asynchronous read
Table 2-2 and Table 2-3 list the smc_opmode0_<0-3> and SRAM Register settings. See
Register summary on page 3-3.
Table 2-2 Asynchronous read opmode chip register settings
Field
mw
rd_sync
rd_bl
wr_sync
wr_bl
baa
adv
bls
ba
Value
b0
b000
t_rc
t_wc
t_ceoe
t_wp
t_pc
t_tr
Value
b0011
b001
Figure 2-14 on page 2-29 shows a single asynchronous read transfer with an initial
access time, tRC, of three cycles and an output enable assertion delay, tCEOE, of one
cycle.
2-28
Functional Overview
VPFBPFON
W5&
VPFBFVBQB>@
VPFBRHBQB
W&(2(
VPFBDGGB>@
$
'
VPFBGDWDBLQB>@
'
UHDGBGDWD
Table 2-4 and Table 2-5 list the smc_opmode0_<0-3> and SRAM Register settings.
Table 2-4 Asynchronous read in multiplexed-mode opmode chip register settings
Field
mw
rd_sync
rd_bl
wr_sync
wr_bl
baa
adv
bls
ba
Value
b0
b000
b1
t_rc
t_wc
t_ceoe
t_wp
t_pc
t_tr
Value
b0111
b101
VPFBFVBQB
VPFBRHBQB
W&(2(
VPFBDGYBQB
VPFBGDWDBHQB
VPFBGDWDBRXWB
'
'
UHDGBGDWD
2-29
Functional Overview
Note
In multiplexed-mode, both address and data are output by the SMC on the
smc_data_out_0[31:0] output bus. Read data is accepted on the smc_data_in_0[31:0]
bus.
Asynchronous write
Table 2-6 and Table 2-7 list the smc_opmode0_<0-3> and SRAM Register settings.
Table 2-6 Asynchronous write opmode chip register settings
Field
mw
rd_sync
rd_bl
wr_sync
wr_bl
baa
adv
bls
ba
Value
b0
b000
t_rc
t_wc
t_ceoe
t_wp
t_pc
t_tr
Value
b0100
b010
Figure 2-16 shows an asynchronous write with a write cycle time tWC of four cycles and
a smc_we_n_0 assertion duration, tWP, of two cycles.
Note
The timing parameter tWC is controlling the deassertion of smc_we_n_0. You can use
it to vary the hold time of smc_cs_n_0[3:0], smc_add_0[31:0] and
smc_data_out_0[31:0]. This differs from the read case where the timing parameter
tCEOE controls the delay in the assertion of smc_oe_n_0. Additionally, smc_we_n_0 is
always asserted one cycle after smc_cs_n_0[3:0] to ensure the address bus is valid.
VPFBPFON
VPFBFVBQB>@
W:&
W:3
VPFBZHBQB
VPFBDGGB>@
VPFBGDWDBRXWB>@
'
2-30
Functional Overview
Table 2-8 and Table 2-9 list the smc_opmode0_<0-3> and SRAM Register settings.
Table 2-8 Asynchronous write in multiplexed-mode opmode chip register settings
Field
mw
rd_sync
rd_bl
wr_sync
wr_bl
baa
adv
bls
ba
Value
b0
b000
b0
b0
t_rc
t_wc
t_ceoe
t_wp
t_pc
t_tr
Value
b0111
b100
Figure 2-17 shows an asynchronous write in multiplexed-mode. tWC is seven cycles. tWP
is four cycles, and is extended by two cycles for the address phase of the transaction.
VPFBPFON
W:&
VPFBFVBQB>@
VPFBDGYBQB
W:3
VPFBZHBQB
VPFBGDWDBRXWB>@
'
VPFBGDWDBHQB
Table 2-10 and Table 2-11 list the smc_opmode0_<0-3> and SRAM Register settings.
Table 2-10 Page read opmode chip register settings
Field
mw
rd_sync
rd_bl
wr_sync
wr_bl
baa
adv
bls
ba
Value
b0
<page length>
b1
Field
t_rc
t_wc
t_ceoe
t_wp
t_pc
t_tr
Value
b0011
b010
b001
2-31
Functional Overview
Figure 2-18 shows a page read access, with an initial access time, tRC, of three cycles,
an output enable assertion delay, tCEOE, of two cycles and a page access time, tPC, of one
cycle.
Page mode is enabled in the SMC by setting the opmode Register for the relevant chip
to asynchronous reads and the burst length to the page size.
Note
Multiplexed-mode page accesses are not supported.
VPFBPFON
VPFBFVBQB>@
W5&
W3&
W3&
$
$
VPFBRHBQB
W&(2(
VPFBDGGB>@
'
VPFBGDWDBLQB>@
'
'
UHDGBGDWD
$
'
'
$
'
'
'
'
'
Table 2-12 and Table 2-13 list the smc_opmode0_<0-3> and SRAM Register settings.
Table 2-12 Synchronous burst read opmode chip register settings
Field
mw
rd_sync
rd_bl
wr_sync
wr_bl
baa
adv
bls
ba
Value
b1
<burst length>
b1
2-32
Field
t_rc
t_wc
t_ceoe
t_wp
t_pc
t_tr
Value
b0100
b010
Functional Overview
Figure 2-19 shows a burst read with the smc_wait_0 output of the memory used to
delay the transfer.
Note
Synchronous memories have a configuration register enabling smc_wait_0 to be
asserted either on the same clock cycle as the delayed data or a cycle earlier. The
SMC only supports smc_wait_0 being asserted one cycle early, enabling
smc_wait_0 to be initially sampled with the fed back clock and then with
smc_mclk0 before being used by the FSM. This enables the easiest timing
closure. Additionally, you must configure the memory for smc_wait_0 to be
active LOW.
In synchronous operation, the SMC relies on the smc_wait_0 signal being
deasserted HIGH to indicate that the memory can finish the transfer. When in
synchronous mode some memories do not deassert the smc_wait_0 signal during
non-array read transfers. Non-array read transfers are typically status register
reads. To avoid stalling the system with these memories, in synchronous mode
you must not perform non-array read transfers with the memory and SMC.
VPFBPFON
VPFBIEFONBLQB
VPFBDGGUHVV
$''5
W5&
VPFBFVBQB>@
VPFBDGYBQB
VPFBRHBQB
W&(2(
VPFBGDWDBLQB>@
'
'
'
'
VPFBZDLWB
ZDLWBUHJBIEFON
ZDLWBUHJBPFON
UHDGBGDWD
'
'
'
'
2-33
Functional Overview
Table 2-14 and Table 2-15 list the smc_opmode0_<0-3> and SRAM Register settings.
Table 2-14 Synchronous burst read in multiplexed-mode opmode chip register
settings
Field
mw
rd_sync
rd_bl
wr_sync
wr_bl
baa
adv
bls
ba
Value
b1
<burst length>
t_rc
t_wc
t_ceoe
t_wp
t_pc
t_tr
Value
b0100
b010
Figure 2-20 shows the same synchronous read burst transfer as Figure 2-19 on
page 2-33, but in multiplexed-mode.
VPFBPFON
VPFBIEFONBLQB
W5&
VPFBFVBQB>@
VPFBDGYB
VPFBRHBQB
W&(2(
GDWD
$
'
'
'
'
VPFBGDWDBHQB
VPFBZDLWB
ZDLWBUHJBIEFON
ZDLWBUHJBPFON
UHDGBGDWD
'
'
'
'
2-34
Functional Overview
Table 2-16 and Table 2-17 list the smc_opmode0_<0-3> and SRAM Register settings.
Table 2-16 Synchronous burst write opmode chip register settings
Field
mw
rd_sync
rd_bl
wr_sync
wr_bl
baa
adv
bls
ba
Value
b1
<burst length>
b1
t_rc
t_wc
t_ceoe
t_wp
t_pc
t_tr
Value
b0100
b001
Figure 2-21 shows a synchronous burst write transfer that is delayed by the smc_wait_0
signal. You must configure the memory to assert smc_wait_0 one cycle early and with
an active LOW priority. The smc_wait_0 signal is again registered with the fed back
clock and smc_mclk0 before being used. The smc_wait_0 signal is used in the
smc_mclk0 domain to the memory interface FSM.
VPFBPFON
VPFBIEFONBLQB
VPFBDGGB>@
VPFBFVBQB>@
$''5
W:&
VPFBDGYBQB
W:3
VPFBZHBQB
VPFBGDWDBRXWB>@
'
'
'
'
VPFBZDLWB
ZDLWBUHJBIEFON
ZDLWBUHJBPFON
2-35
Functional Overview
Table 2-18 and Table 2-19 list the smc_opmode0_<0-3> and SRAM Register settings.
Table 2-18 Synchronous burst write in multiplexed-mode opmode chip register
settings
Field
mw
rd_sync
rd_bl
wr_sync
wr_bl
baa
adv
bls
ba
Value
b1
<burst length>
b1
t_rc
t_wc
t_ceoe
t_wp
t_pc
t_tr
Value
b0100
b001
Figure 2-22 shows the same synchronous burst write as Figure 2-21 on page 2-35, but
in multiplexed-mode.
VPFBPFON
VPFBIEFONBLQB
W:&
VPFBFVBQB>@
VPFBDGYBQB
W:3
VPFBZHBQB
VPFBGDWDBRXWB>@
$
'
'
'
VPFBGDWDBHQB
VPFBZDLWB
ZDLWBUHJBIEFON
ZDLWBUHJBPFON
2-36
Functional Overview
Table 2-20 and Table 2-21 list the smc_opmode0_<0-3> and SRAM Register settings.
Table 2-20 Synchronous read and asynchronous write opmode chip register
settings
Field
mw
rd_sync
rd_bl
wr_sync
wr_bl
baa
adv
bls
ba
Value
b1
b001
b0
b000
b0
b1
b0
Table 2-21 Synchronous read and asynchronous write opmode chip register
settings
Field
t_rc
t_wc
t_ceoe
t_wp
t_pc
t_tr
Value
b0100
b0110
b010
b001
b011
Figure 2-23 on page 2-38 shows the turnaround time tTR, enforced between
synchronous read and asynchronous write. The turnaround time is enforced between:
2-37
Functional Overview
VPFBPFON
VPFBFONBRXWB>@
VPFBIEFONBLQB
$''5$
VPFBDGGB>@
$''5%
VPFBFVBQB>@
W75
VPFBDGYBQB
VPFBRHBQB
VPFBZHBQB
GDWD
'%
'$
'$
'$
'$
VPFBGDWDBHQB
GDWD
UHDGBGDWD
'$
'$
'$
'$
For tRC:
when using memory devices that are not wait-enabled, you must program tRC to
be the number of clock cycles required before valid data is available following the
assertion of cs_n
when using memory devices that are wait-enabled, you must program tRC to be
the number of clock cycles required before wait is active and stable, following the
assertion of cs_n. That is:
t_RC = 3 + t_CEOE
Note
t_CEOE is only required if wait is asserted when oe_n goes LOW.
2-38
Functional Overview
For tWC:
when using memory devices that are not wait-enabled, you must program tWC to
be the number of clock cycles required before the first data is written, following
the assertion of cs_n
when using memory devices that are wait-enabled, you must program tWC to be
the number of clock cycles required before wait is active and stable, following the
assertion of cs_n. That is:
t_WC = 3
Note
If a memory device is configured so that there are two or less clock cycles
between the assertion of wait and data being required then you must program tWC
as if the memory device is not wait-enabled.
2-39
Functional Overview
2-40
Chapter 3
Programmers Model
This chapter describes the registers of the SMC and provides information for
programming the device. It contains the following sections:
3-1
Programmers Model
3.1
[)(
60&
,QWHJUDWLRQWHVW
[(
60&8VHUFIJ
[
60&&KLSFIJ
[
60&0HP&FIJ
[
3-2
Programmers Model
3.2
Register summary
Figure 3-2 shows the SMC configuration register map.
VPFBUHIUHVKBSHULRGB
VPFBVHWBRSPRGH
VPFBVHWBF\FOHV
VPFBGLUHFWBFPG
VPFBPHPFBFIJBFOU
VPFBPHPFBFIJBVHW
VPFBPHPLIBFIJ
VPFBPHPFBVWDWXV
[
[
[
[
[&
[
[
[
&KLS
VPFBRSPRGHB
[
VPFBVUDPBF\FOHVB [
&KLS
VPFBRSPRGHB
[
VPFBVUDPBF\FOHVB [
&KLS
VPFBRSPRGHB
[
VPFBVUDPBF\FOHVB [
&KLS
VPFBRSPRGHB
[
VPFBVUDPBF\FOHVB [
3-3
Programmers Model
Note
Figure 3-3 on page 3-3 shows the maximum number of supported chips. If you intend
to use fewer, then the highest chip configuration blocks of the correct type are read back
as zero.
Figure 3-4 shows the SMC user configuration memory register map.
VPFBXVHUBFRQILJ
VPFBXVHUBVWDWXV
[
[
Figure 3-5 shows the SMC peripheral and PrimeCell configuration register map.
VPFBSFHOOBLGB
VPFBSFHOOBLGB
VPFBSFHOOBLGB
VPFBSFHOOBLGB
VPFBSHULSKBLGB
VPFBSHULSKBLGB
VPFBSHULSKBLGB
VPFBSHULSKBLGB
[))&
[))
[))
[))
[)(&
[)(
[)(
[)(
Figure 3-5 SMC peripheral and PrimeCell identification configuration register map
Base offset
Type
Reset value
Description
smc_memc_status
0x1000
RO
0x00000000
smc_memif_cfg
0x1004
RO
0x0000002D
smc_memc_cfg_set
0x1008
WO
N/A
smc_memc_cfg_clr
0x100C
WO
N/A
smc_direct_cmd
0x1010
WO
N/A
3-4
Programmers Model
Base offset
Type
Reset value
Description
smc_set_cycles
0x1014
WO
N/A
smc_set_opmode
0x1018
WO
N/A
smc_refresh_period_0
0x1020
R/W
0x00000000
smc_sram_cycles0_<0-3>
0x1000 + chip
configuration
base address
RO
0x0002B3CC
smc_opmode0_<0-3>
0x1004 + chip
RO
0x00000802
configuration
base address
smc_user_status
0x1200
RO
0x00000000
smc_user_config
0x1204
WO
smc_int_cfg
0x1E00
R/W
0x00000000
smc_int_inputs
0x1E04
RO
smc_int_outputs
0x1E08
WO
smc_periph_id_<0-3>
0x1FE0-0x1FEC
RO
See registers
smc_periph_id_n
See SMC Peripheral Identification Registers
<0-3> at 0x1FE0-0x1FEC on page 3-19.
smc_pcell_id_<0-3>
0x1FF0-0x1FFC
RO
See registers
smc_pcell_id_n
See SMC PrimeCell Identification Registers
<0-3> at 0x1FF0-0x1FFC on page 3-22.
3-5
Programmers Model
3.3
Register descriptions
This section describes the SMC registers.
3.3.1
8QGHILQHG
UDZBLQWBVWDWXV
5HVHUYHG
LQWBVWDWXV
5HVHUYHG
LQWBHQ
VWDWH
3-6
Bits
Name
Function
[31:6]
[5]
raw_int_status0
[4]
[3]
int_status0
[2]
[1]
int_en0
[0]
state
Programmers Model
3.3.2
8QGHILQHG
5HVHUYHG
H[FOXVLYHBPRQLWRUV
UHPDS
PHPRU\BZLGWK
PHPRU\BFKLSV
PHPRU\BW\SH
Name
Function
[31:18]
[17:16]
exclusive_monitors
Returns the number of exclusive access monitor resources that are implemented in the
SMC:
b00 = 0 monitors
b01 = 1 monitors
b10 = 2 monitors
b11 = 4 monitors.
[15:7]
[6]
remap0
[5:4]
memory_width0
Returns the maximum width of the SMC memory data bus for interface 0:
b00 = 8 bits
b01 = 16 bits
b10 = 32 bits
b11 = Reserved.
3-7
Programmers Model
Name
Function
[3:2]
memory_chips0
Returns the number of different chip selects that the memory interface 0 supports:
b00 = 1 chip
b01 = 2 chips
b10 = 3 chips
b11 = 4 chips.
[1:0]
memory_type0
3.3.3
8QGHILQHG
ORZBSRZHUBUHT
5HVHUYHG
LQWBHQDEOH
3-8
Programmers Model
3.3.4
Bits
Name
Function
[31:3]
[2]
low_power_req
b0 = no effect
b1 = request the SMC to enter Low-power state when it next becomes idle.
[1]
[0]
int_enable0
b0 = no effect
b1 = interrupt enable, memory interface 0.
8QGHILQHG
ORZBSRZHUBH[LW
5HVHUYHG
LQWBGLVDEOH
Bits
Name
Function
[31:3]
[2]
low_power_exit
b0 = no effect
b1 = request the SMC to exit Low-power state.
[1]
[0]
int_disable0
b0 = no effect
b1 = interrupt disable, memory interface 0.
3-9
Programmers Model
3.3.5
8QGHILQHG
$GGU
VHWBFUH
FPGBW\SH
FKLSBVHOHFW
Name
Function
[31:26]
[25:23]
chip_select
Selects chip configuration register bank to update and enables chip mode register access depending
on cmd_type. The encoding is:
b000-b011 = chip selects 1-4 on interface 0
b100-b111 = reserved.
[22:21]
cmd_type
[20]
set_cre
Maps to configuration register enable, smc_cre, output, when a ModeReg command is issued. The
encoding is:
b0 = smc_cre is LOW
b1 = smc_cre is HIGH when ModeReg write occurs.
[19:0]
addr
Bits mapped to external memory address bits [19:0] when command is ModeReg access.
Addr[19:16] are undefined.
Addr[15:0] matches wdata[15:0] when the commands are UpdateRegs and AHB command access.
3-10
Programmers Model
3.3.6
8QGHILQHG
6HWBW
6HWBW
6HWBW
6HWBW
6HWBW
6HWBW
6HWBW
Bits
Name
Function
[31:23]
[22:20]
Set_t6
Reserved.
[19:17]
Set_t5
Holding register for value to be written to the specific chip Register tTR field.
[16:14]
Set_t4
Holding register for value to be written to the specific chip Register tPC field.
[13:11]
Set_t3
Holding register for value to be written to the specific chip Register tWP field.
[10:8]
Set_t2
Holding register for value to be written to the specific chip Register tCEOE field.
[7:4]
Set_t1
Holding register for value to be written to the specific chip Register tWC field.
[3:0]
Set_t0
Holding register for value to be written to the specific chip Register tRC field.
3-11
Programmers Model
3.3.7
8QGHILQHG
VHWBEXUVWBDOLJQ
VHWBEOV
VHWBDGY
VHWBEDD
VHWBZUBEO
VHWBZUBV\QF
VHWBUGBEO
VHWBUGBV\QF
VHWBPZ
3-12
Programmers Model
Name
Function
[31:16]
[15:13]
set_burst_align
Holding register for value to be written to the specific SRAM chip opmode Register
burst_align field.
These bits determine whether memory bursts are split on memory burst boundaries:
000 = bursts can cross any address boundary
001 = burst split on memory burst boundary, that is, 32 beats for continuous
010 = burst split on 64 beat boundary
011 = burst split on 128 beat boundary
100 = burst split on 256 beat boundary
others = reserved.
Note
For asynchronous transfers:
the AHB MC always aligns read bursts to the memory burst boundary, when
set_rd_sync = 0
the AHB MC always aligns write bursts to the memory burst boundary, when
set_wr_sync = 0.
[12]
set_bls
Holding register for value to be written to the specific SRAM chip smc_opmode Register
byte lane strobe (bls) field. This bit affects the assertion of the byte-lane strobe outputs.
b0 = bls timing equals chip select timing. This is the default setting.
b1 = bls timing equals smc_we_n_0 timing. This setting is used for eight bit wide memories
that have no smc_bls_n_0[3:0] inputs. In this case the smc_bls_n_0[3:0] output of the
memory controller is connected to the smc_we_n_0 memory input.
[11]
set_adv
Holding register for the value to be written to the specific SRAM chip smc_opmode Register
address valid (adv) field. The memory uses the address advance signal smc_adv_n_0 when
set.
[10]
set_baa
Holding register for value to be written to the specific SRAM chip smc_opmode Register
Burst Address Advance (baa) field. The memory uses the smc_baa_n_0 signal when set.
3-13
Programmers Model
Name
Function
[9:7]
set_wr_bl
Holding register for value to be written to the specific SRAM chip smc_opmode Register bls
field.
Encodes the memory burst length:
b000 = 1 beat
b001 = 4 beats
b010 = 8 beats
b011 = 16 beats
b100 = 32 beats
b101 = continuous
b110-b111 = reserved.
[6]
set_wr_sync
Holding register for value to be written to the specific SRAM chip smc_opmode Register
wr_sync field. The memory writes are synchronous when set. This bit is reserved for a
NAND memory interface.
[5:3]
set_rd_bl
Holding register for value to be written to the specific SRAM chip smc_opmode Register bls
field.
Encodes the memory burst length:
b000 = 1 beat
b001 = 4 beats
b010 = 8 beats
b011 = 16 beats
b100 = 32 beats
b101 - continuous
b110-b111 = reserved.
[2]
set_rd_sync
Holding register before being written to the specific SRAM chip smc_opmode Register
rd_sync field. Memory in sync mode when set.
[1:0]
set_mw
Holding register for value to be written to the specific SRAM chip smc_opmode Register
memory width (mw) field.
Encodes the memory data bus width:
b00 = 8 bits
b01 = 16 bits
b10 = 32 bits
b11 = reserved.
You can program this to the configured width or half that width. See SMC Memory Interface
Configuration Register at 0x1004 on page 3-7.
3-14
Programmers Model
3.3.8
8QGHILQHG
SHULRG
Name
Function
[31:4]
[3:0]
period
Sets the number of consecutive memory bursts that are permitted, prior to the AHB MC deasserting
chip select to enable the PSRAM to initiate a refresh cycle. The options are:
b0000 = disables the insertion of idle cycles between consecutive bursts
b0001 = an idle cycle occurs after each burst
b0010 = an idle cycle occurs after 2 consecutive bursts
b0011 = an idle cycle occurs after 3 consecutive bursts
b0100 = an idle cycle occurs after 4 consecutive bursts
.
.
.
b1111 = an idle cycle occurs after 15 consecutive bursts.
3.3.9
8QGHILQHG
WBWU
WBSF
WBZS
WBFHRH
WBZF
WBUF
3-15
Programmers Model
3.3.10
Bits
Name
Function
[31:20]
[19:17]
t_tr
[16:14]
t_pc
[13:11]
t_wp
[10:8]
t_ceoe
[7:4]
t_wc
[3:0]
t_rc
DGGUHVVBPDWFK
DGGUHVVBPDVN
ZUBEO
UGBEO
PZ
EXUVWBDOLJQ
EOV
DGY
EDD
ZUBV\QF
UGBV\QF
3-16
Programmers Model
Name
Function
[31:24]
address_match
Returns the value of this tie-off. This is the comparison value for address bits [31:24] to
determine the chip that is selected.
[23:16]
address_mask
Returns the value of this tie-off. This is the mask for address bits[31:24] to determine the
chip that must be selected. A logic 1 indicates the bit is used for comparison.
[15:13]
burst_align
These bits determine whether memory bursts are split on memory burst boundaries:
000 = bursts can cross any address boundary
001 = burst split on memory burst boundary, that is, 32 beats for continuous
010 = burst split on 64 beat boundary
011 = burst split on 128 beat boundary
100 = burst split on 256 beat boundary
others = reserved.
Note
For asynchronous transfers:
the AHB MC always aligns read bursts to the memory burst boundary, when
rd_sync = 0
the AHB MC always aligns write bursts to the memory burst boundary, when
wr_sync = 0.
[12]
bls
[11]
adv
The memory uses the address advance signal smc_adv_n_0 when set.
[10]
baa
The memory uses the burst advance signal smc_baa_n_0 when set.
[9:7]
wr_bl
3-17
Programmers Model
Name
Function
[6]
wr_sync
[5:3]
rd_bl
[2]
rd_sync
[1:0]
mw
3.3.11
8QGHILQHG
VPFBXVHUBVWDWXV
3-18
Bits
Name
Function
[31:8]
[7:0]
smc_user_status
The value returns the state of the smc_user_status[7:0] primary input pins
Programmers Model
3.3.12
8QGHILQHG
VPFBXVHUBFRQILJ
3.3.13
Bits
Name
Function
[31:8]
[7:0]
smc_user_config
This value sets the state of the smc_user_config[7:0] primary output pins.
Bits
Name
Description
[31:25]
[24]
integration_cfg
[23:20]
[19:12]
designer
[11:0]
part_number
Identifies the peripheral. The part number for the SMC is 0x352.
3-19
Programmers Model
Figure 3-18 shows the correspondence between bits of the smc_ periph_id registers and
the conceptual 32-bit Peripheral ID Register.
$FWXDOUHJLVWHUELWDVVLJQPHQW
LQWHJUDWLRQBFIJ
GHVLJQHUB
UHYLVLRQ GHVLJQHUB
SDUWBQXPEHUB
8QGHILQHG
SDUWBQXPEHUB
UHYLVLRQ
LQWHJUDWLRQBFIJ
&RQFHSWXDOUHJLVWHUELWDVVLJQPHQW
8QGHILQHG
GHVLJQHU
SDUWBQXPEHU
3-20
Bits
Name
Function
[31:8]
[7:0]
part_number_0
Programmers Model
Name
Function
[31:8]
[7:4]
designer_0
[3:0]
part_number_1
Name
Function
[31:8]
[7:4]
revision
[3:0]
designer_1
Name
Function
[31:8]
[7:1]
[0]
integration_cfg
When set, the integration test register map at address offset 0xE00 is present for reading and
writing. If clear, the integration test registers have not been implemented.
3-21
Programmers Model
3.3.14
Value
Register
Bits
Description
smc_pcell_id_3
[31:8]
Read undefined
[31:24]
0xB1
smc_pcell_id_3
[7:0]
smc_pcell_id_2
[31:8]
Read undefined
[23:16]
0x05
smc_pcell_id_2
[7:0]
smc_pcell_id_1
[31:8]
Read undefined
[15:8]
0xF0
smc_pcell_id_1
[7:0]
smc_pcell_id_0
[31:8]
Read undefined
[7:0]
0x0D
smc_pcell_id_0
[7:0]
VPFBSFHOOBLGB
VPFBSFHOOBLGB
VPFBSFHOOBLGB
VPFBSFHOOBLGB
VPFBSFHOOBLGB
VPFBSFHOOBLGB
VPFBSFHOOBLGB
&RQFHSWXDOUHJLVWHUELWDVVLJQPHQW
3-22
Programmers Model
Name
Function
[31:8]
[7:0]
smc_pcell_id_0
Bits
Name
Function
[31:8]
[7:0]
smc_pcell_id_1
3-23
Programmers Model
Name
Function
[31:8]
[7:0]
smc_pcell_id_2
3-24
Bits
Name
Function
[31:8]
[7:0]
smc_pcell_id_3
Chapter 4
Programmers Model for Test
This chapter describes the additional logic for functional verification and production
testing. It contains the following section:
4-1
4.1
[(
[(
[(
4.1.1
Name
Base
offset
Type
Reset
value
Description
smc_int_cfg
0x1E00
R/W
0x0
smc_int_inputs
0x1E04
RO
smc_int_outputs
0x1E08
WO
8QGHILQHG
LQWBWHVWBHQ
4-2
Name
Function
[31:1]
Undefined
[0]
int_test_en
When set, outputs are driven from the integration test registers and tied-off, and inputs can change
for integration testing.
4.1.2
8QGHILQHG
VPFBPV\QF
VPFBDV\QF
VPFBHELEDFNRII
VPFBHELJQW
VPFBXVHBHEL
VPFBFV\VUHT
Bits
Name
Function
[31:6]
[5]
smc_msync0
[4]
smc_async0
[3]
smc_ebibackoff0
4-3
4.1.3
Bits
Name
Function
[2]
smc_ebignt0
[1]
smc_use_ebi
[0]
smc_csysreq
8QGHILQHG
VPFBHELUHT
VPFBFV\VDFN
VPFBFDFWLYH
4-4
Bits
Name
Function
[31:3]
[2]
smc_ebireq0
Sets the value of the smc_ebireq0 output when in integration test mode
[1]
smc_csysack
Sets the value of this external output when in integration test mode
[0]
smc_cactive
This value is driven onto the external output when int_test_en is set HIGH
Chapter 5
Device Driver Requirements
This chapter contains various flow diagrams to aid in the development of a software
driver for the SMC. It contains the following section:
5-1
5.1
Memory initialization
Figure 5-1 on page 5-3 and Figure 5-3 on page 5-5 shows the sequence of events that a
device driver must carry out to initialize the memory controller and a memory device to
ensure the configuration of both is synchronized.
Typically, PSRAM devices can have the mode register programmed using the address
bus only. NOR flash memory devices are examples of memory that requires mode
register accesses to be carried out using a sequence of accesses using the address and
data buses. Check the data sheet for the specific memory device you are configuring to
determine the configuration method.
5-2
6WDUW
,QLWLDOL]HYDULDEOHV
:ULWHWLPLQJLQIRUPDWLRQ
WRVPFBVHWBF\FOHV
KROGLQJ5HJLVWHU
3VHXGR&RGHIRUVPFBVHWBF\FOHV6XEURXWLQH
LQWVHWBF\FOHVWWWWWWW^
6KLIWHDFKSDUDPHWHUWRWKHFRUUHFWELWSRVLWLRQ
IRUH[DPSOH
VHWBF\FOHVBYDO W_W_W_
W_W_W_W
8SGDWHWKH60&VVHWBF\FOHVKROGLQJUHJLVWHU
IRUH[DPSOH
SOBDKEPF!VPFBVHWBF\FOHV VHWBF\FOHVBYDO
UHWXUQ
`
:ULWHRSHUDWLQJPRGH
LQIRUPDWLRQWR
VPFBVHWBRSPRGH
KROGLQJ5HJLVWHU
3VHXGR&RGHIRUVPFBVHWBRSPRGH6XEURXWLQH
LQWVPFBVHWBRSPRGHVHWBEXUVWBDOLJQVHWBE\WHBODQBVWUREH
HWF^
6KLIWHDFKSDUDPHWHUWRWKHFRUUHFWELWSRVLWLRQ
IRUH[DPSOH
VHWBRSPRGHBRSWLRQV VHWBEXUVWBDOLJQ_
VHWBE\WHBODQHBVWUREH_
8SGDWHWKH60&
VVHWBRSPRGHKROGLQJUHJLVWHU
IRUH[DPSOH
SOBDKEPF!VPFBVHWBRSPRGH VHWBRSPRGHBRSWLRQV
UHWXUQ
`
6KHHW
5-3
6KHHW
,V
PHPRU\GHYLFH
0RGH5HJDFFHVVHGE\
DGGUHVVDQGGDWD
RUDGGUHVV
RQO\"
$GGUHVVRQO\
$GGUHVVDQGGDWD
,VVXHDGLUHFWBFPGE\
ZULWLQJFRPPDQG
LQIRUPDWLRQWR
VPFBGLUHFWBFPG
5HJLVWHUWKDWPXVW
LQFOXGHWKHPDWFKGDWD
YDOXH
,VVXHDGLUHFWBFPG
E\ZULWLQJFRPPDQG
LQIRUPDWLRQWR
VPFBGLUHFWBFPG
5HJLVWHU
3VHXGR&RGHIRUVPFBGLUHFWBFPG6XEURXWLQH
LQWGLUHFWBFPGPHPBLIFKLSBVHOFPGBW\SHVHWBFUHGDWD
^
6KLIWHDFKSDUDPHWHUWRWKHFRUUHFWELWSRVLWLRQ
IRUH[DPSOH
GLUHFWBFPGBYDO PHPBLI_FKLSBVHO_
FPGBW\SH_VHWBFUH_
GDWD
8SGDWHWKH60&VGLUHFWBFPGUHJLVWHUIRUH[DPSOH
SOBDKEPF!VPFBGLUHFWBFPG GLUHFWBFPGBYDO
3HUIRUPWKHUHTXLUHG
VHTXHQFHRIPHPRU\
DFFHVVHVWKHODVW
DFFHVVFRQWDLQLQJWKH
PDWFKGDWDYDOXH
UHWXUQ
`
6KHHW
5-4
6KHHW
9HULI\
WKHQHZWLPLQJV
DQGRSHUDWLQJ
PRGH"
<HV
&KHFNIRUFRUUHFW
VPFBVUDPBF\FOHVB[
5HJLVWHUFRQWHQWV
1R
&KHFNIRUFRUUHFW
VPFBRSPRGHB[
5HJLVWHUFRQWHQWV
(QG
Where:
x = denotes the appropriate chip select.
5-5
5-6
Appendix A
Signal Descriptions
This appendix lists and describes the processor signals. It contains the following
sections:
A-1
Signal Descriptions
A.1
&ORFNV
DQG
UHVHWV
$+%
60&
WLHRIIV
$+%&
/RZ
SRZHU
LQWHUIDFH
&RQILJXUDWLRQ
VLJQDOV
where:
AHBC = AHB Configuration signals
A-2
Signal Descriptions
A.2
Name
Type
Source/
destination
Description
hclk
Input
Clock source
AHB clock
hresetn
Input
Reset source
smc_aclk
Input
Clock source
smc_mclk0
Input
Clock source
smc_mclk0n
Input
Clock source
smc_mreset0n
Input
Reset source
A-3
Signal Descriptions
A.3
AHB signals
Table A-2 lists the AHB signals.
Table A-2 AHB signals
Name
Type
Source/
destination
Description
hsel<x>
Input
AHB
haddr<x>[31:0]
Input
AHB
Address of transfer
htrans<x>[1:0]
Input
AHB
Transfer type
hwrite<x>
Input
AHB
hsize<x>[2:0]
Input
AHB
Size of transfer
hburst<x>[2:0]
Input
AHB
hprot<x>[3:0]
Input
AHB
Protection of transfer
hwdata<x>[31:0]
Input
AHB
Write data
hmastlock<x>
Input
AHB
Locked transfer
hready<x>
Input
AHB
System ready
hrdata<x>[31:0]
Output
AHB
Read data
hreadyout<x>
Output
AHB
Slave ready
hresp<x>[1:0]
Output
AHB
Slave response
where:
<x> = 0 or C, where C = Configuration.
A-4
Signal Descriptions
A.4
Name
Type
Source/
destination
Description
smc_fbclk_in_0
Input
Memory
smc_data_in_0[31:0]
Input
Memory
Data in
smc_wait_0
Input
Memory
Wait
smc_int_0
Input
Memory
Interrupt
smc_clk_out_0[3:0]
Output
Memory
Clock
smc_add_0[31:0]
Output
Memory
Address
smc_cs_n_0[3:0]
Output
Memory
Chip select
smc_we_n_0
Output
Memory
Write enable
smc_oe_n_0
Output
Memory
Output enable
smc_adv_n_0
Output
Memory
smc_baa_n_0
Output
Memory
Bank address
smc_cre_0
Output
Memory
smc_bls_n_0[3:0]
Output
Memory
smc_data_out_0[31:0]
Output
Memory
Data out
smc_data_en_0
Output
Memory
Data enable
smc_use_ebi
Input
Memory
smc_ebigrant0
Input
Memory
EBI grant
smc_ebibackoff0
Input
Memory
smc_ebireq0
Output
Memory
EBI request
A-5
Signal Descriptions
A.5
Name
Type
Source/
destination
Description
smc_async0
Input
Tie-off
smc_msync0
Input
Tie-off
smc_a_gt_m0_sync
Input
Tie-off
smc_address_mask0_0[7:0]
Input
Tie-off
smc_address_match0_0[7:0]
Input
Tie-off
smc_address_mask0_1[7:0]
Input
Tie-off
smc_address_match0_1[7:0]
Input
Tie-off
smc_address_mask0_2[7:0]
Input
Tie-off
smc_address_match0_2[7:0]
Input
Tie-off
smc_address_mask0_3[7:0]
Input
Tie-off
smc_address_match0_3[7:0]
Input
Tie-off
smc_remap_0
Input
Tie-off
Remap
smc_mux_mode_0
Input
Tie-off
Multiplexor mode
smc_sram_mw_0[1:0]
Input
Tie-off
smc_user_status[7:0]
Input
Tie-off
smc_user_config[7:0]
Output
System
smc_int
Output
System
Interrupt
A-6
Signal Descriptions
A.6
Low-power interface
Table A-5 lists the low-power interface signals.
Table A-5 Low-power interface signals
Name
Type
Source/
destination
Description
ahb_csysreq
Input
System controller
smc_csysreq
Input
System controller
ahb_csysack
Output
System controller
ahb_cactive
Output
System controller
smc_csysack
Output
System controller
smc_cactive
Output
System controller
SMC active
A-7
Signal Descriptions
A.7
Configuration signal
Table A-6 lists the configuration signal.
Table A-6 Configuration signal
A-8
Name
Type
Source/
destination
Description
big_endian
Input
Tie-off
Signal Descriptions
A.8
Scan chains
Table A-7 lists the scan chain signals.
Table A-7 Scan chain signals
Name
Type
Source/
destination
Description
se
Input
Scan chains
ahb_rst_bypass
Input
Scan chains
smc_rst_bypass
Input
Scan chains
smc_dft_en_clk_out
Input
Scan chains
si_hclk
Input
Scan chains
smc_si_aclk
Input
Scan chains
smc_si_mclk0
Input
Scan chains
smc_si_mclk0n
Input
Scan chains
smc_si_fbclk_in_0
Input
Scan chains
smc_si_int_0
Input
Scan chains
so_hclk
Output
Scan chains
smc_so_aclk
Output
Scan chains
smc_so_mclk0
Output
Scan chains
smc_so_mclk0n
Output
Scan chains
smc_so_fbclk_in_0
Output
Scan chains
smc_so_int_0
Output
Scan chains
A-9
Signal Descriptions
A-10
Glossary
This glossary describes some of the terms used in technical documents from ARM
Limited.
Advanced High-performance Bus (AHB)
A bus protocol with a fixed pipeline between address/control and data phases. It only
supports a subset of the functionality provided by the AMBA AXI protocol. The full
AMBA AHB protocol specification includes a number of features that are not
commonly required for master and slave IP developments and ARM Limited
recommends only a subset of the protocol is usually used. This subset is defined as the
AMBA AHB-Lite protocol.
See also Advanced Microcontroller Bus Architecture and AHB-Lite.
Advanced Microcontroller Bus Architecture (AMBA)
A family of protocol specifications that describe a strategy for the interconnect. AMBA
is the ARM open standard for on-chip buses. It is an on-chip bus specification that
describes a strategy for the interconnection and management of functional blocks that
make up a System-on-Chip (SoC). It aids in the development of embedded processors
with one or more CPUs or signal processors and multiple peripherals. AMBA
complements a reusable design methodology by defining a common backbone for SoC
modules.
Glossary-1
Glossary
A simpler bus protocol than AHB. It is designed for use with ancillary or
general-purpose peripherals such as timers, interrupt controllers, UARTs, and I/O ports.
Connection to the main system bus is through a system-to-peripheral bus bridge that
helps to reduce system power consumption.
AHB
Aligned
A data item stored at an address that is divisible by the number of bytes that defines the
data size is said to be aligned. Aligned words and halfwords have addresses that are
divisible by four and two respectively. The terms word-aligned and halfword-aligned
therefore stipulate addresses that are divisible by four and two respectively.
AMBA
APB
Beat
Alternative word for an individual transfer within a burst. For example, an INCR4 burst
comprises four beats.
See also Burst.
BE-8
BE-32
Big-endian
Byte ordering scheme in which bytes of decreasing significance in a data word are
stored at increasing addresses in memory.
See also Little-endian and Endianness.
Big-endian memory
Memory in which:
Glossary-2
Glossary
Byte
A signal that is used for unaligned or mixed-endian data accesses to determine the byte
lanes that are active in a transfer. One bit of this signal corresponds to eight bits of the
data bus.
Multi-master AHB
Typically a shared, not multi-layer, AHB interconnect scheme. More than one master
connects to a single AMBA AHB link. In this case, the bus is implemented with a set of
full AMBA AHB master interfaces. Masters that use the AMBA AHB-Lite protocol
must connect through a wrapper to supply full AMBA AHB master signals to support
multi-master operation.
Endianness
Byte ordering. The scheme that determines the order that successive bytes of a data
word are stored in memory. An aspect of the systems memory mapping.
See also Little-endian and Big-endian
Little-endian
Byte ordering scheme in which bytes of increasing significance in a data word are stored
at increasing addresses in memory.
See also Big-endian and Endianness.
Little-endian memory
Memory in which:
Glossary-3
Glossary
SBO
SBZ
SBZP
Scan chain
Should be written as 1 (or all 1s for bit fields) by software. Writing a 0 produces
Unpredictable results.
Should Be Zero (SBZ)
Should be written as 0 (or all 0s for bit fields) by software. Writing a 1 produces
Unpredictable results.
Should Be Zero or Preserved (SBZP)
Should be written as 0 (or all 0s for bit fields) by software, or preserved by writing the
same value back that has been previously read from the same field on the same
processor.
Unaligned
A data item stored at an address that is not divisible by the number of bytes that defines
the data size is said to be unaligned. For example, a word stored at an address that is not
divisible by four.
Undefined
Indicates an instruction that generates an Undefined instruction trap. See the ARM
Architecture Reference Manual for more information on ARM exceptions.
UNP
See Unpredictable.
Unpredictable
Means that the behavior of the ETM cannot be relied on. Such conditions have not been
validated. When applied to the programming of an event resource, only the output of
that event resource is Unpredictable.
Unpredictable behavior can affect the behavior of the entire system, because the ETM
is capable of causing the core to enter debug state, and external outputs can be used for
other purposes.
Unpredictable
Glossary-4
For reads, the data returned when reading from this location is unpredictable. It can have
any value. For writes, writing to this location causes unpredictable behavior, or an
unpredictable change in device configuration. Unpredictable instructions must not halt
or hang the processor, or any part of the system.
Glossary
Remapping
Changing the address of physical memory or devices after the application has started
executing. This is typically done to permit RAM to replace ROM when the initialization
has been completed.
Reserved
Glossary-5
Glossary
Glossary-6