<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rana Umar Nadeem on Medium]]></title>
        <description><![CDATA[Stories by Rana Umar Nadeem on Medium]]></description>
        <link>https://medium.com/@ranaumarnadeem?source=rss-1d68360f7ace------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*J9ZGYdx2btoKaD3Z9GfSiA.png</url>
            <title>Stories by Rana Umar Nadeem on Medium</title>
            <link>https://medium.com/@ranaumarnadeem?source=rss-1d68360f7ace------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 04:13:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ranaumarnadeem/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Beyond Detection: Implementing BIRA and BISR for OpenRAM in autoMBIST]]></title>
            <link>https://medium.com/@ranaumarnadeem/beyond-detection-implementing-bira-and-bisr-for-openram-in-autombist-871a4638007f?source=rss-1d68360f7ace------2</link>
            <guid isPermaLink="false">https://medium.com/p/871a4638007f</guid>
            <category><![CDATA[rtl-design]]></category>
            <category><![CDATA[chip-design]]></category>
            <category><![CDATA[vlsi]]></category>
            <category><![CDATA[dft]]></category>
            <category><![CDATA[synthesis]]></category>
            <dc:creator><![CDATA[Rana Umar Nadeem]]></dc:creator>
            <pubDate>Tue, 22 Sep 2026 06:14:28 GMT</pubDate>
            <atom:updated>2026-09-22T06:14:28.016Z</atom:updated>
            <content:encoded><![CDATA[<p>When I first started building <strong>autoMBIST</strong>, the primary objective was straightforward: create an automated pipeline to generate wrappers that detect faults in OpenRAM macros. I spent weeks designing the March algorithms, writing the RTL for the controllers, and validating the Built-In Self-Test (MBIST) engine.</p><p>But as the project matured, I ran into a classic VLSI reality check. In modern Systems-on-Chip (SoCs), SRAM can take up more than 50% of the total die area. Statistically, memory is where your manufacturing defects are most likely to occur. If a single bit-cell in a massive L2 cache fails during production testing, you don’t throw a multi-million-dollar wafer into the garbage. You repair it.</p><p>That realization led to the next major phase of the autoMBIST architecture: developing the <strong>Built-In Repair Analysis (BIRA)</strong> algorithm and the corresponding <strong>Built-In Self-Repair (BISR)</strong> wrappers.</p><p>This post will take you inside the engine room. I’ll walk you through how I transitioned the tool from merely finding faults to actively calculating repair signatures, and the RTL logic required to bypass defective memory cells dynamically.</p><h3>The Yield Problem: Physical Redundancy in SRAM</h3><p>To understand BIRA, you first have to understand the physical memory. During standard MBIST execution, the engine runs a pattern (like March C-) and asserts a fail flag the moment a read operation returns unexpected data. Without a repair mechanism, that single high flag dictates a total yield loss.</p><p>To prevent this, memory compilers like OpenRAM can be configured to instantiate structural redundancy — extra “spare” rows and columns physically built into the memory array. However, these spare bit-cells sit dormant unless we have intelligent logic to route traffic to them.</p><p>We need a dedicated RTL engine that can:</p><ol><li>Listen to the MBIST controller without missing a beat.</li><li>Log the precise address and data pin of the failure.</li><li>Execute a decision-making algorithm to determine if we should replace the faulty cell’s entire row or its entire column.</li><li>Generate a final configuration signature to mux the accesses seamlessly.</li></ol><h3>Designing the BIRA State Machine and Fault Logger</h3><p>When designing the RTL for the BIRA engine, I faced a timing challenge. The MBIST engine is running at speed, pumping addresses and data into the SRAM every clock cycle. When a fault occurs, the BIRA logic needs time to log it and update its redundancy counters.</p><p>To handle this, the BIRA state machine acts as a master override. When a fault is detected, it pauses the MBIST address generator, calculates the repair, and then releases the pause.</p><p>Here is the core state flow I implemented for the redundancy allocation process:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uzhfWJJAr5XXZT3C_dTcjw.png" /></figure><h3>The Fault Logging CAM</h3><p>Inside the FAULT_LOG state, we can&#39;t just overwrite a single register every time a fault happens. We might encounter multiple faults before making a final allocation decision. I implemented a small, parameterized Content Addressable Memory (CAM) structure within the BIRA logic. This CAM stores the failing row and column addresses. If a new fault comes in, it checks against the CAM to see if this address is already covered by a previously allocated repair. If it is, it ignores the fault and resumes the test.</p><h3>The Allocation Algorithm: Row vs. Column Trade-offs</h3><p>The hardest mathematical challenge in the BIRA RTL is the allocation algorithm. If a bit-cell fails, do you replace its row or its column?</p><p>In an ideal world, you would use an exhaustive search algorithm (like a branch-and-bound) to find the absolute mathematically perfect repair solution. But this is hardware. We can’t afford the gate count or the clock cycles for an exhaustive search.</p><p>Instead, in autoMBIST, I implemented a highly optimized <strong>Greedy Algorithm</strong> with a two-pass priority system:</p><ul><li><strong>The “Must-Repair” Pass:</strong> If the fault logger detects multiple failing cells that share the exact same row address (but different columns), it sets a Must_Repair_Row flag. It would be a massive waste to burn three redundant columns to fix three cells in the same row. The logic forces a row allocation. The exact inverse applies to columns.</li><li><strong>The “Single Cell” Heuristic:</strong> If a single, isolated bit-cell fails, and we have both rows and columns available, the algorithm defaults to allocating a row.</li><li><em>Why?</em> In many standard SRAM architectures, row multiplexing (bypassing the wordline decoder) has slightly less impact on the critical timing path than column multiplexing (which often messes with the sense amplifiers and read out data paths).</li></ul><p>If the engine depletes its pool of redundant rows and columns while faults are still being logged into the CAM, it asserts the terminal unrepairable flag.</p><h3>Bridging BIRA to BISR: The Repair Signature</h3><p>Once the memory test concludes and the BIRA engine successfully maps out a repair solution, it compiles everything into a concatenated binary string known as the <strong>Repair Signature</strong>.</p><p>But how does that signature actually fix the chip?</p><p>During the manufacturing phase, this signature is read out (usually via JTAG) and burned into physical e-fuses on the silicon die. When the chip is deployed into the real world and powered on, a boot controller reads those e-fuses and shifts the signature serially into the <strong>Built-In Self-Repair (BISR)</strong> registers.</p><p>These BISR registers sit immediately adjacent to the OpenRAM wrapper. They act as static control signals for hardware multiplexers.</p><p>Here is a visual representation of how that data flows from calculation to hardware configuration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n57JNwlHRzXHWICRVYK4tQ.png" /></figure><p>By the time the processor (whether it’s a simple microcontroller or a massive multi-core RISC-V array like OpenPITON) attempts to access the memory, the BISR registers have already transparently re-mapped the defective addresses to the working spare cells. The core has no idea the memory was ever broken.</p><h3>Next Steps</h3><p>Building the BIRA and BISR logic was a massive step up in complexity from the base MBIST engine. Dealing with clock-cycle pausing, CAM implementations, and greedy heuristics is what elevates a project from a basic test script to a silicon-ready EDA utility.</p><p>In the next post, we will step away from the architectural theory and get our hands dirty. I will walk you through a practical tutorial on how to pull the autoMBIST repository, configure your environment, run the generator, and inspect the actual Verilog RTL it produces for an OpenRAM instance.</p><h3>Links &amp; Resources</h3><ul><li><strong>GitHub Repository:</strong> <a href="https://www.google.com/search?q=https://github.com/ranaumarnadeem/autoMBIST">autoMBIST</a></li><li><strong>Documentation Site:</strong> <a href="https://www.google.com/search?q=https://ranaumarnadeem.github.io/autoMBIST/">autoMBIST Docs</a></li><li><strong>Medium Publication:</strong> <a href="https://medium.com/@ranaumarnadeem">ranaumarnadeem</a></li></ul><p>#VLSI #ASIC #SystemOnChip #Semiconductors #EDA #OpenSourceHardware #DFT #RISCV #OpenRAM #HardwareDesign</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=871a4638007f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystifying Memory Fault Models: Inside autoMBIST’s 31-Primitive Research Platform and March…]]></title>
            <link>https://medium.com/@ranaumarnadeem/demystifying-memory-fault-models-inside-autombists-31-primitive-research-platform-and-march-2771d8f5af01?source=rss-1d68360f7ace------2</link>
            <guid isPermaLink="false">https://medium.com/p/2771d8f5af01</guid>
            <category><![CDATA[digital-design]]></category>
            <category><![CDATA[fpga]]></category>
            <category><![CDATA[chip-design]]></category>
            <category><![CDATA[dft]]></category>
            <category><![CDATA[vlsi]]></category>
            <dc:creator><![CDATA[Rana Umar Nadeem]]></dc:creator>
            <pubDate>Sat, 29 Aug 2026 08:31:01 GMT</pubDate>
            <atom:updated>2026-08-29T08:31:01.287Z</atom:updated>
            <content:encoded><![CDATA[<h3>Demystifying Memory Fault Models: Inside autoMBIST’s 31-Primitive Research Platform and March Grading Shell</h3><p>Designing effective Memory Built-In Self-Test (MBIST) algorithms requires more than just testing whether a memory cell can hold a 0 or a 1. If you are working with modern nanometer SRAM arrays, you know that they suffer from incredibly complex physical defect mechanisms.</p><p>When I first started looking into open-source Design-for-Testability (DFT), I realized that test engineers and academic researchers faced a major barrier. Evaluating a new March test algorithm meant either writing ad-hoc Python or C++ behavioral simulations from scratch, or executing painfully slow, gate-level fault simulations inside expensive commercial EDA environments. There was no accessible middle ground.</p><p>I built <strong>autoMBIST</strong> to address this exact challenge. While one half of autoMBIST is an RTL wrapper generator, the other half is a dedicated, standalone <strong>March Algorithm Research Platform and Grading Shell</strong>. Operating completely independently of physical memory macros, this platform allows you to model, simulate, and grade March algorithms against a complete 31-primitive functional fault model framework in seconds.</p><p>Here is a deep dive into how I designed it, how the 31-primitive model works, and how you can use it to grade your own memory test algorithms.</p><h3>The Complex Reality of SRAM Defects</h3><p>To understand why we need a complex grading shell, we first have to look at how memories actually fail.</p><p>A memory array is an incredibly dense grid of transistors. Because everything is packed so tightly, defects rarely manifest as a simple “broken wire.” Instead, we see capacitive coupling between adjacent bitlines, write-disturb phenomena where writing to one cell flips its neighbor, and multi-operation dynamic transition faults that only appear when a cell is accessed rapidly in a specific sequence.</p><p>In modern DFT literature (heavily based on the standard fault taxonomy developed by van de Goor), we categorize these complex physical defects into <strong>Fault Primitives (FPs)</strong>.</p><p>A fault primitive is denoted using the notation <strong>&lt; S / F / R &gt;</strong>, where:</p><ul><li><strong>S (Sensitizing Operation):</strong> The sequence of read/write operations that forces the physical fault to manifest (for example, writing a 0, then writing a 1).</li><li><strong>F (Faulty Behavior):</strong> The unexpected state or value stored in the target (victim) cell because of the fault (for example, the cell stays at 0 instead of flipping to 1).</li><li><strong>R (Read Output):</strong> The output returned if the sensitizing operation includes a read.</li></ul><h3>Breaking Down the 31-Primitive Fault Model</h3><p>I designed autoMBIST to organize its 31 functional fault primitives across five distinct fault classes. This ensures that any algorithm graded by the platform is tested against both static (single-operation) and dynamic (multi-operation) failures.</p><p>Here is how the 31 primitives are broken down:</p><h3>1. Static Single-Cell Faults (6 Primitives)</h3><p>These are your classic, single-operation faults isolated to a single memory cell. They include the standard Stuck-At 0 and Stuck-At 1 (SA0/SA1), Transition Faults (TF), Read Destructive faults (RDF), and Deceptive Read faults (DRDF). If an algorithm cannot catch these, it is not ready for silicon.</p><h3>2. Dynamic Single-Cell Faults (8 Primitives)</h3><p>These faults are trickier. They require two or more sequential operations on the <em>same</em> cell to sensitize. Examples include the Dynamic Read Destructive fault (dRDF) and Write Disturb faults (WDF). A cell might hold a value perfectly fine indefinitely, but if you read it twice in the same clock cycle, the value flips.</p><h3>3. Static Two-Cell Coupling Faults (8 Primitives)</h3><p>Because memory cells share tightly packed wordlines and bitlines, they interact. These faults occur when a sensitizing operation on an <em>aggressor</em> cell forces a fault in a nearby <em>victim</em> cell. This class covers Coupling Inversion (CFinv), Coupling Idempotent (CFid), and Coupling State (CFst).</p><h3>4. Dynamic Two-Cell Coupling Faults (8 Primitives)</h3><p>The most difficult faults to catch. These require multi-operation sequences on an aggressor cell to affect a victim cell, such as Dynamic Coupling Read (dCFrd) and Dynamic Coupling Write (dCFwd). Catching these requires highly optimized March sequences.</p><h3>5. Address Decoder Faults (1 Primitive)</h3><p>Structural decoder flaws that result in unaddressable cells or multiple cells being selected simultaneously when only one address is asserted.</p><h3>The Algo-Shell Grading Architecture</h3><p>To make this accessible, I decoupled the algorithm evaluation from the RTL macro compilation. You do not need to synthesize a Verilog netlist to test an algorithm.</p><p>Instead, you define custom March test sequences using autoMBIST’s domain-specific Python API. The Algo-Shell Engine then parses your sequence and executes it across a simulated fault matrix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3LAXWl87vy4Oh1UYNBpL0A.png" /></figure><h3>How the Grading Process Works Under the Hood</h3><ul><li><strong>Algorithm Parsing:</strong> The Algo-Shell parses the input sequence into discrete March elements. For example, it translates Up (r0, w1) into an incremental address sweep that reads a 0 and writes a 1 to every cell.</li><li><strong>Matrix Fault Injection:</strong> For each of the 31 primitives enabled in the configuration, the platform instantiates a virtual fault model inside the simulation engine.</li><li><strong>Execution &amp; Signature Analysis:</strong> The compiled March sequence is executed against every injected fault. The comparator evaluates whether the algorithm’s read passes successfully catch the data mismatch.</li><li><strong>Coverage Scorecard Generation:</strong> Finally, the platform generates a fault matrix report displaying the exact percentage of coverage across all static, dynamic, and coupling fault categories.</li></ul><h3>Defining and Grading a Custom March Sequence</h3><p>To illustrate how the platform operates, let’s look at how I evaluate a standard March C- sequence. March C- is an industry standard, but it has blind spots when it comes to dynamic read-disturb faults.</p><p>Here is how you specify the sequence using the autoMBIST Python API:</p><pre># Example Algo-Shell Python API definition for a custom March sequence<br>from autombist.research import MarchAlgorithm, MarchElement, Op<br># Define March C-<br>march_c_minus = MarchAlgorithm(name=&quot;March C-&quot;)<br>march_c_minus.add_element(MarchElement(direction=&quot;any&quot;, ops=[Op.W0]))<br>march_c_minus.add_element(MarchElement(direction=&quot;up&quot;,  ops=[Op.R0, Op.W1]))<br>march_c_minus.add_element(MarchElement(direction=&quot;up&quot;,  ops=[Op.R1, Op.W0]))<br>march_c_minus.add_element(MarchElement(direction=&quot;down&quot;, ops=[Op.R0, Op.W1]))<br>march_c_minus.add_element(MarchElement(direction=&quot;down&quot;, ops=[Op.R1, Op.W0]))<br>march_c_minus.add_element(MarchElement(direction=&quot;any&quot;, ops=[Op.R0]))<br># Grade algorithm against the full 31-primitive suite<br>scorecard = march_c_minus.grade(fault_models=&quot;all_31_primitives&quot;)<br>scorecard.print_summary()</pre><h3>Execution Output &amp; Scorecard Breakdown</h3><p>When you run this inside the provided Nix environment, autoMBIST produces a highly detailed coverage analysis. Here is what the scorecard for March C- actually looks like:</p><pre>================================================================================<br>                      autoMBIST March Algorithm Scorecard                       <br>================================================================================<br>Algorithm Name : March C-<br>Total Operations: 10N (where N = Word Count)<br>--------------------------------------------------------------------------------<br>Fault Category                     | Tested | Caught | Coverage %<br>--------------------------------------------------------------------------------<br>Static Single-Cell (SF)            |   6    |   6    | 100.0%<br>Dynamic Single-Cell (DF)           |   8    |   5    |  62.5%  [UNCOVERED: dRDF_2, WDF_1]<br>Static Two-Cell Coupling (CFst)    |   8    |   8    | 100.0%<br>Dynamic Two-Cell Coupling (CFdy)   |   8    |   4    |  50.0%  [UNCOVERED: dCFrd_1, dCFwd_2]<br>Address Decoder Faults (AF)        |   1    |   1    | 100.0%<br>--------------------------------------------------------------------------------<br>OVERALL FAULT COVERAGE             |  31    |  24    |  77.4%<br>================================================================================</pre><p>As the scorecard reveals, while March C- is perfect for static faults, it entirely misses 37.5% of dynamic single-cell faults and 50% of dynamic two-cell coupling faults.</p><h3>Benchmarking Classical March Algorithms</h3><p>Using this research platform, I was able to benchmark standard academic and industry March algorithms across all 31 fault primitives. The results highlight the constant tradeoff in DFT: execution time vs. fault coverage.</p><ul><li><strong>March MATS+ (5N Operations):</strong> Achieves 66% static coverage and 25% dynamic coverage. Best suited for incredibly fast screening of basic stuck-at faults.</li><li><strong>March X (6N Operations):</strong> Achieves 85% static coverage and 37% dynamic coverage. A step up for standard functional verification.</li><li><strong>March C- (10N Operations):</strong> Achieves 100% static coverage and 56% dynamic coverage. The industry standard for comprehensive static and coupling fault detection.</li><li><strong>March RAW (13N Operations):</strong> Achieves 100% static coverage and 87% dynamic coverage. Highly reliable for dynamic transition and read-disturb testing.</li><li><strong>March PS (23N Operations):</strong> Achieves 100% coverage across all 31 functional fault primitives. Incredibly thorough, but the 23N test time makes it expensive to run on massive arrays.</li></ul><h3>Accelerating Open-Source DFT</h3><p>I built the autoMBIST research platform to remove the friction from memory test engineering.</p><p>Because there is zero dependency on physical macros, you can prototype and evaluate new March algorithms in seconds without waiting for OpenRAM to compile or Yosys synthesis runs to finish. It provides an objective, reproducible metric for comparing novel test sequences against established literature standards.</p><p>Most importantly, it offers a direct path to silicon: once an algorithm demonstrates target fault coverage in the grading shell, it can be passed directly to the autoMBIST RTL generator to output synthesizable hardware wrappers ready for LibreLane.</p><p>If you are working on open-source silicon, DFT architecture, or just want to experiment with memory fault models, you can check out the project below.</p><ul><li><strong>Connect with me on LinkedIn:</strong> <a href="https://www.google.com/search?q=https://www.linkedin.com/in/ranaumarnadeem/">Rana Umar Nadeem</a></li><li><strong>Github: </strong><a href="https://github.com/ranaumarnadeem/autoMBIST">github.com/ranaumarnadeem/autoMBIST</a></li><li><strong>Read the Documentation:</strong> <a href="https://ranaumarnadeem.github.io/autoMBIST/">ranaumarnadeem.github.io/autoMBIST/</a></li></ul><p>#autoMBIST #OpenSourceEDA #VLSI #ASIC #DesignForTestability #DFT #MBIST #OpenRAM #Semiconductors #SkyWater130 #LibreLane #Silicon #SystemVerilog #RISCV</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2771d8f5af01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bridging the Open-Source DFT Gap: Complete Guide to autoMBIST for OpenRAM Memories]]></title>
            <link>https://medium.com/@ranaumarnadeem/bridging-the-open-source-dft-gap-complete-guide-to-autombist-for-openram-memories-e6051154f56c?source=rss-1d68360f7ace------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6051154f56c</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[chip-design]]></category>
            <category><![CDATA[vlsi]]></category>
            <category><![CDATA[dft]]></category>
            <category><![CDATA[mbist]]></category>
            <dc:creator><![CDATA[Rana Umar Nadeem]]></dc:creator>
            <pubDate>Thu, 27 Aug 2026 07:18:27 GMT</pubDate>
            <atom:updated>2026-08-27T07:18:27.929Z</atom:updated>
            <content:encoded><![CDATA[<p>When building custom System-on-Chips (SoCs) using proprietary commercial EDA suites from vendors like Siemens, Synopsys, or Cadence, Design-for-Testability (DFT) is a mature, automated domain. Proprietary compilers automatically analyze embedded memory macros, insert Memory Built-In Self-Test (MBIST) controllers, route fault lines to Built-In Repair Analysis (BIRA) blocks, and generate Built-In Self-Repair (BISR) redirection logic.</p><p>In the open-source silicon ecosystem memory test and repair has long been a missing piece. Silicon designers using open-source PDKs like SkyWater 130nm (sky130) were often forced to either hand-code rigid, bespoke March state machines for every distinct memory macro geometry or tape out silicon without memory repair capabilities entirely.</p><p>autoMBISTsolves this problem. It is an open-source, OpenRAM-integrated MBIST generator, BIRA/BISR self-repair framework, and programmable fault-model research platform. It scales from high-level algorithmic fault evaluation down to physical signoff in SkyWater 130nm GDSII and has been verified under live RISC-V CPU traffic.</p><h3>System Architecture: Two Tools in One Engine</h3><p>autoMBIST is designed around a dual-purpose architecture. Rather than bundling test generation and simulation into a rigid monolithic macro wrapper, it separates hardware generation from fault-model evaluation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tm7Tt8S3eYXiIxmshPGRCg.png" /></figure><h3>1. The RTL Wrapper &amp; Generator</h3><p>The generator wraps OpenRAM memory macros with synthesizable test and repair infrastructure. It generates customized SystemVerilog collars that interface with OpenRAM’s specific control ports, data buses, and address lines, creating a complete self-testing subsystem ready for logic synthesis with Yosys.</p><h3>2. The Independent Fault Research Platform</h3><p>In addition to RTL generation, autoMBIST acts as a standalone research shell for test engineers. This platform allows users to design, simulate, and grade March algorithms against a comprehensive <strong>31-primitive functional fault model</strong> without instantiating or compiling a physical memory macro.</p><h3>On-Chip Autonomous Self-Repair (BIRA &amp; BISR)</h3><p>Post-fabrication memory repair in commercial foundries traditionally relies on Automated Test Equipment (ATE) during wafer-sort. The tester identifies failed memory cells, calculates repair locations, and physically blows laser or electrical fuses on-chip.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ZareB_7Lx_bStyGmOqIqw.png" /></figure><p>autoMBIST eliminates the requirement for external ATE hardware by moving the entire repair loop onto the chip itself.</p><h3>The Autonomous Power-On Loop</h3><p>When power is applied to the chip, the autoMBIST controller initiates a closed-loop sequence before releasing system resets:</p><ul><li><strong>Analyze (BIST Execution):</strong> The controller sweeps the OpenRAM array using the configured March algorithm. Any cell mismatches (stuck-at faults, transition errors, coupling issues) are captured and passed to the redundancy logging registers.</li><li><strong>Decide (2D BIRA Engine):</strong> The integrated 2D BIRA solver analyzes the captured failure map. It evaluates row and column defect patterns against available spare rows using an allocation heuristic cross-validated against a brute-force solver oracle.</li><li><strong>Verify (BISR Remapping):</strong> The calculated spare allocations are latched into the on-chip self-repair registers. The controller then executes a secondary verification pass to confirm that all failing memory addresses are successfully remapped to healthy redundant memory rows.</li><li><strong>Transparent Handover:</strong> Once verification passes, the controller releases the system reset line, allowing downstream logic (such as a CPU core) to access the repaired memory transparently.</li></ul><h3>Proven Under Real CPU Traffic: PicoRV32 &amp; LibreLane</h3><p>Theoretical correctness in simulation is not enough for silicon signoff. autoMBIST has been validated across two demanding integration milestones: full physical signoff in SkyWater 130nm and end-to-end execution under a RISC-V processor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NLITKoWlT8Asy9Vb8xVpeA.png" /></figure><h3>Physical Signoff in SkyWater 130nm</h3><p>A realistic three-memory memory subsystem — including the complete autonomous self-repair logic — was hardened targeting the <strong>SkyWater 130nm (sky130)</strong> PDK using <strong>LibreLane 3.0.5</strong>. The physical implementation achieved:</p><ul><li><strong>Zero Detailed-Routing Violations:</strong> Clean wire routing around OpenRAM hard macros without DRC errors.</li><li><strong>LVS Clean (Including Power):</strong> Full Layout-Versus-Schematic verification passing all transistor-level and power-net checks.</li></ul><h3>Full System Execution with PicoRV32</h3><p>Inside the repository’s flow/soc/ environment, autoMBIST is integrated with an unmodified <strong>PicoRV32 (RV32I)</strong> RISC-V processor core:</p><ul><li>Upon system power-on, autoMBIST runs its full sequence over defective memory locations while holding the CPU in reset.</li><li>Once the memory array is self-repaired, reset is released.</li><li>The PicoRV32 core boots up, fetches instructions, and executes standard load and store operations through the repaired memory path without experiencing data corruption or timing degradation.</li></ul><h3>Reproducible Environment via Nix Infrastructure</h3><p>Toolchain version drift is a common point of failure in open-source EDA projects. A script that runs on one version of Yosys or Verilator may break on another.</p><p>To guarantee complete reproducibility, autoMBIST ships with a fully configured <strong>Nix flake</strong>:</p><ul><li><strong>Pinned Toolchain Versions:</strong> Automatically pins exact versions of Yosys, Verilator, Icarus Verilog, Cocotb, and Python dependencies.</li><li><strong>Zero Installation Overhead:</strong> Developers do not need to build EDA tools from source. Entering the environment exposes all binaries directly on your shell $PATH</li></ul><pre># Clone the repository<br>git clone https://github.com/ranaumarnadeem/autoMBIST.git<br>cd autoMBIST<br># Enter the pinned development environment with all EDA tools loaded<br>nix develop<br># Execute simulation testbenches and March grading suites<br>pytest</pre><h3>Why autoMBIST Matters for Open-Source Hardware</h3><p>By providing an automated path from memory test algorithm research down to LibreLane-proven physical signoff, autoMBIST addresses one of the final remaining roadblocks in open-source ASIC design. Designers preparing chips for Efabless Caravel shuttles, TinyTapeout runs, or custom research tapeouts can now protect their silicon investment against memory defect densities.</p><p>The project is fully open-source under the <strong>Apache-2.0</strong> license and actively maintained.</p><ul><li><strong>Documentation:</strong> <a href="https://ranaumarnadeem.github.io/autoMBIST/">ranaumarnadeem.github.io/autoMBIST/</a></li><li><strong>GitHub Repository:</strong> <a href="https://github.com/ranaumarnadeem/autoMBIST">github.com/ranaumarnadeem/autoMBIST</a></li></ul><p>#eda #autombist #mbist #memory #vlsi #memory_testing #marchc #librelane #yosys #dft #opensource #linux</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6051154f56c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design for Testability: MISR Deep Dive The Mathematics of Compaction]]></title>
            <link>https://medium.com/@ranaumarnadeem/design-for-testability-misr-deep-dive-the-mathematics-of-compaction-e103ea127e85?source=rss-1d68360f7ace------2</link>
            <guid isPermaLink="false">https://medium.com/p/e103ea127e85</guid>
            <category><![CDATA[asic-physical-design]]></category>
            <category><![CDATA[physical-design]]></category>
            <category><![CDATA[vlsi]]></category>
            <category><![CDATA[design-for-testability]]></category>
            <category><![CDATA[vlsi-design]]></category>
            <dc:creator><![CDATA[Rana Umar Nadeem]]></dc:creator>
            <pubDate>Fri, 05 Jun 2026 14:31:00 GMT</pubDate>
            <atom:updated>2026-06-05T14:31:00.707Z</atom:updated>
            <content:encoded><![CDATA[<p>The previous article introduced the MISR as the hardware mechanism that compresses a long response stream into a short final signature. The explanation was intentionally kept at the level of behavior: bits go in, state evolves, a signature comes out, and the probability of aliasing is bounded by 1/2^W. That level of understanding is sufficient to use a MISR. It is not sufficient to reason about why a particular MISR design is good or bad, why its feedback polynomial matters, or why the same property that makes it efficient also introduces the aliasing risk that was described qualitatively before.</p><p>This article goes deeper. The goal is to make the internal mechanics of the MISR transparent, so that when the tradeoffs come up in a real flow, the reasoning behind them is accessible.</p><h3>Starting From the Ordinary Shift Register</h3><p>The easiest way to understand a MISR is to start from something simpler and add components one at a time.</p><p>A standard shift register of width W is a chain of W flip-flops. Each clock cycle, the bit in position i moves to position i+1. A new bit enters at position 0. The bit at position W-1 is either discarded or observed. After W cycles, the register holds the last W bits of the input stream, and nothing older.</p><p>This is useless for compaction. It remembers only the tail of the stream. Everything that arrived earlier is gone, and two different long streams that happen to share the same final W bits will produce identical register states. The aliasing probability is not 1/2^W — it is essentially 1 for any stream longer than W.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rq9IQFo2Q1KRO5XQ6HWMQg.png" /></figure><p>What is needed is a mechanism that mixes incoming bits with the existing state so that old bits continue to influence the register’s future evolution even after they would have been shifted out. That mechanism is XOR feedback.</p><h3>Adding Feedback: The Linear Feedback Shift Register</h3><p>A Linear Feedback Shift Register (LFSR) modifies the ordinary shift register by XORing selected bits of the current register state into the input of one or more stages. The positions where this feedback is applied are called the <strong>tap positions</strong>, and the pattern of taps defines the <strong>feedback polynomial</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CIj8HpQnYlzwU7pRq2Nw_A.png" /></figure><p>With feedback, each new state is a function of the entire previous state, not just the last input. Bits from earlier cycles influence the state for as long as the LFSR runs, through the recurrence. This is the property that makes the LFSR useful for compaction.</p><p>But a standard LFSR has no external input. It generates sequences from its initial state. To compact an external bitstream, inputs must be injected into the register while it runs. This is the step that turns an LFSR into a MISR.</p><h3>The MISR: Injecting External Data Into the Recurrence</h3><p>A MISR is an LFSR with one additional modification: at each clock cycle, external response bits are XORed into the register state as it updates. The external inputs arrive in parallel across multiple positions in the register, which is why the name includes “Multiple Input.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2_ECOt_q7o2WwnrUT435MQ.png" /></figure><p>The result is that each new state of the MISR depends on both the history of all previous inputs (through the LFSR recurrence) and the current cycle’s inputs (through direct injection). Every bit of the response stream, from cycle 1 through cycle L, is folded into the final state. No bit is discarded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*blyGFRSyWZGWlgx6caoxvA.png" /></figure><h3>The Matrix View of MISR Evolution</h3><p>Like the decompressor, the MISR can be described exactly by a matrix equation over GF(2). This is important because it connects the MISR to the same algebraic framework used to analyze the decompressor, and it makes the aliasing probability argument rigorous rather than intuitive.</p><p>At each clock cycle, the MISR state update is a linear operation on the current state and the new input. This can be written as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2nLvcvmXuOK03DCgjqZx6A.png" /></figure><p>This expression shows that the final signature is a linear combination of all input vectors, each weighted by a different power of the transition matrix T. Every input cycle’s contribution is mixed into the final state through a distinct matrix weight. This is the formal reason why earlier inputs are not lost: they appear as terms T^(L-k) * s_k in the sum, and as long as T is invertible (which a well-designed LFSR transition matrix always is over GF(2)), these terms are independent.</p><h3>Why the Feedback Polynomial Matters</h3><p>The feedback polynomial determines the transition matrix T, and T determines the mixing properties of the MISR. Not all polynomials are equally good.</p><p>A polynomial is called <strong>primitive</strong> over GF(2) if the LFSR it defines cycles through all 2^W — 1 non-zero states before repeating. A primitive polynomial produces a maximal-length sequence, meaning the LFSR visits every possible non-zero state exactly once per period. This is the property that determines the quality of the MISR as a signature analyzer.</p><p>For compaction specifically, what matters is that T^k is a different matrix for every k in the range 0 to 2^W — 2. If two different powers T^(L-k) and T^(L-j) were equal, then inputs at cycles k and j would contribute identically to the final signature, and any fault that flipped a bit at cycle k but not cycle j (or vice versa) would cancel in the sum and produce no change in the signature. This is precisely aliasing.</p><p>In industrial MISR design, primitive polynomials are standard. For common register widths, primitive polynomials are tabulated and well-known. The ATPG tool selects them automatically, but the test engineer should understand why the choice matters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NexYG9V7nT1Y1ba9q8lHJA.png" /></figure><h3>How a Long Stream Maps to a Short Signature</h3><p>It is worth spelling out the compaction ratio explicitly in the temporal dimension, because this is where the MISR’s efficiency is most dramatic.</p><p>Consider a design with C = 512 internal scan chains, each of length L = 5,000. The total response bitstream after one capture contains 512 * 5,000 = 2,560,000 bits. In an uncompressed design, the tester would need to store and compare all 2,560,000 expected bits per pattern.</p><p>With a MISR of width W = 32:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xYdrb8CbRmx_tcrorknjTA.png" /></figure><p>The 80,000x compaction ratio is not achieved by discarding most of the response. It is achieved by folding all 2,560,000 bits into a 32-bit register state through the MISR recurrence. Every bit of the response contributes to the final signature. The compaction is lossless in the information-theoretic sense that any single-bit error anywhere in the 2,560,000-bit stream will, with probability (1–1/2³²), change the final signature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IM5Ame5o2vUf06P2nJ1p9Q.png" /></figure><h3>The Aliasing Mechanism Made Exact</h3><p>The previous article stated the aliasing probability as 1/2^W. That result can now be derived from the matrix framework, which makes it more than a rule of thumb.</p><p>Define the error vector e_k = s_k XOR s_k_good, where s_k is the actual (possibly faulty) response at cycle k and s_k_good is the fault-free response. The MISR computes the correct signature for a fault-free response. A fault is undetected (aliased) if and only if the final error contribution to the MISR state is zero:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qCsV2QD7HBATXSs_CPldGA.png" /></figure><p>The assumption of uniform random error patterns is what makes this a probability statement rather than a guarantee. It is a good assumption for independent, uncorrelated fault effects across different scan cells and different shift cycles. It breaks down when error patterns are highly structured, which can happen with specific fault models or with correlated physical defects. This is one reason why MISR-based compaction is combined with multiple independent patterns rather than relying on a single long shift sequence.</p><h3>Multiple Capture Cycles and Signature Reset</h3><p>In practice, the MISR is not run continuously across the entire test from start to finish. It is reset between patterns. Each test pattern corresponds to one MISR accumulation window: load seed, shift in, capture, shift out into MISR, read and compare final state, reset MISR to zero, repeat.</p><p>Resetting between patterns is important for two reasons. First, it ensures that the expected signature for each pattern is computed independently, which keeps the ATPG precomputation tractable. Second, it prevents error accumulation: if the MISR were not reset and a fault corrupted the signature for pattern k, the corrupted state would influence the signatures for all subsequent patterns, making fault diagnosis impossible.</p><pre>MISR Reset Flow Per Pattern:<br>  1. Reset MISR to all zeros<br>  2. Shift in compressed seed (W channels for L cycles)<br>  3. Apply capture clock (functional frequency)<br>  4. Shift out scan cells into MISR (L cycles)<br>  5. Compare MISR[0..W-1] to M_expected for this pattern<br>  6. If mismatch: device flagged as fail<br>  7. Goto 1 for next pattern<br><br>Note: Steps 2 and 4 can overlap in time using EDT&#39;s<br>      simultaneous shift architecture (covered in a later article)</pre><h3>When the MISR is Not Enough: Diagnostic Limitations</h3><p>The MISR is an excellent go/no-go detector. It is a poor diagnostic tool.</p><p>When a device fails, the tester knows which pattern produced a signature mismatch. It does not know which scan cell produced the wrong value, which fault caused it, or where in the scan chain the error appeared. The compaction that makes the MISR efficient is exactly what destroys the spatial and temporal information needed for diagnosis.</p><p>Diagnosis requires uncompacted data. In practice, when a failing device needs to be diagnosed, the test program is run in a special diagnostic mode where the MISR is bypassed and individual scan chain outputs are observed directly, either through dedicated diagnostic scan-out paths or through a reduced-compression mode with fewer chains per output channel. This diagnostic flow is slower and uses more tester bandwidth, but it is only applied to the small subset of devices that fail production test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ejf0QbLo_i1NwDzE9gECDw.png" /></figure><p>This separation of production test and diagnostic test is a fundamental architectural feature of any compressed test flow. The MISR handles scale. Diagnosis handles depth. Neither mode is sufficient alone.</p><h3>Closing Remarks</h3><p>The MISR is a compact piece of hardware that performs an outsized engineering function. A 32-bit register with a handful of XOR gates compresses 2.5 million response bits into a 32-bit signature with a fault escape probability of roughly 2 in 10 billion per pattern. The mechanism behind this is not heuristic or approximate — it is a consequence of the algebraic properties of linear recurrences over GF(2), and specifically of the primitive polynomial that governs the state transition matrix.</p><p>The key ideas to carry forward are these. First, feedback is what makes the MISR different from a shift register: it ensures that every input bit influences the final state through the recurrence, so nothing is discarded. Second, the primitive polynomial ensures that the transition matrix powers are all distinct, which minimizes aliasing by ensuring independent mixing weights for every input cycle. Third, the aliasing probability of 1/2^W follows from the linearity of the mapping and the surjectivity of the error-to-delta-state transform, not from statistical heuristics. Fourth, the MISR’s efficiency comes at the cost of diagnostic resolution, and the two modes of test operate on different data paths for this reason.</p><p>Understanding the MISR at this level makes the next layer of the compression architecture accessible. The following article will examine how the decompressor and the MISR are integrated with the ATPG engine to form a complete end-to-end compression flow, and how the compression ratio, pattern count, and masking strategy are co-optimized as a system.</p><p><em>This article is part of an ongoing series on Design for Testability. The full series is on my </em><a href="https://medium.com/@ranaumarnadeem"><em>Medium profile</em></a><em>.</em></p><p><strong>Further Reading:</strong></p><ul><li><a href="https://docs.xilinx.com/v/u/en-US/xapp052">Xilinx XAPP052 — Efficient Shift Registers and LFSR Counters (primitive polynomial tables)</a></li><li><a href="https://ieeexplore.ieee.org/document/573264">IEEE Xplore — MISR-Based Compaction in Scan Test: Theory and Practice</a></li><li><a href="https://blogs.sw.siemens.com/tessent/">Siemens EDA Tessent Documentation — MISR Configuration and Signature Analysis</a></li><li><a href="https://www.synopsys.com/implementation-and-signoff/test-automation/dftmax-compression.html">Synopsys DFTMAX — Compactor Architecture and Aliasing Analysis</a></li><li><a href="https://www.academia.edu/search?q=MISR+signature+analysis+VLSI+test">Academia — Linear Feedback Shift Registers and Their Application to Signature Analysis</a></li></ul><h3>Connect with Me:</h3><ul><li><strong>GitHub:</strong> <a href="https://github.com/ranaumarnadeem">ranaumarnadeem</a></li><li><strong>Medium:</strong> <a href="https://medium.com/@ranaumarnadeem">@ranaumarnadeem</a></li><li><strong>LinkedIn:</strong> <a href="http://www.linkedin.com/in/rana-umar-nadeem">Rana Umar Nadeem</a></li></ul><p>#VLSI #ASICDesign #LogicSynthesis #ClockGating #LowPowerDesign #RTLDesign #DigitalDesign #DFT #BackendDesign #EDA #Cadence#Genus #Sky130 #RTLtoGDSII #SemiconductorEngineering #PowerOptimization #TechBlog #PREMAPPING #LEC #COP #SOACP #distance #controllibility #modus #scan_chains</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e103ea127e85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design for Testability: Response Compaction and Signature Analysis]]></title>
            <link>https://medium.com/@ranaumarnadeem/design-for-testability-response-compaction-and-signature-analysis-bc43fbcf3dfd?source=rss-1d68360f7ace------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc43fbcf3dfd</guid>
            <category><![CDATA[vlsi]]></category>
            <category><![CDATA[vlsi-physical-design]]></category>
            <category><![CDATA[asic-physical-design]]></category>
            <category><![CDATA[design-for-testability]]></category>
            <category><![CDATA[vlsi-design]]></category>
            <dc:creator><![CDATA[Rana Umar Nadeem]]></dc:creator>
            <pubDate>Wed, 03 Jun 2026 08:06:00 GMT</pubDate>
            <atom:updated>2026-06-03T08:06:00.724Z</atom:updated>
            <content:encoded><![CDATA[<p>The previous article closed with the decompressor: a network that takes a small number of external inputs and expands them into a much larger number of internal scan chain values. The mathematics were clean. The encoding was deterministic. Given a valid seed, the decompressor reconstructs the required pattern on silicon with certainty.</p><p>The output side is less clean. And that asymmetry is not an oversight. It is a deliberate engineering trade-off, accepted because the alternative is worse.</p><p>This article covers what happens after capture cycle. That response must travel back to the tester, and the path it takes through the compactor introduces a concept that does not exist on the stimulus side: aliasing. Understanding why compaction is done anyway, and why the risk it introduces is acceptable, is what this article is about.</p><h3>What Happens After Capture</h3><p>During a scan test operation, the sequence is: shift in, capture, shift out. The shift-in phase loads test stimulus into the scan cells via the decompressor. The capture phase applies functional clocks and lets the combinational logic evaluate. The shift-out phase reads the resulting state back out of the scan cells toward the tester.</p><p>In an uncompressed design with C scan chains, shift-out sends C bits per clock cycle across C dedicated output pins to the tester, where they are compared against expected values stored in tester memory. Every bit is individually observable. Every deviation from expectation is individually flagged.</p><p>With compression, the output side mirrors the input side structurally: instead of C output pins, there are W output channels, where W &lt;&lt; C. The compactor collects responses from all C chains and folds them into W channels using an XOR-based network. The tester sees only W output values per shift cycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vwQIYa7sDveJhOlb6_7hEg.png" /></figure><p>The gain in output bandwidth is identical to the input side: the same ratio that reduces stimulus data also reduces response data. Tester memory savings and shift time reductions apply symmetrically to both directions.</p><p>But the similarity between decompressor and compactor ends there. On the input side, the encoding is solved before test and baked into the seed vector. Any pattern that cannot be encoded is simply excluded from the compressed test set. There is no ambiguity. On the output side, the compactor cannot exclude anything. Whatever state the scan cells hold after capture must pass through the compactor regardless, and the compactor maps C bits of response to W bits of output. This is a many-to-one mapping, and many-to-one mappings introduce the possibility that two different inputs produce the same output.</p><p>That possibility is called <strong>aliasing.</strong></p><h3>What Aliasing Means</h3><p>Aliasing occurs when the compactor maps a faulty circuit response to the same output signature as the fault-free circuit response.</p><p>When a fault is present in the design, capture produces a response vector that differs from the fault-free response in at least one scan cell. Call the fault-free response R_good and the faulty response R_bad. In a fully observed design, <strong>R_bad != R_good</strong> means the test fails — the tester sees an unexpected bit and flags the device as defective.</p><p>Through the compactor, both R_good and R_bad are compressed to W-bit signatures. Call these S_good and S_bad. If the compactor maps them to different signatures, S_bad != S_good, the tester still detects the fault. But if S_bad = S_good — if R_good and R_bad differ in exactly the bits that the compactor XORs together to cancel each other out — then the tester sees no difference. The fault is present. The test passes. The device ships.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T7m2o-4Nbn4WoyT3H_A9QQ.png" /></figure><p>In this example, the three bits that changed in the faulty response (positions 0, 1, 2) all fed into the same XOR output, and their combined effect cancelled. The compactor produced the correct signature despite the wrong input.</p><h3>The Probability Argument</h3><p>Aliasing sounds catastrophic. If a compactor can miss faults, why use one?</p><p>The answer is probability. With a well-designed compactor, the probability of aliasing for any given fault is extremely small, and the probability that a faulty device escapes detection across all test patterns is negligible in practice.</p><p>For a single W-bit XOR compactor output driven by C input bits, the probability that a random error pattern produces the same signature as the fault-free pattern is:</p><pre>For a single-output XOR compactor (W = 1 bit):<br>  P(alias) = probability that error vector e has even parity<br>           = 1/2<br><br>This is too high. Not useful.<br>For a W-bit output compactor (W output channels, each driven<br>by a distinct subset of input chains via XOR):<br>  P(alias per pattern) = 1 / 2^W<br>  W = 16:   P = 1 / 65,536      = 0.0015%<br>  W = 32:   P = 1 / 4,294,967,296  ~ 2.3 x 10^-10</pre><p>With W = 32 output channels, the probability that any single faulty pattern aliases is roughly 2 in 10 billion. This is small enough to be accepted in production test. The compactor design is the engineering lever that drives aliasing probability to this level.</p><p>The key insight is that W must be large enough to make aliasing negligible, but it need not equal C. A 32-bit compactor observing 512 chains provides adequate statistical confidence while achieving a 16x reduction in output bandwidth. The trade-off between output reduction and aliasing risk is explicitly parameterized and controlled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yvCkMCVm2N_qSmpcDjB12A.png" /></figure><h3>Multiple-Input Shift Register Compactors</h3><p>In practice, compaction is not done with a single combinational XOR tree applied once at the end of shift. Instead, the response bits are accumulated cycle by cycle into a structure called a <strong>Multiple-Input Shift Register (MISR)</strong>.</p><p>A MISR is a linear feedback shift register with multiple XOR injection points. At each shift cycle, the current state of the MISR is updated based on both its previous state and the new response bits arriving from the internal scan chains. After all shift cycles are complete, the MISR holds a final signature — a W-bit value that is the accumulated result of every response bit from every shift cycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ALPnDMdNLf-nGEjL-4Xpdg.png" /></figure><p>The MISR’s signature is a compressed representation of the entire response bitstream, not just the last cycle. This means a single bit error at any point in the shift sequence — in any chain, at any shift cycle — will propagate into the final MISR state and corrupt the signature, as long as aliasing does not occur.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pJ3RXQuFsLD6sTiI5Y9CTQ.png" /></figure><p>The MISR is superior to a combinational XOR tree for two reasons. First, it spreads each input bit’s influence across multiple output bits over successive cycles through the linear recurrence, which improves the aliasing probability further compared to a single-pass XOR. Second, it requires only W flip-flops and a small number of XOR gates regardless of how many shift cycles are used, so the hardware cost does not grow with test length.</p><h3>Space Compaction vs Time Compaction</h3><p>It is useful to separate two dimensions of compaction that the MISR implements simultaneously.</p><p><strong>Space compaction</strong> refers to reducing the number of output channels at a given instant in time. At each shift cycle, C response bits are folded into W MISR inputs. This is the ratio C/W, and it is what drives output pin count reduction. The compactor implements space compaction through the XOR injection network that maps C chains to W MISR inputs.</p><p><strong>Time compaction</strong> refers to accumulating response bits across multiple shift cycles into a single signature. The MISR’s recurrence relation means that the final signature reflects every response bit from every cycle, not just the last one. This is time compaction, and it is what allows the tester to observe an entire shift-out sequence through a single W-bit comparison at the end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPvGHz4kq87MypyIH-smmg.png" /></figure><p>This is a compaction benefit that goes beyond what the compression ratio alone accounts for. The MISR eliminates the need to store expected responses for every shift cycle. The entire shift-out sequence is reduced to a single expected signature, which is precomputed by the ATPG tool from the fault-free simulation and stored in the test program.</p><h3>Signature Analysis and Precomputation</h3><p>The expected MISR signature for each test pattern is computed before test, during the ATPG flow. The process is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W1JjtnglcJTdqQliG-yMJg.png" /></figure><p>The entire chain from seed generation to signature verification is deterministic and traceable. Every value the tester needs — the seed to shift in and the signature to compare against — is computed analytically from the netlist simulation during ATPG. Nothing is estimated or approximated. Only the aliasing risk introduces any statistical element, and that risk is bounded by the MISR width W.</p><h3>X-States: The Practical Threat to Compaction</h3><p>The aliasing argument above assumes that the fault-free response is clean means every scan cell holds a well-defined 0 or 1 after capture. In real designs, this assumption breaks down.</p><p>X-states (unknown values) appear in scan cells for several reasons: uninitialized memory elements that were not reset before test, bus contention on multi-driver nets, three-state or bidirectional buses in test mode, or clock domain crossings that produce metastable values. When an X propagates into a scan cell and that cell’s output feeds into the MISR, the MISR state becomes corrupted regardless of whether a fault is present.</p><p>The consequence is that the final signature is unpredictable for any pattern where X-states contribute to the MISR. This means the expected signature cannot be computed during ATPG — because the fault-free response is itself unknown at the X positions — and the test for that pattern becomes unusable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XG3IbC5z4kmFrEMSyXjBQw.png" /></figure><p>X-states do not cause aliasing. They cause a different problem: the pattern becomes untestable because no expected signature can be defined. In practice, a design with high X-state density will have a large fraction of ATPG patterns rendered unusable unless X-masking is applied.</p><h3>X-Masking: Gating X-States Out of the Compactor</h3><p>X-masking is the technique used to prevent X-states from reaching the MISR. The idea is to add a controllable gate — typically an AND gate or a multiplexer — on each scan chain output before it enters the MISR. When a particular chain is known to contain an X value in a given shift cycle, its contribution to the MISR is gated off to zero, preventing X-propagation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*slJ134SKWzZaKFfeSHYUEQ.png" /></figure><p>X-masking resolves the corruption problem but introduces a new one: every masked chain is also unobservable for that shift cycle. If a real fault response lands in a masked cell, it is blocked along with the X. Masking too aggressively reduces fault coverage; masking too conservatively leaves X-corruption intact.</p><p>The optimal masking strategy minimizes the number of masked cells per pattern while ensuring no X-state reaches the MISR. This is another optimization problem that the ATPG tool solves during pattern generation, and it interacts with the care bit selection on the stimulus side. A scan cell that must be observed (because it carries a fault effect) should not be masked; but if that same cell also receives an X in the same cycle from a different path, the test engineer faces a conflict that may require additional test points, additional patterns, or redesign of the masking architecture.</p><h3>Closing Remarks</h3><p>Response compaction through MISR-based signature analysis is the output-side mechanism that completes the scan compression architecture. Several things from this article are worth carrying forward explicitly.</p><p>Compaction is a deliberate lossy operation. The MISR maps C bits of response to W bits of signature. Information is destroyed in this process, and that destruction creates the possibility of aliasing. The probability of aliasing is bounded by 1/2^W, and for W &gt;= 32, this probability is negligible in practice. The test engineer accepts this risk because the alternative — observing all C output bits per shift cycle — is either physically impossible (not enough output pins) or economically unjustifiable (tester memory and comparison cost).</p><p>The MISR implements both space compaction (folding C chains to W inputs) and time compaction (accumulating all shift cycles into a single final signature). These two together give a compaction factor of C * L / W, which dwarfs the space-only compression ratio by several orders of magnitude in typical designs.</p><p>X-states are the practical threat to compaction, not aliasing. An aliased fault has a negligible probability. An unmasked X-state corrupts the MISR deterministically and makes the pattern entirely unusable. X-masking resolves this but at the cost of reduced observability, and the trade-off between masking coverage and X-suppression is a non-trivial design problem in any real flow.</p><p>The next article will examine how the decompressor and compactor are combined with the ATPG engine in an end-to-end industrial compression flow, and how the compression ratio, chain count, and masking strategy are co-optimized as a system.</p><p><em>This article is part of an ongoing series on Design for Testability. Previous entries cover fault modeling, ATPG, scan architectures, scan implementation, chain balancing, physical-aware stitching, why compression is mandatory, and linear decompression. The full series is on my </em><a href="https://medium.com/@ranaumarnadeem"><em>Medium profile</em></a><em>.</em></p><p><strong>Further Reading:</strong></p><ul><li><a href="https://blogs.sw.siemens.com/tessent/">Siemens EDA — MISR-Based Signature Analysis in Tessent</a></li><li><a href="https://www.synopsys.com/implementation-and-signoff/test-automation/dftmax-compression.html">Synopsys — DFTMAX Response Compaction and X-Masking</a></li><li><a href="https://ieeexplore.ieee.org/document/1193573">IEEE Xplore — X-Compact: An Efficient Response Compaction Technique</a></li><li><a href="https://www.cadence.com/en_US/home/tools/chip-design/logic-design/modus-dft-software-solution.html">Cadence Modus DFT — Compactor Architecture Overview</a></li></ul><h3>Connect with Me:</h3><ul><li><strong>GitHub:</strong> <a href="https://github.com/ranaumarnadeem">ranaumarnadeem</a></li><li><strong>Medium:</strong> <a href="https://medium.com/@ranaumarnadeem">@ranaumarnadeem</a></li><li><strong>LinkedIn:</strong> <a href="http://www.linkedin.com/in/rana-umar-nadeem">Rana Umar Nadeem</a></li></ul><p>#VLSI #ASICDesign #LogicSynthesis #ClockGating #LowPowerDesign #RTLDesign #DigitalDesign #DFT #BackendDesign #EDA #Cadence#Genus #Sky130 #RTLtoGDSII #SemiconductorEngineering #PowerOptimization #TechBlog #PREMAPPING #LEC #COP #SOACP #distance #controllibility #modus #scan_chains</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc43fbcf3dfd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design for Testability: Linear Decompression, XOR Networks, and Pattern Expansion]]></title>
            <link>https://medium.com/@ranaumarnadeem/design-for-testability-linear-decompression-xor-networks-and-pattern-expansion-52ef08faab19?source=rss-1d68360f7ace------2</link>
            <guid isPermaLink="false">https://medium.com/p/52ef08faab19</guid>
            <category><![CDATA[compression]]></category>
            <category><![CDATA[vlsi]]></category>
            <category><![CDATA[design-for-testability]]></category>
            <category><![CDATA[vlsi-physical-design]]></category>
            <category><![CDATA[xor]]></category>
            <dc:creator><![CDATA[Rana Umar Nadeem]]></dc:creator>
            <pubDate>Mon, 01 Jun 2026 07:36:00 GMT</pubDate>
            <atom:updated>2026-06-01T07:36:00.404Z</atom:updated>
            <content:encoded><![CDATA[<p>The previous article established why compression is not optional. This one explains how it actually works at the architectural level, starting from the component that sits closest to the tester and makes everything else possible: the decompressor.</p><p>Understanding the decompressor means understanding a specific kind of mathematics that governs how binary logic networks behave. That mathematics is linear algebra over GF(2), and it turns out to be exactly the right framework for explaining why XOR networks can expand a small number of external inputs into a much larger number of internally valid test patterns, without guessing and without loss of determinism.</p><h3>The Setup: What the Decompressor Must Do</h3><p>Recall the architecture from the previous article. The tester drives a small number of external scan channels into the chip. On-chip, the design contains a much larger number of internal scan chains. The decompressor is the circuit that bridges these two worlds: it takes W external input channels and produces C internal scan chain inputs, where C &gt;&gt; W.</p><p>A typical compression ratio in industrial practice ranges from 10x to 100x. A design with 500 internal scan chains might be driven from 16 or 32 external channels through the decompressor.</p><pre>Decompressor Interface:<br>External (Tester Side)          Internal (Silicon Side)<br>                      <br>  ext_in[0]  ─┐                ┌─ chain_in[0]<br>  ext_in[1]  ─┤                ├─ chain_in[1]<br>  ext_in[2]  ─┤  DECOMPRESSOR  ├─ chain_in[2]<br>  ...          │                │  ...<br>  ext_in[W-1] ─┘                └─ chain_in[C-1]<br>  W = 32 external channels<br>  C = 500 internal chains<br>  Compression ratio = C / W = ~15x</pre><p>The decompressor must satisfy a strict requirement: given any combination of required care bit values at the internal scan inputs, there must exist an external input sequence that produces exactly those values through the decompressor. If no such external input exists for a given set of care bits, the ATPG engine cannot encode that test pattern and fault coverage is lost.</p><p>This encodability requirement is what drives the architecture of the decompressor. It cannot be arbitrary logic. It must be a specific kind of network whose expansion properties can be analyzed and guaranteed.</p><h3>Why XOR Gates Are the Right Building Block</h3><p>Before explaining the network structure, it helps to understand why XOR is the right gate for this job and not AND, OR, or any other function.</p><p>An XOR gate computes the modulo-2 sum of its inputs. In a two-input case: output = a XOR b = (a + b) mod 2. This operation has a property that no other basic logic gate shares: it is <strong>linear</strong>. This means the output of an XOR network is always a linear combination of its inputs, where all arithmetic is modulo 2.</p><p>Linearity has a profound consequence. If a network is built entirely from XOR gates, then the relationship between any set of outputs and the inputs that produced them can be fully described by a matrix equation:</p><pre>y = H * x   (all arithmetic mod 2)<br>where:<br>  x = input vector  (external channel values, dimension W)<br>  y = output vector (internal chain values, dimension C)<br>  H = characteristic matrix of the XOR network (dimension C x W)</pre><p>This is a system of linear equations over GF(2), the Galois field with two elements (0 and 1). Every entry in H is either 0 or 1. Every multiplication is AND. Every addition is XOR. The rules of linear algebra apply directly, including the concepts of rank, null space, and solvability.</p><p>This matrix representation is what allows the ATPG engine to reason about the decompressor analytically. Given a target output vector y (the care bits of a test pattern), the engine needs to find an input vector x such that H * x = y mod 2. This is a standard linear system solve over GF(2), and it is computationally fast.</p><h3>A Concrete XOR Network Example</h3><p>Consider a decompressor with 4 external inputs and 8 internal outputs. The XOR interconnect is defined as follows:</p><pre>External inputs: e0, e1, e2, e3<br>Internal outputs wired as:<br>  c0 = e0<br>  c1 = e1<br>  c2 = e2<br>  c3 = e3<br>  c4 = e0 XOR e1<br>  c5 = e1 XOR e2<br>  c6 = e2 XOR e3<br>  c7 = e0 XOR e2 XOR e3</pre><p>The characteristic matrix H for this network is:</p><pre>e0  e1  e2  e3<br>  c0 [  1   0   0   0 ]<br>  c1 [  0   1   0   0 ]<br>  c2 [  0   0   1   0 ]<br>  c3 [  0   0   0   1 ]<br>  c4 [  1   1   0   0 ]<br>  c5 [  0   1   1   0 ]<br>  c6 [  0   0   1   1 ]<br>  c7 [  1   0   1   1 ]</pre><pre>H is an 8x4 matrix over GF(2).</pre><p>Now suppose ATPG requires that internal chain inputs take the values: c0=1, c1=0, c4=1, c7=0 (and all others are don’t-care).</p><p>The engine extracts the relevant rows from H and solves:</p><pre>Equations for care bits:<br>  c0 = 1:   e0                    = 1   ... (i)<br>  c1 = 0:   e1                    = 0   ... (ii)<br>  c4 = 1:   e0 XOR e1             = 1   ... (iii)<br>  c7 = 0:   e0 XOR e2 XOR e3      = 0   ... (iv)<br>From (i):  e0 = 1<br>From (ii): e1 = 0<br>Check (iii): 1 XOR 0 = 1  (satisfied)<br>From (iv): 1 XOR e2 XOR e3 = 0  -&gt;  e2 XOR e3 = 1<br>e2 and e3 can be (0,1) or (1,0). Either is valid since<br>c2, c3, c5, c6 are don&#39;t-care in this pattern.<br>Solution: e0=1, e1=0, e2=0, e3=1  (or e2=1, e3=0)</pre><p>The ATPG engine picks either valid solution, encodes it as the external seed vector, and the decompressor reconstructs the required internal values on silicon during test. This is deterministic pattern reconstruction from a compact external representation.</p><h3>Seed Vectors and Pattern Expansion</h3><p>The term <strong>seed vector</strong> refers to the external input sequence applied to the decompressor to produce a specific internal scan pattern. Every test pattern in the compressed test set has a corresponding seed vector. The tester stores and shifts in the seed vectors. The decompressor expands them into internal patterns.</p><p>The relationship between seed length and internal pattern length defines the compression ratio:</p><pre>Uncompressed pattern:   C bits wide  (one bit per internal chain)<br>Compressed seed:        W bits wide  (one bit per external channel)<br><br>Per shift cycle, the tester sends W bits.<br>The decompressor produces C bits internally.<br>Compression ratio = C / W<br><br>Example:<br>  C = 512 internal chains<br>  W = 16  external channels<br>  Compression ratio = 32x<br>  1,000,000 uncompressed scan bits → 31,250 bits from tester</pre><p>Across a full shift sequence of L clock cycles, the tester supplies W x L bits total. The design shifts C x L bits internally. The compression ratio applies to the total data volume, not just one cycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*njPfxISaF_24SOulxscwZA.png" /></figure><h3>Linear Algebra Over GF(2): The Formal Foundation</h3><p>It is worth stating the mathematical framework explicitly, because it explains not just how the decompressor works but also what its limits are.</p><p>GF(2) is the simplest finite field. It contains two elements, 0 and 1, with addition defined as XOR and multiplication as AND. All standard theorems of linear algebra carry over to GF(2): vector spaces, rank, null space, linear independence, and solvability of linear systems.</p><p>The decompressor’s characteristic matrix H has C rows and W columns. For a given test pattern y (a vector of C care bit values, with don’t-cares treated as free variables), the encoding problem is:</p><blockquote>Find x in GF(2)^W such that H * x = y_specified</blockquote><blockquote>where y_specified contains only the rows of y corresponding to<br>care bits (specified bits),</blockquote><blockquote>and the corresponding rows of H are extracted to form H_reduced.</blockquote><blockquote>This system is solvable if and only if y_specified lies in the<br>column space of H_reduced over GF(2).</blockquote><p>The column space of H_reduced is determined by its rank. A rank-r matrix over GF(2) with W columns can represent 2^r distinct output vectors. If the number of care bits in a pattern is k, then the system has a solution when k &lt;= rank(H_reduced) and the care bit values are consistent with the column space.</p><p>This is why care bit sparsity matters so directly. When k is small (2% of C, as noted in the previous article), H_reduced has few rows, its rank is typically equal to k, and the system is almost always solvable. As k grows, the probability that a random H will support encoding decreases. This defines the practical upper limit on compression ratio for a given design: beyond a certain ratio, too many patterns become un-encodable and coverage degrades.</p><pre>Encodability vs. Compression Ratio (qualitative):<br><br>Compression     Encoding        Coverage<br>  Ratio           Success Rate    Impact<br>  -------         -----------     -------<br>  10x             ~99.9%          Negligible loss<br>  30x             ~99%            Negligible loss<br>  50x             ~97%            Minor loss, recoverable<br>  100x            ~90%            Measurable loss<br>  200x            &lt;80%            Significant coverage gap<br>  (Exact values depend on design, care bit density, and H structure)</pre><p>The ATPG tool models this explicitly. For each pattern, it checks encodability against the H matrix and either finds a seed or marks the pattern as un-encodable. Un-encodable patterns translate directly to un-detected faults, which is why the compression ratio is a tunable parameter, not a free choice.</p><h3>Ring Generators and Phase Shifters: Building H in Practice</h3><p>In real implementations, the decompressor is not constructed by hand-specifying an XOR matrix. Instead, it is built from two standard structures: a <strong>ring generator</strong> (also called a ring oscillator-based LFSR or broadcast scan element) and a <strong>phase shifter</strong>.</p><p>The ring generator is a circular shift register with XOR feedback taps. It takes the W external inputs and generates W internal states per clock cycle. The phase shifter is a combinational XOR network that maps those W states to C output values, introducing phase offsets so that each internal chain receives a distinct linear combination of the ring generator’s outputs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0-1fLgJFiry4PV7AEhVspA.png" /><figcaption>This is an AI generated image :)</figcaption></figure><p>The combined effect of the ring generator and phase shifter is to create a characteristic matrix H that has good rank properties. Specifically, any subset of W rows drawn from H should ideally be linearly independent over GF(2), ensuring that any combination of up to W care bits can be encoded. This property is not guaranteed for arbitrary XOR assignments but is achieved through careful design of the feedback polynomial and phase offsets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6pBWxjchjYTrVe6o0zNOAQ.png" /></figure><h3>What ATPG Knows That Hardware Does Not</h3><p>There is an asymmetry between what the decompressor hardware implements and what the ATPG tool must know to generate valid seeds.</p><p>The hardware implements H. It has no memory of what patterns were requested. It simply computes y = H * x every clock cycle and delivers the result to the internal chains. It has no concept of whether the expanded values are correct or not.</p><p>The ATPG tool, on the other hand, knows H exactly. It uses the matrix to encode every care bit assignment into a corresponding seed vector during pattern generation, off-line, before the test is ever loaded onto the tester. The encoding step is part of ATPG, not part of silicon operation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zy5TeWwpxSTRKCIgmnK2dA.png" /><figcaption>also AI generated :)</figcaption></figure><p>The result of this process is a test program where every pattern is represented as a compact seed. The ATE stores seeds, not full patterns. The decompressor reconstructs the full patterns on-chip during production test. The reconstruction is deterministic because H is a fixed property of the silicon.</p><h3>The Limits of Linear Decompression</h3><p>Linear decompression is powerful, but it has structural limits worth understanding explicitly.</p><p>The first is the <strong>X-blocking problem</strong>. Unknown logic values (X-states) in the design — caused by uninitialized memory, bus contention, or three-state nets — can propagate into scan cells during capture. If an X value lands in a scan cell whose response is observed through the compactor, it corrupts the expected response at that output channel. X-masking logic is needed to handle this, and it interacts with the compactor design rather than the decompressor.</p><p>The second is the <strong>channel encoding conflict problem</strong>. Even with sparse care bits, it is possible for two care bits in the same pattern to require the same internal chain to take two different values in the same shift cycle. This happens when the ATPG engine attempts to merge two patterns that share a chain input. The linear system becomes inconsistent and the merge fails. The ATPG engine handles this by falling back to separate patterns for conflicting bit assignments.</p><p>The third is the <strong>compression ratio ceiling</strong>. As the ratio C/W grows, the rows of H become increasingly dependent, and the probability that a random set of k care bits falls in the null space of H_reduced increases. Beyond roughly 50x to 100x compression on typical industrial designs, coverage degradation becomes significant and requires supplementary techniques such as test point insertion to reduce care bit density before compression.</p><h3>Closing Remarks</h3><p>Linear decompression through XOR networks is the mechanism that makes scan compression work. The key ideas in this article can be summarized concisely.</p><p>First, a decompressor is an XOR network whose behavior is completely described by a binary matrix H over GF(2). Second, the encoding problem finding an external seed that produces required internal values is a linear system solve over GF(2), and it is computationally fast. Third, encodability depends on care bit sparsity: sparse patterns are almost always encodable, dense patterns increasingly are not, which defines the practical compression limit. Fourth, the ring generator plus phase shifter architecture is the standard hardware implementation that achieves good rank properties with minimal silicon area. Fifth, the ATPG tool knows H and uses it offline to generate compressed test programs; the hardware simply applies H and produces the expanded patterns deterministically.</p><p>The compactor on the response side introduces a different set of considerations aliasing, X-tolerance, and observation masking which the next article will cover in detail.</p><p><em>This article is part of an ongoing series on Design for Testability. Previous entries cover fault modeling, ATPG, scan architectures, scan implementation, chain balancing, physical-aware stitching, and why compression is mandatory. The full series is on my </em><a href="https://medium.com/@ranaumarnadeem"><em>Medium profile</em></a><em>.</em></p><p><strong>Further Reading:</strong></p><ul><li><a href="https://blogs.sw.siemens.com/tessent/2015/09/24/using-edt-test-points-to-reduce-test-time-and-cost/">Siemens EDA — EDT Compression Architecture and Decompressor Design</a></li><li><a href="https://www.synopsys.com/implementation-and-signoff/test-automation/dftmax-compression.html">Synopsys — DFTMAX Compression Technical Overview</a></li><li><a href="https://ieeexplore.ieee.org/document/1369847">IEEE Xplore — Linear Decompression and Test Data Compression Survey</a></li><li><a href="https://www.cadence.com/en_US/home/tools/chip-design/logic-design/modus-dft-software-solution.html">Cadence — Modus DFT Compression Flow</a></li></ul><h3>Connect with Me:</h3><ul><li><strong>GitHub:</strong> <a href="https://github.com/ranaumarnadeem">ranaumarnadeem</a></li><li><strong>Medium:</strong> <a href="https://medium.com/@ranaumarnadeem">@ranaumarnadeem</a></li><li><strong>LinkedIn:</strong> <a href="http://www.linkedin.com/in/rana-umar-nadeem">Rana Umar Nadeem</a></li></ul><p>#VLSI #ASICDesign #LogicSynthesis #ClockGating #LowPowerDesign #RTLDesign #DigitalDesign #DFT #BackendDesign #EDA #Cadence#Genus #Sky130 #RTLtoGDSII #SemiconductorEngineering #PowerOptimization #TechBlog #PREMAPPING #LEC #COP #SOACP #distance #controllibility #modus #scan_chains</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52ef08faab19" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design for Testability: Why Scan Compression Becomes Mandatory]]></title>
            <link>https://medium.com/@ranaumarnadeem/design-for-testability-why-scan-compression-becomes-mandatory-dd4e13227acb?source=rss-1d68360f7ace------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd4e13227acb</guid>
            <category><![CDATA[asic-design]]></category>
            <category><![CDATA[vlsi]]></category>
            <category><![CDATA[design-for-testability]]></category>
            <category><![CDATA[vlsi-physical-design]]></category>
            <category><![CDATA[chip-design]]></category>
            <dc:creator><![CDATA[Rana Umar Nadeem]]></dc:creator>
            <pubDate>Sun, 31 May 2026 09:11:00 GMT</pubDate>
            <atom:updated>2026-05-31T09:11:00.507Z</atom:updated>
            <content:encoded><![CDATA[<p>There is a common assumption embedded in how engineers first encounter scan design: that once you have full scan insertion, the hard work is done. The flip-flops are accessible, the ATPG engine can reach every node, and fault coverage targets are achievable. On paper, nothing is missing.</p><p>What that view ignores is <em>cost</em> specifically, the cost of actually moving test data between the chip and the tester. Scan gave us access to the interior of the device. But as transistor counts scaled upward and as the gap between what a chip contains and what a tester can handle grew wider, delivering that access became the dominant constraint. The question stopped being “can we test this?” and became “can we afford to test this?”</p><p>That is the context in which scan compression stops being an optimization and becomes a design requirement.</p><h3>The Numbers Behind the Problem</h3><p>To understand why compression is necessary, it helps to work through the arithmetic of uncompressed scan test at modern transistor counts.</p><p>A contemporary high-performance SoC a mid-range mobile application processor, for instance can contain upward of 10 to 20 million flip-flops subject to scan insertion. A full-scan ATPG run targeting stuck-at and transition fault coverage at 99% will typically produce somewhere between 10,000 and 100,000 test patterns, depending on design complexity, clock domain structure, and logic cone depth.</p><p>Each pattern requires shifting data into and out of every scan cell. With 10 million flip-flops organized into, say, 1,000 parallel chains of 10,000 cells each, one shift operation requires 10,000 clock cycles per chain. A single test pattern one shift-in, one capture, one shift-out therefore consumes roughly 20,000 tester cycles (10,000 to shift in, 10,000 to shift out, with the capture in between). Across 50,000 patterns, the total tester cycles for the scan test alone reaches:</p><pre>Shift cycles per pattern  = 2 × chain_length<br>                          = 2 × 10,000<br>                          = 20,000 cycles</pre><pre>Total tester cycles       = patterns × cycles_per_pattern<br>                          = 50,000 × 20,000<br>                          = 1,000,000,000 cycles (10^9)</pre><pre>At 100 MHz tester clock   → 10 seconds of test time per device</pre><p>Ten seconds may sound manageable in isolation. But at volume a production line running thousands of devices per day test time translates directly to tester occupancy, which translates directly to cost per die. A one-second reduction in test time per device across a million-unit production run represents one million seconds of freed tester capacity. The economics are unforgiving.</p><p>And this estimate is conservative. It uses a relatively modest flip-flop count, a moderate pattern set, and a generous tester clock frequency. For a design with 50 million flip-flops and 200,000 patterns which is not unusual in a high-end GPU or networking SoC the test time without compression becomes genuinely prohibitive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BOJqxxFRYjIx1Ut3O0iefg.png" /></figure><h3>The ATE Bandwidth Problem</h3><p>The automatic test equipment (ATE) problem is not merely one of time it is also one of physical bandwidth.</p><p>An ATE communicates with the device under test (DUT) through its pin electronics: the hardware channels that drive stimulus onto each pin and capture response from each pin. These channels are the physical interface between the tester’s memory and the device. Every scan-in pin requires a dedicated channel driving test data, and every scan-out pin requires a channel capturing response data.</p><p>The fundamental constraint is this: <strong>pin electronics counts on ATE have not scaled proportionally with transistor counts on silicon.</strong></p><p>Transistor counts have followed something close to Moore’s Law roughly doubling every two years through much of the history of the industry. ATE pin counts have grown far more slowly, constrained by the physical cost of each channel (the analog components, the timing calibration hardware, the cabling), the power dissipation of the tester head, and the sheer mechanical complexity of making high-frequency contact to hundreds of pins simultaneously.</p><blockquote><em>A rough measure of test complexity can be expressed as the ratio Nt/Np — the number of transistors on the chip divided by the number of peripheral I/O pins. Industry roadmap data from the late 1990s showed this ratio already reaching values on the order of 11,000. In more recent designs, it is significantly higher. — </em>VLSI Design Verification and Test, University of New Mexico</blockquote><p>The implication is structural. The silicon side of this ratio scales aggressively. The tester side does not. Every generation of process technology widens the gap between how much testable content exists on the die and how much bandwidth the ATE can supply to reach it.</p><pre>Silicon Scaling (approximate):<br>  Year N:    1B  transistors,  500  scan FFs/pin<br>  Year N+2:  2B  transistors,  550  scan FFs/pin  (pin count grows slowly)<br>  Year N+4:  4B  transistors,  620  scan FFs/pin<br>  Year N+6:  8B  transistors,  700  scan FFs/pin</pre><pre>The per-pin burden grows with every process generation.<br>Without compression, either test coverage drops or test time explodes.</pre><p>This is not a problem that can be solved by simply buying more expensive testers. High-pin-count ATE platforms exist, but their cost scales steeply with pin count and channel frequency. The capital cost of an ATE with thousands of high-speed pin electronics channels can reach several million dollars per unit. Depreciated across a production run, the cost per test second is non-trivial — and the test time for an uncompressed large design at full coverage can easily exceed the economic threshold.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H-A91V5B7cTtvU-MyyqVQw.png" /></figure><p>For a more detailed overview of ATE architecture and its cost structure, Siemens EDA (formerly Mentor Graphics) have published accessible introductions:</p><ul><li><a href="https://blogs.sw.siemens.com/tessent/2015/09/24/using-edt-test-points-to-reduce-test-time-and-cost/">Siemens EDA — Using EDT Test Points to Reduce Test Time and Cost</a></li><li><a href="http://ece-research.unm.edu/jimp/vlsi_test/slides/html/overview1.htm">VLSI Testing Process Overview — UNM ECE</a></li></ul><h3>The Care-Bit Observation</h3><p>There is a property of ATPG patterns that creates the opening for compression, and it is worth understanding precisely.</p><p>When an ATPG engine generates a test pattern for a given set of target faults, it assigns specific logic values to a subset of scan cells — the cells that need particular values to activate the target faults, propagate their effects, or constrain logic cones during capture. These cells are called <strong>specified bits</strong> or <strong>care bits</strong>.</p><p>The remaining scan cells in the pattern are unspecified. The ATPG engine does not care what value they hold, because those cells do not affect the detection of the target faults in that pattern. Their values are typically filled with pseudo-random data or left as X (don’t-care).</p><p>In practice, the ratio of care bits to total bits in a well-generated ATPG pattern is small. Empirical data from industrial designs consistently shows that <strong>only 1% to 5% of scan cell values in a typical ATPG pattern are specified</strong>. The other 95% to 99% are don’t-care.<br><strong>Typical ATPG Pattern Structure:</strong></p><pre>Total scan cells in design:        1,000,000<br>Care bits per pattern (avg ~2%):       20,000<br>Don&#39;t-care bits per pattern:          980,000</pre><pre>In conventional uncompressed scan:<br>  → All 1,000,000 bits are shifted in from the tester, even though<br>    only 20,000 of them are meaningful.</pre><pre>Information density per pattern:  2%<br>Waste per pattern:                98%</pre><p>This observation is the foundational justification for scan compression. The tester is spending 98% of its shift bandwidth moving data that carries no fault-detection value. If that don’t-care space can be exploited if a mechanism exists to encode the 2% of meaningful bits into a compact external representation and expand them on-chip then the external test data volume can be reduced dramatically without any reduction in fault coverage.</p><h3>The Compression Principle: External vs. Internal Data</h3><p>Scan compression is architecturally simple in principle, even though its implementation involves careful engineering.</p><p>The core idea is to decouple the <strong>external data width</strong> (the number of scan channels the tester drives) from the <strong>internal data width</strong> (the number of scan chains inside the design). A small number of external channels driven by the tester feed into an on-chip <strong>decompressor</strong>, which expands the incoming data into a larger number of internal scan chains. On the output side, an on-chip <strong>compactor</strong> collects responses from all internal chains and compresses them into a smaller number of output channels back to the tester.<br><strong>Without Compression:</strong></p><pre>  ATE (1000 pins) ─────────────────────────────── 1000 scan chains<br>                   one-to-one correspondence<br>                   tester drives every chain directly</pre><pre>With Compression:</pre><pre>  ATE (32 channels) ──► [DECOMPRESSOR] ──► 1000 internal scan chains<br>                              │<br>                              ▼<br>                        32 × compression<br>                        ratio = 31.25×</pre><pre>  1000 internal chains ──► [COMPACTOR] ──► 32 output channels ──► ATE</pre><pre>  External bandwidth: 32 channels<br>  Internal bandwidth: 1000 chains<br>  Compression ratio:  ~31×</pre><p>The decompressor is not simply duplicating the 32 input channels onto 1000 outputs — that would create dependencies between chains and prevent independent control of each. Instead, it uses linear feedback mechanisms like XOR networks, ring LFSRs, or phase shifters(more on this in upcoming blogs) to generate a large number of pseudo-independent bit streams from the small number of external inputs. The ATPG tool, which understands the decompressor’s transfer function, generates patterns that, when fed through the decompressor, produce the required care bit values at the correct internal scan cell positions.</p><p>This is the critical architectural insight: <strong>the don’t-care bits in the ATPG pattern are not wasted space they become degrees of freedom that the compression algorithm uses to solve the decompressor encoding problem.</strong> The sparsity of care bits is precisely what makes compression feasible. If every bit in every pattern were specified, there would be no flexibility to find a compact external encoding.</p><p>The compactor on the output side uses a complementary XOR-based structure to fold multiple chain outputs into fewer channels. This introduces the possibility of aliasing two different fault responses mapping to the same compacted output but the probability of undetected aliasing is made negligibly small through careful compactor design and X-masking strategies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gb-xT50C7TdjHszDOn3VkA.png" /></figure><h3>Why This Is Not an Optimization</h3><p>The framing of scan compression as a design option something you add if you want to improve test efficiency is technically accurate but practically misleading.</p><p>At process nodes below 28nm, for designs with more than a few million flip-flops, the test data volume of an uncompressed full-scan ATPG run at target coverage will exceed the storage capacity of realistic ATE configurations, or the test time will exceed the economic threshold for production test, or both. These are not edge cases. They are the expected outcomes for any competitive SoC at advanced nodes.</p><p>The ITRS (International Technology Roadmap for Semiconductors) and its successor, the IRDS, have tracked the test cost and ATE bandwidth gaps for decades. The conclusion has been consistent: without on-chip test data reduction, test cost grows faster than design value at each successive process node. This is sometimes called the <strong>test cost crisis.</strong></p><p>From a flow perspective, this means compression infrastructure decompressor logic, compactor logic, scan channel definitions must be planned at the DFT architecture stage, before scan insertion. It affects the scan chain count, the scan channel pin assignments, the ATPG configuration, and the test protocol. It is not something that can be bolted on after the fact without significant re-insertion effort.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8h8vLEICWfpp6NLXoqY1cQ.png" /></figure><p>The decision is not whether to use compression. For any serious production design at advanced nodes, that decision has already been made by the constraints of physics and economics. The engineering decisions that remain are about compression architecture, compression ratio, compactor design, and the interplay between compression and the physical scan topology established in the previous article. Those are the topics this series will address next.</p><h3>What Compression Does Not Change</h3><p>It is worth being precise about the boundary of what compression achieves.</p><p>Scan compression reduces the <strong>external test data volume</strong> the bits that flow between the tester and the chip. It does not reduce the number of internal scan cells, the number of internal chains, or the total number of shift cycles occurring inside the device. Internally, the design still performs the same number of shift and capture operations as it would without compression. The silicon area consumed by scan flip-flops is unchanged.</p><p>What changes is the tester’s view of the device. From the tester’s perspective, the chip presents 32 (or 64, or 128) scan channels, not 1000. The tester stores and drives only the compressed representation of the test data. The chip does the work of expanding and compacting, and it does so using hardware that is small relative to the scan cell count typically 1% to 3% area overhead for the compression logic itself.</p><p>The internal test quality i.e the fault coverage achieved by the expanded patterns can be maintained at the same level as uncompressed full-scan, provided the compression architecture is correctly configured and the ATPG tool accounts for the decompressor’s transfer function when generating patterns.</p><p><strong>What Compression Changes:</strong><br> ✓ External test data volume (reduced by compression ratio)<br> ✓ Tester memory requirement (reduced)<br> ✓ Tester time per device (reduced)<br> ✓ Scan channel pin count required (reduced)<br><strong>What Compression Does NOT Change:</strong><br> ✗ Internal scan cell count<br> ✗ Internal chain count<br> ✗ Fault coverage target<br> ✗ On-chip shift clock frequency<br> ✗ ATPG fault models used</p><p>This distinction matters because it defines what problem compression solves and what problems remain. After compression, the internal scan topology still needs to be physically optimized — the chain balancing and physical-aware stitching challenges from the previous article do not disappear. They now interact with the compression architecture in ways that require careful co-optimization, which is the engineering content the next several articles in this series will unpack.</p><h3>Closing Remarks</h3><p>The case for scan compression rests on three observations that are each individually sufficient, and together are decisive.</p><p>First, transistor counts scale exponentially while ATE pin bandwidth scales slowly — the ratio of internal testable content to external test bandwidth widens with every process generation. Second, uncompressed test data volume for a large design at target coverage exceeds practical tester storage and time budgets. Third, ATPG patterns are inherently sparse in specified bits, which means the information content of the test data is far smaller than its raw bit volume — creating space for lossless or near-lossless compression without coverage impact.</p><p>Compression is the mechanism that reconciles the silicon’s testability requirements with the physical reality of what ATE can deliver. Understanding why it exists — not just how it is implemented — is what allows a DFT engineer to make correct architectural decisions when the tradeoffs between compression ratio, fault coverage, X-tolerance, and physical scan topology must be balanced simultaneously.</p><p>The next article will examine the specific architectures through which compression is implemented: the decompressor topologies, the compactor designs, and the engineering choices that determine how much compression is achievable before coverage begins to degrade.</p><p><strong>Further Reading:</strong></p><ul><li><a href="https://blogs.sw.siemens.com/tessent/2015/09/24/using-edt-test-points-to-reduce-test-time-and-cost/">Siemens EDA Tessent — EDT Test Compression Overview</a></li><li><a href="https://vlsitutorials.com/test-compression-edt/">VLSI Tutorials — Test Compression and EDT Architecture</a></li><li><a href="http://ece-research.unm.edu/jimp/vlsi_test/slides/html/overview1.htm">UNM ECE — The VLSI Testing Process and ATE</a></li><li><a href="https://www.academia.edu/97047992/Implementation_and_Performance_Analysis_of_Various_Scan_Compression_Techniques">Academia — Scan Compression Techniques: EDT and Broadcast Architectures</a></li></ul><p><em>This article is part of my ongoing series on Design for Testability. Previous entries cover fault modeling, ATPG fundamentals, scan cell architectures, scan design implementation, scan chain balancing, and physical-aware scan stitching. The full series is available on </em><a href="https://medium.com/@ranaumarnadeem"><em>my Medium profile</em></a><em>.</em></p><h3>Connect with Me:</h3><ul><li><strong>GitHub:</strong> <a href="https://github.com/ranaumarnadeem">ranaumarnadeem</a></li><li><strong>LinkedIn:</strong> <a href="http://www.linkedin.com/in/rana-umar-nadeem">Rana Umar Nadeem</a></li></ul><p>#VLSI #ASICDesign #LogicSynthesis #ClockGating #LowPowerDesign #RTLDesign #DigitalDesign #DFT #BackendDesign #EDA #Cadence#Genus #Sky130 #RTLtoGDSII #SemiconductorEngineering #TechBlog #modus #scan_chains #scancompression #xornetworks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd4e13227acb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design for Testability: Scan Chain Balancing and Physical-Aware Stitching]]></title>
            <link>https://medium.com/@ranaumarnadeem/design-for-testability-scan-chain-balancing-and-physical-aware-stitching-50dd533d1164?source=rss-1d68360f7ace------2</link>
            <guid isPermaLink="false">https://medium.com/p/50dd533d1164</guid>
            <category><![CDATA[vlsi-physical-design]]></category>
            <category><![CDATA[asic-physical-design]]></category>
            <category><![CDATA[chips]]></category>
            <category><![CDATA[design-for-testability]]></category>
            <category><![CDATA[vlsi]]></category>
            <dc:creator><![CDATA[Rana Umar Nadeem]]></dc:creator>
            <pubDate>Fri, 29 May 2026 07:54:38 GMT</pubDate>
            <atom:updated>2026-05-29T07:54:38.373Z</atom:updated>
            <content:encoded><![CDATA[<p>Scan gave us access, but access itself has now become expensive.</p><p>In earlier articles in this series, we established how scan design transforms every flip-flop into a controllable, observable element by stitching them into serial shift-register chains. That architecture solved the fundamental testability problem. But as designs scaled — in terms of gate count, physical die area, and operating frequency — a new class of problems emerged. The chains that were logically straightforward to construct became physically expensive to implement. Routing them naively across a floorplan adds wire length, consumes routing resources, violates timing budgets, and inflates the power profile during test.</p><p>This article addresses the two engineering disciplines that exist to resolve those problems: <strong>scan chain balancing</strong> and <strong>physical-aware scan stitching</strong>. Together, they represent the transition of DFT from an RTL-level concern into a full back-end optimization problem.</p><h3>Why Logical Scan Ordering Creates Physical Problems</h3><p>When synthesis tools stitch scan chains, they do so by following a logical order — typically derived from the netlist topology, the scan cell naming convention, or the scan insertion script. This order has nothing to do with where those flip-flops actually land after physical placement.</p><p>Consider what happens in practice. A synthesis tool may stitch a scan chain where consecutive cells are:</p><ul><li>FF_A — placed in the upper-left corner of the die</li><li>FF_B — placed in the lower-right corner</li><li>FF_C — placed back near the upper-center</li></ul><p>Each of these handoffs introduces a <strong>long wire</strong> traversing a significant physical distance. Multiply this pattern across thousands of flip-flops in a chain, and the result is a scan routing network that criss-crosses the entire chip. This is sometimes called a <strong>Manhattan spaghetti</strong> problem the wires are individually routed but collectively chaotic.</p><pre>Logical Scan Order (post-synthesis):<br>FF_01 → FF_02 → FF_03 → FF_04 → FF_05 → ...</pre><pre>Physical Placement :<br>+-------------------------------+<br>|  FF_03         FF_01          |<br>|                               |<br>|        FF_05                  |<br>|                               |<br>|  FF_04         FF_02          |<br>+-------------------------------+</pre><pre>Resulting scan wires: long, crossing, high-resistance paths</pre><p>The consequences of this mismatch are not merely aesthetic. They directly affect:</p><ul><li><strong>Scan path timing</strong>: Long interconnects have higher RC delay. If the scan path violates timing at test frequency, data corruption occurs during shift.</li><li><strong>Signal integrity</strong>: Long routes are more susceptible to coupling noise, especially in advanced nodes where interconnect density is high.</li><li><strong>Routing congestion</strong>: The router has to accommodate these long diagonal connections on top of the functional routing, increasing congestion in already-tight regions.</li><li><strong>Test power</strong>: Longer nets toggle more wire capacitance per shift cycle, increasing dynamic power dissipation during shift operations.</li></ul><p>This is the fundamental tension at the heart of physical-aware DFT: <strong>the logical chain and the physical topology are optimized independently</strong>, and they are often in direct conflict.</p><h3>Scan Chain Length and the Shift Time Problem</h3><p>Before discussing how to fix the physical ordering problem, it is worth understanding a related constraint: how chain length affects test time.</p><p>The shift time for a single chain is proportional to the number of flip-flops in that chain. To load one test vector, the tester must shift through every cell in the chain. If a design has 100,000 flip-flops stitched into a single chain, loading one pattern requires 100,000 clock cycles of shift. When tens of thousands of patterns are needed, the test time becomes prohibitive.</p><p>The standard solution is to split the design into <strong>multiple parallel scan chains</strong>, all driven from the same test controller but operating simultaneously. If a design with 100,000 flip-flops is split into 100 chains of 1,000 flip-flops each, the shift time per pattern drops by a factor of 100.</p><pre>Single Chain (Unbalanced):<br>[SI] → FF_1 → FF_2 → ... → FF_100000 → [SO]<br>Shift cycles per pattern: 100,000</pre><pre>100 Balanced Chains (Parallel):<br>Chain  1: [SI_1]  → FF_1   → ... → FF_1000  → [SO_1]<br>Chain  2: [SI_2]  → FF_2   → ... → FF_2000  → [SO_2]<br>...<br>Chain 100: [SI_100] → FF_99001 → ... → FF_100000 → [SO_100]<br>Shift cycles per pattern: 1,000  (100x improvement)</pre><p>This is the basic principle of <strong>scan chain balancing</strong> distributing flip-flops as evenly as possible across a target number of chains, so that no single chain becomes the bottleneck for shift time.</p><p>However, simply partitioning the flat list of flip-flops equally does not account for physical distance. A balanced-length chain with poor physical ordering still produces long wires. The goal, therefore, is <strong>simultaneous balancing and physical ordering</strong> a problem that requires the physical placement database to drive the scan stitching decision.</p><h3>Physical-Aware Scan Stitching: The Core Idea</h3><p>Physical-aware scan stitching is the process of reordering the flip-flops within each scan chain — and potentially redefining chain boundaries — based on their <strong>physical coordinates</strong> after placement.</p><p>The guiding principle is simple: <strong>cells that are physically close together should be adjacent in the scan chain</strong>. This minimizes the total wire length consumed by scan routing, reduces the timing risk in the scan path, and eases the burden on the detailed router.</p><p>algorithim</p><pre>Input:  placed_cells[]    // list of all scan flip-flops with (x, y) coordinates<br>        num_chains        // target number of scan chains<br>        max_chain_length  // maximum allowed cells per chain</pre><pre>Step 1: Partition the floorplan into num_chains physical regions<br>        (e.g., using a space-filling curve or column-based partitioning)</pre><pre>Step 2: For each region R_i:<br>        - Collect all placed_cells within R_i<br>        - Sort cells by proximity using nearest-neighbor traversal or<br>          a space-filling curve (e.g., Hilbert curve order)</pre><pre>Step 3: Assign sorted cells to chain_i in traversal order</pre><pre>Step 4: If any chain_i exceeds max_chain_length:<br>        - Split at the midpoint and create a sub-chain<br>        - Re-balance across neighboring regions</pre><pre>Step 5: Verify chain length uniformity:<br>        - max(chain_length) - min(chain_length) &lt;= tolerance</pre><pre>Output: reordered scan chains with minimized total wire length</pre><p>The key insight here is that <strong>scan stitching is not a one-time RTL decision </strong>it is an iterative back-end step that must be revisited after every significant placement change, including any engineering change orders (ECOs), power domain modifications, or floorplan revisions.</p><h3>Space-Filling Curves and Region-Based Ordering</h3><p>Two physical ordering strategies are widely used in practice.</p><p><strong>Region-based ordering</strong> partitions the die into rectangular tiles and stitches all flip-flops within a tile before moving to the next. This is conceptually simple and maps well to hierarchical block structures in large SoCs. The scan chain follows a tile-traversal order — left to right, bottom to top, or in a snake pattern which keeps consecutive cells physically nearby.</p><pre>Region-Based Tile Traversal:<br>+-------+-------+-------+<br>|  R1   |  R2   |  R3   |   Snake pattern:<br>|  →→→  |  ←←←  |  →→→  |   R1 → R2 → R3<br>+-------+-------+-------+       ↑<br>|  R4   |  R5   |  R6   |   R6 → R5 → R4<br>|  →→→  |  ←←←  |  →→→  |<br>+-------+-------+-------+</pre><pre>Each flip-flop within a region is sorted by row (Y), then column (X)</pre><p><a href="https://mathworld.wolfram.com/HilbertCurve.html"><strong>Hilbert curve ordering</strong></a> is a more sophisticated approach that uses a fractal space-filling curve to traverse the 2D placement grid. The Hilbert curve has the property of maximizing spatial locality cells that are close in the 1D scan order are also close in 2D space. This minimizes the average wire length between consecutive scan cells better than simple row-column sorting.</p><pre>Hilbert Curve 2D → 1D Mapping (Order 2): <br>13-14  1--2<br>  |  |  |  |<br> 12-15  0  3<br>        |  |<br>  9-10  7--4 (not adjacent physically, but minimal avg. hop distance)<br>  |  |  |  |<br>  8-11  6--5</pre><pre>Cells are stitched in the numerical order of their Hilbert index,<br>ensuring spatially proximate cells appear consecutively in the chain.</pre><p>In practice, most EDA tools implement a variant of these two approaches often a hybrid that uses coarse region partitioning and then fine-grained nearest-neighbor ordering within each region.</p><h3>The Balancing-vs-Routing Trade-off</h3><p>It would seem that the problem reduces to: make chains equal in length, and route them in physical order. In reality, these two objectives are in tension with each other.</p><p>When flip-flops are distributed unevenly across the die which is common in real designs where logic clusters around specific functional blocks strict physical ordering may produce chains of very unequal length. A region dense with flip-flops will produce a long chain, while a sparse region will produce a short one. The longest chain then determines the shift time for the entire test, even if most chains are short.</p><p>Correcting this requires <strong>cross-region rebalancing</strong>: flip-flops are moved from long chains to short chains. But this means a flip-flop may now be stitched into a chain anchored in a different physical region, introducing a long inter-region wire — exactly the kind of wire we were trying to avoid.</p><pre>Balancing vs. Routing Wire Length Trade-off:</pre><pre>Scenario A: Purely balanced chains (ignore physical distance)<br>  Chain 1: 1000 cells, avg. cell distance = 500 µm<br>  Chain 2: 1000 cells, avg. cell distance = 480 µm<br>  Total scan wire length: HIGH</pre><pre>Scenario B: Purely physical order (ignore chain length)<br>  Chain 1: 1800 cells  ← bottleneck, long shift time<br>  Chain 2:  200 cells  ← idle capacity<br>  Total scan wire length: LOW<br>  Shift time: DOMINATED by Chain 1</pre><pre>Scenario C: Constrained balancing (industry target)<br>  Chain 1: 1050 cells, avg. cell distance = 120 µm<br>  Chain 2:  950 cells, avg. cell distance = 110 µm<br>  Total scan wire length: MODERATE<br>  Shift time: NEAR-OPTIMAL</pre><pre>Typical tolerance: ± 5–10% deviation from mean chain length</pre><p>This is an optimization problem with competing cost functions, and most EDA tools expose it as a constrained optimization with user-specified tolerances on chain length imbalance and a penalty on scan wire length.</p><h3>Scan Stitching as a Back-End Problem</h3><p>It is important to understand <strong>when</strong> physical-aware scan stitching takes place in the design flow. It is emphatically not an RTL step — the flip-flops are not yet placed at RTL stage, so no physical information is available to guide the stitching.</p><p>The flow broadly proceeds as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2a0RWeCbODcja1keTsfFDg.png" /></figure><p>Several things are worth noting in this flow.</p><p>First, the logical scan order established at RTL insertion is essentially <strong>thrown away</strong> during physical-aware restitching. The restitching tool reads the physical database (DEF + LEF), queries the coordinates of every scan cell, and generates a new stitching order from scratch. The original logical order serves only as a fallback if physical data is unavailable.</p><p>Second, the process may need to be <strong>repeated after ECOs</strong>. Any change that moves cells power domain adjustments, buffer insertion, timing fixes can invalidate the physical scan order and require incremental restitching.</p><p>Third, the restitching tool generates a new <strong>SDC (Synopsys Design Constraints)</strong> file that captures the updated scan chain definitions. This SDC is then consumed by the ATPG tool to generate test patterns that match the physical chain configuration. ATPG patterns generated against the logical chain would produce incorrect results if run against the physically restitched chain the shift-in and shift-out sequences would not correspond to the actual hardware.</p><h3>Multi-Corner and Low-Power Considerations</h3><p>Physical-aware scan stitching becomes more complex when low-power design techniques are involved.</p><p><strong>Power domains and voltage islands</strong> introduce hard constraints on scan chain boundaries. Flip-flops in different voltage domains cannot be part of the same scan chain unless appropriate level shifters are inserted at the domain crossing. Each crossing adds area, timing uncertainty, and potential for metastability. The stitching tool must therefore treat domain boundaries as <strong>hard cut points</strong> in the chain — no cell may be stitched across a domain boundary without an explicit isolation strategy.</p><pre>Power Domain Scan Constraints:</pre><pre>Domain A (1.0V):  FF_1, FF_2, FF_3, FF_4<br>Domain B (0.8V):  FF_5, FF_6, FF_7</pre><pre>INVALID stitching:<br>  FF_3 (Domain A) → FF_5 (Domain B)  ← direct crossing, no level shifter</pre><pre>VALID stitching (with isolation cell):<br>  FF_3 → ISO_CELL → FF_5  ← level-shifted crossing, constrained timing<br>  OR<br>  Chain A terminates at FF_4 (SO_A)<br>  Chain B originates at FF_5 (SI_B)  ← separate chain per domain</pre><p><strong>Clock domain crossing (CDC)</strong> presents a similar challenge. Scan cells clocked by different functional clocks are typically not mixed in the same chain, because the ATPG tool needs to know which clock drives which cell to generate valid capture sequences. The stitching constraints file must annotate each cell with its associated test clock, and chain partitioning must respect these clock groupings.</p><h3>Metrics That Matter</h3><p>When evaluating the quality of a physical-aware scan stitching solution, the following metrics are tracked:</p><p><strong>Total scan wire length</strong> is the sum of all wires used to connect consecutive scan cells. Lower is better — it reduces routing congestion, improves signal integrity, and reduces shift power.</p><p><strong>Chain length imbalance</strong> is the difference between the longest and shortest chain, expressed as a percentage of the mean. Values below 5% are considered well-balanced. High imbalance means the longest chain is the bottleneck for test time.</p><p><strong>Scan path timing</strong> is the hold and setup timing of the scan path itself. At high test frequencies (typically half the functional frequency), long scan wires may introduce timing violations that corrupt shift data.</p><p><strong>Via count on scan routes</strong> matters at advanced nodes where via resistance is significant. A good stitching solution minimizes layer changes in the scan path, reducing via-induced delay. In summary</p><pre>Metric                    | Target        | Poor Value<br>--------------------------|---------------|-----------<br>Total scan wire length    | Minimize      | &gt; 2x optimal<br>Chain length imbalance    | &lt; 5%          | &gt; 20%<br>Scan path timing slack    | &gt; 0 ps        | Negative<br>Cross-domain crossings    | Minimize      | Uncontrolled<br>Via count on scan nets    | Minimize      | Excessive</pre><h3>Closing Remarks</h3><p>Scan chain balancing and physical-aware stitching are not exotic optimizations — they are engineering necessities in any design beyond a few hundred thousand flip-flops. The logical simplicity of scan insertion gives way to a complex back-end problem where physical topology, routing resources, power domain boundaries, and test time are all simultaneously constrained.</p><p>The key takeaway is that <strong>DFT is not finished at RTL</strong>. Scan insertion at the front end defines the testability intent. Physical-aware stitching at the back end realizes that intent against the hard constraints of the physical implementation. Any DFT flow that treats these as independent steps — or treats the logical chain order as final — will produce a design that is either difficult to route, slow to test, or prone to shift-path timing failures in silicon.</p><p>In the next article in this series, we will continue building on this foundation and examine how test compression architectures — specifically EDT and XTOL — interact with the physical scan topology to further reduce test data volume while preserving coverage.</p><p><em>This article is part of an ongoing series on Design for Testability. Earlier entries in the series cover fault modeling, ATPG fundamentals, scan cell architectures, and scan design implementation. Links to the full series can be found on the </em><a href="https://medium.com/@ranaumarnadeem"><em>my Medium profile</em></a><em>.</em></p><h3>Connect with Me:</h3><ul><li><strong>GitHub:</strong> <a href="https://github.com/ranaumarnadeem">ranaumarnadeem</a></li><li><strong>LinkedIn:</strong> <a href="http://www.linkedin.com/in/rana-umar-nadeem">Rana Umar Nadeem</a></li></ul><p>#VLSI #ASICDesign #LogicSynthesis #ClockGating #LowPowerDesign #RTLDesign #DigitalDesign #DFT #BackendDesign #EDA #Cadence#Genus #Sky130 #RTLtoGDSII #SemiconductorEngineering #PowerOptimization #TechBlog #PREMAPPING #LEC #COP #SOACP #distance #controllibility #modus #scan_chains #physicaldesign</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50dd533d1164" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scan Design at Scale: Why Scan Becomes the Bottleneck at large SoCs]]></title>
            <link>https://medium.com/@ranaumarnadeem/scan-design-at-scale-why-scan-becomes-the-bottleneck-at-large-socs-9c0fc149e9d1?source=rss-1d68360f7ace------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c0fc149e9d1</guid>
            <category><![CDATA[dft]]></category>
            <category><![CDATA[vlsi]]></category>
            <category><![CDATA[chip-design]]></category>
            <category><![CDATA[cadence-workflow]]></category>
            <category><![CDATA[soc]]></category>
            <dc:creator><![CDATA[Rana Umar Nadeem]]></dc:creator>
            <pubDate>Thu, 28 May 2026 07:10:53 GMT</pubDate>
            <atom:updated>2026-05-28T07:10:53.281Z</atom:updated>
            <content:encoded><![CDATA[<h3>Scan Design at Scale: Why Scan Becomes the Bottleneck</h3><p>Modern chip design is built on a simple promise: if you can put logic into a known state and observe internal nodes reliably, then you can test it. In real hardware, though, sequential elements make that promise difficult. A flip-flop hides state. A long state space makes ATPG harder. And uncontrolled internal state makes fault detection unreliable.</p><p>Scan was the breakthrough that changed everything.</p><p>It took sequential state and turned it into something closer to combinational visibility. That was revolutionary. But as designs scaled, scan itself became a burden. The same mechanism that made test possible began to dominate test time, power, routing, and debug complexity.</p><p>This is not a failure of scan. It is a scaling problem.</p><h3>Why scan solved controllability and observability</h3><p>A plain sequential circuit is difficult to test because internal flip-flops are not directly accessible.</p><p>If a fault sits deep inside logic, you usually need to:</p><ol><li>Drive the circuit into a specific internal state.</li><li>Let the fault propagate to a visible output.</li><li>Capture the result.</li></ol><p>Without scan, that means relying on many cycles of functional operation just to reach and escape from the right state. This is where test generation becomes painful.</p><p>Scan solves this by replacing ordinary flip-flops with scan flip-flops, which can be linked into a shift register.</p><p>In <strong>shift mode</strong>, the flip-flops behave like a long serial chain:</p><ul><li>You can shift in a desired internal state.</li><li>You can shift out the captured response.</li></ul><p>In <strong>capture mode</strong>, the design behaves like normal logic for one or more functional cycles.</p><p>That gives DFT engineers two huge advantages:</p><ul><li><strong>Controllability:</strong> internal states can be forced through scan-in.</li><li><strong>Observability:</strong> internal responses can be extracted through scan-out.</li></ul><p>This is the fundamental reason scan became universal in digital testing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N1uZaLdp6fNUabB2C6DtQA.png" /></figure><p>Scan turned a sequential test problem into something much closer to a combinational one. That made ATPG practical, coverage high, and diagnosis feasible.</p><p>But the price of that simplicity appears later.</p><h3>Why chain length grows as flip-flop count grows</h3><p>The first scaling issue is structural.</p><p>If a design has more flip-flops, then the scan chains have to include more storage elements. Unless you add more chains, each chain becomes longer.</p><p>If:</p><ul><li>N = total scan flip-flops</li><li>C = number of scan chains</li></ul><p>Then the average chain length is roughly:</p><p>L ≈ N / C</p><p>As designs grow, N grows rapidly. If C does not grow proportionally, L grows too.</p><p>That matters because every scan pattern must be shifted through those chains.</p><p>A single pattern is not just “applied” once. It must be loaded serially, one shift clock at a time, across the full chain length. The same is true on the way out.</p><p>So larger designs create a simple but painful reality:</p><ul><li>more flip-flops</li><li>longer chains</li><li>more shift cycles per pattern</li></ul><p>At small scale, this is fine. At large scale, it becomes the dominant cost.</p><h3>A practical example</h3><p>Suppose a design has:</p><ul><li>1 million scan flip-flops</li><li>100 scan chains</li></ul><p>Then average chain length is around 10,000.</p><p>Now imagine another design with:</p><ul><li>10 million scan flip-flops</li><li>still 100 scan chains</li></ul><p>Average chain length jumps to 100,000.</p><p>That means every pattern takes roughly 10× more shift cycles than before, even before accounting for more patterns, lower compression efficiency, or power constraints.</p><h3>Why test time increases multiplicatively</h3><p>This is the part that hurts most in production.</p><p>Test time is not just about how many patterns you have. It is also about how long each pattern takes to load and unload.</p><p>A simplified view of scan test time is:</p><p><strong>T ∝ P × (S + C)</strong></p><p>Where:</p><ul><li>P = number of patterns</li><li>S = shift cycles to load a pattern</li><li>C = capture cycles</li></ul><p>Usually, S dominates because shift length is large.</p><p>Since shift cycles are approximately proportional to chain length:</p><p>S ≈ L</p><p>T ∝ P × L</p><p>That is the key scaling problem.</p><p>If pattern count doubles and chain length doubles, test time can grow by about 4×.This is why scan is not merely “a little expensive.” It multiplies cost across two dimensions.</p><h3>Why this gets worse in real silicon</h3><p>Several practical effects make the problem even harder:</p><ul><li>long chains increase tester time</li><li>more patterns increase file size and ATE memory use</li><li>longer shift activity increases dynamic power</li><li>high toggle during shift can cause IR-drop and false failures</li><li>timing closure becomes harder because scan adds routing overhead and mux delay</li></ul><p>So even if scan coverage is excellent, the economics can become unacceptable.</p><h3>Why “scan works” is not the same thing as “scan scales”</h3><p>This distinction matters.</p><p>Scan <strong>works</strong> when it gives good fault coverage and allows the design to be testable.</p><p>Scan <strong>scales</strong> when it remains practical as the design size, test volume, power density, and schedule pressure increase.</p><p>A solution can be technically correct and still fail operationally.</p><p>That is exactly what happens with scan at large scale:</p><ul><li>It gives excellent controllability and observability.</li><li>It produces high stuck-at and transition coverage.</li><li>It integrates well with ATPG and diagnosis.</li><li>But it can become too slow, too power-hungry, and too expensive to deploy naively.</li></ul><p>So the bottleneck is not whether scan functions.</p><p>The bottleneck is whether scan remains efficient enough when multiplied across millions of flops and thousands of patterns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*uxkqw4bg2BuNW9UxAQE1wQ.png" /></figure><h3>Where the bottleneck shows up first</h3><p>In modern industrial DFT flows, scan bottlenecks rarely appear as one catastrophic issue. Instead, they emerge gradually across implementation, ATPG, silicon validation, manufacturing, and post-silicon diagnosis.</p><p>A scan architecture may appear completely acceptable during RTL planning and early ATPG estimation, yet become extremely expensive once physical design constraints, tester throughput, shift power, compression efficiency, and diagnosis requirements are considered together.</p><p>At small scale, scan overhead is manageable.</p><p>At SoC scale, scan overhead becomes a system-level engineering problem.</p><p>The first signs of scaling failure usually appear in the following areas.</p><h3>1. Test application time</h3><p>The earliest and most economically visible bottleneck is usually <strong>ATE test application time</strong>.</p><p>Every scan pattern requires three major phases:</p><ol><li>Shift the pattern into the scan chains</li><li>Capture the circuit response</li><li>Shift the captured response back out</li></ol><p>At small scale, this process is relatively inexpensive.</p><p>At large scale, the cumulative shift overhead dominates manufacturing cost.</p><h4>Why scan time scales badly</h4><p>The total scan test time is approximately proportional to:</p><pre>Total Test Time ∝ Pattern Count × Shift Cycles Per Pattern</pre><p>Since shift cycles are roughly determined by the longest scan chain:</p><pre>Shift Cycles ≈ Maximum Scan Chain Length</pre><p>The relationship becomes:</p><pre>Total Test Time ∝ Pattern Count × Longest Scan Chain</pre><p>This is the key scaling problem.</p><p>Both variables increase simultaneously in modern designs:</p><p>ParameterWhy It IncreasesPattern countMore logic, more faults, more fault modelsChain lengthMore sequential elements</p><p>This creates multiplicative growth rather than linear growth.</p><h4>Why shift dominates capture</h4><p>Capture operations usually require:</p><ul><li>one capture cycle,</li><li>sometimes two for transition testing,</li><li>occasionally a few more for specialized fault models.</li></ul><p>Shift operations, however, may require:</p><ul><li>tens of thousands,</li><li>or even hundreds of thousands of clock cycles per pattern.</li></ul><h4>Why this matters economically</h4><p>ATE infrastructure is one of the most expensive recurring costs in semiconductor manufacturing.</p><p>A tester is not simply “running software.” It is high-precision synchronized equipment with strict throughput targets.</p><p>If:</p><ul><li>one chip takes 1 second to test,</li><li>another takes 4 seconds,</li></ul><p>then the second chip may effectively reduce manufacturing throughput by 75%.</p><p>At production scale, even milliseconds matter.</p><p>Reducing:</p><ul><li>5% pattern count,</li><li>10% chain length,</li><li>or a few hundred shift cycles,</li></ul><p>can save millions of dollars annually for high-volume products.</p><p>This is why scan optimization is not merely a DFT concern.</p><p>It directly affects:</p><ul><li>manufacturing economics,</li><li>product margin,</li><li>tester allocation,</li><li>production throughput.</li></ul><h4>The hidden scaling effect: advanced fault models</h4><p>The problem worsens significantly once modern fault models are introduced.</p><p>Stuck-at testing alone is no longer sufficient.</p><p>Industrial ATPG now targets:</p><ul><li>transition delay faults,</li><li>path delay faults,</li><li>bridging faults,</li><li>cell-aware faults,</li><li>small-delay defects,</li><li>timing-aware defect models.</li></ul><p>These models require:</p><ul><li>more patterns,</li><li>more constrained ATPG,</li><li>more capture conditions,</li><li>more timing-aware pattern generation.</li></ul><p>Transition fault ATPG alone can increase pattern count dramatically compared to basic stuck-at testing.</p><p>So the scan scaling problem is not merely:</p><blockquote><em>“more flip-flops.”</em></blockquote><p>It is:</p><blockquote><em>“more flip-flops combined with exponentially increasing test complexity.”</em></blockquote><h4>Why adding more scan chains is not a perfect solution</h4><p>A common assumption is:</p><blockquote><em>“Just increase the number of scan chains.”</em></blockquote><p>This reduces chain length, but creates new issues:</p><h4>More routing overhead</h4><p>Every additional chain requires:</p><ul><li>stitching,</li><li>routing,</li><li>buffering,</li><li>control distribution.</li></ul><h4>More compression logic</h4><p>External tester channels are limited.</p><p>Adding chains usually requires:</p><ul><li>decompression hardware,</li><li>compaction logic,</li><li>X-handling structures.</li></ul><h4>Physical design complications</h4><p>More chains create:</p><ul><li>congestion,</li><li>clocking complexity,</li><li>scan enable distribution issues.</li></ul><h4>Diminishing returns</h4><p>Eventually:</p><ul><li>tester bandwidth,</li><li>routing resources,</li><li>power constraints,<br>become the limiting factors instead of chain length itself.</li></ul><h4>Modern mitigation techniques</h4><p>To reduce test application time, industry commonly uses:</p><p>TechniquePurposeScan compressionReduce external bandwidthPattern compactionReduce ATPG vector countTest point insertionImprove random detectabilityEDT / embedded compressionIncrease internal chain parallelismHierarchical ATPGReduce full-chip complexityPartial scan optimizationReduce unnecessary scan elements</p><p>However, every solution introduces trade-offs in:</p><ul><li>area,</li><li>power,</li><li>diagnosability,</li><li>ATPG runtime,</li><li>implementation complexity.</li></ul><p>This is why scan optimization becomes a balancing problem rather than a purely algorithmic one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r6dHDEFCkq_0S4qDVlUC8g.png" /></figure><h3>2. Power during shift</h3><p>One of the most severe scan scaling problems is <strong>shift-mode power consumption</strong>.</p><p>In many advanced-node designs, shift power becomes more limiting than fault coverage itself.</p><p>This is because scan activity is fundamentally different from normal functional activity.</p><h4>Why scan shifting creates excessive switching</h4><p>During functional operation:</p><ul><li>switching activity is correlated,</li><li>only relevant logic toggles,</li><li>workloads are spatially localized.</li></ul><p>During scan shifting:</p><ul><li>every scan clock may change thousands or millions of flip-flop states,</li><li>neighboring scan cells may contain unrelated values,</li><li>transitions propagate randomly through combinational logic.</li></ul><p>This creates extremely high switching activity.</p><p>Dynamic power is approximately:</p><pre>Pdynamic = α × C × V² × f</pre><p>Where:</p><p>SymbolMeaningαSwitching activity factorCEffective capacitanceVSupply voltagefClock frequency</p><p>The major issue during scan is the dramatic increase in α.</p><h4>Why random scan data is dangerous</h4><p>Functional logic tends to have:</p><ul><li>structured transitions,</li><li>correlated behavior,</li><li>bounded activity.</li></ul><p>Scan data appears almost random.</p><p>That randomness creates:</p><ul><li>unnecessary toggling,</li><li>glitch propagation,</li><li>high fanout switching,</li><li>simultaneous transitions across large logic regions.</li></ul><p>In compressed scan environments, decompressor outputs may further amplify switching correlation problems.</p><h4>The real issue is peak power, not average power</h4><p>Average power is usually manageable.</p><p>Peak instantaneous current is the real problem.</p><p>When large regions switch simultaneously:</p><ul><li>supply rails droop,</li><li>local voltage collapses,</li><li>timing paths slow down temporarily.</li></ul><p>This produces:</p><ul><li>IR-drop,</li><li>false timing failures,</li><li>scan capture corruption.</li></ul><p>These failures may appear as manufacturing defects even when the silicon is functionally correct.</p><p>This phenomenon is often called:</p><ul><li>over-testing,</li><li>false fail inflation,</li><li>test-induced yield loss.</li></ul><h4>IR-drop and timing collapse</h4><p>Suppose:</p><ul><li>a path normally meets timing at nominal voltage,</li><li>scan shifting causes local voltage droop,</li><li>delay increases temporarily.</li></ul><p>Now the path fails during test even though it passes functionally.</p><p>This creates:</p><ul><li>unnecessary yield loss,</li><li>expensive diagnosis effort,</li><li>incorrect binning decisions.</li></ul><p>At advanced nodes:</p><ul><li>voltage margins are already extremely small,</li><li>interconnect resistance is higher,</li><li>current density is larger.</li></ul><p>So scan-induced IR-drop becomes increasingly dangerous.</p><h4>Thermal effects</h4><p>Long scan operations also create:</p><ul><li>localized heating,</li><li>thermal gradients,</li><li>hotspot accumulation.</li></ul><p>Unlike functional workloads, scan may repeatedly stress the same regions continuously.</p><p>This creates:</p><ul><li>reliability concerns,</li><li>thermal instability,</li><li>temperature-dependent timing variation.</li></ul><h4>Why lowering scan frequency is insufficient</h4><p>A common misconception is:</p><blockquote><em>“Just reduce the scan clock frequency.”</em></blockquote><p>Lower frequency helps partially, but:</p><ul><li>total switching activity remains high,</li><li>millions of transitions still occur,</li><li>long runtimes increase thermal exposure.</li></ul><p>Power reduction therefore requires activity reduction, not merely slower clocks.</p><h3>Industrial low-power scan techniques</h3><p>Modern DFT flows use sophisticated techniques such as:</p><p>TechniquePurposeLow-toggle fillReduce unnecessary transitionsWeighted random fillBias ATPG valuesClock gating during shiftDisable inactive regionsShift power constraintsATPG-aware switching limitsScan segmentationIsolate active scan regionsScan chain orderingReduce toggle correlationPower-aware ATPGLimit simultaneous switching</p><p>However, these approaches introduce trade-offs:</p><ul><li>lower ATPG efficiency,</li><li>higher runtime,</li><li>increased pattern count,</li><li>more complex diagnosis.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kXOI-fmJGVH_oER4JbTQ7A.png" /></figure><h3>3. Routing and congestion</h3><p>At small scale, scan insertion appears straightforward:</p><ul><li>connect scan-out of one flip-flop to scan-in of another.</li></ul><p>At SoC scale, this becomes a major physical implementation challenge.</p><p>Modern designs contain:</p><ul><li>millions of scan cells,</li><li>hundreds of clock domains,</li><li>voltage islands,</li><li>power-gated regions,</li><li>hierarchical partitions,</li><li>physically separated IP blocks.</li></ul><p>Scan stitching across these structures creates enormous routing pressure.</p><h3>Why scan routing conflicts with physical design goals</h3><p>Physical design optimizes for:</p><ul><li>locality,</li><li>timing,</li><li>congestion,</li><li>power efficiency.</li></ul><p>Scan architecture optimizes for:</p><ul><li>chain balance,</li><li>controllability,</li><li>observability,</li><li>ATPG efficiency.</li></ul><p>These goals often conflict directly.</p><p>A logically balanced scan chain may:</p><ul><li>zig-zag across the die,</li><li>cross congested routing channels,</li><li>violate placement locality assumptions.</li></ul><h3>Scan chain ordering problem</h3><p>Consider two possibilities:</p><h4>Logical balancing</h4><p>Perfectly balanced chain lengths.</p><p>Problem:</p><ul><li>physically poor routing.</li></ul><h4>Physical locality optimization</h4><p>Nearby scan cells connected together.</p><p>Problem:</p><ul><li>highly uneven chain lengths.</li></ul><p>Industrial tools attempt to optimize both simultaneously, but this becomes increasingly difficult at advanced nodes.</p><h3>Routing overhead consequences</h3><h4><strong>Increased congestion</strong></h4><p>Scan nets compete with:</p><ul><li>clocks,</li><li>reset trees,</li><li>high-speed buses,</li><li>power routing,</li><li>critical timing nets.</li></ul><h4>Increased parasitic capacitance</h4><p>Long scan wires increase:</p><ul><li>capacitance,</li><li>dynamic power,</li><li>transition delay.</li></ul><h4>Buffer explosion</h4><p>Long scan routes may require:</p><ul><li>repeaters,</li><li>hold buffers,</li><li>clock-aware buffering.</li></ul><h4>ECO instability</h4><p>Late-stage scan changes become extremely painful after placement stabilizes.</p><h3>Multi-domain complexity</h3><p>Modern SoCs contain:</p><ul><li>multiple voltage domains,</li><li>asynchronous regions,</li><li>independently gated blocks.</li></ul><p>Scan stitching must obey:</p><ul><li>clock compatibility,</li><li>power-domain restrictions,</li><li>isolation logic constraints.</li></ul><p>This dramatically increases scan planning complexity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*thj85C9Oxed25DdhuzJyqg.png" /></figure><h3>4. Timing impact</h3><p>Scan insertion is not timing-neutral.</p><p>Even small scan modifications can disrupt closure in high-frequency designs.</p><p>This becomes increasingly problematic at advanced technology nodes where:</p><ul><li>margins are extremely small,</li><li>interconnect dominates delay,</li><li>variation effects are severe.</li></ul><h3>Scan mux insertion overhead</h3><p>A standard scan flip-flop typically introduces a mux before the storage element</p><p>That mux adds:</p><ul><li>propagation delay,</li><li>input capacitance,</li><li>additional loading.</li></ul><p>Individually small.</p><p>Collectively enormous.</p><p>Across millions of flip-flops, even tiny overheads accumulate into major timing degradation.</p><h3>Hold-time explosion</h3><p>Scan chains often create:</p><ul><li>extremely short local paths,</li><li>unusual routing topology,</li><li>non-functional timing relationships.</li></ul><p>This causes severe hold-fix requirements.</p><p>Physical design teams may need:</p><ul><li>thousands or millions of hold buffers,</li><li>extensive ECO insertion,</li><li>routing re-optimization.</li></ul><p>In some advanced-node designs, scan-induced hold fixing itself becomes a major implementation challenge.</p><h3>Clock-tree complications</h3><p>Scan introduces:</p><ul><li>scan clocks,</li><li>test clocks,</li><li>OCC structures,</li><li>clock gating interactions,</li><li>multiple timing modes.</li></ul><p>Timing analysis now must consider:</p><ul><li>functional mode,</li><li>shift mode,</li><li>capture mode,</li><li>at-speed launch/capture relationships.</li></ul><p>This dramatically increases STA complexity.</p><h3>Scan-aware physical synthesis</h3><p>Modern tools therefore perform:</p><ul><li>physically aware scan stitching,</li><li>timing-aware reordering,</li><li>scan-aware optimization,</li><li>congestion-aware chain construction.</li></ul><p>But these optimizations:</p><ul><li>increase runtime,</li><li>complicate ECO flows,</li><li>require tighter integration between DFT and PD teams.</li></ul><h3>5. Debug and diagnosis</h3><p>Ironically, scan improves observability while simultaneously making large-scale diagnosis more difficult.</p><p>At small scale scan greatly simplifies debug.</p><p>At large scale compression, masking, hierarchical stitching, massive pattern volume, begin to reduce visibility.</p><h3>Why compressed scan complicates diagnosis</h3><p>Compressed scan architectures compact many internal responses into fewer outputs.</p><p>This improves test efficiency but reduces direct observability.</p><p>Problems include:</p><ul><li>fault aliasing,</li><li>signature overlap,</li><li>ambiguity in root-cause localization.</li></ul><p>Diagnosis increasingly becomes probabilistic rather than deterministic.</p><h3>X-state contamination</h3><p>Unknown values (X) are a major industrial problem.</p><p>Sources include SRAM behavior,analog interfaces,power-gated domains,uninitialized logic,asynchronous crossings.</p><p>A single uncontrolled X can corrupt compacted responses.</p><p>To avoid false failures, DFT flows use:</p><ul><li>X-masking,</li><li>X-blocking,</li><li>X-tolerant compactors.</li></ul><p>But aggressive masking also reduces observability.</p><p>This creates another trade-off:</p><ul><li>manufacturing robustness versus diagnosis quality.</li></ul><h3>Long chains slow debug iteration</h3><p>Very large scan chains increase:</p><ul><li>failure replay time,</li><li>waveform analysis complexity,</li><li>simulation runtime,</li><li>silicon bring-up turnaround.</li></ul><p>Even extracting internal failing states can become cumbersome.</p><h3>Why diagnosis matters more today</h3><p>Modern diagnosis is not only about finding bad chips.</p><p>It is used for:</p><ul><li>yield learning,</li><li>process monitoring,</li><li>defect classification,</li><li>reliability tracking,</li><li>fab correlation analysis.</li></ul><p>Poor diagnosability therefore impacts:</p><ul><li>manufacturing optimization,</li><li>process improvement,</li><li>product yield ramp.</li></ul><p>This is why diagnosis-aware ATPG and compression-aware debug have become major research areas in industrial DFT.</p><pre>flowchart TD<br>    A[Compressed scan responses] --&gt; B[Reduced observability]<br>    B --&gt; C[Fault ambiguity]<br>    C --&gt; D[Longer debug cycles]<br>    D --&gt; E[Slower yield learning]</pre><h3>Why not just keep adding more scan chains?</h3><p>That is a natural question.</p><p>If long chains are the problem, why not increase the number of chains and reduce the length?</p><p>The answer is: because it is not free.</p><p>More chains mean:</p><ul><li>more scan routing</li><li>more scan pins or more compression logic</li><li>more clocking and control complexity</li><li>more area overhead</li><li>harder physical implementation</li><li>more constraints during insertion and stitching</li></ul><p>So there is always a trade-off between chain count and implementation cost.</p><p>You can reduce shift time by making chains shorter, but you pay in wiring, area, and integration complexity.</p><h3>Common solutions to scan scaling</h3><p>The industry has not ignored this problem. A lot of work has gone into making scan more practical.</p><h3>1. Scan compression</h3><p>This is one of the most common solutions.</p><p>Instead of exposing every scan chain directly to tester pins, a <strong>decompressor</strong> feeds many internal chains from a small number of external inputs, and a <strong>compactor</strong> reduces many outputs back down.</p><p>This dramatically reduces the number of pins and helps manage tester interface cost.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gJtCFP2IaBK5zAJDpPdn1Q.png" /></figure><p><strong>Why it helps:</strong></p><ul><li>fewer external pins</li><li>many internal chains can be controlled in parallel</li><li>reduced pattern volume in many cases</li></ul><p><strong>Why it does not fully solve the problem:</strong></p><ul><li>shift activity is still there internally</li><li>decompression logic adds area and complexity</li><li>unknowns and X-values can hurt compaction quality</li><li>ATPG becomes more constrained</li></ul><h3>2. Chain balancing and stitching optimization</h3><p>Tool flows often try to balance chain lengths so one chain does not become much longer than the others.</p><p>This helps avoid one bad chain dominating test time.</p><p><strong>Why it helps:</strong></p><ul><li>reduces worst-case shift length</li><li>improves parallelism across chains</li></ul><p><strong>Why it is not enough:</strong></p><ul><li>physical placement may constrain stitching</li><li>perfect balance is hard when flops are unevenly distributed</li><li>clock domains, power domains, and hierarchical boundaries complicate optimization</li></ul><h3>3. Test point insertion</h3><p>Test points are extra control or observe points inserted into logic to make hard-to-test faults easier to detect.</p><ul><li>can reduce the number of patterns required</li><li>improves coverage for difficult logic cones</li></ul><p><strong>Cons</strong>:</p><ul><li>adds area overhead</li><li>can hurt timing</li><li>increases design complexity</li><li>usually applied selectively rather than broadly</li><li>Optimal TPI is a np-complete problem</li></ul><h3>4. Low-power scan / shift power reduction</h3><p>These techniques reduce toggling during shift, often by gating activity, filling patterns intelligently, or reducing simultaneous switching. It</p><ul><li>prevents excessive IR-drop</li><li>improves test robustness</li></ul><p><strong>Why it is not universal:</strong></p><ul><li>may reduce ATPG freedom</li><li>can increase pattern count</li><li>often requires careful trade-offs between power and coverage</li></ul><h3>5. LFSR-based pattern generation and reseeding</h3><p>Instead of storing every scan pattern explicitly, hardware can generate many patterns using a pseudo-random structure like an LFSR, sometimes with reseeding for deterministic fill. It helps as it</p><ul><li>reduces test data volume</li><li>can speed delivery of patterns to the chip</li></ul><p><strong>Why it is not the default for everything:</strong></p><ul><li>random patterns alone do not reliably hit hard faults</li><li>coverage closure usually still needs deterministic ATPG patterns</li><li>reseeding adds complexity and is not always worth it for all flows</li></ul><h3>6. Hierarchical scan</h3><p>Large SoCs often use hierarchical approaches so each block is tested in a more manageable way.</p><p><strong>Why it helps:</strong></p><ul><li>scales better for big chips</li><li>supports IP-based integration</li><li>allows local optimization</li></ul><p><strong>Why it is not fully general:</strong></p><ul><li>hierarchy creates boundary issues</li><li>cross-block faults are harder</li><li>flow complexity increases significantly</li></ul><h3>7. X-tolerant compaction and masking</h3><p>Unknown values, or Xs, can corrupt compacted responses. X-handling logic helps prevent false fails.</p><p><strong>Why it helps:</strong></p><ul><li>improves usability of compaction</li><li>avoids over-constraint in ATPG</li></ul><p><strong>Why it is not always simple:</strong></p><ul><li>X sources may be hard to fully characterize</li><li>masking too much can reduce fault visibility</li><li>aggressive X-handling can complicate diagnosis</li></ul><h3>Low-power techniques help robustness, but can slow ATPG or increase pattern count</h3><p>Power-aware test is a balancing act, not a universal fix.</p><p>So the real-world flow is usually a compromise:</p><ul><li>scan everywhere</li><li>compress where possible</li><li>balance chains</li><li>insert test points selectively</li><li>apply power-aware constraints</li><li>use deterministic ATPG for closure</li></ul><h3>The real trade-off: test quality versus test economics</h3><p>A good DFT flow is not just about coverage.</p><p>It must balance:</p><ul><li>fault coverage</li><li>pattern count</li><li>test application time</li><li>power</li><li>area overhead</li><li>routing cost</li><li>debug quality</li></ul><p>That is why scan engineering becomes an architecture problem, not just a test problem.</p><p>At small scale, a straightforward scan implementation is enough.</p><p>At large scale, scan strategy becomes a product decision.</p><h3>A useful mental model</h3><p>Think of scan as a bridge between two worlds:</p><ul><li><strong>Functional design world:</strong> optimized for performance and behavior</li><li><strong>Test world:</strong> optimized for controllability and observability</li></ul><p>At first, scan is the bridge that makes testing possible.At scale, the bridge itself becomes traffic congestion.</p><p>That is why advanced DFT flows focus so much on reducing scan cost without losing the benefits scan provides.</p><h3>Conclusion</h3><p>Scan solved one of the hardest problems in digital testing: how to control and observe sequential logic in a practical way. It transformed sequential circuits into something testable at scale, and it became the foundation of modern DFT.</p><p>But the same mechanism becomes expensive as designs grow.Longer chains increase shift time. More patterns multiply application time. Power rises. Routing gets harder. Compression and optimization help, but they do not erase the fundamental cost of moving data through scan infrastructure.</p><p>That is why “scan works” is only the first milestone.The real challenge is making scan scale.And that challenge sits at the center of modern ATPG, scan compression, low-power test, and hierarchical DFT flows.</p><h3>Connect with Me:</h3><ul><li><strong>GitHub:</strong> <a href="https://github.com/ranaumarnadeem">ranaumarnadeem</a></li><li><strong>Medium:</strong> <a href="https://medium.com/@ranaumarnadeem">@ranaumarnadeem</a></li><li><strong>LinkedIn:</strong> <a href="http://www.linkedin.com/in/rana-umar-nadeem">Rana Umar Nadeem</a></li></ul><p>#VLSI #ASICDesign #LogicSynthesis #ClockGating #LowPowerDesign #RTLDesign #DigitalDesign #DFT #BackendDesign #EDA #Cadence#Genus #Sky130 #RTLtoGDSII #SemiconductorEngineering #PowerOptimization #TechBlog #PREMAPPING #LEC #COP #SOACP #distance #controllibility #modus #scan_chains</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c0fc149e9d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design for Testability: Scan Design Implementation and Enhancement]]></title>
            <link>https://medium.com/@ranaumarnadeem/design-for-testability-scan-design-implementation-and-enhancement-36d9f6c83171?source=rss-1d68360f7ace------2</link>
            <guid isPermaLink="false">https://medium.com/p/36d9f6c83171</guid>
            <category><![CDATA[dft]]></category>
            <category><![CDATA[scan-chain]]></category>
            <category><![CDATA[vlsi]]></category>
            <category><![CDATA[modu]]></category>
            <category><![CDATA[genuss]]></category>
            <dc:creator><![CDATA[Rana Umar Nadeem]]></dc:creator>
            <pubDate>Sun, 27 Jul 2025 07:11:51 GMT</pubDate>
            <atom:updated>2025-07-27T07:11:51.309Z</atom:updated>
            <content:encoded><![CDATA[<p>Modern digital designs, especially ASICs and SoCs, can contain millions of sequential elements. While scan architectures such as full scan, partial scan, and embedded scan offer conceptual strategies to expose internal states for testability, the real challenge lies in implementing these strategies correctly and efficiently at the design level.</p><p>Scan design is not just about converting flip-flops into scan cells — it’s about <strong>integrating testability into the fabric of the design</strong>, ensuring that test logic coexists with functional logic without compromising performance, area, or power.</p><p>From RTL synthesis to scan chain stitching, clocking, verification, and power management, the scan design process demands careful planning and tool-assisted optimization. And with increasing adoption of scan compression and low-power design methodologies, scan implementation is no longer a mechanical step — it’s a <strong>critical phase</strong> in building robust, testable silicon.</p><h3>Scan Chain Insertion Flow</h3><p>Scan chain insertion is the process of transforming a purely functional sequential circuit into a testable one by replacing standard flip-flops with scan-capable flip-flops and connecting them into scan chains. This transformation is carried out at the <strong>RTL synthesis or post-synthesis level</strong>, using DFT-specific commands and tool directives.</p><p>The goal is to expose all internal storage elements (flip-flops) to external controllability and observability — without altering the circuit’s functional behavior during normal operation.</p><h3>Why Scan Insertion Matters</h3><p>In functional mode, flip-flops receive data from combinational logic and update on clock edges. However, in test mode, we need to:</p><ul><li>Drive known values into flip-flops (for fault activation)</li><li>Observe flip-flop contents (for fault propagation and observation)</li><li>Bypass normal data flow paths temporarily</li></ul><p>Scan insertion enables this by forming <strong>serial shift paths</strong> — scan chains — that can be loaded and read out externally through dedicated scan ports.</p><h3>Key Components in Scan Insertion</h3><p>To perform scan insertion, the following must be defined and correctly connected in the design:</p><ul><li><strong>Scan Flip-Flops (Scan DFFs):</strong> Flip-flops with multiplexed inputs for functional and scan data paths</li><li><strong>Scan Enable (SE):</strong> A control signal that toggles the mode between normal and scan</li><li><strong>Scan-In (SI):</strong> The input pin of the scan chain; first flip-flop in the chain</li><li><strong>Scan-Out (SO):</strong> The output pin of the scan chain; last flip-flop in the chain</li><li><strong>Clock (CLK):</strong> Used during shift (scan) and capture (functional test) phases</li></ul><h3>Scan Insertion Process in Flow</h3><p>The typical scan insertion process involves the following steps:</p><h4>Step 1: Prepare the RTL and Set DFT Constraints</h4><p>Before synthesis, annotate the RTL or define constraints for DFT:</p><ul><li>Declare scan enable (scan_en), scan in/out ports if not already in RTL</li><li>Identify asynchronous resets and gated clocks to be preserved</li><li>Add test-mode conditions to disable logic optimizations during scan</li></ul><p><strong>Example (Cadence Genus):</strong></p><pre>set_db dft_scan_style muxed_scan <br><br>define_shift_enable -name SE -active high -create_port SE // Defines Enable Pin<br><br>set_db design:s15850 .dft_min_number_of_scan_chains 30<br><br>define_scan_chain -name top_chain -sdi scan_in -sdo scan_out -create_ports //Names of I/O ports</pre><h4>Step 2: Synthesize the Design in DFT Mode</h4><p>With scan configuration enabled, the synthesis tool replaces all regular DFFs with <strong>scan DFFs</strong> and maintains test-mode control logic. Clocking and reset structures are preserved based on constraints.</p><p>Post-synthesis netlist now includes:</p><ul><li>Multiplexers on DFF data inputs (functional vs. scan path)</li><li>Correct scan-enable logic propagation</li><li>Reserved scan input/output ports</li></ul><h4>Step 3: Stitch Flip-Flops into Chains</h4><p>Once scan-capable flip-flops are inserted into the design during synthesis, the next critical step is to <strong>stitch them together into scan chains</strong>. Scan stitching is the process of physically and logically connecting flip-flops into serial shift paths, such that test data can be loaded and unloaded during scan operation.</p><p>But stitching alone isn’t enough. For real-world silicon, where power, timing, and routing are tightly constrained, the process must be coupled with <strong>chain balancing</strong> — the art of distributing flip-flops across multiple scan chains intelligently.</p><h4>What is Scan Stitching?</h4><p>In functional mode, flip-flops operate independently and update based on the data they receive from combinational logic. However, in test mode, we need to create a <strong>serial path</strong> from a scan input (SI) through every scan flip-flop and finally to a scan output (SO).</p><p><strong>Scan stitching</strong> connects the scan_out (SO) of one scan flip-flop to the scan_in (SI) of the next, forming a continuous chain for shift operations.</p><p><strong>Example chain:</strong></p><pre>scan_in → FF1 → FF2 → FF3 → FF4 → scan_out</pre><ul><li>Each flip-flop’s data input is controlled by a multiplexer, which selects either:</li><li>The <strong>functional data</strong> (normal mode), or</li><li>The <strong>scan-in data</strong> (test mode), controlled by a scan enable (SE) signal.</li></ul><p>In Genus we run this</p><pre><br>connect_scan_chains -auto_create_chains</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*urZreuKlVuXRMEPEgdhIBA.png" /></figure><p>Tools may allow user control over:</p><blockquote>Number of chains (e.g., set_db design:s15850 .dft_min_number_of_scan_chains 30)</blockquote><ul><li>Clock-domain isolation</li><li>Balancing chain length for power and shift-time</li></ul><h4>Why Use Multiple Scan Chains?</h4><p>Connecting all flip-flops into a single chain may seem simple, but it’s impractical for large designs(That is why i was using 30 in my design). A single long scan chain would:</p><ul><li>Require excessive <strong>shift cycles</strong>, increasing test time</li><li>Cause <strong>high toggling activity</strong> and peak dynamic power</li><li>Introduce <strong>timing issues</strong> due to long chain length</li></ul><p>To mitigate this, flip-flops are divided into <strong>multiple scan chains</strong>, allowing:</p><ul><li><strong>Parallel shifting</strong> to reduce test time</li><li><strong>Power distribution</strong> across chains</li><li><strong>Domain isolation</strong> for multi-clock designs</li></ul><h4>Scan Chain Balancing</h4><p><strong>Chain balancing</strong> is the process of distributing flip-flops evenly across all scan chains to minimize variation in chain length. Balanced chains ensure that:</p><ul><li>Each scan path has roughly equal shift depth</li><li>Test time is minimized (bounded by the longest chain)</li><li>Power is distributed evenly during shifting</li></ul><p>In modus upon veryfying test structures we get this as we see each scan chain is 15 bits i.e balanced</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ak-U1nlapvPON1w_ITGehg.png" /></figure><h4>Stitching by Clock Domain</h4><p>Another important factor is <strong>clock domain awareness</strong>. Flip-flops driven by different clocks should <strong>never be stitched into the same chain</strong>. Doing so may cause:</p><ul><li>Clock domain crossing issues</li><li>Setup and hold violations during scan shift</li><li>Non-deterministic scan behavior</li></ul><p>Solution is</p><ul><li>Create <strong>independent chains per clock domain</strong></li><li>Use domain-specific scan_enable and scan_clk signals</li><li>Control chains via a DFT controller with clock gating support</li></ul><h4>Step 4: Verify Scan Chain Connectivity</h4><p>Once scan chains are inserted and stitched, the next essential phase is <strong>verification</strong>. While synthesis tools can generate scan-ready netlists, they do not guarantee correctness. Poorly stitched chains, missing control logic, or DFT rule violations can render the scan architecture ineffective — or worse, result in untestable silicon.</p><p>This is why <strong>DFT rule checking</strong> and <strong>scan verification</strong> are considered sign-off critical steps in the DFT flow. These checks are usually performed post-synthesis and again post-place-and-route (P&amp;R) to ensure structural integrity and signal propagation under real layout conditions.</p><p>The first and most basic requirement: all flip-flops in a scan chain must be connected correctly, forming an uninterrupted shift path.</p><p>Verification tools run <strong>scan continuity checks</strong> to ensure:</p><ul><li>The scan input (SI) of the first flip-flop is driven by an external scan_in port or a valid scan source</li><li>The scan output (SO) of the last flip-flop connects to a scan_out port</li><li>Each intermediate flip-flop’s SO is connected to the next flip-flop’s SI</li><li>No <strong>dangling scan inputs or outputs</strong> exist in the chain</li></ul><p>We get test structure report like this from modus</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*tZOQc4Mby0tKf3kLHa7aZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*2DNguM3oJluApf9w3fTnZg.png" /></figure><p><strong>Common scan continuity issues:</strong></p><ul><li>Missing SI/SO nets</li><li>Fanout from SO to multiple SIs (violates serial path)</li><li>Loopbacks or unintentional re-stitching of the same FF</li><li>Open-ended flip-flops not part of any scan chain</li></ul><p>If even one flip-flop is missed, it creates an unobservable or uncontrollable state — reducing test coverage and possibly hiding faults.</p><h4>Verification of Scan Control Signals</h4><p>Scan cells operate based on two fundamental control signals:</p><ul><li><strong>Scan Enable (SE):</strong> Controls whether FF receives data from the scan path or functional path</li><li><strong>Clock (CLK):</strong> Triggers updates during shift or capture</li></ul><p>For correct scan operation, tools verify:</p><ul><li>SE is correctly connected and reaches all scan FFs</li><li>SE polarity matches expected behavior (usually active-high)</li><li>Clock signal reaches all FFs and is valid under test mode</li><li>SE and CLK are not disabled by functional logic during scan</li></ul><p><strong>Potential errors:</strong></p><ul><li>SE signal gated or overridden by a functional condition</li><li>SE not reaching all domains due to clock gating logic</li><li>CLK disabled in test mode (often caused by gated clocks or retention logic)</li><li>Mismatched SE polarity between flip-flop instances and scan control block</li></ul><p>Most commercial DFT tools (e.g., Cadence Genus/Modus, Synopsys DFTC/TetraMAX) include built-in rule checkers for these violations and will flag nets or cells that do not meet test-mode propagation requirements.</p><p>Beyond basic wiring, DFT rule checks validate whether the scan infrastructure behaves correctly across the entire design. These checks include:</p><ul><li><strong>Isolation of functional paths during scan</strong><br> No unintended logic paths should remain active when SE is high.</li><li><strong>Clock gating logic check</strong><br> Ensure that test-mode override paths allow clocks to propagate for scan shifting.</li><li><strong>Multi-clock domain verification</strong><br> Confirm that each scan chain resides within a single clock domain unless explicitly intended otherwise.</li><li><strong>Reset signal conflicts</strong><br> Make sure asynchronous or synchronous resets do not interfere with scan-mode operation (especially during capture phase).</li><li><strong>Combinational feedback loops</strong><br> Ensure no loops are unintentionally created due to scan mux insertion or flip-flop placement.</li></ul><p>These rules are enforced using scan rule engines in tools like:</p><ul><li>Cadence Genus (check_dft_rules)</li><li>Synopsys DFTC (dft_drc, set_dft_constraints)</li><li>Siemens Tessent or Mentor DFT tools</li></ul><h4>Scan Path Simulation (Optional Pre-ATPG Check)</h4><p>Before ATPG pattern generation, designers may optionally perform <strong>DFT-aware simulation</strong> to validate:</p><ul><li>The ability to shift in known data (stimulus)</li><li>Correct propagation of scan patterns across chains</li><li>Ability to capture and shift out expected values</li></ul><p>This is often done using SystemVerilog testbenches or specialized scan simulation modes in tools like VCS or Xcelium, especially for safety-critical designs or silicon diagnostics.</p><h4>Step 5: Generate Scan Chain Report</h4><p>Once scan insertion completes, tools generate:</p><ul><li>A <strong>scan chain map</strong> (list of flip-flops per chain)</li><li>Netlists with scan_in, scan_out, and scan_enable ports</li><li>Timing annotations for shift and capture phases</li><li>Warnings or violations for gated clocks, mixed resets, etc.</li></ul><p>In Genus we use this to get report</p><pre>report_test_structures -testmode FULLSCAN -reportscanchain all<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*0FS4AyTVYMMlf6gIjQFaPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*bYwJ6YZkT9mc1W7rXKxOqw.png" /></figure><p>These outputs are used in subsequent steps for ATPG, scan simulation, and place-and-route DFT integration.</p><h3>Best Practices</h3><p>Designing for testability requires far more than just replacing flip-flops with scan-enabled cells. For scan logic to be silicon-proven, efficient, and ATPG-ready, DFT engineers must follow a disciplined set of practices that span RTL planning, synthesis, verification, and physical integration. Below are consolidated best practices drawn from industry-standard flows and real-world scan implementation challenges.</p><p>One of the most critical rules in scan design is to <strong>avoid chaining scan flip-flops across clock domains</strong>. Mixing clock domains within a single scan chain introduces clock domain crossing (CDC) hazards during scan shifting, which can lead to timing violations or even metastability in silicon. To prevent this, always partition scan chains along clock boundaries and control them using domain-specific scan_clk and scan_enable signals.</p><p>Equally important is <strong>scan chain balancing</strong>. Long, unbalanced chains increase shift time and cause non-uniform toggling during scan operation — leading to IR drop, peak current surges, and reduced reliability. Distribute flip-flops evenly across chains and, where possible, align them with <strong>power or floorplan regions</strong> to contain shift activity and reduce routing congestion. Most tools offer physical-aware balancing to guide this step during floorplanning or P&amp;R.</p><p>At the RTL stage, <strong>annotate flip-flops with DFT-preserving attributes</strong> to prevent synthesis optimizations from removing or reordering scan elements. These attributes ensure that tool behavior remains consistent across synthesis runs and helps maintain chain integrity through implementation.</p><p>If the design is intended to support <strong>on-chip compression</strong> or <strong>logic BIST (LBIST)</strong>, be sure to <strong>reserve scan ports early</strong>. Compression logic typically requires additional SI/SO ports, scan control signals, and insertion points for decompression (e.g., LFSRs) and compaction logic (e.g., MISRs). Planning these hooks during early scan insertion avoids disruptive late-stage modifications.</p><p>In low-power or gated-clock designs, it is critical to <strong>insert test-mode overrides for clock gating logic</strong>. Scan shifting requires clock propagation to all flip-flops — even those normally disabled during functional operation. Muxes or enable logic should be inserted such that clock gating can be bypassed safely under scan mode without violating functional constraints.</p><p>Additionally, it is good practice to <strong>run scan rule checks and continuity verification at every major milestone</strong>: post-synthesis, post-scan-insertion, and post-layout. This includes checking for dangling SI/SO nets, unbalanced chains, incorrect scan enables, and non-observable flops. DFT rule checking should be tightly integrated into your synthesis and P&amp;R scripts to ensure continuous validation.</p><p>Lastly, always <strong>generate and archive scan chain reports</strong>, including flip-flop order, clock domains, and physical coordinates. These are indispensable during ATPG, debug, and silicon bring-up phases — especially when performing scan diagnosis or correlating failing test vectors to layout structures.</p><h3>Connect with Me:</h3><ul><li><strong>GitHub:</strong> <a href="https://github.com/ranaumarnadeem">ranaumarnadeem</a></li><li><strong>Medium:</strong> <a href="https://medium.com/@ranaumarnadeem">@ranaumarnadeem</a></li><li><strong>LinkedIn:</strong> <a href="http://www.linkedin.com/in/rana-umar-nadeem">Rana Umar Nadeem</a></li></ul><p>#VLSI #ASICDesign #LogicSynthesis #ClockGating #LowPowerDesign #RTLDesign #DigitalDesign #DFT #BackendDesign #EDA #Cadence#Genus #Sky130 #RTLtoGDSII #SemiconductorEngineering #PowerOptimization #TechBlog #PREMAPPING #LEC #COP #SOACP #distance #controllibility #modus #scan_chains</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36d9f6c83171" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>