April 26, 2004
Lab 10 is working now. I encountered a few problems:
- I had accidentially used an output pin instead of an input pin for the clock and reset signals on the CPU datapath module. Big suprise that that didn't work. There went 1 hour of my life...
- My program file had dos linefeeds unexpectedly, which was choking my perl script to convert it into the hex file for the prom.
- My program had two bugs in it. Turns out that hand coding binary instructions into excel, saving as a .CSV, running it through a perl script to convert it to hex, then building a PROM module in logicworks with that file is not the easiest development workflow. :-)
- I padded the wrong side of my opcode as coming from the instruction register, so when I was supposed to be putting the index of the opcode lookup table in the MPC, I was really getting something quite different.
- I put my SRAM and PROM module backwards in the memory, so I was initially trying to load stuff out of the RAM, and of course there was nothing there.
- My input devices enables needed to be inverted based on the address selection.
That was it. Just a few things. Overall I think unit testing the small peices took more time, but was highly useful in the end, since I knew they worked (although it really would have helped if I had unit tested the datapath, even though it would have been complicated. Then I would have discovered the inverted clock problem). These hardware thingees get amazingly complex. I'm not sure how I ever would have diagnosed the problems if I didn't have 10 years of pretty good troubleshooting/debugging experience. There's
definitely a lesson about unit testing here.
Posted by rmeyer at
10:50 AM
|
TrackBack (0)