Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Production Test Suite
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
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
Production Test Suite
Commits
80d44a5f
Commit
80d44a5f
authored
Jul 22, 2011
by
Samuel Iglesias Gonsalvez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tps/test: test07 working.
parent
880276f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
44 deletions
+50
-44
test07.bin
test/spec/firmwares/test07.bin
+0
-0
test07.py
test/spec/python/test07.py
+50
-44
No files found.
test/spec/firmwares/test07.bin
View file @
80d44a5f
No preview for this file type
test/spec/python/test07.py
View file @
80d44a5f
...
...
@@ -50,18 +50,18 @@ def main (default_directory='.'):
# Get host memory pages physical address
pages
=
gennum
.
get_physical_addr
()
num_addr_lines
=
1
7
;
num_addr_lines
=
1
6
;
num_data_lines
=
16
;
if
(
len
(
pages
)
<
(
num_addr_lines
+
2
))
:
raise
Exception
(
"Not enough pages"
);
raise
TpsError
(
"Not enough pages"
);
data
=
0xDEADBAB
A
;
data
=
0xDEADBAB
E
# Clear memory pages
gennum
.
set_memory_page
(
0
,
0x0
)
gennum
.
set_memory_page
(
1
,
data
);
gennum
.
set_memory_page
(
2
,
0x0
)
dma_length
=
0x
80
# DMA length in bytes
dma_length
=
0x
4
# DMA length in bytes
t1
=
time
.
time
();
...
...
@@ -69,31 +69,32 @@ def main (default_directory='.'):
print
"Checking if some pin is tied to GND"
error
=
0
;
for
i
in
range
(
num_addr_lines
)
:
for
i
in
range
(
2
,
num_addr_lines
)
:
print
"[
%
d]"
%
i
for
j
in
range
(
num_addr_lines
)
:
if
(
i
!=
j
)
:
gennum
.
add_dma_item
((
1
<<
j
),
pages
[
2
],
dma_length
,
1
,
0
)
for
j
in
range
(
2
,
num_addr_lines
)
:
gennum
.
add_dma_item
((
1
<<
j
),
pages
[
0
],
dma_length
,
1
,
0
)
gennum
.
start_dma
()
gennum
.
wait_irq
()
time
.
sleep
(
0.01
)
time
.
sleep
(
0.01
)
gennum
.
add_dma_item
((
1
<<
i
),
pages
[
1
],
dma_length
,
1
,
0
)
gennum
.
start_dma
()
gennum
.
wait_irq
()
# Read all the pages
for
j
in
range
(
num_addr_lines
)
:
for
j
in
range
(
2
,
num_addr_lines
)
:
time
.
sleep
(
0.01
)
gennum
.
add_dma_item
((
1
<<
j
),
pages
[
3
+
j
],
dma_length
,
0
,
0
)
gennum
.
start_dma
()
gennum
.
wait_irq
()
# Compare
page_data
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
];
for
j
in
range
(
num_addr_lines
):
for
j
in
range
(
2
,
num_addr_lines
):
page_data
[
j
]
=
gennum
.
get_memory_page
(
3
+
j
)
if
(
j
==
i
)
:
if
(
page_data
[
j
][
0
]
!=
data
):
...
...
@@ -103,63 +104,68 @@ def main (default_directory='.'):
if
(
page_data
[
j
][
0
]
!=
0x0
):
print
(
"
\n
### Compare error (pin is tied to GND?) @ addr line:
%
d wr:0x
%.8
X rd:0x
%.8
X"
)
%
(
j
,
0x0
,
page_data
[
j
][
0
])
error
=
1
;
sys
.
exit
();
print
"Checking if some pin is tied to Vcc"
addr_mask
=
0xFFFFFFFFFFFFFFFF
;
for
i
in
range
(
num_addr_lines
)
:
gennum
.
add_dma_item
(
addr_mask
,
pages
[
2
],
dma_length
,
1
,
1
)
gennum
.
add_dma_item
(
addr_mask
,
pages
[
3
],
dma_length
,
0
,
0
)
for
i
in
range
(
2
,
num_addr_lines
)
:
print
"[
%
d]"
%
i
for
j
in
range
(
2
,
num_addr_lines
)
:
gennum
.
add_dma_item
(
~
(
1
<<
j
),
pages
[
0
],
dma_length
,
1
,
0
)
gennum
.
start_dma
()
gennum
.
wait_irq
()
time
.
sleep
(
0.01
)
time
.
sleep
(
0.01
)
gennum
.
add_dma_item
(
~
(
1
<<
i
),
pages
[
1
],
dma_length
,
1
,
0
)
gennum
.
start_dma
()
gennum
.
wait_irq
()
for
j
in
range
(
num_addr_lines
/
2
)
:
if
(
i
!=
2
*
j
)
:
gennum
.
add_dma_item
(
addr_mask
&
(
~
(
1
<<
2
*
j
)),
pages
[
2
],
dma_length
,
1
,
1
)
gennum
.
add_dma_item
(
addr_mask
&
(
~
(
1
<<
2
*
j
)),
pages
[
4
+
2
*
j
],
dma_length
,
0
,
0
)
gennum
.
start_dma
()
gennum
.
wait_irq
()
if
((
2
*
j
+
1
)
!=
i
)
:
gennum
.
add_dma_item
(
addr_mask
&
(
~
(
1
<<
2
*
j
)),
pages
[
2
],
dma_length
,
1
,
1
)
gennum
.
add_dma_item
(
addr_mask
&
(
~
(
1
<<
2
*
j
)),
pages
[
4
+
(
2
*
j
+
1
)],
dma_length
,
0
,
0
)
# Read all the pages
for
j
in
range
(
2
,
num_addr_lines
)
:
time
.
sleep
(
0.01
)
gennum
.
add_dma_item
(
~
(
1
<<
j
),
pages
[
3
+
j
],
dma_length
,
0
,
0
)
gennum
.
start_dma
()
gennum
.
wait_irq
()
gennum
.
add_dma_item
(
addr_mask
&
(
~
(
1
<<
i
)),
pages
[
1
],
dma_length
,
1
,
1
)
gennum
.
add_dma_item
(
addr_mask
&
(
~
(
1
<<
i
)),
pages
[
4
+
i
],
dma_length
,
0
,
0
)
gennum
.
start_dma
()
gennum
.
wait_irq
()
time
.
sleep
(
0.01
)
page_data
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
];
for
j
in
range
(
num_addr_lines
):
for
j
in
range
(
2
,
num_addr_lines
):
page_data
[
j
]
=
gennum
.
get_memory_page
(
3
+
j
)
if
(
j
==
(
i
+
1
)
)
:
if
(
page_data
[
j
][
0
]
!=
0xFFFFFFFF
):
print
(
"
\n
### Compare error (pin is tied to Vcc?) @ addr line:0x
%.8
X wr:0x
%.8
X rd:0x
%.8
X"
)
%
(
j
,
0xFFFFFFFF
,
page_data
[
j
][
0
])
if
(
j
==
i
)
:
if
(
page_data
[
j
][
0
]
!=
data
):
print
(
"
\n
### Compare error (pin is tied to Vcc?) @ addr line:0x
%.8
X wr:0x
%.8
X rd:0x
%.8
X"
)
%
(
j
,
data
,
page_data
[
j
][
0
])
error
=
1
;
else
:
if
(
page_data
[
j
][
0
]
!=
0x0
):
print
(
"
\n
### Compare error (pin is tied to Vcc?) @ addr line:0x
%.8
X wr:0x
%.8
X rd:0x
%.8
X"
)
%
(
j
,
0x0
,
page_data
[
j
][
0
])
error
=
1
;
if
(
error
)
:
print
"RESULT: [FAILED]"
raise
TpsError
(
"Error in DDR address lines. Please check log file for more information"
)
else
:
print
"RESULT: [OK]"
print
"Test Data lines"
error
=
0
;
for
i
in
range
(
num_data_lines
)
:
print
"[
%
d]"
%
i
gennum
.
set_memory_page
(
1
,
(
1
<<
i
))
gennum
.
add_dma_item
(
0
,
pages
[
1
],
dma_length
,
1
,
1
)
gennum
.
add_dma_item
(
0
,
pages
[
1
],
dma_length
,
1
,
0
)
gennum
.
start_dma
()
gennum
.
wait_irq
()
time
.
sleep
(
0.01
)
gennum
.
add_dma_item
(
0
,
pages
[
2
],
dma_length
,
0
,
0
)
gennum
.
start_dma
()
gennum
.
wait_irq
()
time
.
sleep
(
0.01
)
page_data
=
gennum
.
get_memory_page
(
2
);
if
(
page_data
[
0
]
!=
(
1
<<
i
))
:
...
...
@@ -168,7 +174,7 @@ def main (default_directory='.'):
if
(
error
)
:
print
"RESULT: [FAILED]"
raise
TpsError
(
"Error in DDR data lines. Please check log file for more information"
)
raise
TpsError
(
"Error in DDR data
/address
lines. Please check log file for more information"
)
else
:
print
"RESULT: [OK]"
...
...
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