Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
PyPCC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
PyPCC
Commits
fe33b653
Commit
fe33b653
authored
Sep 6, 2021
by
Paulus Kruger
Browse files
Options
Downloads
Patches
Plain Diff
HBAT2 config debugged
parent
88c999f8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/HBAT2.yaml
+77
-18
77 additions, 18 deletions
config/HBAT2.yaml
testHBA2_pico.py
+13
-3
13 additions, 3 deletions
testHBA2_pico.py
with
90 additions
and
21 deletions
config/HBAT2.yaml
+
77
−
18
View file @
fe33b653
...
@@ -4,8 +4,8 @@ description: "1234"
...
@@ -4,8 +4,8 @@ description: "1234"
drivers
:
drivers
:
-
name
:
hbaio
#TCA9548
-
name
:
hbaio
#TCA9548
type
:
hbat_pico_io
type
:
hbat_pico_io
#
parameters: ['/dev/ttyACM0'] #serial port number
parameters
:
[
'
/dev/ttyACM0'
]
#serial port number
parameters
:
[
'
COM3'
]
#serial port number
#
parameters: ['COM3'] #serial port number
-
name
:
hbat2
-
name
:
hbat2
type
:
i2c_array
#An array of similar devices connected to an I2C switch
type
:
i2c_array
#An array of similar devices connected to an I2C switch
parent
:
hbaio
parent
:
hbaio
...
@@ -60,8 +60,6 @@ device_registers:
...
@@ -60,8 +60,6 @@ device_registers:
address
:
0x14
address
:
0x14
-
name
:
ADDR
-
name
:
ADDR
address
:
0x20
address
:
0x20
-
name
:
VSENSE
address
:
0x34
-
name
:
SAVE_EEPROM
-
name
:
SAVE_EEPROM
address
:
0x40
address
:
0x40
-
name
:
LOAD_EEPROM
-
name
:
LOAD_EEPROM
...
@@ -113,6 +111,28 @@ variables:
...
@@ -113,6 +111,28 @@ variables:
dim
:
4
dim
:
4
mask
:
HBAT2_BF_mask
mask
:
HBAT2_BF_mask
-
name
:
HBAT2_DELAYS.Y_G1
description
:
Group1 delays
driver
:
hbat2
devreg
:
[
BF.Y1
,
BF.Y2
,
BF.Y3
,
BF.Y4
]
bitoffset
:
0
width
:
4
rw
:
rw
dtype
:
uint8
dim
:
16
mask
:
HBAT2_ANT_mask
-
name
:
HBAT2_DELAYS_Y_G2
description
:
Group2 delays
driver
:
hbat2
devreg
:
[
BF.Y1
]
bitoffset
:
4
width
:
4
rw
:
rw
dtype
:
uint8
dim
:
4
mask
:
HBAT2_BF_mask
-
name
:
HBAT2_ID
-
name
:
HBAT2_ID
description
:
Unique HBAT ID
description
:
Unique HBAT ID
driver
:
hbat2
driver
:
hbat2
...
@@ -129,6 +149,7 @@ variables:
...
@@ -129,6 +149,7 @@ variables:
devreg
:
BF.VERSION
devreg
:
BF.VERSION
width
:
32
width
:
32
rw
:
ro
rw
:
ro
# dtype: string
dtype
:
uint32
dtype
:
uint32
dim
:
4
dim
:
4
mask
:
HBAT2_BF_mask
mask
:
HBAT2_BF_mask
...
@@ -145,7 +166,7 @@ variables:
...
@@ -145,7 +166,7 @@ variables:
-
name
:
HBAT2_PWR_FE
-
name
:
HBAT2_PWR_FE
driver
:
hbat2
driver
:
hbat2
devreg
:
BF.FE_PWR
devreg
:
[
BF.FE_PWR
,
BF.FE_PWR
,
BF.FE_PWR
,
BF.FE_PWR
]
bitoffset
:
[
0
,
1
,
2
,
3
]
bitoffset
:
[
0
,
1
,
2
,
3
]
width
:
1
width
:
1
rw
:
rw
rw
:
rw
...
@@ -153,30 +174,68 @@ variables:
...
@@ -153,30 +174,68 @@ variables:
dim
:
16
dim
:
16
mask
:
HBAT2_ANT_mask
mask
:
HBAT2_ANT_mask
-
name
:
HBAT2_BEAMFORM
-
name
:
[
HBAT2_BEAMFORM
_X
,
HBAT2_BEAMFORM_Y
]
driver
:
hbat2
driver
:
hbat2
devreg
:
BF.SWX
devreg
:
[
BF.SWX
,
BF.SWY
]
bitoffset
:
0
bitoffset
:
0
width
:
5
width
:
5
rw
:
rw
rw
:
rw
dtype
:
string
dtype
:
uint8
dim
:
4
dim
:
4
mask
:
HBAT2_BF_mask
mask
:
HBAT2_BF_mask
# lookup: {ANT0:0, ANT1:4, ANT2:1, ANT3:2, BF:14}
# lookup: {ANT0:0, ANT1:4, ANT2:1, ANT3:2, BF:14}
-
name
:
HBAT2_V
1
-
name
:
HBAT2_
BF_
V
driver
:
hbat2
driver
:
hbat2
devreg
:
BF.VSENSE
devreg
:
BF.0x34
bitoffset
:
0
width
:
16
width
:
8
rw
:
ro
rw
:
ro
dtype
:
float
dtype
:
double
scale
:
1
scale
:
1
.0
dim
:
4
dim
:
4
mask
:
HBAT2_BF_mask
mask
:
HBAT2_BF_mask
-
name
:
HBAT2_FE_I
driver
:
hbat2
devreg
:
[
BF.0x30
,
BF.0x31
,
BF.0x32
,
BF.0x33
]
width
:
16
rw
:
ro
dtype
:
double
scale
:
1.0
dim
:
16
mask
:
HBAT2_ANT_mask
-
name
:
[
HBAT2_BF_I1
,
HBAT2_BF_I2
]
driver
:
hbat2
devreg
:
[
BF.0x35
,
BF.0x36
]
width
:
16
rw
:
ro
dtype
:
double
scale
:
1.0
dim
:
16
mask
:
HBAT2_BF_mask
methods
:
methods
:
-
name
:
LOAD_EEPROM
-
name
:
HBAT2_Init
#Called after startup to load. Should have all stored registers
driver
:
hbat2
driver
:
hbat2
debug
:
True
instructions
:
instructions
:
-
BF1.LOAD_EEPROM
:
0
-
HBAT2_ID
:
Update
-
HBAT2_VERSION
:
Update
-
HBAT2_DELAYS_X_G1
:
Update
-
HBAT2_DELAYS_X_G2
:
Update
-
HBAT2_DELAYS_Y_G1
:
Update
-
HBAT2_DELAYS_Y_G2
:
Update
-
HBAT2_DELAYS_PWR_FE
:
Update
-
HBAT2_LED0
:
Update
-
HBAT2_PWR_X
:
Update
-
HBAT2_PWR_Y
:
Update
-
HBAT2_PWR_FEs
:
Update
-
HBAT2_PWR_FE
:
Update
-
HBAT2_BEAMFORM_X
:
Update
-
HBAT2_BEAMFORM_Y
:
Update
-
HBAT2_BF_V
:
Update
# - HBAT2_BF_I1: Update
# - HBAT2_BF_I2: Update
-
HBAT2_FE_I
:
Update
\ No newline at end of file
This diff is collapsed.
Click to expand it.
testHBA2_pico.py
+
13
−
3
View file @
fe33b653
...
@@ -41,7 +41,8 @@ if __name__ == '__main__':
...
@@ -41,7 +41,8 @@ if __name__ == '__main__':
#RCU_I2C.callmethod(var1,[])
#RCU_I2C.callmethod(var1,[])
BFaddr
=
[
0
,
3
];
BFaddr
=
[
0
,
3
];
var1
=
RCU_conf
.
getvarid
(
'
DELAYS_X_G1
'
);
# var1=RCU_conf.getvarid('HBAT2_DELAYS_X_G1');
var1
=
RCU_conf
.
getvarid
(
'
HBAT2_PWR_FE
'
);
N
=
16
;
N
=
16
;
data
=
[
1
,
2
,
3
,
4
]
+
[
0
]
*
8
+
[
1
,
2
,
3
,
4
];
data
=
[
1
,
2
,
3
,
4
]
+
[
0
]
*
8
+
[
1
,
2
,
3
,
4
];
mask
=
[(
i
//
4
)
in
BFaddr
for
i
in
range
(
N
)];
mask
=
[(
i
//
4
)
in
BFaddr
for
i
in
range
(
N
)];
...
@@ -49,13 +50,22 @@ if __name__ == '__main__':
...
@@ -49,13 +50,22 @@ if __name__ == '__main__':
# RCU_I2C.setvar(var1,data,mask);
# RCU_I2C.setvar(var1,data,mask);
RCU_I2C
.
readvar
(
var1
,
mask
);
RCU_I2C
.
readvar
(
var1
,
mask
);
var1
=
RCU_conf
.
getvarid
(
'
DELAYS_X_G2
'
);
# var1=RCU_conf.getvarid('HBAT2_FE_I');
# RCU_I2C.readvar(var1,mask);
var1
=
RCU_conf
.
getvarid
(
'
HBAT2_DELAYS_X_G2
'
);
N
=
4
;
N
=
4
;
data
=
[
2
,
0
,
0
,
3
];
data
=
[
2
,
0
,
0
,
3
];
mask
=
[
i
in
BFaddr
for
i
in
range
(
N
)];
mask
=
[
i
in
BFaddr
for
i
in
range
(
N
)];
print
(
mask
,
data
)
print
(
mask
,
data
)
# RCU_I2C.setvar(var1,data,mask);
# RCU_I2C.setvar(var1,data,mask);
RCU_I2C
.
readvar
(
var1
,
mask
);
# RCU_I2C.readvar(var1,mask);
# var1=RCU_conf.getvarid('HBAT2_BF_V');
# RCU_I2C.readvar(var1,mask);
# var1=RCU_conf.getvarid('HBAT2_BF_I1');
# RCU_I2C.readvar(var1,mask);
time
.
sleep
(
5
);
time
.
sleep
(
5
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment