Multi-thread Packet Processor Key Lookup Dispatch
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Multi-thread packet processors face increased complexity and latency due to the need for numerous threads to hide coprocessor latency in key lookup operations, leading to longer packet processing times and higher design complexity.
Innovation Solution
The solution involves decomposing key lookup operations into two instructions: a Key Dispatch Instruction (KDI) and a Return Result Instruction (RRI), allowing threads to continue executing instructions while the key lookup operation is in progress, and checking a busy flag to determine when the result is available, thus reducing the number of threads required to fill the pipeline.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the number of threads is increased to hide coprocessor latency, then the pipeline can be fully filled and maintain full instruction dispatch rate, but the device complexity and design implementation size increase
Solution Approach 1:
The key lookup operation is segmented into two separate instructions: a key dispatch instruction that initiates the lookup without stalling the thread, and a return result instruction that retrieves the result. This segmentation allows the thread to continue executing other instructions while the coprocessor performs the lookup, eliminating the need to increase thread count to hide latency.
2Productivity
If the number of threads is increased to hide coprocessor latency, then the pipeline remains full without idle stages, but the packet processing latency increases
Solution Approach 1:
The key dispatch instruction initiates the coprocessor lookup operation in advance and allows the thread to proceed with subsequent instructions without waiting for the lookup result. The thread performs preliminary actions (dispatching the key) and continues execution, rather than stalling until the result is ready, thereby reducing packet processing latency while maintaining pipeline utilization.
3Speed
If dedicated hardware accelerators are added for key lookup operations, then the lookup speed is improved, but the device complexity increases
Solution Approach 1:
A scoreboard register is introduced as an intermediary mechanism to track the status of coprocessor operations. The scoreboard stores status information for each thread's coprocessor operations, allowing the thread to check whether the lookup is complete without stalling. This intermediary structure enables efficient coordination between the main processor and coprocessors without requiring complex dedicated hardware accelerators for each operation type.
Data Source
AI summary
Key lookup operations are broken into two instructions: a Key Dispatch Instruction (KDI), and a Return Result Instruction (RRI). The thread uses KDI to dispatch key information to a selected coprocessor to initiate a key lookup operation. Upon dispatch of the key value to the coprocessor, the KDI is retired to enable the thread to continue to dispatch and retire addition instructions in the pipeline and does not go idle. Subsequently, the thread will issue a RRI to obtain the key lookup result from the coprocessor. While a thread is executing, it maintains, as part of its context, a busy flag per coprocessor in a scoreboard register and a return result register per coprocessor. KDI causes the corresponding busy flag in the scoreboard register to be set. When the key lookup operation is complete, the busy flag is cleared and the result is stored in the return result register.


