Data Information
Data Information.
Classes:
| Name | Description |
|---|---|
DataInfo |
Data Information. |
Attributes:
| Name | Type | Description |
|---|---|---|
AddrData |
TypeAlias
|
Address-Data Pair. |
DataInfo
Bases: Object
Data Information.
Single Data:
>>> datainfo = DataInfo.create(5)
>>> datainfo
DataInfo(datatype=SINGLE, data=5)
>>> str(datainfo)
'SINGLE: 5'
>>> tuple(datainfo.iter(AddrRange(width=64, depth=8)))
((Hex('0x0'), 5),)
>>> tuple(datainfo.iter(AddrRange(baseaddr=0x1000, width=64, depth=8)))
((Hex('0x1000'), 5),)
Burst Data:
>>> datainfo = DataInfo.create((5, 6, 7))
>>> datainfo
DataInfo(datatype=BURST, data=(5, 6, 7))
>>> str(datainfo)
'BURST: (5, 6, 7)'
>>> tuple(datainfo.iter(AddrRange(width=64, depth=8)))
((Hex('0x0'), 5), (Hex('0x8'), 6), (Hex('0x10'), 7))
>>> tuple(datainfo.iter(AddrRange(baseaddr=0x1000, width=64, depth=8)))
((Hex('0x1000'), 5), (Hex('0x1008'), 6), (Hex('0x1010'), 7))
Scattered Data:
>>> datainfo = DataInfo.create(((16, 5), (28, 6), (60, 7)))
>>> datainfo
DataInfo(datatype=SCAT, data=((16, 5), (28, 6), (60, 7)))
>>> str(datainfo)
'SCAT: ((16, 5), (28, 6), (60, 7))'
>>> tuple(datainfo.iter(AddrRange(width=64, depth=8)))
((Hex('0x10'), 5), (Hex('0x1C'), 6), (Hex('0x3C'), 7))
>>> tuple(datainfo.iter(AddrRange(baseaddr=0x1000, width=64, depth=8)))
((Hex('0x1010'), 5), (Hex('0x101C'), 6), (Hex('0x103C'), 7))
Errors:
>>> DataInfo.create('a')
Traceback (most recent call last):
...
TypeError: a
>>> DataInfo.create(('a', 'b'))
Traceback (most recent call last):
...
TypeError: ('a', 'b')
Methods:
| Name | Description |
|---|---|
create |
Create :any: |
iter |
Iteratate over single address value pairs according to access. |