Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- It's not a license issue. A DSP Builder license is only required for generation. Simulation only requires Simulink licenses and would error out rather than give you incorrect results. Nothing is wrong here, but I can see why you might be confused by the result. There are two main issues here: Firstly, your scope is not returning all the data. Double-click on it and click the parameters button. Then click on the Data History tab of the scope and disable "Limit data points to last". Now you should see the full "10 sample times" worth of data, whereas previously you were seeing only 5. The reason it was only showing half the wave is because the Sine block has a sample time of 1/1000. The Stop time of the model is 10, so 10 / (1 / 1000) is 10000, which means you need 2 * 5000 samples. The second reason you may be confused is that the DSP Builder wave is jagged and the simulink wave is smooth. This is just down to sampling. You haven't configured a sample time for DSP Builder (by inserting a clock and setting its sample time) so it just uses its default which is 1. The other way to change this is to set the Sample time of the Sine Wave block to 1. Even after doing all the above the waves still won't be identical for 2 reasons: a) The Gain block has 1 pipeline stage so it will be slightly out of phase with the original. b) The DSP Builder Input and Output blocks are truncating the input during quantization. --- Quote End --- Thank you very much. I added a clock and set the sample time and it worked.:D