Propeller Manual

Table Of Contents
COGSTOP – Assembly Language Reference
COGSTOP
Instruction: Start a cog by its ID.
COGSTOP CogID
CogID (d-field) is the register containing the ID (0 – 7) of the cog to stop.
Opcode Table:
–INSTR– ZCRI –CON– –DEST– –SRC– Z Result C Result Result Clocks
000011 0001 1111 ddddddddd ------011
Stopped ID = 0 No Cog Free Not Written 7..22
Concise Truth Table:
In Out
Destination Source
1
Z
C
Effects
Destination
2,
3
Z C
4
$0000_0000; 0
%0_00000011; 3
-
-
wr wz wc
$0000_0000; 0 1 0
$0000_0005; 5
%0_00000011; 3 -
-
wr wz wc
$0000_0005; 5 0 0
$0000_0008; 8
5
%0_00000011; 3 -
-
wr wz wc
$0000_0000; 0 1 0
1
Source is automatically set to immediate value 3 by the assembler to indicate that this is the COGSTOP hub instruction.
2
Destination is not written unless the WR effect is given.
3
Destination Out (written Destination) indicates the cog that was stopped.
4
The C flag will be set (1) if all cogs were running prior to executing the COGSTOP instruction.
5
Only the lowest 3 bits of Destination In are utilized, so a value of 8 is seen as cog 0.
Explanation
The
COGSTOP instruction stops a cog whose ID is in the register CogID, placing that cog into a
dormant state. In the dormant state, the cog ceases to receive System Clock pulses so that
power consumption is greatly reduced.
COGSTOP is a hub instruction. Hub instructions require 7 to 22 clock cycles to execute
depending on the relation between the cog’s hub access window and the instruction’s moment
of execution. See Hub on page 24 for more information.
If the WZ effect is specified, the Z flag will be set (1) if the ID of the cog that was stopped is
zero (0). If the
WC effect is specified, the C flag will be set (1) if all cogs were running prior
to executing this instruction. If the
WR effect is specified, Destination is written with the ID of
the cog that was stopped.
Page 286 · Propeller Manual v1.1