diff --git a/SDFTools/documentation/example1.md b/SDFTools/documentation/example1.md index 43aa2ac8..a54a53f9 100755 --- a/SDFTools/documentation/example1.md +++ b/SDFTools/documentation/example1.md @@ -54,6 +54,8 @@ When creating a new kind of node (here a sink) we always need to do 2 things: - Add inputs and outputs. The convention is that an input is named "i" and output "o". When there are several inputs they are named "ia", "ib" etc ... - For a sink you can only add an input. So the function addOutput is not available. - The constructor is taking a length and a type. It is used to create the io +- When there are several inputs or outputs, they are ordered using alphabetical order. +It is important to know what is the ID of the corresponding IO in the C code. The definition of a new kind of Source is very similar: diff --git a/SDFTools/sdf/templates/dot_template.dot b/SDFTools/sdf/templates/dot_template.dot index 7ef623e8..ea1d1bf3 100755 --- a/SDFTools/sdf/templates/dot_template.dot +++ b/SDFTools/sdf/templates/dot_template.dot @@ -84,12 +84,20 @@ digraph structs { {{delayBox(id)}} {% if fifos[id].hasDelay %} -{{io(fifos[id].src.owner,fifos[id].src)}} -> {{delayBoxID(id)}}:i [taillabel=<{{fifos[id].src.nbSamples}}>] +{{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}})"] +{{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}})"] +{{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 %}