07-26-2017 03:42 AM - edited 07-26-2017 06:38 AM
Hi,
Is the initlazation correct?
type x1 is std_logic_vector(15 downto 0);
type x2 (1 downto 0) of x1;
signal Y : x2:=((others=>'0'), (others=>'0'));
is initilization is also same for this?
type slv16_array_t is array (integer range <>) of std_logic_vector(15 downto 0);
signal Y : slv16_array_t(1 downto 0):=((others=>'0'), (others=>'0'));
or something else?
07-26-2017 06:17 AM
Hi @fpgalearner,
Can you try something like this?
subtype x1 is std_logic_vector(15 downto 0);
type x2 is array (1 downto 0) of x1 ;
signal Y : x2:=((others=> (others=>'0')));
Thanks & Regards,
Prathik
-----------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helps to resolve your query.
Helpful answer -> Give Kudos
-----------------------------------------------------------------------------------------------
07-26-2017 06:42 AM
hi @prathikm
I need actually for this case. Is this correct then?
type slv16_array_t is array (integer range <>) of std_logic_vector(15 downto 0);
signal Y : slv16_array_t(1 downto 0):=((others=> (others=>'0')));
07-27-2017 12:12 AM
Hi @fpgalearner,
I guess this would work. But I am a bit confused about your usage. Do you have any RTL/test-case that you are working on?
type slv16_array_t is array (integer range <>) of std_logic_vector(15 downto 0);
signal Z : slv16_array_t(1 downto 0):=((others=> (others=>'0')));
Thanks & Regards,
Prathik
-----------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helps to resolve your query.
Helpful answer -> Give Kudos
-----------------------------------------------------------------------------------------------