hwtLib.abstract.frame_utils.join package


hwtLib.abstract.frame_utils.join.fsm module

hwtLib.abstract.frame_utils.join.fsm.input_B_dst_to_fsm(word_bytes: int, input_cnt: int, input_B_dst: List[List[Set[Tuple[Tuple[int, int], int, int, int]]]], can_be_zero_len_frame: List[bool])[source]
  • word_bytes – number of bytes in output word

  • input_cnt – number of input streams

  • input_B_dst – list with mapping of input bytes to a output bytes in each state

Format of input_B_dst is: List for each input
    in this list there are lists for each input byte
        in this list there are sets of byte destinations for each input byte
            byte destination is a tuple:
                state label, input index, time index, output byte index, input last flag

input_B_dst is produced by hwtLib.amba.axis_comp.frame_utils.join.FrameJoinUtils.resolve_input_bytes_destinations()

hwtLib.abstract.frame_utils.join.fsm.is_from_different_input(a: Tuple[int, int, int, int], b: Tuple[int, int, int, int])[source]
hwtLib.abstract.frame_utils.join.fsm.is_next_byte_from_same_input(a: Tuple[int, int, int, int], b: Tuple[int, int, int, int])[source]

hwtLib.abstract.frame_utils.join.input_reg_val module

class hwtLib.abstract.frame_utils.join.input_reg_val.InputRegInputVal(parent_state_trans: StateTransItem)[source]

Bases: object

Container of values for FrameJoin input register

  • parent – the StateTransItem instance which is owning this object

  • keep – list of keep bits

  • relict – flag for word which was partially consumed

  • last – flag for end of frame

__init__(parent_state_trans: StateTransItem)[source]

Return repr(self).

classmethod from_dict(parent_state_trans, d: Dict)[source]

hwtLib.abstract.frame_utils.join.state_trans_info module

class hwtLib.abstract.frame_utils.join.state_trans_info.StateTransInfo(label, word_bytes, input_cnt)[source]

Bases: object

  • label – tuple(frame id, word id)

  • outputs – list of tuples (input index, input time, input byte index)

  • last_per_input – last flags for each input if last=1 the the input word is end of the actual frame (None = don’t care value)


Return self==value.

__hash__ = None
__init__(label, word_bytes, input_cnt)[source]

Return repr(self).

get_next_substate(sub_states: Dict[Tuple[int, int], hwtLib.abstract.frame_utils.join.state_trans_info.StateTransInfo]) Optional[hwtLib.abstract.frame_utils.join.state_trans_info.StateTransInfo][source]
get_state_i() int[source]

source state index for this state transition, min input index used when this state transition can happen

set_output(out_B_i, in_i, time, in_B_i, B_from_last_input_word)[source]

hwtLib.abstract.frame_utils.join.state_trans_item module

class hwtLib.abstract.frame_utils.join.state_trans_item.StateTransItem(parent_table: hwtLib.abstract.frame_utils.join.state_trans_table.StateTransTable, st_i: int, state_next_i: int, out_last: int)[source]

Bases: object

  • state – state label

  • input – specifies the input to a state transition

  • input_keep_mask – mask which will be applied to keep signal on input to the register

  • input_rd – ready for a input channel (if 1 the input stream will be shifted in)

  • output_keep – output keep values

  • out_byte_mux_sel – list of


input_keep_mask[0][0] = [1, 0] means reg0.in.keep = reg0.out.keep & 0b01


Deepcopy, but do not copy the parent


Return self==value.


Return hash(self).

__init__(parent_table: hwtLib.abstract.frame_utils.join.state_trans_table.StateTransTable, st_i: int, state_next_i: int, out_last: int)[source]

Return self<value.


Return repr(self).

classmethod from_dict(parent, d: Dict)[source]
inputs_exactly_different(other: hwtLib.abstract.frame_utils.join.state_trans_item.StateTransItem) bool[source]
hwtLib.abstract.frame_utils.join.state_trans_item._cmp_with_None_as_2(o0, o1)[source]

0 if o0 == o1, -1 if o0 < o1, 1 if o0 > o1

hwtLib.abstract.frame_utils.join.state_trans_table module

class hwtLib.abstract.frame_utils.join.state_trans_table.StateTransTable(word_bytes: int, max_lookahead_for_input: List[int], state_cnt: int)[source]

Bases: object

__init__(word_bytes: int, max_lookahead_for_input: List[int], state_cnt: int)[source]