- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
System generator DSP signal flow graphs pipelining .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-27-2012 09:54 AM
Hi Everyone, I'm a System Generator user who use it extensively to make arithmatic signal flow graphs for digital signal processing and I also use hardware cosimulation. When I create a design I always manually set the "latency" parameter in each system generator block and also add "delay" elements as necessary to pipeline the design so it has higher throughput.
My question is if there's an automated tool which does this in one click? When I was doing it I felt a automated algorithm should be able to do it when a user set some parameters. Can the MATLAB fixed point tool do this? I'm sorry if this sounds like a stupid question.
Re: System generator DSP signal flow graphs pipelining .
[ Edited ]
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-27-2012 10:24 AM - edited 04-27-2012 10:45 PM
Hi.
Thanks for a good question and sharing your thoughts.
nilanka2 wrote:My question is if there's an automated tool which does this in one click? When I was doing it I felt a automated algorithm should be able to do it when a user set some parameters.
I am not aware of an existence of such automation tool. But it's possible to write MATLAB script file for an access to all desired blocks of model for changing value of Latency. You can even build a whole model adding new blocks and connections between them using script programming.
Can the MATLAB fixed point tool do this?
Fixed-point tool allows only to tweak MATLAB native fixed-point number representation in Simulink models.
Vitaly.
Re: System generator DSP signal flow graphs pipelining .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-28-2012 12:34 PM
Hi vlavruhin,
Thanks for your answer.
By accessing all the blocks in a script and adding latency to one will not work correctly because each path could have different level.
The script you were talking about is it using programmatic access?
Is it possible to traverse forward in the graph using a script method?
I do not use programmatic access in my models.
So if I am to write my own algorithm for pipelining do I have to use programmatic access and
converte my models to a text file to do what your saying?
In my view i think this a common task for digital signal processing people and Xilinx should on develping such tool in future releases.
Re: System generator DSP signal flow graphs pipelining .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-30-2012 05:17 PM
Hi.
The script you were talking about is it using programmatic access?
Yes, I mean accessing to the blocks of a model using MATLAB commands executed from either console or script file.
Let me show one example. Suppose we have following model with four multipliers and one adder:
Now we would like to set Latency parameter of all blocks (Mult11, Mult12, Mult21, Mult22, AddSub) to 5.
To do that we can execute simple script (save this code in file latency_setter.m and run it):
% Find all blocks with Latency parameter
blocks = find_system(gcs, 'RegExp', 'on', 'MaskVariables', 'latency='); % Set new value of Latency parameter for i=1:length(blocks) set_param(blocks{i}, 'latency', '5'); end
After running this script, we get:
Of course, we can change latencies of subset of model's blocks. For example, to change Latency parameter to 10 in Mult11 and Mult12 blocks, we can use a name filter and should make small changes in the script:
% Find all blocks having part of Name 'Mult1' with Latency parameter
blocks = find_system(gcs, 'RegExp', 'on', 'Name', 'Mult1', 'MaskVariables', 'latency='); % Set new value of Latency parameter for i=1:length(blocks) set_param(blocks{i}, 'latency', '10'); end
Or if we want to set Latency to 15 in Mult21, Mult22 and AddSub blocks, then following script will be helpful:
% Find all blocks having part of Name 'Mult2' or 'Add' with Latency parameter
blocks = find_system(gcs, 'RegExp', 'on', 'Name', 'Mult2|Add', 'MaskVariables', 'latency='); % Set new value of Latency parameter for i=1:length(blocks) set_param(blocks{i}, 'latency', '15'); end
By accessing all the blocks in a script and adding latency to one will not work correctly because each path could have different level.
It can be resolved using 'SearchDepth' parameter of find_system function. Also first parameter should be changed to [gcs '/YOUR_NAME_OF_THE_SUBSYSTEM'] in that case. Detailed description of this function is presented here:
http://www.mathworks.com/help/toolbox/simulink/slr
Is it possible to traverse forward in the graph using a script method?
Yes, it's possible too. To do that one should access to 'Ports' and 'PortConnectivity' parameters of block and follow ports connections:
http://www.mathworks.com/help/toolbox/simulink/slr
But there are many questions: When should we stop? How to treat fanouts?
As to me, the usage of find_system function seems to be easier way for changing parameters. You need just to give similar names to the blocks in one signal path (or to put them in one subsystem) and use name filters with regular expressions.
So if I am to write my own algorithm for pipelining do I have to use programmatic access andconverte my models to a text file to do what your saying?
No, there is no need for conversion. Just use scripts similar to shown above.
Hope this information will help you.
Vitaly.
Re: System generator DSP signal flow graphs pipelining .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-05-2012 11:46 AM
As far as I know, no such a tool exists in system generator or Matlab to automatically pipeline the design to meet certain throughput or latency requirements. You may want to take a look at AutoESL, a high level synthesis tool that convert c code to hardware. It takes the clock frequency and latency requirements into consideration during synthesis and tries to generate HW to meet the requirements.
nilanka2 wrote:
Hi Everyone, I'm a System Generator user who use it extensively to make arithmatic signal flow graphs for digital signal processing and I also use hardware cosimulation. When I create a design I always manually set the "latency" parameter in each system generator block and also add "delay" elements as necessary to pipeline the design so it has higher throughput.
My question is if there's an automated tool which does this in one click? When I was doing it I felt a automated algorithm should be able to do it when a user set some parameters. Can the MATLAB fixed point tool do this? I'm sorry if this sounds like a stupid question.
Jim











