A
ALuPin
Hi,
I am trying to do the following:
In a package (pkg_generic.vhd) I declare the following types and
constants:
type type_range is array(1 downto 0) of integer range 0 to 3;
type type_lookup is array (natural range <>) of type_range;
constant cLookup : type_lookup(1 downto 0) := ( 1 => (2,4), 0 =>
(0,3) );
Now I have a component with the following declaration:
entity test is
generic( gLookup : type_lookup(0 downto 0) := cLookup(0);
);
port( ...);
end test;
When compiling in Modelsim I get the following error:
"Cannot resolve indexed name as type work.pkg_generic.type_lookup"
For simulation I do not need the default (cLookup(0))
because it is asserted in the generic map of that component.
But when trying to synthesize it I get the error:
"gLookup has no actual or default value"
How can I marry both, synthesis and simulation ?
Thank you.
Rgds,
ALuPin
I am trying to do the following:
In a package (pkg_generic.vhd) I declare the following types and
constants:
type type_range is array(1 downto 0) of integer range 0 to 3;
type type_lookup is array (natural range <>) of type_range;
constant cLookup : type_lookup(1 downto 0) := ( 1 => (2,4), 0 =>
(0,3) );
Now I have a component with the following declaration:
entity test is
generic( gLookup : type_lookup(0 downto 0) := cLookup(0);
);
port( ...);
end test;
When compiling in Modelsim I get the following error:
"Cannot resolve indexed name as type work.pkg_generic.type_lookup"
For simulation I do not need the default (cLookup(0))
because it is asserted in the generic map of that component.
But when trying to synthesize it I get the error:
"gLookup has no actual or default value"
How can I marry both, synthesis and simulation ?
Thank you.
Rgds,
ALuPin