Propeller Manual

Table Of Contents
Introducing the Propeller Chip
Each Special Purpose Register may be accessed via:
1) its physical register address (Propeller Assembly),
2) its predefined name (Spin or Propeller Assembly), or
3) the register array variable (
SPR) with an index of 0 to 15 (Spin).
The following are examples in Propeller Assembly:
MOV $1F4, #$FF 'Set OUTA 7:0 high
MOV OUTA, #$FF 'Same as above
The following are examples in Spin:
SPR[$4] := $FF 'Set OUTA 7:0 high
OUTA := $FF 'Same as above
Hub
To maintain system integrity, mutually exclusive resources must not be accessed by more
than one cog at a time. The Hub maintains this integrity by controlling access to mutually
exclusive resources, giving each cog a turn to access them in a “round robin” fashion from
Cog 0 through Cog 7 and back to Cog 0 again. The Hub, and the bus it controls, runs at half
the System Clock rate. This means that the Hub gives a cog access to mutually exclusive
resources once every 16 System Clock cycles. Hub instructions, the Propeller Assembly
instructions that access mutually exclusive resources, require 7 cycles to execute but they first
need to be synchronized to the start of the hub access window. It takes up to 15 cycles (16
minus 1, if we just missed it) to synchronize to the hub access window plus 7 cycles to
execute the hub instruction, so hub instructions take from 7 to 22 cycles to complete.
Figure 1-3 and Figure 1-4 show examples where Cog 0 has a hub instruction to execute.
Figure 1-3 shows the best-case scenario; the hub instruction was ready right at the start of that
cog’s access window. The hub instruction executes immediately (7 cycles) leaving an
additional 9 cycles for other instructions before the next hub access window arrives.
Page 24 · Propeller Manual v1.1