Propeller Manual

Table Of Contents
1: Introducing the Propeller Chip
Figure 1-3: Cog-Hub Interaction – Best Case Scenario
Figure 1-4 shows the worst-case scenario; the hub instruction was ready on the cycle right
after the start of Cog 0’s access window; it just barely missed it. The cog waits until the next
hub access window (15 cycles later) then the hub instruction executes (7 cycles) for a total of
22 cycles for that hub instruction. Again, there are 9 additional cycles after the hub
instruction for other instructions to execute before the next hub access window arrives. To
get the most efficiency out of Propeller Assembly routines that have to frequently access
mutually exclusive resources, it can be beneficial to interleave non-hub instructions with hub
instructions to lessen the number of cycles waiting for the next hub access window. Since
most Propeller Assembly instructions take 4 clock cycles, two such instructions can be
executed in between otherwise contiguous hub instructions.
Figure 1-4: Cog-Hub Interaction – Worst Case Scenario
Keep in mind that a particular cog’s hub instructions do not, in any way, interfere with other
cogs’ instructions because of the Hub mechanism. Cog 1, for example, may start a hub
instruction during System Clock cycle 2, in both of these examples, possibly overlapping its
execution with that of Cog 0 without any ill effects. Meanwhile, all other cogs can continue
executing non-hub instructions, or awaiting their individual hub access windows regardless of
what the others are doing.
Propeller Manual v1.1 · Page 25