About HDL Coder in Simulink

1 view (last 30 days)
Prashanth n
Prashanth n on 19 Apr 2016
Commented: Prashanth Nayak on 21 Apr 2016
Hello,
I am trying to generate HDL code from simulink. I have connected contant block as input to discrete integrator and getting ramp output. But when i convert to HDL Code, its not generating except library name, entity name and architecture lines. Can you please help me solving this problem..?
Thank you
Regards Prashanth

Accepted Answer

Tim McBrayer
Tim McBrayer on 19 Apr 2016
I suspect that you have three blocks in your model, the third being a terminator, a scope, or something else that doesn't generate HDL code. And, you are generating code for the entire model. The use of a terminator/scope/etc. block indicates that you don't care about the signal output connected to it, so HDL Coder removes the blocks that feed into the terminator. You end up with no blocks or code in your design.
If this is the case, change the terminator/scope/etc. to an output port (or add an output port in parallel to the e.g. scope) and you will get the code that you were expecting.
Alternatively, place just the blocks you want to generate HDL code for into a subsystem, and generate code for that subsystem.
  2 Comments
Prashanth n
Prashanth n on 19 Apr 2016
hii Tim,
Thank you so much. You guessed right. Now i am able to generate the code.
regards,
Prashanth
Prashanth Nayak
Prashanth Nayak on 21 Apr 2016
Hii,
Can you please tell me what are the settings to be done for 'sin', 'cos' blocks while using for HDL Conversion..? I am getting error as "HDL code generation does not support double or single data type for the block Trigonometric Function". I am not able to follow this. Please help me in fixing this problem. please help me with this.
Thank you
Regards, Prashanth

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!