A graphical representation of the graph can be generated in the graphivz format .dot. The file .dot can be processed by the graphviz dot tool to generate png, svg, pdf files ...
The graph can be generated before scheduling. It is useful to debug but will miss some information (like FIFO lengths). The graph can be generated after schedule with all the information.
The below method can be used to generate the .dot file representing the graph.
def graphviz(self,f,config=Configuration())It is a method of the schedule object returned by computeSchedule.
f: Opened file where to write the graphviz descriptionconfig: An optional configuration object
Generating the graph before the scheduling computation can be useful to find problems. Sometimes the scheduling is failing because the graph has some issues : IOs not connected, loops without the right delays ...
To generate the graph before the scheduling, you can use the graphviz function on the graph object and before using the computeSchedule function that is rewriting the graph
def graphviz(self,f,config=Configuration())This is a method of the graph object.
It is possible to customize the graph style (colors, font ...). There are lots of customization options.
There are differences between the pre-schedule graph and the post-schedule graph:
- In pre-schedule, you don't know the size of the FIFOs (in fact there is no FIFO)
- The
Duplicatenodes (and additional FIFOs) have not been inserted to implement one-to-many outputs
In this graph, all sinks are connected to the oa output of the filter node. That is not correct for the scheduling point of view since each output of the C++ implementation is connected to only one FIFO.
The scheduling phase will introduce a Duplicate node
The edges have no information of datatype or capacity (number of samples).
In this graph, datatype (complex) and capacity (11 or 5 samples) have been added to the edges.
A Duplicate node has been inserted at the output oa of the filter node.
Horizontal or vertical layout for the graph.
By default, the graph is displaying the FIFO sizes computed as result of the scheduling. If you want to know the FIFO variable names used in the code, you can set this option to true and the graph will display the FIFO variable names.

