Last change
on this file was
1715,
checked in by murphpo, 13 years ago
|
cleaning up PHY directory; coded PHY is now primary OFDM_MIMO model
|
File size:
3.5 KB
|
Line | |
---|
1 | function [o_zero, o_pilotVal1, o_pilotVal2, o_nonPilot] = tx_pilot_select(neg, antSel, sc0, ind0, ind1, ind2, ind3, alamoutiMode) |
---|
2 | if (sc0) %DC subcarrier; force zeros |
---|
3 | o_zero = 1; |
---|
4 | o_nonPilot = 0; |
---|
5 | o_pilotVal1 = 0; |
---|
6 | o_pilotVal2 = 0; |
---|
7 | elseif (~(ind0 | ind1 | ind2 | ind3)) %Non-pilot, non-zero subcarrier |
---|
8 | o_zero = 0; |
---|
9 | o_nonPilot = 1; |
---|
10 | o_pilotVal1 = 0; |
---|
11 | o_pilotVal2 = 0; |
---|
12 | elseif (alamoutiMode) %Non-zero, pilot subcarrier, Alamouti mode |
---|
13 | if(~antSel) %Even symbol |
---|
14 | if(ind2 | ind3) |
---|
15 | o_zero = 1; |
---|
16 | o_nonPilot = 0; |
---|
17 | o_pilotVal1 = 0; |
---|
18 | o_pilotVal2 = 0; |
---|
19 | elseif(ind0 | ind1) |
---|
20 | if(~neg) %Non-negate symbol |
---|
21 | o_zero = 0; |
---|
22 | o_nonPilot = 0; |
---|
23 | o_pilotVal1 = 1; |
---|
24 | o_pilotVal2 = 0; |
---|
25 | else %Negate |
---|
26 | o_zero = 0; |
---|
27 | o_nonPilot = 0; |
---|
28 | o_pilotVal1 = 0; |
---|
29 | o_pilotVal2 = 1; |
---|
30 | end |
---|
31 | else %impossible |
---|
32 | o_zero = 0; |
---|
33 | o_nonPilot = 1; |
---|
34 | o_pilotVal1 = 0; |
---|
35 | o_pilotVal2 = 0; |
---|
36 | end |
---|
37 | else % antSel == 1 Odd symbol |
---|
38 | if(ind0 | ind1) |
---|
39 | o_zero = 1; |
---|
40 | o_nonPilot = 0; |
---|
41 | o_pilotVal1 = 0; |
---|
42 | o_pilotVal2 = 0; |
---|
43 | elseif(ind2) |
---|
44 | if(~neg) %Non-negate symbol |
---|
45 | o_zero = 0; |
---|
46 | o_nonPilot = 0; |
---|
47 | o_pilotVal1 = 1; |
---|
48 | o_pilotVal2 = 0; |
---|
49 | else %Negate |
---|
50 | o_zero = 0; |
---|
51 | o_nonPilot = 0; |
---|
52 | o_pilotVal1 = 0; |
---|
53 | o_pilotVal2 = 1; |
---|
54 | end |
---|
55 | elseif(ind3) |
---|
56 | if(~neg) %Non-negate symbol |
---|
57 | o_zero = 0; |
---|
58 | o_nonPilot = 0; |
---|
59 | o_pilotVal1 = 0; |
---|
60 | o_pilotVal2 = 1; |
---|
61 | else %Negate |
---|
62 | o_zero = 0; |
---|
63 | o_nonPilot = 0; |
---|
64 | o_pilotVal1 = 1; |
---|
65 | o_pilotVal2 = 0; |
---|
66 | end |
---|
67 | else %impossible |
---|
68 | o_zero = 0; |
---|
69 | o_nonPilot = 1; |
---|
70 | o_pilotVal1 = 0; |
---|
71 | o_pilotVal2 = 0; |
---|
72 | end |
---|
73 | end |
---|
74 | elseif (~alamoutiMode) %Non-zero, pilot subcarrier, SISO/multiplexing mode |
---|
75 | if(antSel) %Odd symbol |
---|
76 | o_zero = 1; |
---|
77 | o_nonPilot = 0; |
---|
78 | o_pilotVal1 = 0; |
---|
79 | o_pilotVal2 = 0; |
---|
80 | else %Even symbol |
---|
81 | if(~neg) |
---|
82 | if(ind0 | ind1 | ind2) |
---|
83 | o_zero = 0; |
---|
84 | o_nonPilot = 0; |
---|
85 | o_pilotVal1 = 1; |
---|
86 | o_pilotVal2 = 0; |
---|
87 | elseif(ind3) |
---|
88 | o_zero = 0; |
---|
89 | o_nonPilot = 0; |
---|
90 | o_pilotVal1 = 0; |
---|
91 | o_pilotVal2 = 1; |
---|
92 | else %impossible |
---|
93 | o_zero = 0; |
---|
94 | o_nonPilot = 1; |
---|
95 | o_pilotVal1 = 0; |
---|
96 | o_pilotVal2 = 0; |
---|
97 | end |
---|
98 | else %neg == 1 |
---|
99 | if(ind0 | ind1 | ind2) |
---|
100 | o_zero = 0; |
---|
101 | o_nonPilot = 0; |
---|
102 | o_pilotVal1 = 0; |
---|
103 | o_pilotVal2 = 1; |
---|
104 | elseif(ind3) |
---|
105 | o_zero = 0; |
---|
106 | o_nonPilot = 0; |
---|
107 | o_pilotVal1 = 1; |
---|
108 | o_pilotVal2 = 0; |
---|
109 | else %impossible |
---|
110 | o_zero = 0; |
---|
111 | o_nonPilot = 1; |
---|
112 | o_pilotVal1 = 0; |
---|
113 | o_pilotVal2 = 0; |
---|
114 | end |
---|
115 | end |
---|
116 | end |
---|
117 | else %impossible |
---|
118 | o_zero = 0; |
---|
119 | o_nonPilot = 1; |
---|
120 | o_pilotVal1 = 0; |
---|
121 | o_pilotVal2 = 0; |
---|
122 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.