Introduction - If you have any usage issues, please Google them yourself
This based on lattice fpga do spi slave module. Easy to understand for beginners. The code using a state machine description. The whole project is run diamond2.0 version of the compiler.