discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Deprecated valve block


From: CEL
Subject: Re: [Discuss-gnuradio] Deprecated valve block
Date: Tue, 24 Jul 2018 15:07:09 +0000

Hi Ignatius and Volker,

because "Valve" was a bad design from the start ;)

So, what valve does is hold the flowgraph, reconfigure it, so that all
unused inputs terminate into a null sink, and all unused outputs are
"hacked" into a "done" state by connecting a "null source"->"head (0
items)" block to them.

That means a lot of things:

1. switchovers take long time, because GNU Radio can't immediately stop
a flow graph – all currently working work() methods need to finish.
2. switchovers are *very* intrusive into flow graph logic: item
numbering might change, it involves telling all blocks to stop() and
start(). Not all blocks actually support that, and since we never
explicitly demanded they should, their authors are not even to blame!
3. switchovers, due to the mechanism described in 1., are non-
deterministic in the sample they apply to. That might seem like "not a
big deal", but imagine a case with a valve in parallel with a
"straight" connection. You get all kinds of logical problems with
sample coherence.
4. The unused outputs are connected to "head" blocks which are done –
this propagates the "doneness" down that stream – and essentially, this
allows blocks to do cleanup things. Not nice, if we actually ever want
to switch over to that stream!

When switching things like USRPs, the "tx_eob" tag is the right way to
go in most cases I can think of, so this block is kind of redundant for
that purpose.

Also, these blocks were basically very early additions from the time
when Python support was added to GNU Radio. They exist as blocks in the
GRC blks2 namespace (and folder hierarchy). This was a mistake, if I
may so boldly assert my opinion.

Furthermore, they are simple blocks, but written in Python – a feature
to most of users, but in fact, problematic, because that means that you
can't use them on an embedded device running GNU Radio without Python
bindings.

So, there's good technical reason to deprecate these – but there'd also
be good technical reason to write a replacement! We *had* to remove
them from 3.8 for the code organization reason. 

In fact, that should be pretty simple: A block that just consumes
equally on all inputs, but only copies the selected inputs to the
selected output buffers, and only produces on these, would solve this,
and would be pretty easy to write, and also in a way that would allow
e.g. switching both via external message, as well as with a stream tag
(a thoroughly desirable feature).

I'd be more than happy if someone wrote those 30 lines of code, and
it'd get my special reviewer attention. We just haven't gotten around
to doing it, as far as I know.

Best regards,
Marcus Müller

On Tue, 2018-07-24 at 19:47 +1000, Ignatius Rivaldi wrote:
> Seconded this, why is the valve block deprecated in the first place? It is a 
> convenient block for switching tx/rx on B210 for PTT button
> 
> On Tue, Jul 24, 2018, 19:24 Volker Schroer <address@hidden> wrote:
> > Hi !
> > 
> > In gnuradio 3.7 the valve block is marked as deprecated and there is 
> > missing in 3.8.
> > 
> > But  is there a suitable replacement for this block ?
> > 
> > Thanks
> > 
> > -- Volker
> > 
> > 
> > _______________________________________________
> > Discuss-gnuradio mailing list
> > address@hidden
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]