 |
|
 |
| Parallax Forums > Public Forums > Propeller Chip > How program memory is loaded? | Forum Quick Jump
|
|  inaki Registered Member
        Date Joined Jan 2005 Total Posts : 262 | Posted 2/24/2006 5:56 AM (GMT -8) |   | | I am somewhat confused after reading the Early Propeller Chip Documentation.
I understand from the documentation that at a given time a COG can access 512 entries of program memory. Is that right ?
The manual says that when a COG is rebooted it loads its memory registers from the main memory and then starts to run at $000.
The PC is 9 bits register so it is clear that it cannot be anything bigger than 512.
So, I wonder what happens when one wants to execute more than 512 instructions in sequence. Does the COG continue to load more instructions from main RAM ? The contents must be loaded by hand ? What happens to the old contents of program memory?
On the other hand, is it possible to jump or call between addresses that are more than 512 instructions appart ?
| | Back to Top | | |
  |  daniel .

       Date Joined Jul 2004 Total Posts : 220 | Posted 2/24/2006 6:31 AM (GMT -8) |   |
inaki said...
So, I wonder what happens when one wants to execute more than 512 instructions in sequence. Does the COG continue to load more instructions from main RAM ? The contents must be loaded by hand ? What happens to the old contents of program memory?
On the other hand, is it possible to jump or call between addresses that are more than 512 instructions appart ? As I read the prelim doc, it would seem possible, but danger fraught, to do so.
a. The COG is stated to have all 512 instructions transferred into its memory space whein it is initialized. Once this initial transfer happens, the prelim docs imply that no further "automatic" transfer takes place.
b. Specific SharedRAM Content can be loaded into the COG, one byte/word/longword at a time via HUB instructions.
c. The destination of that transfer in the COG is overwritten by the new content.
d. And here is the adventurous part. The COG could be written to, while it is executing some portion of its already loaded code, could have interleaved HUB instructions to preload the next part of the execution path. Intended jumps into this not-yet-loaded portion of the routine (and thus, in a global sense possibly greater than 512 instructions away, but always within the 512 instructions of the COG in a local sense) would have to be "delayed" until it was "loaded".
I think I'd try real hard to stay within 512 instructions native to the COG.
Daniel
| | Back to Top | | |
 | Forum Information | Currently it is Friday, November 20, 2009 11:13 PM (GMT -8) There are a total of 393,738 posts in 55,521 threads. In the last 3 days there were 82 new threads and 702 reply posts. View Active Threads
| | Who's Online | This forum has 17687 registered members. Please welcome our newest member, mark09. 49 Guest(s), 2 Registered Member(s) are currently online. Details BradC, SRLM |
Forum powered by dotNetBB v2.42EC SP2.02 dotNetBB © 2000-2009 |
|
|