Archive for the ‘Uncategorized’ Category

The FPGA test board

Wednesday, August 18th, 2010

I picked up a lightly used FPGA development board from craigslist today. It’s the Altera DE2 board with a Cyclone II FPGA.

The DE2's Cyclone II

There are a few nice things about this board…

  • It’s loaded with real and useful peripherals: 16×2 LCD Panel, VGA DAC, lots of LEDs, RS232, IrDA, PS/2, USB, 100/10Mbs Ethernet, audio codec, NTSC TV decoder, SD card connector, etc, etc. This means I can focus on the moxie microarchitecture, and not worry about building a full feature rich SoC.
  • Altera’s Quartus II software runs on Linux
  • It was relatively cheap – $200

When I got home I was happy to discover that the board actually powers on and the appropriate LEDs blink. You can never be sure with used hardware!

As for the Quartus software… I’m running Fedora 13 x86-64. This isn’t a supported OS for them but I’m hoping it will work since they do support RHEL5. Quartus appears to be a 32-bit binary, so I had to go through a tedious process of installing missing 32-bit libraries – something that could have been avoided if they would simply package this thing in an RPM. The good news is that after installing the appropriate libraries, it does appear to start up.

More as it happens…

The Moxielyzer

Wednesday, October 14th, 2009

I just committed a little binary analysis tool to moxiedev. You can use it to perform simple static analysis on moxie binaries. The kinds of things I’m looking for are compiler bugs (because I know there’s still one there that is triggered by -frerun-cse-after-loop), and instruction statistics. For instance, which registers are used as load offsets, and how often? The tool uses a primitive plugin architecture that should make it easy to add new analysis tools in the future. It’s called the moxielyzer, and here is the initial commit. Run it with no arguments to get a list of plugins. Run it with just a plugin name, and it will describe the plugin. Run it with a plugin name as well as an ELF moxie executable filename, and the analysis will be performed.

I had written a similar tool for ggx back in the bad old days. Another option was to hack this stuff into gas, but I prefer to keep gas “clean” (translation: I want the freedom to maintain hacky analysis code).

BTW – I’m also rolling out a new libffi in a few weeks. You can keep track of the release candidate test results on the wiki here.

The Race For A New Game Machine: great book!

Friday, May 15th, 2009

I just read The Race For A New Game Machine today on a cross-country flight, and wow.. fun read!

If you’ve ever read Tracy Kidder’s great book The Soul of a New Machine, you’ll know what to expect. But this book chronicles the SONY/Toshiba/IBM Cell partnership, and the creation of the processor core at the heart of both the PS3 and XBOX360 from the point of view of lead architect David Shippy. Not only is it full of interesting technical details**, but it exposes a dark story of manipulation, deception, betrayal and broken friendships. Some of the story is so strange it’s hard to believe.

Many years ago I was involved in a some work with Toshiba and SONY around the Emotion Engine, the MIPS-based core used in the PlayStation 2. The team at Cygnus/Red Hat had done lots of work on PS2 development tools, and we all liked working with the Toshiba and SCEI people. It was disappointing to learn that we weren’t going to participate in the Cell project but, after reading this, maybe it was for the best!

** This book introduced me to clock gating, a trick used by ASIC developers to save power. Shippy’s core passed a “power token” through the processor pipeline, ensuring that at any one time the only pipeline logic being clocked was the logic being used. Neat trick, but apparently the savings aren’t that great for FPGAs.