Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Simple PCIe FMC carrier SPEC
Commits
a6499126
Commit
a6499126
authored
Jul 02, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! tst: add regression test for 4Byte corruption
parent
7f643fb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
test_dma.py
pytest/test_dma.py
+8
-7
No files found.
pytest/test_dma.py
View file @
a6499126
...
...
@@ -211,15 +211,16 @@ class TestDma(object):
"""
Regression test.
It happend that a 4Bytes transfer was triggering a DMA error
and in some cases it was irremediably corrupting the gennum chip
and in some cases it was irremediably corrupting the gennum chip.
This is most likely to happen once after programming the FPGA, and
it may take a long time before it happens again.
"""
data
=
b
"
\x01\x23\x45\x67\x89\xab\xcd\xef
"
spec
.
program_fpga
(
pytest
.
cfg_bitstream
)
with
spec
.
dma
()
as
dma
:
data
=
b
"0123456789abcdefghilmnopqrstuvwx"
dma
.
write
(
0
,
data
)
for
i
in
range
(
1000000
):
for
i
in
range
(
1000000
0
):
try
:
data_rb
=
dma
.
read
(
0
,
4
)
assert
data
[
0
:
4
]
=
=
dma
.
read
(
0
,
4
)
except
OSError
as
error
:
assert
data
==
dma
.
read
(
0
,
8
)
finally
:
assert
data
[
0
:
4
]
==
data_rb
assert
False
,
"Failed after {:d} transfers"
.
format
(
i
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment