Dear Luay Raouak,
greetings to DLR! I faced the same issue a while ago and since the Ettus guys said that an equivalent for rfnoc modtool will not be realized in the short term I invested a lot of time and helped myself by porting the Gain Block example/tutorial manually to 3.10.
I now have an OOT module with multiple RFNoC blocks for GR 3.10 and collected some useful "Developer hints" in it's README (how to create a module, add a new block, implement UHD bindings, implement GR bindings).
Or you could simply look at how I made the "gain block" and related bindings in this OOT and copy/adopt it to your needs.
It's available here: https://git.gsi.de/p.niedermayer/exciter/-/tree/main/rfnoc-beam_exciter
I have an X310, GR3.10 on Ubuntu 20 or 22 and UHD 4.4 (but I guess 4.6 should also work).
Generally, I found that using "|uhd.rfnoc_block_generic|" in combination with properties makes things a lot easier regarding bindings, since it means you need much less code and no custom Python bindings.
In my_rfnoc_gain.block.yml <https://git.gsi.de/p.niedermayer/exciter/-/blob/cf444ed055274ec826bc0956eed0b94debbab912/rfnoc-beam_exciter/grc/beam_exciter_rfnoc_gain.block.yml>:
templates: imports:|- from gnuradio import uhd make:|- uhd.rfnoc_block_generic( self.rfnoc_graph, uhd.device_addr(""), "Gain", -1, # device_select -1, # instance_index ) self.${id}.set_property('gain', ${constant}) callbacks: -set_property('gain',${constant})And in gain_block_control.cpp <https://git.gsi.de/p.niedermayer/exciter/-/blob/cf444ed055274ec826bc0956eed0b94debbab912/rfnoc-beam_exciter/lib/gain_block_control.cpp>
|property_t<int> _prop_gain = property_t<int>(PROP_GAIN, DEFAULT_GAIN, {res_source_info::USER});|
void_register_props(){ register_property(&_prop_gain); add_property_resolver({&_prop_gain}, {&_prop_gain}, [this](){ this->set_gain_value(this->_prop_gain.get()); }); } RFNOC_BLOCK_CONSTRUCTOR(gain_block_control){ _register_props(); } voidset_gain_value(constintgain){ //The gain block fromthe tutorial only supports integer gain values regs().poke32(REG_GAIN, (uint32_t)gain); } intget_gain_value(){ returnregs().peek32(REG_GAIN); } Regards Philipp -- Philipp Niedermayer p.niederma...@gsi.deGSI Helmholtzzentrum für Schwerionenforschung GmbH, Planckstraße 1, 64291 Darmstadt, Germany, www.gsi.de
Commercial Register / Handelsregister: Amtsgericht Darmstadt, HRB 1528Managing Directors / Geschäftsführung: Professor Dr. Paolo Giubellino, Jörg Blaurock Chairman of the GSI Supervisory Board / Vorsitzender des GSI-Aufsichtsrats: Ministerialdirigent Dr. Volkmar Dietz
Am 24.05.2024 um 11:31 schrieb luay.raouak--- via USRP-users:
Hello fellow usrp users,I would like to build custom RFNoC blocks for use with gnuradio 3.10 but I have not found any documentation on how to do it for this version. I know that for gnuradio 3.8 and lower gr-ettus was utilized to create the grc bindings necessary thanks to the RFNoC modtool but with the latter deprecated for gnuradio 3.9+ I find myself in a dead end. Has anyone managed to find a way to circumvent this issue? Any help would be very much appreciated._Setup:_ Platform: Ubuntu 20.04 Hardware: USRP X310 UHD version: 4.6 GNURadio version: 3.10 Best regards, _______________________________________________ USRP-users mailing list --usrp-users@lists.ettus.com To unsubscribe send an email tousrp-users-le...@lists.ettus.com
smime.p7s
Description: Kryptografische S/MIME-Signatur
_______________________________________________ USRP-users mailing list -- usrp-users@lists.ettus.com To unsubscribe send an email to usrp-users-le...@lists.ettus.com