hwtLib.mem.atomic package

Submodules

hwtLib.mem.atomic.flipCntr module

class hwtLib.mem.atomic.flipCntr.FlipCntr[source]

Bases: hwt.synthesizer.unit.Unit

Counter with FlipRegister which is form memory with atomic access

interface doFilip drives switching of memories in flip register dataIn has higher priority than doIncr

_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 threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr
static _serializeDecision(parentUnit, obj, isDeclaration, priv)

Decide to serialize only first obj of it’s class

Parameters:priv – private data for this function (first object with class == obj.__class__)
Returns:tuple (do serialize this object, next priv) where priv is private data for this function (first object with class == obj.__class__)
dataHanldler()[source]
flipHandler()[source]

hwtLib.mem.atomic.flipRam module

class hwtLib.mem.atomic.flipRam.FlipRam[source]

Bases: hwt.synthesizer.unit.Unit

Switchable RAM, there are two memories and two sets of ports, Each set of ports is every time connected to opposite ram. By select you can choose between RAMs.

This component is meant to be form of synchronization. Example first RAM is connected to first set of ports, writer performs actualizations on first RAM and reader reads data from second ram by second set of ports.

Then select is set and access is flipped. Reader now has access to RAM 0 and writer to RAM 1.

_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 threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr
static _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.atomic.flipReg module

class hwtLib.mem.atomic.flipReg.FlipRegister[source]

Bases: hwt.synthesizer.unit.Unit

Switchable register, there are two registers and two sets of ports, Each set of ports is every time connected to opposite reg. By select you can choose between regs.

This component is meant to be form of synchronization. Example first reg is connected to first set of ports, writer performs actualizations on first reg and reader reads data from second ram by second set of ports.

Then select is set and access is flipped. Reader now has access to reg 0 and writer to reg 1.

_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 threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr
static _serializeDecision(parentUnit, obj, isDeclaration, priv)

Decide to serialize only first obj of it’s class

Parameters:priv – private data for this function (first object with class == obj.__class__)
Returns:tuple (do serialize this object, next priv) where priv is private data for this function (first object with class == obj.__class__)
connectReadIntf(regA, regB)[source]
connectWriteIntf(regA, regB)[source]

Module contents