error in hdl workflow advisor

1 view (last 30 days)
mohsen salehi
mohsen salehi on 18 Jan 2018
Commented: zuyuan on 15 Feb 2024
hello i have this error hdl workflow advisor :"Error: Unhandled mixed real and complex ports for block."
  1 Comment
Bharath Venkataraman
Bharath Venkataraman on 19 Jan 2018
Can you provide info on which block the report is pointing to, what its inputs are (along with data types)?

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 18 Jan 2018
If you are expecting only real variables as input, then examine which of the ports are complex and track the value back until you figure out why the port is complex. Once you know why it is complex, you might find a coding error that you could correct. If the signal is complex for a good reason but you decide you only need the real part (or only the imag part) then use a "Complex to Real-Imag" block to split the complex signal into parts and send only the desired part to the HDL block.
If you are expecting and wanting complex inputs, then examine which of the ports are not complex and track the value back until you figure out why the port is not complex. Once you know why it is not complex, you might find a coding error that you could correct. If the signal is real only for a good reason but you decide you need it to be complex, then use a "Real-Imag to Complex" block to add a 0 complex part and send the complex signal to the HDL block.
Be careful with variables in MATLAB Function blocks that you expect to be complex, but could potentially "accidentally" happen to have an all-zero complex part. You might find that you need to insert calls to complex() to force expression to be complex-valued.

Community Treasure Hunt

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

Start Hunting!