Volume 1: Ivory Processor Data Types, Storage Formats & Architectural Registers
This volume defines the architectural foundation of the Symbolics Ivory VLSI Processor (Silicon Revisions 1–4 / 4A), including the 40-bit tagged word format, physical PROM and disk packing formats, the 64-entry data type taxonomy, internal and scratchpad registers, the Weitek W3164/W3364 Floating-Point Accelerator (FPA) coprocessor registers, and the on-chip stack cache.
All constants and struct layouts match ivory_hw.h (synced 1:1 with emu/include/ivory_hw.h) and the from-scratch C11 implementation in emu/src/{cpu.c,fpa_w3x64.c,mem.c}.
Primary Reference Sources (local-only when present):
genera-original/sys.sct/i-sys/sysdef.lisp— 40-bit word fields,*DATA-TYPES*,*CDR-CODES*, headers, Control & ALU registers.genera-original/sys.sct/i-sys/sysdf1.lisp— Internal register numbers#o000..#o652and#o1000..#o1077.genera-original/sys.sct/i-sys/fpa.lisp— Weitek W3164/W3364 FPA coprocessor register map and status codes.I_Machine/I-Machine_Architecture_Specification.pdf— Chapters 2–5 (Data Representation, Registers, Stack Cache).
1. The 40-Bit Tagged Word ("Lisp Word")
Ivory is a word-addressed, 40-bit tagged architecture. Every memory address selects a single 40-bit Lisp word (IvoryWord / LispWord) partitioned into three hardware fields:
39 38 37 32 31 0
+-------+-----------+------------------------------------------------+
| CDR | Data Type | 32-Bit Pointer / Data |
| (2 b) | (6 b) | (32 bits) |
+-------+-----------+------------------------------------------------+
|<--- 8-bit Tag --->|
| Field | Bits | Lisp Byte Specifier | Description |
|---|---|---|---|
| Pointer / Data | <31:0> | %%Q-POINTER (byte 32. 0.) | 32-bit VMA, signed fixnum, IEEE-754 single float, immediate character, or packed halfword payload |
| Data Type (DTP) | <37:32> | %%Q-DATA-TYPE (byte 6. 32.) | 6-bit tag (#o00..#o77) defining hardware object semantics |
| CDR / Header / Seq | <39:38> | %%Q-CDR-CODE (byte 2. 38.) | 2-bit CDR code (lists), header subtype (DTP-HEADER-P/I), or instruction sequence code |
| Combined Tag | <39:32> | %%Q-TAG (byte 8. 32.) | Full 8-bit tag byte stored alongside the 32-bit word |
1.1 Host Representation & Clock Pacing (ivory_hw.h)
- On 64-bit little-endian hosts (
x86_64,aarch64, etc.),IvoryWordis an 8-byteunion(uint64_t raw) holding the 40-bit word in bits<39:0>with bits<63:40>guaranteed zero (IVORY_WORD_MASK = 0x000000FFFFFFFFFF). - Authentic XL1200 Rev 4 deterministic execution pacing is
IVORY_INSTRS_PER_US = 4macroinstructions per microsecond (~4 MIPS at 8–10 MHz), so Genera's 2.5 ms periodic timer (*TIMER-PERIOD* = 25000ticks at 10 MHz) fires every 10,000 instructions.
2. Physical Storage Formats & Wired Boot Communication Area
Because Ivory words are 40 bits (5 bytes) wide, byte-oriented media (EPROMs, FEPFS disks, and VMEbus hosts) pack 40-bit words using three distinct formats that must never be conflated:
2.1 IFEP promJ Sectioned Boot PROM Container (XL1200 FEP 3.30)
Physical XL1200 FEP 3.30 Boot PROMs consist of two 64 KiB EPROM chips joined in order: 115988 (low 64 KiB) ‖ 115989 (high 64 KiB) = 128 KiB total (rom.dump). This 128 KiB image carries a structured IFEP promJ sectioned container parsed by emu/src/loader.c:
- 30-byte header: Begins with ASCII
"IFEP promJ"followed by five little-endianuint32_theader words. - Repeated load sections:
uint32_t vma_base(little-endian destination VMA in Zone 31; FEP 3.30 loads 25,068 words across0xF8001088..0xF80071F2and0xF8001000..0xF8001082)uint32_t word_countword_count × 5bytes in little-endian word order:[b0: Data<7:0>, b1: Data<15:8>, b2: Data<23:16>, b3: Data<31:24>, b4: Tag<7:0>]uint32_t checksum
- Footer:
[entry_vma, 0xFFFFFFFF](cold-boot entry for FEP 3.30 is0xF8007162, Even phase).
(Note: ivory_unpack_prom_5bytes() in ivory_hw.h retains a legacy mid-byte tag helper [Data<31:24>, Data<23:16>, Tag, Data<15:8>, Data<7:0>] for compatibility with older raw-stream tests, but genuine XL1200 115988+115989 EPROMs exclusively use the little-endian IFEP promJ format above. See Boot ROM Format and FEP ROM Structure.)
2.2 FEPFS / .fep / .ilod Disk Page Packing (20-Byte Chunks)
FEPFS filesystems, .fep binaries, and .ilod world loads pack each 256-word Ivory page into 1,280 bytes (256 × 5 bytes), grouped as 64 twenty-byte chunks (4 words per chunk):
Bytes 0..3 : [tag0, tag1, tag2, tag3] (4 tag bytes)
Bytes 4..7 : word0.u32 (little-endian 32-bit data)
Bytes 8..11: word1.u32 (little-endian 32-bit data)
Bytes 12..15: word2.u32 (little-endian 32-bit data)
Bytes 16..19: word3.u32 (little-endian 32-bit data)
2.3 Wired Boot Communication Area (0xFFFE0000 / PMA 0x07FE0000)
The 64-word wired block at VMA 0xFFFE0000..0xFFFE003F (IVORY_BOOT_COMM_AREA_VMA, Zone 31 PMA 0x07FE0000..0x07FE003F) bridges Stage-0 Boot PROM firmware, the Merlin-II motherboard ID ROM, and the remote debugger/spy:
| Word Offset | VMA | Purpose |
|---|---|---|
+0x00 | 0xFFFE0000 | *BOOT-EMB-COMMUNICATION-AREA* (NIL on standalone XL1200; pointer on embedded UX1200S) |
+0x04 | 0xFFFE0004 | *BOOT-SPY-PC* — points to the 3-word Stage-0 halt vector at 0xFFFE0010 (IVORY_BOOT_SPY_HALT_VMA) |
+0x10..+0x12 | 0xFFFE0010..0xFFFE0012 | 3-word Stage-0 halt vector: +0 (0xFFFE0010) = clean Shutdown / Remote Debugger entry (%halt), +2 (0xFFFE0012) = fatal unhandled trap halt (%halt) |
+0x20..+0x3F | 0xFFFE0020..0xFFFE003F | Merlin-II Main Board ID ROM (32 words: board type, serial number, manufacturing date, checksum) |
+0x40.. | 0xFFFE0040.. | Hardware Reset Vector (#o777400100, Even phase) and Boot PROM window |
3. Complete 6-Bit Data Type Taxonomy (#o00..#o77)
3.1 CDR Codes, Instruction Sequence Codes & Header Subtypes (<39:38>)
| Value | List (IvoryCdrCode) | Code (IvoryInstructionSequenceCode) | DTP-HEADER-P (#o02) | DTP-HEADER-I (#o03) |
|---|---|---|---|---|
0 | IVORY_CDR_NEXT — CDR is at addr + 1 | IVORY_SEQ_PC_PLUS_1 — Even→Odd→next word | IVORY_HEADER_P_SYMBOL | IVORY_HEADER_I_COMPILED_FUNCTION |
1 | IVORY_CDR_NIL — CDR is NIL | IVORY_SEQ_FENCE — Non-executable trailer (I_STAGE_ERROR) | IVORY_HEADER_P_INSTANCE | IVORY_HEADER_I_ARRAY |
2 | IVORY_CDR_NORMAL — Explicit CDR cell at addr + 1 | IVORY_SEQ_PC_MINUS_1 — Decrement PC by 1 halfword | IVORY_HEADER_P_LEADER | IVORY_HEADER_I_NUMBER (subtype <31:28>, 0=bignum) |
3 | IVORY_CDR_JUMP — Illegal in lists (BAD_CDR_CODE) | IVORY_SEQ_PC_EVEN_2_ODD_3 — Even+2 / Odd+3 | IVORY_HEADER_P_SPARE | IVORY_HEADER_I_NAMED_STRUCTURE (Rev 0) |
3.2 All 64 Data Types (IvoryDataType)
| Octal | Constant | Category | Semantics |
|---|---|---|---|
#o00 | DTP_NULL | Unbound | Unbound variable/slot; DATA_READ traps with MEMORY_DATA_ERROR (0x0047) |
#o01 | DTP_MONITOR_FORWARD | Forwarding | Invisible forwarding pointer raising IVORY_TRAP_MONITOR (#o5112) |
#o02 | DTP_HEADER_P | Header | Pointer-bearing structure header (Symbol, Instance, Array Leader) |
#o03 | DTP_HEADER_I | Header | Immediate structure header (Compiled Function, Array, Bignum) |
#o04 | DTP_EXTERNAL_VALUE_CELL_POINTER | Forwarding | Invisible value-cell indirection (also valid fullword instruction!) |
#o05 | DTP_ONE_Q_FORWARD | Forwarding | Single-word invisible forwarding pointer |
#o06 | DTP_HEADER_FORWARD | Forwarding | Structure header forwarding pointer (followed by all non-raw reads) |
#o07 | DTP_ELEMENT_FORWARD | Forwarding | Structure element forwarding pointer |
#o10 | DTP_FIXNUM | Numeric | 32-bit signed two's-complement integer |
#o11 | DTP_SMALL_RATIO | Numeric | Immediate ratio: <31:16> signed numerator, <15:0> unsigned denominator |
#o12 | DTP_SINGLE_FLOAT | Numeric | 32-bit IEEE-754 single-precision float |
#o13 | DTP_DOUBLE_FLOAT | Numeric | Pointer to 2-word IEEE-754 double-precision float |
#o14 | DTP_BIGNUM | Numeric | Pointer to DTP_HEADER_I bignum (<26:0> word count, <27> sign) |
#o15 | DTP_BIG_RATIO | Numeric | Pointer to 2-word general ratio [numerator, denominator] |
#o16 | DTP_COMPLEX | Numeric | Pointer to 2-word complex number [real, imag] |
#o17 | DTP_SPARE_NUMBER | Numeric | Spare numeric type (traps to software arithmetic handler) |
#o20 | DTP_INSTANCE | Instance | Standard CLOS / Flavors instance pointer |
#o21..#o23 | DTP_{LIST,ARRAY,STRING}_INSTANCE | Instance | Instances masquerading as list, array, or string |
#o24 | DTP_NIL | Pointer | Distinguished NIL symbol (0xF8041200) |
#o25 | DTP_LIST | Pointer | Cons / CDR-coded list pointer |
#o26 | DTP_ARRAY | Pointer | Array pointer |
#o27 | DTP_STRING | Pointer | String array pointer |
#o30 | DTP_SYMBOL | Pointer | 5-word symbol pointer (+0 pname, +1 value, +2 function, +3 plist, +4 package) |
#o31 | DTP_LOCATIVE | Pointer | Unchecked direct memory cell pointer |
#o32 | DTP_LEXICAL_CLOSURE | Callable | 2-word [environment, compiled_function] closure |
#o33 | DTP_DYNAMIC_CLOSURE | Callable | Dynamic closure pointer |
#o34 | DTP_COMPILED_FUNCTION | Callable | Compiled function entry pointer |
#o35 | DTP_GENERIC_FUNCTION | Callable | Generic function dispatch pointer |
#o36..#o37 | DTP_SPARE_POINTER_1..2 | Pointer | Spare pointer types |
#o40 | DTP_PHYSICAL_ADDRESS | System | Unmapped full 32-bit physical bus address (bypasses PHT & Zone 31 mask) |
#o41 | DTP_SPARE_IMMEDIATE_1 | Immediate | Spare immediate type |
#o42 | DTP_BOUND_LOCATION | System | Dynamic binding stack marker |
#o43 | DTP_CHARACTER | Immediate | <7:0> subindex, <15:8> charset, <27:16> style, <31:28> bucky bits (C/M/S/H) |
#o44 | DTP_LOGIC_VARIABLE | Logic | Unbound logic variable cell |
#o45 | DTP_GC_FORWARD | GC | Evacuated oldspace heart pointer |
#o46..#o47 | DTP_EVEN_PC, DTP_ODD_PC | PC | Code pointers selecting Even (<17:0>) or Odd (<35:18>) halfword |
#o50..#o57 | DTP_CALL_* | Fullword Call | Fullword Call Starters (Even, Odd, Indirect, Generic, +4 Prefetch variants) |
#o60..#o77 | DTP_PACKED_INSTRUCTION_60..77 | Packed Code | Two 18-bit halfwords (<35:32> belong to Odd instruction's top 4 bits) |
4. Architectural Registers & Ivory Silicon Revisions
4.1 Control Register (%REGISTER-CONTROL-REGISTER, #o14)
| Bits | Field | Description |
|---|---|---|
<7:0> | argument_size | Current frame argument count (+2 frame header words; LP = FP + argument_size) |
<8> | extra_argument | Set to 1 when a closure environment or extra argument was prepended |
<16:9> | caller_frame_size | Word offset from caller's FP to current FP |
<17> | apply | Set by FINISH-CALL-*-APPLY so callee pulls final list argument |
<19:18> | value_disposition | 0=EFFECT, 1=VALUE, 2=RETURN (tail), 3=MULTIPLE |
<21:20> | _spare | Unused |
<22> | call_started | 1 while a StartCall frame is open awaiting FinishCall |
<23> | cleanup_in_progress | Prevents recursive unwind traps during frame cleanup |
<24> | trap_on_exit | Triggers IVORY_TRAP_ERROR with 0x04C9 when frame returns |
<25> | cleanup_bindings | Frame owns dynamic bindings (IVORY_TRAP_DB_UNWIND_FRAME on exit) |
<26> | cleanup_catch | Frame owns catch blocks (IVORY_TRAP_DB_UNWIND_CATCH on exit) |
<27> | trace_pending | Armed trace trap (IVORY_TRAP_TRACE #o5104) |
<28> | call_trace | Trace on function calls |
<29> | instruction_trace | Single-step instruction trace |
<31:30> | trap_mode | 0=Emulator, 1=Extra-Stack, 2=I/O, 3=FEP |
4.2 ALU & Rotate Control Register (%REGISTER-ALU-AND-ROTATE-CONTROL, #o13)
| Bits | Field | Description |
|---|---|---|
<4:0> | byte_r | 5-bit rotate count (0..31) |
<9:5> | byte_s | 5-bit byte width (0..31) |
<13:10> | function_bits | 4-bit ALU op within class (boolean truth table, add/sub/carry, byte insert/extract) |
<15:14> | function_class | 0=Boolean, 1=Byte, 2=Adder, 3=Multiply/Divide step |
<20:16> | condition | 5-bit condition code selector (Rev 3+ extended conditions) |
<21> | condition_sense | Invert condition polarity |
<22> | output_condition | Return boolean T/NIL instead of numeric result |
<23> | enable_condition_exception | Trap if selected ALU condition is true |
<24> | enable_load_cin | Load carry-in from ALU state |
4.3 Ivory Silicon Revisions (Rev 1–4 / 4A)
- Rev 1–2: Initial XL400 / MacIvory Model 1 silicon.
- Rev 3: Extended ALU condition codes.
- Rev 4 & Rev 4A: Standard XL1200 / UX1200S / MacIvory Model 3 silicon. Both Rev 4 and Rev 4A report
%REGISTER-CHIP-REVISION = 4(#o20), share the exact same 2,048-entry Genera 8.3*TRAP-DISPATCH-TABLE*, and add%REGISTER-ADDRESS-MASK(#o37) and%REGISTER-MICROSECOND-CLOCK(#o47, also mirrored at coprocessor register#o1002).
For the full #o000..#o652 external register and #o1000..#o1077 scratchpad catalog, see Internal & Coprocessor Registers.
5. Weitek W3164/W3364 Floating-Point Accelerator (FPA) Registers
XL1200 attaches a Weitek W3164 / W3364 IEEE-754 single/double floating-point coprocessor (advertised via %REGISTER-FP-COPROCESSOR-PRESENT #o21 = 1 and implemented in emu/src/fpa_w3x64.c). Software accesses it via COPROCESSOR-READ (#o156) and COPROCESSOR-WRITE (#o157):
5.1 Operand, Result & Reset Ports
| Octal Reg | Direction | Semantics |
|---|---|---|
#o0000 | R/W | R0_HI — single-float arg0 or double-float arg0 high 32 bits |
#o0001 | R | R1_LO readback |
#o0002 | W / R | Write: R0_LO (double arg0 low); Read: RES_HI (tagged DTP_SINGLE_FLOAT if !last_fpex, else DTP_FIXNUM) |
#o0003 | W / R | Write: R1_LO (double arg1 low); Read: RES_LO (double result low 32 bits) |
#o0200, #o0202 | R/W | R2_HI, R2_LO auxiliary registers |
#o0374 | W | FIXNUM-MULTIPLY arg0 staging register |
#o0400 | R | RES_HI readback |
#o0624 | W | %FPA-RESET-ADDRESS — resets pipeline state, status registers, and rounding mode |
#o1002 | R/W | Rev 4 microsecond_clock (same counter as internal register #o047) |
5.2 Status Registers (#o0600..#o0613, Active Byte in Bits <31:24>)
| Octal Reg | Name | Bit Fields (within <31:24>) |
|---|---|---|
#o0600 | SR0 (Modes 0) | <2:1> IEEE rounding (0=FE_TONEAREST, 1=FE_TOWARDZERO, 2=FE_UPWARD, 3=FE_DOWNWARD); <6> FPEX_STICKY (0x40) |
#o0602 | SR2 (Trap Enables) | NAN=0x80, INV=0x40, DVZ=0x20, DNRM=0x10, OVF=0x08, UNF=0x04, INX=0x02, IOVF=0x01 |
#o0603 | SR3 (Sticky Flags) | Same 8 exception flag bits as SR2 (0x80..0x01) |
#o0606 | SR6 (Unit Status) | <7:4> Adder status nibble, <3:0> Multiplier status nibble |
#o0613 | SR11 (Div / Status) | <7> FPEX_TAKEN (0x80), <6> DSR_IN_PROGRESS (0x40), <5> FPCN compare bit (0x20), <3:0> Divider status nibble |
5.3 *W3X64-STATUS-CODES* & Wrapped Underflow Exponent Format
Unit status nibbles in SR6 and SR11 follow the Weitek W3x64 encoding:
| Nibble | Code | Nibble | Code |
|---|---|---|---|
0 | NORM_EXACT_32 | 8 | NORM_EXACT_64 |
1 | NORM_INEXACT_32 | 9 | NORM_INEXACT_64 |
2 | UNORM_EXACT_32 | 10 | UNORM_EXACT_64 |
3 | UNORM_INEXACT_32 | 11 | UNORM_INEXACT_64 |
4 | OVF_32 | 12 | OVF_64 |
| — | — | 13 | OVF_64_TO_32 |
| — | — | 14 | UNF_64_TO_32 |
| — | — | 15 | INT_OVF |
When an IEEE underflow trap is enabled (SR2.UNF), the W3x64 produces a wrapped exponent result (exponent biased up by +192 for single precision or +1536 for double precision) so Genera's SINGLE-FLOAT-UNWRAP / DOUBLE-FLOAT-UNWRAP trap handler can recover exact subnormal precision without losing significand bits.
6. On-Chip Stack Cache & Cold-Boot Reset State
Ivory integrates a 128-word circular control stack cache (stack_cache[128]) mapped as a sliding window starting at %REGISTER-STACK-CACHE-LOWER-BOUND (#o05) up to SP:
- Pushing past
stack_cache_overflow_limitspillsSTACK-CACHE-DUMP-QUANTUM(#o1031) words from the bottom of the cache to backing RAM. - Popping or returning below
stack_cache_lower_boundrefills from backing RAM automatically. - Direct memory reads/writes targeting a VMA inside
[stack_cache_lower_bound, SP]are intercepted transparently so pointers to stack-allocated slots remain coherent.
Rev 4 Cold-Boot State (ivory_cpu_reset)
| Register | Cold-Reset Value |
|---|---|
PC | (DTP_EVEN_PC, entry_vma) (0xF8007162 for FEP 3.30 IFEP promJ) |
CR | trap_mode = 3 (FEP), argument_size = 2 |
FP, stack_cache_lower_bound | 0xF8008000 (DTP_LOCATIVE) |
LP | FP + 2 (0xF8008002) |
SP | LP - 1 (0xF8008001) |
chip_revision | 4 |
fp_coprocessor_present | 1 (Weitek W3x64 enabled) |
scratchpad[#o40] (CONSTANT_NIL) | (DTP_NIL, 0xF8041200) |
scratchpad[#o41] (CONSTANT_T) | (DTP_SYMBOL, 0xF8041208) |
- Weitek WTL1164/1165 (W3x64 family) —
weitek_WTL1164_1165_64bit_ieee_1986.pdf(mirror) - Weitek WTL3132/3332 (W3x64 family) —
weitek_WTL3132_3332_fpdp_1988.pdf(mirror) - Weitek WTL3167 (W3x64 core) —
weitek_WTL3167_coprocessor_1988.pdf(mirror)