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

Subversion Repositories pavr

[/] [pavr/] [trunk/] [doc/] [html/] [group__pavr__hwres__pm.html] - Rev 6

Compare with Previous | Blame | View Log

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Program Memory</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.16 -->
<center>
<a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>Program Memory<br>
<small>
[<a class="el" href="group__pavr__hwres.html">Hardware resources</a>]</small>
</h1><table border=0 cellpadding=0 cellspacing=0>
</table>
<dl compact><dt><b>
PM handling</b><dd>
<br>
 <div align="center">
<img src="pavr_hwres_pm_01.gif" alt="pavr_hwres_pm_01.gif">
</div>
<br>
 The Program Memory is a single port RAM. <br>
 That port provides read-only access. Support for the instruction SPM (Store Program Memory) is currently not provided. <br>
 The PM is organized on 16 bit words, and has the length set by a constant in the constants definition file (`pavr-constants.vhd'). <br>
 <br>
 Apart from controlling the Program Memory, the PM manager also controls the Program Counter. <br>
 Some PM access requests need to modify the PC, others don't. The only PM requests that don't modify the PC are the loads from PM (LPM and ELPM instructions). The other requests correspond to instructions that want to modify the instruction flow, thus modify the PC (jumps, branches, calls and returns). <br>
</dl><dl compact><dt><b>
Program Counter handling</b><dd>
At a given time, the pipeline can process more than one instruction. Up to 6 instructions can be simultaneousely processed. Obviousely, each of these instructions has its own address in the PM. <br>
 One may ask: how is defined the Program Counter, as long as two or more instructions are simultaneousely executed? Whose address is considered to be the Program Counter? <br>
 The answer is: the Program Counter is in fact composed of a set of registers. Each instruction in the pipeline has an associated Program Counter that follows it while flowing through the pipeline. Implementation details can be found in the description of <a class="el" href="group__pavr__pipeline__jumps.html">jumps</a>, <a class="el" href="group__pavr__pipeline__branches.html">branches</a>, <a class="el" href="group__pavr__pipeline__skips.html">skips</a>, <a class="el" href="group__pavr__pipeline__calls.html">calls</a> and <a class="el" href="group__pavr__pipeline__returns.html">returns</a>. <br>
 As an example, when a relative jump computes the target address, it considers its own Program Counter rather than the address of the instruction fetched that moment from the PM. The instructions that modify the instruction flow (jumps, branches, skips, calls and returns) must be able to manipulate the program counters associated with pipeline stages s1, s2 and s3. However, this is done not directly, but via the Program Memory manager. The PM manager centralizes all instruction flow access requests (jump requests, branch requests, etc) and takes care of the program counters in an organized and manageable manner. <br>
</dl><dl compact><dt><b>
Requests to PM</b><dd>
<ul>
<li>pavr_s5_lpm_pm_rq <br>
 Needed by LPM instruction. <br>
 This request doesn't modify the instruction flow. <br>
<li>pavr_s5_elpm_pm_rq <br>
 Needed by ELPM instruction. <br>
 This request doesn't modify the instruction flow. <br>
<li>pavr_s4_z_pm_rq <br>
 Needed by ICALL and IJMP. <br>
<li>pavr_s4_zeind_pm_rq <br>
 Needed by EICALL and EIJMP. <br>
<li>pavr_s4_k22abs_pm_rq <br>
 Needed by CALL and JMP. <br>
 To get to the jump address, the 16 bit instruction constant is concatenated with a 6 bit constant previousely read also from the instruction opcode.<li>pavr_s4_k12rel_pm_rq <br>
 Needed by RCALL and RJMP. <br>
 Note that pavr_s4_pc is a pipeline register that holds the Program Memory address of the instruction executing in pipeline stage s4. <br>
 Because the relative jump actually occurs in stage s4, pavr_s4_pc is needed rather than the current Program Counter (pavr_pc).<li>pavr_s6_branch_pm_rq <br>
 Needed by branch instructions (BRBC and BRBS). <br>
<li>pavr_s6_skip_pm_rq <br>
 Needed by some skip instructions (CPSE, SBRC and SBRS). <br>
<li>pavr_s61_skip_pm_rq <br>
 Needed by some skip instructions (SBIC and SBIS). <br>
<li>pavr_s4_k22int_pm_rq <br>
 Needed by implicit interrupt CALL. <br>
<li>pavr_s54_ret_pm_rq <br>
 Needed by RET and RETI. <br>
 <br>
 </ul>
</dl><hr><address align="right"><small>Generated on Tue Dec 31 20:26:31 2002 for Pipelined AVR microcontroller by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.16 </small></address>
</body>
</html>
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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