Skip to content

The Z80 does not converge from a cold power-on #2

Description

@isenbek

Recorded as an expectation in tests/chips.rs rather than asserted away.

6502  power-on: converged
6800  power-on: converged
z80   power-on: did NOT converge

"Did not converge" means the solver hit MAX_SETTLE_ROUNDS (100) without
reaching a fixed point. That cap matches the reference implementation, which
silently gave up; here it is counted in Stats::nonconvergent_settles.

What this is not

It is not evidence that the Z80 oscillates. These tests perform no
chip-specific initialisation, and visual6502 ships a support.js per chip that
does. The useful half of the result is that the engine runs a die twice the size
of the one it was developed against and reports the failure instead of hanging
or returning a plausible wrong answer.

The lead

cargo run --example inspect -- extern/visual6502/chip-z80 reports:

WARNING: 32 transistors are gated by the supply rail

The 6502 has none. A transistor gated by the supply is permanently on in
silicon and permanently off in this model, because group evaluation never
crosses a rail. Thirty-two of those is easily enough to change what the chip
settles to, and might be enough to stop it settling at all.

Nobody has tested this. It is a lead, not a cause.

Things worth trying

  • Perform the initialisation support.js does for the Z80 and see whether it
    converges then.
  • Identify which nodes are still changing at round 100 — if they are a small
    cluster, that names the structure responsible.
  • Check whether the supply-gated transistors are near those nodes.

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

    help wantedExtra attention is neededmeasurementNeeds measuring, or a recorded result that nobody has explained yet

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions