Propeller Lingo - rosco-pc/propeller-wiki GitHub Wiki
This page is dedicated to the growing number of Propeller specific terms, used elsewhere in this WikiSpace. Unlike most all other CPUs, the Propeller is a multi-processor design, featuring deterministic timing, no interrupts and highly flexible on board hardware and I/O capability.
What is a COG?
A cog refers to one of 8 internal CPU cores. Each COG runs independent of the others, has a 2KB memory space, apart from the shared 32KB HUB memory space. Think of a COG as one element of a multi-processor system. All cogs share access to the I/O pins in real time. It is possible to have one COG watching and acting on what another COG does with the I/O pins. When not active, COGs do not consume power. When active, a COGs memory space is filled from the HUB, then program execution begins. All COGs are identical, featuring on board counters, video generator, etc... Programs have no need to specify specifc COGs to execute on, unless some hard coded software need warrants this.
What is the HUB?
On the Propeller, there is a shared memory space called the HUB. The 16 bits of addressable space is evenly divided into RAM and ROM areas, both accessible to programs running on a COG. Each COG gets round robin access to the shared HUB memory space. This was done to make the design completely deterministic, thus reducing the complexity normally associated with multi-processor designs.
CNT --or-- Global System Counter
This is the read only system wide counter. It is visible to all COGs and is 32 bits in size. Typical use case is to store the current count, calculate some offset, then compare it within a COG to establish known and deterministic timing between COGs, or as a base counter for other deterministic tasks within a given COG that may or may not be using it's own counters.
What is SPIN?
Spin is a higher level language, run from an internal and on chip interpeter. Spin programs are compiled with the Propeller tool, and run on one or more COGs.
What is Spin Bytecode?
Spin bytecode is the sequence of bytes which make up the instructions and data of a compiled Spin program. The Spin Bytecode is executed by the Spin Interpreter which is loaded from ROM into any COG which is required to run a Spin program.
What is PASM?
Propeller ASseMbly. Machine code, nirvana, or the cause for delicate nerves.
What is LMM?
Large Memory Model. This is a form of PASM where Propeller assembly instructions are held in Hub memory rather than in COG memory and are interpreted by the COG program rather than directly executed. There is no single version of LMM but they all have core functionality in common; the ability to execute most non-branching Propeller instructions at high-speed with those instructions which cannot be directly executed replaced by a jump into the LMM handling COG program to perform the task required. The Propeller and Propeller Tool do not natively support LMM. LMM implementations have to be designed and implemented by Propeller developers themselves.
What is a VM or Virtual Machine?
A Virtual Machine is a Spin, or more usually a COG, program which can interpret a sequence of instructions stored somewhere within or external to the Propeller chip and cause the intended operations of the interpreted code to occur. A Virtual Machine allows a processor to execute an instruction set which is not native to it, that is, is not in its own native assembly language. The ROM-based Spin Interpreter and LMM handling COG programs are Virtual Machines.
What is a WAITVID?
"WAIT for VIDeo generator to be ready to accept pixel data." It's an assembly instruction, often used in plain English to describe the task of feeding pixels to the hardware. eg: "My driver delivers 4 pixels per WAITVID."
What is a Register?
On the Propeller, there are two distinct memory spaces, one being HUB memory, the other being COG memory.
In the simplest sense, a "register" on the Propeller really is just one of the 512 COG memory locations. In the not so simple sense...
Many CPU's have any number of internal registers, used for operations on data that resides somewhere in the addressable memory space. (A, X, r1, etc...) These registers are typically addressed in a way distinctly different from ordinary RAM or ROM memory. eg: LDA $100 That particular instruction, for 6809, 6502, and probably others, instructs the CPU to move the contents of memory location $100 into register A, by way of example, where A is an internal register, with no address other than the bit field in the instruction that specifies it, and $100 being one of the addressable memory locations.
The Propeller does not make use of this model, in that all 512 addressable COG memory locations simply contain values, with said values either being instructions or data, based on the programmers intent. On the prop then, a similar instruction would be: MOV A, $100
The difference being A is just a label, pointing to another COG memory location, instead of referring to some internal location! One could just as easily do this: MOV frank, $100. If frank and A both point to COG memory location $1a0, for example, then the contents of location $100, would be moved to location $1a0.
Essentially, if you plan on executing the contents of a given COG memory location, it then works like an instruction. If those contents are to be consumed or operated on by the program, then it's more like data. The most common use of the word "register", in the context of the Propeller, is to refer to a COG memory location that contains data, to be operated on according to instructions given, in a fashion similar to how an internal register would be used on other CPU models.
What is PropJavelin?
PropJavelin is a project to implement the functionality of the Parallax Javelin Stamp on the Propeller Chip. This is the implementation of a JVM which runs on the Propeller to allow Java(TM) programming of the Propeller. Java program development is undertaken using a modified version of the Javelin Stamp IDE.
More information on PropJavelin and programming the Propeller with Java can be found here