Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: comp.arch Subject: Scan chains (was: control co-processor) Date: Tue, 06 May 2025 23:12:08 -0400 Organization: A noiseless patient Spider Lines: 31 Message-ID: References: <2025Apr23.194456@mips.complang.tuwien.ac.at> <126700f99b6f97d7483bb5355d68c361@www.novabbs.org> <0b410ad93124778a2b1b3ab8fb6ec62c@www.novabbs.org> <54dcb50f7a378240447d3565f083f0bc@www.novabbs.org> <5j3SP.1331$RXsc.334@fx36.iad> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Wed, 07 May 2025 05:12:09 +0200 (CEST) Injection-Info: dont-email.me; posting-host="e99ec8521aa1973a090d821edddce395"; logging-data="465481"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Ts5MGLpj1NQuX4eShZMtvyma/FV/rBZ4=" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:4cikgLiVxnxFBT9DuuuS0dqpWpU= sha1:fpdaEa6DGiAURiVxPP4usuG2TKk= Bytes: 3028 >>> Even state-of-the-art CPUs today commonly use scan-chains (via JTAG) >>> for debuggin. >>Is there some blog somewhere that explains how scan-chains work (not >>how they're used, but how they're implemented inside the CPU)? >>Intuitively they sound very costly to me, because of things like the >>need to run extra wires all over the place. I'm obviously >>missing something. > Actually, you're not far off. It's a serial shift chain which is shifted > one-bit at a time to capture flop states. Each chain is a single wire; > a chip may have a few dozen individual shift chains. > https://www.design-reuse.com/articles/48331/scan-chains-pnr-outlook.html Thanks. Wow. So it is really that bad, huh? I also liked the note about speed limits and power consumption, how shifting a state (in or out) causes (almost) all the flip-flops to change state at each cycle, thus leading to very high power consumption. What's the approximate cost of those scan chains. I.e. if we were to take an existing working design and replace all the "flip-flop with scan-chain" with "plain flip-flops", how much smaller would the resulting chip be, how much faster could it run, and how much less power could it consume? I assume the cost in terms of power consumption is small because in normal use, the scan-chain part stays completely stable so that barring leakage it should not consume any power, save for the indirect costs like the need to move the other bits over greater distances when the extra wires of the scan chains get in the way. Stefan