|
IRON 1a5eed49d3c0721a318ac369f725acc96b7c4584
|


Public Member Functions | |
| __init__ (self, Tile tile, int|None lock_id=None, int init=0, str|None name=None) | |
| Tile | tile (self) |
| str | name (self) |
| op (self) | |
| None | resolve (self, ir.Location|None loc=None, ir.InsertionPoint|None ip=None) |
| None | acquire (self, int value=1) |
| None | acquire_exact (self, int value=1) |
| None | release (self, int value=1) |
Public Attributes | |
| op | |
Protected Attributes | |
| _tile | |
| _lock_id | |
| _init | |
| _name | |
| _op | |
Static Protected Attributes | |
| _glock_index = itertools.count() | |
A named hardware lock on a specific tile.
| iron.lock.Lock.__init__ | ( | self, | |
| Tile | tile, | ||
| int | None | lock_id = None, |
||
| int | init = 0, |
||
| str | None | name = None |
||
| ) |
Construct a Lock.
Args:
tile (Tile): The tile that owns this lock.
lock_id (int | None): Hardware lock ID; passed straight through to
the underlying ``aie.lock`` op. If ``None`` (the default),
the lowering pass picks one.
init (int): Initial lock value at design startup. Defaults to 0.
name (str | None): Symbol name for the lock. A unique name is
generated if not provided.
| None iron.lock.Lock.acquire | ( | self, | |
| int | value = 1 |
||
| ) |
Emit ``aie.use_lock(self, AcquireGreaterEqual, value=value)``. The default ``AcquireGreaterEqual`` mode matches what almost every ObjectFifo / DMA-driven design wants; use :meth:`acquire_exact` for the rarer ``Acquire`` (exact-equality) mode.
| None iron.lock.Lock.acquire_exact | ( | self, | |
| int | value = 1 |
||
| ) |
Emit ``aie.use_lock(self, Acquire, value=value)`` (exact match).
| str iron.lock.Lock.name | ( | self | ) |
| iron.lock.Lock.op | ( | self | ) |
| None iron.lock.Lock.release | ( | self, | |
| int | value = 1 |
||
| ) |
Emit ``aie.use_lock(self, Release, value=value)``.
| None iron.lock.Lock.resolve | ( | self, | |
| ir.Location | None | loc = None, |
||
| ir.InsertionPoint | None | ip = None |
||
| ) |
| Tile iron.lock.Lock.tile | ( | self | ) |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| iron.lock.Lock.op |