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
82a208bd
Commit
82a208bd
authored
Jul 29, 2011
by
Samuel Iglesias Gonsalvez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tps/test: fix problem with Gennum initialization
parent
48037d0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
test02.py
test/spec/python/test02.py
+20
-0
No files found.
test/spec/python/test02.py
View file @
82a208bd
...
...
@@ -295,6 +295,23 @@ class EEPROM_GENNUM:
else
:
raise
TpsError
(
'EEPROM=
%.2
X, FILE=
%.2
X => ERROR'
%
(
eeprom_data
[
i
],
file_data
[
i
]))
def
file_dump_to_gennum
(
self
):
file_name
=
"./gn4124_diff.dat"
file
=
open
(
file_name
,
'r+'
)
file_data
=
[]
file_addr
=
[]
# Read file
for
line
in
file
:
addr
,
data
=
line
.
split
()
file_data
.
append
(
int
(
data
,
16
))
file_addr
.
append
(
int
(
addr
,
16
))
# Write Gennum configuration space
for
i
in
range
(
0
,
len
(
file_data
)):
self
.
gennum
.
iwrite
(
4
,
file_addr
[
i
],
4
,
file_data
[
i
])
print
' '
print
'Gennum configuration space written with '
+
file_name
+
' content!'
print
' '
def
main
(
default_directory
=
'.'
):
path_fpga_loader
=
'../firmwares/fpga_loader'
;
...
...
@@ -308,6 +325,9 @@ def main (default_directory='.'):
gennum
=
rr
.
Gennum
();
eeprom
=
EEPROM_GENNUM
(
gennum
);
eeprom
.
file_dump_to_gennum
();
eeprom
.
eeprom_dump_to_file
(
"/tmp/eeprom.dat"
);
eeprom
.
file_dump_to_eeprom
(
default_directory
+
"/eeprom_test_A.dat"
);
...
...
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