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

2 views (last 30 days)
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?

Answers (1)

Shivam
Shivam on 29 Nov 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 Comment
dh1024
dh1024 on 29 Nov 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

Sign in to comment.

Categories

Find more on Multicore Processor Targets in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!