Академический Документы
Профессиональный Документы
Культура Документы
Package
It Provides a Convenient mechanism to Store and Share declarations that are common across many design units
It is used to hold VHDL code i.e of general use. Package can be Included in many other Source Files, which can then use Definitions provided In Package
PACKAGE
PACKAGE DECLARATION
Stores Set Of Common Declarations that can be Shared by many Design Units Library and use clause are used to access the items declared in package Declaration
Package Body is always associated with apackage declaration Stores definitions of Functions & Procedures Contains Behaviour of Subprograms or functions
Package Declaration
Syntax
package package_name is
[package declarations] [type declarations] [component declarations] end [package] [package_name]
component declaration Variable declaration subprogram Declarations type declarations subtype declaration constant declaration signal declaration attribute Declaration use clause
}
end ff; architecture df of ff is {
}
end df;
architecture df of ff is
{ } end df;
PACKAGE BODY
Syntax :
package body package_name is [package body item declarations] [subprogram bodies] [complete constant declarations] [type and subtype declaration] [use clause]
S1
S0
W0 W1 W2 W3 W4 W5 W6 W7
W8 W9 W10 W11
W12 W13 W14 W15
4:1 MUX
m(3)
S3 S2
4:1 MUX
University Questions
1. Discuss the usage of package body and package declaration with their syntax.(S-11 for 6M) 2. Explain the Concept of package and package body (W-04 for 4M) 3. What is Package Body and Package Header .Illustrate With Example. (S-06 for 5M) 4. How are packages used to encapsulate information that is to be shared among multiple design units? (W-06 For 4M)