2003-05-20 20:29:52 +00:00
|
|
|
\documentclass{manual}
|
|
|
|
\usepackage{palatino}
|
|
|
|
\renewcommand{\ttdefault}{cmtt}
|
|
|
|
\renewcommand{\sfdefault}{cmss}
|
|
|
|
\newcommand{\myhdl}{\protect \mbox{MyHDL}}
|
2003-08-04 21:21:19 +00:00
|
|
|
\usepackage{graphicx}
|
2003-05-20 20:29:52 +00:00
|
|
|
|
|
|
|
\title{The \myhdl\ manual}
|
|
|
|
|
|
|
|
\input{boilerplate}
|
|
|
|
|
2003-07-21 21:32:46 +00:00
|
|
|
\makeindex
|
|
|
|
|
2003-05-20 20:29:52 +00:00
|
|
|
\begin{document}
|
|
|
|
|
|
|
|
\maketitle
|
|
|
|
|
|
|
|
\input{copyright}
|
|
|
|
|
|
|
|
\begin{abstract}
|
|
|
|
|
|
|
|
\noindent
|
|
|
|
|
2003-08-08 13:41:03 +00:00
|
|
|
\myhdl{} is a Python package for using Python as a hardware description
|
|
|
|
and verification language. Languages such Verilog and VHDL are
|
|
|
|
compiled languages. Python with \myhdl{} can be viewed as a "scripting
|
|
|
|
language" counterpart of such languages. However, Python is more
|
|
|
|
accurately described as a very high level language (VHLL). \myhdl{} users
|
|
|
|
have access to the amazing power and elegance of Python.
|
|
|
|
|
|
|
|
The key idea behind \myhdl{} is to use Python generators for modeling
|
|
|
|
hardware concurrency. A generator is a resumable function with
|
|
|
|
internal state. In \myhdl{}, a hardware module is modeled as a function
|
|
|
|
that returns generators. With this approach, \myhdl{} directly supports
|
|
|
|
features such as named port association, arrays of instances, and
|
|
|
|
conditional instantiation.
|
|
|
|
|
|
|
|
\myhdl{} supports the classic hardware description concepts. It provides
|
|
|
|
a signal class similar to the VHDL signal, a class for bit oriented
|
|
|
|
operations, and support for enumeration types. The Python
|
|
|
|
\code{yield} statement is used as a general sensitivity list to
|
|
|
|
wait on a signal change, an edge, a delay, or on another
|
|
|
|
generator. \myhdl{} supports waveform viewing by tracing signal changes
|
|
|
|
in a VCD file.
|
|
|
|
|
2003-08-22 07:43:40 +00:00
|
|
|
Python's rare combination of power and clarity makes it ideal for high
|
|
|
|
level modeling. It can be expected that \myhdl{} users will often
|
|
|
|
have the ``Pythonic experience'' of finding an elegant solution to a
|
|
|
|
complex modeling problem. Moreover, Python is outstanding for rapid
|
|
|
|
application development and experimentation.
|
2003-08-08 13:41:03 +00:00
|
|
|
|
|
|
|
With \myhdl{}, the Python unit test framework can be used on hardware
|
|
|
|
designs. \myhdl{} can also be used as hardware verification language for
|
|
|
|
VHDL and Verilog designs, by co-simulation with any simulator that has
|
|
|
|
a PLI. The distribution contains a PLI module for the
|
2003-05-20 20:29:52 +00:00
|
|
|
Icarus Verilog simulator.
|
|
|
|
|
2003-08-08 13:41:03 +00:00
|
|
|
The \myhdl{} software is open source software. It is licensed under the
|
|
|
|
GNU Lesser General Public License (LGPL).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-05-20 20:29:52 +00:00
|
|
|
\end{abstract}
|
|
|
|
|
|
|
|
\tableofcontents
|
|
|
|
|
|
|
|
\input{background.tex}
|
|
|
|
\input{informal.tex}
|
|
|
|
\input{modeling.tex}
|
|
|
|
\input{unittest.tex}
|
|
|
|
\input{cosimulation.tex}
|
|
|
|
\input{reference.tex}
|
|
|
|
|
2003-07-21 21:32:46 +00:00
|
|
|
\input{MyHDL.ind}
|
|
|
|
|
2003-05-20 20:29:52 +00:00
|
|
|
\end{document}
|