test/common: fix expected data for test_bist.py
Expected data needs to be replicated to fill given data_width. Signed-off-by: Michal Sieron <msieron@antmicro.com>
This commit is contained in:
parent
73c3ec6b68
commit
dad2c972f7
|
@ -354,6 +354,21 @@ class MemoryTestDataMixin:
|
||||||
)
|
)
|
||||||
expected = data["32bit_long_sequential"]["expected"]
|
expected = data["32bit_long_sequential"]["expected"]
|
||||||
expected[16//4:(16 + 64)//4] = list(range(64//4))
|
expected[16//4:(16 + 64)//4] = list(range(64//4))
|
||||||
|
|
||||||
|
lfsr_out_width = 31
|
||||||
|
# replicate LFSR output to fill the data_width
|
||||||
|
for test_case, config in data.items():
|
||||||
|
expected = config["expected"]
|
||||||
|
|
||||||
|
# extract data width from test case name
|
||||||
|
data_width = int(test_case.split("bit")[0])
|
||||||
|
|
||||||
|
for i, value in enumerate(expected):
|
||||||
|
for _ in range(data_width, lfsr_out_width - 1, -lfsr_out_width):
|
||||||
|
value |= value << lfsr_out_width
|
||||||
|
value &= (1 << data_width) - 1
|
||||||
|
expected[i] = value
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in New Issue