You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -619,7 +625,7 @@ they are initiated by |processor| itself or by a |coprocessor| via the memory re
619
625
* PMA checks and attribution
620
626
* PMU usage
621
627
* MMU usage
622
-
* Misaligned load/store handling
628
+
* Misaligned load/store exception handling
623
629
* Write buffer usage
624
630
625
631
As for non-offloaded load or store instructions it is assumed that execute permission is never required for offloaded load or store instructions.
@@ -630,6 +636,47 @@ Whether a load or store is treated as being speculative or not by the |processor
630
636
ignore whatever value it might have communicated via ``commit_kill`` with respect to whether it treats a memory request as speculative or not. A |coprocessor|
631
637
is allowed to signal ``spec`` = 1 without taking the commit transaction into account (so for example even after ``commit_kill`` = 0 has already been signaled).
632
638
639
+
The ``addr`` signal indicates the (byte) start address of the memory transaction. Transactions on the memory (request/response) interface cannot cross a X_MEM_WIDTH (bus width) boundary.
640
+
The ``be`` signal indicates on what byte lanes to expect valid data for both read and write transactions. ``be[n]`` determines the validity of data bits ``8*N+7:8*N``.
641
+
There are no limitations on the allowed ``be`` values.
642
+
The ``size`` signal indicates the size of the memory transaction. ``size`` shall reflect a naturally aligned range of byte lanes to be used in a transaction.
643
+
The size of a transaction shall not exceed the maximum mememory access width (memory bus width) as determined by ``X_MEM_WIDTH``.
644
+
The ``addr`` signal shall be consistent with the ``be`` signal, i.e. if the maximum memory access width (memory bus width) is 2^N bytes (N=2,3,4,5) and the lowest set bit in
645
+
``be`` is at index IDX, then ``addr[N-1:0]`` shall be at most IDX.
646
+
647
+
When for example performing a transaction that uses the middle two bytes on a 32-bit wide memory interface, the following (equivalent) `be``, ``size``, ``addr[1:0]`` combinations can be used:
Note that a word transfer is needed in this example because the two bytes transfered are not halfword aligned.
653
+
654
+
Unaligned (i.e. non naturally aligned) transactions are supported over the memory (request/response) interface using the ``be`` signal. Not all unaligned memory operations
655
+
can however be performed as single transactions on the memory (request/response) interface. Specifically if an unaligned memory operation crosses a X_MEM_WIDTH boundary, then it shall
656
+
be broken into multiple transactions on the memory (request/response) interface by the |coprocessor|.
657
+
658
+
The ``attr`` signal indicates the attributes of the memory transaction.
659
+
660
+
``attr[0]`` indicates whether the transaction is a modifiable transaction. This bit shall be set if the
661
+
transaction results from modifications already done in the |coprocessor| (e.g. merging, splitting, or using a transaction size larger than strictly needed (without changing the active byte lanes)) or
662
+
if the |coprocessor| allows such modifications of this transaction at the system level. The |processor| shall check whether a modifiable transaction to the requested
663
+
address is allowed or not (and respond with an appropriate synchronous exception via the memory response interface if needed). An example of a modified transaction is
664
+
performing a (merged) word transaction as opposed of doing four byte transactions (assuming the natively intended memory operations are byte operations).
665
+
666
+
``attr[1]`` indicates whether the natively intended memory operation(s) resulting in this transaction is naturally aligned or not (0: aligned, 1: unaligned).
667
+
In case that an unaligned native memory operation requires multiple memory request interface transactions, then the |coprocessor| is responsible for splitting the unaligned native memory operation
668
+
into multiple transactions on the memory request interface, each of them having both ``attr[0]`` = 1 and ``attr[0]`` = 1.
669
+
The |processor| shall check whether an unaligned transaction to the requested
670
+
address is allowed or not (and respond with an appropriate synchronous exception via the memory response interface if needed).
671
+
672
+
.. note::
673
+
674
+
Even though the |coprocessor| is allowed, and sometimes even mandated, to split transacations, this does not mean that split transactions will not result in exceptions.
675
+
Whether a split transaction is allowed (and makes it onto the external |processor| bus interface) or will lead to an exception, is determined by the |processor| (e.g. by its PMA).
676
+
No matter if the |coprocessor| already split a transaction or not, further splitting might be required within the |processor| itself (depending on whether a transaction
677
+
on the memory (request/response) interface can be handled as single transaction on the |processor|'s native bus interface or not. In general a |processor| is allowed to make any modification
678
+
to a memory (request/response) interface transaction as long as it is in accordance with the modifiable physical memory attribute for the concerned address region.
679
+
633
680
A memory request transaction starts in the cycle that ``mem_valid`` = 1 and ends in the cycle that both ``mem_valid`` = 1 and ``mem_ready`` = 1. The signals in ``mem_req`` are
634
681
valid when ``mem_valid`` is 1. The signals in ``mem_req`` shall remain stable during a memory request transaction, except that ``wdata`` is only required to remain stable during
635
682
memory request transactions in which ``we`` is 1.
@@ -677,10 +724,10 @@ The signals in ``mem_resp`` are valid when ``mem_valid`` and ``mem_ready`` are
677
724
678
725
If ``mem_resp`` relates to an instruction that has been killed, then the |processor| is allowed to signal any value in ``mem_resp`` and the |coprocessor| shall ignore the value received via ``mem_resp``.
679
726
680
-
In case the memory request transaction results in a misaligned load/store operation, it is up to |processor| how or whether misaligned load/store operations are supported.
681
-
The memory response and hence the memory request/response handshake may get delayed.
682
-
If the first access results in a synchronous exception, the handshake can be performed immediately.
683
-
Otherwise, the handshake is performed once its known whether the second access results in a synchronous exception or not.
727
+
The memory response and hence the memory request/response handshake may get delayed in case that the |processor| splits a memory (request/response) interface transaction
728
+
into multiple transactions on its native bus interface.
729
+
Once it is known that the first, or any following, access results in a synchronous exception, the handshake can be performed immediately.
730
+
Otherwise, the handshake is performed only once it is known that none of the split transactions result in a synchronous exception.
684
731
685
732
The memory (request/response) interface is optional. If it is included, then the memory result interface shall also be included.
0 commit comments