Memory¶
-
class
chipscopy.api.memory.
Memory
(*args, **kwargs)[source]¶ Provides memory read and memory write service for a device.
Examples:
some_values = device.memory_read(address=0xF2010000, num=2, target="DPC") rpu = session.memory.filter_by(name="RPU").at(0) some_values = rpu.memory_read(0xF2010000, 2) dpc = device.memory.get(name="DPC") dpc.memory_write(0xF2010000, [0x12345678, 0xDEADC0FE])
-
static
check_and_upgrade
(memory_view, node)[source]¶ Converts a client MemoryNode to Memory
- Return type
-
property
filter_by
¶ Specifies the dict used for filtering memory objects in the device and session. Filters memory in the QueryList returned by Session.memory and Device.memory.
- Returns
dict[str,value]
-
memory_read
(address, num=1, size='w')[source]¶ Read and return <num> data values from the target’s memory address specified by <address>.
num defaults to 1 if not specified. size defaults to ‘w’ if not specified.
- size <access-size> can be one of the values below:
- b = Bytes accessesh = Half-word accessesw = Word accesses (default)d = Double-word accesses
- Parameters
address (
int
) – Address for memory writenum (
int
) – number of values to readsize (
str
) – ‘b’,’h’,’w’,’d’
- Return type
List
[int
]
-
memory_write
(address, values, size='w')[source]¶ Write values from list of <values> to memory address specified by <address>.
size defaults to ‘w’ if not specified.
- size <access-size> can be one of the values below:
- b = Bytes accessesh = Half-word accessesw = Word accesses (default)d = Double-word accesses
- Parameters
address (
int
) – Address for memory writevalues (
List
[int
]) – List of integer values to writesize (
str
) – ‘b’,’h’,’w’,’d’
-
static