type t_ChargeProperties_stream is array ( 0 to 7) of t_ChargeProperties;
type t_ChargeProperties_stream_n is array ( 0 to 3) of t_ChargeProperties;
type t_ChargeProperties_stream_7 is array ( 0 to 8, 0 to 7 ) of t_ChargeProperties_;
type t_ChargeProperties_stream is array ( 0 to 7) of t_ChargeProperties;
type t_ChargeProperties_stream_n is array ( 0 to 3) of t_ChargeProperties;
type t_ChargeProperties_stream_7 is array ( 0 to 8, 0 to 7 ) of t_ChargeProperties_;
You should define the type as an unconstrained array like this...
Code:
type t_ChargeProperties_stream is array (natural range <>) of t_ChargeProperties;
That way you don't need the 'stream_n' or the 'stream_7' versions. You just declare signals of that type and whatever range you want. You'll still need to define the 2D version as a new type, but I would do it like this...
Code:
type t_ChargeProperties_stream_7 is array ( natural range <>, natural range <> ) of t_ChargeProperties;
There is no way to take a slice of a 2d array without writing your own function to do so. If you are intent on using slices, then you need to redefine your 2d array type to be an array of an array like this...
Code:
type t_ChargeProperties_stream_7 is array (natural range <>) of t_ChargeProperties(0 to 7);
Note that when you choose to do it this way as an array of an array rather than a 2d array, the outermost range can be left unconstrained, but the innermost range must be defined as I've shown. I think this might have changed with VHDL-2008 though, don't recall for sure.
type t_ChargeProperties_stream is array (natural range <>) of t_ChargeProperties;
type t_ChargeProperties_stream_arr is array (natural range <>) of t_ChargeProperties_stream;
my_sig : t_ChargeProperties_stream_arr(0 to 7)(7 downto 0);