Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
fmc dac 600m 12b 1cha dds - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
fmc dac 600m 12b 1cha dds - Testing
Commits
86a2f165
Commit
86a2f165
authored
Aug 17, 2022
by
Marek Gumiński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a script for testing communication with Wishbone busses of both SPEC's
parent
63c4ca54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
test_communication_both.py
python/test_communication_both.py
+47
-0
No files found.
python/test_communication_both.py
0 → 100644
View file @
86a2f165
import
sys
import
time
import
os
from
spec
import
*
from
ptsexcept
import
*
from
utilFunctions
import
*
from
spec_identification
import
*
UIDEL
=
1
;
FIRMWARE_PATH
=
'/../gateware/syn/spec_top.bin'
INPUT_TIMEOUT
=
30
;
def
test_sdbid
(
dut
):
print
"Checking if SPEC firmware has SDB magic number in register address 0."
if
(
dut
.
sdbid
!=
dut
.
SDB_SIG
):
print
"ERRRRRORRRRRR!!!!!!!"
;
print
"ERRRRRORRRRRR!!!!!!!"
;
print
"SDB signature mismatch!"
;
print
'expected SDB:
%
x'
%
dut
.
SDB_SIG
;
print
'found SDB:
%
x'
%
dut
.
sdbid
;
else
:
print
"SDB magic matched!"
;
names
=
[
"FmcDac600m12b1chadds"
,
"FmcAdc100m"
]
for
i
in
[
0
,
1
]:
print
"Checking: "
+
names
[
i
]
specid
=
spec_identification
()[
i
];
print
"It was identified on bus:"
+
str
(
specid
)
if
specid
<
0
:
raise
PtsCritical
(
"Bus number of "
+
names
[
i
]
+
" was not found"
)
carrier
=
spec
(
FIRMWARE_PATH
,
specid
,
True
);
test_sdbid
(
carrier
)
print
"---------------------------------"
print
"---------------------------------"
print
"---------------------------------"
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