module mat
Matrix functions
This module provides functions for creating and handling matrix applications.
function generateMatrix
generateMatrix(b: int, c: int, arr_size: int) → List[List[int]]
Generates a matrix of random values of a given size
Args:
b(int): Bits per cellc(int): Number of cellsarr_size(int): Size of the array
Returns:
list: List of lists representing the array
function injectFaults
injectFaults(mat: List[List[int]], error_map: List[List[float]], b: int) → int
Inject faults into an MLC matrix
Args:
mat(list): Matrix to inject faults intoerror_map(dict): Error map dictionaryb(int): Bits per cell
Returns:
int: Number of injected errors in the matrix
function calcErrMagnitude
calcErrMagnitude(
configs: List[List[List[int]]],
in_mat: List[List[int]],
out_mat: List[List[int]],
errs: List[List[int]],
errs_perc: List[List[float]]
)
Calculates the magnitude of errors difference between two matrices
Args:
configs(dict): Cell configurationin_mat(list): Clean matrixout_mat(list): Dirty/error matrixerrs(list): Magnitude of error appended to at index corresponding to the index of the configerrs_perc(list): Percent magnitude of error appended to at index corresponding to the index of the config
This file was automatically generated via lazydocs.