{% macro io(node,theio) -%}
{% if not node.hasManyIOs %}{{node.nodeID}}:i{% else %}{{node.nodeID}}:{{theio.name}}{% endif %}
{%- endmacro %}
{% macro constdst(theID) -%}
{{constEdges[theID][1].owner.nodeID}}:{{constEdges[theID][1].name}}
{% endmacro -%}
{% macro delayBoxID(id) -%}{{fifos[id].src.owner.nodeID}}Delay{%- endmacro %}
{% macro delayBox(edge) -%}
{% if fifos[edge].hasDelay %}
{{delayBoxID(edge)}} [label=<
>];
{% endif %}
{%- endmacro %}
digraph structs {
node [shape=plaintext]
rankdir=LR
edge [arrowsize=0.5]
fontname="times"
{% for item in nodes %}
{% if not item.hasManyIOs %}
{{item.nodeID}} [label=<
>];
{% else %}
{{item.nodeID}} [label=<
{% if item.inputNames[0] is defined %}
| {{item.inputNames[0]}} |
{% else %}
|
{% endif %}
{{ item.graphvizName }} |
{% if item.outputNames[0] is defined %}
{{item.outputNames[0]}} |
{% else %}
|
{% endif %}
{% if item.hasManyInputs %}
{% for input in item.inputNames[1:] -%}
| {{input}} |
{% endfor -%}
{% for output in range(item.nbEmptyInputs) %}
|
{% endfor %}
{% else %}
|
{% endif %}
{% if item.hasManyOutputs %}
{% for output in item.outputNames[1:] -%}
{{output}} |
{% endfor -%}
{% for output in range(item.nbEmptyOutputs) %}
|
{% endfor %}
{% else %}
|
{% endif %}
>];
{% endif %}
{% endfor %}
{% for id in range(nbFifos) %}
{{delayBox(id)}}
{% if fifos[id].hasDelay %}
{{io(fifos[id].src.owner,fifos[id].src)}} -> {{delayBoxID(id)}}:i [taillabel=<
| {{fifos[id].src.nbSamples}}
|
>]
{{delayBoxID(id)}}:i -> {{io(fifos[id].dst.owner,fifos[id].dst)}} [headlabel=<
| {{fifos[id].dst.nbSamples}}
|
>,label="{{fifos[id].theType.graphViztype}}({{fifos[id].length}})"]
{% else %}
{{io(fifos[id].src.owner,fifos[id].src)}} -> {{io(fifos[id].dst.owner,fifos[id].dst)}} [headlabel=<
| {{fifos[id].dst.nbSamples}}
|
>,taillabel=<
| {{fifos[id].src.nbSamples}}
|
>,label="{{fifos[id].theType.graphViztype}}({{fifos[id].length}})"]
{% endif %}
{% endfor %}
{% for c in constObjs %}
{{c.name}} [label=<
>];
{% endfor %}
{% for edgeID in range(nbConstEdges) %}
{{constEdges[edgeID][0].name}}:i -> {{constdst(edgeID)}}
{% endfor %}
}