Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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 ADC 100M 14b 4cha - Testing
Commits
63d4d7b5
Commit
63d4d7b5
authored
May 22, 2012
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test23: Update fmc_eeprom interface.
parent
08bdb42c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
42 deletions
+32
-42
test23.py
test/fmcadc100m14b4cha/python/test23.py
+32
-42
No files found.
test/fmcadc100m14b4cha/python/test23.py
View file @
63d4d7b5
...
...
@@ -20,6 +20,7 @@ sys.path.append('../../../common/')
# Import common modules
from
ptsexcept
import
*
#from fmc_eeprom import *
import
rr
# Import specific modules
...
...
@@ -92,66 +93,55 @@ def main (default_directory='.'):
f_calibr
=
open
(
CALIBR_FILENAME
,
'r+'
)
calibr_data
=
[]
for
line
in
iter
(
f_calibr
):
calibr_data
.
append
(
int
(
line
,
16
))
calibr_data
.
append
(
0xFF
&
int
(
line
,
16
))
calibr_data
.
append
(
0xFF
&
(
int
(
line
,
16
)
>>
8
))
f_calibr
.
close
()
print
"Raw calibration data:"
for
data
in
calibr_data
:
print
"0x
%0
4
X"
%
(
data
)
print
"0x
%0
2
X"
%
(
data
)
return
#==================================================
# Create Board Info Area
bia
=
BoardInfoArea
()
# Set Board Info Area fields
bia
.
set_manufacturer
(
"CERN"
)
bia
.
set_product_name
(
"ADC100M"
)
bia
.
set_serial_number
(
"1234567890"
)
bia
.
set_part_number
(
"ADC100M"
)
bia
.
set_fru_file_id
(
"abcde"
)
bia
=
BoardInfoArea
(
"CERN"
,
"FmcAdc100m14b4cha"
,
serial
,
"part number"
,
"fru"
)
#==================================================
# Multirecords Area
dcload
=
DCLoadRecord
()
# Set DC Load information
set_voltage_required
()
set_nominal_voltage
()
set_min_voltage
()
set_max_voltage
()
set_spec_ripple
()
set_min_current
()
set_max_current
()
dcout
=
DCOutputRecord
()
# Set DC Output information
set_output_info
()
set_nominal_voltage
()
set_max_negative_voltage_deviation
()
set_max_positive_voltage_deviation
()
set_ripple
()
set_min_current_draw
()
set_max_current_draw
()
oem
=
OEMRecord
()
# Set OEM record information
set_module_size
()
set_p1_connector_size
()
set_p2_connector_size
()
set_clock_direction
()
set_nsignals
()
set_num_gbt_transceivers
()
set_max_clock
()
# output number, vnom, vmin, vmax, ripple, imin, imax
dcload0
=
DCLoadRecord
(
0
,
2.5
,
2.375
,
2.625
,
0.0
,
0
,
4000
)
# VADJ
dcload1
=
DCLoadRecord
(
1
,
3.3
,
3.135
,
3.465
,
0.0
,
0
,
3000
)
# P3V3
dcload2
=
DCLoadRecord
(
2
,
12.0
,
11.4
,
12.6
,
0.0
,
0
,
1000
)
# P12V
dcload
=
[
dcload0
,
dcload1
,
dcload2
]
# output number, vnom, vmin, vmax, ripple, imin, imax
dcout0
=
DCOutputRecord
(
3
,
0.0
,
0.0
,
0.0
,
0.0
,
0
,
0
)
# VIO_B_M2C
dcout1
=
DCOutputRecord
(
4
,
0.0
,
0.0
,
0.0
,
0.0
,
0
,
0
)
# VREF_A_M2C
dcout2
=
DCOutputRecord
(
5
,
0.0
,
0.0
,
0.0
,
0.0
,
0
,
0
)
# VREF_B_M2C
dcout
=
[
dcout0
,
dcout1
,
dcout2
]
# module size : 0=single width, 1=double width
# P1 size : 0=LPC, 1=HPC
# P2 size : 0=LPC, 1=HPC, 3=not fitted
# clock dir : 0=M2C, 1=C2M
# nb sig P1 A : number
# nb sig P1 B : number
# nb sig P2 A : number
# nb sig P2 B : number
# nb GBT P1 : number
# nb GBT P2 : number
# max TCK freq : frequency in MHz
oem
=
OEMRecord
(
0
,
0
,
3
,
0
,
68
,
0
,
0
,
0
,
0
,
0
,
0
)
#==================================================
# Internal Use Area
iua
=
InternalUseArea
()
iua
.
set_data
([
0x11
,
0x22
,
0x33
]
)
# Takes an array of byte as parameter
iua
=
InternalUseArea
(
calibr_data
)
#==================================================
# Open, set, write, close!
ipmi_open_file
(
"
tes
t.out"
)
ipmi_open_file
(
"
eeprom_conten
t.out"
)
ipmi_set
(
bia
,
dcload
,
dcout
,
oem
,
iua
)
ipmi_write
()
ipmi_close_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