Vector Instruction Lookup Table for Lower Register Usage
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Vector register resources are insufficient, leading to frequent data transfers between vector registers and memory, which degrades pipeline performance in vector processing.
Innovation Solution
Configure a vector instruction lookup table in a processor's storage space, determine table filling types for candidate vector registers, and use specific rules to write and retrieve elements from the table, reducing vector register consumption and memory access frequency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If table filling and lookup operations are performed in vector registers, then vector function execution is enabled, but vector register resources are consumed and memory access frequency increases
Solution Approach 1:
The patent introduces a dedicated lookup table structure as an intermediary between vector registers and memory. This lookup table stores precomputed table items and provides fast access without consuming vector register resources, thereby resolving the contradiction between enabling vector function execution and reducing vector register consumption
Solution Approach 2:
The patent segments the storage hierarchy by creating a specialized lookup table structure that is separate from both vector registers and main memory. This segmentation allows table lookup operations to be performed in a dedicated storage area, reducing the burden on vector registers and minimizing memory access frequency
2Ease of operation
If table filling operations are performed in vector registers, then lookup functionality is achieved, but pipeline performance degrades due to frequent memory transfers
Solution Approach 1:
The patent applies preliminary action by precomputing and storing table items in the lookup table before they are needed during runtime. This eliminates the need for real-time computation during pipeline execution, thereby maintaining pipeline performance while enabling lookup functionality
Solution Approach 2:
The patent creates a copy of frequently accessed table data in a dedicated lookup table structure. This copy allows fast access to table items without requiring access to the original memory locations, thereby reducing memory access frequency and maintaining pipeline performance
Data Source
Figure 1~2A
Figure 2B
Figure 3A
AI summary
The present disclosure provides a method and apparatus for vector instruction table filling and lookup in a processor, and an electronic device. The method comprises: configuring a vector instruction lookup table in a preset storage space of the processor, wherein the storage capacity of the vector instruction lookup table is the product of the number of items and the number of bits of storage items; determining table tilling types corresponding to candidate vector registers waiting for table filling, wherein the table filling types comprise a first type and a second type, the first type is that the product of the register width and the maximum number of register groups is larger than or equal to the storage capacity, and the second type is that the product of the register width and the maximum number of register groups is smaller than the storage capacity; and using table filling rules corresponding to the table filling types to write first elements stored in target vector registers among the plurality of candidate vector registers into the vector instruction lookup table, and using a preset table lookup rule to acquire, from the vector instruction lookup table, a second element to be looked up, such that the performance of the processor can be improved.