A very simple and primitive SPI Master I wrote in VHDL
I just invested a couple of hours in this. It is far from perfect but it works (for me). It is currently configured to use 8 bit-words with MSB first.
My method of verification: A cheap logic analyzer.