V
Victor Hannak
Guest
I am creating a component that accepts as input a 2-D array of signed
signals (the numeric_std version of signed) that represent a coefficient
matrix. However, I would like the bit-width of the signed coefficients to
be variable as determined by a generic passed in to the component.
Ideally, I would like to define a type in a package like thus:
type signed_matrix_type is array (0 to 7, 0 to 7) of signed;
And then the component would look like this:
entity matrix_transform is
generic (
coeff_width : natural := 8);
port (
matrix_in : in signed_matrix_type(coeff_width-1 downto 0);
matrix_out : out signed_matrix_type(coeff_width-1 downto 0));
end entity matrix_transform;
Obviously, this is incorrect for a variety of reasons. Nevertheless, I
would love to entertain suggestions on how to best implement this component.
Note that the base coefficient type must be signed because I want to
carefully control bit widths throughout the design. Therefore, I do not
want to use integer types/subtypes for the coefficients.
Thanks,
Vic.
signals (the numeric_std version of signed) that represent a coefficient
matrix. However, I would like the bit-width of the signed coefficients to
be variable as determined by a generic passed in to the component.
Ideally, I would like to define a type in a package like thus:
type signed_matrix_type is array (0 to 7, 0 to 7) of signed;
And then the component would look like this:
entity matrix_transform is
generic (
coeff_width : natural := 8);
port (
matrix_in : in signed_matrix_type(coeff_width-1 downto 0);
matrix_out : out signed_matrix_type(coeff_width-1 downto 0));
end entity matrix_transform;
Obviously, this is incorrect for a variety of reasons. Nevertheless, I
would love to entertain suggestions on how to best implement this component.
Note that the base coefficient type must be signed because I want to
carefully control bit widths throughout the design. Therefore, I do not
want to use integer types/subtypes for the coefficients.
Thanks,
Vic.