Writing to fpga registers

Hi

I am having a bit of trouble trying to work out how to write to FPGA
registers from a c++ program. I found two methods that would do it,
namely ‘_write_fpga_reg’ in ‘usrp_basic’ and ‘usrp_write_fpga reg’ in
‘usrp_prims’. I tried to use the usrp_prims method, but it requires a
handle on the usb which if, I’m not mistaken is already held by
usrp_standard_tx.

I’m trying to transmit with usrp_standard_tx, then write the registers,
then receive with usrp_standard_rx. For the usrp_basic method, I’m not
sure how to use that method as my attempts have produced segmentation
faults. This is what i tried:

usrp_basic *ucom;

then to write

bool fine1 = ucom->_write_fpga_reg (77, 10);

Regards
Lance

On Thu, Oct 19, 2006 at 05:40:05AM -0700, seph 004 wrote:

bool fine1 = ucom->_write_fpga_reg (77, 10);

Regards
Lance

You don’t want to instantiate usrp_basic. Use usrp_standard_tx or
usrp_standard_rx.

Eric