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.AxiS_frameParserFieldConnector(parent: hwt.synthesizer.unit.Unit, dataIn: hwtLib.amba.axis.AxiStream, dataOut: Union[hwt.interfaces.structIntf.StructIntf, hwt.interfaces.unionIntf.UnionSource])[source]

Bases: object

__init__(parent: hwt.synthesizer.unit.Unit, dataIn: hwtLib.amba.axis.AxiStream, dataOut: Union[hwt.interfaces.structIntf.StructIntf, hwt.interfaces.unionIntf.UnionSource])[source]

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

choiceIsSelected(interfaceOfChoice: Union[hwt.interfaces.unionIntf.UnionSource, hwt.interfaces.unionIntf.UnionSink])[source]

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

connectChoicesOfFrameParts(hsNondes: hwtLib.amba.axis_comp.frame_parser.out_containers.ListOfOutNodeInfos, part: hwt.hdl.frameTmplUtils.ChoicesOfFrameParts, en: Union[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, bool], exclusiveEn: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal], wordIndex: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal], currentWordIndex: int)[source]
connectPart(hsNondes: hwtLib.amba.axis_comp.frame_parser.out_containers.ListOfOutNodeInfos, part: Union[hwt.hdl.transPart.TransPart, hwt.hdl.frameTmplUtils.ChoicesOfFrameParts], en: Union[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, bool], exclusiveEn: Union[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, bool], wordIndex: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal], 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: hwtLib.amba.axis_comp.frame_parser.out_containers.ListOfOutNodeInfos, words, wordIndex: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal])[source]

Create main datamux from dataIn to dataOut

connectStreamOfFrameParts(hsNondes: hwtLib.amba.axis_comp.frame_parser.out_containers.ListOfOutNodeInfos, part: Union[hwt.hdl.transPart.TransPart, hwt.hdl.frameTmplUtils.ChoicesOfFrameParts], en: Union[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, bool], exclusiveEn: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal], wordIndex: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal], currentWordIndex: int)[source]
getInDataSignal(transPart: hwt.hdl.transPart.TransPart)[source]
hwtLib.amba.axis_comp.frame_parser.field_connector.get_byte_order_modifier(axis: hwtLib.amba.axis.AxiStream)[source]

hwtLib.amba.axis_comp.frame_parser.footer_split module

class hwtLib.amba.axis_comp.frame_parser.footer_split.AxiS_footerSplit(intfCls=<class 'hwtLib.amba.axis.AxiStream'>)[source]

Bases: hwtLib.amba.axis_comp.base.AxiSCompBase

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

Attention

this component does not solve an alignment of output streams

HStruct(
    (HStream(uint8_t, frame_len=(1, inf)), "dataIn[0]"),
    (HStream(Bits(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].

Note

The design is pipelined and the data can loaded in to internal registers imediadetely as soon as there is some space. There is no inter-frame delay.

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance

  • called in __init__ of class

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)

  • _declr method is called after _config

  • if this object is Unit all interfaces are threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_impl()[source]

implementations

  • implement functionality of componnent there

  • called after _declr

flush_en_logic(regs)[source]
generate_regs(LOOK_AHEAD) → List[Tuple[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal]][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 selectorIntf: selector for this node

__init__(selectorIntf)[source]

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

ack() → hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal[source]
append(selectorVal, item)[source]

Append object to the end of the list.

sync(allNodes: List[hwtLib.amba.axis_comp.frame_parser.out_containers.OutNodeInfo], en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, din_vld: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal) → None[source]
class hwtLib.amba.axis_comp.frame_parser.out_containers.InNodeInfo(inInterface: hwt.interfaces.std.Handshaked, en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal)[source]

Bases: object

Interface has to be ready and handshaked logic should be constructed

__init__(inInterface: hwt.interfaces.std.Handshaked, en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal)[source]

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

ack() → hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal[source]
sync(others: List[OutNodeInfo], en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, in_vld: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal)[source]
class hwtLib.amba.axis_comp.frame_parser.out_containers.InNodeReadOnlyInfo(inInterface: hwt.interfaces.std.Handshaked, en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal)[source]

Bases: hwtLib.amba.axis_comp.frame_parser.out_containers.InNodeInfo

Interface has to be ready but handshake logic is not constructed

sync(others: List[OutNodeInfo], en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, in_vld: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal)[source]
class hwtLib.amba.axis_comp.frame_parser.out_containers.ListOfOutNodeInfos(iterable=(), /)[source]

Bases: list

ack() → hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal[source]
sync(allNodes: List[hwtLib.amba.axis_comp.frame_parser.out_containers.OutNodeInfo], en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, din_vld: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal) → None[source]
class hwtLib.amba.axis_comp.frame_parser.out_containers.OutNodeInfo(parent: hwt.synthesizer.unit.Unit, outInterface: Union[hwt.interfaces.std.Handshaked, hwt.interfaces.std.VldSynced], en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, exclusiveEn: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal])[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: hwt.synthesizer.unit.Unit, outInterface: Union[hwt.interfaces.std.Handshaked, hwt.interfaces.std.VldSynced], en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, exclusiveEn: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal])[source]

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

_sync(others: List[OutNodeInfo], en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, din_vld: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal)[source]
Returns

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

ack() → hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal[source]
sync(others: List[OutNodeInfo], en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, din_vld: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal)[source]
class hwtLib.amba.axis_comp.frame_parser.out_containers.OutStreamNodeGroup(word_index: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal], word_index_start: int)[source]

Bases: object

__init__(word_index: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal], word_index_start: int)[source]

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

class hwtLib.amba.axis_comp.frame_parser.out_containers.OutStreamNodeInfo(parent: hwt.synthesizer.unit.Unit, outInterface: hwtLib.amba.axis.AxiStream, en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, exclusiveEn: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal], streamGroup: hwtLib.amba.axis_comp.frame_parser.out_containers.OutStreamNodeGroup)[source]

Bases: hwtLib.amba.axis_comp.frame_parser.out_containers.OutNodeInfo

__init__(parent: hwt.synthesizer.unit.Unit, outInterface: hwtLib.amba.axis.AxiStream, en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, exclusiveEn: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal], streamGroup: hwtLib.amba.axis_comp.frame_parser.out_containers.OutStreamNodeGroup)[source]

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

is_in_word_range(range_min: int, range_max: int)[source]
sync(others: List[OutNodeInfo], en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, din_vld: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal)[source]
hwtLib.amba.axis_comp.frame_parser.out_containers.getAckOfOthers(self: hwtLib.amba.axis_comp.frame_parser.out_containers.OutNodeInfo, others: List[hwtLib.amba.axis_comp.frame_parser.out_containers.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: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal])[source]

Bases: object

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

__init__(wordIndexReg: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal])[source]

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

_getAck_no_wordIndex(x)[source]
_getAck_with_wordIndex(x)[source]
ack() → hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal[source]
addWord(index, hsNodes)[source]
sync(en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, din_vld: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal) → None[source]