.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/schedulingexample.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_schedulingexample.py: ==================================================== Example SFG used for scheduling in the TSTE87 course ==================================================== Node numbering from the original SFG used with the Matlab toolbox:: sfg=addoperand([],'in',1,1); sfg=addoperand(sfg,'constmult',1,1,2,0.25); sfg=addoperand(sfg,'constmult',2,4,5,0.75); sfg=addoperand(sfg,'add',1,[2 1],6); sfg=addoperand(sfg,'add',2,[2 5],3); sfg=addoperand(sfg,'add',3,[6 4],7); sfg=addoperand(sfg,'delay',1,3,4); sfg=addoperand(sfg,'out',1,7); .. GENERATED FROM PYTHON SOURCE LINES 17-32 .. code-block:: Python from b_asic.sfg import SFG from b_asic.special_operations import Delay, Input, Output node1 = Input() node2 = node1 * 0.25 node6 = node2 + node1 node4 = Delay() node7 = node6 + node4 out = Output(node7) node5 = 0.75 * node4 node3 = node2 + node5 node4 <<= node3 sfg = SFG([node1], [out], name="Scheduling example") .. GENERATED FROM PYTHON SOURCE LINES 33-34 The SFG looks like .. GENERATED FROM PYTHON SOURCE LINES 34-35 .. code-block:: Python sfg .. raw:: html
%3 in0 in0 in0.0 in0:e->in0.0 cmul0 cmul0 in0.0->cmul0 add0 add0 in0.0->add0 1 cmul0.0 cmul0->cmul0.0 add2 add2 add0->add2 0 out0 out0 add2->out0:w cmul0.0->add0 0 add1 add1 cmul0.0->add1 0 t0 t0 add1->t0 cmul1 cmul1 cmul1->add1 1 t0.0 t0->t0.0 t0.0->add2 1 t0.0->cmul1


.. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.015 seconds) .. _sphx_glr_download_examples_schedulingexample.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: schedulingexample.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: schedulingexample.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: schedulingexample.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_