Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL Blocking - 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
Conv TTL Blocking - Testing
Commits
c2059237
Commit
c2059237
authored
Oct 26, 2017
by
Maciej Lipinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SW] debugged verification test of the PCB/HW version
parent
2adc5839
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
hwvertest.py
fm/pts/python/hwvertest.py
+10
-5
No files found.
fm/pts/python/hwvertest.py
100644 → 100755
View file @
c2059237
...
...
@@ -69,21 +69,27 @@ def main(bus,tname,inf,log):
try
:
# Get gateware version and convert it to major-minor float number
# Read PCB version: a 6 bits representing HW/PCB version number
# 4 MSB represent HW version number (major)
# 2 LSB represent number of execution (minor)
# Eg: value 010010 represents PCB version 4.2
hwvers
=
(
bus
.
vv_read
(
CSR
)
&
0x3F00
)
>>
CSR_HWVERS_OFS
maj
=
float
(
hwvers
>>
2
)
maj
=
int
(
hwvers
>>
2
)
min
=
float
(
hwvers
&
0x03
)
min
/=
10
hwvers
=
maj
+
min
# and now check if appropriate
if
(
hwvers
==
HWVERS
):
msg
=
"HW/PCB version correct:
%2.
*
f
\n
"
%
(
p
,
hwvers
)
msg
=
"HW/PCB version correct:
%2.
1
f
\n
"
%
(
hwvers
)
inf
.
write
(
msg
)
else
:
msg
=
"ERROR: HW/PCBe version (
%2.
*
f) incorrect - expected
%2.*
f"
%
(
p
,
hwvers
,
pr
,
HWVERS
)
msg
=
"ERROR: HW/PCBe version (
%2.
1
f) incorrect - expected
%2.1
f"
%
(
hwvers
,
HWVERS
)
pel
.
set
(
msg
)
print
"-->
%
s"
%
msg
return
pel
.
get
()
except
BusException
,
e
:
...
...
@@ -91,4 +97,3 @@ def main(bus,tname,inf,log):
except
BusWarning
,
e
:
raise
PtsError
(
"SKT Warning:
%
s"
%
(
e
))
\ No newline at end of file
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