% The Potato Processor - User's Manual
|
% The Potato Processor - User's Manual
|
% (c) Kristian Klomsten Skordal 2015 <skordal@opencores.org>
|
% (c) Kristian Klomsten Skordal 2015 <skordal@opencores.org>
|
% Report bugs and issues on <http://opencores.org/project,potato,bugtracker>
|
% Report bugs and issues on <http://opencores.org/project,potato,bugtracker>
|
|
|
\documentclass[12pt,a4paper]{report}
|
\documentclass[12pt,a4paper]{report}
|
|
|
\usepackage[utf8]{inputenc}
|
\usepackage[utf8]{inputenc}
|
\usepackage[pdftitle={The Potato Processor: Technical Reference Manual},
|
\usepackage[pdftitle={The Potato Processor: Technical Reference Manual},
|
pdfauthor={Kristian Klomsten Skordal}]{hyperref}
|
pdfauthor={Kristian Klomsten Skordal}]{hyperref}
|
\usepackage{placeins}
|
\usepackage{placeins}
|
\usepackage{titlesec}
|
\usepackage{titlesec}
|
\usepackage[english]{babel}
|
\usepackage[english]{babel}
|
|
|
\newcommand{\register}[1]{\textsc{#1}}
|
\newcommand{\register}[1]{\textsc{#1}}
|
|
|
\titleformat{\chapter}[block]{\normalfont\huge\bfseries}{\thechapter}{20pt}{\Huge}\titlespacing*{\chapter}{0pt}{50pt}{40pt}
|
\titleformat{\chapter}[block]{\normalfont\huge\bfseries}{\thechapter}{20pt}{\Huge}\titlespacing*{\chapter}{0pt}{50pt}{40pt}
|
|
|
\begin{document}
|
\begin{document}
|
|
|
\begin{titlepage}
|
\begin{titlepage}
|
\begin{center}
|
\begin{center}
|
\vspace*{3cm}
|
\vspace*{3cm}
|
{\large The Potato Processor}\\[0.5cm]
|
{\large The Potato Processor}\\[0.5cm]
|
{\Huge\bf Technical Reference Manual}\\[6cm]
|
{\Huge\bf Technical Reference Manual}\\[6cm]
|
|
|
\textsc{Kristian Klomsten Skordal}\\\href{mailto:skordal@opencores.org}{skordal@opencores.org}\\[3em]
|
\textsc{Kristian Klomsten Skordal}\\\href{mailto:skordal@opencores.org}{skordal@opencores.org}\\[3em]
|
|
|
\vfill
|
\vfill
|
{Project page:\\\url{http://opencores.org/project,potato}}\\[0.2em]
|
{Project page:\\\url{http://opencores.org/project,potato}}\\[0.2em]
|
{Report bugs and issues on\\\url{http://opencores.org/project,potato,bugtracker}}\\[1.2em]
|
{Report bugs and issues on\\\url{http://opencores.org/project,potato,bugtracker}}\\[1.2em]
|
{\small Updated \today}
|
{\small Updated \today}
|
\end{center}
|
\end{center}
|
\end{titlepage}
|
\end{titlepage}
|
|
|
\tableofcontents
|
\tableofcontents
|
|
|
\chapter{Introduction}
|
\chapter{Introduction}
|
|
|
The Potato processor is an implementation of the 32-bit integer subset of the RISC-V
|
The Potato processor is an implementation of the 32-bit integer subset of the RISC-V
|
instruction set v2.0. It is designed around a standard 5-stage pipeline. All instructions
|
instruction set v2.0. It is designed around a standard 5-stage pipeline. All instructions
|
execute in 1 cycle, with the exception of load and store instructions when the processor
|
execute in 1 cycle, with the exception of load and store instructions when the processor
|
has to wait for external memory.
|
has to wait for external memory.
|
|
|
The processor has been tested on an Artix~7 (xc7a100tcsg324-1) FPGA from Xilinx, on the
|
The processor has been tested on an Artix~7 (xc7a100tcsg324-1) FPGA from Xilinx, on the
|
Nexys 4 board from Digilent. More details about the test design can be found in chapter
|
Nexys 4 board from Digilent. More details about the test design can be found in chapter
|
\ref{cha:quickstart}.
|
\ref{cha:quickstart}.
|
|
|
\section{Features}
|
\section{Features}
|
Here is a highlight of the current features of the Potato processor:
|
Here is a highlight of the current features of the Potato processor:
|
|
|
\begin{itemize}
|
\begin{itemize}
|
\item Implements the complete 32-bit integer subset of the RISC-V ISA v2.0.
|
\item Implements the complete 32-bit integer subset of the RISC-V ISA v2.0.
|
\item Implements the \textsc{csr*} instructions from the RISC-V supervisor extensions v1.0.
|
\item Implements the \textsc{csr*} instructions from the RISC-V supervisor extensions v1.0.
|
\item Supports using the \register{fromhost}/\register{tohost} registers for communicating
|
\item Supports using the \register{fromhost}/\register{tohost} registers for communicating
|
with a host environment, such as a simulator, or peripherals.
|
with a host environment, such as a simulator, or peripherals.
|
\item Supports exception handling, with support for 8 individually maskable IRQ inputs.
|
\item Supports exception handling, with support for 8 individually maskable IRQ inputs.
|
\item Includes a wishbone B4 compatible interface.
|
\item Includes a wishbone B4 compatible interface.
|
\end{itemize}
|
\end{itemize}
|
|
|
\section{Planned features}
|
\section{Planned features}
|
Here is a highlight of the future planned features of the Potato processor:
|
Here is a highlight of the future planned features of the Potato processor:
|
|
|
\begin{itemize}
|
\begin{itemize}
|
\item Caches.
|
\item Caches.
|
\item Branch prediction.
|
\item Branch prediction.
|
\item Hardware multiplication and division support (the RISC-V M extension).
|
\item Hardware multiplication and division support (the RISC-V M extension).
|
\item Compressed instruction support (the RISC-V C extension).
|
\item Compressed instruction support (the RISC-V C extension).
|
\item Supervisor mode support
|
\item Supervisor mode support
|
\end{itemize}
|
\end{itemize}
|
|
|
\chapter{Quick Start Guide}
|
\chapter{Quick Start Guide}
|
\label{cha:quickstart}
|
\label{cha:quickstart}
|
|
|
This chapter contains instructions on getting started with the demo/example design that is
|
This chapter contains instructions on getting started with the demo/example design that is
|
included in the Potato source distribution. The example design targets the Nexys 4 board
|
included in the Potato source distribution. The example design targets the Nexys 4 board
|
available from Digilent\footnote{See \url{http://www.digilentinc.com/Products/Detail.cfm?Prod=NEXYS4}}.
|
available from Digilent\footnote{See \url{http://www.digilentinc.com/Products/Detail.cfm?Prod=NEXYS4}}.
|
|
|
\section{Setting up the Vivado Project}
|
\section{Setting up the Vivado Project}
|
|
|
Start by creating a new project in Vivado. Import all source files from the \texttt{src/} directory,
|
Start by creating a new project in Vivado. Import all source files from the \texttt{src/} directory,
|
which contains all source files required for using the processor. Then import all source files from
|
which contains all source files required for using the processor. Then import all source files from
|
the \texttt{example/} directory, which contains the toplevel setup for the example SoC design,
|
the \texttt{example/} directory, which contains the toplevel setup for the example SoC design,
|
and from the \texttt{soc/} directory, which contains various peripherals for the processor.
|
and from the \texttt{soc/} directory, which contains various peripherals for the processor.
|
|
|
\section{Adding IP Modules}
|
\section{Adding IP Modules}
|
|
|
The example design requires two additional IP modules. These are not included in the source
|
The example design requires two additional IP modules. These are not included in the source
|
distribution and must be added separately.
|
distribution and must be added separately.
|
|
|
\subsection{Clock Generator}
|
\subsection{Clock Generator}
|
|
|
Add a clock generator using the Clocking Wizard. Name the component ``\texttt{clock\_generator}''
|
Add a clock generator using the Clocking Wizard. Name the component ``\texttt{clock\_generator}''
|
and make sure that the checkboxes for ``frequency synthesis'' and ``safe clock startup'' are
|
and make sure that the checkboxes for ``frequency synthesis'' and ``safe clock startup'' are
|
selected.
|
selected.
|
|
|
Add two output clocks with frequencies of 50~MHz and 10~MHz. Rename the corresponding ports
|
Add two output clocks with frequencies of 50~MHz and 10~MHz. Rename the corresponding ports
|
to ``\texttt{system\_clk}'' and ``\texttt{timer\_clk}''. Rename the input clock signal to
|
to ``\texttt{system\_clk}'' and ``\texttt{timer\_clk}''. Rename the input clock signal to
|
``\texttt{clk}''.
|
``\texttt{clk}''.
|
|
|
The added module should appear in the hierarchy under the toplevel module as ``\texttt{clkgen}''.
|
The added module should appear in the hierarchy under the toplevel module as ``\texttt{clkgen}''.
|
|
|
\subsection{Instruction memory}
|
\subsection{Instruction memory}
|
|
|
Add a block RAM to use for storing the test application using the Block Memory Generator.
|
Add a block RAM to use for storing the test application using the Block Memory Generator.
|
Choose ``Single-port ROM'' as memory type and name the module ``\texttt{instruction\_rom}''.
|
Choose ``Single-port ROM'' as memory type and name the module ``\texttt{instruction\_rom}''.
|
Set port A width to 32 bits and the depth to 2048 words. Initialize the block RAM with
|
Set port A width to 32 bits and the depth to 2048 words. Initialize the block RAM with
|
your application or use one of the provided benchmarks, such as the SHA256 benchmark,
|
your application or use one of the provided benchmarks, such as the SHA256 benchmark,
|
which, when built, produces a \texttt{.coe} file that can be used for this purpose.
|
which, when built, produces a \texttt{.coe} file that can be used for this purpose.
|
|
|
Note that in order to build a benchmark application, you have to install a RISC-V toolchain.
|
Note that in order to build a benchmark application, you have to install a RISC-V toolchain.
|
See section \ref{sec:toolchain} for instructions on how to accomplish this.
|
See section \ref{sec:toolchain} for instructions on how to accomplish this.
|
|
|
\section{Running an Example Application}
|
\section{Running an Example Application}
|
|
|
Assuming you initialized the instruction memory with the SHA256 benchmark, synthesize and
|
Assuming you initialized the instruction memory with the SHA256 benchmark, synthesize and
|
implement the design, generate a bitfile and load it into the FPGA. Using a serial port
|
implement the design, generate a bitfile and load it into the FPGA. Using a serial port
|
application, such as \texttt{minicom}, watch as the number of hashes per second are
|
application, such as \texttt{minicom}, watch as the number of hashes per second are
|
printed to the screen and rejoice because it works!
|
printed to the screen and rejoice because it works!
|
|
|
\chapter{Instantiating}
|
\chapter{Instantiating}
|
|
|
The Potato processor can be used either with or without a wishbone interface. Using the wishbone
|
The Potato processor can be used either with or without a wishbone interface. Using the wishbone
|
interface allows the processor to communicate with other wishbone-compatible peripherals. However,
|
interface allows the processor to communicate with other wishbone-compatible peripherals. However,
|
if no such peripherals are to be used, the processor can, for instance, be connected directly to
|
if no such peripherals are to be used, the processor can, for instance, be connected directly to
|
block RAM memories for full performance without needing to use caches.
|
block RAM memories for full performance without needing to use caches.
|
|
|
\section{Customizing the Processor Core}
|
\section{Customizing the Processor Core}
|
The processor can be customized using generics. The following list details the parameters
|
The processor can be customized using generics. The following list details the parameters
|
that can be changed:
|
that can be changed:
|
|
|
\begin{description}
|
\begin{description}
|
\item[\texttt{PROCESSOR\_ID}:] Any 32-bit value used as the processor ID. This value can
|
\item[\texttt{PROCESSOR\_ID}:] Any 32-bit value used as the processor ID. This value can
|
be read back from the hardware thread ID register, \register{hartid}.
|
be read back from the hardware thread ID register, \register{hartid}.
|
\item[\texttt{RESET\_ADDRESS}:] Any 32-bit value used as the address of the first instruction
|
\item[\texttt{RESET\_ADDRESS}:] Any 32-bit value used as the address of the first instruction
|
fetched by the processor after it has been reset.
|
fetched by the processor after it has been reset.
|
\end{description}
|
\end{description}
|
|
|
\section{Instantiating in a Wishbone System}
|
\section{Instantiating in a Wishbone System}
|
\label{sec:instantiating-wishbone}
|
\label{sec:instantiating-wishbone}
|
|
|
In order to integrate the Potato processor into a wishbone-based system, the module \texttt{pp\_potato}
|
In order to integrate the Potato processor into a wishbone-based system, the module \texttt{pp\_potato}
|
is used. It provides signals for the wishbone master interface, prefixed with \texttt{wb\_}, and
|
is used. It provides signals for the wishbone master interface, prefixed with \texttt{wb\_}, and
|
inputs for interrupts and the HTIF interface.
|
inputs for interrupts and the HTIF interface.
|
|
|
The specifics of the wishbone interface is listed in table \ref{tab:wishbone}. To see an example
|
The specifics of the wishbone interface is listed in table \ref{tab:wishbone}. To see an example
|
of the processor used in a Wishbone system, see the example design under the \texttt{example/}
|
of the processor used in a Wishbone system, see the example design under the \texttt{example/}
|
directory.
|
directory.
|
|
|
\begin{table}
|
\begin{table}
|
\centering
|
\centering
|
\begin{tabular}{|l|l|}
|
\begin{tabular}{|l|l|}
|
\hline
|
\hline
|
Wishbone revision & B4 \\
|
Wishbone revision & B4 \\
|
Interface type & Master \\
|
Interface type & Master \\
|
Address port width & 32 bits \\
|
Address port width & 32 bits \\
|
Data port width & 32 bits \\
|
Data port width & 32 bits \\
|
Data port granularity & 8 bits \\
|
Data port granularity & 8 bits \\
|
Maximum operand size & 32 bits \\
|
Maximum operand size & 32 bits \\
|
Endianess & Little endian \\
|
Endianess & Little endian \\
|
Sequence of data transfer & Not specified \\
|
Sequence of data transfer & Not specified \\
|
\hline
|
\hline
|
\end{tabular}
|
\end{tabular}
|
\caption{Wishbone Interface Specifics}
|
\caption{Wishbone Interface Specifics}
|
\label{tab:wishbone}
|
\label{tab:wishbone}
|
\end{table}
|
\end{table}
|
|
|
\FloatBarrier
|
\FloatBarrier
|
|
|
\section{Instantiating in a Standalone System}
|
\section{Instantiating in a Standalone System}
|
\label{sec:instantiating-standalone}
|
\label{sec:instantiating-standalone}
|
|
|
The processor can also be used without connecting it to the Wishbone bus. An example
|
The processor can also be used without connecting it to the Wishbone bus. An example
|
of this can be seen in the processor testbench, \texttt{tb\_processor.vhd}.
|
of this can be seen in the processor testbench, \texttt{tb\_processor.vhd}.
|
|
|
\section{Verifying}
|
\section{Verifying}
|
|
|
The processor provides an automatic testing environment for verifying that the processor
|
The processor provides an automatic testing environment for verifying that the processor
|
correctly executes the instructions of the ISA. The tests have been extracted from the
|
correctly executes the instructions of the ISA. The tests have been extracted from the
|
official test suite available at \url{https://github.com/riscv/riscv-tests} and covers
|
official test suite available at \url{https://github.com/riscv/riscv-tests} and covers
|
most of the available instructions.
|
most of the available instructions.
|
|
|
Two testbenches are used to execute the test programmes: \texttt{tb\_processor.vhd}, in
|
Two testbenches are used to execute the test programmes: \texttt{tb\_processor.vhd}, in
|
which the processor is directly connected to block-RAM-like memories so the processor
|
which the processor is directly connected to block-RAM-like memories so the processor
|
never stalls to wait for memory operations to finish (see section \ref{sec:instantiating-standalone}
|
never stalls to wait for memory operations to finish (see section \ref{sec:instantiating-standalone}
|
for more details about this kind of setup), and \texttt{tb\_soc.vhd}, which models a
|
for more details about this kind of setup), and \texttt{tb\_soc.vhd}, which models a
|
simple system-on-chip with the processor connected to memories through the
|
simple system-on-chip with the processor connected to memories through the
|
wishbone interface (see section \ref{sec:instantiating-wishbone} for more information
|
wishbone interface (see section \ref{sec:instantiating-wishbone} for more information
|
about this kind of setup).
|
about this kind of setup).
|
|
|
To run the test suites, run \texttt{make run-tests} or \texttt{make run-soc-tests}.
|
To run the test suites, run \texttt{make run-tests} or \texttt{make run-soc-tests}.
|
|
|
Make sure that \texttt{xelab} and \texttt{xsim} is in your \texttt{PATH} or the
|
Make sure that \texttt{xelab} and \texttt{xsim} is in your \texttt{PATH} or the
|
tests will fail.
|
tests will fail.
|
|
|
\chapter{Programming}
|
\chapter{Programming}
|
|
|
The processor implements the RISC-V instruction set, and can be programmed with tools
|
The processor implements the RISC-V instruction set, and can be programmed with tools
|
such as GCC.
|
such as GCC.
|
|
|
\section{Building a RISC-V Toolchain}
|
\section{Building a RISC-V Toolchain}
|
\label{sec:toolchain}
|
\label{sec:toolchain}
|
|
|
An ``official'' toolchain is provided by the RISC-V project. In order to install it, clone
|
An ``official'' toolchain is provided by the RISC-V project. In order to install it, clone
|
the ``riscv-tools'' Git repository from \url{https://github.com/riscv/riscv-tools} and follow
|
the ``riscv-tools'' Git repository from \url{https://github.com/riscv/riscv-tools} and follow
|
the instructions provided by the README file.
|
the instructions provided by the README file.
|
|
|
\section{Control and Status Registers}
|
\section{Control and Status Registers}
|
|
|
The supported control and status registers are shown in table \ref{tab:csr_list}. The registers
|
The supported control and status registers are shown in table \ref{tab:csr_list}. The registers
|
can be manipulated using the \textsc{csr*} family of instructions, listed in \ref{sec:csr_instrs}.
|
can be manipulated using the \textsc{csr*} family of instructions, listed in \ref{sec:csr_instrs}.
|
|
|
\begin{table}
|
\begin{table}
|
\centering
|
\centering
|
\begin{tabular}{|l|l|l|}
|
\begin{tabular}{|l|l|l|}
|
\hline
|
\hline
|
\textbf{Name} & \textbf{ID} & \textbf{Description} \\
|
\textbf{Name} & \textbf{ID} & \textbf{Description} \\
|
\hline
|
\hline
|
\register{hartid} & 0x50b & Hardware thread ID \\
|
\register{hartid} & 0x50b & Hardware thread ID \\
|
\register{evec} & 0x508 & Exception vector address \\
|
\register{evec} & 0x508 & Exception vector address \\
|
\register{epc} & 0x502 & Return address for exceptions \\
|
\register{epc} & 0x502 & Return address for exceptions \\
|
\register{cause} & 0x509 & Exception cause \\
|
\register{cause} & 0x509 & Exception cause \\
|
\register{sup0} & 0x500 & Support register 0, for operating system use \\
|
\register{sup0} & 0x500 & Support register 0, for operating system use \\
|
\register{sup1} & 0x501 & Support register 1, for operating system use \\
|
\register{sup1} & 0x501 & Support register 1, for operating system use \\
|
\register{badvaddr} & 0x503 & Bad address, used for invalid address exceptions \\
|
\register{badvaddr} & 0x503 & Bad address, used for invalid address exceptions \\
|
\register{status} & 0x50a & Processor status and control register \\
|
\register{status} & 0x50a & Processor status and control register \\
|
\register{tohost} & 0x51e & Register for sending data to a host system \\
|
\register{tohost} & 0x51e & Register for sending data to a host system \\
|
\register{fromhost} & 0x51f & Register where data received from a host system is stored \\
|
\register{fromhost} & 0x51f & Register where data received from a host system is stored \\
|
\register{cycle} & 0xc00 & Cycle counter, low 32 bits \\
|
\register{cycle} & 0xc00 & Cycle counter, low 32 bits \\
|
\register{cycleh} & 0xc80 & Cycle counter, high 32 bits \\
|
\register{cycleh} & 0xc80 & Cycle counter, high 32 bits \\
|
\register{time} & 0xc01 & Timer tick counter, low 32 bits \\
|
\register{time} & 0xc01 & Timer tick counter, low 32 bits \\
|
\register{timeh} & 0xc81 & Timer tick counter, high 32 bits \\
|
\register{timeh} & 0xc81 & Timer tick counter, high 32 bits \\
|
\register{instret} & 0xc02 & Retired instruction counter, low 32 bits \\
|
\register{instret} & 0xc02 & Retired instruction counter, low 32 bits \\
|
\register{instreth} & 0xc82 & Retired instruction counter, high 32 bits \\
|
\register{instreth} & 0xc82 & Retired instruction counter, high 32 bits \\
|
\hline
|
\hline
|
\end{tabular}
|
\end{tabular}
|
\caption{List of Control and Status Registers}
|
\caption{List of Control and Status Registers}
|
\label{tab:csr_list}
|
\label{tab:csr_list}
|
\end{table}
|
\end{table}
|
\FloatBarrier
|
\FloatBarrier
|
|
|
\chapter{Instruction Set}
|
\chapter{Instruction Set}
|
|
|
The Potato processor is designed to support the full 32-bit integer subset of
|
The Potato processor is designed to support the full 32-bit integer subset of
|
the RISC-V instruction set, version 2.0. The ISA documentation is available
|
the RISC-V instruction set, version 2.0. The ISA documentation is available
|
from \url{http://riscv.org}.
|
from \url{http://riscv.org}.
|
|
|
\section{Status and Control Register Instructions}
|
\section{Status and Control Register Instructions}
|
\label{sec:csr_instrs}
|
\label{sec:csr_instrs}
|
|
|
In addition to the base ISA, some additional instructions have been imported
|
In addition to the base ISA, some additional instructions have been imported
|
from the RISC-V supervisor specification\footnote{The processor is in
|
from the RISC-V supervisor specification\footnote{The processor is in
|
the process of being upgraded to the new specification.} version 1.0.
|
the process of being upgraded to the new specification.} version 1.0.
|
|
|
\begin{table}[htb]
|
\begin{table}[htb]
|
\centering
|
\centering
|
\begin{tabular}{|l|l|}
|
\begin{tabular}{|l|l|}
|
\hline
|
\hline
|
\textbf{Mnemonic} & \textbf{Description} \\
|
\textbf{Mnemonic} & \textbf{Description} \\
|
\hline
|
\hline
|
\texttt{scall} & System call \\
|
\texttt{scall} & System call \\
|
\texttt{sbreak} & Breakpoint instruction \\
|
\texttt{sbreak} & Breakpoint instruction \\
|
\texttt{sret} & Exception return \\
|
\texttt{sret} & Exception return \\
|
\hline
|
\hline
|
\texttt{csrrw rd, rs1, CSR} & Writes rs1 into CSR, place sold value in rd \\
|
\texttt{csrrw rd, rs1, CSR} & Writes rs1 into CSR, place sold value in rd \\
|
\texttt{csrrs rd, rs1, CSR} & Ors rs1 with CSR, places old value in rd \\
|
\texttt{csrrs rd, rs1, CSR} & Ors rs1 with CSR, places old value in rd \\
|
\texttt{csrrc rd, rs1, CSR} & Ands the inverse of rs1 with CSR, places old value in rd \\
|
\texttt{csrrc rd, rs1, CSR} & Ands the inverse of rs1 with CSR, places old value in rd \\
|
\texttt{csrrwi rd, imm, CSR} & Writes imm into CSR, places old value in rd \\
|
\texttt{csrrwi rd, imm, CSR} & Writes imm into CSR, places old value in rd \\
|
\texttt{csrrsi rd, imm, CSR} & Ors CSR with imm, places old value in rd \\
|
\texttt{csrrsi rd, imm, CSR} & Ors CSR with imm, places old value in rd \\
|
\texttt{csrrci rd, imm, CSR} & Ands the inverse of imm with CSR, places old value in rd \\
|
\texttt{csrrci rd, imm, CSR} & Ands the inverse of imm with CSR, places old value in rd \\
|
\hline
|
\hline
|
\end{tabular}
|
\end{tabular}
|
\caption{List of CSR Instructions}
|
\caption{List of CSR Instructions}
|
\end{table}
|
\end{table}
|
|
|
\appendix
|
\appendix
|
|
|
\chapter{Peripherals}
|
\chapter{Peripherals}
|
|
|
The source distribution of the processor contains several peripheral modules that can be
|
The source distribution of the processor contains several peripheral modules that can be
|
used in system-on-chip designs using the Potato processor (or other processors).
|
used in system-on-chip designs using the Potato processor (or other processors).
|
|
|
This chapter briefly describes each of the modules.
|
This chapter briefly describes each of the modules.
|
|
|
\section{GPIO}
|
\section{GPIO}
|
|
|
The GPIO module provides a simple GPIO interface for up to 32 general purpose pins.
|
The GPIO module provides a simple GPIO interface for up to 32 general purpose pins.
|
Each pin can be separately configured to work as either an input or an output pin.
|
Each pin can be separately configured to work as either an input or an output pin.
|
|
|
Registers are provided to set the direction of each pin. Additional registers
|
Registers are provided to set the direction of each pin. Additional registers
|
provide the ability to read or write the values of the pins.
|
provide the ability to read or write the values of the pins.
|
|
|
\section{Timer}
|
\section{Timer}
|
|
|
The timer module provides a timer that fires off an interrupt at a specified
|
The timer module provides a timer that fires off an interrupt at a specified
|
interval.
|
interval.
|
|
|
\section{UART}
|
\section{UART}
|
|
|
The UART module provies a fixed-baudrate serial port interface. It features
|
The UART module provies a fixed-baudrate serial port interface. It features
|
separate FIFOs for buffering input and output data, and interrupts for when
|
separate FIFOs for buffering input and output data, and interrupts for when
|
the module is ready to send or has received data.
|
the module is ready to send or has received data.
|
|
|
\section{Memory}
|
\section{Memory}
|
|
|
The memory module is basically a simple block RAM wrapper with support for
|
The memory module is basically a simple block RAM wrapper with support for
|
byte-writes.
|
byte-writes.
|
|
|
\end{document}
|
\end{document}
|
|
|
|
|