hwtLib.sim package

Submodules

hwtLib.sim.abstractMemSpaceMaster module

class hwtLib.sim.abstractMemSpaceMaster.AbstractMemSpaceMaster(bus, registerMap)[source]

Bases: hwtLib.sim.abstractMemSpaceMaster.MemorySpaceItemStruct

Abstraction over bus interface which converts it to memory space from where you can read or write

__init__(bus, registerMap)[source]

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

_mask(start, width)[source]
_read(addr, size, onDone=None)[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

_write(addr, size, data, mask, onDone=None)[source]

Add write transaction to agent of interface

Parameters
  • addr – address value on bus to write on

  • size – size of data to write in bites

  • data – data to write on bus

  • onDone – on write done callback function(sim) -> None

parse_responses()[source]

Parse responses after sim

class hwtLib.sim.abstractMemSpaceMaster.MemorySpaceItem(memHandler, transTmpl, offset=0)[source]

Bases: object

Abstraction over place in memory, allows you read and write data to/from this space

__init__(memHandler, transTmpl, offset=0)[source]

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

_add_read_resp(resp)[source]
_add_write_resp(resp)[source]
read(onDone=None)[source]

read data from place in memory

write(data, onDone=None)[source]

write data to place in memory

class hwtLib.sim.abstractMemSpaceMaster.MemorySpaceItemArr(memHandler, transTmpl, offset=0)[source]

Bases: object

Abstraction over place in memory, allows you read and write data to/from this space

__init__(memHandler, transTmpl, offset=0)[source]

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

class hwtLib.sim.abstractMemSpaceMaster.MemorySpaceItemStruct(memHandler, transTmpl, offset=0)[source]

Bases: object

__init__(memHandler, transTmpl, offset=0)[source]

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

_decorateWithRegisters(memHandler, structT)[source]

Decorate this object with attributes from memory space (name is same as specified in register map)

Parameters
  • memHandler – instance of AbstractMemSpaceMaster(subclass of)

  • structT – instance of HStruct or TransTmpl used as template