spi interface vhdl
There Are Lots Of SPI Deratives. The Best Thing To Do, Is To Examine The Datasheets Of The Device You Are Interfacing, For The Required SPI Format.
VHDL Is Not C, So You Should Always Write Your Own Code.
SPI Is Very Simple - There Is Master And Slaves, So No Arbitration Is Needed,
Also There Is One Receive And One Transmit Data Signal.
The Clock Can Be Free Running, So You Can Generate It Quite Easily.
With Counter.
The Data Will Be Shift Out When Writing, And In When Reading.
You Should Use 2 Registers 1 For Write 1 For Read, You Should Also Use
Address Register, To Access Devices With More Then 1 Internal Address.
To Select Between Deices You Need Different CS~. You Can Generate Those With Decoder.
It Will Be Most Easy To Realise The Design With A State Machine, Who Shell Do Or Control All This Tasks.