July 12, 2009

Rude Interruptions

16 days to go. The increased I/O demands of sensor polling and interface updating have uncovered a heretofore hidden weakness in our Real-Time kernel - our UART communication routines are most definitely dropping characters. Fortunately, this sort of thing is comparatively easier to tackle than the obscure context switching snafus that dogged us earlier; I've already made some progress in re-enabling the FIFOs on UART1, which is used for communication with the train controller. I'm going through a quick I/O optimization sprint this morning (and early afternoon!) with the aim of improving this part to the point where we can reliably gather timing data from the track.

Personal notes: I currently have no life. I'm spending upwards of 10 hours a day either actively programming or thinking about programming, and my buttocks have become a quasi-permanent fixture in the Real-Time lab. I did manage to pop out briefly for a couple of pints on Friday, but only after putting in a solid day plus overtime. I've got a few forms that need to be filled out, a couple of unpaid parking tickets, an encroaching tide of facial hair, and piles of unwashed dishes in both kitchen sinks (though, to my credit, I am wearing freshly washed clothes.) And you know what? The experience is actually kind of fun, in a more-than-masochistic brain-grinding teeth-clenching sort of way. I'll be able to look back on this as the most intense month of undergrad CS at Waterloo. (I note wryly that Real-Time is listed on birdcourses.com - "earning credits for playing around with trains, how easy is that!?")

So far, Real-Time is proving to be decidedly more involved than Graphics; the former provides much more potential for those delicious WTF moments that all hackers learn to simultaneously cherish and loathe. I still remember the first Real-Time assignment with an odd mixture of nostalgia and vomitous aversion. The busy-wait I/O libraries provided by the prof to help us down our well-intentioned path contained a fatal flaw: the baud rate divisors for UART1 were taken from the previous Intel architecture, and were therefore quite wrong. That was the first of many potent WTF moments - if you can't trust the provided starter code, what can you trust?

Anyways, I should probably get back to work. Keep posted!

No comments:

Post a Comment