Why isn't it possible to index the "Data Store Read" block with a variable of data type uint32 ?

2 visualizaciones (últimos 30 días)
As explained in the documentation of the Simulink block "Data Store Read" (https://de.mathworks.com/help/simulink/slref/datastoreread.html) it is possible to use indexing to read parts of a data store memory block. The following data types for the index input variable are supported:
int8 | int16 | int32 | uint8 | uint16
Is there a reason, why the data type uint32 is not supported?

Respuestas (1)

Shivam
Shivam el 29 de Nov. de 2023
Hello,
Based on the information provided, I have gathered that the supported data types for the index input variable to select corresponding data store subelements are limited to 'int8', 'int16', 'unit8', and 'uint16'. You are curious about why 'uint32' is not supported.
It is important to consider that the choice of index variable data type is closely linked to the size of the Data Store Memory. The extensive range of 'uint32', from 0 to 4,294,967,295, could potentially lead to overflow or out-of-bounds errors.
Although the explicit size of the Data Store Memory is not specified, this significantly large index variable might be a contributing factor.
I hope it helps.
  1 comentario
dh1024
dh1024 el 29 de Nov. de 2023
Thank you for your response!
Allowed data types are:
Data Types: int8 | int16 | int32 | uint8 | uint16
The range from int32 is: -2,147,483,648 to 2,147,483,647
So since int32 is a valid indexing data type though, it dosen't make sense for me why uint32 shouldn't be allowed. But thank you anyways. Have a nice day!
David

Iniciar sesión para comentar.

Categorías

Más información sobre Multicore Processor Targets en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by