Parallax P2 Edge Module - Datasheet
Table Of Contents
- FEATURES
- HARDWARE
- Pin Descriptions
- Hardware Connections
- Minimal Connections
- External Crystal
- Reset Switch
- SPI Flash Boot Memory
- MicroSD Boot Memory
- Dual Boot Memory
- OPERATION
- SYSTEM ORGANIZATION
- Cogs
- Cog RAM
- Register RAM
- Lookup RAM
- Execution
- Hub
- Hub RAM
- Cog-to-Hub RAM Interface
- System Clock
- CORDIC Solver
- Smart I/O Pins
- Pin Modes
- I/O Pin Circuit
- Equivalent Schematics
- Smart Modes
- PASM2 LANGUAGE IN BRIEF
- Math and Logic
- Pin & Smart Pin
- Branch
- Hub Control, FIFO, & RAM
- Event
- Interrupt
- Register Indirection
- CORDIC Solver
- Color Space Converter and Pixel Mixer
- Lookup Table, Streamer, and Misc
- SYSTEM CHARACTERISTICS
- Absolute Maximum Electrical Ratings
- DC Characteristics
- AC Characteristics
- PACKAGING
- CHANGE LOG
- PARALLAX INCORPORATED
IJNZ D,{#}S
Increment D and jump to S** if result is not zero.
2 or 4 / 2 or 13...20
IJZ D,{#}S
Increment D and jump to S** if result is zero.
2 or 4 / 2 or 13...20
JMP #{\}A
Jump to A. If R = 1 then PC += A, else PC = A. "\" forces R = 0.
4 / 13...20
JMP D {WC/WZ/WCZ}
Jump to D. C = D[31], Z = D[30], PC = D[19:0].
4 / 13...20
JMPREL {#}D
Jump ahead/back by D instructions. For cogex, PC += D[19:0]. For hubex, PC += D[17:0] << 2.
4 / 13...20
REP {#}D,{#}S
Execute next D[8:0] instructions S times. If S = 0, repeat instructions infinitely. If D[8:0] = 0, nothing repeats.
2 / 2
RESI0
Resume from INT0. (CALLD $1FE,$1FF WCZ)
4 / 13...20
RESI1
Resume from INT1. (CALLD $1F4,$1F5 WCZ)
4 / 13...20
RESI2
Resume from INT2. (CALLD $1F2,$1F3 WCZ)
4 / 13...20
RESI3
Resume from INT3. (CALLD $1F0,$1F1 WCZ)
4 / 13...20
RET {WC/WZ/WCZ}
Return by popping stack (K). C = K[31], Z = K[30], PC = K[19:0].
4 / 13...20
RETA {WC/WZ/WCZ}
Return by reading hub long (L) at --PTRA. C = L[31], Z = L[30], PC = L[19:0].
11...18
1
/ 20...40
1
RETB {WC/WZ/WCZ}
Return by reading hub long (L) at --PTRB. C = L[31], Z = L[30], PC = L[19:0].
11...18
1
/ 20...40
1
RETI0
Return from INT0. (CALLD $1FF,$1FF WCZ)
4 / 13...20
RETI1
Return from INT1. (CALLD $1FF,$1F5 WCZ)
4 / 13...20
RETI2
Return from INT2. (CALLD $1FF,$1F3 WCZ)
4 / 13...20
RETI3
Return from INT3. (CALLD $1FF,$1F1 WCZ)
4 / 13...20
SKIP {#}D
Skip instructions per D. Subsequent instructions 0..31 get cancelled for each '1' bit in D[0]..D[31].
2 / 2
SKIPF {#}D
Skip cog/LUT instructions fast per D. Like SKIP, but instead of cancelling instructions, the PC leaps over them.
2 / ILLEGAL
TJF D,{#}S
Test D and jump to S** if D is full (D = $FFFF_FFFF).
2 or 4 / 2 or 13...20
TJNF D,{#}S
Test D and jump to S** if D is not full (D != $FFFF_FFFF).
2 or 4 / 2 or 13...20
TJNS D,{#}S
Test D and jump to S** if D is not signed (D[31] = 0).
2 or 4 / 2 or 13...20
TJNZ D,{#}S
Test D and jump to S** if D is not zero.
2 or 4 / 2 or 13...20
TJS D,{#}S
Test D and jump to S** if D is signed (D[31] = 1).
2 or 4 / 2 or 13...20
TJV D,{#}S
Test D and jump to S** if D overflowed (D[31] != C, C = 'correct sign' from last addition/subtraction).
2 or 4 / 2 or 13...20
TJZ D,{#}S
Test D and jump to S** if D is zero.
2 or 4 / 2 or 13...20
1
+1 if crosses hub long
Hub Control, FIFO, & RAM Instructions
Instruction
Description
Clocks
Cog & LUT / Hub
Hub Control
COGID {#}D {WC}
If D is register and no WC, get cog ID (0 to 15) into D. If WC, check status of cog D[3:0], C = 1 if on.
2...9, +2 if result / same
COGINIT {#}D,{#}S {WC}
Start cog selected by D. S[19:0] sets hub startup address and PTRB of cog. Prior SETQ sets PTRA of cog.
2...9, +2 if result / same
COGSTOP {#}D
Stop cog D[3:0].
2...9 / same
LOCKNEW D {WC}
Request a LOCK. D will be written with the LOCK number (0 to 15). C = 1 if no LOCK available.
4...11 / same
LOCKREL {#}D {WC}
Release LOCK D[3:0]. If D is a register and WC, get current/last cog id of LOCK owner into D and LOCK status
into C.
2...9, +2 if result / same
LOCKRET {#}D
Return LOCK D[3:0] for reallocation.
2...9 / same
LOCKTRY {#}D {WC}
Try to get LOCK D[3:0]. C = 1 if got LOCK. LOCKREL releases LOCK. LOCK is also released if owner cog stops or
restarts.
2...9, +2 if result / same
HUBSET {#}D
Set hub configuration to D.
2...9 / same
Hub FIFO
GETPTR D
Get current FIFO hub pointer into D.
2 / FIFO IN USE
FBLOCK {#}D,{#}S
Set next block for when block wraps. D[13:0] = block size in 64-byte units (0 = max), S[19:0] = block start
address.
2 / FIFO IN USE
RDFAST {#}D,{#}S
Begin new fast hub read via FIFO. D[31] = no wait, D[13:0] = block size in 64-byte units (0 = max), S[19:0] =
block start address.
2 or WRFAST finish +
10...17 / FIFO IN USE
WRFAST {#}D,{#}S
Begin new fast hub write via FIFO. D[31] = no wait, D[13:0] = block size in 64-byte units (0 = max), S[19:0] =
block start address.
2 or WRFAST finish + 3 /
FIFO IN USE
RFBYTE D {WC/WZ/WCZ}
Used after RDFAST. Read zero-extended byte from FIFO into D. C = MSB of byte. *
2 / FIFO IN USE
Copyright © Parallax Inc. 2021/05/27 ▪ Parallax Propeller 2 (P2X8C4M64P) Datasheet ▪ Page 38