Re: [Discuss-gnuradio] gr_frequency_modulator_fc.cc: unknown function trunc()

2005-03-07 Thread Berndt Josef Wulf
G'day,

thanks for supplying the man page on trunc(). This function is indeed missing 
in NetBSD - not sure why.

Anyhow, I think I've found a solution that works and may be acceptable for 
inclusion into the source tree for platforms that lack this functionality. 
Find patch below that checks for trunc() and if not found includes a simple 
macro definition.

--- configure.ac.orig   2005-03-07 22:10:37.0 +1030
+++ configure.ac2005-03-07 22:26:59.0 +1030
@@ -102,6 +102,7 @@
 AC_CHECK_LIB(m, sincosf,[AC_DEFINE([HAVE_SINCOSF],[1],[Define to 1 if your 
system has `sincosf'.])])
 AC_CHECK_LIB(m, sinf, [AC_DEFINE([HAVE_SINF],[1],[Define to 1 if your system 
has `sinf'.])])
 AC_CHECK_LIB(m, cosf, [AC_DEFINE([HAVE_COSF],[1],[Define to 1 if your system 
has `cosf'.])])
+AC_CHECK_LIB(m, trunc, [AC_DEFINE([HAVE_TRUNC],[1],[Define to 1 if your 
systemhas no `trunc'.])])

 GR_CHECK_SHM_OPEN

--- src/lib/general/gr_frequency_modulator_fc.cc.orig   2005-03-07 
22:17:55.0 +1030
+++ src/lib/general/gr_frequency_modulator_fc.cc2005-03-07 
22:27:25.0 +1030
@@ -29,6 +29,9 @@
 #include gr_sincos.h
 #include math.h

+#ifndef HAVE_TRUNC
+#define trunc(x) (double) ((int) (x + (x = 0.0 ? -0.5 : 0.5)))
+#endif

 gr_frequency_modulator_fc_sptr gr_make_frequency_modulator_fc (double 
sensitivity)
 {


73, Berndt
VK5ABN

On Mon, 7 Mar 2005 02:47 pm, kilian wrote:
 Hi,

 not having NetBSD available I can only show you what man trunc tells me
 under Linux:
 ---
 NAME
trunc, truncf, truncl - round to integer, towards zero

 SYNOPSIS
#include math.h

double trunc(double x);
float truncf(float x);
long double truncl(long double x);

Compile with -std=c99; link with -lm.

 DESCRIPTION
These  functions  round x to the nearest integer not larger in
 absolute
value.

 RETURN VALUE
The rounded integer value.  If x is integral, infinite or NaN, x
 itself
is returned.

 ERRORS
None.

 CONFORMING TO
C99.

 SEE ALSO
ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)

 --

 You may very well find truncf() under NetBSD although checking for it
 here:

  http://netbsd.gw.com/cgi-bin/man-cgi?math+3+NetBSD-current

 didn't help me find it. However there is rint() but it rounds to the
 nearest integer. You could spin your own trunc() I suppose.



___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] USRP - FC3 usb transfer rate tx. vs. rx.

2005-03-07 Thread Greg Spanel
I'm running Fedora core 3 on several different machines including
one with the Intel motherboard with the fast southbridge.

The tx. transfer rate on all of these machines is 6meg/sec. using
test_usrp_standard_tx.
The rx. rate is 32meg/sec., however.

I found that if you comment out line 250 in test_usrp_standard_tx
and recompile, the tx. transfer rate jumps to 32meg/sec.

Line 250 was printf(tx_underrun\n); now is //printf(tx_underrun\n);

I hope this helps,

Greg Spanel




___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] FYI: GnuRadio + Suse-9.2

2005-03-07 Thread Berndt Josef Wulf
G'day,

The Australian APC magazine included a DVD with the FTP version of Suse 9.2 
and I couldn't help myself to install and build GnuRadio using a spare 
partition on my laptop. After downloading a number of missing RPMS, mostly 
development utilities and files that are only included with Suse 9.2 
Professional, GnuRadio built and installed without problems.

I've measured the USB2 databandwidth at around 32MB/sec, which is 400% faster 
then NetBSD on the same system. GnuRadio on Suse-9.2 didn't suffer from  any 
over/underruns whilst using GUI intensive applications such as the  
oscope_sink and fft_sinks concurrently.

Maybe this should tell me something grr ;-)

cheerio Berndt
-- 
Every man who says frankly and fully what he thinks is doing a public service.
[Leslie Stephen]


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] gr_frequency_modulator_fc.cc: unknown function trunc()

2005-03-07 Thread Krzysztof Kamieniecki
I think the problem is that trunc is not part of the C++ standard. It is
officially part of C99 so we could link in that library.

This is the macro I would suggest, since int only goes to ~2 billion :)
Also I would prefer a function call because insert standard disclaimer about x
being evaluated twice

#define trunc(x) ((x = 0) ? floor(x) : ceil(x))


Quoting Berndt Josef Wulf [EMAIL PROTECTED]:
 G'day,
 
 thanks for supplying the man page on trunc(). This function is indeed missing
 
 in NetBSD - not sure why.
 
 Anyhow, I think I've found a solution that works and may be acceptable for 
 inclusion into the source tree for platforms that lack this functionality. 
 Find patch below that checks for trunc() and if not found includes a simple 
 macro definition.
 
 --- configure.ac.orig   2005-03-07 22:10:37.0 +1030
 +++ configure.ac2005-03-07 22:26:59.0 +1030
 @@ -102,6 +102,7 @@
  AC_CHECK_LIB(m, sincosf,[AC_DEFINE([HAVE_SINCOSF],[1],[Define to 1 if your 
 system has `sincosf'.])])
  AC_CHECK_LIB(m, sinf, [AC_DEFINE([HAVE_SINF],[1],[Define to 1 if your system
 
 has `sinf'.])])
  AC_CHECK_LIB(m, cosf, [AC_DEFINE([HAVE_COSF],[1],[Define to 1 if your system
 
 has `cosf'.])])
 +AC_CHECK_LIB(m, trunc, [AC_DEFINE([HAVE_TRUNC],[1],[Define to 1 if your 
 systemhas no `trunc'.])])
 
  GR_CHECK_SHM_OPEN
 
 --- src/lib/general/gr_frequency_modulator_fc.cc.orig   2005-03-07 
 22:17:55.0 +1030
 +++ src/lib/general/gr_frequency_modulator_fc.cc2005-03-07 
 22:27:25.0 +1030
 @@ -29,6 +29,9 @@
  #include gr_sincos.h
  #include math.h
 
 +#ifndef HAVE_TRUNC
 +#define trunc(x) (double) ((int) (x + (x = 0.0 ? -0.5 : 0.5)))
 +#endif
 
  gr_frequency_modulator_fc_sptr gr_make_frequency_modulator_fc (double 
 sensitivity)
  {
 
 
 73, Berndt
 VK5ABN
 
 On Mon, 7 Mar 2005 02:47 pm, kilian wrote:
  Hi,
 
  not having NetBSD available I can only show you what man trunc tells me
  under Linux:
  ---
  NAME
 trunc, truncf, truncl - round to integer, towards zero
 
  SYNOPSIS
 #include math.h
 
 double trunc(double x);
 float truncf(float x);
 long double truncl(long double x);
 
 Compile with -std=c99; link with -lm.
 
  DESCRIPTION
 These  functions  round x to the nearest integer not larger in
  absolute
 value.
 
  RETURN VALUE
 The rounded integer value.  If x is integral, infinite or NaN, x
  itself
 is returned.
 
  ERRORS
 None.
 
  CONFORMING TO
 C99.
 
  SEE ALSO
 ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)
 
  --
 
  You may very well find truncf() under NetBSD although checking for it
  here:
 
   http://netbsd.gw.com/cgi-bin/man-cgi?math+3+NetBSD-current
 
  didn't help me find it. However there is rint() but it rounds to the
  nearest integer. You could spin your own trunc() I suppose.
 
 
 
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 




___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] dual-gate mosfet front end - results

2005-03-07 Thread Chuck Swiger
Gang - just for the record this front end:
http://www.designnotes.com/CIRCUITS/Activeantenna1.gif
works at least as good as, if not better than the MPF102 version (but w/o the
tuned input, just using a capacitance coupling to the antenna and 1.5Mohm from
gate to gnd). Using a long random wire, tuner, the above circuit, a passive 
bandpass
filter then the usrp, I get this spectrum:

http://webpages.charter.net/cswiger/ssb_80m_2.jpg
the overall peak around 3.9mhz is largely a function of the tuner, easily moved
wherever you want. While watching the spectrum, recorded around sunset Mar. 6,
it's easy to see something 'sweeping' the band every so often. Also there's
a curious emission just under 4Mhz, a wide block of hiss from 3995 to 4000k.
In audio it's just a hiss. Any guesses? Amateur DRM?
--Chuck

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] gr_frequency_modulator_fc.cc: unknown function trunc()

2005-03-07 Thread Eric Blossom
On Tue, Mar 08, 2005 at 12:24:42AM +1030, Berndt Josef Wulf wrote:
 G'day,
 
 thanks for supplying the man page on trunc(). This function is indeed missing 
 in NetBSD - not sure why.
 
 Anyhow, I think I've found a solution that works and may be acceptable for 
 inclusion into the source tree for platforms that lack this functionality. 
 Find patch below that checks for trunc() and if not found includes a simple 
 macro definition.

Thanks for the patch.

Eric


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] USRP - FC3 usb transfer rate tx. vs. rx.

2005-03-07 Thread Eric Blossom
On Mon, Mar 07, 2005 at 07:13:22AM -0600, Greg Spanel wrote:
 I'm running Fedora core 3 on several different machines including
 one with the Intel motherboard with the fast southbridge.
 
 The tx. transfer rate on all of these machines is 6meg/sec. using
 test_usrp_standard_tx.
 The rx. rate is 32meg/sec., however.
 
 I found that if you comment out line 250 in test_usrp_standard_tx
 and recompile, the tx. transfer rate jumps to 32meg/sec.
 
 Line 250 was printf(tx_underrun\n); now is //printf(tx_underrun\n);
 
 I hope this helps,
 
 Greg Spanel

Let me guess, you're using a gnome-terminal window?

They are really, really slow.

As an experiment try running the unmodified example in an xterm, or
change the printf to printf(U).

Eric


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] wfm_rcv.py works, but with half-second delay in audio!

2005-03-07 Thread John Gilmore
I finally got a SMA cable to hook the USRP to my old 4937 tuner.
wfm_rcv.py worked like a charm on the first try, tuning a strong local
FM radio station.  I cabled the computer's audio output into my main
amplifier, which also has a traditional FM tuner.  When I switched
between the tuner and the computer audio output, I noticed that the
computer output was about half a second delayed from the FM radio
signal available thru an ordinary tuner.

Any explanations?

John

PS:  I'm using the tarball release from the Debian packages, not the CVS.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] wfm_rcv.py works, but with half-second delay in audio!

2005-03-07 Thread Eric Blossom
On Mon, Mar 07, 2005 at 04:40:33PM -0800, John Gilmore wrote:
 I finally got a SMA cable to hook the USRP to my old 4937 tuner.
 wfm_rcv.py worked like a charm on the first try, tuning a strong local
 FM radio station.  I cabled the computer's audio output into my main
 amplifier, which also has a traditional FM tuner.  When I switched
 between the tuner and the computer audio output, I noticed that the
 computer output was about half a second delayed from the FM radio
 signal available thru an ordinary tuner.
 
 Any explanations?
 
   John
 
 PS:  I'm using the tarball release from the Debian packages, not the CVS.


These are the prime suspects in decreasing order of estimated importance:

(1) We currently enable the the audio sink/source and usrp
sink/source to begin xfering data when they are instantiated.  
I think a better solution is to enable them all at once when the
flow_graph start() method is invoked.  That is, they would be
configured when they were instantiated, but we'd defer actually
enabling data xfers until everything was ready to go.  There's a
lot of one-time setup that happens between the time the first
block is instantiated and the time we're really ready to run the
C++ scheduler.  (GUI setup, all the connects, checking of input
and output matching, allocating buffers, etc)

(2) The USRP host library is currently using 8MB worth of buffering.
This combined with (1) allows lots of data to build up in the
library buffers before we start running the C++ scheduler.

(3) We currently don't implement any kind of explicit audio queue
management.  We only block when the OS buffer is full or empty.
There will be differences between the sample clocks in the USRP
(or any other hardware for that matter) and the audio cards.  We
need a means to insert or delete samples as needed to harmonize
the rates.

Eric


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] _submit_urb failed error

2005-03-07 Thread Damien B.
Hi,
i'm setting a system for gnu-radio, managed to install software (make
check ok), the USRP is correctly detected and i flashed the
daughterboards.
When i try to run basic TX examples i receive an error from
_submit_urb (listing at the end).
I tried CVS and tarballs  with no luck.
I'm running a 2.6.11-rc5 kernel with a VIA chipset USB2 PCI card.
Any ideas where it's coming from ?
Thanks, cheers
Damien

#
./test_usrp_standard_rx
RX d'board A: Basic Rx
RX d'board B: Basic Rx
xfered 1.34e+08 bytes in 3.65 seconds.  3.68e+07 bytes/sec.  cpu time = 0.4979
noverruns = 0

#
./test_usrp_standard_tx
TX d'board A: Basic Tx
TX d'board B: Basic Tx
fusb::_submit_urb: No such file or directory
_submit_urb failed
test_output: error, ret = -1

...many errors ;-)...

fusb::_submit_urb: No such file or directory
_submit_urb failed
test_output: error, ret = -1
xfered 5.37e+08 bytes in 4.72 seconds.  1.138e+08 bytes/sec.  cpu time = 1.81
0 underruns
d_free_list.size () = 33280, d_nblocks = 512
lt-test_usrp_standard_tx: fusb_linux.cc:405: virtual bool
fusb_ephandle_linux::stop(): Assertion `d_free_list.size () ==
(unsigned) d_nblocks' failed.
zsh: abort  ./test_usrp_standard_tx


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Cypress FX2 thermal issues

2005-03-07 Thread Matt Ettus

 Has anyone had any issues with the Cypress FX2 overheating?  Ordinarily
 I have the LTC1746 board connected to the ElraSoft FX2 board.  However
 right now I'm experimenting with my Spartan 3 dev board.  Everything
 seems to run fine for 10-15 minutes at which point I stop getting data
 from the FX2.

We never have this problem with the USRP.  You probably have both sides driving
the same pin at the same time.  It takes a lot of care to get tri-state buses
working.

Matt


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio