Changes between Version 6 and Version 7 of WARPLab/Reference/Baseband/Buffers
- Timestamp:
- Mar 13, 2015, 12:22:49 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WARPLab/Reference/Baseband/Buffers
v6 v7 43 43 44 44 == Command List and Documentation == 45 45 46 === {{{tx_delay}}} === 46 Transmit delay- gets or sets the number of sample periods the baseband [[BR]] 47 waits between the trigger and starting the transission[[BR]] 47 Transmit delay- gets or sets the number of sample periods the baseband waits between the trigger and starting the transission[[BR]] 48 48 49 49 … … 54 54 '''Returns:''' (uint32 TX_DLY) or none 55 55 56 If an argument is specified, this command enters a write mode where[[BR]] 57 that argument is written to the board. If no argument is specified,[[BR]] 58 the current value of TX_DLY is read from the board.[[BR]] 56 If an argument is specified, this command enters a write mode where that argument is written to the board. If no argument is specified, the current value of TX_DLY is read from the board.[[BR]] 57 59 58 60 59 61 60 === {{{tx_length}}} === 62 Transmit length- reads or sets the duration of each transmit cycle, in sample periods [[BR]] 63 64 65 '''Requires BUFF_SEL:''' No 66 67 '''Arguments:''' none or (uint32 TX_LEN) 68 69 '''Returns:''' (uint32 TX_LEN) or none 70 71 If an argument is specified, this command enters a write mode where[[BR]] 72 that argument is written to the board. If no argument is specified,[[BR]] 73 the current value of TX_LEN is read from the board.[[BR]] 61 Transmit length- sets the duration of each transmit cycle, in sample periods [[BR]] 62 63 64 '''Requires BUFF_SEL:''' No 65 66 '''Arguments:''' (uint32 TX_LEN) 67 68 '''Returns:''' none 69 70 NOTE: This will error if the user tries to read tx_length from the board. The 'tx_buff_max_num_samples' command should be used to determine the capabilities of the board.[[BR]] 71 74 72 75 73 … … 80 78 '''Requires BUFF_SEL:''' No 81 79 82 '''Arguments:''' none or (uint32 RX_LEN) 83 84 '''Returns:''' (uint32 RX_LEN) or none 85 86 If an argument is specified, this command enters a write mode where[[BR]] 87 that argument is written to the board. If no argument is specified,[[BR]] 88 the current value of RX_LEN is read from the board.[[BR]] 80 '''Arguments:''' (uint32 RX_LEN) 81 82 '''Returns:''' none 83 84 NOTE: This will error if the user tries to read tx_length from the board. The 'rx_buff_max_num_samples' command should be used to determine the capabilities of the board.[[BR]] 85 86 87 88 === {{{tx_buff_max_num_samples}}} === 89 Maximum number of TX samples[[BR]] 90 91 92 '''Requires BUFF_SEL:''' Yes 93 94 '''Arguments:''' none 95 96 '''Returns:''' (uint32 MAX_TX_LEN) 97 98 99 100 === {{{rx_buff_max_num_samples}}} === 101 Maximum number of RX samples[[BR]] 102 103 104 '''Requires BUFF_SEL:''' Yes 105 106 '''Arguments:''' none 107 108 '''Returns:''' (uint32 MAX_RX_LEN) 109 89 110 90 111 … … 95 116 '''Requires BUFF_SEL:''' No 96 117 97 '''Arguments:''' (boolean CONT_TX) 98 CONT_TX:[[BR]]99 true enablescontinuous transmit mode[[BR]]100 false disable continuous transmit mode[[BR]] 101 102 '''Returns:''' none 118 '''Arguments:''' (boolean CONT_TX)[[BR]] 119 ''true'' - enables continuous transmit mode[[BR]] 120 ''false'' - disable continuous transmit mode[[BR]] 121 122 '''Returns:''' none 123 103 124 104 125 105 126 === {{{tx_buff_en}}} === 106 Enable transmit buffer for one or more interfaces. When a buffer is enabled it will[[BR]] 107 drive samples into its associated interface when a trigger is received. The interface[[BR]] 108 itself must also be enabled (wl_interfaceCmd(...,'tx_en')) to actually transmit the samples[[BR]] 109 110 111 '''Requires BUFF_SEL:''' Yes 112 113 '''Arguments:''' none 114 115 '''Returns:''' none 127 Enable transmit buffer for one or more interfaces. When a buffer is enabled it will drive samples into its associated interface when a trigger is received. The interface itself must also be enabled (wl_interfaceCmd(...,'tx_en')) to actually transmit the samples[[BR]] 128 129 130 '''Requires BUFF_SEL:''' Yes 131 132 '''Arguments:''' none 133 134 '''Returns:''' none 135 116 136 117 137 118 138 === {{{rx_buff_en}}} === 119 Enable receive buffer for one or more interfaces. When a buffer is enabled it will[[BR]] 120 capture samples from its associated interface when a trigger is received. The interface[[BR]] 121 itself must also be enabled (wl_interfaceCmd(...,'rx_en'))[[BR]] 122 123 124 '''Requires BUFF_SEL:''' Yes 125 126 '''Arguments:''' none 127 128 '''Returns:''' none 139 Enable receive buffer for one or more interfaces. When a buffer is enabled it will capture samples from its associated interface when a trigger is received. The interface itself must also be enabled (wl_interfaceCmd(...,'rx_en'))[[BR]] 140 141 142 '''Requires BUFF_SEL:''' Yes 143 144 '''Arguments:''' none 145 146 '''Returns:''' none 147 129 148 130 149 131 150 === {{{tx_rx_buff_dis}}} === 132 Disable the Tx and Rx buffers for one or more interfaces. When a buffer is disabled it will not [[BR]]133 output/capture samples when a trigger is received, even if the associated interface is enabled[[BR]] 134 135 136 '''Requires BUFF_SEL:''' Yes 137 138 '''Arguments:''' none 139 140 '''Returns:''' none 151 Disable the Tx and Rx buffers for one or more interfaces. When a buffer is disabled it will not output/capture samples when a trigger is received, even if the associated interface is enabled[[BR]] 152 153 154 '''Requires BUFF_SEL:''' Yes 155 156 '''Arguments:''' none 157 158 '''Returns:''' none 159 141 160 142 161 … … 153 172 154 173 174 155 175 === {{{rx_buff_clk_freq}}} === 156 176 Read the receive sample clock frequency out of the buffer core.[[BR]] … … 165 185 166 186 187 167 188 === {{{rx_rssi_clk_freq}}} === 168 189 Read the receive RSSI sample clock frequency out of the buffer core.[[BR]] … … 177 198 178 199 200 179 201 === {{{write_iq}}} === 180 Write I/Q samples to the specified buffers. The dimensions of the buffer selection and samples matrix[[BR]] 181 must agree. The same samples can be written to multiple buffers by combining buffer IDs[[BR]] 202 Write I/Q samples to the specified buffers. The dimensions of the buffer selection and samples matrix must agree. The same samples can be written to multiple buffers by combining buffer IDs[[BR]] 182 203 183 204 184 205 '''Requires BUFF_SEL:''' Yes (combined BUFF_SEL values ok) 185 206 186 '''Arguments:''' (complex double TX_SAMPS, int OFFSET) 187 TX_SAMPS: matrix of complex samples. The number of columns must match the length of BUFF_SEL[[BR]]188 OFFSET: buffer index of first sample to write (optional; defaults to 0)[[BR]]207 '''Arguments:''' (complex double TX_SAMPS, int OFFSET)[[BR]] 208 TX_SAMPS: matrix of complex samples. The number of columns must match the length of BUFF_SEL[[BR]] 209 OFFSET: buffer index of first sample to write (optional; defaults to 0)[[BR]] 189 210 190 211 Examples:[[BR]] … … 192 213 TxLength = 2^14; 193 214 Ts = 1/(wl_basebandCmd(node0,'tx_buff_clk_freq')); 194 t = [0:Ts:(TxLength-1)*Ts].'; %column vector195 X = exp(t*1i*2*pi*3e6); %3MHz sinusoid196 Y = exp(t*1i*2*pi*5e6); %5MHz sinusoid197 198 % Write X to RFA199 wl_basebandCmd(node, RFA, 'write_ iq', X);200 201 % Write X to RFA and RFB202 wl_basebandCmd(node, RFA+RFB, 'write_iq', X);203 204 % Write X to RFA, Y to RFB205 wl_basebandCmd(node, [RFA RFB], 'write_iq',[X Y]);215 t = ![0:Ts:(TxLength-1)*Ts].'; % column vector 216 X = exp(t*1i*2*pi*3e6); % 3MHz sinusoid 217 Y = exp(t*1i*2*pi*5e6); % 5MHz sinusoid 218 219 % Write X to RFA 220 wl_basebandCmd(node, RFA, 'write_IQ', X); 221 222 % Write X to RFA and RFB 223 wl_basebandCmd(node, (RFA + RFB), 'write_IQ', X); 224 225 % Write X to RFA, Y to RFB 226 wl_basebandCmd(node, ![RFA RFB], 'write_IQ', ![X Y]); 206 227 }}} 207 228 229 230 === {{{write_iq_checksum}}} === 231 Write IQ checksum - gets the current Write IQ checksum from the node. [[BR]] 232 233 234 '''Requires BUFF_SEL:''' No 235 236 '''Arguments:''' none 237 238 '''Returns:''' (uint32 WRITE_IQ_CHECKSUM) 239 240 241 208 242 === {{{read_iq}}} === 209 Read I/Q samples from the specified buffers. The elements of the buffer selection must be scalers which[[BR]] 210 identify a single buffer. To read multiple buffers in one call, pass a vector of individual buffer IDs[[BR]] 243 Read I/Q samples from the specified buffers. The elements of the buffer selection must be scalers which identify a single buffer. To read multiple buffers in one call, pass a vector of individual buffer IDs[[BR]] 211 244 212 245 213 246 '''Requires BUFF_SEL:''' Yes (combined BUFF_SEL values not allowed) 214 247 215 '''Arguments:''' (int OFFSET, int NUM_SAMPS) 216 OFFSET: buffer index of first sample to read (optional; defaults to 0)[[BR]]217 NUM_SAMPS: number of complex samples to read (optional; defaults to length(OFFSET:rxIQLen-1))[[BR]]248 '''Arguments:''' (int OFFSET, int NUM_SAMPS)[[BR]] 249 OFFSET: buffer index of first sample to read (optional; defaults to 0)[[BR]] 250 NUM_SAMPS: number of complex samples to read (optional; defaults to length(OFFSET:rxIQLen-1))[[BR]] 218 251 219 252 Examples:[[BR]] 220 253 {{{ 221 % Read full buffer for RFA222 % size(X) will be[rxIQLen, 1]223 X = wl_basebandCmd(node, RFA, 'read_ iq');224 225 % Read partial buffer for RFA (samples 1000:4999)226 % size(X) will be[5000, 1]227 X = wl_basebandCmd(node, RFA, 'read_ iq', 1000, 5000);228 229 % Read full buffers for RFA and RFB230 % size(X) will be[rxIQLen, 2]231 X = wl_basebandCmd(node, [RFA RFB], 'read_iq');254 % Read full buffer for RFA 255 % NOTE: size(X) will be ![rxIQLen, 1] 256 X = wl_basebandCmd(node, RFA, 'read_IQ'); 257 258 % Read partial buffer for RFA (samples 1000:4999) 259 % NOTE: size(X) will be ![5000, 1] 260 X = wl_basebandCmd(node, RFA, 'read_IQ', 1000, 5000); 261 262 % Read full buffers for RFA and RFB 263 % NOTE: size(X) will be ![rxIQLen, 2] 264 X = wl_basebandCmd(node, ![RFA RFB], 'read_IQ'); 232 265 }}} 233 266 267 234 268 === {{{read_rssi}}} === 235 Read RSSI samples from the specified buffers. The elements of the buffer selection must be scalers which[[BR]] 236 identify a single buffer. To read multiple buffers in one call, pass a vector of individual buffer IDs.[[BR]] 269 Read RSSI samples from the specified buffers. The elements of the buffer selection must be scalers which identify a single buffer. To read multiple buffers in one call, pass a vector of individual buffer IDs.[[BR]] 237 270 238 271 See 'read_iq' for arguments/returns[[BR]] 239 272 240 273 274 241 275 === {{{agc_state}}} === 242 Read AGC state from the specified buffers. The elements of the buffer selection must be scalers which[[BR]] 243 identify a single buffer. To read multiple buffers in one call, pass a vector of individual buffer IDs[[BR]] 276 Read AGC state from the specified buffers. The elements of the buffer selection must be scalers which identify a single buffer. To read multiple buffers in one call, pass a vector of individual buffer IDs[[BR]] 244 277 245 278 … … 249 282 250 283 251 '''Returns:''' agc_state -- column vector per buffer BUFF_SEL 252 253 agc_state(1): RF gain chosen by AGC[[BR]] 254 agc_state(2): BB gain chosen by AGC[[BR]] 255 agc_state(3): RSSI observed by AGC at time of lock[[BR]] 256 257 258 === {{{agc_thresh}}} === 259 Read or write AGC threshold.[[BR]] 260 261 262 '''Requires BUFF_SEL:''' No 263 264 '''Arguments:''' none or (int32 thresh1), (int32 thresh2), (int32 thresh3) 265 266 '''Returns:''' (int32 thresh1), (int32 thresh2), (int32 thresh3) or none 267 268 If arguments are specified, this command enters a write mode where[[BR]] 269 those arguments are written to the board. If no arguments are specified,[[BR]] 270 the current values of agc thresholds are read from the board.[[BR]] 271 272 thresh1: receive power (in dBm) under which AGC will not[[BR]] 273 attempt to change gains[[BR]] 274 default value: -90[[BR]] 275 276 thresh2: receive power (in dBm) under which AGC will select[[BR]] 277 high RF gain (RF Gain 3)[[BR]] 278 default value: -53[[BR]] 279 280 thresh3: receive power (in dBm) under which AGC will select[[BR]] 281 medium RF gain (RF Gain 2). Above this receive power[[BR]] 282 the AGC will select low RF gain (RF Gain 1)[[BR]] 283 default value: -43[[BR]] 284 285 Default known-good values for this threshold are derived from[[BR]] 286 the MAX2829 datasheet (bottom, middle plot on page 16).[[BR]] 287 These default values are (-90,-53,-43)dBm. There is no reason[[BR]] 288 to call this command unless changing from these defaults is desired.[[BR]] 284 '''Returns:''' agc_state -- column vector per buffer BUFF_SEL[[BR]] 285 agc_state(1): RF gain chosen by AGC[[BR]] 286 agc_state(2): BB gain chosen by AGC[[BR]] 287 agc_state(3): RSSI observed by AGC at time of lock[[BR]] 288 289 289 290 290 … … 295 295 '''Requires BUFF_SEL:''' No. Values apply to all RF paths 296 296 297 '''Arguments:''' (int32 target) 298 target: target receive power (in dBm)[[BR]] 299 default value: -10[[BR]] 300 301 '''Returns:''' none 302 303 This command is the best way to tweak AGC behavior[[BR]] 304 to apply more or less gain. For example, a target of[[BR]] 305 -5dBm will apply more gain thatn a target of -10dBm, 306 so the waveform will be larger at the inputs of the I[[BR]] 307 and Q ADCs.[[BR]] 308 309 310 === {{{agc_noise_est}}} === 311 Set the AGC noise estimate[[BR]] 312 313 314 '''Requires BUFF_SEL:''' No. Values apply to all RF paths 315 316 '''Arguments:''' (int32 noise_estimate) 317 noise_estimate: rx noise power (in dBm)[[BR]] 318 default value: -95[[BR]] 319 320 '''Returns:''' none 297 '''Arguments:''' (int32 target)[[BR]] 298 target: target receive power (in dBm)[[BR]] 299 default value: -16[[BR]] 300 301 '''Returns:''' none 302 303 This command is the best way to tweak AGC behavior to apply more or less gain. For example, a target of -5dBm will apply more gain than a target of -10dBm, so the waveform will be larger at the inputs of the I and Q ADCs.[[BR]] 304 321 305 322 306 … … 327 311 '''Requires BUFF_SEL:''' No 328 312 329 '''Arguments:''' (boolean DCO) 330 DCO:[[BR]] 331 true enables DC offset correction[[BR]] 332 false disable DC offset correction[[BR]] 333 334 '''Returns:''' none 335 336 337 === {{{agc_trig_delay}}} === 338 Sets the AGC trigger delay. The argument specifies a[[BR]] 339 delay (in number of cycles) that the AGC should wait[[BR]] 340 before beginning its processing after the node[[BR]] 341 receives a trigger.[[BR]] 342 343 344 '''Requires BUFF_SEL:''' No. Values apply to all RF paths 345 346 '''Arguments:''' (uint16 trigger_delay) 347 trigger_delay: # if cycles of delay after trigger[[BR]] 348 valid range: ![0,511][[BR]] 349 350 '''Returns:''' none 313 '''Arguments:''' (boolean DCO)[[BR]] 314 ''true'' - enables DC offset correction[[BR]] 315 ''false'' - disable DC offset correction[[BR]] 316 317 '''Returns:''' none 318 351 319 352 320 … … 362 330 363 331 332 364 333 === {{{agc_done_addr}}} === 365 334 Sample index where AGC finished[[BR]] … … 372 341 '''Returns:''' (uint32) sample_index 373 342 343 344 374 345 === {{{agc_reset_on_timeout}}} === 375 346 Gets / Sets whether the AGC will reset on timeout[[BR]] 376 347 377 348 378 ''' Requires BUFF_SEL:''' No. Values apply to all RF paths379 380 ''' Arguments:''' 'true' or 'false' on write; none on read381 382 '''Returns:''' none on write; 'true' or 'false' on read 349 '''Arguments:''' 'true' or 'false'; none on read 350 351 '''Returns:''' none on write; 'true' or 'false' 352 353 383 354 384 355 === {{{agc_reset_timeout_value}}} === … … 386 357 387 358 388 '''Requires BUFF_SEL:''' No. Values apply to all RF paths389 390 359 '''Arguments:''' timeout value in usec on write; none on read 391 360 392 '''Returns:''' none on write; timeout value in usec on read361 '''Returns:''' none on write; timeout value in usec on read