About HDL Coder in Simulink

조회 수: 2 (최근 30일)
Prashanth n
Prashanth n 2016년 4월 19일
댓글: Prashanth Nayak 2016년 4월 21일
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

채택된 답변

Tim McBrayer
Tim McBrayer 2016년 4월 19일
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
Prashanth n
Prashanth n 2016년 4월 19일
hii Tim,
Thank you so much. You guessed right. Now i am able to generate the code.
regards,
Prashanth
Prashanth Nayak
Prashanth Nayak 2016년 4월 21일
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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품

Community Treasure Hunt

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

Start Hunting!

Translated by