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(*, src_loc_at: int = 0) Operator¶
Check if all bits are
1.- Return type:
- Returns:
Operator –
1if all bits are set,0otherwise.
- any(*, src_loc_at: int = 0) Operator¶
Check if any bits are
1.- Return type:
- Returns:
Operator –
1if any bits are set,0otherwise.
- as_signed(*, src_loc_at: int = 0) Operator¶
Conversion to signed.
- Return type:
- Returns:
Operator – This
Valuereinterpreted as a signed integer.
- as_unsigned(*, src_loc_at: int = 0) Operator¶
Conversion to unsigned.
- Return type:
- Returns:
Operator – This
Valuereinterpreted as a unsigned integer.
- bit_select(offset: Value | int, width: int, *, src_loc_at: int = 0) 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(*, src_loc_at: int = 0) Operator¶
Conversion to boolean.
- Return type:
- Returns:
Operator –
1if any bits are set,0otherwise.
- eq(value: Value | int | bool | EnumType | ValueCastable | ValueLike, *, src_loc_at: int = 0) Assign¶
Assignment.
- implies(conclusion: Value | int | bool | EnumType | ValueCastable | ValueLike, *, src_loc_at: int = 0) Operator¶
Implication.
- Return type:
- Returns:
Operator –
0ifpremiseis true andconclusionis not,1otherwise.
- matches(*patterns: int | str | EnumType, src_loc_at: int = 0) 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, *, src_loc_at: int = 0) 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(*, src_loc_at: int = 0) 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