SlideShare ist ein Scribd-Unternehmen logo
1 von 4
VHDL HIERARCHICAL MODELINNG
Dr.R.P.Rao
To incorporate hierarchy in VHDL we must add component declarations and component
instantiations to the model. In addition, we need to declare internal signals to
interconnect the components. We can also include processes and concurrent statements
in the hierarchical model.
Format for Architecture body (for internal signals & hierarchy):
architecture architecture_name of entity_name is
signal declarations -- for internal signals in model
component decalarations -- for hierarchical models
begin
:
component instantiations
processes
concurrent statements
:
end architecture architecture_name;
Format for component declaration:
component component_name is
generic (generic_name(s): type := initial_value;
:
generic_name(s): type := initial_value);
port (signal_name(s): mode signal_type;
:
signal_name(s): mode signal_type);
end component component_name;
Note that the component_name is the same as the entity_name from the model being
called up. As a result, component declarations look just like the entity statements
(including generics and ports) for the component being declared but with
“component” substituted for “entity”. (In fact, I usually copy the entity from the
component being declared and paste it in the component declaration and do a global
replacement of “component” for “entity”.)
The component instantiation is the actual call to a specific use of the model where a
single component declaration can have multiple instantiations. As a result, each
component instantiation must include a unique name (instantiation_label along with
the component (component_name) being used. Furthermore, the values assigned to
generics in the component instantiation will override any initial values assigned to
the generic in the entity statement or component declaration for that model
(important when a component is called multiple times with different generic values
assigned to each call). There are some other subtle variations (noted in red below) in
the format for a component instantiation compared to an entity or component
declaration. There are two methods (and formats) for connecting signals to the port
of the component: 1) named association (aka, keyword notation) and 2) positional
association (aka, positional notation).
VHDL HIERARCHICAL MODELINNG
Dr.R.P.Rao
Format for component instantiation (keyword notation):
instantiation_label: component_name
generic map (generic_name => value, -- note , at end & not ;
:
generic_name => value) -- note no ; at end
port map (port_name => signal_name, -- note , at end & not ;
:
port_name => signal_name);
Note that port_name is the actual signal_name from the component decalaration (which
is also the same as in the original entity statement). The signal_name given here is
the actual signal in the hierarchical design being connected to that particular
port_name. The order of the generics values and signal_names can be in any order
since each is associated to a unique generic or port by the => operator. The penalty
is more junk to type in the spirit of verbosity.
Format for component instantiation (positional notation):
instantiation_label: component_name
generic map (generic_value, -- note , at end and not ;
:
generic_value) -- note no ; at end
port map (signal_name, -- note , at end and not ;
:
signal_name);
Note that the generic_values and signal_names must appear in the order given in the
component declaration in order to connect to the correct generic_name or
port_name, respecitively. Finding the correct order is no big deal since it is given
above in the component declaration that must also be included in the model
(therefore, positional notation is my personal preference).
Components instantiations are treated as concurrent statements where the inputs to
component represent the sensitivity list such that the component model is evaluated
whenever there is an event on one of its inputs. Therefore, component instantiations
cannot be included in a process.
Note that a constant logic value (i.e., ‘0’ or ‘1’) can be assigned to an unused input in the
component instantiation which will allow most synthesis tools to minimize the logic
associated with the unused input (or feature of the model being instantiated). This
also applies to bit_vectors as well where a string of constant logic values can be
applied. This is a powerful capability when used in conjunction with parameterized
modeling by allowing even more use of a parameterized model.
For example, consider a rising edge triggered N-bit counter with active high synchronous
reset, active high preset, active high parallel load, and active high count enable (with
that order of precedence).
VHDL HIERARCHICAL MODELINNG
Dr.R.P.Rao
entity REG is
generic (N: int := 3);
port (CLK,RST,PRE,LOAD,CEN: in bit;
DATIN: in bit_vector (N-1 downto 0);
DOUT: buffer bit_vector (N-1 downto 0));
end entity REG;
architecture RTL of REG is
begin
process (CLK) begin
if (CLK’event and CLK=’1’) then
if (RST = ‘1’) then DOUT <= (others => ‘0’);
elsif (PRE = ‘1’) then DOUT <= (others => ‘1’);
elsif (LOAD = ‘1’) then DOUT <= DATIN;
elsif (CEN = ‘1’) then DOUT <= DOUT + 1;
end if;
end if;
end process;
end architecture RTL;
Next consider the 3 instances of REG in the following hierarchical use of this model:
entity TOP is
port (CLK,X,Y,Z: in bit;
DIN: in bit_vector(5 downto 0);
Q1: out bit_vector(5 downto 0);
Q2: out bit_vector(4 downto 0);
Q3: out bit_vector(3 downto 0));
end entity TOP;
architecture HIER of TOP is
component REG is
generic (N: int := 3);
port (CLK,RST,PRE,LOAD,CEN: in bit;
DATIN: in bit_vector (N-1 downto 0);
DOUT: buffer bit_vector (N-1 downto 0));
end component REG;
begin
R1: REG generic map (6)
port map (CLK,’0’,’0’,X,’0’,DIN,Q1);
R2: REG generic map (5)
port map (CLK,Y,’0’,’0’,Z,”00000”,Q2);
R3: REG generic map (4)
port map (CLK,’0’,’0’,’1’,’0’,DIN(3 downto 0),Q3);
end architecture HIER;
When we synthesize this circuit, R1 will be a 6-bit register with active high parallel load
signal (not reset, preset, or counter logic), R2 will be a 5 bit counter with active high
reset and active high count enable (no parallel load or preset logic), and R3 will
VHDL HIERARCHICAL MODELINNG
Dr.R.P.Rao
simply be 4 flip-flops without any features, as can be seen in the following synthesis
report from ISE8.2
Performing bidirectional port resolution...
Synthesizing Unit <REG_1>.
Found 6-bit register for signal <DOUT>.
Summary: inferred 6 D-type flip-flop(s).
Synthesizing Unit <REG_2>.
Found 5-bit up counter for signal <DOUT>.
Summary: inferred 1 Counter(s).
Synthesizing Unit <REG_3>.
Found 4-bit register for signal <DOUT>.
Summary: inferred 4 D-type flip-flop(s).
Synthesizing Unit <hier>.
HDL Synthesis Report
Macro Statistics
# Counters : 1
5-bit up counter : 1
# Registers : 2
4-bit register : 1
6-bit register : 1
Advanced HDL Synthesis Report
Macro Statistics
# Counters : 1
5-bit up counter : 1
# Registers : 10
Flip-Flops : 10
Final Register Report
Macro Statistics
# Registers : 15
Flip-Flops : 15
Device utilization summary:
Selected Device : 3s200pq208-5
Number of Slices: 3 out of 1920 0%
Number of Slice Flip Flops: 15 out of 3840 0%
Number of 4 input LUTs: 6 out of 3840 0%
Number of IOs: 25
Number of bonded IOBs: 25 out of 141 17%
IOB Flip Flops: 10
Number of GCLKs: 1 out of 8 12%
Note that only 3 slices and 6 LUTs were used (actually only 5 LUTs in that final design)
for the counter R2 – the other two registers only used flip-flops which already have
clock enable, reset, and preset capabilities (even though none of these features were
used in the case of R3). Otherwise, the design would have required 12 slices and 20
LUTs for implement the three full register designs.

Weitere ähnliche Inhalte

Was ist angesagt?

answer-model-qp-15-pcd13pcd
answer-model-qp-15-pcd13pcdanswer-model-qp-15-pcd13pcd
answer-model-qp-15-pcd13pcdSyed Mustafa
 
Pointers and call by value, reference, address in C
Pointers and call by value, reference, address in CPointers and call by value, reference, address in C
Pointers and call by value, reference, address in CSyed Mustafa
 
Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014Béo Tú
 
User defined functions in C programmig
User defined functions in C programmigUser defined functions in C programmig
User defined functions in C programmigAppili Vamsi Krishna
 
FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM)
 FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM) FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM)
FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM)Mansi Tyagi
 
VHDL- gate level modelling
VHDL- gate level modellingVHDL- gate level modelling
VHDL- gate level modellingVandanaPagar1
 
Notes: Verilog Part 4- Behavioural Modelling
Notes: Verilog Part 4- Behavioural ModellingNotes: Verilog Part 4- Behavioural Modelling
Notes: Verilog Part 4- Behavioural ModellingJay Baxi
 
Recursive Function
Recursive FunctionRecursive Function
Recursive FunctionHarsh Pathak
 
Prsentation on functions
Prsentation on functionsPrsentation on functions
Prsentation on functionsAlisha Korpal
 
Verilog Lecture4 2014
Verilog Lecture4 2014Verilog Lecture4 2014
Verilog Lecture4 2014Béo Tú
 
Notes: Verilog Part 1 - Overview - Hierarchical Modeling Concepts - Basics
Notes: Verilog Part 1 - Overview - Hierarchical Modeling Concepts - BasicsNotes: Verilog Part 1 - Overview - Hierarchical Modeling Concepts - Basics
Notes: Verilog Part 1 - Overview - Hierarchical Modeling Concepts - BasicsJay Baxi
 
RECURSION IN C
RECURSION IN C RECURSION IN C
RECURSION IN C v_jk
 
Principle source of optimazation
Principle source of optimazationPrinciple source of optimazation
Principle source of optimazationSiva Sathya
 

Was ist angesagt? (19)

answer-model-qp-15-pcd13pcd
answer-model-qp-15-pcd13pcdanswer-model-qp-15-pcd13pcd
answer-model-qp-15-pcd13pcd
 
VHDL- data types
VHDL- data typesVHDL- data types
VHDL- data types
 
Pointers and call by value, reference, address in C
Pointers and call by value, reference, address in CPointers and call by value, reference, address in C
Pointers and call by value, reference, address in C
 
Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014
 
User defined functions in C programmig
User defined functions in C programmigUser defined functions in C programmig
User defined functions in C programmig
 
FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM)
 FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM) FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM)
FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM)
 
VHDL- gate level modelling
VHDL- gate level modellingVHDL- gate level modelling
VHDL- gate level modelling
 
User defined functions
User defined functionsUser defined functions
User defined functions
 
Notes: Verilog Part 4- Behavioural Modelling
Notes: Verilog Part 4- Behavioural ModellingNotes: Verilog Part 4- Behavioural Modelling
Notes: Verilog Part 4- Behavioural Modelling
 
Functions in c
Functions in cFunctions in c
Functions in c
 
Recursive Function
Recursive FunctionRecursive Function
Recursive Function
 
Prsentation on functions
Prsentation on functionsPrsentation on functions
Prsentation on functions
 
Verilog Lecture4 2014
Verilog Lecture4 2014Verilog Lecture4 2014
Verilog Lecture4 2014
 
Recursion in c
Recursion in cRecursion in c
Recursion in c
 
Coding verilog
Coding verilogCoding verilog
Coding verilog
 
Notes: Verilog Part 1 - Overview - Hierarchical Modeling Concepts - Basics
Notes: Verilog Part 1 - Overview - Hierarchical Modeling Concepts - BasicsNotes: Verilog Part 1 - Overview - Hierarchical Modeling Concepts - Basics
Notes: Verilog Part 1 - Overview - Hierarchical Modeling Concepts - Basics
 
C functions
C functionsC functions
C functions
 
RECURSION IN C
RECURSION IN C RECURSION IN C
RECURSION IN C
 
Principle source of optimazation
Principle source of optimazationPrinciple source of optimazation
Principle source of optimazation
 

Ähnlich wie Hd6

INTRODUCTION TO VHDL
INTRODUCTION    TO    VHDLINTRODUCTION    TO    VHDL
INTRODUCTION TO VHDLkarthikpunuru
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introductionashokqis
 
VHDL Subprograms and Packages
VHDL Subprograms and PackagesVHDL Subprograms and Packages
VHDL Subprograms and PackagesRamasubbu .P
 
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...Khushboo Jain
 
06 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa1606 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa16John Todora
 
vlsi introduction to hdl and its typesunit-1.pptx
vlsi introduction to hdl and its typesunit-1.pptxvlsi introduction to hdl and its typesunit-1.pptx
vlsi introduction to hdl and its typesunit-1.pptxiconicyt2
 
Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation finalAnkur Gupta
 
Verilog Final Probe'22.pptx
Verilog Final Probe'22.pptxVerilog Final Probe'22.pptx
Verilog Final Probe'22.pptxSyedAzim6
 
VHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDLVHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDLRevathi Subramaniam
 
Basic Coding In VHDL COding
Basic Coding In VHDL COdingBasic Coding In VHDL COding
Basic Coding In VHDL COdinganna university
 
A Verilog HDL Test Bench Primer
A Verilog HDL Test Bench PrimerA Verilog HDL Test Bench Primer
A Verilog HDL Test Bench PrimerNicole Heredia
 
Introduction to C Language - Version 1.0 by Mark John Lado
Introduction to C Language - Version 1.0 by Mark John LadoIntroduction to C Language - Version 1.0 by Mark John Lado
Introduction to C Language - Version 1.0 by Mark John LadoMark John Lado, MIT
 
Building Hierarchy
Building HierarchyBuilding Hierarchy
Building HierarchyMohamed Samy
 

Ähnlich wie Hd6 (20)

INTRODUCTION TO VHDL
INTRODUCTION    TO    VHDLINTRODUCTION    TO    VHDL
INTRODUCTION TO VHDL
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
VHDL Subprograms and Packages
VHDL Subprograms and PackagesVHDL Subprograms and Packages
VHDL Subprograms and Packages
 
DSD
DSDDSD
DSD
 
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
 
VHDL
VHDLVHDL
VHDL
 
06 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa1606 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa16
 
vlsi introduction to hdl and its typesunit-1.pptx
vlsi introduction to hdl and its typesunit-1.pptxvlsi introduction to hdl and its typesunit-1.pptx
vlsi introduction to hdl and its typesunit-1.pptx
 
Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation final
 
Verilog Final Probe'22.pptx
Verilog Final Probe'22.pptxVerilog Final Probe'22.pptx
Verilog Final Probe'22.pptx
 
VHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDLVHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDL
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
Basic Coding In VHDL COding
Basic Coding In VHDL COdingBasic Coding In VHDL COding
Basic Coding In VHDL COding
 
Ddhdl 17
Ddhdl 17Ddhdl 17
Ddhdl 17
 
A Verilog HDL Test Bench Primer
A Verilog HDL Test Bench PrimerA Verilog HDL Test Bench Primer
A Verilog HDL Test Bench Primer
 
Verilog
VerilogVerilog
Verilog
 
Introduction to C Language - Version 1.0 by Mark John Lado
Introduction to C Language - Version 1.0 by Mark John LadoIntroduction to C Language - Version 1.0 by Mark John Lado
Introduction to C Language - Version 1.0 by Mark John Lado
 
Building Hierarchy
Building HierarchyBuilding Hierarchy
Building Hierarchy
 
C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
 
Crash course in verilog
Crash course in verilogCrash course in verilog
Crash course in verilog
 

Mehr von Prakash Rao (20)

PAL
PALPAL
PAL
 
Digital Signal Processing by Dr. R. Prakash Rao
Digital Signal Processing by Dr. R. Prakash Rao Digital Signal Processing by Dr. R. Prakash Rao
Digital Signal Processing by Dr. R. Prakash Rao
 
Electromagnetic Theory and Transmission Lines by Dr. R. Prakash Rao
Electromagnetic Theory and Transmission Lines  by Dr. R. Prakash RaoElectromagnetic Theory and Transmission Lines  by Dr. R. Prakash Rao
Electromagnetic Theory and Transmission Lines by Dr. R. Prakash Rao
 
VLSI15
VLSI15VLSI15
VLSI15
 
VLSI14
VLSI14VLSI14
VLSI14
 
VLSI13
VLSI13VLSI13
VLSI13
 
VLSI12
VLSI12VLSI12
VLSI12
 
VLSI11
VLSI11VLSI11
VLSI11
 
VLSI9
VLSI9VLSI9
VLSI9
 
VLSI8
VLSI8VLSI8
VLSI8
 
VLSI7
VLSI7VLSI7
VLSI7
 
VLSI6
VLSI6VLSI6
VLSI6
 
VLSI5
VLSI5VLSI5
VLSI5
 
VLSI4
VLSI4VLSI4
VLSI4
 
VLSI3
VLSI3VLSI3
VLSI3
 
VLSI2
VLSI2VLSI2
VLSI2
 
VLSI DESIGN
VLSI DESIGN VLSI DESIGN
VLSI DESIGN
 
VLSI10
VLSI10VLSI10
VLSI10
 
Fet
FetFet
Fet
 
BIASING OF BJT
BIASING OF BJT BIASING OF BJT
BIASING OF BJT
 

Kürzlich hochgeladen

(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 

Kürzlich hochgeladen (20)

(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 

Hd6

  • 1. VHDL HIERARCHICAL MODELINNG Dr.R.P.Rao To incorporate hierarchy in VHDL we must add component declarations and component instantiations to the model. In addition, we need to declare internal signals to interconnect the components. We can also include processes and concurrent statements in the hierarchical model. Format for Architecture body (for internal signals & hierarchy): architecture architecture_name of entity_name is signal declarations -- for internal signals in model component decalarations -- for hierarchical models begin : component instantiations processes concurrent statements : end architecture architecture_name; Format for component declaration: component component_name is generic (generic_name(s): type := initial_value; : generic_name(s): type := initial_value); port (signal_name(s): mode signal_type; : signal_name(s): mode signal_type); end component component_name; Note that the component_name is the same as the entity_name from the model being called up. As a result, component declarations look just like the entity statements (including generics and ports) for the component being declared but with “component” substituted for “entity”. (In fact, I usually copy the entity from the component being declared and paste it in the component declaration and do a global replacement of “component” for “entity”.) The component instantiation is the actual call to a specific use of the model where a single component declaration can have multiple instantiations. As a result, each component instantiation must include a unique name (instantiation_label along with the component (component_name) being used. Furthermore, the values assigned to generics in the component instantiation will override any initial values assigned to the generic in the entity statement or component declaration for that model (important when a component is called multiple times with different generic values assigned to each call). There are some other subtle variations (noted in red below) in the format for a component instantiation compared to an entity or component declaration. There are two methods (and formats) for connecting signals to the port of the component: 1) named association (aka, keyword notation) and 2) positional association (aka, positional notation).
  • 2. VHDL HIERARCHICAL MODELINNG Dr.R.P.Rao Format for component instantiation (keyword notation): instantiation_label: component_name generic map (generic_name => value, -- note , at end & not ; : generic_name => value) -- note no ; at end port map (port_name => signal_name, -- note , at end & not ; : port_name => signal_name); Note that port_name is the actual signal_name from the component decalaration (which is also the same as in the original entity statement). The signal_name given here is the actual signal in the hierarchical design being connected to that particular port_name. The order of the generics values and signal_names can be in any order since each is associated to a unique generic or port by the => operator. The penalty is more junk to type in the spirit of verbosity. Format for component instantiation (positional notation): instantiation_label: component_name generic map (generic_value, -- note , at end and not ; : generic_value) -- note no ; at end port map (signal_name, -- note , at end and not ; : signal_name); Note that the generic_values and signal_names must appear in the order given in the component declaration in order to connect to the correct generic_name or port_name, respecitively. Finding the correct order is no big deal since it is given above in the component declaration that must also be included in the model (therefore, positional notation is my personal preference). Components instantiations are treated as concurrent statements where the inputs to component represent the sensitivity list such that the component model is evaluated whenever there is an event on one of its inputs. Therefore, component instantiations cannot be included in a process. Note that a constant logic value (i.e., ‘0’ or ‘1’) can be assigned to an unused input in the component instantiation which will allow most synthesis tools to minimize the logic associated with the unused input (or feature of the model being instantiated). This also applies to bit_vectors as well where a string of constant logic values can be applied. This is a powerful capability when used in conjunction with parameterized modeling by allowing even more use of a parameterized model. For example, consider a rising edge triggered N-bit counter with active high synchronous reset, active high preset, active high parallel load, and active high count enable (with that order of precedence).
  • 3. VHDL HIERARCHICAL MODELINNG Dr.R.P.Rao entity REG is generic (N: int := 3); port (CLK,RST,PRE,LOAD,CEN: in bit; DATIN: in bit_vector (N-1 downto 0); DOUT: buffer bit_vector (N-1 downto 0)); end entity REG; architecture RTL of REG is begin process (CLK) begin if (CLK’event and CLK=’1’) then if (RST = ‘1’) then DOUT <= (others => ‘0’); elsif (PRE = ‘1’) then DOUT <= (others => ‘1’); elsif (LOAD = ‘1’) then DOUT <= DATIN; elsif (CEN = ‘1’) then DOUT <= DOUT + 1; end if; end if; end process; end architecture RTL; Next consider the 3 instances of REG in the following hierarchical use of this model: entity TOP is port (CLK,X,Y,Z: in bit; DIN: in bit_vector(5 downto 0); Q1: out bit_vector(5 downto 0); Q2: out bit_vector(4 downto 0); Q3: out bit_vector(3 downto 0)); end entity TOP; architecture HIER of TOP is component REG is generic (N: int := 3); port (CLK,RST,PRE,LOAD,CEN: in bit; DATIN: in bit_vector (N-1 downto 0); DOUT: buffer bit_vector (N-1 downto 0)); end component REG; begin R1: REG generic map (6) port map (CLK,’0’,’0’,X,’0’,DIN,Q1); R2: REG generic map (5) port map (CLK,Y,’0’,’0’,Z,”00000”,Q2); R3: REG generic map (4) port map (CLK,’0’,’0’,’1’,’0’,DIN(3 downto 0),Q3); end architecture HIER; When we synthesize this circuit, R1 will be a 6-bit register with active high parallel load signal (not reset, preset, or counter logic), R2 will be a 5 bit counter with active high reset and active high count enable (no parallel load or preset logic), and R3 will
  • 4. VHDL HIERARCHICAL MODELINNG Dr.R.P.Rao simply be 4 flip-flops without any features, as can be seen in the following synthesis report from ISE8.2 Performing bidirectional port resolution... Synthesizing Unit <REG_1>. Found 6-bit register for signal <DOUT>. Summary: inferred 6 D-type flip-flop(s). Synthesizing Unit <REG_2>. Found 5-bit up counter for signal <DOUT>. Summary: inferred 1 Counter(s). Synthesizing Unit <REG_3>. Found 4-bit register for signal <DOUT>. Summary: inferred 4 D-type flip-flop(s). Synthesizing Unit <hier>. HDL Synthesis Report Macro Statistics # Counters : 1 5-bit up counter : 1 # Registers : 2 4-bit register : 1 6-bit register : 1 Advanced HDL Synthesis Report Macro Statistics # Counters : 1 5-bit up counter : 1 # Registers : 10 Flip-Flops : 10 Final Register Report Macro Statistics # Registers : 15 Flip-Flops : 15 Device utilization summary: Selected Device : 3s200pq208-5 Number of Slices: 3 out of 1920 0% Number of Slice Flip Flops: 15 out of 3840 0% Number of 4 input LUTs: 6 out of 3840 0% Number of IOs: 25 Number of bonded IOBs: 25 out of 141 17% IOB Flip Flops: 10 Number of GCLKs: 1 out of 8 12% Note that only 3 slices and 6 LUTs were used (actually only 5 LUTs in that final design) for the counter R2 – the other two registers only used flip-flops which already have clock enable, reset, and preset capabilities (even though none of these features were used in the case of R3). Otherwise, the design would have required 12 slices and 20 LUTs for implement the three full register designs.