How mukullokhande99/vehicle-number-plate-detection-soc works
This repository implements a synthesizable RISC-V-controlled camera and vision SoC for a quantized vehicle-plate detection and OCR flow. The intended runtime path is camera input through image preprocessing and frame storage, accelerator inference, and CTC decoding, under CPU/SoC control. Separate tools export or package quantized model images. The README establishes the product scope, but the sampled source covers only model-export tools; RTL connections below are therefore dashed and unverified rather than asserted as inspected call paths.
Main entry points: plate_ocr_soc_top.sv SoC Top · plate_ocr_accel.sv Plate OCR Accelerator · plate_ocr_model_core.sv Model Core · local_sram_slave.sv Local SRAM Slave
Components 18
SoC Platform
- RISC-V Core
rtl/rv32i_core.sv - SoC Top
rtl/plate_ocr_soc_top.sv - Boot ROM
rtl/boot_rom.sv - Local SRAM Slave
rtl/local_sram_slave.sv - ASIC SRAM
rtl/asic_mem_1rw.sv
Camera Vision
- Camera QSPI Receiver
rtl/qspi_camera_rx.sv - RGB565 Decimator
rtl/rgb565_decimate2.sv - Vision Frame Store
rtl/vision_frame_store.sv - Vision Memory
rtl/vision_mem_2r1w.sv
OCR Inference
- Plate OCR Accelerator
rtl/plate_ocr_accel.sv - Model Core
rtl/plate_ocr_model_core.sv - W4A8 Dot Product
rtl/w4a8_dot8.sv - INT24 Requantizer
rtl/int24_requantize.sv - CTC Decoder
rtl/ctc_greedy_decoder.sv
Model Images
- PTQ Exporter
tools/export_plateocr_w4.py - Demo Checkpoint
tools/make_demo_plateocr_npz.py - Model Image Packer
tools/pack_plateocr_w4.py
Other components
- Camera
Connections 16
- Camera → Camera QSPI Receiver: supplies frames
- Camera QSPI Receiver → RGB565 Decimator: sends pixels
- RGB565 Decimator → Vision Frame Store: stores frames
- Vision Frame Store → Vision Memory: provides data
- RISC-V Core → SoC Top: controls
- SoC Top → Boot ROM: uses
- SoC Top → Local SRAM Slave: uses
- Local SRAM Slave → ASIC SRAM: accesses
- SoC Top → Plate OCR Accelerator: controls
- Plate OCR Accelerator → Model Core: dispatches
- Model Core → W4A8 Dot Product: computes
- Model Core → INT24 Requantizer: requantizes
- Plate OCR Accelerator → Vision Memory: reads data
- Plate OCR Accelerator → CTC Decoder: decodes output
- Demo Checkpoint → PTQ Exporter: creates checkpoint
- PTQ Exporter → Model Image Packer: exports weights