23

I am reading about BIOS in Phil Storrs PC Hardware book: What happens when we turn on a PC ?

Next comes the incremental check of all the RAM memory. The RAM memory is written to, and read from, with all ones, all zeroes, and alternating checkerboard patterns, to check for sympathetic, stuck, and unresponsive bits.

What is a "sympathetic bit", and why must IBM PCs check for it?

5
  • 27
    A bit that does what the bit next to it does. As to "why" - that's an observed failure mode of RAM, so a memory test ought to test for it. I'm no hardware guy, but it presumably points to unwanted current flow between two adjacent RAM cells. Jun 1, 2022 at 12:23
  • 1
    @another-dave Yes, that's the answer. And the more sophisticated testing software would do a lot of different combinations of bits for RAM testing to catch the different failure modes. And later added even more to rule out caching hiding RAM errors. etc. Jun 1, 2022 at 14:14
  • 7
    @another-dave A much more common issue is with problems in address wiring or configuration resulting in a memory cell responding to addresses other than the one it's supposed to. A good startup memory test should check for such things, but instead of testing locations separately a better and faster check is to write a pattern with a non-power-of-two period through all of memory, then read it all back, then repeat with a couple of additional patterns. If even one such pattern can be written in its entirety and read back in its entirety, that will rule out a great many...
    – supercat
    Jun 1, 2022 at 15:48
  • 2
    ...possible faults that might otherwise exist, and I think the 8088 could have managed that pretty quickly using MOVSW and CMPSW.
    – supercat
    Jun 1, 2022 at 15:51
  • 1
    "sympathy, [...] A (real or supposed) affinity between certain things, by virtue of which they are similarly or correspondingly affected by the same influence, affect or influence one another (esp. in some occult way)" — OED
    – hobbs
    Jun 2, 2022 at 1:04

2 Answers 2

29

What is a "sympathetic bit", and why must IBM PCs check for it?

  • Sympathic Bits, in this context, are bits within a data word that always flip with some other bit. For example when a word written as 0000 0001 is reread as 0000 0011 while writing 1111 1110 reads 1111 1100, then Bit 2^1 is sympathic with bit 2^0, it always gets set to the value 2^0 gets set. The same is also possible with negative sympathy, meaning that a bit always gets reset if the other gets set and set if the other gets reset.

This error comes up when data lines are connected.

  • Stuck Bits are bits that get set once to a value (0 or 1), but are stuck after that. Usually this condition gets reset with a sufficient power off.

This issue means usually problems in drivers.

  • Unresponsive Bits are essentially stuck bits with their stuck value equalling their power on value. They can not be set/reset at all, not even after power up.

Well, that's a dead cell :))


Since the IBM-PC's memory test only tests data patterns, not address patterns, this has to be about data words.

For the original IBM-PC sympathic bits should not happen at all, as it uses single bit RAMS, so any reason for finding one would not be about the RAMs, but the external circuitry. But the test does not really differentiate between these three cases of bit errors, but uses test pattern that will detect them undistinguishably. All it reports is a RAM error.

Also, in depending on context these terms may be used interchangeably.

3
  • 4
    Would be interesting to learn about the downvote considering this wrong/not useful.
    – Raffzahn
    Jun 2, 2022 at 13:20
  • "For the original IBM-PC sympathic bits should not happen at all, as it uses single bit RAMS, so any reason for finding one would not be about the RAMs, but the external circuitry." This isn't entirely true. The RAM structure simply means that a sympathetic bit will typically show up in a neighboring byte. For example, a write that's supposed to change bit 0 of byte 0, might also change bit 0 of byte 1. Jun 4, 2022 at 2:54
  • @JerryCoffin tue, but not detected by the RAM test this is about, so it will not happen.
    – Raffzahn
    Jun 4, 2022 at 7:56
12

If an address signal on a RAM chip or board is not connected properly, any attempt to write to either of the addresses distinguished by that bit will behave as though it writes to both of them. This may occur as a result of a bad connection, or improper configuration. The phenomenon is somewhat like the way "fake jump drives" work: the memory array will accept writes to addresses that aren't uniquely associated with actual hardware, but redirect them somewhere else. Thus, writing something and immediately reading it back will appear to work, but the act of writing it will trash something else.

While there may be other causes for operations on some RAM bits to affect others, addressing problems are the most common. If a board has an internal data bus which is isolated from the system bus, shorts between wires on that bus may cause bits within each byte to be "stuck" together, but shorted wires on the main system data bus will leave a system incapable of meaningfully running any kind of code, including diagnostics.

6
  • 2
    I don't think "sympathetic" bits are an effect of address lines (or you'd see this on a wide range of addresses), but of current leakage between adjacent RAM cells. So you'd see this phenomenon at a single address or at two addresses with physically adjacent cells.
    – dirkt
    Jun 1, 2022 at 16:20
  • 1
    @dirkt: While chips can have defects that cause bits to be stuck to each other, chips should be tested for such faults before they are packaged and sold. Maybe the PC BIOS programmers were thinking about testing for internal stuck bits, but the majority of faults such tests would find in practice would be address-related.
    – supercat
    Jun 1, 2022 at 16:38
  • 6
    PCB/assembly issues are generally weeded out when building a device and don't just appear afterwards without major damage. OTOH, RAM chips regularly develop various failure modes after being successfully tested, installed and in operation. Hopefully, it's after years of operation, but sometimes it's sooner. Having the system firmware perform a basic RAM smoke test on boot makes sense. Then we have less straightforward flaws like e.g. row hammer, that you need a more advanced testing tool like memtest86.* to detect.
    – thkala
    Jun 1, 2022 at 17:09
  • @thkala: How often would DRAMs that had been in service for awhile have spontaneously start having bits that are stuck together well enough to be found, when "cold", in a memory test that can be accomplished under CPU control, without having previously been unreliable during operation?
    – supercat
    Jun 1, 2022 at 17:24
  • 1
    Supercat, while your basic description about bits stuck is right, it's not about address, but data bits, as the test only checks data patterns, not address patterns.
    – Raffzahn
    Jun 1, 2022 at 17:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .