SIMULINK Datatype mysmatch error

2 visualizaciones (últimos 30 días)
Lucas Augusto Tansini
Lucas Augusto Tansini el 11 de Jun. de 2020
Respondida: Mark McBroom el 14 de Jun. de 2020
Hello all!
I'm quite new to SIMULINK model-design and i have stumbled into an error, and I though I might ask for help here, since there may be a better way to handle this implementation.
Currently, I'm implementing this piece of (a fft benchmark) C code into SIMULINK Model-based design:
for ( i=rev=0; i < NumBits; i++ )
{
rev = (rev << 1) | (index & 1);
index >>= 1;
}
So far, this what I've got:
However, i got these two datatype mismatch error,
Data type mismatch. Input port 2 of 'fftModel/iteratorNumSamples /For Iterator Subsystem/Bitwise Operator' expects a signal of data type 'uint32'. However, it is driven by a signal of data type 'ufix32_E1'.
Data type mismatch. Output port 1 of 'fftModel/iteratorNumSamples /For Iterator Subsystem/Shift Arithmetic' is a signal of data type 'ufix32_E1'. However, it is driving a signal of data type 'uint32'.
To fix this, I thought into putting a Data Type Conversion block, but this block changes the code behavior. Is there an easy way to fix this?
Thanks in advance.

Respuestas (1)

Mark McBroom
Mark McBroom el 14 de Jun. de 2020
In Shift Arithmetic block, make sure the "Binary points to shift" is set to zero.

Categorías

Más información sobre Discontinuities en Help Center y File Exchange.

Productos


Versión

R2012b

Community Treasure Hunt

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

Start Hunting!

Translated by