Simple SPI Master VHDL example code.

Written by Tom on Thursday 10/05/07

SPI is a simple interface with high data rates we have had SPI running at 1 MHz over short distances. The only precaution we had to take was to run a ground with every signal wire.

Here is a simple VHDL SPI implementation. It has a fixed data word of 16 bits.
Set the StartTx high for a min of one clk cycle to kick it off.

Note: The data rate is half the clk signal speed.

From GTKWaveSignals1.JPG and GTKWaveSignals2.JPG the results of the simulation can be seen.

Download the project from here.

Use the go.bat to compile and run GTKWave.