Cog RAM
Title:Cog RAM
Author:reltham
Published:Sat, 20 Sep 2008 02:53:45 GMT

Cog RAM

Cog RAM is the memory local to each Cog. It consists of 496 longs of general purpose RAM for code and data, and 16 special purpose registers. This memory is addressed by longs, $000 through $1EF being general purpose data or instructions, and $1F0 through $1FF being the special purpose registers (see below). Most of the instructions will manipulate the entire 32bits at the given address. The exception is with the code self-modifying instructions MOVS, MOVD, MOVI and the CALL and JMPRET instructions.

b31 - b23
b22 - b18
b17 - b9
b8 - b0
Instruction

Destination
Source
MOVI

MOVD
MOVS, CALL,
or JMPRET

Special purpose registers:

Address

Name

Type

Description

$1F0
PAR
Read-Only
Boot parameter
$1F1
CNT
Read-Only
System Counter
$1F2
INA
Read-Only
Input states for P31-P0
$1F3
INB
Read-Only
Input states for P63-P32*
$1F4
OUTA
Read/Write
Output States for P31-P0
$1F5
OUTB
Read/Write
Output states for P63-P32*
$1F6
DIRA
Read/Write
Direction States for P31-P0
$1F7
DIRB
Read/Write
Direction States for P63-P32*
$1F8
CTRA
Read/Write
Counter A Control
$1F9
CTRB
Read/Write
Counter B Control
$1FA
FRQA
Read/Write
Counter A Frequency
$1FB
FRQB
Read/Write
Counter B Frequency
$1FC
PHSA
Read/Write
Counter A Phase
$1FD
PHSB
Read/Write
Counter B Phase
$1FE
VCFG
Read/Write
Video Configuration
$1FF
VSCL
Read/Write
Video Scale
*Unimplemented on the Propeller P8X32 chip.