hwtLib.abstract.frame_utils.join package

Submodules

hwtLib.abstract.frame_utils.join.fsm module

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

min input index used during state

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]]]])[source]
Parameters
  • 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
Note

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

Variables
  • parent – the StateTransItem instance which is owning this object

  • keep – list of keep bites

  • relict – flag for word which was partially consummed

  • last – flag for end of frame

__init__(parent_state_trans: StateTransItem)[source]

Initialize self. See help(type(self)) for accurate signature.

as_tuple()[source]
classmethod from_dict(parent_state_trans, d: Dict)[source]
is_exactly_different(other)[source]
hwtLib.abstract.frame_utils.join.input_reg_val.val__repr__None_as_X(v)[source]
hwtLib.abstract.frame_utils.join.input_reg_val.val_replace_X_with_None(v)[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

Variables
  • 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)

__init__(label, word_bytes, input_cnt)[source]

Initialize self. See help(type(self)) for accurate signature.

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)[source]

Bases: object

__init__(parent_table)[source]

Initialize self. See help(type(self)) for accurate signature.

as_tuple()[source]
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]
Returns

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)[source]

Bases: object

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

Initialize self. See help(type(self)) for accurate signature.

assert_transitions_deterministic()[source]
filter_unique_state_trans()[source]