Fwd: set_fpga_master_clock

Hi,

I’m not sure if anyone reads the patch list, so I will forward this
here.

---------- Forwarded message ----------
From: Juha V. [email protected]
Date: Wed, Jun 25, 2008 at 00:45
Subject: set_fpga_master_clock
To: [email protected]

Hi,

Here is a patch to modify the usrp fpga_master_clock using
set_fpga_master_clock(long mc). The same functionality is added to
gr-usrp.

I have one doubt about the patch. How do we make sure that you call
set_fpga_master_clock early enough? Adding the fpga_master_clock
parameter to the constructor of usrp_base might be a better idea. But
I only thought about this while writing this mail :). I’ll make
another patch if you guys feel that setting fpga_master_clock in the
constructor is a better idea.

juha

On Thu, Jun 26, 2008 at 11:45:53PM +0300, Juha V. wrote:

Hi,

I’m not sure if anyone reads the patch list, so I will forward this here.

Thanks for the patch and sorry for the delay Juha,

There are at least a few of us who read the patch list and can do
something about them. I just wasn’t quite ready to comment or
answer the question embedded in it :wink:

I’ll get back to you a bit later today or tomorrow about to your
question as whether it needs to get set in the constructor or not.
I’m preoccupied with other things right now.

One quick comment: in general we’re more likely to accept patches that
don’t change anything more than they have to to get the job done (it
gives us less to ponder). E.g., I’m not sure why you moved the
implementation of dac_rate et al from the header into the body. It
appears that all you really need to change is the implementation of
fpga_master_clock_freq, since everything else derives from that.

More later…
Eric

On Thu, Jun 26, 2008 at 11:45:53PM +0300, Juha V. wrote:

another patch if you guys feel that setting fpga_master_clock in the
constructor is a better idea.

juha

Hi Juha,

I looked at the code, and as long as you set_fpga_master_clock before
you attempt to tune the tx or rx side you should be fine.
I’d recommend calling it immediately after you create the usrp.sink or
source.

Could you please generate another patch that does the minimum
required to get the job done?

Thanks,
Eric