Hi Nathan, we believe you are right. Nice catch! The line you suggested as culprit is already corrected and merged and will be pushed public in the near future.
Thanks! -N On Mon, Aug 7, 2017 at 5:07 PM, Perelman, Nathan < nperel...@lgsinnovations.com> wrote: > Using the HG image I am seeing a rate greater than 1 billion bytes/second > even when connected via 1G (see below). This is with UHD 3.10.1.1. I had > missed the part where it does set the rate to the 1 Gig constant in the > current code. Looking at the code I think this line might be wrong? > https://github.com/EttusResearch/uhd/blob/7ac01c7f979aab8fac5e62f596ff0a > f52cedec40/host/lib/usrp/x300/x300_impl.hpp#L86 . Shouldn’t that be 1e9 > for 1 GigE? > > > > $ uhd_usrp_probe --args addr=192.168.20.2 --double /mboards/0/link_max_rate > > linux; GNU C++ version 5.3.1 20160406 (Red Hat 5.3.1-6); Boost_106000; > UHD_003.010.001.001-0-unknown > > > > -- X300 initialization sequence... > > -- Determining maximum frame size... 1472 bytes. > > -- Setup basic communication... > > -- Loading values from EEPROM... > > -- Setup RF frontend clocking... > > -- Radio 1x clock:200 > > -- Detecting internal GPSDO.... Found an internal GPSDO: LC_XO, Firmware > Rev 0.929a > > -- [DMA FIFO] Running BIST for FIFO 0... pass (Throughput: 1172.9MB/s) > > -- [DMA FIFO] Running BIST for FIFO 1... pass (Throughput: 1184.8MB/s) > > -- [RFNoC Radio] Performing register loopback test... pass > > -- [RFNoC Radio] Performing register loopback test... pass > > -- [RFNoC Radio] Performing register loopback test... pass > > -- [RFNoC Radio] Performing register loopback test... pass > > -- Performing timer loopback test... pass > > -- Performing timer loopback test... pass > > 1.21333e+09 > > > > -Nathan > > > > *From:* Nicolas Cuervo [mailto:nicolas.cue...@ettus.com] > *Sent:* Monday, August 7, 2017 7:42 AM > *To:* Perelman, Nathan <nperel...@lgsinnovations.com> > *Cc:* usrp-users <usrp-users@lists.ettus.com> > *Subject:* Re: [USRP-users] Determining if an X300 is connected via 10 > GigE or 1 GigE > > > > Hello Nathan, > > > > I think you are referring only to the values that are set in the creation > of the "max_link_branch" of the property tree. In one version of the code > (the one you highlighted at [1]) has only the branch called "link_max_rate" > and this one is created and set to either the PCIE max rate or the 10G max > rate with the following statements > > > > _tree->create<double>(mb_path / "link_max_rate").set(X300_MAX_RATE_PCIE); > //L396 > > _tree->create<double>(mb_path / "link_max_rate").set(X300_MAX_RATE_10GIGE); > //L462 > > > > then, depending on the FPGA image that is loaded, this same branch is set > to different values for the max rate, including the 1G Ethernet: > > > > > _tree->access<double>("/mboards/"+boost::lexical_cast<std::string>(mb_index) > / "link_max_rate").set(X300_MAX_RATE_1GIGE); //L1140 > > > > For the other version (highlighted at [2]), however, this last assignment > is done a little bit differently, but keeping the same logic [2.a]. > > > > Now, it is not clear to me if your question raises an unexpected behavior > of if you are only asking about the logic behind scenes. I mean, are > retrieving this value using different FPGA images and always getting the > 10G maximum link rate? or if you are only asking about the how this is done > in the code? On a quick view, the branch value is being set to the correct > max rate depending on the FPGA image that you are loading into the device, > which is the same logic in the two mentioned versions. > > Regards, > > -Nicolas > > > > [1] https://github.com/EttusResearch/uhd/blob/ > 6a72c16ee909af95b6965f26fb588a29485ef414/host/lib/usrp/x300/x300_impl.cpp > > [2] https://github.com/EttusResearch/uhd/blob/ > 7ac01c7f979aab8fac5e62f596ff0af52cedec40/host/lib/usrp/x300/x300_impl.cpp > > [2.a] https://github.com/EttusResearch/uhd/blob/ > 7ac01c7f979aab8fac5e62f596ff0af52cedec40/host/lib/usrp/x300/ > x300_impl.cpp#L1202 > > > > On Fri, Jul 28, 2017 at 1:03 AM, Perelman, Nathan via USRP-users < > usrp-users@lists.ettus.com> wrote: > > I had been looking at /mboards/0/link_max_rate to determine if an X300 was > connected via 10 GigE or 1 GigE. However it seems like sometime between > when that was implemented for the X300 ( https://github.com/ > EttusResearch/uhd/commit/6a72c16ee909af95b6965f26fb588a29485ef414 ) and > now ( https://github.com/EttusResearch/uhd/blob/ > 7ac01c7f979aab8fac5e62f596ff0af52cedec40/host/lib/usrp/x300/ > x300_impl.cpp#L676 ) that was changed to always return the 10 G rate even > when connected via 1 G. Is there another way to determine how an X300 is > connected? > > -Nathan > > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > > >
_______________________________________________ USRP-users mailing list USRP-users@lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com