T
Tricky
I have the following line of code:
img_height := ( img.get_image )'length(1);
img is a protected type.
get_image is a function returning a 2D array containing the image
data.
img_height is an integer.
Now, in modesim I get the compilation error:
# ** Error: hdl/mem_interface_model.vhd(745): near "'": expecting ';'
The error is pointing to the 'length attribute.
So I can see that modelsim wants to end the like at the function call,
but what's wrong with taking the attribute of a return value.
Before anyone asks, Ive found an annoying bug that crashes the
modelsim compiler which mean (for reasons of my file) I cannot have
functions that return the width or height of the image in the
protected type. It works when I return the image array, so Im trying
to work around this bug with the code above.
img_height := ( img.get_image )'length(1);
img is a protected type.
get_image is a function returning a 2D array containing the image
data.
img_height is an integer.
Now, in modesim I get the compilation error:
# ** Error: hdl/mem_interface_model.vhd(745): near "'": expecting ';'
The error is pointing to the 'length attribute.
So I can see that modelsim wants to end the like at the function call,
but what's wrong with taking the attribute of a return value.
Before anyone asks, Ive found an annoying bug that crashes the
modelsim compiler which mean (for reasons of my file) I cannot have
functions that return the width or height of the image in the
protected type. It works when I return the image array, so Im trying
to work around this bug with the code above.