Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 22c8342138ad63c970e07bf87b2e210d > files > 15

simulavr-doc-0.1.2.6-8.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on January 19, 2011 by texi2html 1.82
texi2html was written by: 
            Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>
-->
<head>
<title>Simulavr: 4. Display Coprocesses</title>

<meta name="description" content="Simulavr: 4. Display Coprocesses">
<meta name="keywords" content="Simulavr: 4. Display Coprocesses">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Display-Coprocesses"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="simulavr_7.html#Building-GDB" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="simulavr_9.html#Internals" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="simulavr_5.html#Using-with-GDB" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="simulavr.html#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="simulavr_9.html#Internals" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="simulavr.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="simulavr_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="simulavr_11.html#Concept-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="simulavr_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Display-Coprocesses-1"></a>
<h1 class="chapter">4. Display Coprocesses</h1>
<a name="index-display"></a>
<a name="index-display-protocol"></a>
<a name="index-SIM_005fDISP_005fPROG"></a>
<a name="index-SIM_005fPIPE_005fFD"></a>

<p>This chapter documents the protocol that simulavr uses to pass register
and memory information to a display coprocess.
</p>
<p>A display coprocess is a separate program started by simulavr for the
sole purpose of displaying register and memory information while an AVR
program is running in the simulator. Using a separate program and a
standardized communication protocol, keeps the simulavr code simpler and
allows for a variety of display programs to be used.
</p>
<p>When the user asks simulavr to display register and memory information
during execution, simulavr will start a coprocess to perform the display
work. A pipe will be opened in simulavr into which the data will be
written using the following commands:
</p>
<table>
<tr><td width="30%">&lsquo;<samp>q</samp>&rsquo;</td><td width="70%">Quit.</td></tr>
<tr><td width="30%">&lsquo;<samp>r&lt;reg&gt;:&lt;val&gt;</samp>&rsquo;</td><td width="70%">Set register to val.</td></tr>
<tr><td width="30%">&lsquo;<samp>p&lt;val&gt;</samp>&rsquo;</td><td width="70%">Set program counter to val.</td></tr>
<tr><td width="30%">&lsquo;<samp>i&lt;reg&gt;:&lt;val&gt;</samp>&rsquo;</td><td width="70%">Set io register to val.</td></tr>
<tr><td width="30%">&lsquo;<samp>I&lt;reg&gt;:&lt;name&gt;</samp>&rsquo;</td><td width="70%">Set io register name.</td></tr>
<tr><td width="30%">&lsquo;<samp>s&lt;addr&gt;,&lt;len&gt;:XX</samp>&rsquo;</td><td width="70%">Set sram addrs to values (one XX pair per addr).</td></tr>
<tr><td width="30%">&lsquo;<samp>e&lt;addr&gt;,&lt;len&gt;:XX</samp>&rsquo;</td><td width="70%">Set eeprom addrs to values (one XX pair per addr).</td></tr>
<tr><td width="30%">&lsquo;<samp>f&lt;addr&gt;,&lt;len&gt;:XXXX</samp>&rsquo;</td><td width="70%">Set flash addrs to values (one XXXX quad per addr).</td></tr>
<tr><td width="30%">&lsquo;<samp>n&lt;clock_ticks&gt;</samp>&rsquo;</td><td width="70%">Update the number of clock ticks.</td></tr>
</table>

<p>All values are hexidecimal numbers, except for &lt;name&gt; which is a string.
</p>
<p>In order for the display process to know which pipe to read the
information, it must handle either the &lsquo;<samp>--pfd &lt;fd&gt;</samp>&rsquo; option or check
the <code>SIM_PIPE_FD</code> enviroment variable. The value passed using
either method will be the file descriptor number of the pipe from which
the display prgram will read the informtion.
</p>
<p>Simulavr will start all display programs like so (sizes are decimal
numbers of bytes and sram_start is just the decimal address of the
first byte of sram, usually 0x60 [96] or 0x100 [256]):
</p>
<p>&lsquo;<samp>&lt;prog&gt; --pfd &lt;fd&gt; &lt;flash_size&gt; &lt;sram_size&gt; &lt;sram_start&gt; &lt;eeprom_size&gt;</samp>&rsquo;
</p>
<p>The user can specify the display program to use via the
&lsquo;<samp>--disp-prog</samp>&rsquo; option to simulavr or using the <code>SIM_DISP_PROG</code>
environment variable. If both are not specified, then no display will be
used.
</p>
<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="simulavr_7.html#Building-GDB" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="simulavr_9.html#Internals" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="simulavr_5.html#Using-with-GDB" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="simulavr.html#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="simulavr_9.html#Internals" title="Next chapter"> &gt;&gt; </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated on <i>January 19, 2011</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.82</i></a>.
 </font>
 <br>

</p>
</body>
</html>