arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.08334cs.ARcs.DC
收藏

RISC-V向量内存访问的高效架构

Efficient Architecture for RISC-V Vector Memory Access

Hongyi Guan, Yichuan Gao, Chenlu Miao, Haoyang Wu, Hang Zhu, Mingfeng Lin, Huayue Liang

AI总结:

针对向量处理器跨步和分段内存访问效率低的问题,提出基于移位优化的EARTH架构,在FPGA实现后使跨步操作基准加速4-8倍,面积减9%、功耗降41%,提升向量处理器性能与效率。

摘要:

向量处理器经常面临内存访问效率低下的问题,尤其是对于跨步和分段模式。虽然合并跨步访问是一种自然的解决方案,但以固定跨步有效收集或分散元素仍然具有挑战性。朴素方法依赖于高开销的交叉开关,在内存和寄存器之间重新映射任何字节,导致物理设计问题。分段操作需要行列转置,通常使用元素级原地转置(降低性能)或大型基于缓冲区的批量转置(导致高面积开销)来处理。在本文中,我们提出EARTH,一种新颖的向量内存访问架构,旨在通过基于移位的优化克服这些挑战。对于跨步访问,EARTH集成专用移位网络以收集和分散元素。在合并同一缓存行内的多个访问后,数据通过移位网络在内存和寄存器之间路由,开销最小。对于分段操作,EARTH采用移位寄存器组实现直接列访问,消除专用分段缓冲区的同时提供高性能、原地批量转置。基于开源RISC-V向量单元,使用Chisel HDL在FPGA上实现的EARTH提升了跨步内存访问的性能,在以跨步操作为主的基准测试中实现4倍至8倍的加速。与传统设计相比,EARTH将硬件面积减少9%,功耗降低41%,显著提升了向量处理器的性能和效率。

英文摘要:

Vector processors frequently suffer from inefficient memory accesses, particularly for strided and segment patterns. While coalescing strided accesses is a natural solution, effectively gathering or scattering elements at fixed strides remains challenging. Naive approaches rely on high-overhead crossbars that remap any byte between memory and registers, leading to physical design issues. Segment operations require row-column transpositions, typically handled using either element-level in-place transposition (degrading performance) or large buffer-based bulk transposition (incurring high area overhead). In this paper, we present EARTH, a novel vector memory access architecture designed to overcome these challenges through shifting-based optimizations. For strided accesses, EARTH integrates specialized shift networks for gathering and scattering elements. After coalescing multiple accesses within the same cache line, data is routed between memory and registers through the shifting network with minimal overhead. For segment operations, EARTH employs a shifted register bank enabling direct column-wise access, eliminating dedicated segment buffers while providing high-performance, in-place bulk transposition. Implemented on FPGA with Chisel HDL based on an open-source RISC-V vector unit, EARTH enhances performance for strided memory accesses, achieving 4x-8x speedups in benchmarks dominated by strided operations. Compared to conventional designs, EARTH reduces hardware area by 9% and power consumption by 41%, significantly advancing both performance and efficiency of vector processors.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑