Substituting LSQ with small dedicated circuit #258
Replies: 2 comments
-
Thanks for creating a roadmap!
I don't see the connection between adding a flag and going from an array to a map here. We should just add a boolean parameter to |
Beta Was this translation helpful? Give feedback.
-
Previously, I considered changing |
Beta Was this translation helpful? Give feedback.
-
Description
Currently, memory accesses that could potentially conflict are managed using a Load-Store Queue (LSQ). The LSQ ensures correctness by maintaining dependencies between memory operations. Our objective is to eliminate the LSQ and replace it with a new circuit that ensures correctness, and significantly reduces area usage, while minimizing performance degradation,
Roadmap
StoreOp
In order to sequentialize memory accesses it's essential to have a signal which represents the completion of each memory operation. For load operations, a data-less fork of the loaded data could be used but for store operations, there is nothing to use. A more detailed discussion regarding this signal is available in [Handshake] Adding completion signals to store operations #191.
According to memory dependencies, the input of each memory operation should be gated by all of it predecessors' completion signals.
The sequentialization is not always necessary. When the addresses of the source and destination operation are not equal, the successor may execute before its predecessor. So, it's possible to insert comparators that check this condition and act accordingly. If there is no conflict a Mux should choose an available dummy token, so that the successor can proceed (This token can be the START signal of the function or more efficiently the condition itself).
There may be paths in the control flow graph that there is no predecessor for a memory operation. In other words, in this path, there is no producer for the consumer. In this situation, SSA form is not respected. The solution is to consider the START signal as the producer on those paths and insert
createPhiNetworkDeps
in here can be used.change theMemDependenceArrayAttr
toMemDependenceDictAttr
Currently, dependencies are stored as lists. According to the discussion in here, They should be converted to a dictionary which shows whether each one of them is active or inactive (ie. guarantied by someone before).
MemDependenceAttr
According to the discussion in here, dependencies should be marked by a boolean to show whether they are active or not (i.e. are they already somehow honored or not).
HandshakeAnalyzeLSQUsage
to inactivate the dependenciesFollowing the previous task passes that work on this attribute should be modified. This includes,
HandshakeAnalyzeLSQUsage
,MarkMemoryDependencies
, andMarkMemoryInterfaces
. Especially,HandshakeAnalyzeLSQUsage
should be modified to inactivate the dependencies it is honoring.Beta Was this translation helpful? Give feedback.
All reactions