Records¶
- class torii.hdl.rec.Record(layout: LayoutFieldT | None = None, *, name: str | None = None, fields=None, src_loc_at: int = 0) None ¶
Todo
Document Me
- static like(other: Record, *, name=None, name_suffix=None, src_loc_at=0) Record ¶
- Return type:
Todo
Document Me
- all() Operator ¶
Check if all bits are
1
.- Return type:
- Returns:
Operator –
1
if all bits are set,0
otherwise.
- any() Operator ¶
Check if any bits are
1
.- Return type:
- Returns:
Operator –
1
if any bits are set,0
otherwise.
- as_signed() Operator ¶
Conversion to signed.
- Return type:
- Returns:
Operator – This
Value
reinterpreted as a signed integer.
- as_unsigned() Operator ¶
Conversion to unsigned.
- Return type:
- Returns:
Operator – This
Value
reinterpreted as a unsigned integer.
- bit_select(offset: Value | int, width: int) Value ¶
Part-select with bit granularity.
Selects a constant width but variable offset part of a
Value
, such that successive parts overlap by all but 1 bit.
- bool() Operator ¶
Conversion to boolean.
- Return type:
- Returns:
Operator –
1
if any bits are set,0
otherwise.
- implies(conclusion: Value | int | bool | EnumType | ValueCastable | ValueLike) Operator ¶
Implication.
- Return type:
- Returns:
Operator –
0
ifpremise
is true andconclusion
is not,1
otherwise.
- matches(*patterns: int | str | EnumType) Value ¶
Pattern matching.
Matches against a set of patterns, which may be integers or bit strings, recognizing the same grammar as
Case()
.
- word_select(offset: Value | int, width: int) Value ¶
Part-select with word granularity.
Selects a constant width but variable offset part of a
Value
, such that successive parts do not overlap.
- xor() Operator ¶
Compute pairwise exclusive-or of every bit.
- Return type:
- Returns:
Operator –
1
if an odd number of bits are set,0
if an even number of bits are set.
- connect(*subordinates, include=None, exclude=None)¶
Todo
Document Me