Saturday, February 7, 2009

My Professor Knows Magic

I kid you not.

Just this last weekend, I was bashing my head against a certain bug. It's called an iteration loop error. In Verilog, parts of the chip don't have any delay in them. Since this is a rough simulation, that's usually OK and in the real world (or better simulations) we'll see delays and all is well. Iteration loops occur when there is a signal loop (i.e. a signal is dependent on itself) and keeps changing indefinitely. In the real world, this never happens. But, due to the zero delay in Verilog, it can in simulation.

So, I spend most of Friday, Saturday and Sunday chasing around this bug not only in simulation but in my mind. It appeared to come from the flip flops, a certain digital structure that can capture a value on its input on the rising edge of a clock signal, and hold it as its output until it samples another. Very handy. To hold these values, there's certain loops that, in theory, should open and close and not create a feedback loop. However, I finally gave up and worked on other parts of Clinic and asked Prof. Harris to help me. He suggested adding in delays everywhere, setup the wave, and then bring him over to check them out.

So, on Wednesday, I setup the simulation with delays everywhere, and it appears to have fixed the problem. While this is all well and good, we want to isolate what caused the problem in the first place. Magic fixes don't actually fix the problem. So, with Prof. Harris watching, I start to remove the delays in the Verilog code. Eventually, we get back to code with no delay. Puzzled, I then try to re-create the iteration loop bug. It doesn't show up. I then turn to Julien Massas and ask him to try to re-create the bug, since his code was the first to show the error. It also doesn't exist in his code.

Now, I know we didn't change all that much from Sunday to Wednesday, and I'm very very sure it was still broken on Sunday. So, my only explanation is that the presence of Prof. Harris fixed it. Or, it somehow managed to hide itself in fear of his awesome l337 skillz and will resurface sometime next week, right before our deadlines.

In other news, I'm still searching for what I'll be doing after graduation. Grad apps are in (well, 3 out of 5, the other 2 are due next month) and under review, my resume is floating in databases around the globe, and JPL has declined to offer me a position. One of my physics friends already got into one of his Grad schools, so he's very very happy and much more relaxed. I blame it on his Indian heritage (Asiatic India mind you). Plus, as an engineer I can find work without a grad degree. He can't. So, extra kudos for him being so awesome and way smarter than me.

To close, I'll drop a screenshot of my resume. Just in case you were curious.

resume 0209

1 comment:

KMarsh said...

I would hide from Prof Harris if I were a bug, too. Also to make you look dumb in front of him. But mostly in fear.
~KMarsh