Project TRA: DataFlow Transformations
This project is a compulsory part of the examination for the
Implementation of Digital Signal Processing
course at the University of Twente. The goals of this
project are:
 To apply the theory of dataflow transformations to a relatively
small design.

To develop your skills in the use of Synopsys Cocentric System
Studio (CCSS).
Preparation
Make sure that you have performed the preparatory project PRE which
should help you to get acquainted with CCSS.
Files and Libraries
If you do not have done it yet, create a directory ccss in
your home directory and change to that directory:
cd
mkdir ccss
cd ccss
And fetch the files for this exercise:
getmodule idsp_tra idsp_tra
Now start CCSS (shell command ccss) and add the library
idsp_tra to
your workspace by means of
the Library > Add Existing Libraries ... feature of CCSS.
If everything went well, you will have the following models in the
idsp_tra library:
 mul_const: multiplication by a constant with different
data types for data and constant.
 sec_soc: a secondorder filter section, also used in
the
SystemonChip Design course.
 tb_sec_soc: a testbench for the secondorder filter.
The Filter
The figure below gives the dataflow graph (DFG) and zdomain description
of the filter to be used in this exercise.
The DFG represents the socalled
transposed
form of a secondorder infinite impulse response (IIR) filter. The
delay element (T0) before the output has been introduced for implementation
reasons; in this way, the output of the filter corresponds to the contents
of a register.
This filter is made available to you in model sec_soc. The
coefficients have been defined as parameters to the model. Also the
data types are parameterized: there is a parameter T_d for
data and a parameter T_c for the coefficients. Initially, both
types are set to float.
All parameters
have been defined at the testbench level and propagated down the
hierarchy to their destinations.
The testbench consists of two cosine generators. They generate two
sinusoidal signals with frequencies f_cos1 and
f_cos2 respectively. The sum of these two signals is fed into
the filter. Both the input and the output of the filter are recorded
for later viewing by Davis in WriteSignal blocks. The number
of samples written is given by parameter out_samples. By
changing its value you can change the duration of the simulation. Also
the amplitudes of the two cosines are parameterized by amp1
respectively amp2.
With the given coefficient values, the filter is high pass.
The idea is to generate two frequencies of which one is strongly
attenuated and the other passes without attenuation.
Exercise TRA1: Familiarization
Generate code and simulate the given testbench as is. Repeat the
simulation with one of the two cosines active (put the amplitude of
the other to 0). Make sure that the filter behaves as expected. Use
either an scf script or the Level Watch tab of a
paused simulation to change the amplitudes without the need to
regenerate the code.
How much (in dB) is the lower frequency input approximately attenuated?
Estimate this number by measuring the input and output amplitudes in
Davis.
Exercise TRA2: Pipelining and Retiming
Assume that the implementation will require one clock cycle for an
addition and two clock cycles for a multiplication. Be aware that such
computational delay cannot be simulated by a dataflow model.
Assume that the filter will be realized with a nonoverlapping schedule
(the delay elements will be replaced by outputinput pairs). How long
is, in such a case the critical path? Draw it in the DFG.
Use now pipelining and retiming to minimize the critical path.
Make a copy of sec_soc (e.g. by means of Duplicate and then
Rename under the right mouse button in the model browser) and
then modify it.
Then simulate the modified model parallel to the original filter,
compute the difference between the two outputs (use the model
Sub from the cocentric > models > arithmetic library)
and show that the outputs are identical.
Exercise TRA3: Unfolding
Unfold the original filter by a factor of two. Do this in such a way
that the topology of the original filter can be recognized in the
unfolded graph as drawn by you.
Make a model of the unfolded graph in System Studio, put it in
parallel with the original graph and show that the two behaviors are
identical. Note that the unfolded graph will have two input and
two output nodes. Use Demultiplex2 from
from the cocentric > models > flowcontrol library to
alternatively send inputs to either one or the other input and
Multiplex2 to merge the tokens from the two outputs into a
single stream.
Note: It turns out that the current version of System Studio
may have problems to simulate unfolded graphs; it detects deadlocks
where there aren't any. This problem can be circumvented by the
following two actions:
 Select the toplevel model in the model browser. Then issue
Model > Configure Implementation .... In the window that pops
up, go to the Attributes tab and activate the property
always_dynamic, followed by OK or Apply. (This
property is normally used when a static schedule is not possible due
to datadependent firing of nodes in the dataflow graph.)
 Repeat the above, but instead of the Attributes tab, now
open the Exit Condition tab. In the input field that shows up,
type a Boolean expression that is the logical AND of all sinks
of your model. It indicates to the simulator that the simulation
should only terminate when all sinks have received a sufficient number
of tokens. The exit condition of the distributed model
tb_sec_soc is e.g. sec_soc_in && sec_soc_out
referring to the only two WriteSignal sinks in the model.
Question: Does the transformation have any effect on the critical
path or critical loop? Explain.
Exercise TRA4: Lookahead transformation
Apply a onestep lookahead transformation to the original
filter. Try to preserve the topology of the DFG as much as possible.
Proceed in the same way
as in TRA3 to show that the result that you have obtained behaves the
same as the original filter. Comment on the critical path and loop.
Deliverables
Write a short report always motivating your choices and explaining the
way you have reached your answers. Particular points of attention:
 TRA1: Answer to the question. Relevant plots as produced by Davis.
 TRA2: Critical path, drawings of optimized DFG and modified
testbench.
 TRA3: Drawings of the unfolded DFG and the modified testbench;
simulation results.
 TRA4: Drawings of the new DFG and the modified testbench;
simulation results.
Grading
 TRA1: 1 point
 TRA2: 2 points
 TRA3: 4 points
 TRA4: 3 points
Last update on:
Wed Mar 1 01:30:23 CET 2017
by Sabih Gerez.