OpenCores
URL https://opencores.org/ocsvn/rtcclock/rtcclock/trunk

Subversion Repositories rtcclock

[/] [rtcclock/] [trunk/] [doc/] [src/] [spec.tex] - Diff between revs 5 and 7

Show entire file | Details | Blame | View Log

Rev 5 Rev 7
Line 66... Line 66...
You should have received a copy of the GNU General Public License along
You should have received a copy of the GNU General Public License along
with this program.  If not, see \hbox{<http://www.gnu.org/licenses/>} for a
with this program.  If not, see \hbox{<http://www.gnu.org/licenses/>} for a
copy.
copy.
\end{license}
\end{license}
\begin{revisionhistory}
\begin{revisionhistory}
 
0.3 & 11/07/2015 & Gisselquist & RTC--Light, and RTC--GPS added\\\hline
0.2 & 7/11/2015 & Gisselquist & Date interface added\\\hline
0.2 & 7/11/2015 & Gisselquist & Date interface added\\\hline
0.1 & 5/25/2015 & Gisselquist & First Draft \\\hline
0.1 & 5/25/2015 & Gisselquist & First Draft \\\hline
\end{revisionhistory}
\end{revisionhistory}
% Revision History
% Revision History
% Table of Contents, named Contents
% Table of Contents, named Contents
Line 103... Line 104...
changes should run on any fundamental clock rate from about 66~kHz on up to
changes should run on any fundamental clock rate from about 66~kHz on up to
250~TeraHertz with varying levels of accuracy along the way.
250~TeraHertz with varying levels of accuracy along the way.
 
 
Distributed with this clock is a similar Real--Time Date module.  This
Distributed with this clock is a similar Real--Time Date module.  This
second module can track the day, month, and year while properly accounting
second module can track the day, month, and year while properly accounting
for varying days in each month and leap years, when they happen.
for varying days in each month and leap years, when they happen.  Also
 
distributed with the clock are a light version of the clock, offering no
 
LED nor seven segment display capability, and a GPS version, with an
 
interface allowing it to be synchronized to a GPS module.
 
 
Together, the clock and date module offer a fairly full feature set of
Together, the clock and date module offer a fairly full feature set of
capability: date, time, alarms, a countdown timer and a stopwatch, all
capability: date, time, alarms, a countdown timer and a stopwatch, all
features which are available from the wishbone bus.
features which are available from the wishbone bus.
 
 
Line 235... Line 239...
Further, as with the clock time, setting any particular field of the date to
Further, as with the clock time, setting any particular field of the date to
all ones, such as setting the month to {\tt 8'hff}, will cause that portion of
all ones, such as setting the month to {\tt 8'hff}, will cause that portion of
the date to retain it's current value.  In this way, one part of the date
the date to retain it's current value.  In this way, one part of the date
may be set and not others.
may be set and not others.
 
 
 
\section{RTC--Light}
 
The RTC Light module is nearly identical to the RTC clock module, save that
 
it has been simplified for environments that have neither LED outputs nor
 
seven segment display to drive.  Further, the time hack registers have been
 
replaced with read--only zero producing registers.  Further, if the high
 
order bit of the wishbone address is fixed to zero, the clock speed will no
 
longer be adjustable--reducing the logic even further.
 
 
 
This module is independent of the RTC clock module.
 
 
 
\section{RTC GPS}
 
As part of a GPS driven RTC solution, the RTC GPS module is provided.  This
 
module will use an externally provided PPS signal, one clock pulse wide and
 
synchronized with the system clock, as well as an externally provided
 
clock speed register.  It has no time hack capability.  Further, when the
 
external GPS valid line is true, these additional two inputs will drive the
 
clock.
 
 
 
Operating this clock requires a variety of external GPS circuitry: a clocked
 
PPS generator to generate both the PPS signal and the system clock speed
 
reference, and a serial port processor to read the GPS time from the
 
NMEA stream and to set the time value.  With these external circuits, this
 
clock will then have sub--millisecond accuracy.
 
 
\chapter{Registers}\label{chap:regs}
\chapter{Registers}\label{chap:regs}
This RTC clock module supports eight registers, as listed in
This RTC clock module supports eight registers, as listed in
Tbl.~\ref{tbl:reglist}.  Of these eight, the first four have been so placed
Tbl.~\ref{tbl:reglist}.  Of these eight, the first four have been so placed
as to be the more routine or user used registers, while the latter four are
as to be the more routine or user used registers, while the latter four are
more lower level.
more lower level.
Line 255... Line 283...
HACKCNTLO&7 & 32 & R & Wall clock time.\\\hline
HACKCNTLO&7 & 32 & R & Wall clock time.\\\hline
\end{reglist}\caption{List of Registers}\label{tbl:reglist}
\end{reglist}\caption{List of Registers}\label{tbl:reglist}
\end{center}\end{table}
\end{center}\end{table}
Each register will be discussed in detail in this chapter.
Each register will be discussed in detail in this chapter.
 
 
The Date module supports an additional register, listed in
The Date module supports its own register, listed in
Tbl.~\ref{tbl:datereg}.
Tbl.~\ref{tbl:datereg}.
\begin{table}[htbp]
\begin{table}[htbp]
\begin{center}
\begin{center}
\begin{reglist}
\begin{reglist}
DATE    & 0 & 32 & R/W & Calendar date register\\\hline
DATE    & 0 & 32 & R/W & Calendar date register\\\hline
Line 270... Line 298...
\section{Clock Time Register}
\section{Clock Time Register}
The various bit fields associated with the current time may be found in
The various bit fields associated with the current time may be found in
the {\tt CLOCK} register, shown in Tbl.~\ref{tbl:clockreg}.
the {\tt CLOCK} register, shown in Tbl.~\ref{tbl:clockreg}.
\begin{table}[htbp]\begin{center}
\begin{table}[htbp]\begin{center}
\begin{bitlist}
\begin{bitlist}
28--31 & R & Always return zero.\\\hline
26--31 & R & Always return zero.\\\hline
24--27 & R/W & Seven Segment Display Mode.\\\hline
24--25 & R/W & Seven Segment Display Mode.\\\hline
22--23 & R & Always return zero.\\\hline
22--23 & R & Always return zero.\\\hline
16--21 & R/W & Current time, BCD hours\\\hline
16--21 & R/W & Current time, BCD hours\\\hline
8--15 & R/W & Current time, BCD minutes\\\hline
8--15 & R/W & Current time, BCD minutes\\\hline
0--7 & R/W & Current time, BCD seconds\\\hline
0--7 & R/W & Current time, BCD seconds\\\hline
\end{bitlist}
\end{bitlist}
Line 287... Line 315...
of the various subcomponent registers will set that register, unless the
of the various subcomponent registers will set that register, unless the
write value is a 8'hff.  The behaviour of the clock when non--decimal
write value is a 8'hff.  The behaviour of the clock when non--decimal
values are written, other than all F's, is undefined.
values are written, other than all F's, is undefined.
 
 
Separate from the time, however, is the seven segment display mode.  Four
Separate from the time, however, is the seven segment display mode.  Four
values are currently supported: 4'h0 to display the hours and minutes,
values are currently supported: 2'h0 to display the hours and minutes,
4'h1 to display the timer in minutes and seconds, 4'h2 to display the
2'h1 to display the timer in minutes and seconds, 2'h2 to display the
stopwatch in lower order minutes, seconds, and sixteenths of a second, and
stopwatch in lower order minutes, seconds, and sixteenths of a second, and
4'h3 to display the minutes and seconds of the current time.  In all cases,
2'h3 to display the minutes and seconds of the current time.  In all cases,
the decimal point will appear to the right of the lowest order digit
the decimal point will appear to the right of the lowest order digit
and will blink with the second hand.  That is, the decimal will be high for
and will blink with the second hand.  That is, the decimal will be high for
the second half of any second, and low at the top of the second.
the second half of any second, and low at the top of the second.
 
 
 
In the case of the RTC light, the seven segment display controller bits have
 
been wired to zeros.
 
 
 
In the case of the RTC modified for GPS, the most significant bit \#31 has
 
been modified to produce a zero if the GPS lock signal is true, or a one
 
for an error condition.
 
 
\section{Countdown Timer Register}
\section{Countdown Timer Register}
The countdown timer register, whose bit--wise values are shown in
The countdown timer register, whose bit--wise values are shown in
Tbl.~\ref{tbl:timer},
Tbl.~\ref{tbl:timer},
\begin{table}[htbp]
\begin{table}[htbp]
\begin{center}
\begin{center}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.