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
__init__
(structTemplate, intfCls=None, shouldEnterFn=None)[source]¶Parameters: |
|
---|
_config
()[source]¶Configure object parameters
_declr
()[source]¶declarations
_mkFieldInterface
(structIntf, field)[source]¶Instantiate field interface for fields in structure template of this endpoint
Returns: | interface for specified field |
---|
connectByInterfaceMap
(interfaceMap)[source]¶Connect “decoded” struct interface to interfaces specified in iterface map
Parameters: | interfaceMap – list of interfaces or tuple (type or interface, name) |
---|
fromInterfaceMap
(interfaceMap)[source]¶Generate converter by specified struct
Parameters: | interfaceMap – take a look at HTypeFromIntfMap if interface is specified it will be automatically connected |
---|
propagateAddr
(srcAddrSig: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, srcAddrStep: int, dstAddrSig: hwt.synthesizer.rtlLevel.rtlSignal.RtlSignal, dstAddrStep: int, transTmpl: hwt.hdl.transTmpl.TransTmpl)[source]¶Parameters: |
|
---|
hwtLib.abstract.denseMemory.
AllocationError
[source]¶Bases: Exception
Exception which says that requested allocation can not be performed
hwtLib.abstract.denseMemory.
DenseMemory
(cellWidth, clk, rDatapumpIntf=None, wDatapumpIntf=None, parent=None)[source]¶Bases: object
Dense memory for simulation purposes with datapump interfaces
Variables: | data – memory dict |
---|
__init__
(cellWidth, clk, rDatapumpIntf=None, wDatapumpIntf=None, parent=None)[source]¶Parameters: |
|
---|
_getStruct
(offset, transTmpl)[source]¶Parameters: |
|
---|
calloc
(num, size, keepOut=None, initValues=None)[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: |
|
---|---|
Returns: | address of allocated memory |
getBits
(start, end)[source]¶Gets value of bits between selected range from memory
Parameters: |
|
---|---|
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: |
|
---|
hwtLib.abstract.denseMemory.
reshapedInitItems
(actualCellSize, requestedCellSize, values)[source]¶Convert array item size and items cnt while size of array remains unchanged
Parameters: |
|
---|---|
Returns: | generator of new items of specified characteristik |
hwtLib.abstract.discoverAddressSpace.
AddressSpaceProbe
(topIntf, getMainSigFn, offset=0)[source]¶Bases: object
hwtLib.abstract.streamBuilder.
AbstractStreamBuilder
(parent, srcInterface, name=None)[source]¶Bases: object
Attention: | this is just abstract class unit classes has to be specified in concrete implementation |
---|---|
Variables: |
|
Attention: | input port is taken from self.end |
FifoCls
= NotImplemented¶JoinFairCls
= NotImplemented¶JoinPrioritizedCls
= NotImplemented¶JoinSelectCls
= NotImplemented¶RegCls
= NotImplemented¶ResizerCls
= NotImplemented¶SplitCopyCls
= NotImplemented¶SplitFairCls
= NotImplemented¶SplitPrioritizedCls
= NotImplemented¶SplitSelectCls
= NotImplemented¶__init__
(parent, srcInterface, name=None)[source]¶Parameters: |
|
---|
_genericInstance
(unitCls, unitName, setParams=<function AbstractStreamBuilder.<lambda>>)[source]¶Instantiate generic component and connect basics
Parameters: |
|
---|
_join
(joinCls, parent, srcInterfaces, name, configAs, extraConfigFn)[source]¶Create builder from many interfaces by joining them together
Parameters: |
|
---|
buff
(items=1, latency=None, delay=None)[source]¶Use registers and fifos to create buffer of specified paramters :note: if items <= latency registers are used else fifo is used
Parameters: |
|
---|---|
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 |
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_fair |
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 rund robin selector with number of outputs specified by noOfOutputs
Parameters: |
|
---|
split_fair_to
(*outputs, exportSelected=False)[source]¶Same like split_fair, but outputs are automatically connected
Parameters: |
|
---|
split_prioritized
(noOfOutputs)[source]¶data from input is send to output witch 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: |
|
---|