hwtLib.amba.axis_comp.frame_parser package

Submodules

hwtLib.amba.axis_comp.frame_parser.field_connector module

class hwtLib.amba.axis_comp.frame_parser.field_connector.Axi4S_frameParserFieldConnector(parent: HwModule, dataIn: Axi4Stream, dataOut: HwIOStruct | HwIOUnionSource)[source]

Bases: object

__init__(parent: HwModule, dataIn: Axi4Stream, dataOut: HwIOStruct | HwIOUnionSource)[source]
choiceIsSelected(interfaceOfChoice: HwIOUnionSource | HwIOUnionSink)[source]

Check if union member is selected by _select interface in union interface

connectChoicesOfFrameParts(hsNondes: ListOfOutNodeInfos, part: ChoicesOfFrameParts, en: RtlSignal | bool, exclusiveEn: RtlSignal | None, wordIndex: RtlSignal | None, currentWordIndex: int)[source]
connectPart(hsNondes: ListOfOutNodeInfos, part: TransPart | ChoicesOfFrameParts, en: RtlSignal | bool, exclusiveEn: RtlSignal | bool, wordIndex: RtlSignal | None, currentWordIndex: int)[source]

Create datamux for a single output word in main fsm and colect metainformations for handshake logic and strb/keep

Parameters:

hsNondes – list of nodes of handshaked logic

connectParts(allOutNodes: ListOfOutNodeInfos, words: Tuple[int, List[TransPart | ChoicesOfFrameParts], bool], wordIndex: RtlSignal | None)[source]

Create main datamux from dataIn to dataOut

connectStreamOfFrameParts(hsNondes: ListOfOutNodeInfos, part: TransPart | ChoicesOfFrameParts, en: RtlSignal | bool, exclusiveEn: RtlSignal | None, wordIndex: RtlSignal | None, currentWordIndex: int)[source]
getInDataSignal(transPart: TransPart)[source]
hwtLib.amba.axis_comp.frame_parser.field_connector.get_byte_order_modifier(axis: Axi4Stream)[source]

hwtLib.amba.axis_comp.frame_parser.footer_split module

class hwtLib.amba.axis_comp.frame_parser.footer_split.Axi4S_footerSplit(hwIOCls=<class 'hwtLib.amba.axi4s.Axi4Stream'>, hdlName: str | None = None)[source]

Bases: Axi4SCompBase

Split a constant size footer and prefix data from a input frame.

HStruct(
    (HStream(uint8_t, frame_len=(1, inf)), "dataIn[0]"),
    (HStream(HBits(self.FOOTER_SIZE), , frame_len=1), "dataIn[1]"),
)

Functionality:

First the data is loaded to internal registers, if this data overflows it is passed to dataOut[0]. Once last word is fond the mask of boundary word is resolved and data is send to dataOut[0] and [1]. Then the rest of data in registers is send on dataOut[1].

HDL params:
  • HWIO_CLS - default value <class ‘hwtLib.amba.axi4s.Axi4Stream’> of type type

  • IS_BIGENDIAN - default value False of type bool

  • USE_STRB - default value True of type bool

  • USE_KEEP - default value False of type bool

  • ID_WIDTH - default value 0 of type int

  • DEST_WIDTH - default value 0 of type int

  • DATA_WIDTH - default value 8 of type int

  • USER_WIDTH - default value 0 of type int

  • FOOTER_WIDTH - default value 8 of type int

HDL IO:
  • clk - of type hwt.hwIOs.std.HwIOClk with dtype=<HBits, 1bit> - SLAVE

  • rst_n - of type hwt.hwIOs.std.HwIORst_n with dtype=<HBits, 1bit, n> - SLAVE

  • dataIn - of type hwtLib.amba.axi4s.Axi4Stream - SLAVE

  • dataOut - of type hwt.hwIOs.hwIOArray.HwIOArray - MASTER

schematic
__annotations__ = {}
flush_en_logic(regs)[source]
generate_regs(LOOK_AHEAD: int) List[Tuple[RtlSignal, RtlSignal, RtlSignal, RtlSignal, RtlSignal]][source]
hwtLib.amba.axis_comp.frame_parser.footer_split._example_Axi4S_footerSplit()[source]

hwtLib.amba.axis_comp.frame_parser.out_containers module

class hwtLib.amba.axis_comp.frame_parser.out_containers.ExclusieveListOfHsNodes(selectorIntf)[source]

Bases: list

@ivar selectorHwIO: selector for this node

__init__(selectorIntf)[source]
ack() RtlSignal[source]
append(selectorVal, item)[source]

Append object to the end of the list.

sync(allNodes: List[OutNodeInfo], en: RtlSignal, din_vld: RtlSignal) None[source]
class hwtLib.amba.axis_comp.frame_parser.out_containers.InNodeInfo(inInterface: HwIODataRdVld, en: RtlSignal)[source]

Bases: object

Interface has to be ready and handshaked logic should be constructed

__init__(inInterface: HwIODataRdVld, en: RtlSignal)[source]
ack() RtlSignal[source]
sync(others: List[OutNodeInfo], en: RtlSignal, in_vld: RtlSignal)[source]
class hwtLib.amba.axis_comp.frame_parser.out_containers.InNodeReadOnlyInfo(inInterface: HwIODataRdVld, en: RtlSignal)[source]

Bases: InNodeInfo

Interface has to be ready but handshake logic is not constructed

__annotations__ = {}
sync(others: List[OutNodeInfo], en: RtlSignal, in_vld: RtlSignal)[source]
class hwtLib.amba.axis_comp.frame_parser.out_containers.ListOfOutNodeInfos(iterable=(), /)[source]

Bases: list

ack() RtlSignal[source]
sync(allNodes: List[OutNodeInfo], en: RtlSignal, din_vld: RtlSignal) None[source]
class hwtLib.amba.axis_comp.frame_parser.out_containers.OutNodeInfo(parent: HwModule, outInterface: HwIODataRdVld | HwIODataVld, en: RtlSignal, exclusiveEn: RtlSignal | None)[source]

Bases: object

Container for informations about output for handshake logic

Variables:
  • ~.outInterface – output parsed interface

  • ~.en – enable signal of word

  • ~.exvlusiveEn – enable signal of union member

__init__(parent: HwModule, outInterface: HwIODataRdVld | HwIODataVld, en: RtlSignal, exclusiveEn: RtlSignal | None)[source]
__repr__()[source]

Return repr(self).

_sync(others: List[OutNodeInfo], en: RtlSignal, din_vld: RtlSignal)[source]
Returns:

output validity signal which is checked if data from this word was previously consumed

ack() RtlSignal[source]
sync(others: List[OutNodeInfo], en: RtlSignal, din_vld: RtlSignal)[source]
class hwtLib.amba.axis_comp.frame_parser.out_containers.OutStreamNodeGroup(word_index: RtlSignal | None, word_index_start: int)[source]

Bases: object

__init__(word_index: RtlSignal | None, word_index_start: int)[source]
class hwtLib.amba.axis_comp.frame_parser.out_containers.OutStreamNodeInfo(parent: HwModule, outInterface: Axi4Stream, en: RtlSignal, exclusiveEn: RtlSignal | None, streamGroup: OutStreamNodeGroup)[source]

Bases: OutNodeInfo

__annotations__ = {}
__init__(parent: HwModule, outInterface: Axi4Stream, en: RtlSignal, exclusiveEn: RtlSignal | None, streamGroup: OutStreamNodeGroup)[source]
is_in_word_range(range_min: int, range_max: int)[source]
sync(others: List[OutNodeInfo], en: RtlSignal, din_vld: RtlSignal)[source]
hwtLib.amba.axis_comp.frame_parser.out_containers.getAckOfOthers(self: OutNodeInfo, others: List[OutNodeInfo])[source]

hwtLib.amba.axis_comp.frame_parser.test_types module

hwtLib.amba.axis_comp.frame_parser.word_factory module

class hwtLib.amba.axis_comp.frame_parser.word_factory.WordFactory(wordIndexReg: RtlSignal | None)[source]

Bases: object

An object which sotres information about synchronization of input words for FrameParser instances

__init__(wordIndexReg: RtlSignal | None)[source]
_getAck_no_wordIndex(x)[source]
_getAck_with_wordIndex(x)[source]
ack() RtlSignal[source]
addWord(index, hsNodes)[source]
sync(en: RtlSignal, din_vld: RtlSignal) None[source]