Reply To: Limitation using MemoryPkg

Why OSVVM™? Forums OSVVM Limitation using MemoryPkg Reply To: Limitation using MemoryPkg


Hi Jorge,

replacing the integer with a real won’t solve the problem.

Instead, it makes it even worse.

The integer data type uses 32 bits (signed) so you have a numerical range of -2^31 to (2^31)-1.

The mantissa of the (32 bit) real data type is just 23 bits wide, which means it has a smaller numerical range (for integer use).

Once you increase the exponent, you are loosing LSBs of the mantissa.

So, while the memory range may grow, you are not able to adress each word in the higher adress regions.

My guess would be to use some unsigned type for the desired purpose.

With unsigned the number of usable adresses can be increased to ranges not yet imaginable for existing memories.

(e.g. can your simulator host computer adress some array of unsigned (2048 downto 0) memory?)

Also, the unsigned data type behaves almost like integer and is compatible (castable) to slv, so it might require less code changes.

But it needs to be checked, wether the conversion functions (e.g. to_integer/to_unsigned) are used, I doubt that they handle larger_than_integer unsigned types properly.

Have a nice simulation