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 –
1if all bits are set,0otherwise.
- any() Operator¶
Check if any bits are
1.- Return type:
- Returns:
Operator –
1if any bits are set,0otherwise.
- as_signed() Operator¶
Conversion to signed.
- Return type:
- Returns:
Operator – This
Valuereinterpreted as a signed integer.
- as_unsigned() Operator¶
Conversion to unsigned.
- Return type:
- Returns:
Operator – This
Valuereinterpreted 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 –
1if any bits are set,0otherwise.
- implies(conclusion: Value | int | bool | EnumType | ValueCastable | ValueLike) Operator¶
Implication.
- Return type:
- Returns:
Operator –
0ifpremiseis true andconclusionis not,1otherwise.
- 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 –
1if an odd number of bits are set,0if an even number of bits are set.
- connect(*subordinates, include=None, exclude=None)¶
Todo
Document Me