Not getting desired waveform when using the hdl supported free running counter
3 ビュー (過去 30 日間)
古いコメントを表示
I have generated a sine pwm using sine-triangle comparison method. The sawtooth waveform is generated by a free running (HDL supported)counter with 6-bit. The stepped waveform generated contains only six or seven steps, this I believe incorrect. For a six bit counter, I expect a stepped sawtooth waveform with 64 steps, but I am getting only 6 to 7 stepped sawtooth waveform (Amplitude > 60)!!
Any idea what problem it is?
The solver used is fixed and discrete. This is selected because I want to convert the model into HDL code (Verilog code).
Any further details required..
Regards,
0 件のコメント
採用された回答
Tim McBrayer
2013 年 5 月 31 日
編集済み: Tim McBrayer
2013 年 5 月 31 日
The HDL Counter has (among other mask parameters) initial value, step value, and count to value. I think you are confusing the count to value with counter bit width. if you want a 64-value counter, one way to configure it is with a start value of 0, a stop value of 63, and an increment of 1. The numeric type for the counter's output is an entirely separate set of configurable mask parameters.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で HDL Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!