Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutRoadmapCareersInternshipsFAQContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • The NanoSoC Tour
  • Reading Path
  • SoC Glossary10
  • SoC Metrics Reference
  • SoC Cheatsheet
  • What SoC Integration Is12
  • Architecture and Budgets21
  • Memory Maps and Address Decode26
  • Interconnect and Bus Fabrics26
  • Clock and Reset Architecture24
  • Power Architecture21
  • Interrupts, DMA and Peripherals15
  • Memories, Boot and Security21
  • IP Integration and Handoff21
    • IP Collateral and Versioning
    • Wrappers and Adapters
    • Integration Lint and Connectivity Checks
    • Top-Level SDC and Constraint Merge
    • DFT Integration
      • Test-Mode Architecture
      • Scan Chains and Wrapper Cells
      • Test Pins and Entry Sequence
    • Debug Infrastructure
    • Safety and Fault Architecture
  • Top-Level Verification and Bring-up21
  • Package, Pads and I/O18
  • Chip Signoff and Tapeout18
  • SoC Interview Prep16
  • Capstone: Integrate NanoSoC14
Loading lesson

←DFT Integration
  1. Topics
  2. SoC Design
  3. IP Integration and Handoff
  4. DFT Integration
  5. Test Pins and Entry Sequence
On this page

    Part 9 of 14, lesson 15 of 21Part 9 of 14/IP Integration and Handoff/Lesson 15 of 21All levels

    Test Pins and Entry Sequence

    Which pins test uses, their reset states, and the entry and exit sequence that cannot brick the mission.

    Extension topic: NanoSoC v1 has no scan or test hardware. This lesson uses the NanoSoC test extension described in the DFT Integration overview; numbers marked illustrative belong to that extension only.

    Why it matters

    Test needs pins and pins are scarce: scan-in, scan-out, test clock, test mode and test reset compete with functional I/O, and a test pin that floats at reset can put the chip into test or hold it there. The entry sequence is the other half of the danger: switching clocks and isolation while the chip runs corrupts state the mission never recovers. NanoSoC's user pins are the 16 GPIO pads (the UART and SPI share six of them), plus the reset pin and the crystal, so a test extension has to say which of them it borrows and when. The reset-state table and the ordered sequence below are what keep the mission safe.

    The core idea

    Each test pin has a defined reset state that is safe for mission: test mode pulled to inactive so a floating pin can never enter test, test clock gated off, scan outputs tristated or parked. Shared pins are allowed only with a documented priority: at reset the mission function owns the pin until the entry sequence claims it, and the test-mode pin is sampled only after the reset pin's debounce (16 clk_per cycles, 666.7 ns) has completed. Entry runs in order: halt the clocks cleanly, assert resets, switch muxes to test sources, configure isolation for the test configuration, then release test reset and start shifting. Exit reverses the order and ends with a full mission reset release through the normal sequence, because no mission state survives test and pretending it does is how bricked bring-up starts.

    example.py
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    # Entry and exit order. The preconditions live in their own table, so a
    # reordered sequence can be caught; the check does not trust the list itself.
    ENTRY = ["halt clocks", "assert resets", "switch to test sources",
             "configure isolation", "release test reset", "start shifting"]
    EXIT = ["stop shifting", "assert resets", "restore mission sources",
            "restore isolation", "mission reset release"]
    NEEDS_ENTRY = {"assert resets": "halt clocks",
                   "switch to test sources": "assert resets",
                   "configure isolation": "switch to test sources",
                   "release test reset": "configure isolation",
                   "start shifting": "release test reset"}
    NEEDS_EXIT = {"assert resets": "stop shifting",
                  "restore mission sources": "assert resets",
                  "restore isolation": "restore mission sources",
                  "mission reset release": "restore isolation"}
    
    def check(seq, needs):
        for i, step in enumerate(seq):
            need = needs.get(step)
            assert need is None or need in seq[:i], f"{step} before {need}"
        return True
    
    assert check(ENTRY, NEEDS_ENTRY) and check(EXIT, NEEDS_EXIT)
    bad = ENTRY[:3] + ["release test reset", "configure isolation"] + ENTRY[5:]
    try:
        check(bad, NEEDS_ENTRY)
        raise SystemExit("reordered entry was not caught")
    except AssertionError as e:
        assert "release test reset before configure isolation" in str(e)
    
    # Reset-state model: what a pin resolves to when nobody drives it.
    PIN_AT_RESET = {"test_mode": "pull-down", "test_clk": "pull-down",
                    "scan_in": "none"}
    def resolve(pin, driven):
        if driven is not None:
            return driven
        return {"pull-down": 0, "pull-up": 1, "none": "X"}[PIN_AT_RESET[pin]]
    assert resolve("test_mode", None) == 0        # floating pin cannot enter test
    assert resolve("scan_in", None) == "X"        # unpulled pin is flagged, not trusted
    assert resolve("test_mode", 1) == 1           # an explicit drive still wins
    print("PASS: reordered entry rejected; floating test_mode resolves to 0; unpulled pin is X")

    What the review looks for

    • The reset-state table for every test and shared pin, with pulls specified and the floating-pin case argued explicitly.

    • The entry and exit sequences above, simulated in both directions including refusal of illegal transitions.

    • The test-mode pin sampled only after the reset debounce, and the shared-pin priority written down.

    Verify and debug

    Simulate entry from a running mission: the switch must leave no half-muxed clock and no unisolated crossing, checked with assertions on every mux select during the sequence. On the bench, confirm the reset state of each pin before the first entry attempt; a pin that floats toward test will eventually get there on a noisy board. If exit leaves the mission misbehaving, stop debugging the mission and rerun the mission reset release: exit without a full release is not exit.

    Test mode left enabled in mission mode: a test-mode or scan-enable pin floating, shared with a functional pin, or pulled the wrong way, so the chip shifts instead of running. Caught by DFT checks and a reset-state pin table reviewed as strictly as the connectivity tie list; fixed with defined pulls and a glitch-free control that is sampled only after the reset debounce.

    If asked how test and mission share pins safely, answer: mission owns the pin at reset by pull, test claims it only through the sequenced entry, and exit ends with a full mission reset. Then name the unforgivable sin: a floating test-mode pin.

    Check yourself Entry to at-speed capture is attempted while the PLL is unlocked. What must the controller do?

    Refuse and stay in mission: the capture clocks come from the PLL, so an unlocked PLL gives undefined capture timing. The refusal must be clean, with mission clocks and resets untouched. Entry into a shift-only configuration on the tester's clock does not depend on the PLL.

    Related topics

    • Scan Chains and Wrapper Cells

    • Next: Debug Infrastructure

    • DFT: Boundary Scan Cells

    Previous

    186 / 289

    Next: Top-Level Verification and Bring-up

    Up next

    Up nextTop-Level Verification and Bring-up

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Test-Mode Architecture