IRON 1a5eed49d3c0721a318ac369f725acc96b7c4584
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
iron.lock.Lock Class Reference
Inheritance diagram for iron.lock.Lock:
Inheritance graph
[legend]
Collaboration diagram for iron.lock.Lock:
Collaboration graph
[legend]

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()
 

Detailed Description

A named hardware lock on a specific tile.

Constructor & Destructor Documentation

◆ __init__()

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.

Member Function Documentation

◆ acquire()

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.

◆ acquire_exact()

None iron.lock.Lock.acquire_exact (   self,
int   value = 1 
)
Emit ``aie.use_lock(self, Acquire, value=value)`` (exact match).

◆ name()

str iron.lock.Lock.name (   self)

◆ op()

iron.lock.Lock.op (   self)

◆ release()

None iron.lock.Lock.release (   self,
int   value = 1 
)
Emit ``aie.use_lock(self, Release, value=value)``.

◆ resolve()

None iron.lock.Lock.resolve (   self,
ir.Location | None   loc = None,
ir.InsertionPoint | None   ip = None 
)

◆ tile()

Tile iron.lock.Lock.tile (   self)

Member Data Documentation

◆ _glock_index

iron.lock.Lock._glock_index = itertools.count()
staticprotected

◆ _init

iron.lock.Lock._init
protected

◆ _lock_id

iron.lock.Lock._lock_id
protected

◆ _name

iron.lock.Lock._name
protected

◆ _op

iron.lock.Lock._op
protected

◆ _tile

iron.lock.Lock._tile
protected

◆ op

iron.lock.Lock.op

The documentation for this class was generated from the following file: