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:
- ~~~{.cpp} auto usrp = uhd::usrp::multi_usrp::make(device_args); // This may or may not cause the hardware to reconfigure, depending on // the default state of the device usrp->set_clock_source("internal"); // Now, the clock source is definitely set to "internal"! // The next call probably won't do anything but will return immediately, // because the clock source was already set to "internal" usrp->set_clock_source("internal"); // The clock source is still guaranteed to be "internal" at this point
~~~
See also:
- Parameters
-
source | a string representing the time source |
- Exceptions
-
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:
- ~~~{.cpp} auto usrp = uhd::usrp::multi_usrp::make(device_args); // This may or may not cause the hardware to reconfigure, depending on // the default state of the device usrp->set_time_source("internal"); // Now, the time source is definitely set to "internal"! // The next call probably won't do anything but will return immediately, // because the time source was already set to "internal" usrp->set_time_source("internal"); // The time source is still guaranteed to be "internal" at this point
~~~
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.