pylab_ml.common.memorytest.Memory_test

class Memory_test(parent, bitwidth, start, end, readfunc, writefunc, beforefunc=None, afterfunc=None)[source]

Bases: object

Memory test class, performs memory testing based on the operations defined in the MER.

Todo

  • only data background = sdb implemented, missing: ‘bdb’, ‘rdb’, ‘cdb’

  • Address counting according to the actual layout structure is missing.
    • bin x = linear counting

    • bin y missing

  • operation next missing

  • operation hammer missing

__init__(parent, bitwidth, start, end, readfunc, writefunc, beforefunc=None, afterfunc=None)[source]

Methods

__init__(parent, bitwidth, start, end, ...)

algorithmen(alist)

Run the algorithms defined in algo_ops, if alist is a list of algorithm names.

algorithmus(name, operations)

Run a single algorithm defined by the operations list, which is a list of lists of operations to perform.

read(adr[, compare])

Read data from the memory at the given address and compare it to the provided value if compare is not None.

run([start, end])

Read/Write memory with the commands in the march element registers.

write(adr, dat)

Write data to the memory at the given address.

Attributes

adr_order

Address Order, up or down.

algo_ops

count_method

Counting method.

data_background

Data background.

padr_order

pcount_method

pdata_background

property adr_order

Address Order, up or down.

algorithmen(alist)[source]

Run the algorithms defined in algo_ops, if alist is a list of algorithm names. If alist is not a list, log an error and return 1.

eg. algorithmen([‘Scan’, ‘March C-‘]) will run the Scan and March C- algorithms defined in algo_ops. If an algorithm name in alist is not defined in algo_ops, log an error and return 1.

Parameters:

alist (list) – A list of algorithm names to run, must be keys in algo_ops.

Returns:

errors – The number of errors found during the algorithms, or 1 if there was an error in the input.

Return type:

int

algorithmus(name, operations)[source]

Run a single algorithm defined by the operations list, which is a list of lists of operations to perform.

eg. algorithmus(‘Scan’, [[‘up’, ‘w0’], [‘r0’], [‘down’, ‘w1’], [‘r1’]]) will run the Scan algorithm defined in algo_ops.

Parameters:
  • name (str) – The name of the algorithm to run.

  • operations (list) – A list of lists of operations to perform.

Returns:

errors – The number of errors found during the algorithm.

Return type:

int

property count_method

Counting method.

property data_background

Data background.

‘sdb’ - solid DB - all bits with same data ‘bdb’ - checkerboard DB - adjacent cells with different data ‘rdb’ - row stripes DB ‘cdb’ - column striped DB

read(adr, compare=None)[source]

Read data from the memory at the given address and compare it to the provided value if compare is not None.

eg. read(0x1000, 0xFF) will read data from address 0x1000 and compare it to 0xFF, logging an error if they do not match.

read(0x1000, 0xFF) will read data from address 0x1000 and compare it to 0xFF, logging an error if they do not match. read(0x1000) will read data from address 0x1000 without comparing it to any value.

Parameters:
  • adr (int) – The address to read from.

  • compare (int, optional) – The value to compare the read data to, if not provided, no comparison will be made.

Returns:

data – The data read from the memory at the given address.

Return type:

int

run(start=None, end=None)[source]

Read/Write memory with the commands in the march element registers.

eg. run() will run the memory test with the start and end addresses defined in the constructor, and the operations defined in the MER.

Parameters:
  • start (int, optional) – The start address for the memory test, if not provided, the start address defined in the constructor will be used.

  • end (int, optional) – The end address for the memory test, if not provided, the end address defined in the constructor will be used.

Returns:

errors – The number of errors found during the memory test.

Return type:

int

write(adr, dat)[source]

Write data to the memory at the given address.

eg. write(0x1000, 0xFF) will write the value 0xFF to address 0x1000.

Parameters:
  • adr (int) – The address to write to.

  • dat (int) – The data to write to the memory at the given address.

Return type:

None