Trying to simply infer block rams in a design with varying depths and widths. I'd like to have one ram definition since it is going to use a vendor specific attribute and it seems like a good idea to keep it confined to one module.
Using integer_vector for the array type it is simple enough to set the range of the array index. Setting the range of the integers in the array is not so clear. Is it possible to set the integer range in the signal declaration rather than a type declaration?
I need both the depth and width of the memory to be set by generics where it is instantiated. Will I need to use a vector type instead of the integer type to be able to do this?
Best Answer
Here is the final code, well final as of this moment.