question about HDL Coder and simulink
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello to everybody is the first time I am writting in a forum. I am working with Matlab HDL Coder and I have some questions.
1:I know that HDL Coder can not implement transfer functions so I am using simulink blocks like delays and gains for example, to get the same answer. I am trying to make a discrete filter using a transfer function. I get a same signal but with different amplitude. anybody knows why? 2:I also want to implement a integer variable delay but HDL Coder does not implement it. anybody knows how can I implement a variable integer delay using simulink blocks that HDL Coder supported?
thank you for all and sorry about my english
0 Kommentare
Akzeptierte Antwort
Tim McBrayer
am 12 Jul. 2011
For question 1, there's no way to debug your code remotely. You will need to analyze the numerics of your implementation and see where they differ from the implementation provided by the Discrete Transfer Function block.
For question 2: a real runtime-variable delay is essentially impossible in hardware; you can't dynamically create or destroy registers, but have to have a fixed maximum. You will need to consider what your requirements for your maximum delay are. Based on this there are several approaches available. You could use a Tapped Delay block and a Multiport Switch block, or a shift register/counter combination, or perhaps a RAM and counter combination. Make sure to consider what you will do with data in flight if the size of the delay changes during processing.
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!