
The Multi-Protocol Communication Controller is a compact digital communication module designed for Tiny Tapeout. The controller supports three commonly used serial communication protocols: UART, SPI, and I2C. A protocol is selected using dedicated mode control inputs, allowing the same hardware to operate in different communication modes.
This project demonstrates finite state machine (FSM) based protocol control, serial data transmission, and multiplexed protocol selection while fitting within a Tiny Tapeout 1x1 tile.
The design accepts a 4-bit input data value, a start signal, and two mode selection bits.
| MODE[1:0] | Protocol |
|---|---|
| 00 | UART |
| 01 | SPI |
| 10 | I2C |
| 11 | Reserved |
When the START signal is asserted, the controller loads the input data and begins transmission according to the selected protocol.
| Input | Description |
|---|---|
| DATA0-DATA3 | 4-bit data input |
| START | Starts transmission |
| MODE0 | Protocol select bit 0 |
| MODE1 | Protocol select bit 1 |
| RESET | Resets the controller |
| Output | Description |
|---|---|
| UART_TX | UART transmit output |
| SPI_MOSI | SPI master output |
| SPI_SCLK | SPI serial clock |
| SPI_CS | SPI chip select |
| I2C_SDA | I2C data line |
| I2C_SCL | I2C clock line |
| BUSY | Transmission in progress |
| DONE | Transmission completed |
The controller uses a simple state machine consisting of IDLE, LOAD, SEND, and DONE states to manage the communication process.
Run the Tiny Tapeout cocotb tests:
cd test
make -B
The supplied cocotb testbench automatically verifies UART, SPI, and I2C operating modes.
No external hardware is required. The design can be fully verified through simulation using the provided cocotb testbench.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | DATA0 | UART_TX | |
| 1 | DATA1 | SPI_MOSI | |
| 2 | DATA2 | SPI_SCLK | |
| 3 | DATA3 | SPI_CS | |
| 4 | START | I2C_SDA | |
| 5 | MODE0 | I2C_SCL | |
| 6 | MODE1 | BUSY | |
| 7 | RESET | DONE |