GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - GSTL-ITU/HORNET-RV32IMF-For-AI-Applications: A custom RISC-V (RV32IMF) soft-core, "Hornet", implemented on Artix-7 FPGA for Edge AI and Network Intrusion Detection.

BranchesTags
Open more actions menu

Latest commit

 

History

23 Commits
23 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
v_1.0_stable
v_1.0_stable
 
 
v_1.2_accelerator
v_1.2_accelerator
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Design and Implementation of RISC-V-Based Core For AI Applications

Status Hardware ISA Toolchain

A lightweight, RV32IMF RISC-V soft-core ("Hornet") implemented on FPGA for edge-based network intrusion detection using a custom C-based MLP inference engine.


πŸ“– Table of Contents

  • Design and Implementation of RISC-V-Based Core For AI Applications
    • πŸ“– Table of Contents
    • πŸ› System Architecture
    • πŸš€ About the Project
    • πŸ— System Design & Verification
      • 1. RTL Simulation Flow
      • 2. Hardware-in-the-Loop (HIL) Flow
    • πŸ“‚ Repository Structure
    • πŸ›  Prerequisites & Toolchain
      • Hardware Requirements:
      • Python Dependencies
    • βš™οΈ How to Run (Hardware Verification)
    • πŸ‘₯ Team & Acknowledgments
      • Authors
      • Acknowledgments
    • πŸ“¬ Contact

πŸ› System Architecture

The design features the Hornet core (RV32IMF) integrated with a custom Wishbone wrapper and peripherals on the Nexys Video FPGA.

Top Level Block Diagram


πŸš€ About the Project

This project presents the design and implementation of a lightweight, RISC-V-based Edge AI processor capable of executing deep learning inference for network security applications. The primary objective is to validate the feasibility of running a complex, floating-point-heavy Multi-Layer Perceptron (MLP) on a soft-core processor within an FPGA environment.

Key Features:

  • Core: "Hornet" Processor (RV32IMF) – A custom 32-bit RISC-V core with Single-Precision Floating-Point support.
  • Hardware: Implemented on Xilinx Nexys Video (Artix-7 XC7A200T).
  • Software: Custom C inference engine (no heavy frameworks like TFLite) built from scratch.
  • Algorithm: Custom Focal Loss MLP trained on the NSL-KDD dataset for 5-class network traffic classification.
  • Performance: Achieved 78.87% accuracy on hardware, matching the software model.

πŸ— System Design & Verification

1. RTL Simulation Flow

Before going into the HIL flow, the design was tested on RTL Simulation using Vivado & XSim. The first verification topology is:

Verification Flow

2. Hardware-in-the-Loop (HIL) Flow

To ensure reliability, we developed a comprehensive verification suite. This flow validates the design by cross-referencing the Python Golden Model against both the RTL Simulation and the Physical FPGA output via UART, ensuring bit-accurate inference results. The second verification topology is:

Top Level Block Diagram


πŸ“‚ Repository Structure

This repository is organized by version and functionality.

.
β”œβ”€β”€ v_1.0_stable/            # PRIMARY STABLE RELEASE
β”‚   β”œβ”€β”€ no_batch/            # Sequential inference implementation (No-Batch processing)
β”‚   β”‚   β”œβ”€β”€ MLP_No_Batch     # Main Vivado Project & RTL Source
β”‚   β”‚   β”œβ”€β”€ Python_Codes     # Training scripts, dataset pre-processing, and model weights
β”‚   β”‚   └── test/            # Simulation and Hardware verification testbenches
β”‚   β”‚
β”‚   └── source/              # Core source files (RTL, linkers, bootloaders)
β”‚
β”‚
└── README.md                # Top-level documentation

πŸ›  Prerequisites & Toolchain

This project relies on specific tool versions to ensure synthesis reproducibility and accurate behavioral simulation.

Hardware Requirements:

  • Development Board: Digilent Nexys Video (Artix-7 FPGA)
  • Chip Compatibility: Validated on XC7A200T (Artix-7) and XC7A100T (Artix-7).
Tool Version Purpose
Vivado 2025.1 Synthesis, Implementation, and XSim
RISC-V GCC 15.1.0 Firmware compilation (rv32imf-unknown-elf)
GCC (Host) 11.4.0 Host-side test utilities
Python 3.10.12 ML Training & UART Interface

Python Dependencies

Required for training the model and running the UART test suite:

pip install tensorflow==2.20.0 numpy==2.2.6 pandas==2.3.3 scikit-learn==1.7.2 pyserial==3.5 matplotlib==3.10.7

βš™οΈ How to Run (Hardware Verification)

  1. Synthesize & Bitstream: Open the project located in v_1.0_stable/no_batch/MLP_No_Batch using Vivado. Run Synthesis, Implementation, and Generate Bitstream.

  2. Program FPGA: Connect your Nexys Video board via USB-JTAG and program the device with the generated .bit file using the Hardware Manager.

  3. Run UART Listener: On your host machine, navigate to the Python scripts directory and start the serial listener to capture inference results.

    cd v_1.0_stable/no_batch/Python_Codes
    # Replace '/dev/ttyUSB1' with your actual COM port (e.g., COM3 on Windows)
    python3 serial_listener.py --port /dev/ttyUSB1 --baud 115200
  4. Trigger Inference: Press the CPU Reset button on the FPGA board to initialize the Hornet core and begin the classification loop. The results will appear in your terminal.

πŸ‘₯ Team & Acknowledgments

This project was developed at Istanbul Technical University (ITU) as a graduation thesis.

Authors

  • Yusuf Tekin ([email protected])
    • Role: Software Design, Hardware/RTL Design, System Verification.
  • Ahmet Tolga Γ–zkan ([email protected])
    • Role: RTL Design for Hardware Accelerator.

Acknowledgments

We would like to express our deepest gratitude to our advisor, Prof. Dr. SΔ±ddΔ±ka Berna Γ–rs YalΓ§Δ±n, for their invaluable guidance, technical insights, and mentorship throughout the development of the "Hornet" core.


πŸ“¬ Contact

For inquiries regarding the hardware architecture, the software inference engine, or potential collaborations, please contact the authors via email or open an issue in this repository.

  • Yusuf Tekin: [email protected]
  • Ahmet Tolga Γ–zkan: [email protected]

About

A custom RISC-V (RV32IMF) soft-core, "Hornet", implemented on Artix-7 FPGA for Edge AI and Network Intrusion Detection.

Topics

edge-aiedge-computingfpgamachine-learningrisc-vrv32imfverilogvivado

Resources

Readme
MIT license
Activity
Custom properties

Stars

3 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.