HDL Coder Clock Summary Explanation

3 次查看(过去 30 天)
shauk
shauk 2017-5-29
回答: shauk 2017-5-31
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.

回答(2 个)

Tim McBrayer
Tim McBrayer 2017-5-30
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).

shauk
shauk 2017-5-31
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

类别

Help CenterFile Exchange 中查找有关 Code Generation 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by