SlideShare a Scribd company logo
1 of 3
VHDL CONSTRUCTS
Dr.R.P.Rao
Sequential Statements:
if-then-else
general format: example:
if (condition) then if (S = “00”) then
do stuff Z <= A;
elsif (condition) then elsif (S = “11”) then
do more stuff Z <= B;
else else
do other stuff Z <= C;
end if; end if;
elsif and else clauses are optional
BUT incompletely specified if-then-else (no else) implies memory element
case-when
general format: example:
case expression is case S is
when value => when “00” =>
do stuff Z <= A;
when value => when “11” =>
do more stuff Z <= B;
when others => when others =>
do other stuff Z <= C;
end case; end case;
for-loop
general format: example:
[label:] for identifier in rangeloop init: for k in N-1 downto 0 loop
do a bunch of junk Q(k) <= ‘0’;
end loop [label]; end loop init;
note: variable k implied in for-loop and does not need to be declared
while-loop
general format: example:
[label:] while condition loop init: while (k > 0) loop
do silly stuff Q(k) <= ‘0’
end loop [label]; k := k – 1;
end loop init;
note: variable k must be declared as variable in process (between
sensitivity list and begin with format:
variable k: integer := N-1;
VHDL CONSTRUCTS
Dr.R.P.Rao
Concurrent Statements:
logical operators with signal assignment <= example: Z <= A and B;
when-else
general format: example:
expression when condition else Z <= A when S = “00” else
expression when condition else B when S = “11” else
expression when others; C;
note: “when others” maybe redundantand incompatiblewith some tools
with-select-when
general format: example:
with selection select with S select
expression when condition, Z <= A when “00” ,
expression when condition, B when “11” ,
expression when others; C when others;
Signalassignments in a process:
All expressions based on current value of signals
(right-hand side of <=, values at start of process execution)
Assigned signals updated at end of process execution
Example:
process (CK) begin
D <= Q xor CIN;
if (CK’event and CK = ‘1’) then
Q <= D;
end if;
COUT <= Q xor CIN;
end process;
Case 1: sensitivity list consists only of CK (no other implied signals)
on rising clock edge, Q gets value of D based on Q and CIN from previous
execution of process
if CIN is available prior to falling edge of CK then count works as expected
otherwise, it does not
also COUT is updated on falling edge of CK and not when Q changes
Case 2: sensitivity list consists of CK, CIN and Q (or CIN and Q implied)
D and COUT updated anytime Q or CIN changes
on rising clock edge, Q gets updated value of D & count works as expected
VHDL CONSTRUCTS
Dr.R.P.Rao
Signalassignments in a concurrent statement:
Like a process with implied sensitivity list (right-hand side of <=)
 multiple concurrent statements work like multiple 1-line processes
updates assigned signal whenever right-hand has event
Example: D <= Q xor CIN;
COUT <= Q xor CIN;
process (CK) begin
if (CK’event and CK = ‘1’) then
Q <= D;
end if;
end process;
D and COUT updated anytime Q or CIN changes
on rising clock edge, Q gets updated value of D & count works as expected
same as if we put the 2 concurrent statements in process with Q & CIN in
sensitivity list
Initialization:
All processes(and concurrent statements) evaluated once
then again and again until there are no events in sensitivity list
If explicit initialization is not defined (using := assignment operator)
then a bit is assigned ‘0’ and a std_logic is assigned ‘U’
When no events happen for a given process sensitivity list then that
process is suspended
Simulation cycle:
1. Time is advanced until next entry in time queue where signals are to be
updated (for example, PIs) which cause events on these signals
2. A simulation cycle starts at that point in time and processes & concurrent
statements “sensitive” to events (during the current simulation time) on
those signals will be executed
3. Simulation times for subsequent simulation cycles are determined and
scheduled based on internal signals being updated from processes or
concurrent statements
Note: we will talk about specifying delays later, right now we consider only
delta () delays = infinitesimal delays
4. If there are any  delay time queues go to Step 2, else go to Step 1
Examples:
Z <= X after 5ns; -- specified delay scheduled as entry in time queue
Z <= X; --  delay scheduled as entry in  delay time queue

More Related Content

What's hot

State table and characteristic equation for sequential circuit
State table and characteristic equation for sequential circuitState table and characteristic equation for sequential circuit
State table and characteristic equation for sequential circuitPreet_patel
 
Sequence detector Verilog Code
Sequence detector Verilog CodeSequence detector Verilog Code
Sequence detector Verilog CodeBharti Airtel Ltd.
 
Sistemas de control a tiempo discreto por Guillermo Guzmán
Sistemas de control a tiempo discreto por Guillermo GuzmánSistemas de control a tiempo discreto por Guillermo Guzmán
Sistemas de control a tiempo discreto por Guillermo GuzmánGuillermoGuzmn16
 
Lec11 semaphores
Lec11 semaphoresLec11 semaphores
Lec11 semaphoresanandammca
 
Ch7 OS
Ch7 OSCh7 OS
Ch7 OSC.U
 
Parametrized Model Checking of Fault Tolerant Distributed Algorithms by Abstr...
Parametrized Model Checking of Fault Tolerant Distributed Algorithms by Abstr...Parametrized Model Checking of Fault Tolerant Distributed Algorithms by Abstr...
Parametrized Model Checking of Fault Tolerant Distributed Algorithms by Abstr...Iosif Itkin
 
Transfer fn mech. systm 1
Transfer fn mech. systm 1Transfer fn mech. systm 1
Transfer fn mech. systm 1Syed Saeed
 

What's hot (11)

State table and characteristic equation for sequential circuit
State table and characteristic equation for sequential circuitState table and characteristic equation for sequential circuit
State table and characteristic equation for sequential circuit
 
Sequence detector Verilog Code
Sequence detector Verilog CodeSequence detector Verilog Code
Sequence detector Verilog Code
 
Chinco parra
Chinco parraChinco parra
Chinco parra
 
Sistemas de control a tiempo discreto por Guillermo Guzmán
Sistemas de control a tiempo discreto por Guillermo GuzmánSistemas de control a tiempo discreto por Guillermo Guzmán
Sistemas de control a tiempo discreto por Guillermo Guzmán
 
Lec11 semaphores
Lec11 semaphoresLec11 semaphores
Lec11 semaphores
 
Cs problem [repaired]
Cs problem [repaired]Cs problem [repaired]
Cs problem [repaired]
 
Parameter passing
Parameter passingParameter passing
Parameter passing
 
Ch7 OS
Ch7 OSCh7 OS
Ch7 OS
 
Parametrized Model Checking of Fault Tolerant Distributed Algorithms by Abstr...
Parametrized Model Checking of Fault Tolerant Distributed Algorithms by Abstr...Parametrized Model Checking of Fault Tolerant Distributed Algorithms by Abstr...
Parametrized Model Checking of Fault Tolerant Distributed Algorithms by Abstr...
 
6 Synchronisation
6 Synchronisation6 Synchronisation
6 Synchronisation
 
Transfer fn mech. systm 1
Transfer fn mech. systm 1Transfer fn mech. systm 1
Transfer fn mech. systm 1
 

Similar to Hd5

15CS32 ADE Module 4
15CS32 ADE Module 415CS32 ADE Module 4
15CS32 ADE Module 4RLJIT
 
solution of question no.6inputPresent stateNext stateoutput.pdf
solution of question no.6inputPresent stateNext stateoutput.pdfsolution of question no.6inputPresent stateNext stateoutput.pdf
solution of question no.6inputPresent stateNext stateoutput.pdfaptind
 
solution of question no.6inputPresent stateNext stateoutput.pdf
solution of question no.6inputPresent stateNext stateoutput.pdfsolution of question no.6inputPresent stateNext stateoutput.pdf
solution of question no.6inputPresent stateNext stateoutput.pdfaptind
 
Digital to analog -Sqaure waveform generator in VHDL
Digital to analog -Sqaure waveform generator in VHDLDigital to analog -Sqaure waveform generator in VHDL
Digital to analog -Sqaure waveform generator in VHDLOmkar Rane
 
FiniteAutomata (1).ppt
FiniteAutomata (1).pptFiniteAutomata (1).ppt
FiniteAutomata (1).pptssuser47f7f2
 
FiniteAutomata.ppt
FiniteAutomata.pptFiniteAutomata.ppt
FiniteAutomata.pptRohitPaul71
 
FlipFlopsLatches1.ppt
FlipFlopsLatches1.pptFlipFlopsLatches1.ppt
FlipFlopsLatches1.pptdiganta das
 
FlipFlopsLatches1 (3).ppt
FlipFlopsLatches1 (3).pptFlipFlopsLatches1 (3).ppt
FlipFlopsLatches1 (3).pptSalmanHameed26
 
FlipFlopsLatches1.ppt
FlipFlopsLatches1.pptFlipFlopsLatches1.ppt
FlipFlopsLatches1.pptdiganta das
 
FlipFlopsLatches off different inputs a and b
FlipFlopsLatches off different inputs a and bFlipFlopsLatches off different inputs a and b
FlipFlopsLatches off different inputs a and bMeenakshi Munjal
 
Writing more complex models
Writing more complex modelsWriting more complex models
Writing more complex modelsMohamed Samy
 

Similar to Hd5 (20)

Behavioral modelling in VHDL
Behavioral modelling in VHDLBehavioral modelling in VHDL
Behavioral modelling in VHDL
 
DHow2 - L6 VHDL
DHow2 - L6 VHDLDHow2 - L6 VHDL
DHow2 - L6 VHDL
 
15CS32 ADE Module 4
15CS32 ADE Module 415CS32 ADE Module 4
15CS32 ADE Module 4
 
Vhdl programs
Vhdl programsVhdl programs
Vhdl programs
 
solution of question no.6inputPresent stateNext stateoutput.pdf
solution of question no.6inputPresent stateNext stateoutput.pdfsolution of question no.6inputPresent stateNext stateoutput.pdf
solution of question no.6inputPresent stateNext stateoutput.pdf
 
solution of question no.6inputPresent stateNext stateoutput.pdf
solution of question no.6inputPresent stateNext stateoutput.pdfsolution of question no.6inputPresent stateNext stateoutput.pdf
solution of question no.6inputPresent stateNext stateoutput.pdf
 
lec7.ppt
lec7.pptlec7.ppt
lec7.ppt
 
Latches and flip flops
Latches and flip flopsLatches and flip flops
Latches and flip flops
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
Hd9
Hd9Hd9
Hd9
 
Digital to analog -Sqaure waveform generator in VHDL
Digital to analog -Sqaure waveform generator in VHDLDigital to analog -Sqaure waveform generator in VHDL
Digital to analog -Sqaure waveform generator in VHDL
 
FiniteAutomata (1).ppt
FiniteAutomata (1).pptFiniteAutomata (1).ppt
FiniteAutomata (1).ppt
 
FiniteAutomata.ppt
FiniteAutomata.pptFiniteAutomata.ppt
FiniteAutomata.ppt
 
FlipFlopsLatches1.ppt
FlipFlopsLatches1.pptFlipFlopsLatches1.ppt
FlipFlopsLatches1.ppt
 
FlipFlopsLatches1 (3).ppt
FlipFlopsLatches1 (3).pptFlipFlopsLatches1 (3).ppt
FlipFlopsLatches1 (3).ppt
 
FlipFlopsLatches1.ppt
FlipFlopsLatches1.pptFlipFlopsLatches1.ppt
FlipFlopsLatches1.ppt
 
FlipFlopsLatches off different inputs a and b
FlipFlopsLatches off different inputs a and bFlipFlopsLatches off different inputs a and b
FlipFlopsLatches off different inputs a and b
 
FlipFlopsLatches1.ppt
FlipFlopsLatches1.pptFlipFlopsLatches1.ppt
FlipFlopsLatches1.ppt
 
vhdll.docx
vhdll.docxvhdll.docx
vhdll.docx
 
Writing more complex models
Writing more complex modelsWriting more complex models
Writing more complex models
 

More from 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
 

Recently uploaded

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
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
(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
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
(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
 
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 for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
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
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 

Recently uploaded (20)

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
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
(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...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.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...
 
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 for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
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
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 

Hd5

  • 1. VHDL CONSTRUCTS Dr.R.P.Rao Sequential Statements: if-then-else general format: example: if (condition) then if (S = “00”) then do stuff Z <= A; elsif (condition) then elsif (S = “11”) then do more stuff Z <= B; else else do other stuff Z <= C; end if; end if; elsif and else clauses are optional BUT incompletely specified if-then-else (no else) implies memory element case-when general format: example: case expression is case S is when value => when “00” => do stuff Z <= A; when value => when “11” => do more stuff Z <= B; when others => when others => do other stuff Z <= C; end case; end case; for-loop general format: example: [label:] for identifier in rangeloop init: for k in N-1 downto 0 loop do a bunch of junk Q(k) <= ‘0’; end loop [label]; end loop init; note: variable k implied in for-loop and does not need to be declared while-loop general format: example: [label:] while condition loop init: while (k > 0) loop do silly stuff Q(k) <= ‘0’ end loop [label]; k := k – 1; end loop init; note: variable k must be declared as variable in process (between sensitivity list and begin with format: variable k: integer := N-1;
  • 2. VHDL CONSTRUCTS Dr.R.P.Rao Concurrent Statements: logical operators with signal assignment <= example: Z <= A and B; when-else general format: example: expression when condition else Z <= A when S = “00” else expression when condition else B when S = “11” else expression when others; C; note: “when others” maybe redundantand incompatiblewith some tools with-select-when general format: example: with selection select with S select expression when condition, Z <= A when “00” , expression when condition, B when “11” , expression when others; C when others; Signalassignments in a process: All expressions based on current value of signals (right-hand side of <=, values at start of process execution) Assigned signals updated at end of process execution Example: process (CK) begin D <= Q xor CIN; if (CK’event and CK = ‘1’) then Q <= D; end if; COUT <= Q xor CIN; end process; Case 1: sensitivity list consists only of CK (no other implied signals) on rising clock edge, Q gets value of D based on Q and CIN from previous execution of process if CIN is available prior to falling edge of CK then count works as expected otherwise, it does not also COUT is updated on falling edge of CK and not when Q changes Case 2: sensitivity list consists of CK, CIN and Q (or CIN and Q implied) D and COUT updated anytime Q or CIN changes on rising clock edge, Q gets updated value of D & count works as expected
  • 3. VHDL CONSTRUCTS Dr.R.P.Rao Signalassignments in a concurrent statement: Like a process with implied sensitivity list (right-hand side of <=)  multiple concurrent statements work like multiple 1-line processes updates assigned signal whenever right-hand has event Example: D <= Q xor CIN; COUT <= Q xor CIN; process (CK) begin if (CK’event and CK = ‘1’) then Q <= D; end if; end process; D and COUT updated anytime Q or CIN changes on rising clock edge, Q gets updated value of D & count works as expected same as if we put the 2 concurrent statements in process with Q & CIN in sensitivity list Initialization: All processes(and concurrent statements) evaluated once then again and again until there are no events in sensitivity list If explicit initialization is not defined (using := assignment operator) then a bit is assigned ‘0’ and a std_logic is assigned ‘U’ When no events happen for a given process sensitivity list then that process is suspended Simulation cycle: 1. Time is advanced until next entry in time queue where signals are to be updated (for example, PIs) which cause events on these signals 2. A simulation cycle starts at that point in time and processes & concurrent statements “sensitive” to events (during the current simulation time) on those signals will be executed 3. Simulation times for subsequent simulation cycles are determined and scheduled based on internal signals being updated from processes or concurrent statements Note: we will talk about specifying delays later, right now we consider only delta () delays = infinitesimal delays 4. If there are any  delay time queues go to Step 2, else go to Step 1 Examples: Z <= X after 5ns; -- specified delay scheduled as entry in time queue Z <= X; --  delay scheduled as entry in  delay time queue