The following files have been rewritten:
Include/antenna.h Base/Antenna/ICS/* Base/Antenna/Common/antenna.c
<texit> \begin{comment} And all files that ask for a ICS-card! \end{comment} </texit>
In table <ref>tab:commands</ref> you can see the newly defined commands.
Name | Short description |
---|---|
swr_ant_ics_init | Initialises the ics-cards, should be called first |
swr_ant_ics_get_fs_rx | Returns the real sampling-frequency |
swr_ant_ics_get_fs_tx | Returns the real sampling-frequency |
swr_ant_ics_rx | Sets the bandwith and the if-frequency |
swr_ant_ics_rx_freq | Sets the if-frequency of the reception, also while the radio is running |
swr_ant_ics_tx | Sets the if-frequency of the transmission, also while the radio is running |
swr_ant_ics_clk | Sets the speed of the clock-reference, as well as the multiplication-factor of the DACs |
swr_ant_ics_start | Starts the transmission |
swr_ant_ics_stop | Stops the transmission |
swr_ant_ics_io | Returns the time left to reach a certain position in the reception |
swr_ant_ics_set_synth | Sets the synthesizer on the RF-card |
swr_ant_ics_write_ddcs | Writes the calculated values to the DDCs, can't be called while the radio is running! |
<texit>\newpage</texit>
This is the first function to call to initialise the cards. This function can only be called when the cards are not running, as some very basic parameters are defined in here.
Type: double
Description:
sampling frequency for the reception, in Hz. Must be between 10kHz and 3MHz. The sampling-frequency on the reception has some constraints, described in the function swr_ant_ics_clk. This sampling-frequency is given in complex samples, so that a sampling frequency of 10MHz gives a theoretical bandwith of 10MHz! See also swr_ant_ics_rx
Type: double
Description:
sampling frequency for the transmission, in Hz. Must be between 10kHz and 3MHz. The sampling-frequency of the transmission has some constraints that are described in the function swr_ant_ics_clk. This frequency is in complex samples! Please be aware that the DACs have an in-built filter that cuts the useful signal to about 75% of the bandwith of fs_tx. So if fs_tx is 1MHz, the useful bandwith is about 750kHz.
Type: uint
Description:
how many rx-channels, between 0 and 4
Type: uint
Description:
how many tx-channels, between 0 and 4
Type: swr_signal_type_t
Description:
the desired type of the rx-channels, it depends on the program in the FPGA. A version exists for a one-channel, 32-bit complex reception mode (16bits real and 16bits imaginary), using the DDCs but allowing for a longer aquisition time. In this mode, ch_tx must be 0 and ch_rx 1. The different signal types correspond to the following:
After this function has been called, everything is set up so that swr_ant_init can be called. All other funtions defined in here are only for more special needs.
swr_ant_ics_init calls swr_ant_ics_clk( 100e6, 4, 50e6 ) which initialises the multipliers on the ICS-cards.
fs_rx and fs_tx have to meet certain criterias, so the final values may differ from the chosen ones! To get the real values, use the functions swr_ant_ics_get_fs_rx as well as the function swr_ant_ics_get_fs_tx, which return the re-calculated values.
<texit> \newpage </texit>
These function get the actual sampling frequency as calculated by swr_ant_ics_clk. They return the actual frequency in Hz, which may differ from the settings, because of the limitations of the cards.
Type: int
Description: The affected channel, 0-3
Type: double
Description: The new center-frequency
Type: double
Description: The bandwith of the final samples that contain data, relative to fs_rx set by swr_ant_ics_init. W {0.085, 0.17, 0.34, 0.5, 0.75}. If a non-existant bandwith is selected, the next-higher (or highest available) will be chosen.
fc is re-calculated to fit into , using the availability of different Nyquist windows. First it is converted relative to the sampling-frequency:
Then it is converted using:
f_p is calculated with 31 bits precision. For a fs_rx of 100MHz this gives a precision of Hz.
Function to set only the intermediate-frequency of the reception-part.
Type: int
Description: The affected channel, 0-3
Type: double
Description: The new intermediate-frequency, see also the function swr_ant_ics_rx
Because it is very difficult to re-program the DDC-chip while the software-radio is running, this function has been written to only re-program the intermediate-frequency and nothing else. This function only calculates the new value to be programmed in the DDC-chip. The final programmation of the chip is done in the DMA-interrupt so that the transmission is not interrupted.
This sets the intermediate frequency 'fi_tx' for the tx-channel. For the re-calculation of the intermediate frequency, see swr_ant_ics_rx.
This function can be used without problems during runtime.
Type: int
Description: The affected channel, 0-3
Type: double
Description: center-frequency, in Hz
The ICS-cards usually are clocked by an external 50MHz-clock. If you set a new clock-frequency, fs_rx and fs_tx are re-calculated and might differ. A frequency set with swr_ant_ics_init might be possible with f_dac=50MHz, but not fit correctly into f_dac=25MHz!
Type: double
Description: the external frequency in Hz
Type: int
Description: the multiplier. One of { 1, 4..16 }
Type: double
Description: the external frequency in Hz
Here the channel begins to send/receive data. All initialised antennas begin at once to send/receive.
Here the channel interrupts sending/receiving data. It may be that later on another transmission starts.
This function returns the time to wait so that the next slot will be sent/received.
Type: int
Description: read/write up to this block
Type: int
Description: The time in micro-seconds () to wait
Sets the synthesizer on a given RF-board. Due to some constraints, the RF-boards take quite some time to behave stable in a new frequency. This is in the order of a couple of ms.
Type: int
Description: The affected channel, 0-3
Type: double
Description: The frequency in Hz: [2.3..2.5] *
Type: int
Description: low- or high-injection:
<texit>\newpage</texit>
As described in the function swr_ant_ics_tx, the value for the intermediate tx-frequency has a resolution of 32bits. With this function, you can set an offset to the 'official' value.
Type: int
Description: The affected channel, 0-3
Type: long int
Description: An offset to the set value. The step is , where fs_tx includes an eventual multiplicator (usually 4).
A function called ics554_ddc_set_cic is used to set the decimation to the desired value. The main problem is the calculation of the attenuation of the signal. This function has been tested for a wide range of decimations and should work without problems.