Skip to content
Tactiverge

Transparent by design

What the model assumes, and what it leaves out.

The Architecture Challenge is scored on simplified educational models from the Silicon Studio. They are deliberately small so that every result can be checked by hand. They are not engineering-grade simulators and they do not predict how fast a real computer runs.

Bench-8 processor

Models

  • One 8-bit accumulator A; flags Z, C, N, V; an 8-bit program counter.
  • 256 bytes of memory shared by program and data (a von Neumann machine), so a program can overwrite itself.
  • Sixteen instructions, each exactly two bytes: opcode in the high nibble, then an operand.
  • Every instruction runs as micro-steps: four fetch steps, one decode step, then 0–3 execute steps. One micro-step is one conceptual cycle.
  • IN reads the next number from an input tape (0 if the tape is empty); OUT appends A to an output tape.
  • SUB sets C = 1 on a borrow (A was smaller). Some real processors store the opposite; this model picks borrow because it reads naturally.

Leaves out

  • No real clock period, propagation delay, memory latency or power.
  • No stack, interrupts, index registers, multiply or shift instructions.
  • No caches inside Bench-8 itself: the cache problems use the separate cache model below.
  • It is invented for teaching and is not a real or historical chip.

Gate circuits and state machines

Models

  • Ideal logic: every wire is exactly 0 or 1.
  • Gates switch instantly; a circuit's outputs are a pure function of its inputs.
  • State machines change state only on a clock edge (Moore outputs depend on the state alone).

Leaves out

  • No timing, glitches, fan-out limits, noise or metastability.
  • No transistor-level behaviour.

Cache model

Models

  • Lines, block size and associativity are powers of two; address = tag | set | offset.
  • Least-recently-used replacement inside a set.
  • Reads only, one level, starts empty.

Leaves out

  • No write policy, prefetching, multiple levels or timing.
  • Hit rates are counts on a given trace, not a performance prediction.

Pipeline model

Models

  • A 5-stage pipeline (IF ID EX MEM WB), one time unit per stage, driven by the instructions a Bench-8 run actually executed.
  • Data hazards are read-after-write on A or the flags. Without forwarding a consumer waits for write-back; with forwarding only a memory or input result used immediately stalls 1 clock.
  • Branches are predicted not-taken and resolved in EX (a taken branch costs 2 clocks).
  • A single-cycle machine is modelled as a clock 5 units long, one instruction per clock.

Leaves out

  • Structural hazards (one memory for code and data) are ignored.
  • No latch overhead, caches or real clock rates.

The cycle table

Read straight from the model that scores your programs, so it cannot disagree with it.

Bench-8 instructions, what they do and how many cycles they take
InstructionOpcodeDoesFlagsCycles
NOP0x0Do nothing for one instruction.—5
LDI n0x1Load the number n itself into A.Z N6
LDA a0x2Load the byte stored at address a into A.Z N7
STA a0x3Store A into memory at address a.—7
ADD a0x4Add the byte at a to A (8-bit wraparound, C = carry out).Z C N V8
SUB a0x5Subtract the byte at a from A (C = 1 means a borrow: A was smaller).Z C N V8
AND a0x6Bitwise AND with the byte at a.Z C N V8
OR a0x7Bitwise OR with the byte at a.Z C N V8
XOR a0x8Bitwise XOR with the byte at a.Z C N V8
NOT0x9Flip every bit of A.Z C N V6
JMP a0xAJump: the next instruction comes from address a.—6
JZ a0xBJump to a if the last result was zero.—6
JC a0xCJump to a if the last ADD carried (or the last SUB borrowed).—6
IN0xDRead the next number from the input tape (0 if the tape is empty).Z N6
OUT0xEWrite A to the output display.—6
HALT0xFStop the clock.—6

How a score is computed and reproduced

  1. Step 1

    Assemble

    Your text is assembled into bytes by the same two-pass assembler the Silicon Studio uses. Comments, spacing and label names do not reach the bytes.

  2. Step 2

    Run every test

    Each public test boots a fresh machine (memory cleared, then your bytes, then any preset data) and runs until HALT or 20,000 cycles.

  3. Step 3

    Compare exactly

    A test passes only when the output tape equals the expected list, number for number, and the machine halted. Total cycles add up over every test.

  4. Step 4

    Fingerprint

    The receipt is an FNV-1a fingerprint of the model version (bench8-v1), the problem, your bytes, and each test's output, stop reason and cycles.

  5. Step 5

    Re-run on the server

    Verify sends your text to a server function that repeats the same steps. It never executes your text as code: it only feeds it to the bounded model. Nothing is stored.

  6. Step 6

    Keep answers private

    Answer keys and explanations for the work-it-out questions stay on the server. You see the reasoning after a correct answer or your third try.

Every expected result and answer in this challenge is checked by automated tests that run these same models (review status: technically checked). No educator has reviewed the problems yet.