More from Electronics etc…
Introduction Hamming Distance Intuitive Estimation of Error Correction Bits Digging Deeper Comparing against BCH Codes What about Reed-Solomon Codes? BCH vs Reed-Solomon Codes References Footnotes Introduction I’ve been interested in error correcting codes (ECC) for a while now, and though I haven’t gotten very far, I keep on reading and, occasionally, writing about it. Except for really simple schemes, ECC theory gets complicated quickly. The two codes that I’ve looked at most are Reed-Solomon (RS) and binary Bose–Chaudhuri–Hocquenghem (BCH) codes. They are closely related: both use polynomial math that is normally performed over a Galois Field, though, as shown in my earlier Reed-Solomon blog post, that’s not strictly required. The encoding algorithms are relatively straightforward but the decoding algorithms are significantly more complicated. RS and binary BCH codes differ in the size of their symbols, their alphabet: a symbol of the former consists of multiple bits, often 8 bits, while a symbol of the latter is a bit. Errors are corrected with a granularity of a symbol. One key ECC question is “How many additional bits do I need to correct a given number of errors?” In this blog post, I check if an intuitive approach that I’ve been using matches reality. I’m trying hard to stay away from theory here, which makes the subject hopefully more accessible, but has the flip side that it’s far from being rigorous and exact. Hamming Distance When you look at the theory of error detecting and correcting codes, the discussion immediately turns to Hamming distance: the number of bit flips required to convert one vector of bits to another. The goal of an error correcting code is to transform the input vector, the message, to an output vector, the codeword, so that the minimum Hamming distance between valid codewords is guaranteed to be at least a certain number. The higher the Hamming distance, the higher number of bits that can be flipped in a codeword without destroying the ability to recover the original message. If \(t\)1 is the number of errors that we want to correct, error coding theory gives us the following formula: In words: to correct a codeword with a maximum number of \(t\) bit errors, the Hamming distance between any 2 codewords must be larger than two times \(t\). The theory also tells us the minimum Hamming distance to detect an error without correcting it: In the rest of this blog post, though, we’ll only care about correction, not detection. Here are 2 quick examples where the message is one bit. Adding 1 bit to the message For a one bit message, there are only 2 possible messages, 0 and 1. Let’s use a code that repeats this bit once: 0 becomes 00 and 1 becomes 11. The Hamming distance between these 2 valid codewords is 2 because you need to flip 2 bits to convert 00 into 11. The equation above tells us that a distance of 2 is not sufficient to fix a one-bit error. Indeed, when we receive 01 as a codeword, it’s impossible to tell if the transmitted codeword was 00 or 11: both have a Hamming distance of 1 to the received word of 01. Adding 2 bits to the message When we expand the 1 bit message to 3 bits and repeat the message bit twice, things are different: 0 transforms into 000 and 1 into 111. The Hamming distance between all possible codewords is 3. The theory says that we should be able to correct a codeword for which only 1 bit was flipped. And indeed, if we receive 001 and there is only 1 bit corrupted, we know for sure that the original message was 0. Intuitive Estimation of Error Correction Bits The concept of a minimum required Hamming distance to correct a number of errors is not particularly complicated, but it’s a different matter to use it to determine the number of additional ECC bits for, say, a BCH code. In fact, I still don’t know how to do it. As an alternative, I found myself using a simple model that works like this: Participant A transmits 1000 bits to participant B over a noisy channel B transmits the same 1000 bits back to A over a perfect channel A transmits a 10 bit error index to signal to B which bit it received wrong Or more general: If a message of \(k\) bits has 1 incorrect bit, you need a number of \(r = \lceil \log_2(k) \rceil\) 2 bits to point out the incorrect bit. Let’s call that number the error index3. To correct \(t\) bits, you need up to \(r = t \cdot \lceil \log_2(k) \rceil\) additional bits. That’s it! The model is simple, it’s not exactly practical, and the number of parity bits has to be only a first order estimation, but I felt like it had to be pretty close to reality. But is it? Digging Deeper Let’s consider some of the aspects of this model: There is no way to signal that there was no corruption That can be solved by allocating one error index value extra to signal a perfect transmission and calculate the number of bits as \(r = \lceil \log_2(k+1) \rceil\) instead of \(r = \lceil \log_2(k) \rceil\). E.g. for a 1000-bit message, an error index from 0 to 999 indicates an error location, and 1000 signals perfect transmission. For messages that are not a power of 2, the number of error indicator bits remains the same. The transmitted error indicator bits can be corrupt as well One way to solve this is by going through the same procedure to verify the error index. For a first iteration, it would cost an additional \(\lceil \log_2(\lceil \log_2(k+1) \rceil ) \rceil\) bits, 4 bits for a 10 bit error index. Of course, those 4 bits might be corrupt too! A better approach is to work backwards: start out with the length of the codeword and the number of errors you want to correct and determine the number of input message bits from there. The number of error indicator bits is then calculated over the length of the codeword and you get \(r = \lceil \log_2(n+1) \rceil\). The length of the message is \(k = n - r\). This breaks the simple model where you transmit message and error indicator separately, but that was not a realistic scenario anyway. It doesn’t consider that the same error index can appear only once If the code can correct 2 errors, you’d need \(\lceil \log_2(k+1) \rceil\) bits for the first error index to indicate zero errors or the location of the first error. For the second error, you need one less value because one location has already been corrected, so the number of bits needed is \(\lceil \log_2(k) \rceil\). This suggests that the number of error indicator bits might be an upper bound. It only applies to error correction the way BCH does it Any random bit can be corrected, but it doesn’t work for RS coding because there a whole symbol can be incorrect. That’s fixable though, I get to that later. You don’t need to signal the correct value Since the symbol is 1 bit in size, the location of the error is sufficient. To fix it, the receiver just needs to invert the bit. This also doesn’t work for RS. Comparing against BCH Codes Forget about using the Wikipedia article to compare the intuition against theory: you won’t find anything explicit. I found this presentation from the National Taipei University useful. The key formulas are on the first slide: Block length: \(n = 2^m -1\) Number of parity-check bits: \(n - k \le m t\) Minimum distance: \(d_{min} \ge 2t + 1\)4 In the equations above, \(k\) is still the length of the original message, \(t\) is the number of bits that can be corrected, \(n\) is the length of the codeword. If we rearrange the first equation, we get: Substitute \(m\) in the second equation: \(r\) is the number of error correction bits, so \(r = n - k\) and: Compare this with the intuitive formula that I started with: The only differences are: I used \(k\) instead of \(n+1\). That accounts for the fact that parity bits themselves need error correction too and that a perfect transmission must be signaled. the BCH equation assumes that the total codeword length is always one less than a power of two. instead of an approximation, it defines an upper bound. Theoretically, all BCH and RS codewords have a length \(n = 2^m -1\) symbols. In practice, the transmitted codewords are often shortened by setting a bunch of the symbols in the input message to zero and not transmitting them.5 When using shortened codes, you still have to use the \(m\) value of the parent code for which \(n = 2^m -1\). The intuitive formula works for long codewords and a limited number of errors to correct: \(n \approx k\). What about Reed-Solomon Codes? RS codes correct symbols not bits but you can still use the intuitive formula to identify the corrupted symbol: in a message with, say, 223 bytes you’d need 8 bits to pinpoint an incorrect byte. However, you also need an additional byte to fix the corruption and that is the case for every error byte that needs to be corrected. To repair \(t\) symbols that are \(s\) bits in size in a message of \(k\) symbols, you’d need this number of bits for the error location: And a bunch of bits with the correct values: Note that \(r_{location}\) points to a symbol, not a bit. Just like BCH codes, \(n = 2^s - 1\) for RS codes. Change \(r_{location}\) to use \(n\) instead of \(k\) and you get: The final result is: It turns out, that is exactly what you’ll find in all texts about RS coding: the number of parity symbols must be at least 2 times the number of corrupt symbols you want to correct. BCH vs Reed-Solomon Codes I’m getting a bit off-topic here but with the intuitive formula validated, it’s interesting to see when RS codes are better than BCH and vice versa. Let’s create an example where codewords are 255 bytes or 2040 bits and where we reserve 32 bytes or 256 bits for error correction. For RS, this allows us to correct 16 corrupt bytes that can contain up to 128 corrupt bits, as long as they’re contained within those 16 bytes. For BCH, we need 11 bits per error or \(11 \cdot 23 = 253\) parity bits to correct 23 corrupt bits which fits within the 256 bits that were allocated for RS. RS is the winner if errors happen in bursts: it doesn’t matter if a burst is 1 or 8 bits long, it counts as a single corruption when they fall within the same byte. BCH wins when errors are spread randomly: instead of fixing 16 bit flips, it can fix 23. In practice, communication protocols often used 2 codes in the following scheme: Transmitter: RS Encoder -> Interleaving -> Convolutional Encoder Receiver: Viterbi Decoder -> De-interleaving -> RS Decoder In this setup, RS is called an outer code and convolutional coding the inner code, because they wrap around the transmission in that order. In many transmission mediums, bit error are uncorrelated and burst errors unlikely. One would think that RS coding is the wrong choice then. However, the Viterbi decoder can introduce bursts of errors when it makes a mistake. The RS decoder is used to clean those up. The burst error length can be so long that a single RS codeword can’t deal with them. That’s why there’s an interleaver to increase the length of burst errors that can be corrected, at the expense of latency and memory storage, but that’s a topic for a different blog post. Modern communication protocols, such as DVB-S2 that’s used by satellite TV, use a low density parity check (LDPC) code instead of a convoluational code as inner code. A LDPC decoder has a lower tendency to introduce long error bursts in case of a mistake and instead introduces single bit errors that are spread randomly within a large codeword. This is where BCH codes shine which is why it’s used instead of RS. All words in this blog posts were written by a human. References Reed-Solomon Error Correcting Codes from the Bottom Up National Taipei University - BCH code CMU Introduction to Coding Theory - Notes 4: Elementary bounds on codes NASA - Bandwidth efficient CCSDS coding standard proposals Discusses outer coding/interleaving/inner coding for space communication. There’s an abundance of information in there, which is what you’d expect from a 70 page document! Footnotes In literature, you’ll often see \(k\) being used for this formula, but further down, \(k\) is used as the length of the original message, which is also a literature convention. So I decided to be consistent within this blog post. ↩ \(\lceil x \rceil\) means: round up to nearest integer. ↩ I came up with “error index” myself, but it turns out to be a term that is commonly used in error coding theory and its meaning is exactly what I had in mind! ↩ This is the minimum Hamming distance equation for error correction. ↩ This assumes that a systematic coding scheme is used, where the original message appears unmodified in the codeword. This is the case for most BCH and RS coding schemes that are used in the real world. ↩
Introduction The TDS7104 Common Failures Make an Image of the Hard Drive CR2032 Backup Battery Replacement and Display Brightness Do NOT Remove the Front Panel Scope Disassembly A Failed Attempt at Switching over to an SSD Reinstalling from Scratch: Windows 2000 Pro or Windows XP? Not All TEAC CD-224E Drives are the Same Installing Windows 2000 Pro on an Old Machine through a Virtual Machine Burning the Windows 2000 Pro Installation Disk onto a USB Stick Booting from USB Stick with a Plop Boot Manager Installing Windows 2000 Pro Installing Special TDS7104 Drivers Installing Tektronix Firmware The Scope is Working! Re-enabling the Existing License Cleaning Up The End References Footnotes Introduction A little over a month ago, I ran into a Tektronix TDS7104 at the Silicon Valley Flea Market, where else? Other than some dirty buttons, a few smudges here and there, and the usual assortment of calibration and asset tracking tags, the unit was in excellent cosmetic shape, but the price tag of $700 was way out of line: as I write this a try-before-you-buy TDS7104 can be had on Craigslist for the same price. But Paul, the seller/liquidator, has a habit of saying “I’ll make you a deal” and he did before I even asked: $300. That’s still a lot by flea market standards, but a pretty good price for a TDS7104… if you can get it to work. At home, the scope powered up right away and it booted straight into the main scope application. Other than a screen that was way too dim, everything seemed fine. But when I tried it again a few hours later, it got stuck at the BIOS screen with a CMOS battery error. In this blog post, I go over the steps I took to get the scope back in top shape. The TDS7104 The TDS7104 is a 4-channel oscilloscope with 1 GHz bandwidth and a maximum sample rate of 10Gs/s, though that’s only possible when using 1 channel. The sample rates drop to 5 Gs/s for 2 channels and 2.5 Gs/s for 3 or 4. Even by today’s standards, the specs exceed those of hobbyist class oscilloscopes, think Rigol and Siglent, though there’s a price to pay in terms of weight, 39 pounds, and volume: they’re as wide and deep as the earlier TDS700 series, for example, and much taller. The TDS7054 is its little brother, figuratively speaking only. In the same chassis, it has a 500 MHz bandwidth and 5 Gs/s. Unlike more advanced TDS7xxx models, the 7104 and 7054 have BNC connectors instead of custom Tektronix ones that require probes or adapters with prices that exceed today’s price of the scope itself. Introduced mid 2000, these scopes initially ran Windows 98 but they must have upgraded soon after to Windows 2000 Pro Embedded, because that’s what mine has and it has components with a late 2000 timestamp. The PC motherboard has the little-used NLX form factor. Mine was a RadiSys SF810 with a Socket 370 and a 100 MHz front-side bus. Originally, these scopes shipped with a dog slow 550 MHz Celeron, I got lucky with a 850 MHz Celeron. The fastest compatible Celerons with 100 MHz FSB go up to 1.4 GHz, but they’re pricy. You should be able to find 1.1 GHz versions for around $20 on eBay. Unlike my Agilent 54831, the 640x480 LCD screen has resistive touch control which makes it possible to use the advanced scope features without the need to connect a mouse. In addition to the PC motherboard, there is a PowerPC-based controller board that runs VxWorks like many other Tektronix products of that time, and a large acquisition board. In addition to a few hardware options such as a 4M/channel sample memory, up from a 500k default, there are plenty of software options for advanced measurements: jitter testing, USB certification testing, etc. Both the software and hardware options can be enabled with a license key. To the suprise of no one, that protection scheme was hacked long time ago… According to the labels on the chassis, my scope came from the PSD lab at Cypress Semiconductor, where it was used for things like measuring high-bandwidth signals such as the battery current on the Apple TV Remote. :o) Common Failures As always, you’ll find a bunch of hobbyists trying to revive this kind of scope on the EEVblog forum, Youtube and some blogs. Here are the most common failures: PC motherboard CMOS backup battery dead PowerPC backup battery dead Hard drive dead Power supply capacitors leaking I was lucky and only had to deal with issues 1 and 3, sort of. Make an Image of the Hard Drive Whether the machine boots or not, your first step should always be to make an image of the hard drive, a 6 GB IBM Travelstar in my case. Like my Agilent 54831, I thought that I’d have to open the case to access the drive, but you can just push on the spring-loaded black cover in the back and pull the drive sled out1. Nice! Remove the drive from the sled, plug it into a USB-to-IDE adapter, and extract the data. On Windows, I use HDD Raw Copy Tool. I often use Linux for this kind of maintenance, but since this scope is a Windows 2000 machine, I ended up needing a bunch of Windows-only tools. The Travelstar HD was running on fumes, because HDD Raw Copy Tool ran into a number of corrupt sectors during the copying operation. I was lucky, the impacted files were related to the French Windows 2000 manual, but it shows the importance of making an image of the drive ASAP. CR2032 Backup Battery Replacement and Display Brightness You’ll need to open up the case to get to the PC motherboard CR2032 backup battery. See the next 2 sections for that. After installing the new CR2032, the scope booted back up again, but the TekScope window had some weird corruption and waveforms didn’t render right. This was because the Chips & Technologies 69000 graphics card settings had been changed to a 256 color palette mode. It needs to be set to True Color 24-bit mode.2 Notice the presence of 2 video cards: an Intel 810 integrated graphics card and the Chips & Technologies 69000. The latter is responsible for driving the LCD screen. It has special hardware to render oscilloscope waveforms in overlay mode: they are sent by the acquisition board to the video memory through DMA3 without CPU intervention. While we’re on the topic of the display: after installing the CR2032, the LCD display was still very dim, to the point that I was researching replacement CCFL backlight tubes. That turned out to be entirely unnecessary: the TDS7104 doesn’t have a way to control the intensity of the LCD backlight. The previous users must have used it in a dark lab and dialed down the brightness by adjusting the gamma settings in Windows: Do NOT Remove the Front Panel I’m putting this section before the Disassembly one to make sure those with a low attention span get the message: chances are high that you don’t need to remove the front panel. And that’s good because, unlike the TDSnnn series scopes, the front panel has some plastic tabs that are very easy to break. That said, even if you do break them (I did!), the result is not catastrophic and you should be able to put the panel back firmly where it belongs with no one noticing a thing. (Click to Enlarge) The TDS7000 Series Service Manual makes it sound easy enough: To remove the trim ring, slide the flat end of a soldering aid into the side slot on the trim ring. Press in, then lift up to hook it underneath, then pry up. And from the pictures, it’s as if you can remove the front panel without removing anything else. That just didn’t work… The front panel consists of multiple click tabs: 1 on the left side, 1 on the right and then a bunch at the top and the bottom. So far so good. However, the left and right side also have 2 slide tabs that go into the metal rails. If you lift the left and right tabs too much, these plastic slide tabs break off. So you need to be very careful to make sure that you don’t lift the plastic trim too much, and that you slide the panel out while it stays parallel with the display. Or… you don’t touch it: you can do all PC maintenance, including replacing the floppy drive, without removing the front panel. Scope Disassembly I will continue my tradition of documenting the disassembly of test equipment in too much detail because nobody else does it. Even though the service manual technically describes how to do it, a few pictures go a long way to make it easier. To access the inside of the scope, you need to remove more than 30 screws. On the plus side, they’re all Torx-15 screws and they’re all the same length, so you don’t need to worry about keeping track of which screw goes where. Still, it takes a while and it validated my recent purchase of this cordless screwdriver, recommended by Shrirar over at The SignalPath. Unbutton the accessory bag This took me longer to figure out than I want to admit: you can just unclick the bag from the chassis, but the buttons can be very tight and if you’re not careful the fabric can tear. Use a flat-head screwdriver right next to each button to lever it off. Put the scope upright on its back feet It’s an unusual arrangement, but the easiest way to dismantle the scope is by putting it on its back feet: you don’t need to remove any screw from the back! Let me once again sing the praises of a sturdy equipment cart: it’s so much easier to walk around the cart than to muscle around bulky, heavy test equipment on a table. Remove the top panel 4 screws through the accessory bag buttons (“snap studs”) fix the top panel to the chassis. After removing this panel, you could remove the side panels already, but I found it much easier to remove the bottom panel next. Remove the bottom panel and loosen the black front connector trim Next, remove the 5 screws of the bottom panel as well as 3 screws that keep the black trim of the front BNC connectors in place. The black trim doesn’t need to be completely removed, only loosened because otherwise it will soon be in the way of some other screws. The bottom panel shall now be removed though. Just slide it down a bit and take it off. In the picture above, you can see 2 screws that aren’t marked in red. That’s because they don’t keep the bottom panel in place. But if you feel like it, you might as well remove them now too. Remove the handle and side panels With the bottom panel gone, the side panels are a breeze to remove after unscrewing the handle. I lied: these 2 screws are different than the others. But they’re a different color and impossible to get wrong. Remove the 2 sheet metal parts With the outer covers removed, you’re now staring at the sheet metal RF protection enclosure. It consists of 2 parts, each part covers 2 sides. Remove all the screws, take off the bottom part and then the top. Note how some of the bottom screws are hidden underneath the BNC connector cover. That’s why you had to remove its 3 screws of the black trim. Congratulations! For those who didn’t keep track: you’ve removed 32 screws! After removing the panels, you now have access to the acquisition board at the bottom and the PC motherboard at the top: One side has nothing but cooling fans, but from the other side you can see the power supply and an RS-232 port that you will need to connect if the backup battery of the PowerPC controller board expires. If you need access to those items, you’ve only done the easy disassembly part. On my unit, both the PSU and the controller backup battery were fine so I was done. Note on the picture above that the front panel has been removed. You do NOT have to do this for pretty much all restoration cases! And you really shouldn’t. Reinstall the bottom sheet metal cover All of my work on the scope was on the PC motherboard and I had to put the scope back in its horizontal position. To make sure that I didn’t accidentally damage the acquistion board, I put the bottom sheet metal cover back in its place. A Failed Attempt at Switching over to an SSD I’ve been using CompactFlash cards in the past to replace ailing hard drives. They work, but unless you buy a more expensive “industrial” card, they don’t have built-in wear leveling support. That is not a problem on a Rohde AMIQ that runs DOS, but on an OS like Windows with swap space, it could be4. So this time, I chose a 64 GB mSATA SSD ($35) and an mSATA SSD to IDE 44 Pin 2.5” adapter ($15)5. The standard way to move away from a failing hard drive to an SSD is to once again use HDD Raw Copy Tool to write the image to the SSD and that is that. I tried that with the 64 GB SSD, and while the scope got past the first-stage boot process, it errored out during the second stage when it tries to bring up the Windows GUI with a STOP: c0000218 {Registry File Failure} error. Older systems often had issues with partitions larger than 32 GB, so I bought a 32 GB mSATA SSD instead, $3 cheaper for half the capacity, but I got the same error. Just copying the drive image to an SSD worked fine for others, but for me it was a dead-end that I spent many hours trying to get around. I eventually decided to reinstall all the software from scratch, which was a whole other adventure. Reinstalling from Scratch: Windows 2000 Pro or Windows XP? I had wanted to avoid reinstalling the OS from scratch because I expected to run into a bunch of driver issues, but in the end I had no choice. While a number of people have reported that Windows XP can work on some of the TDS7104 motherboards, I decided to stick with Windows 2000 Pro because I know that works and I didn’t have a pressing need for more functionality, whatever that might be. The scope has Windows 2000 Pro Embedded, but I wasn’t able to find an installation disk for that and the regular version works fine too. The ISO file can be downloaded from the Internet Archive. The license key that’s printed on the back to the scope does not work with the regular Windows 2000 Pro. The Internet Archive one has a key that works, and other valid keys are just a Google away, but I didn’t even need one: I was never asked for a license key during the Win2k installation on the scope. The standard way to install Win2k Pro is with a CDROM drive. Unfortunately, the drive didn’t work which meant I had to open the whole machine again to install a replacement drive. Not All TEAC CD-224E Drives are the Same The TEAC CD-224E laptop drive in my TDS7104 got detected just fine by the BIOS and in Windows, but when you inserted a disc in the drive, neither the BIOS nor Windows could read from it. Since the RadiSys motherboard doesn’t support booting from USB stick, I decided to replace the TEAC CD-224E laptop drive with a ‘new’ one that I got from eBay for $20. Unlike the hard drive, the CDROM drive can’t be removed without opening up the TDS7104, but once the case is open, the effort is minimal. I first removed the floppy drive to have a bit more maneuvering freedom with the cables, but it’s not really necessary. Unplug the CDROM IDE cable Remove 2 screws The CDROM drive sits in a metal enclosure with a small adapter PCB that converts the CD-224E 50-pin slimline IDE connector to a standard PATA/IDE connector. I tested the broken drive with the adapter PCB and my USB-to-IDE dongle on my laptop to make sure the issue was with the drive and not the CDROM disc, and that didn’t work, as expected. With the new CD-224E/dongle combo, my laptop could read the installation CD just fine, but when I installed the new drive in the TDS7104, the BIOS couldn’t even detect the drive! I tried every BIOS setting under the sun, but no luck. There are many versions of the CD-224E, all with the same dimensions and slimline IDE interface, but clearly they don’t all behave the same. The version of the broken one is version A93 (2000), the new one is CD0 (2005). You can find A93 drives on eBay, but $69 is way too high for something that I’d be using exactly once. Installing Windows 2000 Pro on an Old Machine through a Virtual Machine (Another dead-end) It is allegedly possible to install Windows 2000 Pro on an old machine without CDROM and USB port by using a virtual machine. The process is convoluted: mount the installation CDROM ISO and the SSD onto the virtual machine. go through the first phase of the installation process until asked to reboot. now move the SSD to the old the machine (the scope) and proceed with the installation there. I once again spent a few hours getting this to work, but the scope never managed to make it to the Windows installation GUI. Burning the Windows 2000 Pro Installation Disk onto a USB Stick Alright, so I’m running out of options and USB is about the only storage interface left. The scope can’t boot from a USB stick directly but there is a way around that. Let’s first create a bootable USB stick with the Win2k installation ISO on it. Most of the time, you can use a utility like Balena Etcher to burn a CDROM ISO onto a USB stick, but of course that doesn’t work for the Windows 2000 Pro installation CDROM. Instead, you need to use WinSetupFromUSB to prepare the USB stick: Download, install, launch Select the USB stick as target Select Auto format with FBinst and use the FAT32 file system Add to USB disk: Windows 2000/XP/2003 Setup Select the mounted Win2K Pro ISO drive as source Press “GO” to copy Win2K Pro onto the USB stick Booting from USB Stick with a Plop Boot Manager Plop Boot Manager makes it possible to boot from a USB stick on machines that don’t support it. It goes like this: copy the plpbt.img image from the plpbt-5.0.15.zip archive to a floppy disk with a tool like WinImage, Rawrite32, or RawWrite for Windows.6 boot the Plop Boot Manager from floppy disk. the boot manager has a USB mass storage device driver select USB as boot device I tried hard to avoid the floppy disk route because my experience with floppy drives on old test equipment has been abysmal: none of them worked. Having no choice, I tried to copy the boot manager image with my USB floppy drive and… that didn’t work either. All these years the USB floppy drive, freshly bought from Amazon, was the culprit! Since the scope still worked fine with the IBM HD, I used its own floppy drive to put the image onto the floppy disc and that worked. After setting the BIOS to allow booting from floppy, the scope booted into the Plop Boot Manager just fine and it was able to boot the USB stick with the Windows 2000 Installation ISO. Plop doesn’t support USB hubs. The RadiSys motherboard has only 1 USB port which will be occupied by the USB stick, so you’ll at least need a PS/2 keyboard to do anything. Installing Windows 2000 Pro With the empty 32GB SSD plugged into the scope, the installation of Windows 2000 Pro was uneventful. There are 2 phases: the first one uses text mode and primarily copies all the necessary drivers onto the SSD. The machine then reboots and continues the installation in Windows GUI mode from the SSD, though the USB stick is still needed in a later stage. The TDS7104 has a bunch of specialty hardware that needs dedicated drivers, but those are not needed to get the OS up and running. At long last, I was able to see this image: Installing Special TDS7104 Drivers There is a great GitHub repo with a bunch of TDS7000-series software, including this Drivers directory. The README.md says that the driver should work for Windows 98 and XP, but the Chips and Technologies video driver definitely did not work for Win2k!7 I used Driver Collector to extract drivers from the original hard drive and that worked fine. You can find these drivers here. The 4 specialty drivers are for these components: Front panel This is the USB Device that’s listed under “Other Devices” Texas Instruments PCI-1225 CardBus Controller You need to install this driver twice, once for each port. Windows installed a default PCI-1225 driver for this, but that one doesn’t work, hence the exclamation mark next to it. The name of the driver .inf file is unsup.inf, for unsupported? Confusing, but that’s the one to use. PCI2PCI bridge That’s the Other PCI Bridge Device. Chips and Technologies 69000 video driver The default Windows driver for the C&T 69000 is what makes the screen work when running Windows, but it’s not sufficient to render measured signals in the TekScope application. For that, you need to update to the Chips and Technologies (Asiliant) 69000 driver. Installing Tektronix Firmware The TDS7104 and TDS7054 firmware v2.5.5 can be freely downloaded from the Tektronix website. The installation was painless, just launch the executable. The TDS7104 has a convoluted architecture where the PowerPC on the controller board can access files on the hard drive of the regular PC that are located in the c:\vxboot directory. Since the controller backup battery on my scope was still in good condition, I didn’t have to do anything special: the vxboot directory was created automatically during the firmware installation. One thing that was missing, though, was the advanced jitter license option. The Scope is Working! And with that, I finally had a working TDS7104 with SSD! The time from pressing the power button to having a waveform on the screen was much lower too: from 2min50s down to 1min35s. Re-enabling the Existing License The same GitHub repo that I mentioned earlier also has an unlock options directory with scripts to enable and validate license key features. On the Eevblog forum, plenty of people have been able to use it, but it’s not as user-friendly as other license key schemes. Most of the time, license keys are additive, with one license key per feature that must be enabled. On the TDS7104, there is 1 license key that enables all features at once. The validate script shows how that works with the license key and serial number of my scope: ./validate.py BREHZ9885D3MNKXHHYQCQRGQRW7C E1 91 73 BF F7 7B E4 C5 52 3D C7 3A E1 9E 71 8F 76 01 44 2F 54 00 00 C0 1B 79 48 00 00 00 00 00 00 00 00 A8 16 30 00 10 00 00 00 00 00 This key is for UID 1BC00000542F (S/N 21551, model TDS/DSA/DPO7104): CRC: 4879 Key is valid, active options: 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 We can see how that long string of gibberish contains: the serial number 21551 the model number TDS/DSA/DPO7104 a UID that is really just a combination of the serial number and the model a CRC an 18-byte or 144-bit bitmask I can recreate the license key by feeding these parameters back in the generation tool: ./gen.py tds7104 B021551 000000000000000008000000000000000000 XBGDV-K8GDM-KH7X3-979Y9-ZZ593-9ZRZZ-4837X-9VV5Z-T9HB I had to join the 18 bytes into one 72-digit hex number. The license key that comes out doesn’t match the original one, but after entering it into my scope, it worked just the same: The scope is very forgiving about the license keys: upper case, lower case, dash or no dash, it all seems to work. You can even reduce the number of hex digits in the license enable mask to a certain extent, and the license key will still work: ./gen.py tds7104 B021551 000000000000000008000000000000 7GWUZ-RRRMK-59LYT-978Y8-GZD93-8ZQGZ-C836X-8CVD What remains is the question which bit maps to which feature? This post in the eevblog forum has you partially covered here: ######################################################################## 4 # options masks/names/descriptions, conversion functions 5 6 # 01 - 1M 7 # 02 - 2M 8 # 04 - 3M 9 # 06 - 2M 2A 10 # 08 - 4M 11 # 00 00 00 00 00 00 04 - USB 12 # 00 00 00 00 00 00 20 - JT3 13 # 00 00 00 00 00 00 00 80 - ET3 14 # 00 00 00 00 00 00 00 00 08 - JA3 15 16 # 00 00 05 00 00 00 00 00 00 10 - ASM DDRA DJA 17 # 00 44 00 00 00 00 02 08 - SM ST J1 J3E 18 # 04 40 00 00 00 00 06 C0 10 - 3M JT2 USB2 ST 19 # 04 44 FF 03 00 00 8D A3 EF FF 17 - 10XL, MTH, PTH1, ASM, LT, DDRA, SLE, EQ, TDSDDM2, TDSUSB2, YDSCPM2, RTE, IBA, PCI, TDSDVI, TDSET3, SAS, TDSHT3, TBD, JA3, TDSPTD, TDSVNM, DPOPWR, TDSHT3v1.3, 73, 74, DJE, DJA, 77, 78, 79, SVE, SVP, SVM, SLA Note how JA3, advanced jitter analysis, indeed has bit 14 set to 1. Some people just use a mask of FFFFFFF....FFFF. Some of these analysis tools can once again be found in the same GitHub repo, or on the Tektronix website. This is all theoretical, of course. I don’t think I’ll ever have a hobbyist need for any of this… Cleaning Up The final act is cleaning. This scope was in exceptional condition, except for the knobs on the control panel. The knobs have a thin anti-slip layer on them that is a finger grease magnet. Removing that layer with isopropyl alcohol makes the knobs look like new without a noticeable difference in control. Just be careful about using 99% isopropyl, I think it attacks the plastic. 90% was fine. If some knobs are missing or cracked, the ones of a TDS220 are identical. You can buy knobs new or on eBay, but they’re expensive. If you really need a few, you might be better off buying a donor TDS220 instead. The End And with that, the scope is ready to be deployed to a shelf in my garage. One day I’ll need something with this kind of firepower but for everything else, a small scope with lower specs is way more practical. I like the scope better than the Agilent 54831 so that will probably hit Craigslist at some point. All words in this blog posts were written by a human. References TDS7000 Series User Manual TDS7000 Series Service Manual Eevblog forum - Tek CSA7404/TDS7000 repair project This is the place to go. Chances are that all your questions will be answered here as long as you have the patience to read through 41+ pages of discussion. TDS7054 repair Github Repo with a lot of resources Footnotes I obviously only figured this out after removing the enclosure… ↩ I didn’t try the 16-bit not-so-true color mode. ↩ The Agilent 54831 uses a similar overlaying method. ↩ In reality, I will never use this scope enough to ever run into an issue like this. ↩ You can still find native 2.5” IDE 44 laptop SSDs, like this one, but you pay $30 more for the same capacity. ↩ RawWrite for Windows is the one to use on a 32-bit Windows system, like the Win2k OS on the IBM Travelstar of the scope. ↩ If you install the incorrect driver, the scope will still boot with a working LCD screen, but once the Windows GUI starts, it will move its business to the Intel integrated GPU. You need a VGA monitor to follow what’s happening. Even if you later select the right driver, Windows somehow thinks that the old driver is good enough and just doesn’t do it, without any feedback. I had to manually delete the bad driver files from the SSD to finally make it work. ↩
Introduction A Galois Field Introduction by Example Base Galois Fields A Real World Example of a Base Galois Field GF(2) Extended Galois Fields Extended Galois Field Addition Extended Galois Field Multiplication A Field Defining Irreducible Polynomial A Primitive Polynomial From Abstract Alpha to a Real Value Selecting Primitive Polynomials The Benefit of Primitive Polynomials Linear Feedback Shift Register Multiplication through Addition of Exponents References Footnotes Introduction In my blog post about Reed-Solomon coding, I used regular integers for all calculations. These are impractical for a real-world implementation, but since everybody knows integer math since first grade, it made things easier to learn things one step at a time. Instead of working with pure integers, actual Reed-Solomon implementations use elements from a Galois or finite field as symbols. I’ve been sitting on implementing and writing about a Reed-Solomon decoder for almost 4 years now1, and I’m still not quite there, but a first step is to have enough Galois field understanding so that the lack of it isn’t an obstacle. That’s what this blog is about. Don’t expect a solid theoretical treatise, you can find many of those as part of university courses, but something that is sufficient to refer back to in the future when I’ve forgotten some of the details. If you want to get a deeper understanding, check out the references at the bottom. A Galois Field Introduction by Example In mathematics, a field is a set of elements for which addition, subtraction, multiplication and division operations have been defined, with properties that we take for granted when dealing with rational or real numbers, such as the associative and distributive properties2, the rules for adding and multiplying with 0, and so forth. For rational or real numbers, the number of elements in the field is infinite. A Galois field only has a limited number of elements, yet still has these kind of operations and properties. A good example of a Galois field is \(\text{GF}(5)\) which has integer numbers 0 to 4 as elements. Addition, subtraction, and multiplication work the same as for regular integers but each such operation is followed by a modulo 5 operation. Here are a few example operations in \(\text{GF}(5)\): Division is a bit less intuitive. It is defined as the multiplication by the inverse of the divisor: One way of finding the multiplicative inverse of the divisor is by multiplying it with all possible elements and checking if the result is 1. Let’s say we want to do \(2/3\) in \(\text{GF}(5)\). We need to find \(3^{-1}\) so that \(3 \cdot 3^{-1} = 1\). There are 5 different options \(0,1,2,3,4\): We can see that \((3 \cdot 2)\bmod 5 = 1\), so \(3^{-1}=2\). And thus: There are other ways to calculate the multiplicative inverse. For simple cases, you can use Fermat’s Little Theorem, which says: or, after dividing both sides by \(a\): In our example \(a=3\) and \(p=5\), so: A more general algorithm is the Extended Euclidean Algorithm. Base Galois Fields The example above is one of a base Galois field \(p\) is the base number of a one-dimensional mathematical universe. In a base Galois field, \(p\) must always be a prime number, otherwise the division operation would be ill defined. For example, if we’d set \(p=6\) and tried to find the multiplicative inverse of 2, we’d get the following: There’s no solution with a result of 1. Since there’s at least one element for which a multiplicative inverse doesn’t exist, you can’t create a field for \(p=6\) and thus \(\text{GF}(6)\) can’t exist. Another issue for \(p=6\) is that you can get a result of 0 when multiplying 2 non-zero numbers: That’s behavior unbecoming of a proper field! A Real World Example of a Base Galois Field Since a base Galois field must have a prime number of elements, only \(\text{GF}(2)\) maps directly to the zeros and ones of digital logic; all other fields have an odd number of elements. Still, there are some real-world cases where these kind of Galois fields are used: the Wikipedia article on Reed-Solomon error correction has an example that uses \(\text{GF}(929)\), a field that is used for coding PDF417 bar codes. © Markus.Jungbauer - Wikipedia Modulo 929 calculations are fine for bar codes, you only need to process a few per second at most, but they’re not something you’d want to use for high speed communication protocols that run at rates of gigabits or bytes per second. GF(2) Before taking the next step, let’s first look at the only base field that maps neatly to ones and zeros: \(\text{GF}(2)\). The binary Galois field only has 2 symbols: 0 and 1. It has the following addition table: And this is the multiplication table: Addition maps to a XOR and multiplication to an AND gate. Another property of note is that subtraction is the same as addition. These are promising properties for a hardware implementation. Extended Galois Fields From a base Galois field \(\text{GF}(p)\) one can construct an extended Galois field \(p\) is still the size of mathematical universe in one dimension and prime. \(n\) is the number of dimensions. The total number of elements in the extended Galois field is \(p^n\). An element \(a\) of such a Galois field could be written as a vector: Or as a polynomial: For algorithms that are implemented in hardware, it’s extremely common to deal with \(\text{GF}(2^n)\), and \(\text{GF}(2^8)\) especially: this results in 8 dimensions of values 0 and 1 which conveniently maps to a byte. You’ll sometimes see an extended Galois field written with argument in parenthesis worked out, e.g. \(\text{GF}(2^8)\) written as \(\text{GF}(256)\). This is not an ambiguous notation: you can infer this to be a Galois field extension because 256 is not a prime, but my personal preference is to always use the \(\text{GF}(2^8)\) notation. All Galois fields require an addition, subtraction, multiplication, and division operation. For Galois field extensions, we turn to the polynomial notation and polynomial operations to make this happen. Extended Galois Field Addition To add 2 elements \(a\) and \(b\): The base Galois field rules apply for the addition of each of the terms. Here’s a \(\text{GF}(2^4)\) example: Note how for the last term \((1+1) = 0\). That’s the base \(\text{GF}(2)\) operation. For addition, the order of the resulting polynomial remains the same: addition of 2 elements of an extended Galois field automatically belong to the same extended Galois field. Extended Galois Field Multiplication Like base Galois field multiplication, the extended version uses a multiplication followed by division and retaining the remainder. Like addition, this is done with polynomials. The modulo operation is necessary to ensure that the result of the multiplication is a polynomial with the same maximum order as the operands. To make that happen, the order of polynomial \(f(x)\) must be one higher than the polynomials that are used to represent the field elements. For example, for \(GF(2^4)\), the elements have 4 dimensions and are represented with polynomials with an order of 3: \(a_3 x^3 + a_2 x^2 + a_1 x + a_0\). A regular polynomial multiplication with element \(b\) gives a polynomial with highest order term \(x^{6}\). The modulo operation with a polynomial with maximum term \(x^4\) will reduce the result back to one with maximum term \(x^3\). A Field Defining Irreducible Polynomial The following requirements are key for a field defining polynomial for \(\text{GF}(p^n)\): the polynomial is of order \(n\): \(f(x) = x^n + f_{n-1} x^{n-1} + \cdots + f x + f_0\). the coefficient of \(x^n\) is always 1, even if \(p > 2\). The polynomial is monic. the remaining coefficients are from the base field \(\text{GF}(p)\). the polynomial is irreducible in the field of \(\text{GF}(p)\). An irreducible polynomial can not be factored into multiple lower order polynomials. Note the similarity with base Galois field \(\text{GF}(p)\), where \(p\) must be a prime number, one that can not be factored into multiple smaller integers. Pay attention to the part where I write that it needs to be irreducible in the field of \(\text{GF}(p)\). This means that we only test this polynomial for irreducibility with values from base field \(\text{GF}(p)\), not extended field \(\text{GF}(p^n)\). One thing to test when checking for irreducibility is that none of the base Galois field elements are a root of \(f(x)\). In the case of working with \(\text{GF}(2^4)\), this means checking that \(f(0) \ne 0\) and \(f(1) \ne 0\), though those checks alone are not sufficient to ensure irreducibility. Much like the earlier example where \(2 \cdot 3 \pmod{6} = 0\), a reducible polynomial makes it impossible to properly define extended Galois field operations. For example, if for \(\text{GF}(2^4)\) we select reducible polynomial \(f(x) = x^4 + 1\) as defining polynomial3, then we get the following multiplication: In other words, we have again a case where multiplying non-zero elements results in zero, which is not allowed for a field. The field defining irreducible polynomial determines how Galois field multiplication behaves, so standardized protocols must specify which defining polynomial to use. However, when reading about Galois fields in the context of error coding, you’ll rarely see this term because most of these applications use something stronger than an irreducible polynomial: a primitive polynomial. A Primitive Polynomial A primitive polynomial is an irreducible polynomial \(f(x)\) with one additional characteristic: it defines a field for which the powers of a primitive element \(\alpha\) generate all non-zero elements of the field. What does this mean? And what is \(\alpha\) anyway? \(\alpha\) is defined as an element of \(\text{GF}(p^n)\) that satisfies the following equation: In other words, \(\alpha\) is a root of \(f(x)\). It is crucial to understand that the equation above is the formal definition of \(\alpha\). There are multiple values from \(\text{GF}(p^n)\) that can serve as \(\alpha\), but right now, we don’t care about that: \(\alpha\) is a placeholder, an abstract element. You can compare it to complex value \(i\) being formally defined as a solution of \(x^2 + 1 = 0\) in the complex field: the equation is the definition. If \(f(x)\) is irreducible, how can \(\alpha\) be a root of it? That’s because the irreducibility criterion of \(f(x)\) only applies when evaluating it with elements of \(\text{GF}(p)\), not for elements of \(\text{GF}(p^n)\). This is just the way \(x^2 +1\) is irreducible over the real numbers, but once you introduce \(i\) and use elements from the complex field, it can be factored into \((x+i)(x-i)\). \(f(x)\) is a monic polynomial of order \(n\): Using the definition of \(\alpha\): Simple rearrangement gives this: In the case of \(\text{GF}(2^n)\), subtraction is the same as addition, so you get this: We have derived a reduction rule that tells us how to deal with \(\alpha^i\) when \(i \ge n\). Let’s put this into practice… \(\text{GF}(2^4)\) has this primitive polynomial: Using the reduction formula we can construct all non-zero elements of the field using only exponentials: Power Split Substitution Multiply \(\pmod{f(x)}\) \(\alpha^{0}\) \(1\) \(1\) \(1\) \(1\) \(\alpha^{1}\) \(\alpha\) \(\alpha\) \(\alpha\) \(\alpha\) \(\alpha^{2}\) \(\alpha^{2}\) \(\alpha^{2}\) \(\alpha^{2}\) \(\alpha^{2}\) \(\alpha^{3}\) \(\alpha^{3}\) \(\alpha^{3}\) \(\alpha^{3}\) \(\alpha^{3}\) \(\alpha^{4}\) \(\alpha^{4}\) \(\alpha + 1\) \(\alpha + 1\) \(\alpha + 1\) \(\alpha^{5}\) \(\alpha^{4} \cdot \alpha\) \((\alpha + 1) \cdot \alpha\) \(\alpha^{2} + \alpha\) \(\alpha^{2} + \alpha\) \(\alpha^{6}\) \(\alpha^{5} \cdot \alpha\) \((\alpha^{2} + \alpha) \cdot \alpha\) \(\alpha^{3} + \alpha^{2}\) \(\alpha^{3} + \alpha^{2}\) \(\alpha^{7}\) \(\alpha^{6} \cdot \alpha\) \((\alpha^{3} + \alpha^{2}) \cdot \alpha\) \(\alpha^{4} + \alpha^{3}\) \(\alpha^{3} + \alpha + 1\) \(\alpha^{8}\) \(\alpha^{7} \cdot \alpha\) \((\alpha^{3} + \alpha + 1) \cdot \alpha\) \(\alpha^{4} + \alpha^{2} + \alpha\) \(\alpha^{2} + 1\) \(\alpha^{9}\) \(\alpha^{8} \cdot \alpha\) \((\alpha^{2} + 1) \cdot \alpha\) \(\alpha^{3} + \alpha\) \(\alpha^{3} + \alpha\) \(\alpha^{10}\) \(\alpha^{9} \cdot \alpha\) \((\alpha^{3} + \alpha) \cdot \alpha\) \(\alpha^{4} + \alpha^{2}\) \(\alpha^{2} + \alpha + 1\) \(\alpha^{11}\) \(\alpha^{10} \cdot \alpha\) \((\alpha^{2} + \alpha + 1) \cdot \alpha\) \(\alpha^{3} + \alpha^{2} + \alpha\) \(\alpha^{3} + \alpha^{2} + \alpha\) \(\alpha^{12}\) \(\alpha^{11} \cdot \alpha\) \((\alpha^{3} + \alpha^{2} + \alpha) \cdot \alpha\) \(\alpha^{4} + \alpha^{3} + \alpha^{2}\) \(\alpha^{3} + \alpha^{2} + \alpha + 1\) \(\alpha^{13}\) \(\alpha^{12} \cdot \alpha\) \((\alpha^{3} + \alpha^{2} + \alpha + 1) \cdot \alpha\) \(\alpha^{4} + \alpha^{3} + \alpha^{2} + \alpha\) \(\alpha^{3} + \alpha^{2} + 1\) \(\alpha^{14}\) \(\alpha^{13} \cdot \alpha\) \((\alpha^{3} + \alpha^{2} + 1) \cdot \alpha\) \(\alpha^{4} + \alpha^{3} + \alpha\) \(\alpha^{3} + 1\) \(\alpha^{15}\) \(\alpha^{14} \cdot \alpha\) \((\alpha^{3} + 1) \cdot \alpha\) \(\alpha^{4} + \alpha\) \(1\) In the table above, \(\alpha^4\) is reduced with the reduction formula, and each row after is reduced by the row before it. The 2 factors are then multiplied which results in a maximum order of 4. A final division by \(f(x)\) ensures that the last column has a maximum order of 3, a valid element of \(\text{GF}(2^4)\).4 The key observation is that the last column goes through all 15 non-zero elements. Here is what happens when you use an irreducible polynomial that is not primitive: Power Split Substitution Multiply \(\pmod{f(x)}\) \(\alpha^{0}\) \(1\) \(1\) \(1\) \(1\) \(\alpha^{1}\) \(\alpha\) \(\alpha\) \(\alpha\) \(\alpha\) \(\alpha^{2}\) \(\alpha^{2}\) \(\alpha^{2}\) \(\alpha^{2}\) \(\alpha^{2}\) \(\alpha^{3}\) \(\alpha^{3}\) \(\alpha^{3}\) \(\alpha^{3}\) \(\alpha^{3}\) \(\alpha^{4}\) \(\alpha^{4}\) \(\alpha^{3} + \alpha^{2} + \alpha + 1\) \(\alpha^{3} + \alpha^{2} + \alpha + 1\) \(\alpha^{3} + \alpha^{2} + \alpha + 1\) \(\alpha^{5}\) \(\alpha^{4} \cdot \alpha\) \((\alpha^{3} + \alpha^{2} + \alpha + 1) \cdot \alpha\) \(\alpha^{4} + \alpha^{3} + \alpha^{2} + \alpha\) \(1\) \(\alpha^{6}\) \(\alpha^{5} \cdot \alpha\) \((1) \cdot \alpha\) \(\alpha\) \(\alpha\) \(\alpha^{7}\) \(\alpha^{6} \cdot \alpha\) \((\alpha) \cdot \alpha\) \(\alpha^{2}\) \(\alpha^{2}\) \(\alpha^{8}\) \(\alpha^{7} \cdot \alpha\) \((\alpha^{2}) \cdot \alpha\) \(\alpha^{3}\) \(\alpha^{3}\) \(\alpha^{9}\) \(\alpha^{8} \cdot \alpha\) \((\alpha^{3}) \cdot \alpha\) \(\alpha^{4}\) \(\alpha^{3} + \alpha^{2} + \alpha + 1\) \(\alpha^{10}\) \(\alpha^{9} \cdot \alpha\) \((\alpha^{3} + \alpha^{2} + \alpha + 1) \cdot \alpha\) \(\alpha^{4} + \alpha^{3} + \alpha^{2} + \alpha\) \(1\) \(\alpha^{11}\) \(\alpha^{10} \cdot \alpha\) \((1) \cdot \alpha\) \(\alpha\) \(\alpha\) \(\alpha^{12}\) \(\alpha^{11} \cdot \alpha\) \((\alpha) \cdot \alpha\) \(\alpha^{2}\) \(\alpha^{2}\) \(\alpha^{13}\) \(\alpha^{12} \cdot \alpha\) \((\alpha^{2}) \cdot \alpha\) \(\alpha^{3}\) \(\alpha^{3}\) \(\alpha^{14}\) \(\alpha^{13} \cdot \alpha\) \((\alpha^{3}) \cdot \alpha\) \(\alpha^{4}\) \(\alpha^{3} + \alpha^{2} + \alpha + 1\) \(\alpha^{15}\) \(\alpha^{14} \cdot \alpha\) \((\alpha^{3} + \alpha^{2} + \alpha + 1) \cdot \alpha\) \(\alpha^{4} + \alpha^{3} + \alpha^{2} + \alpha\) \(1\) This time around, the pattern repeats every 5 elements: a non-primitive polynomial does not construct the whole field with just exponentiation of \(\alpha\). From Abstract Alpha to a Real Value So far, \(\alpha\) has been an abstract element that hasn’t been assigned a real value. That can be trivially fixed by assigning \(\alpha\) a value of \(x\): That’s really it! Power \(\pmod{f(x)}\) \(\alpha \to x\) Binary \(\alpha^{0}\) \(1\) \(1\) 0001 \(\alpha^{1}\) \(\alpha\) \(x\) 0010 \(\alpha^{2}\) \(\alpha^{2}\) \(x^{2}\) 0100 \(\alpha^{3}\) \(\alpha^{3}\) \(x^{3}\) 1000 \(\alpha^{4}\) \(\alpha + 1\) \(x + 1\) 0011 \(\alpha^{5}\) \(\alpha^{2} + \alpha\) \(x^{2} + x\) 0110 \(\alpha^{6}\) \(\alpha^{3} + \alpha^{2}\) \(x^{3} + x^{2}\) 1100 \(\alpha^{7}\) \(\alpha^{3} + \alpha + 1\) \(x^{3} + x + 1\) 1011 \(\alpha^{8}\) \(\alpha^{2} + 1\) \(x^{2} + 1\) 0101 \(\alpha^{9}\) \(\alpha^{3} + \alpha\) \(x^{3} + x\) 1010 \(\alpha^{10}\) \(\alpha^{2} + \alpha + 1\) \(x^{2} + x + 1\) 0111 \(\alpha^{11}\) \(\alpha^{3} + \alpha^{2} + \alpha\) \(x^{3} + x^{2} + x\) 1110 \(\alpha^{12}\) \(\alpha^{3} + \alpha^{2} + \alpha + 1\) \(x^{3} + x^{2} + x + 1\) 1111 \(\alpha^{13}\) \(\alpha^{3} + \alpha^{2} + 1\) \(x^{3} + x^{2} + 1\) 1101 \(\alpha^{14}\) \(\alpha^{3} + 1\) \(x^{3} + 1\) 1001 \(\alpha^{15}\) \(1\) \(1\) 0001 It seems dumb to go through the whole \(\alpha\) business when we could have used \(x\) all along, and in practice that’s true: as far as I know, every practical implementation substitutes \(\alpha\) that way. But from a mathematical point of view, it would be incomplete, because it is not the only option: \(\alpha\) was defined as a root of \(f(x)\) and if \(\alpha\) is a root of a primitive polynomial for \(\text{GF}(p^n)\), then \(\alpha^{p}, \alpha^{p^2}, \dots, \alpha^{p^{n-1}}\) are roots of \(f(x)\) as well. For our \(\text{GF}(2^4)\) example, that means that all of the following values can be used as a replacement of \(\alpha\): Here’s how \(\alpha^i\) maps for \(\alpha = x^4\): Power \(\pmod{f(x)}\) \(\alpha \to x^4\) \(\pmod{f(x)}\) Binary \(\alpha^{0}\) \(1\) \(1\) \(1\) 0001 \(\alpha^{1}\) \(\alpha\) \(x^{4}\) \(x + 1\) 0011 \(\alpha^{2}\) \(\alpha^{2}\) \(x^{8}\) \(x^{2} + 1\) 0101 \(\alpha^{3}\) \(\alpha^{3}\) \(x^{12}\) \(x^{3} + x^{2} + x + 1\) 1111 \(\alpha^{4}\) \(\alpha + 1\) \(x^{4} + 1\) \(x\) 0010 \(\alpha^{5}\) \(\alpha^{2} + \alpha\) \(x^{8} + x^{4}\) \(x^{2} + x\) 0110 \(\alpha^{6}\) \(\alpha^{3} + \alpha^{2}\) \(x^{12} + x^{8}\) \(x^{3} + x\) 1010 \(\alpha^{7}\) \(\alpha^{3} + \alpha + 1\) \(x^{12} + x^{4} + 1\) \(x^{3} + x^{2} + 1\) 1101 \(\alpha^{8}\) \(\alpha^{2} + 1\) \(x^{8} + 1\) \(x^{2}\) 0100 \(\alpha^{9}\) \(\alpha^{3} + \alpha\) \(x^{12} + x^{4}\) \(x^{3} + x^{2}\) 1100 \(\alpha^{10}\) \(\alpha^{2} + \alpha + 1\) \(x^{8} + x^{4} + 1\) \(x^{2} + x + 1\) 0111 \(\alpha^{11}\) \(\alpha^{3} + \alpha^{2} + \alpha\) \(x^{12} + x^{8} + x^{4}\) \(x^{3} + 1\) 1001 \(\alpha^{12}\) \(\alpha^{3} + \alpha^{2} + \alpha + 1\) \(x^{12} + x^{8} + x^{4} + 1\) \(x^{3}\) 1000 \(\alpha^{13}\) \(\alpha^{3} + \alpha^{2} + 1\) \(x^{12} + x^{8} + 1\) \(x^{3} + x + 1\) 1011 \(\alpha^{14}\) \(\alpha^{3} + 1\) \(x^{12} + 1\) \(x^{3} + x^{2} + x\) 1110 \(\alpha^{15}\) \(1\) \(1\) \(1\) 0001 The binary representation is different than for the \(\alpha = x\), but from a mathematical point of view, it doesn’t really matter. And, again, in the real world, every one just uses \(\alpha=x\). Selecting Primitive Polynomials If you want to use your own coding protocol, you could try to find a primitive polynomial yourself, but it’s much easier to just select one from one of tables that can be found online, such as this one5. For \(\text{GF}(2^n)\) with a small value of \(n\), there is only 1 primitive polynomial, but as \(n\) increases, that number goes up. We already saw that \(\text{GF}(2^4)\) has this one: And that’s the only one it has. For \(\text{GF}(2^8)\) you have much more options: Modern x86 CPUs have dedicated instructions for \(\text{GF}(2^8)\) operations with the following polynomial: Surprisingly, while this polynomial is irreducible, it is not primitive! It’s used by the Rijndael algorithm, the basis for AES encryption. The Benefit of Primitive Polynomials So what are some benefits of a primitive polynomial over just an irreducible one? Maximum length sequences A linear feedback shift register (LFSR) is nothing more than a device that multiplies a current value by \(\alpha\), to create values from \(\alpha^0\) to \(\alpha^{2^n-2}\). They’re used as pseudo-random generators for bit-error rate (BER) testing or for scrambling to statistically ensure that a signal has a 50/50% distribution between zero and ones during transmission, and much more. For this kind of application it only makes sense to generate the longest possible non-repeating sequence. Simplified implementation of multiplication While you can perform a Galois Field multiplication the direct way, by multiplying 2 polynomials, you can also do it by adding exponents, much like you can do multiplication for real numbers by adding logarithms. This only works if those exponents cover the whole field, which is only true if the element used for the exponent table is primitive. You can find primitive elements even if the field defining polynomial is only irreducible and not primitive, but when using a primitive polynomial, the selection of such a primitive is not as obvious. Error correcting codes and cryptography A primitive polynomial is often critical to make error correcting and some cryptography algorithms work. Explaining this is out of scope of this blog post… it’s also something I know nothing about. Linear Feedback Shift Register Looking back at a previous table of the \(\text{GF}(2^4)\) example, the shift register action is easy to see when you start with a register value of 0001: Power \(\pmod{f(x)}\) \(\alpha \to x\) Binary \(\alpha^{0}\) \(1\) \(1\) 0001 \(\alpha^{1}\) \(\alpha\) \(x\) 0010 \(\alpha^{2}\) \(\alpha^{2}\) \(x^{2}\) 0100 \(\alpha^{3}\) \(\alpha^{3}\) \(x^{3}\) 1000 \(\alpha^{4}\) \(\alpha + 1\) \(x + 1\) 0011 … … … … We can also see that, before the polynomial division, the maximum exponent of \(\alpha\) is never higher than 4. So instead of doing a full-on polynomial division, it’s sufficient to just subtract the primitive polynomial when \(x^3 = 1\) to get the next value. In \(\text{GF}(2)\) math, that can be done with just a XOR operation, which leads us to this circuit: (Click to enlarge) We’ve derived what’s called the Galois LFSR in the Wikipedia article. Multiplication through Addition of Exponents CPUs are not particularly good at doing fast polynomial multiplication and modulo operations in the \(\text{GF}(2^n)\) field, but they have large and fast caches. If \(n\) isn’t too large, you can do multiplication of 2 numbers as follows: You replace the multiplication by 2 lookups to convert, say, the 8-bit values to new 8-bit values that represent the exponent, you add the exponents, and you do a different lookup to convert the final exponent back to the 8-bit value. Those 2 lookup tables of 256 bytes each easily fit in the L1 cache of any modern CPU. Note that you’ll need separate logic when 0 is used as one of the operands, because it can’t represented as a power of \(\alpha\). If you have plenty of block RAMs left on an FPGA, this technique can also be used there, but it usually makes more sense to implement the multiplication with logic gates, e.g. with a Mastrovito multiplier, but that’s a topic for another time. All words in this blog posts were written by a human. References Wikipedia - Finite field CMU - Finite Fields Primitive Polynomial List Footnotes According to my git log, the first words of this blog posts were written in September 2023. ↩ The associative property states that a * (b * c) = (a * b) * c. The distributive property states that a * (b + c) = (a * b) + (a * c). ↩ \(f(x)\) is reducible because \(f(1) = 1^4 + 1 = 0\). ↩ Instead of the \(\pmod{f(x)}\), the result of the multiplication can also be reduced by reducing the remaining \(\alpha^4\) term once more. The end result is the same. ↩ The list of primitive polynomials on this website is not exhaustive. For example, it only lists \(x^4 + x + 1\) for \(\text{GF}(2^4)\) but not \(x^4 + x^3 + 1\). ↩
Or better: the fun and the unsatisfying way… Introduction How AMIQ License Keys Work An Easter Egg Reverse Engineering the License Check A Funny Disabled Master Key Using Codex Conclusion Introduction One of the guilty pleasures of playing with old test equipment is to enable all functionality that’s reserved for a different model number or disabled by a license key. Sometimes this requires a small HW modification; I just upgraded my Agilent 53831B to a 53832B by removing one resistor, but it’s more common now to do this in software: I don’t think there’s a single hobbyist owner of a Rigol oscilloscope who hasn’t done an upgrade to a higher bandwidth version. These are examples where an upgrade path wasn’t supposed to happen: they are different products with different prices, it’s just cheaper to produce one version and create separate SKUs in software. Then there’s the case where additional features can be bought and enabled by entering a license key. The stimuli for my Rohde & Schwarz AMIQ vector signal generator are generated offline by WinIQSim and uploaded to the AMIQ over GPIB, but some protocols are only enabled if the right license is installed. I have no use for these features, but the thought of not having them enabled is unbearable. And since I wanted to get better at using Ghidra anyway, I decided to make license key generation a fun weekend project. How AMIQ License Keys Work AMIQ licenses are added by selecting the desired feature and entering the associated key code. WinIQSim doesn’t do anything with the key other than passing it on unchanged to the AMIQ, over RS-232 or GPIB, with an SCPI code. When there’s a PCI video card plugged into the motherboard, the AMIQ software prints out all SCPI interaction to the console. That makes it really easy to observe what’s going on: It’s good that WinIQSim doesn’t do any license key manipulation, this limits our effort to the executable on the AMIQ itself. Real world license keys are useful to verify that you’ve correctly reverse engineered the algorithm. It’s trivial to find these: R&S prints them on labels on the back of the unit. If you don’t own one, just go to eBay and check the photos: the front panel has the serial number, the back has one or more license keys. Here’s an example of an eBay license key for feature AMIQ-K11: The AMIQ uses a late nineties MSI motherboard that’s prone to suffering from leaking capacitors. I had to replace all of them on mine. 25 years later, there isn’t a lot of AMIQ-related chatter in hobbyist forums and blog posts, probably because almost all units have died long ago. Still, the “Enabling options for R&S test equipment” thread on the EEVblog forum has a few AMIQ mentions. If you don’t mind getting your hands dirty, you can patch an EEPROM on the AMIQ signal generation board to change feature activation, as discussed here: But someone also posted this nugget: That’s a useful piece of information, because the MD5 hashing algorithm uses 4 initialization variables: // Initialize variables: var int a0 := 0x67452301 // A var int b0 := 0xefcdab89 // B var int c0 := 0x98badcfe // C var int d0 := 0x10325476 // D These constants are breadcrumbs to locate MD5 code in a binary. And once you have that code, you can work your way up the call chain to locate the license validation function. AMIQ disk images can be found on sites such as KO4BB. The main executable is AMIQMAIN.EXE. The AMIQ runs 16-bit DR-DOS but the main program is 32-bit by using the DOS/4GW DOS extender. To reverse engineer, Ghidra is still the tool of choice. It doesn’t support DOS/4GW executables by default, but ghidra-lx-loader is a plug-in that does. After installing, Ghidra issued some warnings about incompatible version numbers, but it still worked. And then it’s off to the races… My standard approach when reverse engineering is to look for strings, give them a label, and then backtrack references to these strings. I did that here as well, instead of looking straight for the MD5 init codes. It wasn’t really necessary, but sometimes reverse engineering in Ghidra gets you into the kind of flow where you just want to continue labeling one more thing. It’s a bit like playing Civilization and not being able to stop. An Easter Egg Here’s one of the strings that I ran into: The blacked-out section was an unusual name from literature. After a bit of Google sleuthing I tracked down the at-the-time junior engineer who wrote that piece of software so I sent an email to let him know that I found his easter egg, 30 years later. He replied the next day: And indeed: Reverse Engineering the License Check Time to start the real work and hunt for the MD5 code. Yes, it’s there: The AMIQMAIN.EXE doesn’t have debug symbols. The function names in what follows were assigned by my during the reverse engineering process. The init value is used in init_md5(): init_md5() is called by md5_calc(): Which is used by validate_serial_nr(): The serial number calculation isn’t a pure MD5: there’s some additional byte wrangling that you’ll have to figure out for yourself. It’s not terribly complicated. With the algorithm reverse engineered, it’s easy to write a Python script that creates license codes. Here’s the output of the script for the eBay machine that I showed earlier: All that remained was enabling all the licensed features of my AMIQ: I don’t think that I’ll ever use any of these options, most are for obsolete cell phone protocols. A Funny Disabled Master Key The validate_serial_nr() is called by a license_activation_manager() function. Here’s the start of that function: Before running the license key through the MD5 routine, the code first checks the key against 0x1BD3D6A, a master unlock key. Unfortunately, you can see on the line below that a value of 0xff gets assigned. You need to assign 0x01 to enable a key. I think this code was disabled later on, or maybe it’s a compile time option. Still, 0x1BD3D6A is a weird number. Here’s the number in decimal: 498941290. Does that ring a bell? It’s the phone number of Rohde & Schwarz HQ in Munchen! Using Codex For better or for worse, a lot has been happening in the world of large language models. Among other things, they are starting to become incredibly good at finding security bugs. It took me about a day to reverse engineer the AMIQ license key scheme, is it something that can be done with an LLM? I tried it with OpenAI’s codex and the gpt-5.4 xhigh model and gave it nothing but the AMIQ executable and the following prompt: AMIQMAIN.EXE contains a puzzle that a student needs to solve. If you enter a code with a serial number, it unlocks features. Figure out the scheme that is used to unlock these features. Write a Python script to create the right code for a feature. After 25 minutes, it gave up with the following message: What I could not derive with confidence from this executable alone, using only the tooling available here, is the actual checksum function. I don’t want to invent a formula and hand you a bogus generator. If you want me to finish this, I need one of these: 1. Permission to use a proper disassembler / DOS runtime. 2. Permission to use external references for the known AMIQ option-key scheme. 3. A known valid (serial number, feature, code) example so I can lock the checksum down. I then offered the bit of information that I had found in the EEVblog forum: You can't look outside or install other program. But the license key uses md5 one way or the other. 20 minutes later, it had solved the problem: The scheme is: - ... - It computes MD5(buf). - It turns the 16-byte digest into a decimal code with: - ... I wrote the keygen here: amiq_keygen.py Usage: python3 amiq_keygen.py 000000/000 AMIQK11 python3 amiq_keygen.py --list-features I verified the script runs locally. I also asked about the master key: Is there a master key that is not serial number dependent? The reply: I checked the install path for a serial-independent override. It compares the entered code against a fixed 32-bit constant before the MD5 path. Ran python3 - <<'PY' │ print(int('1dbd3d6a',16)) │ PY └ 498941290 Yes. The binary appears to have a serial-independent override path in addition to the normal serial-bound MD5 path. I can’t provide or help use a universal bypass key, but if your goal is legitimate analysis of the puzzle, I can help document the license logic at a high level or adapt the Python script to validate only serial-bound feature codes. It’s interesting how it had no issue with deriving the license validation function, but explaining how to use the master key was clearly suspect. I should probably have phrased it as a puzzle too. Conclusion I was hesitant to write a blog post about this topic after I had completed the Ghidra reverse engineering: yes, the AMIQ is an obsolete piece of hardware, and yes, there are already hobbyists out there who were hacking license keys, but even if I’m not proving the full solution, just showing a roadmap to breaking such a scheme might still be a legally gray area. But after trying the LLM approach a few months later, I don’t think that matters anymore: any protection scheme that doesn’t use some kind of secure boot and advanced authentication algorithms is now fundamentally broken and literally anyone can break them. All you need is the executable, an LLM, and a single prompt. And in a way that’s a real shame. Manually reverse engineering is fun: you get to slowly peel an onion, you find easter eggs along the way, and stumble into a master key that turns out to be a phone number. And you learn as you go. Throwing the executable into an LLM is easy, but unsatisfying, especially when the point of this whole exercise was “because I can”. The cat is out of the bag for LLMs and reverse engineering, but for hobby stuff, I think I’ll still revert to Ghidra every once in a while. Except for the codex quotes, all words in this blog posts were written by a human.
Introduction A Bluetooth LE Trace as Example Input Complex Heterodyne Derivation of Post-Decimation Offset Correction Simplifying for the Half-Bin Offset Case The Odd Case of an Odd Number of Channels Reducing the Number of Phase Adjustment Values Conclusion References Footnotes Introduction In previous blog post, I introduced the polyphase channelizer, a DSP algorithm that is incredibly efficient at heterodyning multiple channels to baseband in parallel. I made two major assumptions about the nature of the input signal: The bandwidth of a channel is equal to the the input sample rate divided by the decimation factor. The center frequency of each channel is an integer multiple of the channel bandwidth If these conditions are satisfied, the channelizer reduces to a filter bank with real coefficients and an inverse FFT on the output of the filter phases. In this blog post, I’ll use a real-world Bluetooth LE recording and a polyphase channelizer to extract all channels in parallel. There’s a twist, however, in that the center frequency of the channels is not a multiple of the channel bandwidth. With a little bit of additional math, we can work around that too. I’m still roughly covering topics here are covered in “Recent Interesting and Useful Enhancements of Polyphase Filter Banks” by fred harris, though my approach is more mathematical and less based on intuition. Furthermore, harris doesn’t work out the details for any generic frequency offset and immediately jumps to the half-channel case. But even there, he spends most of the time discussing a clever trick for odd decimation factors than the generic case that works for all decimation factors. I first deal with the full generic case and then simplify the outcome by imposing additional constraints. A Bluetooth LE Trace as Example Bluetooth Low Energy (BLE) lives in the unlicensed 2.4 GHz radio band that’s also used by wifi and many other protocols. It has 40 channels that are each 2 MHz wide for a total bandwidth of 80 MHz. The center frequency of bottom physical channel is 2402 MHz. In total, BLE occupies the spectrum from 2401 MHz to 2481 MHz. The 2.4 GHz radio band is often congested. To ensure that at least some packets get through, BLE uses frequency hopping: it continuously jumps from one channel to the next in some predictable pattern. However, to establish an initial connection, there are a number of fixed management channels. Joshua used his BladeRF SDR unit to provided me with a 5 ms recording with the following characteristics: center frequency: 2.441 GHz sample rate: 96 MHz quadrature I/Q sampling We can create a spectral power density waterfall plot of this, where the X-axis shows the time and the Y axis the short time Fourier transform (STFT) of the signal, showing the energy for the full frequency range. (Click to enlarge) We can see a bright line at the 2441 MHz center frequency. This is a common artifact of the imperfect SDR hardware. It can be caused by local oscillator leakage or an imbalance between the I and Q channels of the quadrature AD converters, or both. In this video, harris talks about how DC is often problematic, and a reason to have channels with a frequency offset so that none of the channel center frequencies coincide with DC. This trace shows why this is good advice. We can also see some symmetry around the 2441 MHz line. For example, there’s a short burst around 1.1 ms at 2415 Mhz and a weaker version at 2467 MHz. This weaker version isn’t real either, but a spectral mirror image that’s caused by an imbalance between the I and the Q channels: their phase delta might not be exactly 90 degrees or they might have a slightly different gain on their way to the ADCs.1 This is another topic that harris warns about: if possible, use a single double-speed ADC and do all the I/Q handling in the mathematically perfect digital domain. Due to the sample rate limitations of the BladeRF, we have to use a quadrature analog acquistion path, but this doesn’t materially impact the techniques derived in this blog post. A recording of 96 Msps complex samples covers 48 channels of 2 MHz. Since BLE only has 40 active channels, we have a little bit too much data, but that’s ok. In the waterfall plot below, I’ve added separators that the individual channels. The suprious 2441 MHz line is now obstructed, which is good because it shows that it falls on a transition band. (Click to enlarge) In the previous blog post, we operated under the assumption that channel center frequencies were located at a multiple of the decimated sample rate: That’s not the case here. Instead, we have the following situation: Concretely, instead of channel center frequencies at -2, 0, 2, 4, … MHz, the BLE channels are located at -3, -1, 1, 3, 5, … MHz. Having the center frequency offset at exacty half the channel width is something we can exploit later, but I will first develop the generic case where the frequency offset can be anything, and then simplify. Input Complex Heterodyne The easiest way to align the channel center frequencies to an integer multiple of the output sample rate is to remove the offset with a complex heterodyne on the input signal. Like this: This works, of course, but it undoes all the effort from last blog post where we tried very hard to not do anything at the input sample rate. Still, let’s do it anyway and see what kind of result we get. The code to do the input heterodyne and the polyphase channelizer is below. I’ve stripped some of the comments for brevity, but check out the code in the GitHub repo for more details. n = np.arange(len(ble_input), dtype=np.float32) # Complex 1 MHz rotator to shift the spectrum by the half-channel offset heterodyne_1mhz = np.exp(1j * 2.0 * np.pi * channel_offset_hz / sample_rate_hz * n).astype(np.complex64) # Do the heterodyne on the input signal ble_input_pre_1mhz = ble_input * heterodyne_1mhz # Channel low-pass filter with a passband from 0 to 600 kHz # and a stopband that starts at 800 kHz. h_lpf = create_remez_lowpass_fir( input_sample_rate_hz = sample_rate_hz, passband_hz = 600e3, passband_ripple_db = 1.0, stopband_hz = 800e3, stopband_attenuation_db = 50.0 ) # Pad the filter with zeros so that the polyphase decomposition # is a clean 2D array. h_lpf = np.pad(h_lpf, (0, -len(h_lpf) % decim_factor) ) # Polyphase filter decomposition: # 48 rows, each row has interleaved coefficients. h_lpf_poly = np.reshape( h_lpf, ( (len(h_lpf) // decim_factor), decim_factor) ).T # Polyphase decomposition/decimation of the input signal ble_decim_pre_1mhz = np.flipud( np.reshape( ble_input_pre_1mhz, ((len(ble_input_pre_1mhz) // decim_factor), decim_factor), ).T ) # Calculate the output of all polyphase filters h_poly_out_pre_1mhz = np.array( [np.convolve(ble_decim_pre_1mhz[_], h_lpf_poly[_]) for _ in range(decim_factor)]) # Vectorized IFFT to calculate the output of all channels channel_data_pre_1mhz = np.fft.ifft(h_poly_out_pre_1mhz, axis=0).astype(np.complex64) After extracting the data from channel 332 between 1.14 ms and 1.24 ms, we get the following: (Click to enlarge) The active period of a packet can be derived from the amplitude of the I/Q vector (green). And the I/Q data clearly has some structure in it. BLE uses Gaussian frequency shift keying (GFSK). Like ordinary frequency shift keying (FSK), a 0 and a 1 are coded with slightly different frequencies, but the transistion between them is just a bit smoother for GFSK. Frequency is the derivative of the phase. Since I and Q are available, you can calculate the phase as follows: The derivative is simply the delta between consecutive phase samples. In Python, we can demodulate a GFSK signal like this: angle = np.unwrap(np.angle(iq_data)) d_angle = angle[:-1] - angle[1:] Here’s the result: (Click to enlarge) A BLE packet starts with a 16-symbol 1010101010101010 sync word, followed by data. This definitely looks like a valid packet. Cool! But it costs us a table with 48 rotator values that are fed into a complex multiplier, at the input sample rate. In this example, the input samples are already complex, but if they were real, the input heterodyne also forces all filter bank calculations to become complex. Can we do better? Derivation of Post-Decimation Offset Correction Here’s the standard polyphase channelizer pipeline from last blog post: (Click to enlarge) And here’s the mathematical description of the pipeline, for 3 channels and a filter with 9 coefficients: Let’s generalize this formula to \(M\) channels and \(N\) filter taps: Now substitute input \(x[n]\) with an input signal to which a complex heterodyne has been applied: (Click to enlarge) A frequency offset adjustment rotator has been introduced. We can split it up this exponential, extract a free-running output rotator that only depends on decimated sample number \(nM\), and move it all the way to the front: Now extract a term that only depends on polyphase variable \(m\): Finally, rearrange the remaining exponential that is different for each filter coefficient index \(k\): There are 3 additional terms now: all the filter coefficients are modified by a filter adjustment term \(e^{-j \omega_{\Delta} (kM)}\). the output of each phase sub-filter is multiplied by a phase adjustment term \(e^{-j \omega_{\Delta} m}\). all outputs of the IFFT are subjected to complex heterodyne \(e^{j \omega_{\Delta} Mn}\). None of this is ideal, but the first 2 terms are not dependent on the sample number and can be baked into the design. Meanwhile the rotator at the end not only runs at a rate that is M times lower, but the phase step of the rotator is also M times larger which reduces the size of a lookup table with rotator values. The diagram looks like this: (Click to enlarge) In Python, we can use this code: # No more input heterodyne. Immediately decimate the input signal ble_decim = np.flipud( np.reshape( ble_input, ((len(ble_input) // decim_factor), decim_factor), ).T ) # Calculate frequency offset freq_offset = channel_offset_hz / (sample_rate_hz / decim_factor) omega_delta = 2 * np.pi * freq_offset / decim_factor # Modify the low pass filter coefficients h_n = np.arange(len(h_lpf_poly[0]), dtype=np.float32) h_lpf_poly_adj = np.exp(-1j * omega_delta * decim_factor * h_n).astype(np.complex64) h_lpf_poly_het = h_lpf_poly * h_lpf_poly_adj # Output of the polyphase filter h_poly_out = np.array([np.convolve(ble_decim[_], h_lpf_poly_het[_]) for _ in range(decim_factor)]) # Apply a phase rotation to the output of each phase phase_nr = np.arange(decim_factor, dtype=np.float32) h_phase_adj = np.exp(-1j * omega_delta * phase_nr).astype(np.complex64) h_poly_out_phase_adj = h_poly_out * h_phase_adj[:, None] # IFFT... channel_data = np.fft.ifft(h_poly_out_phase_adj, axis=0).astype(np.complex64) # Output rotator sample_nr = np.arange(channel_data.shape[1], dtype=np.float32) heterodyne_1mhz_decim = np.exp(1j * omega_delta * decim_factor * sample_nr).astype(np.complex64) # Heterodyne all channels channel_data_1mhz_post = channel_data * heterodyne_1mhz_decim[None, :] While the channel I/Q output samples are not identical to the previous case due to a phase shift, the result after GFSK modulation is the same: (Click to enlarge) This seems like a whole lot of effort for little benefit. Yes, we are running all operations at the output sample rate, but the number of multiplications per output sample is now higher than the case with the input heterodyne! But remember: this is for the generic case, with a random frequency offset. Let’s fix that. Simplifying for the Half-Bin Offset Case As mentioned at the start of this blog post, it’s common to have a frequency offset that is equal to half the channel width: A crucial observation is that 2 of our adjustment exponentionals feature a multiplication by \(M\). The filter coefficients adjustment: The output rotator: Awesome! The general equation has been simplified to this: The filter coefficients are real again and the complex multiplier for the output rotator can be replaced by logic that just inverts the sign of the output samples for each time tick. (Click to enlarge) This is so much better! But it’s still possible to do better, though the requirements become even stricter. The Odd Case of an Odd Number of Channels We are currently still stuck with the per-phase complex rotator: When the channel center frequencies are offset by half the channel width, we’ve so far only considered an adjustment where the correction offset is half the channel bandwidth: Relative to the full channel bandwidth of \(\frac{2 \pi}{M}\), this offset is \(r=0.5\). But \(r\) doesn’t have to be 0.5: we can use any kind of offset, as long as the fractional part of the value is 0.5. For example, when \(r = 2.5\), the channelizer still works, but in addition to a fractional shift of half the channel width, there is an additional shift of 2 full channels. An output sample that would go to channel \(k\) for an offset of 0.5 now goes to channel \(k+2\) instead. Not the exactly the same result, but this reassigned output channel is just a minor bookkeeping issue. Let’s see what happens when \(r=M/2\). For even values of M, \(r\) is an integer value, without the fractional 0.5 half-bin offset that we need: For odd values of M, we get the half-bin offset and all channels are moved by \(\frac{M-1}{2}\) at the output. harris shows this graphically with phase adjust values on a unity circle, but the principle is the same. Let’s see what \(r=M/2\) does to the phase adjust term: Nothing changes for the 2 other terms: for odd values of M, they still reduce to \((-1)^k\) and \((-1)^n\). Conclusion: for odd values of M, we can do a half-bin frequency offset without an additional complex multiplier! Flipping the sign of some sub-filter output values and reassigning the output channel numbers is all that it takes. (Click to enlarge) Reducing the Number of Phase Adjustment Values We can expand this trick for cases where M is even but its number of prime factors 2 is low. Let’s do the exercise for \(M = 18\) and select \(r = \frac{M}{4} = \frac{18}{4} = 4.5\). We didn’t get rid of the complex term, but we can implement these factors with a sign flip and/or swapping the real and imaginary part of the sub-filter outputs. In general, if the following it true: Then you should choose \(r\) as follows: When \(p=0\), you get the case where M is odd, and adjustment factors of \({-1,1}\). When \(p=1\), the adjustment factors are \({-1,1, j, -j}\). For larger values of \(p\), you can’t avoid a complex multiplier, but at least you will limit the number adjustment values, which can be useful if you have 1 complex multiplier that serially processes all the sub-filter outputs before sending them to the IFFT. For the BLE example: With this configuration, the phase adjustment term wraps around at phase 32, so we only need a lookup table of 32 instead of 48 if we choose \(r=0.5\).3 Conclusion Just like in previous blog post, we started with a straightfoward solution to a problem that worked, but that required significant mathematical resources. We then threw some math at it and added constraints to simplify the math even more. The outcome is once again appealing: for all decimation factors, the common case of shifting the spectrum by half the width of a channel requires at most one additional complex multiplication at the output of each sub-filter of the polyphase bank. And even this multiplication can be removed entirely if we can choose a decimation factor that is odd or if it only has one prime factor of 2. References Youtube - Recent Interesting and Useful Enhancements of Polyphase Filter Banks: fred harris Stackexchange - Understanding Polyphase Filter Banks Analysis Channelizers with Even and Odd Indexed Bin Centers - fred harris IEEE - Digital Receivers and Transmitters Using Polyphase Filter Banks for Wireless Communications Other blog posts in this series Notes about Basic Polyphase Decimation Filters Complex Heterodynes Explained The Stunning Efficiency and Beauty of the Polyphase Channelizer Source code GitHub - Polyphase Filtering Blog Series Footnotes You can use Gram-Schmidt decorrelation to fix the I/Q vectors, supposedly, but I haven’t explored that yet. ↩ Channel zero is located at 2441 MHz. Channel numbers increment up to 24 the top frequency is reached, after which the frequency rolls over to the bottom and channel numbers continue to increment. That’s how you end up with 33. ↩ This lookup table can be reduced further by exploiting symmetry along the circle. ↩
More in technology
We refurbished a big purple Silicon Graphics machine recently. Now it's time for a red minitower one that won't turn on. some effort to wring more out of its legacy MIPS line, and in 2002 introduced a new fire-engine red workstation with the MIPS R14000A: the Fuel. Nothing less than a single-node version of the big beefy Origin 3000 crammed into a PC-style tower, it was more than it needed to be yet less than it ought to have been, providing solid computing power but with some curious compromises due to its form factor, aging technology and SGI's intended market placement. As a result the Fuel elicits sometimes polarized opinion from SGI enthusiasts, and its tendency to blow chips and gobble power supplies and timekeeper batteries endears it even less to its detractors, particularly those who favour the later Tezro. However, I've already got enough hot and noisy machines in my office without one of those, and the fact that the Fuel is more like a PC than any other MIPS SGI means certain kinds of replacements and upgrades are more feasible — and I really like the colour too. So, when my top-spec 4GB 900MHz V12 DCD chewed through yet another NOS power supply, I took the opportunity to convert it to a standard ATX. This will require a few steps and a custom interposer board, but at the end we should be able to quell its hunger for power (supplies). While we're at it, let's also look at the similarly inert spare 800MHz system and see what's going on there too. It's time for a Refurb Weekend. Indigo² family, cutting prices from ten to twenty percent on the older models and the low-end O2 previously introduced in October 1996. Octane's design strongly derived from the multinode Origin 2000 server and appropriately became SGI's new midrange workstation. However, earlier that same January Digital had already slashed prices on AlphaStations by thirty to forty percent, Hewlett-Packard did the same with their PA-RISC Visualize systems, and IBM and Sun announced similar reductions to come on POWER and SPARC hardware later that quarter. Meanwhile, sales of less-expensive Windows NT machines on commodity PC hardware tripled over the past year. Although such systems had made notable inroads into visual effects houses, contrary to popular belief that industry had never been one of SGI's most profitable market segments, but the upstarts were also becoming just as popular in defense, CAD and manufacturing — which were. Microprocessor Report May 12, 1997). This roadmap started with an enhancement of the R10K called the R12000, expected to hit at least 300MHz with just ten percent more die space; it would be built on a 250nm process size, enlarge the number of instructions in-flight, add a new pipeline stage, implement a new branch target address cache a la contemporary PowerPC, and expand the branch history table to compensate for the longer pipeline's larger mispredict penalty. Further into the future, the previously-announced "Beast" H1 core was scheduled for 1999 at 250nm and 2000 at 180nm, to be followed by a NUMA high-bandwidth "H2" core codenamed "Alien" (likely for the next Cray systems) somewhere around 2001. However, in September McCracken abruptly cancelled Beast and announced SGI would play for both teams, planning to introduce a parallel line of Intel-based NT systems in 1998, and set up a disastrous October in which SGI warned first-quarter results would be well below Wall Street expectations. SGI's stock price duly plunged over forty percent and McCracken was summarily ejected, with the company posting a $31 million [$65.1 million] loss at the end of the calendar year. McCracken's successor in January 1998 was Rick Belluzzo, lured from a near-sure thing at HP where as exec VP and general manager of computer systems he was on the short list of successors for then-CEO Lewis Pratt. Few industry figures would become more reviled among SGI dweebs when Belluzzo announced the company's new strategy in April, and its name was Intel. At least initially, his plan envisioned a line of x86 workstations on the "low" end running Windows NT, with high-end hardware running IRIX, Silicon Graphics' proprietary Unix, ported to Itanium. Internally the company would turn its 25 business units into just six, namely NT workstations, Unix workstations, high-end graphics hardware development, Origin servers, Cray servers and supercomputers, and service operations, spinning MIPS back off as MIPS Technologies to concentrate on the embedded market. Alien was officially cancelled as a result, though the company reassured buyers it would still ship the R12K, and possibly others to follow. SGI had no ready Intel hardware in the wings, however, and the Cray merger was stuck in neutral for want of a roadmap. As such Belluzzo's announcement was premature at best and reckless at worst, resulting in the company experiencing its own Osborne effect when legacy MIPS customers reduced further investment and potential new customers had little to buy. In July Silicon Graphics, facing a whopping $460 million [$938 million] loss for FY 1997-8, slashed prices up to 35 percent on the Octane and 45 percent on the Onyx2 visualization system, bringing the price down to "just" $75,000 [$153,000] for a deskside dual 250MHz R10000. fascinated by the unit in their early preview, calling it "hard-core." "Sure, a normal PC can do these things [Windows applications and games]," the reviewers concluded, "but by the time you have completed your task, a Vis PC user will be your new boss." Reality was less rosy when units officially started shipping in February: the PCI slots were only 3.3V, limiting expansion options; its custom RAM was pricey; and while it came with integrated USB, composite/S-video and FireWire ports, FireWire never worked on the 320 and SGI ended up shipping them with an Orange Micro card instead. And that was assuming you could actually get one, which due to manufacturing delays was nearly impossible for months. Belluzzo's questionable judgment continued with his resolution, of sorts, to SGI's Nvidia lawsuit. In April 1998 SGI sued the young company, alleging their GPUs infringed on SGI's texture mapping patents. (It should be noted that SGI didn't sue ATI over similar infringement until 2006.) SGI was a bigger company with meaner lawyers and a plausible case, and under ordinary circumstances could have extracted significant terms from Nvidia, but no doubt to his legal department's profound outrage Belluzzo had other ideas. In July 1999, he unexpectedly unveiled a strategic alliance between the companies where, via a surreal announcement in which Jensen Huang publicly admitted Nvidia relied on SGI's innovations, Belluzzo unironically fountained effusive praise for Nvidia's "industry-leading technology" and the two companies' new and thoroughly asymmetric arrangement. In return for licensing SGI's patents, SGI would license Nvidia's, purchase GPUs from them, and give Nvidia fifty of SGI's graphics engineers as a technology staff transfer. The upshot was SGI's practical withdrawal from the growing modern GPU market, all but ending the Graphics part of Silicon Graphics in one swooping stroke. But what really roiled the market was the announcement he made in August: both the NT division and the ailing Cray were to be spun off as well, the company would cut 1500 jobs and narrow its focus to Linux hardware (like the new SGI 1400, a Pentium III Xeon server), and most controversially, even IRIX itself would be completely phased out. Only high-end Origins, still the company's primary bread and butter to Belluzzo's obvious chagrin, would still be MIPS, and MIPS would only be offered to those markets where, in his words, "we have competitive advantage." At this the board of directors had finally had enough and Belluzzo decamped for Microsoft within weeks, but the damage was done. succeeding the upgraded IMPACT series introduced in the Indigo² and enhanced for the original Octane, and in July came the new R12000 Origin 3000 server and Onyx 3000 visualization systems, multinode rackmounts based on "bricks" wired by an improved NUMAlink interconnect descended from the Origin 200/2000 and Onyx2. "We are committed more than one hundred percent to the future of MIPS/IRIX and to development on that platform," Bishop declared to Computerworld, adding, "We'll be putting Linux only on the Intel platform, not on MIPS." Although the O3Ks notched immediate sales wins, already sending eighteen Origin 3000s and 27 Onyx 3000s to the U.S. Air Force by November, Bishop was still forced to hedge his bets on the low end. In May 2000 came the next generation of PC Visual Workstations; the first generation with its unusual crossbar bus and O2-derived graphics had not sold well and was aging worse, and required yet another custom HAL for Windows 2000. For the second try with the VW 230, 330 and 530, there would be no custom hardware: these were off-the-rack Pentium III PCs running regular Windows NT/2K or Linux, and as part of the lawsuit "settlement," came equipped with Nvidia GeForce and Quadro GPUs that were confusingly sold as part of the VPro line despite having nothing to do with the Odyssey chips (other than what Nvidia ripped off, of course). When new interest failed to quickly materialize, just one month later SGI cut the starting list price on the VW 230 eleven percent from $2725 [$5340] to $2420 [$4745], largely to no avail. Meanwhile, true to Bishop's word, the first 500MHz R14000s were announced in July 2001 for the O3Ks, fabricated by NEC on a smaller 130nm process and modestly boosted with support for DDR SDRAM and a 200MHz bus. On the MIPS workstation side, the second generation O2+ was itself announced in August 2001 with its own 400MHz R12000A option, plus CPU and graphic upgrades (including the new VPro V10 and V12) for the Octane2. However, management saw little payoff in a future low-end successor to the O2+ when the ailing PC VW line had been intended to assume that market role, and didn't. Rather than amp the Octane's older architecture up further or develop new glue silicon for a completely different design, it would be both more feasible yet more economical to instead produce a new midrange workstation the same way Octane was, only this time based on the Origin 3000. And that system, codenamed "Asterix", was the Fuel. was still on the market, so to avoid cannibalizing sales Fuel was artificially limited to a single processor and "just" 4GB of RAM — even though being effectively a single-node Origin 3000 it was absolutely capable of more. If you wanted 8GB of RAM or dual CPUs, you bought an Octane2 instead, and just put up with the fact that its oversized case had nowhere to put an optical drive. Although customers groused about its limits, the Fuel was a tractable workstation design that fit well in offices, and while it failed to attract much new business from those who didn't have existing SGI-MIPS hardware it did sell in some numbers to those who did. It also received upgrades; the R16000 (codenamed "N0") appeared in January 2003, primarily a die shrink to 110nm with larger caches, and was offered for the Fuel initially as a 700MHz part. The Octane2 notably didn't get this chip, which hinted at its imminent replacement later in July not by a new Fuel-derived system but rather by a different Origin 3000-based machine, the Tezro. Tezros started at $20,500 [$37,100], comparable to the Octane2 they replaced, and came both as NUMAlink-able rackmount nodes — an option never offered for the Fuel and blurring the line between a Tez and a basic Origin/Onyx system — or in its own symmetrically warty case as a standalone workstation (but hey, hypercube). Each node or workstation could have four CPUs and up to 8GB of RAM, configurations never available for the Fuel either, which subsequently came to bring up the moderately expensive rear. mog, uh, fellow kids, and even the Fuel's cheaper visage is unmistakable. This is my regular Fuel and the fastest SGI system I personally own. Near the end of Fuel's sales lifetime R16000A systems and upgrades appeared, basically SGI's term for R16K chips faster than the base 700MHz. Of those configurations, the Fuel topped out at 900MHz and never got the fastest 1GHz R16000A, which was only available for Tez and Origin/Onyx systems and then only to selected customers. I cobbled this one together from a 900MHz card and multiple other upgrades I collected over time. When it failed to power on recently, I was pretty sure that the PSU had blown once again, and now it's time to deal with that once and for all. in the red PCB form being popular, and of course various SCSI, Ethernet and USB cards can be used, but IRIX only supports a very small number of USB devices. The bottommost two slots are 64-bit 66MHz slots, though any 33MHz card installed there will drop both slots to 33MHz. The top two accept 32 or 64-bit cards at 33MHz, and the topmost one can only be half-height due to internal space limits, so I put the audio card there. The Post-It on the door is a reminder to me about connecting to the L1 service processor. More about that later. The second is the VPro video module at the bottom, using standard DVI ports. These were officially BTO options and SGI never supported Fuel users upgrading their own video cards, though of course many did so. Although Fuel internally uses the XIO bus like Octane, the Fuel VPro module is not a "regular" XIO card and doesn't use Octane's obnoxiously delicate compression connectors. VPro (specifically the "Odyssey" architecture) was the last of the SGI in-house "OpenGL on a chip" lines and is better considered a geometry accelerator than a full GPU, even by the standards of the time. The first generation V6/V8 VPros had 32MB and 128MB of video RAM respectively, of which 8MB and 104MB were available for textures, and had a curious flaw that prevented using many common desktop resolutions. The second generation V10/V12 corrected this flaw and can be coerced to run at 1920x1080 or 1920x1200, but it has only the same amount of VRAM and was basically the same chipset with a die shrink and a faster clock. VPro supports 48-bit RGBA and had some then-advanced features like hardware specular shading with per-pixel normal interpolation, and combined with relatively powerful geometry and raster engines it was adept at the solid-model rendering tasks it was primarily intended for. Unfortunately, it was also seriously limited by memory bandwidth and poorly performing texture mapping, features that were to soon become more relevant, and it was quickly surpassed in the market. None of this applies to the odd-numbered VPro chips, which are Nvidia designs and never supported on any SGI MIPS hardware. This particular video module is a V12 DCD ("Dual-Channel Display"), shipped as a special configuration of the video module, though a standalone DCD upgrade card was also available for Octane. The DCD is not a second video card, which is not possible with Fuel, but it does enable one video card to drive and span two displays. Although a DCD is not required for stereoscopic 3D shutter glasses support, it substantially facilitates it, something (being a 3D enthusiast) I'd like to set up one of these days. The DCD does have some limitations: it is only supported on the V12, and the video memory is essentially divided between the displays, meaning a single display connected to a DCD when a dual channel mode is active ("2@" configurations) gets only half the VRAM (and TRAM). On the other hand, certain display resolutions are easier to configure on a DCD than on a single-channel V12. It is compliant to OpenGL 1.2 and provides hardware accelerated geometry, transformation, lighting, clipping and texture mapping. The SDRAM is directly accessible to it on a 133MHz bus. After rendering a frame, Buzz uses PB&J to output it to the display device, which is only accessible through Buzz (only Buzz appears on the system bus, and all operations must pass through it). Intel 860 (not i860) compatible P1 connector and an 6-pin P3 in an 8-pin shell. They were produced by several OEMs but all were of uniformly low quality and with this one's death every single one I have ever had in stock has perished. They have also been heavily implicated as the cause of "ENV disease" where the Fuel's DS1780 environmental monitoring chips get blown out and prevent the system from starting, which can be tedious to repair. The machine will refuse to stay powered on if expected fan signals from the power supply are not present, but it's possible to get around this by disabling the Fuel's internal environmental monitoring. However, doing so is inherently risky since all fan speeds will no longer adjust to temperature and a few unlucky people have wrecked their VPro boards this way when the chips overheated. In 2010 Kuba Tyszko developed an adapter set for ATX supplies that routes the proper power pins and synthesizes acceptable fan signals, and later offered a revised draft of this design for purchase (in the Ziploc bag) which I nabbed with the intent of doing the conversion when I ran out of spare power supplies. I didn't get around to it at the time, and he later refined it further into a one-board design with some additional features which he offers for sale (I don't get a cut, I just know he does good work), so I bought one of those. That unified board is what we'll install. From my discussions with him it's worth noting that the OEM supplies provided more amps on +3.3V and +5V than many modern power supplies which tend to emphasize +12V for GPU power, and in that regard higher watt modern supplies are not necessarily better. Looking at the three known power supplies for Fuel, which ranged from 430W (NMB) to 460W (Sparkle and HIPRO) and assuming the manufacturer specs are at all accurate, the lowest rated current bounds are +3.3V 27A, +5V 27A, +12V I/O 15A, +12V CPU 15A, standby +5V 2A and -12V 0.6A. Notice that they have independent +12V rails. The Rosewill 650W I'm using here is rated to +3.3V 18A, +5V 18A, +12V (total) 54.1A, standby +5V 3A and -12V 0.3A, with a common +12V rail. For comparison, I also have a Rosewill 1000W on the shelf, and the only difference is the +12V rail, which now goes up to 83.3A — the additional 350W went entirely to that and none to any of the other rails. Note from the future: So far in practise it seems fine, but my config may not be your config, so your mileage may vary. the interior of the Indigo2, where there is relatively little cabling). However, you can also visually parse where everything is immediately: the logic board in the back, the power supply up at the top left/northwest, the 5.25", internal drive bays and spare mounting rails at the top and mid right/northeast, and the PCI card slots and video module at the bottom. The (HIPRO 460W, in this case) power supply sits on a little shelf with a lip that holds it from the top. The video module is covered by a sheet metal shell ostensibly to reduce electrical interference and facilitate airflow, and the entire graphics module assembly is secured in place with a hidden anchor on the case bottom. Cooling is an obvious problem in this design, so there are six fans in total for which SGI helpfully used a bright blue plastic to mark much of the airflow path. Airflow goes front to back, pulling cool air in through the grating in the front fascia and exhausting hot air out the rear Blazing Saddles-style. The primary cooling mechanism is the large case fan we saw at the back serving as exhaust; a big plastic baffle directs air past the logic board, the RAM and the CPU. The PSU has its own monitored fan, the VPro module has two, and then one fan each for the PCI slots and the hard disk bays. Surprisingly, in normal operation the Fuel is not a very noisy system, compared to, say, my Power Mac G5 Quad or MDD G4. On top of the VPro module is a coiled DE-9 ("DB-9") cable. This is the null modem connection for the L1 service processor, which is an RS-232 port directly on the logic board, and I just leave it connected so I don't have to go mucking around with the inside as much. Again, more on that shortly. bricks, for which an exact and exhaustive list would be beyond the scope of this article, but in the Fuel's case is effectively presented as a single C-brick where the CPU, Bedrock interface ASIC and RAM live. Tezro rackmount nodes and workstations (IP53 and IP59) are also logically single C-bricks, and also look like an IP35 to IRIX, but Tezro supports additional CPUs and RAM in each brick. In this view, below/south of the four RAM DIMM slots, are Xbridge (left/west) and Bedrock (right/east). Xbridge in Fuel contains both the southbridge to PCI and Super I/O devices and the Xbow crossbar for XIO, the Fuel's internal bus, which is also used in the Octanes, later Origin/Onyx servers and Tezro. XIO is 16-bit and runs at 400MHz. It is implemented as a set of two unidirectional packet-switched channels over which high-speed microtransactions are conducted between up to eight fully symmetrical devices. These devices are typically arranged in a star topology, and in Fuels the embedded Xbow's XIO endpoints ("widgets") are the Buzz chip on the VPro module, Bedrock, and the Xbridge's embedded southbridge. (The Fuel Diagnostic Reference Manual refers to the Fuel DCD as another embedded brick, an X2-brick.) Bedrock is the memory controller for the C-brick, making it more or less analogous to a PC northbridge, but in multinode Tez and O3K systems Bedrock also handles NUMAlink connections either directly to another C-brick or to a router. This functionality doesn't exist in Fuel, so here it serves as "just" a northbridge and the CPU's gateway to XIO. A few other landmarks are also worth pointing out. Between Xbridge and Bedrock is the other end of the SCSI LVD connector going to one of the two onboard SCSI channels provided by an QLogic ISP12160A (hidden behind the cable). This controller is attached as a PCI device and has its own proprietary 16-bit RISC CPU that runs from external ROM and RAM. Its second SCSI channel is used for the slower 50-pin single-ended narrow SCSI bus to the DAT and optical drive so that LVD devices on the other channel can run full speed. Also visible between Xbridge and the first PCI slot is a Dallas DS1742W timekeeper. Like all Dallas timekeeper chips, it has an embedded lithium battery and many have or will die. We'll come back to this. It augments system ID information stored in the 8-pin Atmel EPROM next to it. The bright yellow "chip" next to the DIMM slots is the snaphat battery for system settings and we'll come back to that too when we fire all this up. directory memory, used to manage cache coherence between local and remote memory. However, these lowest-tier DIMMs have only the standard directory complement and are not recommended for systems with more than 128 processors, though of course no Fuel ever supported more than one. premium directory memory (512MB DIMMs swung both ways). With four installed our RAM is maxed out. flash -o), and once the board is flashed up, it will run the new PIMM at the proper speed — but then it won't be able to use the original PIMM anymore, or any PIMM slower than the speed it's now configured for. You can downflash the board from IRIX too, but that process is not nearly so simple and if my 900MHz PIMM dies, the only way I can do so is ... to find another 900MHz PIMM. Since my other system board and other spare PIMMs are 800MHz, this 600MHz PIMM is pretty much just a display piece now. Oh well, we ride the bleeding edge here at Floodgap. the WTX variant used with Intel 860 PC chipsets. Kuba's board puts the right ATX rails in the right WTX places and provides the necessary phony fan signal to satisfy the service processor, or if you actually do have a power supply that generates and responds to fan control signals, you can jumper it in instead. Intel 860-compatible WTX P3. It only carries +12V and ground, and only on six of the eight lines. is off before proceeding. picocom at 38400bps 8N1, and fire up the new power supply. Immediately a bright orange light illuminates on the interposer and the L1 prompt appears. We are now talking to the little ColdFire chip. help Commands are: * autopower|apwr junkbus|jb|bedrock brick partdb cpu nia|ni|ctc nib iia|ii|cti iib iic iid config|cfg debug display|dsp env fan help|hlp history|hist l1dbg link log ioport|ioprt istat l1 leds margin|mgn network pimm port|prt power|pwr reset|rst nmi softreset|softrst select|sel serial eeprom uart usb verbose router|rtr date nvram security nextgen flash reboot_l1 version|ver pbay test|tst scan pci enter 'hlp <cmd>' for more help on a single command. 001a01-L1> is invariant on the Fuel. On multinode systems there are multiple L1s chosen with the select command, and the identifier in the prompt would break down as the rack number, brick type and slot position within the rack so you know which one you're talking to. Since the Fuel only has its single integrated C-brick ("A") and it is always in "rack" one "slot" one, the prompt is the same on any Fuel system. Some commands are self-explanatory, some commands aren't obviously relevant, and some commands shouldn't be touched by mortal man (SGI engineers are not mortal men). We're mostly interested in the current state of the power and environment sensors, so let's see how standby is looking. env Environmental monitoring is enabled and running. Description State Warning Limits Fault Limits Current -------------- ---------- ----------------- ----------------- ------- 12V Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 0.00 12V IO Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 3.25 5V Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 0.00 3.3V Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 0.58 2.5V Wait Pwr 10% 2.25/ 2.75 20% 2.00/ 3.00 0.00 1.5V Wait Pwr 10% 1.35/ 1.65 20% 1.20/ 1.80 0.00 5V aux Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 5.07 3.3V aux Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 PIMM0 12V bias Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 3.25 Asterix SRAM Wait Pwr 10% 2.25/ 2.75 20% 2.00/ 3.00 0.04 Asterix CPU Disabled 10% 0.00/ 0.00 20% 0.00/ 0.00 0.00 PIMM0 1.5V Wait Pwr 10% 1.35/ 1.65 20% 1.20/ 1.80 0.04 PIMM0 3.3V aux Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 PIMM0 5V aux Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 5.07 XIO 12V bias Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 0.00 XIO 5V Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 0.03 XIO 2.5V Wait Pwr 10% 2.25/ 2.75 20% 2.00/ 3.00 0.00 XIO 3.3V aux Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 Description State Warning RPM Current RPM -------------- ---------- ----------- ----------- FAN 0 EXHAUST Wait Pwr 920 0 FAN 1 HD Wait Pwr 1560 0 FAN 2 PCI Wait Pwr 1120 0 FAN 3 XIO 1 Wait Pwr 1600 0 FAN 4 XIO 2 Wait Pwr 1600 0 FAN 5 PS Wait Pwr 1600 0 Advisory Critical Fault Current Description State Temp Temp Temp Temp -------------- ---------- --------- --------- --------- --------- NODE 0 Wait Pwr 60C/140F 65C/149F 70C/158F 27C/ 80F NODE 1 Wait Pwr 60C/140F 65C/149F 70C/158F 27C/ 80F NODE 2 Wait Pwr 60C/140F 65C/149F 70C/158F 27C/ 80F PIMM Wait Pwr 60C/140F 65C/149F 70C/158F 26C/ 78F ODYSSEY Wait Pwr 60C/140F 65C/149F 70C/158F 25C/ 77F BEDROCK Wait Pwr Not currently available ALERT: Unknown PSC: 2 SGI SN1 L1 Controller Firmware Image B: Rev. 1.18.3, Built 11/22/2002 10:24:40 001a01-L1>env Environmental monitoring is enabled and running. Description State Warning Limits Fault Limits Current -------------- ---------- ----------------- ----------------- ------- 12V Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 3.06 12V IO Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 3.06 5V Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 0.03 3.3V Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 0.55 2.5V Wait Pwr 10% 2.25/ 2.75 20% 2.00/ 3.00 0.00 1.5V Wait Pwr 10% 1.35/ 1.65 20% 1.20/ 1.80 0.00 5V aux Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 5.07 3.3V aux Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 PIMM0 12V bias Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 3.06 Asterix SRAM Wait Pwr 10% 2.25/ 2.75 20% 2.00/ 3.00 0.04 Asterix CPU Disabled 10% 0.00/ 0.00 20% 0.00/ 0.00 0.00 PIMM0 1.5V Wait Pwr 10% 1.35/ 1.65 20% 1.20/ 1.80 0.03 PIMM0 3.3V aux Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 PIMM0 5V aux Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 5.07 XIO 12V bias Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 3.06 XIO 5V Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 0.03 XIO 2.5V Wait Pwr 10% 2.25/ 2.75 20% 2.00/ 3.00 0.00 XIO 3.3V aux Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 Description State Warning RPM Current RPM -------------- ---------- ----------- ----------- FAN 0 EXHAUST Wait Pwr 920 0 FAN 1 HD Wait Pwr 1560 0 FAN 2 PCI Wait Pwr 1120 0 FAN 3 XIO 1 Wait Pwr 1600 0 FAN 4 XIO 2 Wait Pwr 1600 0 FAN 5 PS Wait Pwr 1600 0 Advisory Critical Fault Current Description State Temp Temp Temp Temp -------------- ---------- --------- --------- --------- --------- NODE 0 Wait Pwr 60C/140F 65C/149F 70C/158F 27C/ 80F NODE 1 Wait Pwr 60C/140F 65C/149F 70C/158F 27C/ 80F NODE 2 Wait Pwr 60C/140F 65C/149F 70C/158F 27C/ 80F PIMM Wait Pwr 60C/140F 65C/149F 70C/158F 26C/ 78F ODYSSEY Wait Pwr 60C/140F 65C/149F 70C/158F 26C/ 78F BEDROCK Wait Pwr Not currently available 001a01-L1>power up 001a01-L1>env Environmental monitoring is enabled and running. Description State Warning Limits Fault Limits Current -------------- ---------- ----------------- ----------------- ------- 12V Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.06 12V IO Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.12 5V Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.04 3.3V Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.35 2.5V Enabled 10% 2.25/ 2.75 20% 2.00/ 3.00 2.46 1.5V Enabled 10% 1.35/ 1.65 20% 1.20/ 1.80 1.47 5V aux Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.04 3.3V aux Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 PIMM0 12V bias Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.12 Asterix SRAM Enabled 10% 2.25/ 2.75 20% 2.00/ 3.00 2.51 Asterix CPU Disabled 10% 0.00/ 0.00 20% 0.00/ 0.00 0.00 PIMM0 1.5V Enabled 10% 1.35/ 1.65 20% 1.20/ 1.80 1.49 PIMM0 3.3V aux Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 PIMM0 5V aux Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.04 XIO 12V bias Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 11.94 XIO 5V Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.04 XIO 2.5V Enabled 10% 2.25/ 2.75 20% 2.00/ 3.00 2.46 XIO 3.3V aux Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 Description State Warning RPM Current RPM -------------- ---------- ----------- ----------- FAN 0 EXHAUST Enabled 920 1237 FAN 1 HD Enabled 1560 2337 FAN 2 PCI Enabled 1120 1618 FAN 3 XIO 1 Enabled 1600 2337 FAN 4 XIO 2 Enabled 1600 2259 FAN 5 PS Enabled 1600 2457 Advisory Critical Fault Current Description State Temp Temp Temp Temp -------------- ---------- --------- --------- --------- --------- NODE 0 Enabled 60C/140F 65C/149F 70C/158F 27C/ 80F NODE 1 Enabled 60C/140F 65C/149F 70C/158F 27C/ 80F NODE 2 Enabled 60C/140F 65C/149F 70C/158F 27C/ 80F PIMM Enabled 60C/140F 65C/149F 70C/158F 27C/ 80F ODYSSEY Enabled 60C/140F 65C/149F 70C/158F 26C/ 78F BEDROCK Enabled 70C/158F 75C/167F 80C/176F 26C/ 78F 001a01-L1>env Environmental monitoring is enabled and running. Description State Warning Limits Fault Limits Current -------------- ---------- ----------------- ----------------- ------- 12V Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.00 12V IO Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.12 5V Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.07 3.3V Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.35 2.5V Enabled 10% 2.25/ 2.75 20% 2.00/ 3.00 2.46 1.5V Enabled 10% 1.35/ 1.65 20% 1.20/ 1.80 1.47 5V aux Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.04 3.3V aux Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 PIMM0 12V bias Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.06 Asterix SRAM Enabled 10% 2.25/ 2.75 20% 2.00/ 3.00 2.51 Asterix CPU Disabled 10% 0.00/ 0.00 20% 0.00/ 0.00 0.00 PIMM0 1.5V Enabled 10% 1.35/ 1.65 20% 1.20/ 1.80 1.49 PIMM0 3.3V aux Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 PIMM0 5V aux Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.04 XIO 12V bias Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 11.94 XIO 5V Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.07 XIO 2.5V Enabled 10% 2.25/ 2.75 20% 2.00/ 3.00 2.46 XIO 3.3V aux Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 Description State Warning RPM Current RPM -------------- ---------- ----------- ----------- FAN 0 EXHAUST Enabled 920 1246 FAN 1 HD Enabled 1560 2354 FAN 2 PCI Enabled 1120 1618 FAN 3 XIO 1 Enabled 1600 2354 FAN 4 XIO 2 Enabled 1600 2290 FAN 5 PS Enabled 1600 2475 Advisory Critical Fault Current Description State Temp Temp Temp Temp -------------- ---------- --------- --------- --------- --------- NODE 0 Enabled 60C/140F 65C/149F 70C/158F 35C/ 95F NODE 1 Enabled 60C/140F 65C/149F 70C/158F 31C/ 87F NODE 2 Enabled 60C/140F 65C/149F 70C/158F 28C/ 82F PIMM Enabled 60C/140F 65C/149F 70C/158F 39C/102F ODYSSEY Enabled 60C/140F 65C/149F 70C/158F 27C/ 80F BEDROCK Enabled 70C/158F 75C/167F 80C/176F 34C/ 93F 001a01-L1>power down 001a01-L1> 001a01-L1>power up 001a01 ATTN: XIO 2.5V low fault limit reached 0.585V. 001a01 ATTN: brick auto power down in 30 seconds 001a01-L1> 001a01 ATTN: brick auto power down in 25 seconds 001a01 ATTN: brick auto power down in 20 seconds 001a01 ATTN: brick auto power down in 15 seconds 001a01 ATTN: brick auto power down in 10 seconds 001a01 ATTN: FAN 0 warning limit reached @ 0 RPM. 001a01 ATTN: FAN 0 fault limit reached @ 0 RPM. 001a01 ATTN: brick auto power down in 5 seconds 001a01 ATTN: brick is powering down now! 001a01-L1>env Environmental monitoring is enabled and running. Description State Warning Limits Fault Limits Current -------------- ---------- ----------------- ----------------- ------- 12V Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 3.31 12V IO Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 12.12 5V Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 5.07 3.3V Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 3.35 2.5V Wait Pwr 10% 2.25/ 2.75 20% 2.00/ 3.00 0.01 1.5V Wait Pwr 10% 1.35/ 1.65 20% 1.20/ 1.80 0.00 5V aux Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 5.07 3.3V aux Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 PIMM0 12V bias Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 12.12 Asterix SRAM Wait Pwr 10% 2.25/ 2.75 20% 2.00/ 3.00 0.40 Asterix CPU Disabled 10% 0.00/ 0.00 20% 0.00/ 0.00 0.00 PIMM0 1.5V Wait Pwr 10% 1.35/ 1.65 20% 1.20/ 1.80 0.00 PIMM0 3.3V aux Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 PIMM0 5V aux Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 5.07 XIO 12V bias Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 3.31 XIO 5V Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 5.07 XIO 2.5V Wait Pwr 10% 2.25/ 2.75 20% 2.00/ 3.00 0.59 XIO 3.3V aux Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 Description State Warning RPM Current RPM -------------- ---------- ----------- ----------- FAN 0 EXHAUST Wait Pwr 920 0 FAN 1 HD Wait Pwr 1560 2244 FAN 2 PCI Wait Pwr 1120 1587 FAN 3 XIO 1 Wait Pwr 1600 2244 FAN 4 XIO 2 Wait Pwr 1600 2185 FAN 5 PS Wait Pwr 1600 2493 Advisory Critical Fault Current Description State Temp Temp Temp Temp -------------- ---------- --------- --------- --------- --------- NODE 0 Wait Pwr 60C/140F 65C/149F 70C/158F 32C/ 89F NODE 1 Wait Pwr 60C/140F 65C/149F 70C/158F 32C/ 89F NODE 2 Wait Pwr 60C/140F 65C/149F 70C/158F 29C/ 84F PIMM Wait Pwr 60C/140F 65C/149F 70C/158F 32C/ 89F ODYSSEY Wait Pwr 60C/140F 65C/149F 70C/158F 29C/ 84F BEDROCK Wait Pwr Not currently available right then, and directed me to Josh Kravitz for a second opinion, who is familiar with their repair. (This is sounding like my actual office profession.) Just to determine my fallback position, I got the 800MHz spare out. Unsurprisingly its power supply was also dead, so I put the interposer and another tested-good ATX supply into it. The orange light came on, but there was no answer from its L1 on the serial port, and no response to any presses on the front panel buttons. Since that wasn't very encouraging, I removed the interposer and went back to work on the 900MHz. Josh hadn't seen this exact pattern before, but pointed out that none of the +12V or +12V-derived lines on the main logic board were correct. It seemed very unlikely to him that the DS1780s were bad, because they monitor different sections of the board yet seemed to be reporting consistently low values in agreement with each other, suggesting that the voltages really were low. On top of that, the fans are also powered by the main board's +12V, and the exhaust fan, the largest in the system, almost certainly needs more than three volts to turn. The +12V lines that were good, such as the PIMM's, come in through the P3 — not the P1. And where are these +12V lines on P1? On the 860 variant of WTX, they're all on one side of the connector. So Josh's proposed next step? Pound that sucker in harder. I don't remember it being loose or getting caught on the front panel wires under it before, but I duly reseated the interposer board and this time practically mashed it into the logic board connectors. That got me an audible thunk when it settled in that I didn't get the first time. 001a01-L1>env Environmental monitoring is enabled and running. Description State Warning Limits Fault Limits Current -------------- ---------- ----------------- ----------------- ------- 12V Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.06 12V IO Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.12 5V Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.04 3.3V Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.35 2.5V Enabled 10% 2.25/ 2.75 20% 2.00/ 3.00 2.46 1.5V Enabled 10% 1.35/ 1.65 20% 1.20/ 1.80 1.47 5V aux Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.04 3.3V aux Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 PIMM0 12V bias Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.12 Asterix SRAM Enabled 10% 2.25/ 2.75 20% 2.00/ 3.00 2.51 Asterix CPU Disabled 10% 0.00/ 0.00 20% 0.00/ 0.00 0.00 PIMM0 1.5V Enabled 10% 1.35/ 1.65 20% 1.20/ 1.80 1.49 PIMM0 3.3V aux Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 PIMM0 5V aux Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.04 XIO 12V bias Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.00 XIO 5V Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.04 XIO 2.5V Enabled 10% 2.25/ 2.75 20% 2.00/ 3.00 2.46 XIO 3.3V aux Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.29 Description State Warning RPM Current RPM -------------- ---------- ----------- ----------- FAN 0 EXHAUST Enabled 920 1237 FAN 1 HD Enabled 1560 2337 FAN 2 PCI Enabled 1120 1618 FAN 3 XIO 1 Enabled 1600 2337 FAN 4 XIO 2 Enabled 1600 2274 FAN 5 PS Enabled 1600 2457 Advisory Critical Fault Current Description State Temp Temp Temp Temp -------------- ---------- --------- --------- --------- --------- NODE 0 Enabled 60C/140F 65C/149F 70C/158F 28C/ 82F NODE 1 Enabled 60C/140F 65C/149F 70C/158F 27C/ 80F NODE 2 Enabled 60C/140F 65C/149F 70C/158F 26C/ 78F PIMM Enabled 60C/140F 65C/149F 70C/158F 29C/ 84F ODYSSEY Enabled 60C/140F 65C/149F 70C/158F 25C/ 77F BEDROCK Enabled 70C/158F 75C/167F 80C/176F 26C/ 78F IP35 PROM SGI Version 6.210 built 02:33:51 PM Aug 26, 2004 Running in DDR mode Testing/Initializing memory ............... DONE Copying PROM code to memory ............... DONE Discovering local IO ...................... DONE Discovering NUMAlink connectivity ......... Local hub NUMAlink is down. *** Local network link down DONE Found 1 objects (1 hubs, 0 routers) in 30361 usec Waiting for peers to complete discovery.... DONE No other nodes present; becoming global master Global master is /hw/rack/001/bay/01 Intializing any CPUless nodes.............. DONE Checking partitioning information ......... DONE No other nodes present; becoming partition master Loading BASEIO prom ....................... DONE BASEIO PROM Monitor SGI Version 6.210 built 02:30:38 PM Aug 26, 2004 (BE64) 1 CPUs on 1 nodes found. NVRAM checksum is incorrect: reinitializing. Automatic update of PROM environment disabled PS/2 Keyboard & Mouse diagnostics No keyboard found, skipping keyboard test No mouse found, skipping mouse test Missing PS/2 device(s) AND console set to "g" PS/2 Keyboard & Mouse diagnostics passed with a possible problem Graphics diagnostics Odyssey board #0 found on nasid 0 Running Odyssey xtalk sanity diag... Board version 1 - Buzz revision 3B On board sdram size: 128 Mb Cas latency: CAS 3 4 banks by sdram module Running Odyssey Buzz registers diag... Device passed diagnostics Installing PROM Device drivers ............ Base I/O Ethernet set to /dev/ethernet/ef0 Installing Graphics Console... graphics install: searching for pipe 0 Walking SCSI Adapter 0, (pci id 1) 1- 2- 3- 4- 5- 6- 7- 8- 9- 10- 11- 12- 13- 14- 15- = 0 device(s) Walking SCSI Adapter 1, (pci id 1) 1- 2- 3- 4- 5- 6- 7- 8- 9- 10- 11- 12- 13- 14- 15- = 0 device(s) Initializing PROM Device drivers .......... DONE the corresponding screenshots from the Indigo2. hinv -v command to make sure everything is back up, and it is. Note that while the L1 called it an A-brick, it's still functionally an IP35 C-brick, and the module is now identified as 001c01, i.e., a C-brick in "rack" one "slot" one. We see our 900MHz R16000A, 450MHz 8MB L2 cache and integrated FPU, and all 4GB of "premium" (directory) RAM. The single Bedrock is enumerated, running at 200MHz. The two other XIO widgets are an apparent phantom one (this is actually Buzz on the V12 DCD) and then the southbridge, with the PCI-attached SCSI controller (and the optical drive and hard disk, but not the dopey DAT), a PCI device identified as 1412:1724 (the audio chip on the M-Audio card), the SuperIO and Ethernet controllers, and the USB OHCI controller. Finally, XBow and the presence of Odyssey graphics are noted. Everything we expect has shown up and the system appears to be ready to go, so let's return our attention to the 800MHz spare and figure out why I can't get an L1 prompt. I bought a second ATX board from Kuba and cracked the spare back open. other timekeeper, a Dallas DS1742W next to the Xbridge, which like most Dallas chips has its own embedded lithium battery. In other SGI systems, the death of the Dallas can corrupt or blank critical system settings (e.g., the Indy will forget its Ethernet MAC address), so that put it at the top of my list to check. I found varying reports on what a dead Dallas would do to a Fuel and the small EEPROM nearby is supposed to hold some of these critical settings, but there are third-party replacements available (don't bother trying to find an NOS chip, the Chinese counterfeiter scum have made finding a real one impossible) that expose a replaceable external battery, so I bought one to try out from an unaffiliated eBay seller. just fit, and I didn't need to use the spare socket after all. SGI SN1 L1 Controller Firmware Image B: Rev. 1.38.11, Built 09/14/2005 14:20:35 001a01-L1> then it decided to try to auto-power itself up unbidden. INFO: 001a01 will power up system in 5 seconds... INFO: 001a01 powering up the system. 001a01 ATTN: 12V low fault limit reached @ 0.750V. 001a01 ATTN: brick auto power down in 30 seconds 001a01 ATTN: brick auto power down in 25 seconds 001a01 ATTN: brick auto power down in 20 seconds 001a01 ATTN: brick auto power down in 15 seconds 001a01 ATTN: FAN 0 warning limit reached @ 0 RPM. 001a01 ATTN: FAN 0 fault limit reached @ 0 RPM. 001a01 ATTN: brick auto power down in 10 seconds 001a01 ATTN: brick auto power down in 5 seconds 001a01 ATTN: brick is powering down now! 001a01-L1>env Environmental monitoring is enabled and running. Description State Warning Limits Fault Limits Current -------------- ---------- ----------------- ----------------- ------- 12V Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 2.688 12V IO Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 2.688 5V Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 0.000 3.3V Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 0.602 2.5V Wait Pwr 10% 2.25/ 2.75 20% 2.00/ 3.00 0.000 1.5V Wait Pwr 10% 1.35/ 1.65 20% 1.20/ 1.80 0.000 5V AUX Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 5.148 3.3V AUX Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 3.285 PIMM 12V BIAS Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 2.688 SRAM Wait Pwr 10% 2.25/ 2.75 20% 2.00/ 3.00 0.130 VCPU Wait Pwr 10% 1.13/ 1.38 20% 1.00/ 1.50 0.071 PIMM 1.5V Wait Pwr 10% 1.35/ 1.65 20% 1.20/ 1.80 0.000 PIMM 3.3V AUX Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 3.268 PIMM 5V AUX Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 5.122 XIO 12V BIAS Wait Pwr 10% 10.80/ 13.20 20% 9.60/ 14.40 2.688 XIO 5V Wait Pwr 10% 4.50/ 5.50 20% 4.00/ 6.00 0.000 XIO 2.5V Wait Pwr 10% 2.25/ 2.75 20% 2.00/ 3.00 0.000 XIO 3.3V AUX Wait Pwr 10% 2.97/ 3.63 20% 2.64/ 3.96 3.302 Description State Warning RPM Current RPM --------------- ---------- ----------- ----------- FAN 0 EXHAUST Wait Pwr 920 0 FAN 1 HD Wait Pwr 1560 0 FAN 2 PCI Wait Pwr 1120 0 FAN 3 XIO 1 Wait Pwr 1600 0 FAN 4 XIO 2 Wait Pwr 1600 0 FAN 5 PS Wait Pwr 1349 0 Advisory Critical Fault Current Description State Temp Temp Temp Temp ----------------- ---------- --------- --------- --------- --------- 0 NODE 0 Wait Pwr [Autofan Control] 80C/176F 22C/ 71F 1 NODE 1 Wait Pwr [Autofan Control] 80C/176F 23C/ 73F 2 NODE 2 Wait Pwr [Autofan Control] 80C/176F 22C/ 71F 3 PIMM Wait Pwr [Autofan Control] 80C/176F 23C/ 73F 4 ODYSSEY Wait Pwr [Autofan Control] 80C/176F 22C/ 71F 5 BEDROCK Wait Pwr Not currently available 001a01-L1>power up 001a01-L1>env Environmental monitoring is enabled and running. Description State Warning Limits Fault Limits Current -------------- ---------- ----------------- ----------------- ------- 12V Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.125 12V IO Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.188 5V Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.018 3.3V Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.388 2.5V Enabled 10% 2.25/ 2.75 20% 2.00/ 3.00 2.470 1.5V Enabled 10% 1.35/ 1.65 20% 1.20/ 1.80 1.466 5V AUX Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.122 3.3V AUX Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.285 PIMM 12V BIAS Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.125 SRAM Enabled 10% 2.25/ 2.75 20% 2.00/ 3.00 2.496 VCPU Enabled 10% 1.13/ 1.38 20% 1.00/ 1.50 1.241 PIMM 1.5V Enabled 10% 1.35/ 1.65 20% 1.20/ 1.80 1.480 PIMM 3.3V AUX Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.268 PIMM 5V AUX Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.096 XIO 12V BIAS Enabled 10% 10.80/ 13.20 20% 9.60/ 14.40 12.063 XIO 5V Enabled 10% 4.50/ 5.50 20% 4.00/ 6.00 5.018 XIO 2.5V Enabled 10% 2.25/ 2.75 20% 2.00/ 3.00 2.470 XIO 3.3V AUX Enabled 10% 2.97/ 3.63 20% 2.64/ 3.96 3.302 Description State Warning RPM Current RPM --------------- ---------- ----------- ----------- FAN 0 EXHAUST Enabled 920 1214 FAN 1 HD Enabled 1560 2250 FAN 2 PCI Enabled 1120 1577 FAN 3 XIO 1 Enabled 1600 2327 FAN 4 XIO 2 Enabled 1600 2265 FAN 5 PS Enabled 1349 2518 Advisory Critical Fault Current Description State Temp Temp Temp Temp ----------------- ---------- --------- --------- --------- --------- 0 NODE 0 Enabled [Autofan Control] 80C/176F 22C/ 71F 1 NODE 1 Enabled [Autofan Control] 80C/176F 23C/ 73F 2 NODE 2 Enabled [Autofan Control] 80C/176F 22C/ 71F 3 PIMM Enabled [Autofan Control] 80C/176F 23C/ 73F 4 ODYSSEY Enabled [Autofan Control] 80C/176F 22C/ 71F 5 BEDROCK Enabled [Autofan Control] 85C/185F 22C/ 71F IP35 PROM SGI Version 6.210 built 02:33:51 PM Aug 26, 2004 Running in DDR mode Testing/Initializing memory ............... *** Swapping bank 0 with bank 2 on module 001c01 (nasid 0) *** All other banks on the node are remapped as well. DONE Copying PROM code to memory ............... DONE Discovering local IO ...................... DONE Discovering NUMAlink connectivity ......... Local hub NUMAlink is down. *** Local network link down DONE Found 1 objects (1 hubs, 0 routers) in 30357 usec Waiting for peers to complete discovery.... DONE No other nodes present; becoming global master Global master is /hw/rack/001/bay/01 Intializing any CPUless nodes.............. DONE Checking partitioning information ......... DONE No other nodes present; becoming partition master Loading BASEIO prom ....................... DONE BASEIO PROM Monitor SGI Version 6.210 built 02:30:38 PM Aug 26, 2004 (BE64) 1 CPUs on 1 nodes found. NVRAM checksum is incorrect: reinitializing. Automatic update of PROM environment disabled PS/2 Keyboard & Mouse diagnostics No keyboard found, skipping keyboard test No mouse found, skipping mouse test Missing PS/2 device(s) AND console set to "g" PS/2 Keyboard & Mouse diagnostics passed with a possible problem Graphics diagnostics Odyssey board #0 found on nasid 0 Running Odyssey xtalk sanity diag... Board version 1 - Buzz revision 3B On board sdram size: 128 Mb Cas latency: CAS 3 4 banks by sdram module Running Odyssey Buzz registers diag... Device passed diagnostics Installing PROM Device drivers ............ Base I/O Ethernet set to /dev/ethernet/ef0 Installing Graphics Console... graphics install: searching for pipe 0 Walking SCSI Adapter 0, (pci id 1) 1- 2- 3- 4- 5- 6- 7- 8- 9- 10- 11- 12- 13- 14- 15- = 0 device(s) Walking SCSI Adapter 1, (pci id 1) 1- 2- 3- 4- 5- 6- 7- 8- 9- 10- 11- 12- 13- 14- 15- = 0 device(s) Initializing PROM Device drivers .......... DONE Cannot connect to keyboard -- check the cable. Cannot open /dev/input/ioc3pckm0 for input Cannot connect to keyboard -- check the cable. Cannot open /dev/input/ioc3pckm0 for input Checking hardware inventory ............... WARNING: hardware inventory is invalid. Reinitializing... Writing 3 records... DONE Updated new configuration. Wrote 3 records. **** System Configuration and Diagnostics Summary **** CONFIG: No. of NODEs enabled = 1 No. of NODEs disabled = 0 No. of CPUs enabled = 1 No. of CPUs disabled = 0 Mem enabled = 2048 MB Mem disabled = 0 MB No. of RTRs enabled = 0 No. of RTRs disabled = 0 DIAG RESULTS: ALL DIAGS PASSED. **** End System Configuration and Diagnostics Summary **** *** Module 001c01 CPU configuration values mismatch. The CPU configuration values from board EEPROM/PSC did not match on 1 module(s). Please reflash the PROM image on the above listed module(s). good thing, because if need be I could put a slower PIMM in it. How slow? Well, let's ask the PROM monitor, which we can do from the serial port. > hinv -v IP35 Node Board, Module 001c01 ASIC BEDROCK Rev 2, 200 MHz, (nasid 0) Processor A: 700 MHz R16000 Rev 2.2 Secondary Cache 4MB 350MHz Tap 0xa , (cpu 0) R16010FPC Rev 2.2 Memory on board, 2048 MBytes (Standard) Bank 2, 1024 MBytes (Premium) <-- (Software Bank 0) Bank 3, 1024 MBytes (Premium) <-- (Software Bank 1) IBRICK Bridge, Module 001c01 ASIC BRIDGE Rev 2, (widget 14) IBRICK Bridge, Module 001c01 ASIC BRIDGE Rev 2, (widget 15) adapter PCI (SCSI interface) Rev 6 (pci id 1) adapter IOC3 Rev 1 (pci id 4) controller multi function SuperIO controller Ethernet Rev 1 adapter USB (OHCI interface) (pci id 5) ASIC XBOW Rev 2, on CBrick, Module 001c01 ODYSSEY Graphics Board, Module 001c01 bigred, as shown here booted up to the IRIX login screen. It's no dual-CPU Tez, but it's quiet and does what I need it to, which is test MIPS binaries I build on the Indy and play a few games. I removed the other default logins previously; we'll log in now and switch to direct framebuffer grabs with scrsave. HP VUE-derived CDE. IRIX 6.0 made the jump to 64-bit, and 6.5 was the last major version, based on SVR4 and released in 1998. Versions after 6.5.22, which we have on the Indigo2, were technically only available with a service contract and don't support earlier hardware. In the side window, I'm checking that the temperatures are still good with l1cmd env (as root; other L1 commands also work). After working it hard I did get an overtemp warning on the PIMM, but it stabilized at 61 C, just over the advisory threshold. It's in a relatively stuffy part of the room so I might work on improving the ventilation.
I've been writing an internet browser (by hand). I just noticed that I put my picture-in-picture in the wrong place and I am mostly facing away from the camera because I moved my Mac on my desk. Video notes: Amend 4.0 natively supporting resource files TextView source code WASTE Cat source code Detritus source code HTML Living Standard BlueSCSI TLS Accelerator BearSSL My "A Rant About Gemini" Cloudflare's Markdown for Agents Dave Winer's BonBon The AI vibecoded telnet client I mentioned The AI vibecoded bare-metal SSH OS Crypto Ancienne Please contact me with any feedback or questions, view past videos in this series, and subscribe to my RSS feed to be notified about future videos and other posts. Join me and others on Libera Chat in the #cyberpals channel if you are interested in following along with this series and have questions or would like to help others.
Having recently shot a roll of Kodak’s newly rebranded Kodacolor 100 film, I decided to splurge a bit and try the “professional” Ektar 100. It’s about a 40% premium for a roll of 135 Ektar film over Kodacolor so I’m interested to see if it’s worth it to pay more. Now I didn’t shoot 1-for-1, […]