Digital Logic Circuits: Unit V: VHDL

Declaration of Subprogram

VHDL

• VHDL distinguishes between a subprogram declaration and a corresponding subprogram body. The subprogram declaration contains only interface information, while the subprogram body contains :

Declaration of Subprogram

• VHDL distinguishes between a subprogram declaration and a corresponding subprogram body. The subprogram declaration contains only interface information, while the subprogram body contains :

- Interface information

- Local declarations

- Statements

• Subprograms may be declared / defined in any declarative part of a VHDL object. The actual definition of the behaviour may also be separated from the declaration, which is often the case when packages are split into package and package body. In such cases, the subprogram body may be described possibly in a package body and then, in the package declaration, the corresponding subprogram declaration is specified. The subprogram which is declared in a package may be used in all unit that reference this package. The syntax for subprogram declaration is :

subprogram-specification;

Examples of subprogram declaration are :

procedure calculate (A, B, C : in INTEGER;

OP : in OP_CODE;

Z : out INTEGER;

function add (a, b : in INTEGER) return INTEGER;

Review Question

1. Write a note on declaration of subprogram.


Digital Logic Circuits: Unit V: VHDL : Tag: : VHDL - Declaration of Subprogram


Digital Logic Circuits: Unit V: VHDL



Under Subject


Digital Logic Circuits

EE3302 3rd Semester EEE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation



Related Subjects


Probability and complex function

MA3303 3rd Semester EEE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation


Electromagnetic Theory

EE3301 3rd Semester EEE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation


Digital Logic Circuits

EE3302 3rd Semester EEE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation


Electron Devices and Circuits

EC3301 3rd Semester EEE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation


Electrical Machines I

EE3303 EM 1 3rd Semester EEE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation


C Programming and Data Structures

CS3353 3rd Semester EEE, ECE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation