hwtLib.abstract package

Submodules

hwtLib.abstract.addressStepTranslation module

class hwtLib.abstract.addressStepTranslation.AddressStepTranslation(src_addr_step: int = 8, dst_addr_step: int = 8)[source]

Bases: object

Variables
  • align_bits – number of bits on source/destination address which are addressing in a single word or other address

  • src_addr_step – how many bits is addressing one unit of src_addr_sig

  • dst_addr_step – how many bits is addressing one unit of dst_addr_sig

__init__(src_addr_step: int = 8, dst_addr_step: int = 8)[source]

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

propagate(src_addr_sig, dst_addr_sig, dst_offset: int = 0)[source]
Parameters
  • src_addr_sig – input signal with address

  • dst_addr_sig – output signal for address

hwtLib.abstract.busBridge module

class hwtLib.abstract.busBridge.BusBridge[source]

Bases: hwt.synthesizer.unit.Unit

Abstract class for bridges between two interface (not necesary different) types

Variables
  • s – slave interface of source interface class

  • m – master interface of destination interface class

hwtLib.abstract.busEndpoint module

class hwtLib.abstract.busEndpoint.BusEndpoint(structTemplate, intfCls=None, shouldEnterFn=None)[source]

Bases: hwt.synthesizer.unit.Unit

Abstract unit

Delegate request from bus to fields of structure (fields are represented by various interfaces) write has higher priority

Note

implementation is usually address decoder

_images/aafig-f17ac275ef5f07d42acf7872517bbff3483fb211.gif
__init__(structTemplate, intfCls=None, shouldEnterFn=None)[source]
Parameters
  • structTemplate – instance of HStruct which describes address space of this endpoint

  • intfCls – class of bus interface which should be used

  • shouldEnterFn – function(root_t, structFieldPath) return (shouldEnter, shouldUse) where shouldEnter is flag that means iterator over this interface should look inside of this actual object and shouldUse flag means that this field should be used (to create interface)

_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

static _defaultShouldEnterFn(root: hwt.hdl.types.hdlType.HdlType, field_path: Tuple[Union[str, int]])[source]

Default method which resolves how the parts of input data type should be represented on interface level.

_getAddrStep() → int[source]
Returns

how many bits does 1 address unit addresses, (e.g. AXI -> 8b, index to uint32_t[N] -> 32)

_getWordAddrStep() → int[source]
Returns

how many address units is one word on bus (e.g. 32b AXI -> 4)

_mkFieldInterface(structIntf: hwt.interfaces.structIntf.StructIntf, field: hwt.hdl.types.struct.HStructField)[source]

Instantiate field interface for fields in structure template of this endpoint

Returns

interface for specified field

_parseTemplate()[source]
_suggestedAddrWidth()[source]

Based on struct template resolve how many bits for address is needed

connectByInterfaceMap(interfaceMap: hwt.interfaces.intf_map.IntfMap)[source]

Connect “decoded” struct interface to interfaces specified in interface map

connect_directly_mapped_read(ar_addr: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, r_data: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, default_r_data_drive)[source]

Connect the RegCntrl.din interfaces to a bus

connect_directly_mapped_write(aw_addr: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, w_data: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, en: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal)[source]

Connect the RegCntrl.dout interfaces to a bus

classmethod fromInterfaceMap(interfaceMap)[source]

Generate converter by struct data type specified by interface map

Parameters

interfaceMaphwt.interfaces.intf_map.HTypeFromIntfMap()

getPort(transTmpl: hwt.hdl.transTmpl.TransTmpl)[source]
static intf_for_Bits(t)[source]
isInMyAddrRange(addr_sig)[source]
propagateAddr(src_addr_sig: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, src_addr_step: int, dst_addr_sig: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, dst_addr_step: int, transTmpl: hwt.hdl.transTmpl.TransTmpl)[source]
Parameters
  • src_addr_sig – input signal with address

  • src_addr_step – how many bits is addressing one unit of src_addr_sig

  • dst_addr_sig – output signal for address

  • dst_addr_step – how many bits is addressing one unit of dst_addr_sig

  • transTmpl – TransTmpl which has meta-informations about this address space transition

hwtLib.abstract.busEndpoint.TransTmpl_get_max_addr(t: hwt.hdl.transTmpl.TransTmpl)[source]
hwtLib.abstract.busEndpoint.TransTmpl_get_min_addr(t: hwt.hdl.transTmpl.TransTmpl)[source]

hwtLib.abstract.busInterconnect module

class hwtLib.abstract.busInterconnect.AUTO_ADDR[source]

Bases: object

constant which means that address should be picked automatically

class hwtLib.abstract.busInterconnect.BusInterconnect[source]

Bases: hwt.synthesizer.unit.Unit

Abstract class of bus interconnects

Variables
  • m – HObjList of master interfaces

  • s – HObjList of slave interfaces

_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

_normalize_config()[source]
getOptimalAddrSize()[source]
class hwtLib.abstract.busInterconnect.BusInterconnectUtils[source]

Bases: object

classmethod _assert_non_overlapping(slaves)[source]
classmethod _extract_separable_group(mi: int, seen_m: Set[int], masters_connected_to: List[Set[int]], slaves_connected_to: List[Set[int]])[source]

Transitive enclosure of master/stalave ports on connected relation (Extract a group of all ports which are somehow connected to each other)

classmethod _extract_separable_groups(MASTERS, SLAVES, access_type)[source]

Try to find independent subgraphs in conected master-slave ports on R/W channel separately

Parameters

access_type – READ or WRITE

classmethod _normalize_master_configs(MASTERS, SLAVES)[source]
_normalize_slave_configs(SLAVES, data_width=None)[source]

hwtLib.abstract.busStaticRemap module

class hwtLib.abstract.busStaticRemap.BusStaticRemap[source]

Bases: hwt.synthesizer.unit.Unit

Abstract class for component which remaps memory regions on bus interfaces

Variables
  • MEM_MAP – list of tuples (addr_from, size, addr_to) for each memory region on second interface

  • m – slave interface of first interface class where master should be connected

  • s – slave interface of second interface class where master slave be connected

_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

_normalize_mem_map(mem_map)[source]
translate_addr_signal(mem_map, sig_in, sig_out)[source]
translate_addr_val(mem_map, addr: int)[source]

hwtLib.abstract.componentBuilder module

class hwtLib.abstract.componentBuilder.AbstractComponentBuilder(parent, srcInterface, name=None, master_to_slave=True)[source]

Bases: object

Helper class which simplifies instantiation of commonly used components with configuration based on input/output interface

Variables
  • compId – used for sequential number of components

  • lastComp – last builded component

  • end – last interface of data-path

Attention

input port is taken from self.end

__init__(parent, srcInterface, name=None, master_to_slave=True)[source]
Parameters
  • parent – unit in which will be all units created by this builder instantiated

  • name – prefix for all instantiated units

  • srcInterface – start of data-path

  • master_to_slave – if True the circuit is build in natural direction (master to slave, input to output) othervise it is build in reverse direction

_findSuitableName(unitName)[source]

find suitable name for component (= name without collisions)

_getIntfCls(intf)[source]

Get real interface class of interface

_propagateClkRstn(u)[source]

Connect clock and reset to unit “u”

getClk()[source]

lookup clock signal on parent

getInfCls()[source]

Get class of interface which this builder is currently using.

getRstn()[source]

lookup reset(n) signal on parent

hwtLib.abstract.debug_bus_monitor module

class hwtLib.abstract.debug_bus_monitor.DebugBusMonitor(bus_cls, bus_endpoint_cls)[source]

Bases: hwt.synthesizer.unit.Unit

This component is similar to ILA/ChipScope/SignalTAP but it is not connected to internal JTAG, but to a specified interface. This component generates an address decoder and connect all specified interfaces to a service bus. It also stores the names and bit widths of original interfaces in a ROM in order to display them later in test application. This component also supports for snapshots of values by a generic trigger method, transaction counters etc.

Note

addressspace size depends on how much data is actually monitored. But it has fixed structure.

Example of name_memory JSON format:

__init__(bus_cls, bus_endpoint_cls)[source]

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

classmethod _build_name_memory(intf: hwt.synthesizer.interface.Interface, offset: int)[source]
_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

apply_connections()[source]

Connect a monitored interface to monitor ports of this component

build_name_memory(monitored_data: List[Tuple[hwt.synthesizer.interface.Interface, str]])[source]
build_name_memory_json(monitored_data: List[Tuple[hwt.synthesizer.interface.Interface, str]])[source]
register(intf: hwt.synthesizer.interface.Interface, name: Optional[str] = None, cdc: bool = False, trigger: Optional[hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal] = None, add_reg: bool = False)[source]
Parameters
  • intf – an interface to monitor

  • name – name override

  • cdc – if True instantiate Clock domain crossing to synchronize input data to clock domain of this component

  • trigger – an optional signal which triggers the snapshot of this interface

  • add_reg – if True an register is added between input and bus interface

Note

if cdc is set to True the trigger has to be synchonezed to a clock clock domain of intf

hwtLib.abstract.debug_bus_monitor.Interface_to_HdlType(intf: Union[hwt.synthesizer.interface.Interface, hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal], const=False)[source]
class hwtLib.abstract.debug_bus_monitor.MonitorIntf(template_interface)[source]

Bases: hwt.synthesizer.interface.Interface

Interfaces same as template interface, but with all signals as an input

__init__(template_interface)[source]

This constructor is called when constructing new interface, it is usually done manually while creating Unit or automatically while extracting interfaces from UnitWithSoure

Parameters
  • masterDir – direction which this interface should have for master

  • multiplyedBy – this can be instance of integer or Param, this mean the interface is array of the interfaces where multiplyedBy is the size

  • loadConfig – do load config in __init__

static _bound_intf(template_interface, cls=None)[source]
_config()[source]

Copy config from template interface

_declr()[source]

Create interfaces same as on template interface, but make them always input

class hwtLib.abstract.debug_bus_monitor.MonitorIntfReg(intfCls: Type[hwtLib.abstract.debug_bus_monitor.MonitorIntf])[source]

Bases: hwt.synthesizer.unit.Unit

__init__(intfCls: Type[hwtLib.abstract.debug_bus_monitor.MonitorIntf])[source]

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

_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

class hwtLib.abstract.debug_bus_monitor.MonitorIntfVldSynced(template_interface)[source]

Bases: hwt.interfaces.std.VldSynced

__init__(template_interface)[source]

This constructor is called when constructing new interface, it is usually done manually while creating Unit or automatically while extracting interfaces from UnitWithSoure

Parameters
  • masterDir – direction which this interface should have for master

  • multiplyedBy – this can be instance of integer or Param, this mean the interface is array of the interfaces where multiplyedBy is the size

  • loadConfig – do load config in __init__

_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

class hwtLib.abstract.debug_bus_monitor.MonitorIntfVldSyncedCdc(template_interface)[source]

Bases: hwtLib.clocking.vldSynced_cdc.VldSyncedCdc

__init__(template_interface)[source]
Parameters

template_interface – an Interface instance which will be monitored, used as template for this interface

hwtLib.abstract.debug_bus_monitor._connect_MonitorIntf(src: hwtLib.abstract.debug_bus_monitor.MonitorIntf, dst)[source]
hwtLib.abstract.debug_bus_monitor._connect_to_MonitorIntf(src, dst: hwtLib.abstract.debug_bus_monitor.MonitorIntf)[source]
hwtLib.abstract.debug_bus_monitor.connect_MonitorIntf(src: hwtLib.abstract.debug_bus_monitor.MonitorIntf, dst)[source]

Connect signal by signal and ignore the directions of struct interface (check only direction of low level signals)

hwtLib.abstract.debug_bus_monitor.connect_to_MonitorIntf(src, dst: hwtLib.abstract.debug_bus_monitor.MonitorIntf)[source]

Connect signal by signal and ignore the directions of struct interface (check only direction of low level signals)

hwtLib.abstract.debug_bus_monitor.monitor_of(intf: Union[hwt.synthesizer.interface.Interface, hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal])[source]

Create a monitor interface for specified interface (monitor interface is an interface which reads all signals of choosen interface)

hwtLib.abstract.discoverAddressSpace module

class hwtLib.abstract.discoverAddressSpace.AddressSpaceProbe(topIntf, getMainSigFn, offset=0)[source]

Bases: object

An object which can be used to discover an address space of an interface. Discovery is made by walking on address signal.

__init__(topIntf, getMainSigFn, offset=0)[source]
Parameters
  • topIntf – interface on which should discovery start

  • getMainSigFn – function which gets the main signal form interface which should this code care about usually address

_discoverAddressSpace(topIntf, offset)[source]
_extractStruct(converter, offset)[source]
_getMainSigFn(intf)[source]
walkToConverter(mainSig, offset)[source]

walk mainSig down to endpoints and search for any bus converter instances

Returns

generator of typles (offset, converter instance)

hwtLib.abstract.discoverAddressSpace.getEpSignal(sig, op)[source]
Parameters
  • sig – main signal

  • op – operator on this signal

Returns

signal modified by this operator or none if this operator is creating new datapath

hwtLib.abstract.discoverAddressSpace.getParentUnit(sig)[source]

hwtLib.abstract.sim_ram module

exception hwtLib.abstract.sim_ram.AllocationError[source]

Bases: Exception

Exception which says that requested allocation can not be performed

class hwtLib.abstract.sim_ram.SimRam(cellSize, parent=None)[source]

Bases: object

Dense memory for simulation purposes with data pump interfaces

Variables

data – memory dict

__init__(cellSize, parent=None)[source]
Parameters
  • cellWidth – width of items in memory

  • clk – clk signal for synchronization

  • parent – parent instance of SimRam (memory will be shared with this instance)

_getArray(offset, transTmpl)[source]
Parameters
  • offset – global offset of this transTmpl (and struct)

  • transTmpl – instance of TransTmpl which specifies items in array

_getStruct(offset, transTmpl)[source]
Parameters
  • offset – global offset of this transTmpl (and struct)

  • transTmpl – instance of TransTmpl which specifies items in struct

calloc(num, size, keepOut=None, initValues=None) → int[source]

Allocates a block of memory for an array of num elements, each of them size bytes long, and initializes all its bits to zero.

Parameters
  • num – Number of elements to allocate.

  • size – Size of each element.

  • keepOut – optional memory spacing between this memory region and lastly allocated (number of bit between last allocated segment to avoid)

  • initValues – iterable of word values to init memory with

Returns

address (byte step) of allocated memory

getArray(addr: int, item_size: int, item_cnt: int)[source]

Get array stored in memory

getBits(start, end)[source]

Gets value of bits between selected range from memory

Parameters
  • start – bit address of start of bit of bits

  • end – bit address of first bit behind bits

Returns

instance of BitsVal (derived from SimBits type) which contains copy of selected bits

getStruct(addr, structT, bitAddr=None)[source]

Get HStruct from memory

Parameters
  • addr – address where get struct from

  • structT – instance of HStruct or FrameTmpl generated from it to resolve structure of data

  • bitAddr – optional bit precise address is is not None param addr has to be None

malloc(size, keepOut=None)[source]

Allocates a block of memory of size and initialize it with None (invalid value)

Parameters
  • size – Size of memory block to allocate.

  • keepOut – optional memory spacing between this memory region and lastly allocated

Returns

address of allocated memory

hwtLib.abstract.sim_ram.reshapedInitItems(actualCellSize, requestedCellSize, values)[source]

Convert array item size and items cnt while size of array remains unchanged

Parameters
  • actualCellSize – actual size of item in array

  • requestedCellSize – requested size of item in array

  • values – input array

Returns

generator of new items of specified characteristic

hwtLib.abstract.streamBuilder module

class hwtLib.abstract.streamBuilder.AbstractStreamBuilder(parent, srcInterface, name=None, master_to_slave=True)[source]

Bases: hwtLib.abstract.componentBuilder.AbstractComponentBuilder

Note

see AbstractComponentBuilder

Attention

this is just abstract class unit classes has to be specified in concrete implementation

Variables
  • FifoCls – FIFO unit class

  • FifoAsyncCls – asynchronous FIFO (FIFO with separate clock per port) unit class

  • JoinSelectCls – select order based join unit class

  • JoinFairCls – round robin based join unit class

  • JoinPrioritizedCls – priority based join unit class

  • RegCls – register unit class

  • RegCdcCls – Clock domain crossing register unit class

  • ResizerCls – resizer unit class (used to change data width of an interface)

  • SplitCopyCls – copy based split unit class

  • SplitSelectCls – select order based split unit class (demultiplexer)

  • SplitFairCls – round robin based split unit class

  • SplitPrioritizedCls – priority based split unit class

FifoAsyncCls = NotImplemented
FifoCls = NotImplemented
JoinFairCls = NotImplemented
JoinPrioritizedCls = NotImplemented
JoinSelectCls = NotImplemented
RegCls = NotImplemented
ResizerCls = NotImplemented
SplitCopyCls = NotImplemented
SplitFairCls = NotImplemented
SplitPrioritizedCls = NotImplemented
SplitSelectCls = NotImplemented
_genericInstance(unit_cls, name, set_params=<function AbstractStreamBuilder.<lambda>>, update_params=True, propagate_clk_rst=True)[source]

Instantiate generic component and connect basics

Parameters
  • unit_cls – class of unit which is being created

  • name – name for unit_cls instance

  • set_params – function which updates parameters as is required (parameters are already shared with self.end interface)

classmethod _join(joinCls, parent, srcInterfaces, name, configAs, extraConfigFn)[source]

Create builder from many interfaces by joining them together

Parameters
  • joinCls – join component class which should be used

  • parent – unit where builder should place components

  • srcInterfacecs – sequence of interfaces which should be joined together (lower index = higher priority)

  • configureAs – interface or another object which configuration should be applied

  • extraConfigFn – function which is applied on join unit in configuration phase (can be None)

buff(items=1, latency=None, delay=None)[source]

Use registers and FIFOs to create buffer of specified parameters :note: if items <= latency registers are used else FIFO is used

Parameters
  • items – number of items in buffer

  • latency – latency of buffer (number of clk ticks required to get data from input to input)

  • delay – delay of buffer (number of clk ticks required to get data to buffer)

Note

delay can be used as synchronization method or to solve timing related problems because it will split valid signal path

Note

if latency or delay is None the most optimal value is used

buff_cdc(clk, rst, items=1)[source]

Instantiate a CDC (Clock Domain Crossing) buffer or AsyncFifo on selected interface

Note

if items==1 CDC clock synchronization register is used if items>1 asynchronous FIFO is used

classmethod join_fair(parent, srcInterfaces, name=None, configAs=None, exportSelected=False)[source]

create builder from fairly joined interfaces (round robin for input select)

Parameters

exportSelected – if True join component will have handshaked interface with index of selected input

Note

other parameters same as in .AbstractStreamBuilder._join

classmethod join_prioritized(parent, srcInterfaces, name=None, configAs=None, extraConfigFn=None)[source]

create builder from fairly joined interfaces (round robin for input select)

Note

other parameters same as in .AbstractStreamBuilder._join

split_copy(noOfOutputs)[source]

Clone input data to all outputs

Parameters

noOfOutputs – number of output interfaces of the split

split_copy_to(*outputs)[source]

Same like split_copy, but outputs are automatically connected

Parameters

outputs – ports on which should be outputs of split component connected to

split_fair(noOfOutputs, exportSelected=False)[source]

Create a round robin selector with number of outputs specified by noOfOutputs

Parameters
  • noOfOutputs – number of outputs of multiplexer

  • exportSelected – if is True split component will have interface “selectedOneHot” of type VldSynced wich will have one hot index of selected item

split_fair_to(*outputs, exportSelected=False)[source]

Same like split_fair, but outputs are automatically connected

Parameters
  • outputs – ports on which should be outputs of split component connected to

  • exportSelected – if is True split component will have interface “selectedOneHot” of type VldSynced which will have one hot index of selected item

split_prioritized(noOfOutputs)[source]

data from input is send to output which is ready and has highest priority from all ready outputs

Parameters

noOfOutputs – number of output interfaces of the fork

split_prioritized_to(*outputs)[source]

Same like split_prioritized, but outputs are automatically connected

Parameters

outputs – ports on which should be outputs of split component connected to

split_select(outputSelSignalOrSequence, noOfOutputs)[source]

Create a demultiplexer with number of outputs specified by noOfOutputs

Parameters
  • noOfOutputs – number of outputs of multiplexer

  • outputSelSignalOrSequence – handshaked interface (onehot encoded) to control selected output or sequence of output indexes which should be used (will be repeated)

split_select_to(outputSelSignalOrSequence, *outputs)[source]

Same like split_select, but outputs are automatically connected

Parameters

outputs – ports on which should be outputs of split component connected to

hwtLib.abstract.template_configured module

hwtLib.abstract.template_configured.HdlType_separate(t: hwt.hdl.types.hdlType.HdlType, do_separate_query: Callable[[hwt.hdl.types.hdlType.HdlType], bool]) → Generator[Tuple[bool, hwt.hdl.types.hdlType.HdlType], None, None][source]

Split HStruct type hierachy on the specified fields to multiple type definitions.

class hwtLib.abstract.template_configured.TemplateConfigured(structT: hwt.hdl.types.hdlType.HdlType, tmpl: Optional[hwt.hdl.transTmpl.TransTmpl] = None, frames: Optional[List[hwt.hdl.frameTmpl.FrameTmpl]] = None)[source]

Bases: object

Class with functions for extracting metadata from frame template/HdlType. Used for resolving of data mapping between abstract type and physical interface.

__init__(structT: hwt.hdl.types.hdlType.HdlType, tmpl: Optional[hwt.hdl.transTmpl.TransTmpl] = None, frames: Optional[List[hwt.hdl.frameTmpl.FrameTmpl]] = None)[source]
Parameters
  • structT – instance of HStruct used as template for this frame If name is None no input port is generated and space is filled with invalid values, little-endian encoding, supported types of interfaces are: Handshaked, Signal can be also instance of FrameTmpl

  • tmpl – instance of TransTmpl for this structT

  • frames – list of FrameTmpl instances for this tmpl

Note

if tmpl and frames are None they are resolved from structT parseTemplate

chainFrameWords()[source]
parseTemplate()[source]
hwtLib.abstract.template_configured.separate_streams(t: hwt.hdl.types.hdlType.HdlType)[source]

Split HStruct type hierarchy on the fields of HStream type.

Note

e.g. in HStruct( (HStream(Bits(8)), “data”), (Bits(32), “fcs”), ) is split to HStruct((HStream(Bits(8)), “data”),) and HStruct((Bits(32), “fcs”),)

hwtLib.abstract.template_configured.to_primitive_stream_t(t: hwt.hdl.types.hdlType.HdlType)[source]

Convert type to a HStream of Bits With proper frame len, offset etc.