Simulink block for input: constant block not supported in HDL Coder

Hello, I am using Matlab 2012a, I built a simple Simulink model, made of a source block, a tigonometric block(sin) and a sink block:
(_in_)---->|_trigonometric_|--->(_out_)
When i try to generate an HDL code through HDL workflow advisor out of it, I got this error
Abnormal exit:Invalid simulink object name:/constant
But the constant block is supported by hdllib.The source block was taken from --> DSP System Toolbox--> Sinks
Will you please suggest a way to remove this error.

댓글 수: 1

Were you ever able to figure this out? I am in a similar situation right now with Demux1 and Clock. Ironically, it is okay with Demux, but not Demux1, or any other renaming of it.

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

답변 (2개)

Tim McBrayer
Tim McBrayer 2014년 2월 28일

0 개 추천

Does your constant block happen to be named "/constant"? From the error message, the leading forward slash seems to be the abnormal portion.

댓글 수: 2

Sir, Thanks for replying. I checked the name of the block it is given as Constant1. and the same error persists.I have attached the block diagram drawn in simulink.
Sir I checked the following but there is no mismatch in the subsystem names. I have checked the naming convention in 'Model Advisor but no error was found.After having run all these checks the same error ie; Abnormal exit:Invalid simulink object name:/constant persists. Kindly suggest a way to rectify the mistake.
>> s1='activation_fn/Constant1'
s1 =
activation_fn/Constant1
>> s2=gcb
s2 =
activation_fn/Constant1
>> strcmp(s1,s2)
ans =
1
>> whos s1 s2 Name Size Bytes Class Attributes
s1 1x23 46 char
s2 1x23 46 char

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

Paul Rogers
Paul Rogers 2017년 5월 3일

0 개 추천

Hello! I just had this issue in my design as well. It turns out my issue was solved by ensuring all constants were not floating point data types (mine were set to doubles). I changed them to fixed point 16.12 which fixed the issue. I hope this helps you and others!

제품

질문:

2014년 2월 28일

답변:

2017년 5월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by