Skip to content

analog M4: the SAR ADC of the golden deck -- capacitive DAC, dynamic comparator, sampling switch, SAR logic, then the whole converter against ngspice #10524

Open

Description

@gHashTag

Goal

M4 of #10486, re-targeted on 2026-10-18 by the partner (Symbiotic EDA): the ring oscillator is a digital block and not relevant to them; the ADC is. The acceptance circuit is the SAR ADC of uberWAVE's golden deck (wp2-parser/golden/top.spice, xschem, IHP SG13G2, GPL-2.0, used at run time, never vendored) and the reference waveform is the ngspice result of that deck (SAR_top_tb_tran.raw, ASCII RAW; a 1 GB variant is in uberWAVE's release). The deck runs tran 0.1n 16u with a 62.5 kHz differential sine on Vinp/Vinn and a 2 MHz sample clock.

Decomposition (each a sub-issue when it starts)

Boundary

Scenarios

  • Given the golden deck and the RAW, When M4e runs, Then every conversion's code equals ngspice's.
  • Given the DAC alone, When each code is applied, Then the top-plate voltage matches ngspice within the stated bound.
  • Given a comparator input of 1 mV, When it is clocked, Then the decision matches ngspice and the decision time is reported.

Requirements

  • FR-001: Each block MUST be checked against ngspice with the same IHP models and corner before it is composed.
  • FR-002: The level of each block (device, switch, gate) MUST be named in every report.

Success Criteria

  • M4e: 100 % of the conversion codes in the golden 16 us run match ngspice (count stated).
  • Each of M4a..M4d has a test-report with 0 vacuous and an ngspice comparison with a named bound.

Part of #10486

Activity

  1. gHashTag commented on Oct 18, 2026

    @gHashTag
    OwnerAuthor

    Correction to #10540's premise (mine): I wrote that the 1-unit bridge carries a built-in gain error because the ideal bridge for a 5 + 5 split is 32/31 of a unit. That holds only for an LSB array with a dummy unit (32 units). The deck's LSB array has 31 units and no dummy, and for it the ideal bridge is CL/31 = exactly 1 unit. Measured in PR #10575 over all 1024 codes of one half: the staircase is perfectly straight (INL 0; every Vout ratio is 2^(j-1)/1023), and the only deviation from a nominal 10-bit half is a gain error of (2c - 1023)/2046 LSB, at most 0.5 LSB at codes 0 and 1023. So the DAC topology is not a source of the converter's code error; the integration error has to come from elsewhere (comparator, switch, logic timing). The lane that built #10575 found and flagged this.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions