source: ReferenceDesigns/w3_802.11/sysgen/wlan_phy_rx_pmd/util/PLCP_Preamble_gen.m

Last change on this file was 2088, checked in by murphpo, 11 years ago

Initial commit of Sysgen cores

File size: 1.1 KB
Line 
1function PLCP_Preamble = PLCP_Preamble_gen()
2
3% Preamble definition (802.11-2007 17.3.3)
4
5%STS for AGC convergence and coarse CFO
6% STS is derived from 64 points in frequency domain, only 16 non-zero
7% STS is defined as 16 points in time domain
8%%
9sts_f = zeros(1,64);
10sts_f(1:27) = [0 0 0 0 -1-1i 0 0 0 -1-1i 0 0 0 1+1i 0 0 0 1+1i 0 0 0 1+1i 0 0 0 1+1i 0 0];
11sts_f(39:64) = [0 0 1+1i 0 0 0 -1-1i 0 0 0 1+1i 0 0 0 -1-1i 0 0 0 -1-1i 0 0 0 1+1i 0 0 0];
12sts_t = ifft(sqrt(13/6).*sts_f, 64);
13sts_t = sts_t(1:16);
14
15%%
16sts_t_norm = 1;%max(abs([real(sts_t) imag(sts_t)]));
17sts_t = sts_t .* 1/sts_t_norm;
18
19%LTS for CFO and channel estimation
20lts_f = [0 1 -1 -1 1 1 -1 1 -1 1 -1 -1 -1 -1 -1 1 1 -1 -1 1 -1 1 -1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 -1 -1 1 1 -1 1 -1 1 1 1 1 1 1 -1 -1 1 1 -1 1 -1 1 1 1 1];
21lts_t = ifft(lts_f, 64);
22
23%%
24lts_t_norm = 1;%max(abs([real(lts_t) imag(lts_t)]));
25lts_t = lts_t .* 1/lts_t_norm;
26
27preamble = [repmat(sts_t, 1, 10)  lts_t(33:64) lts_t lts_t];
28
29PLCP_Preamble = struct();
30PLCP_Preamble.STS_t = sts_t;
31PLCP_Preamble.LTS_t = lts_t;
32PLCP_Preamble.LTS_f = lts_f;
33PLCP_Preamble.Preamble_t = preamble;
Note: See TracBrowser for help on using the repository browser.