MATLAB Answers

shauk
0

HDL Coder Clock Summary Explanation

Asked by shauk
on 29 May 2017
Latest activity Answered by shauk
on 31 May 2017
When i am generating a HDL code using the Simulink HDL coder, on the code generation report i get a clock summary report. And there are two values, Model Based Rate and the DUT Based Rate. I understand where the values come from but i dont understand what they actually mean. So the value in the Model Based Rate is the value I entered in the simulink fundamental sample time and DUT based rate is the maximum Fs of my design. What do they mean and what is the application of this two values, i did not find anything on the documentation
I am attaching a screenshot of my clock summary, As you can see the Left Out and Right Out has a sample time of 8.85771e-08 which is basically 11.28 MHz. Does this ensure that my output data is coming out at 11.28 MHz. This is what i understood by reading the matlab documentation so far.

  0 Comments

Sign in to comment.

2 Answers

Answer by Tim McBrayer on 30 May 2017

The clock report is primarily intended to show the relationship between the various signal rates. As you have noted, these times are taken directly from Simulink. They are not synthesis results, and there is no guarantee that your HDL code will run at the specified rates once synthesized. The output rates will depend on the master clock fed into the design.
Some people model rates in Simulink using simple integer values instead of desired hardware clock rates. If your design were modeled in such a fashion your output rates might be modeled as 1 (Left_out, Right_out), 4 (WS_OUT), and 256 (sync, msb_bit).

  0 Comments

Sign in to comment.


Answer by shauk
on 31 May 2017

Hallo Tim
Thanks for the answer, solves a lot of confusions. One more question, there is a oversampling parameter in the Simulink HDL coder, i read the documentation but i did not clearly understand what that parameter does. But in the above example when i set the oversampling parameter to 2. I get perfect results as output. Could you please explain it in a bit easier way

  0 Comments

Sign in to comment.