A default block controller for blocks that can't be found in the registry
virtual void uhd::rfnoc::mb_controller::set_clock_source |
( |
const std::string & |
source | ) |
|
|
pure virtual |
Set the clock source for the USRP device
This sets the source of the frequency reference, typically a 10 MHz signal. In order to frequency-align multiple USRPs, it is necessary to connect all of them to a common reference and provide them with the same clock source. Typical values for source
are 'internal', 'external'. Refer to the specific device manual for a full list of options.
If the value for for source
is not available for this device, it will throw an exception. Calling get_clock_sources() will return a valid list of options for this method.
Side effects: Some devices only support certain combinations of time and clock source. It is possible that the underlying device implementation will change the time source when the clock source changes and vice versa. Reading back the current values of clock and time source using get_clock_source() and get_time_source() is the only certain way of knowing which clock and time source are currently selected.
This function does not force a re-initialization of the underlying hardware when the value does not change. Consider the following snippet:
usrp->set_clock_source("internal");
usrp->set_clock_source("internal");
See also:
- Parameters
-
source | a string representing the time source |
- Exceptions
-
virtual void uhd::rfnoc::mb_controller::set_sync_source |
( |
const uhd::device_addr_t & |
sync_source | ) |
|
|
pure virtual |
Set the reference/synchronization sources for the USRP device
Typically, this will set both clock and time source in a single call. For some USRPs, this may be significantly faster than calling set_time_source() and set_clock_source() individually.
Example:
graph->get_mb_controller(0)->set_sync_source(
device_addr_t("clock_source=external,time_source=external"));
This function does not force a re-initialization of the underlying hardware when the value does not change. See also set_time_source() and set_clock_source() for more details.
Note: Reconfiguring the sync source may affect the clocking within the FPGAs of USRPs, and affect timekeeping as well as proper functioning of blocks that depend on these clocks. It is therefore strongly recommended to configure clock and time source before doing anything else. In particular, setting the device time should be done after calling this, and there should be no ongoing streaming operation while reconfiguring the sync source.
- Parameters
-
sync_source | A dictionary representing the various source settings. |
- Exceptions
-
uhd::value_error | if the sources don't actually exist or if the combination of clock and time source is invalid. |
virtual void uhd::rfnoc::mb_controller::set_time_source |
( |
const std::string & |
source | ) |
|
|
pure virtual |
Set the time source for the USRP device
This sets the method of time synchronization, typically a pulse per second signal. In order to time-align multiple USRPs, it is necessary to connect all of them to a common reference and provide them with the same time source. Typical values for source
are 'internal', 'external'. Refer to the specific device manual for a full list of options.
If the value for for source
is not available for this device, it will throw an exception. Calling get_time_sources() will return a valid list of options for this method.
Side effects: Some devices only support certain combinations of time and clock source. It is possible that the underlying device implementation will change the clock source when the time source changes and vice versa. Reading back the current values of clock and time source using get_clock_source() and get_time_source() is the only certain way of knowing which clock and time source are currently selected.
This function does not force a re-initialization of the underlying hardware when the value does not change. Consider the following snippet:
usrp->set_time_source("internal");
usrp->set_time_source("internal");
See also:
- Parameters
-
source | a string representing the time source |
- Exceptions
-
Synchronize a list of motherboards in time and frequency
Note: When a uhd::rfnoc_graph is instantiated, this method is called on all motherboards.
The exact steps taken when calling this method are hardware-specific, but primarily can be split in three steps in a specific order:
- Pre-timekeeper sync tasks (things here could affect timekeepers)
- Timekeeper sync (timekeepers are perfectly aligned after this step)
- Post-timekeeper sync ( anything here should not affect timekeepers) This ensures that timekeepers will not lose synchronization. In all cases these will ensure that:
- Any hardware settings that need to be applied to synchronize will be configured. For example, the X3x0 DAC (AD9146) requires synchronization triggers for all the DACs to run synchronously, and the X4x0 RFSoC requires programming an identical tile latency.
- Timekeepers are synchronized. That means that timekeepers with the same clock rate increment are in unison, and at all times have the same time. This allows sending timed commands to the motherboards and expect them to be executed at the same time.
- Parameters
-
mb_controllers | A list of motherboard controllers to synchronize. Any motherboard controllers that could not be synchronized because they're incompatible with this motherboard controller are removed from the list. On return, the list should be (ideally) identical to its value at call time. |
time_spec | Time specification to synchronize mb_controllers to |
quiet | If true, don't print any errors or warnings if synchronization fails. During initialization of uhd::rfnoc_graph, UHD will call synchronize() on all motherboards with quiet set to true. |
- Returns
- true if all motherboards that were listed in
mb_controllers
could be synchronized.