RISC-V AI Inference Chip Using DMA and Vector Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The RISC-V instruction set lacks hardware design and software support for AI chip inference calculations, limiting its application in AI chips.
Innovation Solution
A RISC-V-based artificial intelligence inference method is developed, utilizing a DMA interface to acquire and process instructions and data, with a convolution control unit processing vector data in a vector processing unit, and supporting both vector and scalar operations to facilitate AI inference calculations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If RISC-V instruction set is used for AI inference, then computing power and adaptability are improved, but hardware design and software support are lacking
Solution Approach 1:
The patent applies universality by designing a multi-functional AI inference chip that can execute both vector instructions (for parallel processing) and scalar instructions (for control logic) on the same RISC-V processor. This allows a single hardware platform to handle diverse AI workloads including convolutional neural networks, recurrent neural networks, and other machine learning models, thereby improving adaptability while maintaining a unified hardware architecture.
Solution Approach 2:
The patent segments the instruction processing into two distinct functional units: a vector processing unit for handling vector instructions and a scalar processing unit for handling scalar instructions. This segmentation allows each unit to be optimized for its specific instruction type while both units share the same RISC-V instruction set architecture, resolving the hardware design challenge by providing specialized processing paths within a unified framework.
2Power
If RISC-V instruction set is used for AI inference, then computing power is improved, but software support is insufficient
Solution Approach 1:
The patent introduces an intermediary layer of software tools including a compiler that translates high-level AI algorithms into RISC-V assembly code, and a library of pre-optimized instruction sequences for common AI operations. This intermediary software layer bridges the gap between the simple RISC-V instruction set and complex AI inference requirements, making the system easier to manufacture and deploy by providing ready-to-use software support.
Solution Approach 2:
The patent applies preliminary action by pre-compiling and optimizing commonly used AI algorithms into RISC-V machine code, and by pre-defining instruction sequences for standard neural network operations such as convolution, activation functions, and pooling. This preliminary software preparation reduces the burden on end users and simplifies the manufacturing process by providing a ready-made software ecosystem.
3Power
If cloud-based AI inference is used, then computing power is sufficient, but delay is large and terminal requirements are not met
Solution Approach 1:
The patent extracts the AI inference capability from the cloud environment and embeds it directly into terminal devices through a dedicated AI inference chip based on RISC-V architecture. This extraction eliminates the need for network communication during inference operations, thereby removing the network-induced delay while maintaining sufficient computing power for local AI processing.
Solution Approach 2:
The patent applies preliminary action by performing AI model training in the cloud beforehand, and then deploying the trained models to terminal devices. The RISC-V based AI inference chip at the terminal can then execute these pre-trained models locally without needing to communicate with the cloud during inference, thus achieving low-latency real-time processing while maintaining the benefits of cloud-based model development.
Data Source
AI summary
Provided are a Reduced Instruction Set Computer-Five (RISC-V)-based artificial intelligence inference method and system. The RISC-V-based artificial intelligence inference method includes the following steps: acquiring an instruction and data of artificial intelligence inference by means of a Direct Memory Access (DMA) interface, and writing the instruction and the data into a memory; acquiring the instruction from the memory and translating the instruction, and loading the data from the memory to a corresponding register on the basis of the instruction; in response to the instruction being a vector instruction, processing, by a convolution control unit, corresponding vector data in a vector processing unit on the basis of the vector instruction; and feeding back the processed vector data to complete inference.


