# Re: top block edge list

**URL:** <https://www.ruby-forum.com/t/re-top-block-edge-list/232323>\
**Category:** GNU Radio\
**Created:** [October 2, 2014, 3:49pm UTC](https://www.ruby-forum.com/t/re-top-block-edge-list/232323 "2014-10-02T15:49:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [October 2, 2014, 3:49pm UTC](https://www.ruby-forum.com/t/re-top-block-edge-list/232323/1 "2014-10-02T15:49:57Z")

</div>

Hey Jeff,  
I had previously found those two options but was unsure if I was  
missing  
anything else. dot\_graph() seemed like a good option but it doesn’t have  
the block port information, like the term “dot graph” implies. I suppose  
I’ll just wait until after tb.start().  
Thanks for your response,  
Ryan

Ryan,

> before tb.start(). It’s meant to be input to dot (graphviz) but it’s human  
> readable. “dotty” didn’t actually parse it right, but I could have done  
> something wrong there.
> 
> - Jeff
> 
> On 10/01/2014 04:58 PM, Ryan M. wrote:
> 
> Hello All,  
> I’m trying to access the data inside the top block class, from a custom  
> function or at the very least print out some of it as a test. Is there a  
> way to see the data in the top block edge\_list() before running  
> top\_block.start()? I’d like to access this without modifying any of the  
> code in gnuradio-runtime so just using already provided functions in  
> top\_block.  
> Thanks,  
> Ryan

–  
Ryan L. Marlow  
Research Assistant in CCM Lab [http://ccm.ece.vt.edu](http://ccm.ece.vt.edu)  
Virginia [http://www.vt.edu/](http://www.vt.edu/) Polytechnic Institute and State University

---

<div class="post-metadata">

**Author:** ![rmac217](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bc8723/32.png) [@rmac217](https://www.ruby-forum.com/u/rmac217)\
**Post date:** [October 2, 2014, 4:30pm UTC](https://www.ruby-forum.com/t/re-top-block-edge-list/232323/2 "2014-10-02T16:30:49Z")

</div>

On Thu, Oct 2, 2014 at 9:48 AM, Ryan M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hey Jeff,  
> I had previously found those two options but was unsure if I was missing  
> anything else. dot\_graph() seemed like a good option but it doesn’t have  
> the block port information, like the term “dot graph” implies. I suppose  
> I’ll just wait until after tb.start().  
> Thanks for your response,  
> Ryan

Hi Ryan,

The reason edge\_list() isn’t populated until after the call to start is  
because the graph hasn’t been properly structured until start is called.  
That’s when all of the buffers are created and connected between blocks.  
The edge list is used there, and it’s use as a diagnostic tool by the  
user  
is kind of secondary.

I’m trying to understand what you think “dot graph” implies. It’s a  
graph  
that uses the ‘dot’ format[0]. I agree that it would be nice if there  
was a  
way to represent the port numbers in here, too, though.

Also, we have plans for some gnuradio-runtime restructuring for our 3.8  
release. One of my plans is to make automatically walking the graph a  
lot  
easier from the outside. I’ve run into this myself and you and others  
have  
asked similar questions, and we’ve all made compromises based on the  
current tools. For benchmarking and optimization, we really want to be  
able  
to interrogate the top block more effectively. Of course, I’m assuming  
you’re not going to want to wait until 3.8 for this since you’re  
probably  
looking to graduate 🙂

Tom

[0] [http://www.graphviz.org/content/dot-language](http://www.graphviz.org/content/dot-language)
