SlideShare a Scribd company logo
Computer Hardware

Introduction to VHDL
Parham Alvani
Amirhossein Sohrabbeig
VHDL, Why ? How ?
Amirkabir
University of Technology
Computer & InformationTechnology
Engineering Department
RTL
• Data/Control
• Data
• Control
Outline
VHDL
• History
• Elements
RTL
Control/Data Partitioning
• First step in RT level design.
• Data part consists of data components and the bussing structure of
the design
• Control part is a usually a state machine generating control signals
• Control signals control the flow of data in the data part
Control/Data Partitioning
Data Part
• Interconnection of data components
– Registers
– Combinational logic units
– Register files
– Busses (that interconnect them)
Control Part
• Takes control inputs from the data part and external control inputs
• Makes decisions as to when and what control signals to issues
• Consists of one or more state machines that keep the state of circuit
• Makes decisions based on
– Current data + current status (Mealy)
– Current status (Moore)
VHDL
History of VHDL
• VHSIC Hardware Description Language
• VHSIC (Very High Speed Integrated Circuit) was a 1980s U.S.
government program.
• Based on ADA
How to use VHDL ?
• ModelSim
– Closed Source ☹
– https://www.mentor.com/products/fpga/model/
• GHDL
– Open Source ☺
– http://ghdl.free.fr/
– https://github.com/tgingold/ghdl
VHDL Structural Elements
• Entity
– Interface
• Architecture
– Implementation, behavior
• Configuration
– Structure, hierarchy
• Process
– Sequential Execution
• Package
– Components (Modular design), Utilities (data types,
constants, subprograms)
• Library
– Group of compiled units, object code
Entity
• Interface description
• No behavior/implementation definition
• Linking via port signals
– data types
– signal width
– signal direction
entity HALFADDER is

port(

A,B: in bit;

SUM, CARRY: out bit
);

end entity HALFADDER;

entity ADDER is

port(

A,B: in integer range 15 to 0;

SUM: out integer range 15 to 0;

CARRY: out bit
);

end ADDER;
Entity Port Modes
• in
– signal values are read-only
• out
– signal values are write-only
– multiple drivers
• buffer:
– similar to out
– signal values may be read from inside
– only 1 driver
• inout:
– bidirectional port
• Output port modes have to match
Architecture
• Implementation of the design
• Always connected with a specific entity
– one entity can have several architectures
– entity ports are available as signals within the architecture
• Contains concurrent statements
entity HALFADDER is

port(

A, B: in bit;

SUM, CARRY: out bit
);

end HALFADDER;



architecture RTL of HALFADDER is

begin

SUM <= A xor B;

CARRY <= A and B;

end architecture RTL;
Structural Model
Component Declaration
• In declarative part of architecture
– Can use any name for the components
• but better to use the same as entity name
Component Declaration
entity FULLADDER is

port (A,B, CARRY_IN: in bit;

SUM, CARRY: out bit);

end FULLADDER;



architecture STRUCT of FULLADDER is

component HALFADDER

port (X, Y : in bit;

SUM, CARRY : out bit);

end component;


component ORGATE

port (X, Y : in bit;

RES : out bit);

end component;

signal W_SUM, W_CARRY1, W_CARRY2 :
bit;
begin
. . .
entity HALFADDER is

port(X, Y: in bit;

SUM, CARRY: out bit);

end entity HALFADDER;
entity ORGATE is

port(X, Y: in bit;

RES: out bit);

end entity ORGATE;
Component Instantiation
• May need many of each
• Instantiation in statement part of architecture (after 'begin')
• Wires signals together:
– default: positional association
Component Instantiation
architecture STRUCT of FULLADDER is

component HALFADDER

port (X, Y : in bit;

SUM, CARRY : out bit);

end component;

component ORGATE

port (X, Y : in bit;

RES : out bit);

end component;

signal W_SUM, W_CARRY1, W_CARRY2: bit;

begin

MODULE1: HALFADDER

port map( A, B, W_SUM, W_CARRY1 );



MODULE2: HALFADDER

port map ( W_SUM, CARRY_IN, SUM, W_CARRY2 );



MODULE3: ORGATE

port map ( W_CARRY2, W_CARRY1, CARRY );
end STRUCT;
Component Instantiation
• Named association:
– left side: "formals"

(port names from component
declaration)
– right side: "actuals"

(architecture signals)
• Independent of order in
component declaration
entity FULLADDER is

port (A,B, CARRY_IN: in bit;

SUM, CARRY: out bit);

end FULLADDER;



architecture STRUCT of FULLADDER is

component HALFADDER

port (X, Y : in bit;

SUM, CARRY : out bit);

end component;

. . .

signal W_SUM, W_CARRY1, W_CARRY2 :
bit;

begin

MODULE1: HALFADDER

port map (X => A,

SUM => W_SUM, 

Y => B,

CARRY => W_CARRY1);

. . .

end STRUCT;
References
• Zainalabedin Navabi, “Verilog Digital System Design”, 2th edition.
• Zainalabedin Navabi, “VHDL modular Design and Synthesis of cores and
Systems”, 3th edition.
• Morteza Saheb Zamani, FPGA course slides, Spring 2016.
Parham Alvani
Amirhossein Sohrabbeig
Thank you !
Any Questions ?

More Related Content

PDF
Combinational Circuits
PPTX
Introduction to VHDL
PDF
Introduction to FPGA, VHDL
PPTX
Vhdl basic unit-2
PPTX
Basics of Vhdl
PDF
Basic structures in vhdl
PPTX
How to design Programs using VHDL
Combinational Circuits
Introduction to VHDL
Introduction to FPGA, VHDL
Vhdl basic unit-2
Basics of Vhdl
Basic structures in vhdl
How to design Programs using VHDL

What's hot (20)

PDF
Verilog HDL Training Course
PPT
Spdas2 vlsibput
PPT
PPTX
Vhdl programming
PPTX
Modules and ports in Verilog HDL
DOCX
VHDL CODES
PPTX
programmable logic array
ODP
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
PPTX
Verilog
DOCX
PPT
Lecture2 vhdl refresher
PPTX
Hardware Description Language
PPT
Programmable array logic
PPTX
Flash memory
PPTX
Verilog presentation final
PDF
VHDL Practical Exam Guide
PPT
Verilog tutorial
DOCX
e CAD lab manual
PDF
PLD's
DOCX
Vhdl code and project report of arithmetic and logic unit
Verilog HDL Training Course
Spdas2 vlsibput
Vhdl programming
Modules and ports in Verilog HDL
VHDL CODES
programmable logic array
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
Verilog
Lecture2 vhdl refresher
Hardware Description Language
Programmable array logic
Flash memory
Verilog presentation final
VHDL Practical Exam Guide
Verilog tutorial
e CAD lab manual
PLD's
Vhdl code and project report of arithmetic and logic unit
Ad

Viewers also liked (6)

PPTX
Graphene farzan
PDF
An introductiontoquantumcomputing
PDF
Virtual Memory
PDF
LEGO Reinventing (E-)Commerce (business model change)
PDF
Smart parking
Graphene farzan
An introductiontoquantumcomputing
Virtual Memory
LEGO Reinventing (E-)Commerce (business model change)
Smart parking
Ad

Similar to Introduction to VHDL (20)

PPTX
VHDL summer training (ppt)
PPTX
VHDL_VIKAS.pptx
PDF
Ddhdl 15
PPTX
FPGA implementation of synchronous and asynchronous counter and simulation of...
PPT
Introduction to VHDL language VHDL_Intro.ppt
PDF
Practical file
PDF
Introduction to VHDL
PPTX
L6_Slides_vhdl coures temporary hair dye for dark hair
PPTX
PPSX
Vhd lhigh2003
PDF
Fpga & VHDL
PPTX
Da3_on_FPGA_education_program_by_DIAT.pptx
PDF
Vhdl introduction
PPTX
vlsi introduction to hdl and its typesunit-1.pptx
PPTX
embedded systems and robotics on avr platform
PPTX
PPTX
Dica ii chapter slides
VHDL summer training (ppt)
VHDL_VIKAS.pptx
Ddhdl 15
FPGA implementation of synchronous and asynchronous counter and simulation of...
Introduction to VHDL language VHDL_Intro.ppt
Practical file
Introduction to VHDL
L6_Slides_vhdl coures temporary hair dye for dark hair
Vhd lhigh2003
Fpga & VHDL
Da3_on_FPGA_education_program_by_DIAT.pptx
Vhdl introduction
vlsi introduction to hdl and its typesunit-1.pptx
embedded systems and robotics on avr platform
Dica ii chapter slides

More from Farzan Dehbashi (10)

PPTX
afghanistan_history.pptx
PDF
Afghanistan
PPTX
Quantum computing
PDF
Sayeh extension(v23)
PDF
C compiler(final)
PDF
Sayeh basic computer
PDF
Tabobao Reinventing (E-)Commerce
PPTX
An intro to VHDL
PPTX
quantum computing
afghanistan_history.pptx
Afghanistan
Quantum computing
Sayeh extension(v23)
C compiler(final)
Sayeh basic computer
Tabobao Reinventing (E-)Commerce
An intro to VHDL
quantum computing

Recently uploaded (20)

PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PPTX
UNIT 4 Total Quality Management .pptx
PDF
composite construction of structures.pdf
PPT
Project quality management in manufacturing
PPTX
Current and future trends in Computer Vision.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPT
Mechanical Engineering MATERIALS Selection
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PDF
PPT on Performance Review to get promotions
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Construction Project Organization Group 2.pptx
DOCX
573137875-Attendance-Management-System-original
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
Well-logging-methods_new................
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
UNIT 4 Total Quality Management .pptx
composite construction of structures.pdf
Project quality management in manufacturing
Current and future trends in Computer Vision.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
Mechanical Engineering MATERIALS Selection
III.4.1.2_The_Space_Environment.p pdffdf
PPT on Performance Review to get promotions
Embodied AI: Ushering in the Next Era of Intelligent Systems
Construction Project Organization Group 2.pptx
573137875-Attendance-Management-System-original
R24 SURVEYING LAB MANUAL for civil enggi
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Automation-in-Manufacturing-Chapter-Introduction.pdf
CH1 Production IntroductoryConcepts.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Safety Seminar civil to be ensured for safe working.
Well-logging-methods_new................

Introduction to VHDL

  • 1. Computer Hardware
 Introduction to VHDL Parham Alvani Amirhossein Sohrabbeig VHDL, Why ? How ? Amirkabir University of Technology Computer & InformationTechnology Engineering Department
  • 2. RTL • Data/Control • Data • Control Outline VHDL • History • Elements
  • 3. RTL
  • 4. Control/Data Partitioning • First step in RT level design. • Data part consists of data components and the bussing structure of the design • Control part is a usually a state machine generating control signals • Control signals control the flow of data in the data part
  • 6. Data Part • Interconnection of data components – Registers – Combinational logic units – Register files – Busses (that interconnect them)
  • 7. Control Part • Takes control inputs from the data part and external control inputs • Makes decisions as to when and what control signals to issues • Consists of one or more state machines that keep the state of circuit • Makes decisions based on – Current data + current status (Mealy) – Current status (Moore)
  • 9. History of VHDL • VHSIC Hardware Description Language • VHSIC (Very High Speed Integrated Circuit) was a 1980s U.S. government program. • Based on ADA
  • 10. How to use VHDL ? • ModelSim – Closed Source ☹ – https://www.mentor.com/products/fpga/model/ • GHDL – Open Source ☺ – http://ghdl.free.fr/ – https://github.com/tgingold/ghdl
  • 11. VHDL Structural Elements • Entity – Interface • Architecture – Implementation, behavior • Configuration – Structure, hierarchy • Process – Sequential Execution • Package – Components (Modular design), Utilities (data types, constants, subprograms) • Library – Group of compiled units, object code
  • 12. Entity • Interface description • No behavior/implementation definition • Linking via port signals – data types – signal width – signal direction entity HALFADDER is
 port(
 A,B: in bit;
 SUM, CARRY: out bit );
 end entity HALFADDER;
 entity ADDER is
 port(
 A,B: in integer range 15 to 0;
 SUM: out integer range 15 to 0;
 CARRY: out bit );
 end ADDER;
  • 13. Entity Port Modes • in – signal values are read-only • out – signal values are write-only – multiple drivers • buffer: – similar to out – signal values may be read from inside – only 1 driver • inout: – bidirectional port • Output port modes have to match
  • 14. Architecture • Implementation of the design • Always connected with a specific entity – one entity can have several architectures – entity ports are available as signals within the architecture • Contains concurrent statements entity HALFADDER is
 port(
 A, B: in bit;
 SUM, CARRY: out bit );
 end HALFADDER;
 
 architecture RTL of HALFADDER is
 begin
 SUM <= A xor B;
 CARRY <= A and B;
 end architecture RTL;
  • 16. Component Declaration • In declarative part of architecture – Can use any name for the components • but better to use the same as entity name
  • 17. Component Declaration entity FULLADDER is
 port (A,B, CARRY_IN: in bit;
 SUM, CARRY: out bit);
 end FULLADDER;
 
 architecture STRUCT of FULLADDER is
 component HALFADDER
 port (X, Y : in bit;
 SUM, CARRY : out bit);
 end component; 
 component ORGATE
 port (X, Y : in bit;
 RES : out bit);
 end component;
 signal W_SUM, W_CARRY1, W_CARRY2 : bit; begin . . . entity HALFADDER is
 port(X, Y: in bit;
 SUM, CARRY: out bit);
 end entity HALFADDER; entity ORGATE is
 port(X, Y: in bit;
 RES: out bit);
 end entity ORGATE;
  • 18. Component Instantiation • May need many of each • Instantiation in statement part of architecture (after 'begin') • Wires signals together: – default: positional association
  • 19. Component Instantiation architecture STRUCT of FULLADDER is
 component HALFADDER
 port (X, Y : in bit;
 SUM, CARRY : out bit);
 end component;
 component ORGATE
 port (X, Y : in bit;
 RES : out bit);
 end component;
 signal W_SUM, W_CARRY1, W_CARRY2: bit;
 begin
 MODULE1: HALFADDER
 port map( A, B, W_SUM, W_CARRY1 );
 
 MODULE2: HALFADDER
 port map ( W_SUM, CARRY_IN, SUM, W_CARRY2 );
 
 MODULE3: ORGATE
 port map ( W_CARRY2, W_CARRY1, CARRY ); end STRUCT;
  • 20. Component Instantiation • Named association: – left side: "formals"
 (port names from component declaration) – right side: "actuals"
 (architecture signals) • Independent of order in component declaration entity FULLADDER is
 port (A,B, CARRY_IN: in bit;
 SUM, CARRY: out bit);
 end FULLADDER;
 
 architecture STRUCT of FULLADDER is
 component HALFADDER
 port (X, Y : in bit;
 SUM, CARRY : out bit);
 end component;
 . . .
 signal W_SUM, W_CARRY1, W_CARRY2 : bit;
 begin
 MODULE1: HALFADDER
 port map (X => A,
 SUM => W_SUM, 
 Y => B,
 CARRY => W_CARRY1);
 . . .
 end STRUCT;
  • 22. • Zainalabedin Navabi, “Verilog Digital System Design”, 2th edition. • Zainalabedin Navabi, “VHDL modular Design and Synthesis of cores and Systems”, 3th edition. • Morteza Saheb Zamani, FPGA course slides, Spring 2016.