[VHDL] Package Configuration

Status
Not open for further replies.

ivlsi

Advanced Member level 3
Joined
Feb 17, 2012
Messages
883
Helped
17
Reputation
32
Reaction score
16
Trophy points
1,298
Visit site
Activity points
6,868
Hi All,

I have two packages (pkg1 and pkg2), which one contain a set of constants.

Depending on the configuration, I want to use either pkg1 or pkg2, but not both together.

So, how can I do this in VHDL? How to define the configuration for the packages?

Thank you!
 

I know this trick...

But can I do the same using configurations?

Actually I use these packages in many files... So, when I want to move from one configuration to another, it's too tedious going through all this files and comment one of the packages and uncomment another...

Can I use a configuration feature of VHDL, which would choose between pkg1 and pkg2? This way I would not need to go through all the files, but change just the configuration.

Thank you!
 

This article explains the use of configuration in VHDL.

It seems to me that in your configuration file you could use both your packages and based on the configuration you want to use you may be able to specify the instance from a particular package. I believe that is what your requirement is?
 

Yes, thanks!

Can I use 'generic' for choosing what package to use inside of the architecture?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…