Ivory Internal & Coprocessor Registers
This document catalogs every architectural internal register accessed via READ-INTERNAL-REGISTER (#o154) and WRITE-INTERNAL-REGISTER (#o155), plus the Weitek W3164/W3364 Floating-Point Accelerator (FPA) and microsecond clock registers accessed via COPROCESSOR-READ (#o156) and COPROCESSOR-WRITE (#o157).
All register numbers, bitfields, and behaviors match emu/include/ivory_hw.h, emu/src/cpu.c, and emu/src/fpa_w3x64.c. For data-type encodings and the full Control/ALU register bit layouts, see Volume 1: CPU Data Types & Registers.
Primary Reference Sources (local-only when present):
genera-original/sys.sct/i-sys/sysdf1.lisp— Internal register numbers#o000..#o652and#o1000..#o1077.genera-original/sys.sct/i-sys/sysdef.lisp— Control Register (CR) and ALU & Rotate Control bitfields.genera-original/sys.sct/i-compiler/i-sysdef-support.lisp— Compiler register map.genera-original/sys.sct/i-sys/fpa.lisp— Weitek W3164/W3364 FPA coprocessor register map and status nibbles.
Read Invariant:
READ-INTERNAL-REGISTER(#o154) always forces the returned word's CDR code toIVORY_CDR_NEXT(0), regardless of what CDR bits were previously stored.
1. External Bus & Processor State Registers (#o000..#o652)
Registers indexed by Block Address Register (BAR0..3) add (bar << 7) (+#o000, +#o200, +#o400, +#o600) to the base register number.
| Octal | Enum Constant (ivory_hw.h) | Access | Description |
|---|---|---|---|
#o000 | IVORY_REG_EA | R/W | Effective Address register |
#o001 | IVORY_REG_FP | R/W | Frame Pointer (DTP_LOCATIVE) |
#o002 | IVORY_REG_LP | R/W | Local Pointer (DTP_LOCATIVE) |
#o003 | IVORY_REG_SP | R/W | Stack Pointer (R: E.SP, W: D.SP, DTP_LOCATIVE) |
#o004 | IVORY_REG_MACRO_SP | R | Committed macroinstruction Stack Pointer (C.MACRO-SP) |
#o005 | IVORY_REG_STACK_CACHE_LOWER_BOUND | R/W | Lowest VMA currently resident in the 128-word on-chip stack cache |
#o006, #o206, #o406, #o606 | IVORY_REG_BAR_0..3 | R/W | Block Address Registers 0..3 (DTP_LOCATIVE or DTP_PHYSICAL_ADDRESS) |
#o007, #o207, #o407, #o607 | IVORY_REG_PHT_HASH_0..3 | R | Hardware 26-bit PHT bucket offset (ivory_pht_hash(BARn)) |
#o010 | IVORY_REG_PC | R/W | Program Counter (DTP_EVEN_PC / DTP_ODD_PC) |
#o011 | IVORY_REG_D_PC | R | Decode-stage PC (D.PC) |
#o012 | IVORY_REG_CONTINUATION | R/W | Saved return PC / pending StartCall target |
#o013 | IVORY_REG_ALU_AND_ROTATE_CONTROL | R/W | 32-bit ALU operation, byte rotate/size (R/S), and condition register |
#o014 | IVORY_REG_CONTROL_REGISTER | R/W | 32-bit Control Register (CR: arg size, caller frame size, disposition, trace, trap mode) |
#o015 | IVORY_REG_CR_ARGUMENT_SIZE | R | Low 8 bits (<7:0>) of CR as DTP_FIXNUM |
#o016 | IVORY_REG_EPHEMERAL_OLDSPACE | R/W | 32-bit bitmask of Zone 0 ephemeral half-levels in oldspace |
#o017 | IVORY_REG_ZONE_OLDSPACE | R/W | 32-bit bitmask of Zones 0..31 in oldspace |
#o020 | IVORY_REG_CHIP_REVISION | R | Ivory silicon revision (4 for XL1200 Rev 4 and Rev 4A) |
#o021 | IVORY_REG_FP_COPROCESSOR_PRESENT | R/W | Floating-point coprocessor presence flag (1 = W3x64 FPA attached) |
#o022 | IVORY_REG_MICROCODE_RETURN_ADDRESS | R | Microcode return address (diagnostic) |
#o023 | IVORY_REG_PREEMPT_REGISTER | R/W | Preempt / interrupt status (reflects Merlin-II pending sequence breaks) |
#o024 | IVORY_REG_ICACHE_CONTROL | R/W | Instruction cache enable / flush control (writes flush emulator IvoryDcache & L0 cache) |
#o025 | IVORY_REG_PREFETCHER_CONTROL | R/W | Instruction prefetcher control |
#o026 | IVORY_REG_MAP_CACHE_CONTROL | R/W | Map Cache enable / flush control (writes invalidate Map Cache & bump map_epoch) |
#o027 | IVORY_REG_MEMORY_CONTROL | R/W | Memory interface & ECC control |
#o030 | IVORY_REG_ECC_LOG | R | ECC syndrome log |
#o031 | IVORY_REG_ECC_LOG_ADDRESS | R | Faulting address of last ECC event |
#o032, #o232, #o432, #o632 | IVORY_REG_INVALIDATE_MAP_0..3 | W | Invalidate Map Cache entry matching BAR0..3 |
#o033, #o233, #o433, #o633 | IVORY_REG_LOAD_MAP_0..3 | W | Load PHT1 word into Map Cache for BAR0..3 |
#o034 | IVORY_REG_STACK_CACHE_OVERFLOW_LIMIT | R/W | Spill threshold for the 128-word stack cache |
#o035 | IVORY_REG_UCODE_ROM_CONTENTS | R | Microcode ROM inspection |
#o036 | IVORY_REG_LOOP_COUNTER | W | Hardware loop counter |
#o037 | IVORY_REG_ADDRESS_MASK | R/W | Rev 4+: Physical address mask register |
#o040 | IVORY_REG_ENTRY_MAXIMUM_ARGUMENTS | R | Callee max_args latched from ENTRY instruction |
#o041 | IVORY_REG_LEXICAL_VARIABLE | R | Current lexical variable pointer |
#o042 | IVORY_REG_INSTRUCTION | R | Current instruction halfword |
#o043 | IVORY_REG_IMMEDIATE | W | Immediate operand register |
#o044 | IVORY_REG_MEMORY_DATA | R | Last memory data word read |
#o045 | IVORY_REG_DATA_PINS | R/W | External data pins (diagnostic) |
#o046 | IVORY_REG_EXTENSION_REGISTER | R/W | 32-bit extension register (used by double-word multiply/divide) |
#o047 | IVORY_REG_MICROSECOND_CLOCK | R/W | Rev 4+: Free-running 32-bit microsecond counter (1 µs per 4 instructions in deterministic mode) |
#o050 | IVORY_REG_ARRAY_HEADER_LENGTH | R | Fast array header length latch |
#o052, #o252, #o452, #o652 | IVORY_REG_LOAD_MATCHING_MAP_0..3 | W | Update Map Cache entry with PHT1 only if VPN matches BAR0..3 |
2. On-Chip Scratchpad Registers (#o1000..#o1077)
All 64 scratchpad locations are 40-bit R/W words (cpu->scratchpad[reg_no - 01000]). Architecturally assigned slots:
| Octal | Enum Constant (ivory_hw.h) | Cold-Reset Value / Purpose |
|---|---|---|
#o1000 | IVORY_REG_TOS | Top-of-stack mirror (read/write accesses live stack TOS) |
#o1001 | IVORY_REG_EVENT_COUNT | Monotonic event counter |
#o1002 | IVORY_REG_BINDING_STACK_POINTER | Current dynamic binding stack top (DTP_LOCATIVE) |
#o1003 | IVORY_REG_CATCH_BLOCK_LIST | Head of active CATCH block chain |
#o1004 | IVORY_REG_CONTROL_STACK_LIMIT | Normal control stack overflow threshold |
#o1005 | IVORY_REG_CONTROL_STACK_EXTRA_LIMIT | Extra-stack overflow threshold (trap_mode == 1) |
#o1006 | IVORY_REG_BINDING_STACK_LIMIT | Dynamic binding stack overflow threshold |
#o1007 | IVORY_REG_PHT_BASE | Wired VMA base of Page Hash Table |
#o1010 | IVORY_REG_PHT_MASK | Power-of-two PHT bucket bitmask |
#o1011 | IVORY_REG_COUNT_MAP_RELOADS | Count of Map Cache reloads from PHT |
#o1012 | IVORY_REG_LIST_CACHE_AREA | Fast consing area for ALLOCATE-LIST-BLOCK |
#o1013 | IVORY_REG_LIST_CACHE_ADDRESS | Current consing pointer |
#o1014 | IVORY_REG_LIST_CACHE_LENGTH | Remaining words in list consing chunk |
#o1015 | IVORY_REG_STRUCTURE_CACHE_AREA | Fast allocation area for ALLOCATE-STRUCTURE-BLOCK |
#o1016 | IVORY_REG_STRUCTURE_CACHE_ADDRESS | Current structure allocation pointer |
#o1017 | IVORY_REG_STRUCTURE_CACHE_LENGTH | Remaining words in structure allocation chunk |
#o1020 | IVORY_REG_DYNAMIC_BINDING_CACHE_BASE | Base of dynamic binding hash cache |
#o1021 | IVORY_REG_DYNAMIC_BINDING_CACHE_MASK | Mask of dynamic binding hash cache |
#o1022 | IVORY_REG_CHOICE_POINTER | Logic-programming (Prolog) choice pointer |
#o1023 | IVORY_REG_STRUCTURE_STACK_CHOICE_POINTER | Structure-stack choice pointer |
#o1024 | IVORY_REG_FEP_MODE_TRAP_VECTOR_ADDRESS | Trap vector base used when CR.trap_mode == 3 (IVORY_TRAP_MODE_FEP) |
#o1026 | IVORY_REG_MAPPING_TABLE_CACHE | Flavors/CLOS instance mapping table cache pointer |
#o1027 | IVORY_REG_MAPPING_TABLE_LENGTH | Mapping table cache length |
#o1030 | IVORY_REG_STACK_FRAME_MAXIMUM_SIZE | Maximum single frame size before FRAME_OVERFLOW |
#o1031 | IVORY_REG_STACK_CACHE_DUMP_QUANTUM | Words spilled per stack-cache overflow dump |
#o1040 | IVORY_REG_CONSTANT_NIL | Cold reset: (DTP_NIL, 0xF8041200) (IVORY_NIL_PMA) |
#o1041 | IVORY_REG_CONSTANT_T | Cold reset: (DTP_SYMBOL, 0xF8041208) (IVORY_T_PMA) |
(Note: Scratchpad slots #o1025, #o1032..#o1037, and #o1042..#o1077 are general software/FEP scratchpad storage.)
3. Coprocessor Registers (#o156 / #o157 — Weitek W3x64 FPA & Clock)
COPROCESSOR-READ (#o156) and COPROCESSOR-WRITE (#o157) take a 10-bit immediate register address targeting either the Weitek W3164/W3364 Floating-Point Accelerator (emu/src/fpa_w3x64.c) or the Rev 4 microsecond clock:
Data & Control Ports
| Octal | Access | Purpose |
|---|---|---|
#o0000 | R/W | R0_HI (single-float arg0 or double-float arg0 high word) |
#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 word) |
#o0200, #o0202 | R/W | R2_HI, R2_LO auxiliary operand registers |
#o0374 | W | FIXNUM-MULTIPLY arg0 staging register |
#o0400 | R | RES_HI readback |
#o0624 | W | %FPA-RESET-ADDRESS — resets FPA pipeline, sticky flags, and rounding mode |
#o1002 | R/W | Rev 4 microsecond_clock (identical counter to %REGISTER-MICROSECOND-CLOCK #o047) |
FPA Status Registers (#o0600..#o0613, Value in Bits <31:24>)
| Octal | Register | Bit Layout (within byte <31:24>) |
|---|---|---|
#o0600 | SR0 (Modes 0) | <2:1>: IEEE-754 rounding (0=Nearest, 1=TowardZero, 2=Upward, 3=Downward); <6>: FPEX_STICKY (0x40) |
#o0602 | SR2 (Trap Enables) | <7> NAN (0x80), <6> INV (0x40), <5> DVZ (0x20), <4> DNRM (0x10), <3> OVF (0x08), <2> UNF (0x04), <1> INX (0x02), <0> IOVF (0x01) |
#o0603 | SR3 (Sticky Flags) | Same bit positions as SR2 (0x80..0x01) |
#o0606 | SR6 (Unit Status) | <7:4> Adder status nibble, <3:0> Multiplier status nibble (*W3X64-STATUS-CODES*) |
#o0613 | SR11 (Divider / Exception) | <7> FPEX_TAKEN (0x80), <6> DSR_IN_PROGRESS (0x40), <5> FPCN compare condition (0x20), <3:0> Divider status nibble |
Writing R1_HI to an operation trigger address (opcode + 1) executes the IEEE-754 single/double add, subtract, multiply, divide, square-root, negate, absolute-value, compare, or integer conversion immediately and updates SR3/SR6/SR11 and last_fpex. Compare result reads (opcode + 2) return T or NIL (or DTP_FIXNUM 0 when last_fpex fired).
4. Merlin-II Motherboard & I/O Registers (External Physical Bus)
Motherboard peripherals are not Ivory internal registers; they are memory-mapped at full 32-bit physical addresses accessed via DTP-PHYSICAL-ADDRESS (#o40):
0x08000000–0x08000003: Intel 82C54 Programmable Interval Timer0x09000000–0x090007FF: SGS-Thomson MK48T02 2 KB NVRAM & Time-of-Day Clock0x0A000000–0x0A00000C: Merlin-II Diagnostic LEDs (+0x0), Cache Control (+0x4), VME Timeout (+0x8), Interrupt Status (+0xC)0x40000000–0x4000FFFF: I/O Board 0 64 KW DMA SRAM0x44014000–0x4402D001: IO0 peripherals (SCN68562 DUSCC, 8237A DMAC, WD33C93A SCSI, DP8466 ESDI, Video / Intel 82586 Ethernet control)0x48000000: 512 KW Monochrome Console VRAM (1152×896)
See Volume 3: Virtual Memory, Paging & GC and Volume 4: Merlin-II Core & VMEbus for full register-level bitfields.
- Intel 8237A —
intel_8237A_dmac.pdf - Intel 82586 —
intel_82586_lan_coprocessor.pdf(mirror) - Intel 82586 —
intel_82586_reference_manual_1983.pdf(mirror) - Intel 82C54 —
intel_82C54_pit.pdf - National DP8466 / DP8466A —
national_1988_mass_storage_DP8466.pdf(mirror) - National DP8466A (AN-0500) —
national_DP8466A_AN0500_esdi_1987.pdf(mirror) - Signetics SCN68562 / SCN26562 —
signetics_1991_IC019_data_comm_SCN68562.pdf(mirror) - Mostek MK48T02 / ST M48T02 —
st_M48T02_MK48T02_timekeeper.pdf - Western Digital WD33C93A —
wd_WD33C93A_datasheet_and_appnotes_1990.pdf(mirror) - Western Digital WD33C93A —
wd_WD33C93A_scsi_datasheet.pdf(mirror) - 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)