Commit Graph

13 Commits

Author SHA1 Message Date
Doug Brown
8f3c74a14e Update copyright date 2023-06-25 11:38:41 -07:00
Doug Brown
8aec8807c9 Fix line endings
A whole bunch of files in this project had DOS line endings. This is due
to how I started working on it on a Windows machine with little Git
experience. Now it's inconsistent so I'm fixing it.
2023-05-28 19:34:02 -07:00
Doug Brown
3df4c40f38 Add/update copyright
This just makes sure everything is up to date with copyrights.
2020-11-27 00:16:35 -08:00
Doug Brown
7425af761a Break out code into a HAL, optimize flash operations
This makes the code pretty easily portable to other architectures if someone
wants to make a more modern SIMM programmer. I also was pretty careful to split
responsibilities of the different components and give the existing components
better names. I'm pretty happy with the organization of the code now.

As part of this change I have also heavily optimized the code. In particular,
the read and write cycle routines are very important to the overall performance
of the programmer. In these routines I had to make some tradeoffs of code
performance versus prettiness, but the overall result is much faster
programming.

Some of these performance changes are the result of what I discovered when
I upgraded my AVR compiler. I discovered that it is smarter at looking at 32-bit
variables when I use a union instead of bitwise operations.

I also shaved off more CPU cycles by carefully making a few small tweaks. I
added a bypass for the "program only some chips" mask, because it was adding
unnecessary CPU cycles for a feature that is rarely used. I removed the
verification feature from the write routine, because we can always verify the
data after the write chunk is complete, which is more efficient. I also added
assumptions about the initial/final state of the CS/OE/WE pins, which allowed me
to remove more valuable CPU cycles from the read/write cycle routines.

There are also a few enormous performance optimizations I should have done a
long time ago:

1) The code was only handling one received byte per main loop iteration. Reading
   every byte available cut nearly a minute off of the 8 MB programming time.
2) The code wasn't taking advantage of the faster programming command available
   in the chips used on the 8 MB SIMM.

The end result of all of these optimizations is I have programming time of the
8 MB SIMM down to 3:31 (it used to be 8:43).

Another minor issue I fixed: the Micron SIMM chip identification wasn't working
properly. It was outputting the manufacturer ID again instead of the device ID.
2020-11-27 00:16:35 -08:00
Doug Brown
533813e949 Added LED toggle to write/read modes.
Read is so fast that you can't even see the blinking, but oh well.
I also added an "led.h" header file that I should have done long ago.
2012-05-27 15:41:16 -07:00
Doug Brown
145487d388 Added GPL header to all of my source files. 2012-05-25 20:21:04 -07:00
Doug Brown
7f69cb476d Tried to do some better commenting in usb_serial.c, also tried to do a better job of documenting the protocol in programmer_protocol.h 2012-01-26 20:42:42 -08:00
Doug Brown
4f0d1a894c Optimized some of my routines and fixed a nasty, nasty bug that was causing the board to crash because of multiple things being outputs simultaneously. 2011-12-13 21:56:20 -08:00
Doug Brown
4adb0c4980 Started working on more optimizations, but something weird is happening and it's crashing...not sure why yet. 2011-12-11 21:48:26 -08:00
Doug Brown
2bc61f41aa Continued playing with USB serial stuff. I think it's working well now, but I'm running into problems reading from the SIMM, so I need to figure out why I'm not getting the data I expect. 2011-12-10 10:35:41 -08:00
Doug Brown
1db6834da4 Added LUFA into the project, right now just for some demo stuff. 2011-12-09 22:11:31 -08:00
Doug Brown
b475c28040 Fixed a bug in the address line tests, updated fusebits for now [with no bootloader yet], started working on getting all the tests working 2011-12-07 21:17:47 -08:00
Doug Brown
407f6831a9 Initial import of my test code for the SIMM programmer board. Right now
it contains an (untested) MCP23S17 driver complete with AVR SPI support,
and an (untested) external memory interface driver that uses it.
2011-11-25 23:10:30 -08:00