Skip to content

[RFC / Discussion] Are ISA & AMMX instruction proposals welcome? (Example: PMAC4.L and MAAAC/MASAC) #54

Open

Description

@Rudi7503

Hi @WDrijver @gunnar,

We would like to ask whether it is welcome and useful for the community and AI coding agents to submit concrete ISA / AMMX extension proposals (RFCs) to this repository, or if you prefer keeping ApolloKnowledgeBase strictly scoped to current core releases (Core 11350/12841).

The Idea: AI Agents Actively Identifying Missing Instructions

When AI coding agents write and optimize production code on Apollo V4 (e.g. video/audio codecs, 3D geometry transformation engines, or signal processing), they frequently encounter inner loop bottlenecks where the 68080 is forced to fall back to multi-instruction workarounds.

AI agents analyzing cycle bottlenecks are in a unique position to actively identify and propose missing instructions that would maximize the performance and silicon efficiency of the 68080 (and future 128-bit AMMX units).


Example Proposal: Dual/Quad Vector MAC & Complex Multipliers (PMAC4.L, MAAAC, MSSAC, MASAC)

As an example of what such proposals look like, here is a concrete instruction set extension designed while optimizing 3D matrix-vector pipelines and audio synthesis:

1. 128-bit AMMX: PMAC4.L (4-Lane Dot-Product with 8 Guard Bits)

  • Syntax: PMAC4.L Ea, Eb, Ec
  • Operation:
    Ec = Ec + (((a0 * b0) + (a1 * b1) + (a2 * b2) + (a3 * b3)) >> 8)
    
  • Why it matters:
    • Multiplies four 32x32-bit signed integers in parallel and accumulates the horizontal sum.
    • The 8-bit right shift reserves 8 guard bits, allowing up to 256 consecutive accumulations without 64-bit overflow.
    • Result: Calculates an entire 4D vector dot-product (e.g. a 4x4 matrix row transformation $[X,Y,Z,W]$) in 1 single instruction and 1 clock cycle! A 10-vertex 3D transform loop executes in just ~8.5 cycles per vertex (>10 million vertices/sec @ 92 MHz).

2. Dual DSP Vector MAC Quartet: MAAAC, MSSAC, MASAC

  • Operations:
    • MAAAC.W: $\text{Acc0} += a_0 \cdot b_0, \quad \text{Acc1} += a_1 \cdot b_1$ (Dual FIR / Stereo Audio)
    • MSSAC.W: $\text{Acc0} -= a_0 \cdot b_0, \quad \text{Acc1} -= a_1 \cdot b_1$ (Gradient descent / Error minimization)
    • MASAC.W: $\text{Acc0} += a_0 \cdot b_0, \quad \text{Acc1} -= a_1 \cdot b_1$ (Complex Multiplication & FFT/DCT Butterflies)
  • Why it matters:
    • Full complex multiplication $(A_{re} + jA_{im}) \times (B_{re} + jB_{im})$ computes in only 2 cycles without spilling registers.
    • 48-bit accumulator preserves 16 guard bits (up to 65,536 loops without overflow).

Would you like us to submit such AI-assisted ISA proposals in a dedicated folder (e.g. rfcs/ or proposals/) or as GitHub Issues, so core developers and AI agents can discuss and evaluate new instructions for upcoming cores?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions