Thank you very much for your help Rob. If I have understand this is a FPGA problem ? Because I have tried to do this with the DDC blocks and it is the same problem when I use write for the register CONFIG at the address 130 I don't find find the value that I had write in none of address.
Sorry if I have difficulties to understand but I'm not in charge of the FPGA I only develop the application with the FPGA that one of my teammate provided for me. Fred -----Message d'origine----- De : Rob Kossler <rkoss...@nd.edu> Envoyé : mercredi 5 mai 2021 15:16 À : COURANT Frederique - Contractor <frederique.cour...@external.thalesgroup.com> Cc : usrp-users@lists.ettus.com Objet : Re: [USRP-users] Read and write register personal RFNOC block Hi Frederique, I think that the first step is to forget about set_arg and get_arg for now (until you get things behaving properly). The get/set arg are used to access values in the UHD property tree and the configuration of your xml means that when you use set_arg, it will automatically call sr_write. But get_arg does not interact with the FPGA in your case. So, considering sr_write, sr_read32 and your FPGA register implementation, your FPGA implementation typically has separate sections for setting registers and readback of registers. Look at some of the Ettus examples. And, it is common for the set address and the get address to be different. Perhaps this is because Ettus has reserved addresses 0-127 for the "set" functionality, but the same is not true for "get" addresses which often start at 0. Bottom line is that your FPGA custom code needs to handle separately both get & set functionality. Once implemented, you should be able to verify proper operation of your registers in a testbench. This will tell you if your implementation is working as you expect. Rob On Wed, May 5, 2021 at 8:55 AM COURANT Frederique - Contractor via USRP-users <usrp-users@lists.ettus.com> wrote: > > Hello Users, > > > > I have creating a personnal block but when I read the value of my register it > return always the same value. > > When I use set_arg and get_arg the value change like I want but when I try to > read the register that is associating with the precedent arg with sr_read32 > it look likes that the value didn’t change. > > For example in my xml file I have : > > <registers> > > <setreg> > > <name>REG_CFG</name> > > <address>130</name> > > </setreg> > > </registers> > > > > <args> > > <arg> > > <name>config</name> > > <type>int</type> > > <value>0</value> > > <action> > > SR_WRITE(“REG_CFG”, $config) > > </action> > > <arg> > > </args> > > > > If I use sr_read32 for read at the address 130 it always return 10 > even if I have try to modify the value with sr_write(“REG_CFG”, 1000) > or sr_write(130, 1000) > > It is the same problem if I change the value with set_arg(“config”, 1000), > it’s okay when I read with get_arg(“config”) I obtain 1000 but sr_write > return always 10. > > > > I’m working with UHD 3.13 in C++. > > > > Thanks for your help. > > > > Regards. > > > > Fred > > _______________________________________________ > USRP-users mailing list -- usrp-users@lists.ettus.com To unsubscribe > send an email to usrp-users-le...@lists.ettus.com _______________________________________________ USRP-users mailing list -- usrp-users@lists.ettus.com To unsubscribe send an email to usrp-users-le...@lists.ettus.com