
The design implements a TinyCrypto-8: An 8-Bit Pipelined ALU with Hardware Cryptography. It optimizes instruction throughput by overlapping the fetch and execution phases..It optimizes instruction throughput by overlapping the fetch and execution phases
| Pin | Name | Logic Level | Description |
|---|---|---|---|
| ui[0] | MOD | 0 = Program, 1 = Execute | Switches between SIPO programming mode and CPU execution mode. |
| ui[1] | RE | High = Run | Read Enable: Acts as the "Run" button for the Program Counter (PC). |
| ui[2] | SIPO_IN0 | Serial Bit | Serial input for bits 3–0 (Low nibble) of the instruction. |
| ui[3] | SIPO_IN1 | Serial Bit | Serial input for bits 7–4 (Mid nibble) of the instruction. |
| ui[4] | SIPO_IN2 | Serial Bit | Serial input for bits 11–8 (High nibble) of the instruction. |
| ui[5] | DATA_VALID | Pulse | Handshake clock used to shift bits into the SIPO register. |
| ui[6] | NC | - | Not Connected / Reserved. |
| ui[7] | NC | - | Not Connected / Reserved. |
| Pin | Name | Description |
|---|---|---|
| uo[0] | ACC_Bit0 | Accumulator Bit 0 (Least Significant Bit) |
| uo[1] | ACC_Bit1 | Accumulator Bit 1 |
| uo[2] | ACC_Bit2 | Accumulator Bit 2 |
| uo[3] | ACC_Bit3 | Accumulator Bit 3 |
| uo[4] | ACC_Bit4 | Accumulator Bit 4 |
| uo[5] | ACC_Bit5 | Accumulator Bit 5 |
| uo[6] | ACC_Bit6 | Accumulator Bit 6 |
| uo[7] | ACC_Bit7 | Accumulator Bit 7 (Most Significant Bit) |
0.1.The design is verified using a comprehensive testbench (tb_Processor_Top)
LOAD_SEED operation initializes the LFSR, followed by CRYPTO operations to verify encrypted data output.| Category | Opcode (4-bit) | Mnemonic | Operation | Description |
|---|---|---|---|---|
| Arithmetic | 4'b0000 | ADD | A + B | Adds Accumulator and Operand |
| 4'b0001 | SUB | A - B | Subtracts Operand from Accumulator | |
| 4'b1010 | INC | A + 1 | Increments Accumulator by 1 | |
| 4'b1011 | DEC | A - 1 | Decrements Accumulator by 1 | |
| Logic | 4'b0010 | AND | A & B | Bitwise AND |
| 4'b0011 | OR | A | B | Bitwise OR | |
| 4'b0110 | XOR | A ⊕ B | Bitwise XOR | |
| 4'b0100 | NOT | ~A | Bitwise inversion of Accumulator | |
| Data/Comparison | 4'b0101 | MOV | B → A | Moves operand value into Accumulator |
| 4'b0111 | CMP | A - B | Updates flags without changing ACC | |
| Shifts | 4'b1000 | SHL | A << 1 | Shift left, MSB → Carry |
| 4'b1001 | SHR | A >> 1 | Shift right, LSB → Carry | |
| Cryptography | 4'b1100 | LOAD_SEED | LFSR = B | Loads initial seed into LFSR |
| 4'b1101 | CRYPTO | A ⊕ LFSR | XOR of ACC with LFSR stream |
This project does not require any external hardware.
The ALU operates entirely on digital signals (ui_in, uo_out) and is designed for simulation or integration into a larger digital system.
For optional hardware testing, the following setups may be used:
Basic Verification: A microcontroller (e.g., Arduino Uno, Raspberry Pi Pico, or ESP32) can drive ui_in with test patterns and read uo_out for validation.
Lightweight Security: The integrated LFSR Crypto Engine allows for hardware-level stream encryption in IoT devices.
Embedded Control: Efficiently handles logic for low-power systems like traffic light controllers or smart home actuators.
Prototyping: The 3-lane SIPO interface enables real-time instruction injection via external microcontrollers like Arduino.
Basic DSP: Performs bit manipulation and fixed-point arithmetic for sensor data processing using shift and logic operations.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | MOD (0=Prog, 1=Exec) | ACC_Bit0 | |
| 1 | RE (Run PC) | ACC_Bit1 | |
| 2 | SIPO_IN0 (Low) | ACC_Bit2 | |
| 3 | SIPO_IN1 (Mid) | ACC_Bit3 | |
| 4 | SIPO_IN2 (High) | ACC_Bit4 | |
| 5 | DATA_VALID (Clock) | ACC_Bit5 | |
| 6 | ACC_Bit6 | ||
| 7 | ACC_Bit7 |