Skip to content

Commit

Permalink
Add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
piotro888 committed Jan 16, 2025
1 parent 9d54a86 commit 3580139
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions coreblocks/func_blocks/fu/lsu/lsu_atomic_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@


class LSUAtomicWrapper(FuncUnit, Elaboratable):
"""
Wrapper for LSU that adds support for atomic operations.
It provides simplified implementation of atomic operations under assumptions that:
* LSU doesn't reorder memory accesses, like in `LSUDummy`
* There is only one hart
AMO operations issue two independent accesses (unless there is an exception) to LSU and execute operations
in the internal ALU.
SC are only matched to LR, reservation set size is infinite.
Behaviour of atomic insturctions on Memory Mapped I/O space is currently undefined.
"""

def __init__(self, gen_params: GenParams, lsu: FuncUnit):
self.gen_params = gen_params
self.lsu = lsu
Expand Down

0 comments on commit 3580139

Please sign in to comment.