-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchannels_act_rx.sh
More file actions
executable file
·65 lines (57 loc) · 2.18 KB
/
channels_act_rx.sh
File metadata and controls
executable file
·65 lines (57 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# Copyright 2022-2024 NXP
#
# NXP Confidential. This software is owned or controlled by NXP and may only
# be used strictly in accordance with the applicable license terms. By expressly accepting
# such terms or by downloading, installing, activating and/or otherwise using
# the software, you are agreeing that you have read, and that you agree to
# comply with and are bound by, such license terms. If you do not agree to
# be bound by the applicable license terms, then you may not retain,
# install, activate or otherwise use the software.
source ./check_dfe_cap_core_map.sh
if [ $((vspa_image_version)) -ge $((0x420)) ];then
echo -e "This command is not supported any more."
exit 0
fi
print_usage()
{
echo "usage ./channels_act_rx.sh [ant_id_list]"
echo " Set RX channels active. Specified channels will be set active to process RX path normally, other channels will be set idle and only RX QEC is working"
echo " ant_id_list: list of ant id to set active, each id is 0-5. the list can be any combination of num from 0 to 5, all stands for all antennas"
echo " Example: ./channels_act_rx.sh 0 will set channel 0 active, other channels set idle"
echo " Example: ./channels_act_rx.sh 0 1 will set channel 0 and 1 active, other channels set idle"
echo " Example: ./channels_act_rx.sh all will set or enabled channels active"
echo
}
ant_list=(0 0 0 0 0 0)
arg_parse()
{
if [ $1 = 0 ]; then ant_list[$1]=1
elif [ $1 = 1 ]; then ant_list[$1]=1
elif [ $1 = 2 ]; then ant_list[$1]=1
elif [ $1 = 3 ]; then ant_list[$1]=1
elif [ $1 = 4 ]; then ant_list[$1]=1
elif [ $1 = 5 ]; then ant_list[$1]=1
elif [ $1 = all ]; then ant_list=(1 1 1 1 1 1)
else echo Argument $1 undefined; print_usage; exit 1;
fi
}
for i in "$@"
do
arg_parse $i
done
for ((i=0;i<NUM_ANTS;i++))
do
if [ $((ant_enable[i]&BITMASK_ANT_ENABLE_RX)) = 0 ];then
[ $((ant_list[i])) -eq 1 ] && echo ***WARBING: Ant $i is disabled, can not be set active.
continue
fi
rxcore=${antrx[$i]}
if [ $((ant_list[i])) -eq 1 ];then
log=`./kernels_disable_rx.sh $i -r`;
echo Ant $i is set active.
else
log=`./kernels_disable_rx.sh $i fft 2xdown`;
echo Ant $i is set idle;
fi
done