\newpage
Load Queue VirtualLoadQueue
Functional Description
The VirtualLoadQueue is a queue that stores MicroOps of all load instructions, maintaining the order among load instructions, similar to the ROB for load instructions. Its primary function is to track the execution status of load instructions.
The VirtualLoadQueue has several status bits for each entry's load instruction to indicate its current state:
- allocated: Whether the entry has been allocated a load, used to determine the lifecycle of the load instruction.
- isvec: Whether the instruction is a vector load instruction.
- committed: Whether the entry has been committed.
Feature 1: Enqueue
- Enqueue timing: During the instruction dispatch phase, load instructions are sent from the dispatch queue to the load queue, where the Virtual Load Queue is used to store the instruction information.
- Pipeline writeback timing: After a load is issued from the IQ and passes through the load pipeline, upon reaching stage S3 of the pipeline, the execution information of this load is fed back to the load queue.
- Pipeline writeback information: Includes whether the dcache hit, whether the load successfully obtained data (including cases where dcache missed but complete data could be forwarded from sbuffer and store queue), TLB miss, whether the load needs to be resent, whether the load encountered an exception, whether the load is in MMIO space, whether it is a vector load, whether it caused a write-after-read or read-after-read violation, and whether there was a dcache bank conflict.
Feature 2: Dequeue
- Dequeue timing: When allocated entries (with allocated high) reach the head of the queue and both allocated and committed are 1, they are eligible for dequeuing. For vector loads, each element must be committed.
Overall Block Diagram
Interface timing
Timing example for receiving enqueue requests
When io_enq_canAccept and io_enq_sqcanAccept are high, it indicates that dispatch instructions can be accepted. When io_enq_req_*_valid is high, it signifies the actual dispatch of instructions to the VirtualLoadQueue, with dispatch information including the ROB position, VirtualLoadQueue position, and the number of vector instruction elements, among others. After dispatch, the corresponding allocated signal is raised, and enqPtrExt is updated based on the number of dispatched requests.
Pipeline writeback timing example
When io_ldin_valid is high, it indicates that the load pipeline's s3 stage writes back to the lq, with the specific content being io_ldin bits*. allocated_5 indicates whether the 5th entry in the lq is allocated. When updateAddrValid is asserted and there is no replay, committed_5 is pulled high in the next cycle. Both allocated and committed being high signifies that the entry can be dequeued. The tail pointer increments by 1 for each entry written back.