aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2024-04-02 16:06:27 +0200
committerjoergho <48011876+joergho@users.noreply.github.com>2024-04-08 12:15:30 +0200
commitdfc3858cd278b4d454db606758a9f2ad3fad0b1d (patch)
tree26c40c463804431b79dabce999a7bf4e40a4471d
parentci: Allow for using PR Pipeline for FPGA source (diff)
downloaduhd-dfc3858cd278b4d454db606758a9f2ad3fad0b1d.tar.xz
uhd-dfc3858cd278b4d454db606758a9f2ad3fad0b1d.zip
uhd: Fix outstanding clang-format issues
-rw-r--r--host/lib/include/uhdlib/usrp/dboard/fbx/fbx_dboard.hpp43
-rw-r--r--host/lib/rfnoc/rfnoc_graph.cpp2
-rw-r--r--host/lib/rfnoc/rfnoc_python.hpp2
-rw-r--r--host/utils/query_gpsdo_sensors.cpp7
4 files changed, 32 insertions, 22 deletions
diff --git a/host/lib/include/uhdlib/usrp/dboard/fbx/fbx_dboard.hpp b/host/lib/include/uhdlib/usrp/dboard/fbx/fbx_dboard.hpp
index 1d7d59ffe..30c063d28 100644
--- a/host/lib/include/uhdlib/usrp/dboard/fbx/fbx_dboard.hpp
+++ b/host/lib/include/uhdlib/usrp/dboard/fbx/fbx_dboard.hpp
@@ -80,34 +80,43 @@ public:
{
// FBX uses a fixed low freq for both TX and RX
return {
- // Some conditions were considered for choosing the correct cal_freq,
- // mainly using the PG269 manual as reference. These conditions ensure that
- // the cal_freq or its harmonics don't interfere with the background (BG)
- // calibration mechanism on the RFSoC.
- // 1. In calib_mode2 the highest supported frequency is 0.4 * converter rate (fc).
- // The minimum fc that X440 supports is 1GHz. So our highest cal_freq is 400MHz.
+ // Some conditions were considered for choosing the correct
+ // cal_freq, mainly using the PG269 manual as reference. These
+ // conditions ensure that the cal_freq or its harmonics don't
+ // interfere with the background (BG) calibration mechanism on
+ // the RFSoC.
+ //
+ // 1. In calib_mode2 the highest supported frequency is
+ // 0.4 * converter rate (fc).
+ // The minimum fc that X440 supports is 1GHz. So our highest
+ // cal_freq is 400MHz.
// 2. We need to choose as high a cal_freq as we can
// 3. The converter rate (fc) should not be a multiple of the cal_freq
// 4. The converter rate (fc) / 8 should not be a multiple the cal_freq
// 5. cal_freq should not be of a form k * (fc / 1024) where k = 1 to 1024
- // 6. The specified hysteresis threshold values work with the chosen cal_freq
+ // 6. The specified hysteresis threshold values work with the chosen
+ // cal_freq
397.55e6, // rx_freq
397.55e6, // tx_freq
{0x7FFF, 0}, // output full scale dac mux
100, // delay
- // From PG.269: "Threshold levels are set as 14-bit unsigned values, with any value
- // from 0 to 16383 allowed. The maximum value, 16383 represents the absolute value of
- // the full-scale input of the RF-ADC."
- // X440 in loopback will usually receive a value of ~-11 dBm which translates to
- // a threshold value of ~4000. The minimum value for a useful calibration is
- // -40 dBFS according to Xilinx (~-46 dBm). So we pick a value in between (-20 dBm)
- // to detect if anything is wrong in the signal path and translate this into the
- // 14 bit dBm threshold value which is ~1465. The under value just needs to be slightly
- // lower. Calculation from P_dBm to 14 bit threshold_value:
+ // From PG.269: "Threshold levels are set as 14-bit unsigned values,
+ // with any value from 0 to 16383 allowed. The maximum value, 16383
+ // represents the absolute value of the full-scale input of the
+ // RF-ADC."
+ //
+ // X440 in loopback will usually receive a value of ~-11 dBm which
+ // translates to a threshold value of ~4000. The minimum value for
+ // a useful calibration is -40 dBFS according to Xilinx (~-46 dBm).
+ // So we pick a value in between (-20 dBm) to detect if anything is
+ // wrong in the signal path and translate this into the 14 bit dBm
+ // threshold value which is ~1465. The 'under' value just needs to be
+ // slightly lower. Calculation from P_dBm to 14 bit threshold_value:
+ //
// P_rms = math.pow(10,(P_dBm-30)/10)
// u_peak_to_peak = 2 * math.sqrt(P_rms * 100 * 2) # 100 Ohm Differential
// # 14 bits threshold, full scale of ADC 1 Vppd ≙ 1 dBm (DS.926):
- // threshold_value = u_peak_to_peak * math.pow(2,14)
+ // threshold_value = u_peak_to_peak * math.pow(2, 14)
1365, // under
1465, // over
"calib_mode2",
diff --git a/host/lib/rfnoc/rfnoc_graph.cpp b/host/lib/rfnoc/rfnoc_graph.cpp
index 34f08250a..0d0ba7e77 100644
--- a/host/lib/rfnoc/rfnoc_graph.cpp
+++ b/host/lib/rfnoc/rfnoc_graph.cpp
@@ -588,7 +588,7 @@ public:
std::string to_dot() override
{
- return _graph->to_dot();
+ return _graph->to_dot();
}
private:
diff --git a/host/lib/rfnoc/rfnoc_python.hpp b/host/lib/rfnoc/rfnoc_python.hpp
index 53c61d3f2..2be53912e 100644
--- a/host/lib/rfnoc/rfnoc_python.hpp
+++ b/host/lib/rfnoc/rfnoc_python.hpp
@@ -223,7 +223,7 @@ void export_rfnoc(py::module& m)
.def("enumerate_active_connections", &rfnoc_graph::enumerate_active_connections)
.def("commit", &rfnoc_graph::commit)
.def("release", &rfnoc_graph::release)
- .def("to_dot", &rfnoc_graph::to_dot)
+ .def("to_dot", &rfnoc_graph::to_dot)
.def("create_rx_streamer", &rfnoc_graph::create_rx_streamer)
.def("create_tx_streamer", &rfnoc_graph::create_tx_streamer)
.def("get_num_mboards", &rfnoc_graph::get_num_mboards)
diff --git a/host/utils/query_gpsdo_sensors.cpp b/host/utils/query_gpsdo_sensors.cpp
index 1419504be..344639f6b 100644
--- a/host/utils/query_gpsdo_sensors.cpp
+++ b/host/utils/query_gpsdo_sensors.cpp
@@ -114,12 +114,13 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
uhd::device_addr_t new_args(vm["args"].as<std::string>());
new_args["clock_source"] = "gpsdo";
- new_args["time_source"] = "gpsdo";
+ new_args["time_source"] = "gpsdo";
// Create a USRP device
- std::cout << boost::format("\nCreating the USRP device with: %s...\n") % new_args.to_string();
+ std::cout << "Creating the USRP device with: " << new_args.to_string() << "..."
+ << std::endl;
uhd::usrp::multi_usrp::sptr usrp = uhd::usrp::multi_usrp::make(new_args);
- std::cout << boost::format("Using Device: %s\n") % usrp->get_pp_string();
+ std::cout << "Using Device: " << usrp->get_pp_string() << std::endl;
// Verify GPS sensors are present (i.e. EEPROM has been burnt)
std::vector<std::string> sensor_names = usrp->get_mboard_sensor_names(0);