error in hdl workflow advisor

3 次查看(过去 30 天)
mohsen salehi
mohsen salehi 2018-1-18
评论: zuyuan 2024-2-15
hello i have this error hdl workflow advisor :"Error: Unhandled mixed real and complex ports for block."
  1 个评论
Bharath Venkataraman
Can you provide info on which block the report is pointing to, what its inputs are (along with data types)?

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2018-1-18
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!

Translated by