Guest
I'm fairly new to generics, consequently I'm having problems
I'm trying to create an entity with 'width' bits in and 'nbits'x'width'
bits out. I'm trying to use an unconstrained array to do this, but I'm
getting compile errors...
# ** Error: C:/Modeltech_6.0c/work/srsipo.vhd(34): near "array":
expecting: STRING IDENTIFIER
Any ideas? Thanks.
-Brandon
<SNIP>
library ieee;
use ieee.std_logic_1164.all;
use work.srsipo_pkg.all;
-------------------------------------------------------------------------------
-- ENTITY
-------------------------------------------------------------------------------
entity srsipo is
generic (
nbits : integer;
width : integer
);
port (
---------------------------------------------------------------------------
-- input
------------------------------------------------------------------
rst_na : in std_logic;
clk : in std_logic;
din : in std_logic_vector(width-1 downto 0);
-- output
-----------------------------------------------------------------
dout : out array (width-1 downto 0)
of std_logic_vector(nbits-1 downto 0)
---------------------------------------------------------------------------
);
end srsipo;
</SNIP>
I'm trying to create an entity with 'width' bits in and 'nbits'x'width'
bits out. I'm trying to use an unconstrained array to do this, but I'm
getting compile errors...
# ** Error: C:/Modeltech_6.0c/work/srsipo.vhd(34): near "array":
expecting: STRING IDENTIFIER
Any ideas? Thanks.
-Brandon
<SNIP>
library ieee;
use ieee.std_logic_1164.all;
use work.srsipo_pkg.all;
-------------------------------------------------------------------------------
-- ENTITY
-------------------------------------------------------------------------------
entity srsipo is
generic (
nbits : integer;
width : integer
);
port (
---------------------------------------------------------------------------
-- input
------------------------------------------------------------------
rst_na : in std_logic;
clk : in std_logic;
din : in std_logic_vector(width-1 downto 0);
-- output
-----------------------------------------------------------------
dout : out array (width-1 downto 0)
of std_logic_vector(nbits-1 downto 0)
---------------------------------------------------------------------------
);
end srsipo;
</SNIP>