跳转至

Vector Store Merge Buffer VSMergeBuffer

Functional Description

A freelist-based queue that receives requests from the VSSplit module, allocates an entry for each uop dispatched by the backend to save relevant uop information, collects data returned from the Store pipeline, and writes back to the backend and Store Queue after receiving all split memory access requests for that uop.

Feature 1: Maintain Split Memory Access Requests for uops

In the second stage of the VSSplit module's pipeline, it initiates an entry request to VSMergeBuffer. In the same cycle, VSMergeBuffer returns an entry index to VSSplit, and simultaneously sets the allocated flag for the corresponding entry to true. Upon enqueuing, the counter in the corresponding entry is written with the number of split memory access requests for the current uop. An entry is allocated for each uop, and each entry maintains the required number of flows to collect. When all flows are collected, it is marked as uopfinish, and write-back occurs at the granularity of the uop. One entry marked as uopfinish is selected to be written back to the backend. If multiple entries can be written back, the one with the smaller index is written back first. Simultaneously, the corresponding flag bits are cleared.

Feature 2: Exception Handling

According to the pipeline output information, correctly set the ExceptionVec, vstart, and other relevant data when an exception occurs.

Feature 3: Mark Whether a Uop Needs to be Flushed Based on the StoreMisalignBuffer's Flush Signal

Unaligned vector store memory accesses have special characteristics. When the StoreMisalignBuffer generates a flush signal for a vector store, it is sent to VSMergeBuffer. VSMergeBuffer will set the corresponding entry to needRSReplay, thus eventually notifying the Issue Queue to re-dispatch.

Overall Block Diagram

No block diagram for a single module.

Main Ports

Direction Description
frompipeline In Receives read data return from the Store pipeline
fromSplit.req In Receives entry requests from the VSSplit module
fromSplit.resp Out Feedback to the VSSplit module, indicates successful allocation and the allocated entry
uopWriteback Out Writes back completed uops to the backend
toLsq Out Updates the status of entries in the Store queue when completed uops are written back to the backend
redirect In Redirect port
feedback Out Feedback to the backend Issue Queue whether re-dispatch is needed
fromMisalignBuffer In Receives the flush signal from the StoreMisalignBuffer

Interface Timing

Interface timing is relatively simple, only text descriptions are provided.

Description
frompipeline Has Valid, Ready. Data is valid when Valid && Ready is true
fromSplit.req Has Valid, Ready. Data is valid when Valid && Ready is true
fromSplit.resp Has Valid. Data is valid when Valid is true
uopWriteback Has Valid, Ready. Data is valid when Valid && Ready is true
toLsq Has Valid. Data is valid when Valid is true
redirect Has Valid. Data is valid when Valid is true
feedback Has Valid. Data is valid when Valid is true
fromMisalignBuffer Does not have Valid. Data is always considered valid, responds as soon as the corresponding signal is generated