
This project implements an 8-bit SPI Master Controller using Verilog.
The design accepts 8-bit parallel data through ui_in[7:0]. When the START signal (uio_in[0]) is asserted, the data is loaded into an internal shift register.
A finite state machine (FSM) controls the transmission process using four states:
The shift register transmits data serially through the MOSI line while generating the SPI clock (SCLK). A chip select (CS) signal is used to indicate active communication. A BUSY signal indicates that transmission is in progress.
rst_n = 0.ui_in[7:0].rst_n = 1.uio_in[0].uo_out[0].uo_out[1].uo_out[2].uo_out[3].| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | START | MOSI | |
| 1 | MISO | ||
| 2 | SCLK | ||
| 3 | CS | ||
| 4 | DONE | ||
| 5 | MASTER_RX0 | ||
| 6 | SLAVE_RX0 | ||
| 7 |