SlideShare a Scribd company logo
Hardware Description Languages (HDLs)
• HDLs are similar to programming languages but not exactly the same.
• We utilize a programming language to build or create software, whereas we use a
hardware description language to describe or express the behavioral characteristics of
digital logic circuits.
• We utilize HDLs for designing processors, motherboards, CPUs (i.e., computer chips), as
well as various other digital circuitry.
• Three main HDLs are
1) VHDL
2) Verilog
3) SystemVerilog
VHDL
• VHDL stands for Very High Speed Integrated Circuit (VHSIC) Hardware Description
Language (VHDL).It works on RTL (Register Transfer Level). RTL design involves
describing the behavior of a design as the transfers that occur between registers every
clock cycle. VHDL is strongly typed but case insensitive language. It serves best for high
level and complex designs.
• VHDL program contains..
1) Entity: Describes the interface of our design 3)Port: Ports/Pins used by entity.
2) Architecture: Describes underlying functionality of Entity
*Single entity can have more than one architecture.
EXAMPLE: entity and2 is
port( a: in std_logic; b: in std_logic; c: out std_logic);
end and2;
architecture and2_a of and2 is
begin
c <= a and b;
end and2_a;
VHDL
• Data Types: This is a classification objects/items/data that defines the possible set of
values which the objects/items/data belonging to that type may assume.
1) Bit: 2) Integer: integer number from
-2,147,483,647 to + 2,147,483,647
(i.e. size is 32 bits)
Example
VARIABLE a: INTEGER;
Variable Assignment operator :=
a := ‘1346’;
3) Std_logic: It is the most common data type used to hold a single bit value or to hold
multiple bits if std_logic_vector is used.
Example
SIGNAL s1: std_logic := ‘0’;
etc..
VHDL
• Naming Conventions: Designed to make your code easier to read, understand, and
debug. By following these rules, it also makes it easier for others to understand your
code.
• Enitities, Architectures, Functions Naming conventions:
Names should describe, in some way, what the block of code does
Names should be lowercase and use underscores to separate words
Entities should have unique names. Architecture need not have unique names as they
are linked to entities, but should have a name resembling their entity (eg. 'entity_arch’
or 'entity_rtl')
• Signal Naming Conventions
Use '<signal_name>_addr' for addresses and '<signal_name>_clk' for clocks
For active-low signals, using '<signal_name>_l' is preferred
VHDL
• Operators:
1) Arithmetic operators: +, -, *, /, not, etc. 4) Logical operators:
2) Shift operators:
3) Relational operators:
sll Shift left logical
srl Shift right logical
sla Shift left arithmetic
sra Shift right arithmetic
etc.
= Test for equality
/= Test for inequality
<= Test for less than or equal & assignment operator
(*to assign values to a variable)
>= Test for greater than or equal
< Test for less than
> Test for greater than
and Logical and
or Logical or
nand Logical complement of and
nor Logical complement of or
xor logical exclusive of or
xnor logical complement of exclusive of or
VHDL modelling styles
• 1. Data flow modeling (Design Equations)
Data flow modeling can be described based on the Boolean expression. It shows how the
data flows from input to output. It works on Concurrent execution.
• 2. Behavioral modeling (Explains Behaviour)
Behavioral modeling is used to execute statements sequentially. It shows that how the
system performs according to the current statement.
Behavioral modeling may contain Process statements, Sequential statements, Signal
assignment statements, and wait statements.
• 3. Structural modeling (Connection of sub modules)
Structural modeling is used to specify the functionality and structure of the circuit.
Structural modeling contain signal declarations, component instances, and port maps in
component instance.
VHDL behavioural modelling example
Bottom testing loop
• Loops implemented with the test at the bottom (a do loop) are called bottom-driven
loops.
• do while is a bottom tested loop.
do {….
………
………}
While(____)
Verilog
• Verilog stands for Verification and Logic.
• It works on RTL (Register Transfer Level). RTL design involves describing the behavior of
a design as the transfers that occur between registers every clock cycle.
• Verilog is loosely typed language (i.e., data types can be used in a mix and match way)
but case sensitive language. It serves better for low level and simple designs.
• Verilog can be used to describe designs at four levels of abstraction:
(i) Algorithmic level (much like c code with if, case and loop statements).
(ii) Register transfer level (RTL uses registers connected by Boolean equations).
(iii) Gate level (interconnected AND, NOR etc.).
(iv) Switch level (the switches are MOS transistors inside gates).
Verilog
• Data Types: This is a classification objects/items/data that defines the possible set of values
which the objects/items/data belonging to that type may assume.
1) Value set for data types 2) Integer: integer number from
-2,147,483,647 to + 2,147,483,647
(i.e. size is 32 bits)
Example
integer a;
assign a=63;
3) wire: It represents a physical wire in a circuit, so it can be read but can’t be assigned.
Example
wire c;
4) reg: Register data type is used to create a variable, representing register/registers.
Example
reg a; // single 1-bit register variable
reg [7:0] b, c; // two 8-bit register variables
5) Input, Output:
input a; // a is an input variable
output b, c; // b and c are output variables
Verilog
• Naming Conventions: Designed to make your code easier to read, understand, and
debug. By following these rules, it also makes it easier for others to understand your
code.
• Input naming convention:
input i_Clock;
• Output naming convention:
output o_Data;
• Register naming convention:
Reg r_Data;
Verilog
• Operators:
1) Arithmetic operators: +, -, *, /, etc. 4) Logical operators:
2) Shift operators:
3) Relational operators:
<< Shift left
>> Shift right
== Test for equality
!= Test for inequality
<= Test for less than or equal
>= Test for greater than or equal
< Test for less than
> Test for greater than
&& Logical and
|| Logical or
! Logical not

More Related Content

Similar to DLD5.pdf

vhdlTutorial.ppt . digital principal and computer design
vhdlTutorial.ppt . digital principal and computer designvhdlTutorial.ppt . digital principal and computer design
vhdlTutorial.ppt . digital principal and computer design
keerthikagovindasamy
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
Arshit Rai
 
UNIT-I.pptx of subject in engineering bla bla bla
UNIT-I.pptx of subject in engineering bla bla blaUNIT-I.pptx of subject in engineering bla bla bla
UNIT-I.pptx of subject in engineering bla bla bla
SEN150VAIBHAVWAKHARE
 
Vhdl new
Vhdl newVhdl new
Vhdl 1 ppg
Vhdl 1 ppgVhdl 1 ppg
Vhdl 1 ppg
Akshay Nagpurkar
 
Vhdl
VhdlVhdl
Verilog
VerilogVerilog
Verilog
abkvlsi
 
VHDL-PRESENTATION.ppt
VHDL-PRESENTATION.pptVHDL-PRESENTATION.ppt
VHDL-PRESENTATION.ppt
Dr.YNM
 
Wi Fi documantation
Wi Fi documantationWi Fi documantation
Wi Fi documantation
vijaykumar vodnala
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
Dhaval Shukla
 
Vlsi(2)
Vlsi(2)Vlsi(2)
Vlsi(2)
Rritu Bhagat
 
Verilog
VerilogVerilog
Verilog
Mohamed Rayan
 
Prilimanary Concepts of VHDL by Dr.R.Prakash Rao
Prilimanary Concepts of VHDL by    Dr.R.Prakash RaoPrilimanary Concepts of VHDL by    Dr.R.Prakash Rao
Prilimanary Concepts of VHDL by Dr.R.Prakash Rao
rachurivlsi
 
Expo de digitales (2)
Expo de digitales (2)Expo de digitales (2)
Expo de digitales (2)
Carlos Eduardo Torres
 
Spdas2 vlsibput
Spdas2 vlsibputSpdas2 vlsibput
Spdas2 vlsibput
GIET,Bhubaneswar
 
Ece iv-fundamentals of hdl [10 ec45]-notes
Ece iv-fundamentals of hdl [10 ec45]-notesEce iv-fundamentals of hdl [10 ec45]-notes
Ece iv-fundamentals of hdl [10 ec45]-notes
siddu kadiwal
 
Lecture2 vhdl refresher
Lecture2 vhdl refresherLecture2 vhdl refresher
Lecture2 vhdl refresher
Nima Shafiee
 
Vhdl
VhdlVhdl
DOUBLE PRECISION FLOATING POINT CORE IN VERILOG
DOUBLE PRECISION FLOATING POINT CORE IN VERILOGDOUBLE PRECISION FLOATING POINT CORE IN VERILOG
DOUBLE PRECISION FLOATING POINT CORE IN VERILOG
IJCI JOURNAL
 
hardware description language power point presentation
hardware description language power point presentationhardware description language power point presentation
hardware description language power point presentation
dhananjeyanrece
 

Similar to DLD5.pdf (20)

vhdlTutorial.ppt . digital principal and computer design
vhdlTutorial.ppt . digital principal and computer designvhdlTutorial.ppt . digital principal and computer design
vhdlTutorial.ppt . digital principal and computer design
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
UNIT-I.pptx of subject in engineering bla bla bla
UNIT-I.pptx of subject in engineering bla bla blaUNIT-I.pptx of subject in engineering bla bla bla
UNIT-I.pptx of subject in engineering bla bla bla
 
Vhdl new
Vhdl newVhdl new
Vhdl new
 
Vhdl 1 ppg
Vhdl 1 ppgVhdl 1 ppg
Vhdl 1 ppg
 
Vhdl
VhdlVhdl
Vhdl
 
Verilog
VerilogVerilog
Verilog
 
VHDL-PRESENTATION.ppt
VHDL-PRESENTATION.pptVHDL-PRESENTATION.ppt
VHDL-PRESENTATION.ppt
 
Wi Fi documantation
Wi Fi documantationWi Fi documantation
Wi Fi documantation
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
Vlsi(2)
Vlsi(2)Vlsi(2)
Vlsi(2)
 
Verilog
VerilogVerilog
Verilog
 
Prilimanary Concepts of VHDL by Dr.R.Prakash Rao
Prilimanary Concepts of VHDL by    Dr.R.Prakash RaoPrilimanary Concepts of VHDL by    Dr.R.Prakash Rao
Prilimanary Concepts of VHDL by Dr.R.Prakash Rao
 
Expo de digitales (2)
Expo de digitales (2)Expo de digitales (2)
Expo de digitales (2)
 
Spdas2 vlsibput
Spdas2 vlsibputSpdas2 vlsibput
Spdas2 vlsibput
 
Ece iv-fundamentals of hdl [10 ec45]-notes
Ece iv-fundamentals of hdl [10 ec45]-notesEce iv-fundamentals of hdl [10 ec45]-notes
Ece iv-fundamentals of hdl [10 ec45]-notes
 
Lecture2 vhdl refresher
Lecture2 vhdl refresherLecture2 vhdl refresher
Lecture2 vhdl refresher
 
Vhdl
VhdlVhdl
Vhdl
 
DOUBLE PRECISION FLOATING POINT CORE IN VERILOG
DOUBLE PRECISION FLOATING POINT CORE IN VERILOGDOUBLE PRECISION FLOATING POINT CORE IN VERILOG
DOUBLE PRECISION FLOATING POINT CORE IN VERILOG
 
hardware description language power point presentation
hardware description language power point presentationhardware description language power point presentation
hardware description language power point presentation
 

Recently uploaded

International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
HODECEDSIET
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
zubairahmad848137
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 

Recently uploaded (20)

International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 

DLD5.pdf

  • 1. Hardware Description Languages (HDLs) • HDLs are similar to programming languages but not exactly the same. • We utilize a programming language to build or create software, whereas we use a hardware description language to describe or express the behavioral characteristics of digital logic circuits. • We utilize HDLs for designing processors, motherboards, CPUs (i.e., computer chips), as well as various other digital circuitry. • Three main HDLs are 1) VHDL 2) Verilog 3) SystemVerilog
  • 2. VHDL • VHDL stands for Very High Speed Integrated Circuit (VHSIC) Hardware Description Language (VHDL).It works on RTL (Register Transfer Level). RTL design involves describing the behavior of a design as the transfers that occur between registers every clock cycle. VHDL is strongly typed but case insensitive language. It serves best for high level and complex designs. • VHDL program contains.. 1) Entity: Describes the interface of our design 3)Port: Ports/Pins used by entity. 2) Architecture: Describes underlying functionality of Entity *Single entity can have more than one architecture. EXAMPLE: entity and2 is port( a: in std_logic; b: in std_logic; c: out std_logic); end and2; architecture and2_a of and2 is begin c <= a and b; end and2_a;
  • 3. VHDL • Data Types: This is a classification objects/items/data that defines the possible set of values which the objects/items/data belonging to that type may assume. 1) Bit: 2) Integer: integer number from -2,147,483,647 to + 2,147,483,647 (i.e. size is 32 bits) Example VARIABLE a: INTEGER; Variable Assignment operator := a := ‘1346’; 3) Std_logic: It is the most common data type used to hold a single bit value or to hold multiple bits if std_logic_vector is used. Example SIGNAL s1: std_logic := ‘0’; etc..
  • 4. VHDL • Naming Conventions: Designed to make your code easier to read, understand, and debug. By following these rules, it also makes it easier for others to understand your code. • Enitities, Architectures, Functions Naming conventions: Names should describe, in some way, what the block of code does Names should be lowercase and use underscores to separate words Entities should have unique names. Architecture need not have unique names as they are linked to entities, but should have a name resembling their entity (eg. 'entity_arch’ or 'entity_rtl') • Signal Naming Conventions Use '<signal_name>_addr' for addresses and '<signal_name>_clk' for clocks For active-low signals, using '<signal_name>_l' is preferred
  • 5. VHDL • Operators: 1) Arithmetic operators: +, -, *, /, not, etc. 4) Logical operators: 2) Shift operators: 3) Relational operators: sll Shift left logical srl Shift right logical sla Shift left arithmetic sra Shift right arithmetic etc. = Test for equality /= Test for inequality <= Test for less than or equal & assignment operator (*to assign values to a variable) >= Test for greater than or equal < Test for less than > Test for greater than and Logical and or Logical or nand Logical complement of and nor Logical complement of or xor logical exclusive of or xnor logical complement of exclusive of or
  • 6. VHDL modelling styles • 1. Data flow modeling (Design Equations) Data flow modeling can be described based on the Boolean expression. It shows how the data flows from input to output. It works on Concurrent execution. • 2. Behavioral modeling (Explains Behaviour) Behavioral modeling is used to execute statements sequentially. It shows that how the system performs according to the current statement. Behavioral modeling may contain Process statements, Sequential statements, Signal assignment statements, and wait statements. • 3. Structural modeling (Connection of sub modules) Structural modeling is used to specify the functionality and structure of the circuit. Structural modeling contain signal declarations, component instances, and port maps in component instance.
  • 8. Bottom testing loop • Loops implemented with the test at the bottom (a do loop) are called bottom-driven loops. • do while is a bottom tested loop. do {…. ……… ………} While(____)
  • 9. Verilog • Verilog stands for Verification and Logic. • It works on RTL (Register Transfer Level). RTL design involves describing the behavior of a design as the transfers that occur between registers every clock cycle. • Verilog is loosely typed language (i.e., data types can be used in a mix and match way) but case sensitive language. It serves better for low level and simple designs. • Verilog can be used to describe designs at four levels of abstraction: (i) Algorithmic level (much like c code with if, case and loop statements). (ii) Register transfer level (RTL uses registers connected by Boolean equations). (iii) Gate level (interconnected AND, NOR etc.). (iv) Switch level (the switches are MOS transistors inside gates).
  • 10. Verilog • Data Types: This is a classification objects/items/data that defines the possible set of values which the objects/items/data belonging to that type may assume. 1) Value set for data types 2) Integer: integer number from -2,147,483,647 to + 2,147,483,647 (i.e. size is 32 bits) Example integer a; assign a=63; 3) wire: It represents a physical wire in a circuit, so it can be read but can’t be assigned. Example wire c; 4) reg: Register data type is used to create a variable, representing register/registers. Example reg a; // single 1-bit register variable reg [7:0] b, c; // two 8-bit register variables 5) Input, Output: input a; // a is an input variable output b, c; // b and c are output variables
  • 11. Verilog • Naming Conventions: Designed to make your code easier to read, understand, and debug. By following these rules, it also makes it easier for others to understand your code. • Input naming convention: input i_Clock; • Output naming convention: output o_Data; • Register naming convention: Reg r_Data;
  • 12. Verilog • Operators: 1) Arithmetic operators: +, -, *, /, etc. 4) Logical operators: 2) Shift operators: 3) Relational operators: << Shift left >> Shift right == Test for equality != Test for inequality <= Test for less than or equal >= Test for greater than or equal < Test for less than > Test for greater than && Logical and || Logical or ! Logical not