hwtLib.mem.bramPortEndpoint.
BramPortEndpoint
(structTemplate, intfCls=<class 'hwt.interfaces.std.BramPort_withoutClk'>, shouldEnterFn=None)[source]¶Bases: hwtLib.abstract.busEndpoint.BusEndpoint
Delegate transaction from BrapmPort interface to interfaces for fields of specified structure
Attention: | interfaces are dynamically generated from names of fields in structure template |
---|
__init__
(structTemplate, intfCls=<class 'hwt.interfaces.std.BramPort_withoutClk'>, shouldEnterFn=None)[source]¶Parameters: |
|
---|
_getAddrStep
()¶Returns: | how many bits is one unit of address (f.e. 8 bits for char * pointer, 36 for 36 bit bram) |
---|
_getWordAddrStep
()¶Returns: | size of one word in unit of address |
---|
hwtLib.mem.bramPortSimMemSpaceMaster.
BramPortSimMemSpaceMaster
(bus, registerMap)[source]¶Bases: hwtLib.sim.abstractMemSpaceMaster.AbstractMemSpaceMaster
_read
(addr, size, onDone)[source]¶Add read transaction to agent of interface :param addr: address value on bus to read froms :param size: size of data to read in bites :param onDone: on read done callback function(sim) -> None
hwtLib.mem.cam.
Cam
[source]¶Bases: hwt.synthesizer.unit.Unit
Content addressable memory
Simple combinational version
MATCH_LATENCY = 1
_config
()[source]¶Configure object parameters
_declr
()[source]¶declarations
_serializeDecision
(parentUnit, obj, isDeclaration, priv)¶Decide to serialize only objs with uniq parameters and class
Parameters: | priv – private data for this function ({frozen_params: obj}) |
---|---|
Returns: | tuple (do serialize this object, next priv) |
hwtLib.mem.clkSynchronizer.
ClkSynchronizer
[source]¶Bases: hwt.synthesizer.unit.Unit
Signal synchronization between two clock domains http://www.sunburst-design.com/papers/CummingsSNUG2008Boston_CDC.pdf
_config
()[source]¶Configure object parameters
hwtLib.mem.cuckooHashTable.
CInsertIntf
(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]¶Bases: hwt.interfaces.std.HandshakeSync
_config
()[source]¶Configure object parameters
hwtLib.mem.cuckooHashTable.
CInsertIntfAgent
(intf)[source]¶Bases: hwt.interfaces.agents.handshaked.HandshakedAgent
Agent for CInsertIntf interface
hwtLib.mem.cuckooHashTable.
CuckooHashTable
(polynomials=[1947962583, 517762881])[source]¶Bases: hwtLib.mem.hashTableCore.HashTableCore
Cuckoo hash uses more tables with different hash functions
Lookup is performed in all tables at once and if item is found in any table item is found otherwise item is not in tables. lookup time: O(1)
Insert has to first lookup if item is in any table. If there is such a item it is replaced. If there is any empty element item is stored there. If there is a valid item under this key in all tables. One is selected and it is replaced by current item. Insert process then repeats with this item.
Inserting into table does not have to be successful and in this case, fsm ends up in infinite loop and it will be reinserting items.
__init__
(polynomials=[1947962583, 517762881])[source]¶Parameters: | polynomials – list of polynomials for crc hashers used in tables for each item in this list table will be instantiated |
---|
_config
()[source]¶Configure object parameters
_declr
()[source]¶declarations
insetOfTablesDriver
(state, insertTargetOH, insertIndex, stash, isExternLookup)[source]¶Parameters: |
|
---|
hwtLib.mem.fifo.
Fifo
[source]¶Bases: hwt.synthesizer.unit.Unit
Generic fifo instance usually mapped to BRAM
Variables: |
|
---|
_config
()[source]¶Configure object parameters
_declr
()[source]¶declarations
_serializeDecision
(parentUnit, obj, isDeclaration, priv)¶Decide to serialize only objs with uniq parameters and class
Parameters: | priv – private data for this function ({frozen_params: obj}) |
---|---|
Returns: | tuple (do serialize this object, next priv) |
hwtLib.mem.fifoAsync.
FifoAsync
[source]¶Bases: hwtLib.mem.fifo.Fifo
Asynchronous fifo using BRAM memory, based on: http://www.asic-world.com/examples/vhdl/asyn_fifo.html
_declr
()[source]¶declarations
_serializeDecision
(parentUnit, obj, isDeclaration, priv)¶Decide to serialize only objs with uniq parameters and class
Parameters: | priv – private data for this function ({frozen_params: obj}) |
---|---|
Returns: | tuple (do serialize this object, next priv) |
hwtLib.mem.hashTableCore.
HashTableCore
(polynome)[source]¶Bases: hwt.synthesizer.unit.Unit
Generic hash table, in block RAM there is a input key which is hashed ad this has is used as an index into memory item on this place is checked and returned on “lookupRes” interface (item does have to be found, see “found” flag in LookupResultIntf)
memory is an array of items in format
struct item {
bool vldFlag;
data_t data;
key_t key;
};
Variables: |
|
---|
_config
()[source]¶Configure object parameters
hwtLib.mem.hashTable_intf.
InsertIntf
(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]¶Bases: hwt.interfaces.std.HandshakeSync
_config
()[source]¶Configure object parameters
hwtLib.mem.hashTable_intf.
InsertIntfAgent
(intf)[source]¶Bases: hwt.interfaces.agents.handshaked.HandshakedAgent
Simulation agent for .InsertIntf interface
hwtLib.mem.hashTable_intf.
LookupKeyIntf
(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]¶Bases: hwt.interfaces.std.HandshakeSync
_config
()[source]¶Configure object parameters
hwtLib.mem.hashTable_intf.
LookupKeyIntfAgent
(intf)[source]¶Bases: hwt.interfaces.agents.handshaked.HandshakedAgent
Simulation agent for LookupKeyIntf interface
hwtLib.mem.hashTable_intf.
LookupResultIntf
(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]¶Bases: hwt.interfaces.std.Handshaked
Interface for result of lookup in hash table
Variables: |
|
---|
_config
()[source]¶Configure object parameters
hwtLib.mem.hashTable_intf.
LookupResultIntfAgent
(intf)[source]¶Bases: hwt.interfaces.agents.handshaked.HandshakedAgent
Simulation agent for .LookupResultIntf data is stored in .data data format is tuple (hash, key, data, found) but some items can be missing depending on configuration of interface
hwtLib.mem.lutRam.
RAM64X1S
¶Bases: hwt.synthesizer.unit.Unit
_config
()¶_declr
()¶_impl
()¶_serializeDecision
(parentUnit, obj, isDeclaration, priv)¶Always decide not to serialize obj
Parameters: | priv – private data for this function first unit of this class |
---|---|
Returns: | tuple (do serialize this object, next priv) |
hwtLib.mem.ram.
RamSingleClock
[source]¶Bases: hwt.synthesizer.unit.Unit
_config
()[source]¶Configure object parameters
_declr
()[source]¶declarations
_serializeDecision
(parentUnit, obj, isDeclaration, priv)¶Decide to serialize only objs with uniq parameters and class
Parameters: | priv – private data for this function ({frozen_params: obj}) |
---|---|
Returns: | tuple (do serialize this object, next priv) |
hwtLib.mem.ram.
Ram_dp
[source]¶Bases: hwtLib.mem.ram.Ram_sp
hwtLib.mem.ram.
Ram_sp
[source]¶Bases: hwt.synthesizer.unit.Unit
Write first variant
_config
()[source]¶Configure object parameters
_declr
()[source]¶declarations
_serializeDecision
(parentUnit, obj, isDeclaration, priv)¶Decide to serialize only objs with uniq parameters and class
Parameters: | priv – private data for this function ({frozen_params: obj}) |
---|---|
Returns: | tuple (do serialize this object, next priv) |