
This project implements a lightweight, Machine Learning-based Hardware Anomaly Detection engine designed to analyze incoming V2X (Vehicle-to-Everything) packet data for malicious or anomalous behavior in real time. The architecture is deeply pipelined and operates in six stages:
ui_in[0] pin, controlled by the ui_in[1] bit_valid strobe.(12 * Velocity) + (88 * Heading).0x00)0x55)0xAA)0xFF)uo_out. A 1-cycle done_flag pulses on uio_out[0], and if the threat is critical, a hardware interrupt irq_flag pulses on uio_out[1].To test the anomaly detection engine, you will need to simulate a serial data feed representing a 64-bit V2X packet:
rst_n (active low) to clear all internal shift registers and pipelines.ui_in[0] with your serial data stream (LSB first) while holding ui_in[1] (bit_valid) HIGH for exactly 64 clock cycles.ui_in[1] LOW. Wait a few clock cycles for the data to propagate through the MAC and scoring pipelines.uio_out[0] for a 1-clock-cycle HIGH pulse. This indicates the evaluation is complete.
uo_out pins.uio_out[1] pulsed HIGH, which indicates an interrupt triggered by a CRITICAL score (0xFF).Example Test Vectors:
0x00 (Safe).0xFF (Critical) and uio_out[1] will pulse.ui_in[0] and ui_in[1]) and monitor the output interrupt flag. The standard Tiny Tapeout demo board provides this capability.uo_out[7:0] to provide a visual, real-time representation of the threat level.done_flag and irq_flag pulses.| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | serial_bit_in | threat_score[0] | done_flag (out) |
| 1 | bit_valid_strobe | threat_score[1] | irq_flag (out) |
| 2 | mode_sel (reserved) | threat_score[2] | uart_tx (out) |
| 3 | threat_score[3] | ||
| 4 | threat_score[4] | ||
| 5 | threat_score[5] | ||
| 6 | threat_score[6] | ||
| 7 | threat_score[7] |