
The Configurable CRC-16 Hardware Engine is a serial hardware implementation of a Cyclic Redundancy Check (CRC) generator and checker. It supports two selectable CRC configurations using a shared 16-bit CRC datapath.
The supported configurations are:
| Configuration | Polynomial | Initial value | Check value for ASCII "123456789" |
|---|---|---|---|
| CRC-16/CCITT-FALSE | 0x1021 | 0xFFFF | 0x29B1 |
| CRC-16/BUYPASS | 0x8005 | 0x0000 | 0xFEE8 |
The engine processes input data one bit at a time, using MSB-first transmission. For each input bit, the feedback bit is calculated by XORing the most significant CRC bit with the incoming data bit. The CRC register is shifted left and conditionally XORed with the selected polynomial.
The design operates in two modes:
An internal controller manages initialization, data processing, completion, and serial CRC output. The busy, done, and error signals indicate the transaction status.
The design can be tested using the TinyTapeout input and output pins.
rst_n.ena high to enable the design.POLY_SEL:
0: CRC-16/CCITT-FALSE1: CRC-16/BUYPASSCHECK_MODE:
0: CRC generation1: CRC checkingSTART pulse.DATA_IN, asserting DATA_VALID for each bit. Transmit each byte MSB first.FINISH in a separate cycle.In generation mode, wait for DONE and retrieve the 16-bit CRC through CRC_SERIAL_OUT using 16 READ_NEXT pulses.
In checking mode, send the message followed by its 16-bit CRC, then assert FINISH. A valid CRC produces ERROR = 0; an invalid CRC produces ERROR = 1.
The design was verified using Icarus Verilog and Cocotb.
The testbench checks:
The complete pin-level Cocotb test passed.
| Pin | Signal | Description |
|---|---|---|
| ui[0] | DATA_IN | Serial input data bit |
| ui[1] | DATA_VALID | Indicates valid input data |
| ui[2] | START | Starts a CRC transaction |
| ui[3] | POLY_SEL | Selects the CRC polynomial |
| ui[4] | CHECK_MODE | Selects generation or checking mode |
| ui[5] | FINISH | Ends input processing |
| ui[6] | READ_NEXT | Advances serial CRC output |
| ui[7] | Unused | Not used |
| Pin | Signal | Description |
|---|---|---|
| uo[0] | CRC_SERIAL_OUT | Serial CRC output bit |
| uo[1] | BUSY | Indicates active processing |
| uo[2] | DONE | Indicates transaction completion |
| uo[3] | ERROR | Indicates CRC checking failure |
| uo[7:4] | Unused | Always zero |
The bidirectional pins uio[7:0] are unused and their output-enable signals remain disabled.
No external hardware is required. The project is a standalone digital hardware block intended for implementation on the TinyTapeout SkyWater SKY130 platform.
We gratefully acknowledge the Center of Excellence (CoE) in Integrated Circuits and Systems (ICAS) and the Department of Electronics and Communication Engineering (ECE) for providing the necessary resources and guidance.
Special thanks to Dr. H V Ravish Aradhya (HoD - ECE), Dr. K R Usha Rani (Associate Dean - PG), Dr. K. S. Geetha (Vice Principal), and Dr. K. N. Subramanya (Principal) for their constant encouragement and support in facilitating this Tiny Tapeout SKY26C submission.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | DATA_IN | CRC_SERIAL_OUT | |
| 1 | DATA_VALID | BUSY | |
| 2 | START | DONE | |
| 3 | POLY_SEL | ERROR | |
| 4 | CHECK_MODE | ||
| 5 | FINISH | ||
| 6 | READ_NEXT | ||
| 7 |