[1976] | 1 | %IMPORTANT: if you change any of the NumSamps values, you must update the |
---|
| 2 | % EDK Processor block with the new shared memory sizes. We recommend |
---|
| 3 | % deleting the existing EDK Processor block and re-adding it, to ensure |
---|
| 4 | % all changes are reflected |
---|
[2839] | 5 | |
---|
[4182] | 6 | NumSamps_Tx_IQ = 2^15; |
---|
[4285] | 7 | NumSamps_Rx_IQ = 2^15; |
---|
| 8 | NumSamps_Rx_RSSI = 2^13; |
---|
[4182] | 9 | |
---|
| 10 | simulation = 0; |
---|
| 11 | |
---|
| 12 | % ------------------------------------------------------------------------ |
---|
| 13 | % Initial Register Values |
---|
| 14 | % ------------------------------------------------------------------------ |
---|
| 15 | |
---|
| 16 | if (simulation == 0) |
---|
| 17 | rx_length = 0; % Default 0 |
---|
| 18 | rf_rx_iq_threshold = 0; % Default 0 |
---|
| 19 | rf_rx_iq_buf_rd_byte_offset = 0; % Default 0 |
---|
| 20 | rf_rx_iq_buf_wr_byte_offset = 0; % Default 0 |
---|
[4232] | 21 | |
---|
| 22 | tx_length = 0; % Default 0 |
---|
| 23 | rf_tx_iq_threshold = 0; % Default 0 |
---|
| 24 | rf_tx_iq_buf_rd_byte_offset = 0; % Default 0 |
---|
| 25 | rf_tx_iq_buf_wr_byte_offset = 0; % Default 0 |
---|
[4182] | 26 | |
---|
[4232] | 27 | rf_error_clr = 0; % Default 0 |
---|
| 28 | |
---|
[4182] | 29 | rx_buf_en = 0; % Default 0 |
---|
| 30 | tx_buf_en = 0; % Default 0 |
---|
[4809] | 31 | |
---|
| 32 | txrx_counter_reset = 0; % Default 0 |
---|
[4182] | 33 | else |
---|
[4198] | 34 | rx_length = hex2dec('0000FFFF'); % Default (NumSamps_Rx_IQ - 1) |
---|
[4232] | 35 | rf_rx_iq_threshold = hex2dec('00002000'); % Default (NumSamps_Rx_IQ / 2) |
---|
[4182] | 36 | rf_rx_iq_buf_rd_byte_offset = 0; % Default 0 |
---|
| 37 | rf_rx_iq_buf_wr_byte_offset = 0; % Default 0 |
---|
| 38 | |
---|
[4232] | 39 | tx_length = hex2dec('0000FFFF'); % Default (NumSamps_Tx_IQ - 1) |
---|
| 40 | rf_tx_iq_threshold = hex2dec('00004000'); % Default (NumSamps_Tx_IQ / 2) |
---|
| 41 | rf_tx_iq_buf_wr_byte_offset = hex2dec('00020000'); % Default (NumSamps_Tx_IQ * 4) |
---|
| 42 | |
---|
| 43 | rf_error_clr = 0; % Default 0 |
---|
| 44 | |
---|
[4182] | 45 | rx_buf_en = hex2dec('0000000F'); % Default hex2dec('0000000F') |
---|
| 46 | tx_buf_en = hex2dec('0000000F'); % Default hex2dec('0000000F') |
---|
| 47 | end |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | % ------------------------------------------------------------------------ |
---|
| 51 | % Buffer Configuration Register: |
---|
| 52 | % Register format: |
---|
| 53 | % [31:26] - Reserved |
---|
| 54 | % [25:24] - Scope data select |
---|
| 55 | % [23:21] - Reserved |
---|
| 56 | % [20] - Counter data select |
---|
| 57 | % [17] - TX Byte order |
---|
| 58 | % [16] - TX Word order |
---|
| 59 | % [17] - RX Byte order |
---|
| 60 | % [16] - RX Word order |
---|
| 61 | % [15:10] - Reserved |
---|
| 62 | % [ 9: 8] - RSSI clock select |
---|
| 63 | % [7] - AGC IQ select RFD |
---|
| 64 | % [6] - AGC IQ select RFC |
---|
| 65 | % [5] - AGC IQ select RFB |
---|
| 66 | % [4] - AGC IQ select RFA |
---|
| 67 | % [ 3: 2] - Reserved |
---|
| 68 | % [1] - Stop Tx |
---|
| 69 | % [0] - Continous Tx |
---|
| 70 | % |
---|
| 71 | if (simulation == 0) |
---|
| 72 | wl_buffers_config_init = 0; % Initialize the Config register to zero |
---|
| 73 | else |
---|
| 74 | wl_buffers_config_init = hex2dec('001A0100'); % Initialize the Config register to 0x001A0100 |
---|
| 75 | end |
---|
| 76 | |
---|
| 77 | |
---|
| 78 | % ------------------------------------------------------------------------ |
---|
| 79 | % Tx Delay Register: |
---|
| 80 | % Register format: |
---|
| 81 | % [31: 0] - Tx Delay |
---|
| 82 | % |
---|
[2839] | 83 | wl_buffers_tx_delay_init = 1000; % This will provide a Tx Delay of 1001 samples |
---|
[4182] | 84 | |
---|
| 85 | |
---|
| 86 | % ------------------------------------------------------------------------ |
---|
| 87 | % RF Buffer Select Register: |
---|
| 88 | % Register format: |
---|
| 89 | % [31:26] - Reserved |
---|
| 90 | % [25:24] - RFD buffer select |
---|
| 91 | % [23:18] - Reserved |
---|
| 92 | % [17:16] - RFC buffer select |
---|
| 93 | % [15:10] - Reserved |
---|
| 94 | % [ 9: 8] - RFB buffer select |
---|
| 95 | % [ 7: 2] - Reserved |
---|
| 96 | % [ 1: 0] - RFA buffer select |
---|
| 97 | % |
---|
| 98 | % RF* buffer select values: |
---|
| 99 | % 0 - RFA Tx buffer |
---|
| 100 | % 1 - RFB Tx buffer |
---|
| 101 | % 2 - RFC Tx buffer |
---|
| 102 | % 3 - RFD Tx buffer |
---|
| 103 | % |
---|
| 104 | wl_buffers_rf_buffer_sel = hex2dec('03020100'); % Select the buffer to use for the output |
---|