Archive for May, 2008

New Architecture post series

Monday, May 26th, 2008

It’s time for me to start contributing back to this Blogosphere thing. I should also get some practice in technical writing and commentary, and the kinds of critical thinking they encourage. Finally, I should do something to show anyone who finds this site what I’m like professionally, not just personally.

To that end, I’ve written the first in what I hope is a long series of articles on computer architecture, my area of focus and primary interest. In the inaugural entry, I respond to Jon Stokes’s recent article on the Intel Atom and opine on the ramifications of newfound x86 compatibility in embedded systems (to wit: who cares?)

To avoid annoying all the folks who know me in real life but aren’t as nerdy, or just don’t want to scroll through pages of essays, I’ve kept the architecture section off the main blog section, but added appropriate links to it. For the lazy: architecture category index, feed.

David Jackson’s facebook status

Tuesday, May 20th, 2008

This is probably only interesting to the folks who’ve taken at least one CAT course…

David Jackson
walked downstairs yesterday to see Peter John and Linda Strauss chillin smokin and drinkin and drumming and strumming on my patio. Sweet.
Updated on Monday

Thoughts on the Atom

Monday, May 19th, 2008

The RISC vs CISC war isn’t over, and the next battle will be for handheld devices. Intel’s new Atom microarchitecture looks like a very interesting competitor to ARM and PowerPC in the “embedded systems with muscle” space (roughly: smartphones and set-tops). Hannibal nicely sums up the issue in an article that’s made the rounds of Slashdot et al, so I’ll let him do the talking for a few moments.

RISC vs CISC in the Mobile Era

I’m surprised at how strongly Intel is now embracing SMT. The Core lost HyperThreading for power and heat concerns a few years ago, and it stayed out of Core 2. But this year, Nehalem brings back SMT… and it’s in Atom too!

SMT in an in-order low-power chip is an interesting choice. Historically, SMT was about performance (not about perf per watt). In 2000, if you had a big honkin’ superscalar, you probably didn’t care about power consumption much. Hannibal makes the very strong and clear point that because of Atom’s x86 legacy (the excess of transistors burned on predecode, length decode, and complex-op microcode hardware), it’s impossible to follow the ARM Cortex strategy of building a tiny core and stamping them out (see also Sun Niagara!). The front-end is so heavy that its power cost has to be shared by/amortized over a few threads.

I’d suspect, for comparable parts, Atom will outperform Cortex on multithreaded workloads (no surprise), Cortex will beat Atom for complex single threads, and Cortex will use much less power than Atom on easy single threaded code.

Finally, I’m still not convinced by Intel’s “x86 everywhere” strategy. This is the embedded space, where different system boards share nothing in common. In answering the question, “What does this device look like to my code?” the ISA is the least interesting thing to examine. The embedded community has to support many many wildly different systems, and they do a very good job of it. The x86 community has not had any experience like this, and I don’t think giving them the option to adapt to this new world is necessarily a productive thing to do.1

Case in point: the Linux i386 branch is almost exclusively intended for “PCs”… even a diskless workstation like Scott’s little Cyrix is way out in the boonies of supported systems. But Linux also supports dozens of fantastically varied embedded systems: I count 59 ARM-based, 27 MIPS-based, 22 PPC-based, and 22 others including Super-H, SHARC, Blackfin, Tensilica, and FPGA soft-cores. There are only ten x86-based embedded systems. It is the embedded community that can most effectively accommodate new devices. All x86 could bring to the table is an arrogant assumption that things “ought to work like they do on PCs” and binary compatibility with software nobody cares about. If I’m building a set-top box, I don’t care if it can run Word ‘97. That’s just not a selling point I see for the Atom.

  1. Of course the PC world has many different devices, and Windows users have been dealing with driver problems as long as there have been PCs or drivers. But it’s one thing to have to track down the right driver for your old ISA sound card. It’s something completely different when your CPU talks to the sound chip over memory-mapped registers that go through a Spartan-3’s GPIO pins.

Danny on being ticklish

Saturday, May 17th, 2008

Danny: “Joe, are you ticklish?”
Me: “NO! F— off!”

I promptly get tickled by six people for a cool minute.

Rushi: “That was probably the worst response possible.”
somebody: “There is no really good response.”
Danny: “Yes: ‘I have diarrhea.’”

Going to Ralphs the night before Sun God

Friday, May 16th, 2008

One of these is not like the others…
One of These is Not Like the Others

No, these are not the ingredients of a wicked new cocktail. We just needed Drano too.

I love unix

Tuesday, May 13th, 2008

Extract the revision histories of the classes Rushi and I collaborated on out of his school repo, compress them, pipe them over the network onto my laptop, and uncompress. I was on the verge of adding the svnadmin load that would pull it into my repo, but I got lazy.

RSi:/home/svn$ svnadmin dump school | svndumpfilter --drop-empty-revs --renumber-revs include /CSE131A /CSE131B /CSE120 | gzip | ssh jauricchio@128.54.57.118 gunzip \> rushidump

Yeah yeah, DVCS, hg and git and whatever, I know…

Computer Languages and Facial Hair

Tuesday, May 6th, 2008

Why are some programming languages more popular than others? If Java is so lame and (Haskell, Obj-C, Erlang, Smalltalk, whatever) is so great, why is one of them the most used language and nobody’s heard of the other?

Tamir Khason has the answer: Computer Languages and Facial Hair.

Via … somebody. Forgot who. Maybe it was Sam Larbi?

DefCamp the morning after

Sunday, May 4th, 2008

Last night Scott, DJ, and I took part in DefCamp, “BarCamp’s Little Slice of Defcon”. DefCamp is a security contest, like Defcon’s Mystery Box, masterminded by Viss with help from Billy (?). The contest had three phases: First, a set of web pages and online clues to decode. Second, a booby-trapped box to open. Third, an embedded system to build then modify.

The first task was solving the web page challenges. It was a security mish-mash: lots of binary or hex to/from ASCII conversions, rotation and substitution ciphers, some simple password breaking, QR codes, sound spectral graphs, steganography in JPEGs. All the while with other teams trying to shoulder-surf us, and us trying to overhear them. Each puzzle led to a letter that spelled out a word.

Once we got the word (it was “IZZARD” as in Eddie), we went to Viss and he gave us The Box. The box (I didn’t get any pictures but someone else probably did) was a set of physical and electronic puzzles. Rules of the game are: no tilting, cutting, drilling, or breaking the box. If you mishandle the box or cut wires incorrectly, it makes a loud alarm. The top of the box is studded with nails, sharp side up. There are a handful of wires coming out from the back of the box, with alligator clips on the end. When the wires are connected to most of the nails, they trigger the beeper briefly. When you get the right combination of wires and nails, though, a relay flips and a set of green LEDs go on. Now we can cut some of the red wires and open the box.

Inside the box (which is actually a plastic tool box with a drawer inside), the next obstacle is an old padlock, keeping the drawer in place. We all suck at picking locks, so we spent about half an hour with DJ’s lockpicks trying to get it open. We finally realized we were turning the ‘key’ the wrong way, and then we got it open with another five minutes of fiddling.

After that, we got to the final step: one of Lady Ada’s MiniPOV3 kits, ready to assemble. The mission: get it to display a custom message. Piece of cake, right? I know AVRs, this is like home turf.

Scott and I made quick work of the assembly: sorting the dozen through-hole parts, slotting them into the holes, and tag-team soldering (turns out soldering is a four-hand job). We followed the schematic to find the pins for the serial connector. At the same time, DJ and I started installing avr-gcc from MacPorts on Scott’s computer. We hit trouble though: avr-libc in MacPorts failed to configure, because it somehow kept trying to use the system’s PowerPC gcc instead of avr-gcc (oops). Apart from that, we couldn’t get avrdude on the Mac to talk to the board. DJ installed avrdude on his Linux computer, but it didn’t work either.

Turns out that when Scott and I buzzed out the PCB traces to figure out how to solder the serial connector on… the schematic we were working from didn’t match our board!. We got two wires backward! By the time we figured it out, it was too late: another group had already finished… our UCSD rivals Declan and Robert. After fixing the wires (turns out, the pad pattern on the board was a direct analog of the connector itself), we programmed it from Declan’s computer, since by then we’d figured out how to change the message and recompile. We finally claimed third place.

Our prize: Fry’s gift cards and the memories of a marvelously fun experience. Viss, you’re a mean-hearted fellow… some of those challenges were hard :D

I’m still disappointed I couldn’t bring home the top prize, an A2 Aviator. Iain, Viss says Aviators are red without exception, and to kill you for the offense against nature embodied in your green one.

Two hours till I give my talk…

I’m at BarCamp

Saturday, May 3rd, 2008

I’m at BarCamp San Diego. I’m giving a talk on Sunday at 2:30 on: Trends in Processor Design (and why you should care). The BarCamp audience seems mostly high-level folks, not bare-metal programmers, so I’m not sure how well the talk will go over…

Update: I’ve caved into the diffuse yet extremely strong peer pressure and got myself a Twitter account. We’ll see where it goes. I still don’t get Twitter but I’ll see what the fuss is about.

Update 2: Here are my slides… They’re not quite finalized. trends-in-processor-design.key.zip (2.3MB)