W
wallge
Guest
So here's my problem - and it is starting to drive me really crazy as
I start to become a seasoned VHDL designer.
I have lots of modules I have designed - and many of them have their
own associated packages to define some types that are used inside of
them, as well as constants that may be pertinent to each component's
functioning.
Consequently, anytime I want to instantiate components in the design I
am using, I wind up having to drag along a bunch of packages - that
occasionally have contradictory type definitions or constants that
wind up making up a bunch of work for me when I go to plug everything
together.
So I decided that I would like to use generics for each component
instead of packages.
The problem with this (as far as I can tell) is that you can't pass
types
(eg. array_type is array (3 downto 0) of unsigned(7 downto 0))
as generics.
You have to have a package in order to use any user defined types that
are shared (maybe used as ports) between multiple entities.
What I would like is a way of sharing custom type definitions between
multiple entities
-- where they type definitions would be based on generics passed to
the component
when it is instantiated, without having to having to keep track of a
bunch of packages.
Does anyone have a solution to this problem?
thanks in advance.
I start to become a seasoned VHDL designer.
I have lots of modules I have designed - and many of them have their
own associated packages to define some types that are used inside of
them, as well as constants that may be pertinent to each component's
functioning.
Consequently, anytime I want to instantiate components in the design I
am using, I wind up having to drag along a bunch of packages - that
occasionally have contradictory type definitions or constants that
wind up making up a bunch of work for me when I go to plug everything
together.
So I decided that I would like to use generics for each component
instead of packages.
The problem with this (as far as I can tell) is that you can't pass
types
(eg. array_type is array (3 downto 0) of unsigned(7 downto 0))
as generics.
You have to have a package in order to use any user defined types that
are shared (maybe used as ports) between multiple entities.
What I would like is a way of sharing custom type definitions between
multiple entities
-- where they type definitions would be based on generics passed to
the component
when it is instantiated, without having to having to keep track of a
bunch of packages.
Does anyone have a solution to this problem?
thanks in advance.