Professional Documents
Culture Documents
Real Time Clock (RTC) : Technical Data Sheet
Real Time Clock (RTC) : Technical Data Sheet
Technical Clock
Data Sheet(RTC)
February 2007
i
Real Time Clock (RTC)
©2003 Cadence Design Systems Inc. All rights reserved
Proprietary Notice
In the U.S. and numerous other countries, Cadence and the Cadence logo are registered
trademarks and Cadence Design Foundry is a trademark of Cadence Design Systems, Inc.
All other products or services mentioned herein may be 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 owner.
The product described in this document is subject to continuous developments and
improvements and is supplied "AS IS". All warranties implied or expressed including but not
limited to implied warranties or merchantability, or fitness for purpose, are excluded.
Cadence Design Foundry, Inc 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. Cadence Design Foundry products are not authorized for use as
critical components in life support devices or systems without the express written approval of
an authorised officer of Cadence Design Foundry, Inc. As used herein:
1. Life support devices or systems are devices of systems that are (a) intended for surgical
implant into the body or (b) support or sustain life, and whose failure to perform, when
properly used in accordance with instructions for use provided in the labeling, can be
reasonably expected to result in a significant injury to the user.
2. A critical component is any component of a life support device or system or system
whose failure to perform can reasonably be expected to cause the failure of the life
support device or system, or to affect its safety or effectiveness.
Features
• Uses the AMBA APB protocol, version 2.0
• Complete time of day clock: 12/24 hour, hours, minutes, seconds and hundredths
• Calendar function: day of week, date of month, month, year, century, leap year
compensation, and year 2000 compliant.
• Alarm function: month, date, hour, minute, second and hundredths resolution
• Event function: can set interrupt for every roll over of month, day, hour, minute,
second or hundredth-second
• Speed of Operation: APB clock domain 100 MHz in a typical 0.25 µm technology;
counter clock speed of 100 Hz or 1 Hz (compile option)
• Power down mode with standby_pclk clock option
• Optional byte addressing mode for APB
• Time and calendar registers available as core outputs with associated changed
indicator.
Description
The Real Time Clock (RTC) module keeps track of time of day, to an accuracy of one
hundredth of a second (with 100 Hz clock - one second with 1 Hz clock), and has calendar
functionality keeping track of the day, month and year. The RTC comprises of a binary coded
decimal counter with the following data:
• Year from 1900 to 2999
• Month from 1 to 12
• Date from 1 to 28, 29, 30 or 31 (as a function of month and year)
• Day of week from 1 to 7 (mapping to date is not fixed)
• Hour from 0 to 23, or from 1 to 12 with the AM/PM flag set
• Minute from 0 to 59
• Second from 0.00 to 59.99 (or 0 to 59 with 1Hz clock)
An alarm register allows comparison of month, date, hour, minute, second and
hundredth-second. Each of these may be masked (that is forced to equality), so that, for
example, an alarm can be generated at 12:37 on the 15th of every month. An interrupt can be
generated on an alarm event.
Event detection is also available. This will generate an interrupt every time the time or
calendar register rolls over into a new month, date, hour, minute, second or
hundredth-second.
Signal Interfaces
The RTC module has the following signal interfaces:
• RTC control, clock and interrupt signals
• AMBA Advanced Peripheral Bus (APB) slave interface (32-bit and 8-bit
configurations available)
• Power on, APB and RTC reset signals
• Time and calendar register outputs
The APB interface fully conforms to the ARM AMBA Revision 2.0 specification.
clk_cnt rtc_int
rtc_changed
standby_pclk Real Time Clock
time_o
calendar_o
AMBA APB
RTC Signals
Signal Name I/O Description
clk_cnt I 100 Hz or 1Hz clock for counter (compile option)
standby_pclk I Standby clock for power-down operation
rtc_int O Interrupt from Real Time Clock.
time_o O Time value
31: reserved
30: Indicates PM in 12-hour mode
29:24: Hours (2-digit BCD)
23:16: Minutes (2-digit BCD)
15:08: Seconds (2-digit BCD)
07:00: Hundredths of seconds (2-digit BCD)
calendar_o O Calendar value
31:16: Year (4-digit BCD)
15:08: Day (of month – 2-digit BCD)
07:03: Month (2-digit BCD)
02:00: Day (of week – mapping is programmable)
rtc_changed O Time and calendar register have changed (either by counting
or set)
penable
psel
paddr
pwrite
prdata
clk_cnt
Note: The number of cycles between time and counter outputs changing and the
assertion of rtc_changed (N1) and the number of cycles for which rtc_changed
is asserted (N2) are compile-time parameters.
Parameter Description Min Max Unit
Tclk Clock period, T0 5 See ns
Note
Tohint Interrupt, time, calendar hold after pclk 0.1 - ns
Tovint Interrupt, time, calendar valid after pclk - 30% × T0
Note: The maximum period for standby_pclk is such that there must be >2+N1+N2
cycles of standby_pclk for each cycle of clk_cnt.
pclk
n_p_reset
psel
AMBA APB
penable Slave prdata
Interface
pwrite
paddr
pwdata
The following characteristics have been set as the default values for the synthesis of the
module:
Tclk
pclk
Tihpen
Tispen
penable
Tispsel Tihpsel
psel
Tispa Tihpa
paddr
Tispw Tihpw
pwrite
Tispwd Tihpwd
pwdata
Tohprd
prdata
Tovprd
Note 1: All timings are specified relative to the target clock period, T0. These are coded
into the synthesis script provided. These timings have been achieved with a
typical 0.13 µm technology, but are for guidance only.
Note 2: pclk must be either synchronous to standby_pclk and of the same frequency
and phase, or it may be stopped.
Reset Signals
n_rtc_reset
n_p_reset n_rtc_reset_out
RTC
n_pon_reset
Note 2: Clock tree insertion can be performed on the reset line when n_rtc_reset_out
is connected to n_rtc_reset.
Programming Interface
Each register address is defined by an offset in paddr[7:0] as in the table below. External
circuitry is required to generate psel as the required decode of paddr[31:8].
Register Map
Offset Name Access Description
0x0000 Control RW Start and stop timing and calendar
0x0004 12/24 hour RW Set 12/24 hour mode
0x0008 Time RW Contains time values and data valid flag
0x0008~
0x000B
0x000C Calendar RW Contains date values and data valid flag
0x000C
~0x000F
0x0010 Time alarm RW Contains time values for alarm
0x0010~
0x0013
0x0014 Calendar RW Contains date values for alarm
0x0014~ alarm
0x0017
Note 2: When the 1 Hz clock input option is compiled, the hundredth of a second fields are
reserved. This applies to all registers with hundredths fields.
Note 3: In byte-addressing mode, registers with more than 8 actively used bits are
allocated several addresses. paddr[1:0] is used to address the byte within the
register.
Physical Estimates
The figures below have been achieved in synthesis to a standard 0.13 µm technology.
Gate count 4000 2i/p NAND equivalents
FF count 120~135 FFs clocked by pclk
109~119 FFs clocked by standby_pclk
Power 27 µW at 200 MHz in standby-mode
770 nW at 32 kHz in standby-mode
SOC-Internal pins (in) 50
SOC-Internal pins (out) 36
SOC-External pins (in) 1
SOC-External pins (out) None
Verification
All our IP modules are verified to one of the following levels.
• Gold IP has been to target silicon.
• Silver IP has been to silicon in FPGA.
• Bronze IP has been verified in simulation with logical timing closure.
• In development IP has not yet been verified.
Please contact the IPGallery™ (ipgallery@cadence.com) for the latest verification
information.
Deliverables
The full IP package comes complete with:
• Verilog HDL
• Cadence RTL Compiler synthesis scripts with SDC constraints
• Verilog testbench
• RTC User’s Guide with full programming interface, parameterization instructions and
synthesis instructions.