Thursday, March 31, 2011

Success and Roadblock

This one is a bit of a mixed bag.  Two days ago, I had quite a successful night.  The SPI controller I've been working on performed great after fixing a few implementation issues that were uncovered in the course of live testing.

Also interesting was that the testing "UI" I made (in reality 8 LEDs and 16 rocker-style DIP switches) allowed not just for a static test but instead for reading and writing at will with user-specified data and a user-specified memory page address.  Since I didn't have a lot of switches available and I was using one cluster of 8 solely for control signals, only the lowest 8 bits of the address were user-adjustable, but still...that's 256 pages (2 Kb) available for playing with for just a test.  =D

Yesterday I eliminated the last cycle of controller overhead latency present in the main course of SPI cycles themselves.  Or, in other words, the controller can now properly do SPI waveforms as tight as 1 cycle high and 1 cycle low without distorting the wave by stretching either side of that out due to control logic needing extra cycles.


This is the sort of difference it can make.  The transaction time is down to 360ns versus the original 520ns at 50 MHz since each SPI cycle takes only two controller cycles instead of three.

That brings us to the roadblock.  I'm using a 10 MHz crystal XO and went to instantiate a DCM for the 50 MHz signal.  I could use a 50 MHz XO, but it causes interference on my TV.  XST crashes during compilation with the DCM in there.  Go figure.  I'm asking Xilinx for help on this one since I know the Spartan 6 LX9 I'm using has 4 DCMs available in it. 

Tuesday, March 29, 2011

A Brave First Step

Hello, folks.  This is my initial post.  The point of this page is to follow some of my exploits when it comes to digital logic.  I've been a programmer for the better part of a decade, but just last year I started getting interested in FPGAs.  It is out of the pursuit of how to utilize them properly that most of my recent electronics hobby has developed.

Prior to this recent interest, the last real electronics learning I'd done was in 2005 for high school.  Admittedly, my knowledge had somewhat atrophied since that time.  Fortunately, I'm in a much better position now.  I've been learning about some of the base level stuff beyond what it says in the book.  I understand this stuff well enough to actually apply it, not just "get it" at a high level.

It's this better knowledge that has enabled to me do the projects I'm doing now.  My current project is to design and build a fully working computer using 100% self-designed systems.  Everything down to the ALU in the CPU is custom.  Re-inventing the wheel at least once is the best way to understand how we got to a point in the history of technology, after all.  I find myself facing many of the same questions that digital logic guys back in the 50s, 60s, and 70s did.  The entertainment comes in finding solutions to these problems without Google doing the heavy lifting.  One would be surprised just how often they, on their own, come to the same (or a similar) solution as the pioneers did or industry does today.  In my opinion, that's pretty darn neat.