Memory Ordering Flashcards
1
Q
What is a LSQ?
A
Load-Store Queue - used to solve dependency issues in memory accesses
2
Q
What is the structure of an LSQ?
A
It is similar to a ROB and replaces RSes for Loads and Stores. Entries are placed in program order. Each entry has:
- Load vs Store ?
- Address
- Value
- Completed?
3
Q
What is Store-to-Load Forwarding?
A
If we try to load something that has already been stored in the queue, we just pull that value, we don’t go to memory
4
Q
What do we do if we have a load, but there are pending stores in the queue?
A
Get the address from memory anyways! But, when the store(s) return, it must check all the loads after it in the queue
5
Q
How do we remove items from the LSQ?
A
On commit!
- For load instructions, save value to register file and remove it from the queue
- For store instructions, save value to data cache and remove it from the queue