Using HDL coder for Matlab Function block of Simulink
3 次查看(过去 30 天)
显示 更早的评论
Hello,
On the big picture, I am trying to implement a filter with around 150-200 taps but my filter has some special features thus I don't want to use Simulink's HDL optimized FIR filter. To do this I've written a code that puts simple Simulink blocks into a subsystem, however since a Simulink canvas has finite size and the amount of blocks I can use are naturally limited by the Simulink itself, when there are more taps to the filter (say 600 taps) it gives an error. Also yes, I did as much modularization as I could by gathering constantly used blocks within subsystems as well.
Since I have this problem I thought using Matlab Function block of Simulink would be a better approach. But creating a delay line is a bit problematic for huge amounts of delay. I am trying to use for loop for signal pipelining in the delay line but it either doesn't work as intended, i.e. it doesn't delay the signal right amount, or I am forced to write all the signal pipeline with my hand but then this makes filters with huge number of taps not so practical.
Is there a better tutorial about using HDL coder through Matlab for example? That shows how to do bigger delay lines faster and more modular using loops.
0 个评论
采纳的回答
Kiran Kintali
2018-12-15
kiran.kintali@mathworks.com
Can you share sample abstract MATLAB code and testbench on what you are describing here?
type "eml_hdl_design_patterns" to see some MATLAB function block examples.
Please check mlhdlc_tutorial_corner_detection.m and mlhdlc_tutorial_corner_detection_tb.m
There are lot of such demos in <matlabroot>\toolbox\hdlcoder\hdlcoderdemos\matlabhdlcoderdemos for your review.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 HDL Code Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!