Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generic Packages

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Does someone know how can I write a generic package (using the generic keyword) in order to pass an integer (for example) to the package upon usage? I know it's possible in Ada, but didn't find it in the books I have about VHDL...

thanks.
 
<<Does someone know how can I write a generic package (using the generic keyword) in order to pass an integer (for example) to the package upon usage? I know it's possible in Ada, but didn't find it in the books I have about VHDL>>
Packages do not have generics. Only entities may have generics. You can however, have deferred constants that are elaborated during the simulation of the design.
Deferred constants are not synthesizable.
----
Ben                 vhdlcohen@aol.com  Author of following textbooks:
* Component Design by Example ... a Step-by-Step Process Using
  VHDL with UART as Vehicle&quot;,  2001 isbn  0-9705394-0-1
* VHDL Coding Styles and Methodologies, 2nd Edition, 1999 isbn 0-7923-8474-1
* VHDL Answers to Frequently Asked Questions, 2nd Edition, isbn 0-7923-8115
--------------------------------------------------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top