Przeglądaj źródła

CMSIS-DSP: Improved documentation for SDF.
Improved generation of graphviz.

Christophe Favergeon 4 lat temu
rodzic
commit
a8dbfe930b

+ 2 - 0
CMSIS/DSP/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:
 

+ 11 - 3
CMSIS/DSP/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=<<FONT COLOR="blue" POINT-SIZE="12.0" >{{fifos[id].src.nbSamples}}</FONT>>]
+{{io(fifos[id].src.owner,fifos[id].src)}} -> {{delayBoxID(id)}}:i [taillabel=<
+<TABLE BORDER="0" CELLPADDING="2"><TR><TD><FONT COLOR="blue" POINT-SIZE="12.0" >{{fifos[id].src.nbSamples}}</FONT>
+</TD></TR></TABLE>>]
 
-{{delayBoxID(id)}}:i -> {{io(fifos[id].dst.owner,fifos[id].dst)}} [headlabel=<<FONT COLOR="blue" POINT-SIZE="12.0" >{{fifos[id].dst.nbSamples}}</FONT>>,label="{{fifos[id].theType.graphViztype}}({{fifos[id].length}})"]
+{{delayBoxID(id)}}:i -> {{io(fifos[id].dst.owner,fifos[id].dst)}} [headlabel=<
+<TABLE BORDER="0" CELLPADDING="2"><TR><TD><FONT COLOR="blue" POINT-SIZE="12.0" >{{fifos[id].dst.nbSamples}}</FONT>
+</TD></TR></TABLE>>,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=<<FONT COLOR="blue" POINT-SIZE="12.0" >{{fifos[id].dst.nbSamples}}</FONT>>,taillabel=<<FONT COLOR="blue" POINT-SIZE="12.0" >{{fifos[id].src.nbSamples}}</FONT>>,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=<
+<TABLE BORDER="0" CELLPADDING="2"><TR><TD><FONT COLOR="blue" POINT-SIZE="12.0" >{{fifos[id].dst.nbSamples}}</FONT>
+</TD></TR></TABLE>>,taillabel=<
+<TABLE BORDER="0" CELLPADDING="2"><TR><TD><FONT COLOR="blue" POINT-SIZE="12.0" >{{fifos[id].src.nbSamples}}</FONT>
+</TD></TR></TABLE>>,label="{{fifos[id].theType.graphViztype}}({{fifos[id].length}})"]
 {% endif %}
 {% endfor %}