跳转至

\newpage

Load Queue VirtualLoadQueue

Function Description

Virtualloadqueue is a queue used to store the MicroOps of all load instructions, maintaining the order between load instructions, similar to the ROB for load instructions. Its main function is to track the execution status of Load instructions.

Virtualloadqueue has several status bits for each load instruction in each entry to identify its state:

  • allocated: Whether this entry is allocated for a load, used to determine the load instruction's lifecycle.
  • isvec: Whether this instruction is a vector load instruction.
  • committed: Whether this entry is committed.

Feature 1: Enqueue

  • Enqueue timing: In the dispatch stage of an instruction, load instructions are sent from the dispatch queue to the load queue. Virtual Load Queue is used to store the instruction's information.
  • Pipeline writeback timing: After the load is issued from the IQ, it passes through the load pipeline. When it reaches pipeline stage s3, the execution information of this load is fed back to the load queue.
  • Pipeline writeback information: Includes whether the dcache hits, whether the load successfully retrieved data (including dcache miss but able to forward complete data from sbuffer and store queue), whether the tlb misses, whether the load needs to be replayed, whether the load caused an exception, whether the load is in the MMIO space, whether it is a vector load, whether it caused a Read-After-Write (RAW) violation or a Read-After-Read (RAR) violation, and whether a dcache bank conflict occurred.

Feature 2: Dequeue

  • Dequeue timing: When allocated entries (where allocated is high) reach the head of the queue, and both allocated and committed are 1, it indicates that the entry can be dequeued. If it is a vector load, each element needs to be committed.

Overall Block Diagram

VirtualLoadQueue Overall Block Diagram

Interface Timing

Enqueue Request Timing Example

VirtualLoadQueue-enqueue

When io_enq_canAccept and io_enq_sqcanAccept are high, it indicates that dispatched instructions can be accepted. When io_enq_req_*_valid is high, it indicates that instructions are actually being dispatched to VirtualLoadQueue. The dispatched instruction information includes the ROB position, VirtualLoadQueue position, and the number of vector instruction elements, etc. After dispatching is complete, the corresponding allocated signal is pulled high, and enqPtrExt is updated based on the number of dispatched requests.

Pipeline Writeback Timing Example

VirtualLoadQueue-writeback

When io_ldin_valid is high, it indicates that the s3 stage of the load pipeline writes back to the LQ. The specific content is in io_ldinbits*. allocated_5 indicates whether the 5th entry of the LQ is allocated. When updateAddrValid is high and there is no replay, committed_5 will be pulled high in the next cycle. When both allocated and committed are high, it indicates that the entry can be dequeued. The tail pointer is incremented by one for each entry written back.