head 1.1; branch 1.1.1; access ; symbols noReleaseTag: noVendorName:1.1.1; locks ; strict; comment @# @; 1.1 date 2003.; author doru; state Exp; branches; next ; date 2003.; author doru; state Exp; branches ; next ; desc @@ 1.1 log @Initial revision @ text @ Program Memory
Main Page   Modules   Related Pages  

Program Memory
[Hardware resources]

PM handling


The Program Memory is a single port RAM.
That port provides read-only access. Support for the instruction SPM (Store Program Memory) is currently not provided.
The PM is organized on 16 bit words, and has the length set by a constant in the constants definition file (`pavr-constants.vhd').

Apart from controlling the Program Memory, the PM manager also controls the Program Counter.
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).
Program Counter handling
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.
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?
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 jumps, branches, skips, calls and returns.
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.
Requests to PM

Generated on Tue Dec 31 20:26:31 2002 for Pipelined AVR microcontroller by doxygen1.2.16
@ log @Importing into repository the new directory structure. @ text @@