SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Digital Design Using Verilog -For Absolute Beginners
LECTURE4 :DATA FLOW MODELLING
Introduction-Data Flow Modelling
•For simple circuits, the gate-level modeling
approach works fine because the number of gates is
limited and the designer can instantiate and connect
every gate individually.
•Also, the gate-level modeling is very intuitive to a
designer with a basic knowledge of digital logic
design.
•But , in complex designs where the number of gates
is very large it is not the case. (that easy)
•So, for efficient designing, the designers prefer a
higher level of abstraction than gate level .
contd
• An important point here is, as the designer is aware of
how data flows between hard ware components
(Registers) and how data is being processed in the
design, this model is more convenient to the
designers.
• Another reason for importance of Data flow modelling
is the unprecedented growth in the gate density on a
chip which made the Gate level modelling very
complicated.
• Also, presently automated tools are readily available,
to create a gate level circuit from data flow design
description easily.(This process is called Synthesis).
contd..
• This Data Flow model is also known as
Continuous Assignment model.
• This type of modelling or style is more suitable for
combinational logic circuits where clock is not
involved as any control signal .
• As the output of a logic gate is continuously driving
the input of another gate ,it is popularly known as
Continuous assignment model.
• The Assignment statement starts with the keyword
“assign”
17 June 2020 4yayavaram@yahoo.com
Continuous Assignments
• A continuous assignment is the most basic
statement in dataflow modeling, used to drive a
value onto a net.
• This assignment replaces gates in the description of
the circuit and describes the circuit at a higher level
of abstraction.
• The assignment statement starts with the keyword
assign.
• For ex: assign A = B | C ( B OR C).
• Similarly A = B & C
• Here the assignment is continuously active.
17 June 2020 5yayavaram@yahoo.com
Contd
• The assign keyword creates a static binding
between RHS and LHS of the above expressions.
• So, w.r.t simulation, the output is continuously
active. i.e Continuous assignments are always
active.
• The assignment expression is evaluated as soon as
one of the right-hand-side operands changes .
• The operands on the right-hand side can be registers
or nets or function calls. Registers or nets can be
scalars or vectors.
17 June 2020 6yayavaram@yahoo.com
contd
• The left hand side of an assignment must always be
a scalar or vector net or a concatenation of scalar
and vector nets. It cannot be a scalar or vector
register.
• Here net and Reg are a kind of data types.
• In a simple terminology Nets represent connection
between components. Ex: wire B;
• Nets must be continuously driven and are used
model connections between continuous assignments
& instantiations.
17 June 2020 7yayavaram@yahoo.com
contd
• Where as the Reg(Register) retains the last value
assigned to it until another assignment statement
changes their value.
• Its often used to represent storage elements.
• Net and Register data types can be declared as
vectors (multiple bit width).
• For ex: wire [3:0] a;
• wire[31:0]b;
• reg[7:0] c;
• reg[31:0] d;
17 June 2020 8yayavaram@yahoo.com
Ex 1: HALF ADDER
• module Half_ adder(s,c,a,b);
input a , b; // Declare input Ports
output s, c; // Declare out ports
assign s = a ^ b; // assign statement for x-or
assign c= a & b; // assign statement for logical and
endmodule.
17 June 2020 9yayavaram@yahoo.com
Ex 2: Multiplexer
• The block diagram of Mux is shown below.
17 June 2020 10yayavaram@yahoo.com
contd
• The out put of Mux is
here S is the select line and A,B are inputs.
• Here two logical ‘and’ operations, one NOT
operation and one OR operations are involved.
• Using the assign statements the Verilog can be
written .
17 June 2020 11yayavaram@yahoo.com
Verilog code-Mux
module mymux2_1(A,B,S,Y);
output y;
input A,B,S;
assign Y= (A &(~S) | (B &S));
endmodule
In the above code, & denotes logical ‘and’, ~ Denotes
not , | denotes logical or operations.
17 June 2020 12yayavaram@yahoo.com
Verilog code-Mux(Aliter)
The same code can also be written by another simple
method shown below.
module mymux2_1(A,B,S,Y);
output Y;
input A,B,S;
assign Y= S ? B:A;
endmodule
Note: here ? is the conditional Operator. Y = B when
S=1 else Y=A. (This is a ternary operator)
17 June 2020 13yayavaram@yahoo.com
Conditional operator (?)
• ? Is a conditional operator which is a very useful
ternary operator.
• The conditional operator(? :) takes three operands.
• Usage is ”condition-expr ? true-expr : false-expr ;”
• The condition expression (condition-expr ) is first
evaluated.
• If the result is true (logical 1), then the true-expr is
evaluated. If the result is false (logical 0), then the
false-expression is evaluated.
17 June 2020 14yayavaram@yahoo.com
Ex 3: Full Adder
• Full adder has three input bits and two output bits
sum and carry-out as shown in the diagram below.
• In the diagram A, B, Cin are inputs and Sum &
Cout are outputs.
17 June 2020 15yayavaram@yahoo.com
Verilog code-Full Adder
module myFA1(S,Cout,A,B,Cin);
//Port declaration
output S,Cout;
input A,B,Cin;
assign S= (A^B^Cin); //x-or operation
assign Cout = (A&B | B & Cin | Cin & A);
endmodule
17 June 2020 16yayavaram@yahoo.com
Full Adder -16 bit
module myHA_16(S,Cout,A,B,Cin);
output [15:0]S;
output Cout ;
input [15:0]A ; //here A,B ,S are defined as wire
input [15:0] B;
input Cin ;
assign S[15:0] = A[15:0]^B[15:0]^Cin ;
assign Cout = A[15:0]&B[15:0] | B[15:0]&Cin | Cin
& A[15:0];
endmodule17 June 2020 17yayavaram@yahoo.com
2-4 Decoder with Enable
• Decoder is a combinational circuit that has ‘n’ input
lines and maximum of 2n output lines.
• The diagram shows a 2 to 4 Decoder with two
inputs A & B , an enable pin E and four outputs
D3,D2,D1,D0 .
17 June 2020 18yayavaram@yahoo.com
contd
• The working of the decoder can be under stood from
the truth table shown below.
17 June 2020 19yayavaram@yahoo.com
Ex: 2 to 4 Line Decoder
• module decoder2_4 (A,B,E,D);
input A,B,E;
output [3:0]D;
assign D[3] =~(~A & ~B & ~E);
assign D[2] =~(~A & B & ~E);
assign D[1] =~( A & ~B & ~E);
assign D[0] =~( A & B & ~E);
endmodule
17 June 2020 20yayavaram@yahoo.com
Ex: Half Subtractor
• The diagram below shows the Half Subtractor.It has
two inputs .A & B and two outputs Difference (D)
and borrow(B).
• Difference is given by = A ^ B
• Borrow is given by Bo =
17 June 2020 21yayavaram@yahoo.com
Verilog Code
• module half_sub(D,Bo,A,B);
input A;
input B;
output D, Bo;
assign D = A ^ B ;
• assign borrow=(~A)&B;
• endmodule
17 June 2020 22yayavaram@yahoo.com
Full Subtractor
• Similar to Full adder, Full subtractor has three input
bits and two output bits, Difference and Borrow.
• The logic diagram is shown below.
17 June 2020 23yayavaram@yahoo.com
contd
• In the diagram A,B,C are inputs ;and D and Bo are
outputs.
• The Difference of the Full subtractor is given by
• D = A^(B^C)
• Bo =(B&C)|(A&(B^C)’)
17 June 2020 24yayavaram@yahoo.com
Verilog Code
• module full_sub (D,Bo,A,B,C);
input A,B,C;
output D, Bo;
assign X = B^C;
• assign D = A ^ X;
• assign N =~ C;
• assign Y=B & N;
• assign N1 =~ X;
• assign z = A & N1;
• assign Bo = Y | z;
• endmodule
17 June 2020 25yayavaram@yahoo.com
Verilog Code(Another way)
From the Block Diagram the assignment model is
• module full_sub (D,Bo,A,B,C);
input A,B,C;
output D, Bo;
assign D = A ^ (B^C);
assign Bo = B & C| (A&(B^C)’);
• endmodule
17 June 2020 26yayavaram@yahoo.com
THANQ FOR WATCHING
PATIENTLY
17 June 2020 27yayavaram@yahoo.com

Weitere ähnliche Inhalte

Was ist angesagt?

Overview of digital design with Verilog HDL
Overview of digital design with Verilog HDLOverview of digital design with Verilog HDL
Overview of digital design with Verilog HDLanand hd
 
VERILOG HDL :: Blocking & NON- Blocking assignments
VERILOG HDL :: Blocking & NON- Blocking assignments VERILOG HDL :: Blocking & NON- Blocking assignments
VERILOG HDL :: Blocking & NON- Blocking assignments Dr.YNM
 
Verilog overview
Verilog overviewVerilog overview
Verilog overviewposdege
 
Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesE2MATRIX
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDFUR11EC098
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flopShuaib Hotak
 
sequential circuits
sequential circuitssequential circuits
sequential circuitsUnsa Shakir
 
Verilog operators.pptx
Verilog  operators.pptxVerilog  operators.pptx
Verilog operators.pptxVandanaPagar1
 
Concepts of Behavioral modelling in Verilog HDL
Concepts of Behavioral modelling in Verilog HDLConcepts of Behavioral modelling in Verilog HDL
Concepts of Behavioral modelling in Verilog HDLanand hd
 
Latch & Flip-Flop Design.pptx
Latch & Flip-Flop Design.pptxLatch & Flip-Flop Design.pptx
Latch & Flip-Flop Design.pptxGargiKhanna2
 
Verilog Lecture4 2014
Verilog Lecture4 2014Verilog Lecture4 2014
Verilog Lecture4 2014Béo Tú
 
Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation finalAnkur Gupta
 
Vlsi Summer training report pdf
Vlsi Summer training report pdfVlsi Summer training report pdf
Vlsi Summer training report pdfGirjeshVerma2
 
Verilog Test Bench
Verilog Test BenchVerilog Test Bench
Verilog Test BenchDr.YNM
 
Gate level design -For beginners
Gate level design -For beginnersGate level design -For beginners
Gate level design -For beginnersDr.YNM
 
Verilog coding of demux 8 x1
Verilog coding of demux  8 x1Verilog coding of demux  8 x1
Verilog coding of demux 8 x1Rakesh kumar jha
 
Combinational Circuits & Sequential Circuits
Combinational Circuits & Sequential CircuitsCombinational Circuits & Sequential Circuits
Combinational Circuits & Sequential Circuitsgourav kottawar
 

Was ist angesagt? (20)

Overview of digital design with Verilog HDL
Overview of digital design with Verilog HDLOverview of digital design with Verilog HDL
Overview of digital design with Verilog HDL
 
Verilog HDL
Verilog HDLVerilog HDL
Verilog HDL
 
VERILOG HDL :: Blocking & NON- Blocking assignments
VERILOG HDL :: Blocking & NON- Blocking assignments VERILOG HDL :: Blocking & NON- Blocking assignments
VERILOG HDL :: Blocking & NON- Blocking assignments
 
Verilog overview
Verilog overviewVerilog overview
Verilog overview
 
Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with Examples
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDF
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
 
sequential circuits
sequential circuitssequential circuits
sequential circuits
 
Verilog operators.pptx
Verilog  operators.pptxVerilog  operators.pptx
Verilog operators.pptx
 
Concepts of Behavioral modelling in Verilog HDL
Concepts of Behavioral modelling in Verilog HDLConcepts of Behavioral modelling in Verilog HDL
Concepts of Behavioral modelling in Verilog HDL
 
Latch & Flip-Flop Design.pptx
Latch & Flip-Flop Design.pptxLatch & Flip-Flop Design.pptx
Latch & Flip-Flop Design.pptx
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
Introduction to FPGAs
Introduction to FPGAsIntroduction to FPGAs
Introduction to FPGAs
 
Verilog Lecture4 2014
Verilog Lecture4 2014Verilog Lecture4 2014
Verilog Lecture4 2014
 
Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation final
 
Vlsi Summer training report pdf
Vlsi Summer training report pdfVlsi Summer training report pdf
Vlsi Summer training report pdf
 
Verilog Test Bench
Verilog Test BenchVerilog Test Bench
Verilog Test Bench
 
Gate level design -For beginners
Gate level design -For beginnersGate level design -For beginners
Gate level design -For beginners
 
Verilog coding of demux 8 x1
Verilog coding of demux  8 x1Verilog coding of demux  8 x1
Verilog coding of demux 8 x1
 
Combinational Circuits & Sequential Circuits
Combinational Circuits & Sequential CircuitsCombinational Circuits & Sequential Circuits
Combinational Circuits & Sequential Circuits
 

Ähnlich wie Data flow model -Lecture-4

Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logicDeepak John
 
1. Combinational Logic Circutis with examples (1).pdf
1. Combinational Logic Circutis with examples (1).pdf1. Combinational Logic Circutis with examples (1).pdf
1. Combinational Logic Circutis with examples (1).pdfRohitkumarYadav80
 
1. Combinational Logic Circutis with examples (1).pdf
1. Combinational Logic Circutis with examples (1).pdf1. Combinational Logic Circutis with examples (1).pdf
1. Combinational Logic Circutis with examples (1).pdfRohitkumarYadav80
 
18CSC203J_COA_Unit 2 final.pptx
18CSC203J_COA_Unit 2 final.pptx18CSC203J_COA_Unit 2 final.pptx
18CSC203J_COA_Unit 2 final.pptxtakix43466
 
C sharp part 001
C sharp part 001C sharp part 001
C sharp part 001Ralph Weber
 
Lec 05 - Combinational Logic
Lec 05 - Combinational LogicLec 05 - Combinational Logic
Lec 05 - Combinational LogicVajira Thambawita
 
Computer Architechture and microprocesssors
Computer Architechture and microprocesssors Computer Architechture and microprocesssors
Computer Architechture and microprocesssors JaykumarPatil10
 
2-bit comparator
2-bit comparator2-bit comparator
2-bit comparatorIslam Adel
 
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...UmerKhan147799
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLABRavikiran A
 
Chapter 5_combinational logic (EEEg4302).pdf
Chapter 5_combinational logic (EEEg4302).pdfChapter 5_combinational logic (EEEg4302).pdf
Chapter 5_combinational logic (EEEg4302).pdfTamiratDejene1
 
SKEL 4273 CAD with HDL Topic 2
SKEL 4273 CAD with HDL Topic 2SKEL 4273 CAD with HDL Topic 2
SKEL 4273 CAD with HDL Topic 2alhadi81
 

Ähnlich wie Data flow model -Lecture-4 (20)

Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
1. Combinational Logic Circutis with examples (1).pdf
1. Combinational Logic Circutis with examples (1).pdf1. Combinational Logic Circutis with examples (1).pdf
1. Combinational Logic Circutis with examples (1).pdf
 
1. Combinational Logic Circutis with examples (1).pdf
1. Combinational Logic Circutis with examples (1).pdf1. Combinational Logic Circutis with examples (1).pdf
1. Combinational Logic Circutis with examples (1).pdf
 
18CSC203J_COA_Unit 2 final.pptx
18CSC203J_COA_Unit 2 final.pptx18CSC203J_COA_Unit 2 final.pptx
18CSC203J_COA_Unit 2 final.pptx
 
LMmanual.pdf
LMmanual.pdfLMmanual.pdf
LMmanual.pdf
 
C sharp part 001
C sharp part 001C sharp part 001
C sharp part 001
 
Lec 05 - Combinational Logic
Lec 05 - Combinational LogicLec 05 - Combinational Logic
Lec 05 - Combinational Logic
 
Chapter 4: Combinational Logic
Chapter 4: Combinational LogicChapter 4: Combinational Logic
Chapter 4: Combinational Logic
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
 
L7 pointers
L7 pointersL7 pointers
L7 pointers
 
Computer Architechture and microprocesssors
Computer Architechture and microprocesssors Computer Architechture and microprocesssors
Computer Architechture and microprocesssors
 
IJETT-V9P226
IJETT-V9P226IJETT-V9P226
IJETT-V9P226
 
2-bit comparator
2-bit comparator2-bit comparator
2-bit comparator
 
C-PPT.pdf
C-PPT.pdfC-PPT.pdf
C-PPT.pdf
 
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Chapter 5_combinational logic (EEEg4302).pdf
Chapter 5_combinational logic (EEEg4302).pdfChapter 5_combinational logic (EEEg4302).pdf
Chapter 5_combinational logic (EEEg4302).pdf
 
Cpmprt
CpmprtCpmprt
Cpmprt
 
SKEL 4273 CAD with HDL Topic 2
SKEL 4273 CAD with HDL Topic 2SKEL 4273 CAD with HDL Topic 2
SKEL 4273 CAD with HDL Topic 2
 

Mehr von Dr.YNM

Introduction to DSP.ppt
Introduction to DSP.pptIntroduction to DSP.ppt
Introduction to DSP.pptDr.YNM
 
Atmel.ppt
Atmel.pptAtmel.ppt
Atmel.pptDr.YNM
 
PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.pptDr.YNM
 
Crystalstructure-.ppt
Crystalstructure-.pptCrystalstructure-.ppt
Crystalstructure-.pptDr.YNM
 
Basics of OS & RTOS.ppt
Basics of OS & RTOS.pptBasics of OS & RTOS.ppt
Basics of OS & RTOS.pptDr.YNM
 
Introducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptxIntroducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptxDr.YNM
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.pptDr.YNM
 
Introduction to ASICs.pptx
Introduction to ASICs.pptxIntroduction to ASICs.pptx
Introduction to ASICs.pptxDr.YNM
 
VHDL-PRESENTATION.ppt
VHDL-PRESENTATION.pptVHDL-PRESENTATION.ppt
VHDL-PRESENTATION.pptDr.YNM
 
Basics of data communications.pptx
Basics of data communications.pptxBasics of data communications.pptx
Basics of data communications.pptxDr.YNM
 
CPLD & FPGA Architectures and applictionsplications.pptx
CPLD & FPGA Architectures and applictionsplications.pptxCPLD & FPGA Architectures and applictionsplications.pptx
CPLD & FPGA Architectures and applictionsplications.pptxDr.YNM
 
Transient response of RC , RL circuits with step input
Transient response of RC , RL circuits  with step inputTransient response of RC , RL circuits  with step input
Transient response of RC , RL circuits with step inputDr.YNM
 
CISC & RISC ARCHITECTURES
CISC & RISC ARCHITECTURESCISC & RISC ARCHITECTURES
CISC & RISC ARCHITECTURESDr.YNM
 
Lect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTURELect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTUREDr.YNM
 
Lect 3 ARM PROCESSOR ARCHITECTURE
Lect 3  ARM PROCESSOR ARCHITECTURE Lect 3  ARM PROCESSOR ARCHITECTURE
Lect 3 ARM PROCESSOR ARCHITECTURE Dr.YNM
 
Microprocessor Architecture 4
Microprocessor Architecture  4Microprocessor Architecture  4
Microprocessor Architecture 4Dr.YNM
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architectureDr.YNM
 
Microprocessor Architecture-III
Microprocessor Architecture-IIIMicroprocessor Architecture-III
Microprocessor Architecture-IIIDr.YNM
 
LECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORSLECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORSDr.YNM
 
Microprocessor architecture II
Microprocessor architecture   IIMicroprocessor architecture   II
Microprocessor architecture IIDr.YNM
 

Mehr von Dr.YNM (20)

Introduction to DSP.ppt
Introduction to DSP.pptIntroduction to DSP.ppt
Introduction to DSP.ppt
 
Atmel.ppt
Atmel.pptAtmel.ppt
Atmel.ppt
 
PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.ppt
 
Crystalstructure-.ppt
Crystalstructure-.pptCrystalstructure-.ppt
Crystalstructure-.ppt
 
Basics of OS & RTOS.ppt
Basics of OS & RTOS.pptBasics of OS & RTOS.ppt
Basics of OS & RTOS.ppt
 
Introducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptxIntroducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptx
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 
Introduction to ASICs.pptx
Introduction to ASICs.pptxIntroduction to ASICs.pptx
Introduction to ASICs.pptx
 
VHDL-PRESENTATION.ppt
VHDL-PRESENTATION.pptVHDL-PRESENTATION.ppt
VHDL-PRESENTATION.ppt
 
Basics of data communications.pptx
Basics of data communications.pptxBasics of data communications.pptx
Basics of data communications.pptx
 
CPLD & FPGA Architectures and applictionsplications.pptx
CPLD & FPGA Architectures and applictionsplications.pptxCPLD & FPGA Architectures and applictionsplications.pptx
CPLD & FPGA Architectures and applictionsplications.pptx
 
Transient response of RC , RL circuits with step input
Transient response of RC , RL circuits  with step inputTransient response of RC , RL circuits  with step input
Transient response of RC , RL circuits with step input
 
CISC & RISC ARCHITECTURES
CISC & RISC ARCHITECTURESCISC & RISC ARCHITECTURES
CISC & RISC ARCHITECTURES
 
Lect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTURELect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTURE
 
Lect 3 ARM PROCESSOR ARCHITECTURE
Lect 3  ARM PROCESSOR ARCHITECTURE Lect 3  ARM PROCESSOR ARCHITECTURE
Lect 3 ARM PROCESSOR ARCHITECTURE
 
Microprocessor Architecture 4
Microprocessor Architecture  4Microprocessor Architecture  4
Microprocessor Architecture 4
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architecture
 
Microprocessor Architecture-III
Microprocessor Architecture-IIIMicroprocessor Architecture-III
Microprocessor Architecture-III
 
LECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORSLECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORS
 
Microprocessor architecture II
Microprocessor architecture   IIMicroprocessor architecture   II
Microprocessor architecture II
 

Kürzlich hochgeladen

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
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
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
 
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
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
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
 
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
 
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
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
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
 
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
 
(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
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
(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
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 

Kürzlich hochgeladen (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
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
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, ...
 
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)
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
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
 
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
 
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
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
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
 
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
 
(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...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
(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...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 

Data flow model -Lecture-4

  • 1. Digital Design Using Verilog -For Absolute Beginners LECTURE4 :DATA FLOW MODELLING
  • 2. Introduction-Data Flow Modelling •For simple circuits, the gate-level modeling approach works fine because the number of gates is limited and the designer can instantiate and connect every gate individually. •Also, the gate-level modeling is very intuitive to a designer with a basic knowledge of digital logic design. •But , in complex designs where the number of gates is very large it is not the case. (that easy) •So, for efficient designing, the designers prefer a higher level of abstraction than gate level .
  • 3. contd • An important point here is, as the designer is aware of how data flows between hard ware components (Registers) and how data is being processed in the design, this model is more convenient to the designers. • Another reason for importance of Data flow modelling is the unprecedented growth in the gate density on a chip which made the Gate level modelling very complicated. • Also, presently automated tools are readily available, to create a gate level circuit from data flow design description easily.(This process is called Synthesis).
  • 4. contd.. • This Data Flow model is also known as Continuous Assignment model. • This type of modelling or style is more suitable for combinational logic circuits where clock is not involved as any control signal . • As the output of a logic gate is continuously driving the input of another gate ,it is popularly known as Continuous assignment model. • The Assignment statement starts with the keyword “assign” 17 June 2020 4yayavaram@yahoo.com
  • 5. Continuous Assignments • A continuous assignment is the most basic statement in dataflow modeling, used to drive a value onto a net. • This assignment replaces gates in the description of the circuit and describes the circuit at a higher level of abstraction. • The assignment statement starts with the keyword assign. • For ex: assign A = B | C ( B OR C). • Similarly A = B & C • Here the assignment is continuously active. 17 June 2020 5yayavaram@yahoo.com
  • 6. Contd • The assign keyword creates a static binding between RHS and LHS of the above expressions. • So, w.r.t simulation, the output is continuously active. i.e Continuous assignments are always active. • The assignment expression is evaluated as soon as one of the right-hand-side operands changes . • The operands on the right-hand side can be registers or nets or function calls. Registers or nets can be scalars or vectors. 17 June 2020 6yayavaram@yahoo.com
  • 7. contd • The left hand side of an assignment must always be a scalar or vector net or a concatenation of scalar and vector nets. It cannot be a scalar or vector register. • Here net and Reg are a kind of data types. • In a simple terminology Nets represent connection between components. Ex: wire B; • Nets must be continuously driven and are used model connections between continuous assignments & instantiations. 17 June 2020 7yayavaram@yahoo.com
  • 8. contd • Where as the Reg(Register) retains the last value assigned to it until another assignment statement changes their value. • Its often used to represent storage elements. • Net and Register data types can be declared as vectors (multiple bit width). • For ex: wire [3:0] a; • wire[31:0]b; • reg[7:0] c; • reg[31:0] d; 17 June 2020 8yayavaram@yahoo.com
  • 9. Ex 1: HALF ADDER • module Half_ adder(s,c,a,b); input a , b; // Declare input Ports output s, c; // Declare out ports assign s = a ^ b; // assign statement for x-or assign c= a & b; // assign statement for logical and endmodule. 17 June 2020 9yayavaram@yahoo.com
  • 10. Ex 2: Multiplexer • The block diagram of Mux is shown below. 17 June 2020 10yayavaram@yahoo.com
  • 11. contd • The out put of Mux is here S is the select line and A,B are inputs. • Here two logical ‘and’ operations, one NOT operation and one OR operations are involved. • Using the assign statements the Verilog can be written . 17 June 2020 11yayavaram@yahoo.com
  • 12. Verilog code-Mux module mymux2_1(A,B,S,Y); output y; input A,B,S; assign Y= (A &(~S) | (B &S)); endmodule In the above code, & denotes logical ‘and’, ~ Denotes not , | denotes logical or operations. 17 June 2020 12yayavaram@yahoo.com
  • 13. Verilog code-Mux(Aliter) The same code can also be written by another simple method shown below. module mymux2_1(A,B,S,Y); output Y; input A,B,S; assign Y= S ? B:A; endmodule Note: here ? is the conditional Operator. Y = B when S=1 else Y=A. (This is a ternary operator) 17 June 2020 13yayavaram@yahoo.com
  • 14. Conditional operator (?) • ? Is a conditional operator which is a very useful ternary operator. • The conditional operator(? :) takes three operands. • Usage is ”condition-expr ? true-expr : false-expr ;” • The condition expression (condition-expr ) is first evaluated. • If the result is true (logical 1), then the true-expr is evaluated. If the result is false (logical 0), then the false-expression is evaluated. 17 June 2020 14yayavaram@yahoo.com
  • 15. Ex 3: Full Adder • Full adder has three input bits and two output bits sum and carry-out as shown in the diagram below. • In the diagram A, B, Cin are inputs and Sum & Cout are outputs. 17 June 2020 15yayavaram@yahoo.com
  • 16. Verilog code-Full Adder module myFA1(S,Cout,A,B,Cin); //Port declaration output S,Cout; input A,B,Cin; assign S= (A^B^Cin); //x-or operation assign Cout = (A&B | B & Cin | Cin & A); endmodule 17 June 2020 16yayavaram@yahoo.com
  • 17. Full Adder -16 bit module myHA_16(S,Cout,A,B,Cin); output [15:0]S; output Cout ; input [15:0]A ; //here A,B ,S are defined as wire input [15:0] B; input Cin ; assign S[15:0] = A[15:0]^B[15:0]^Cin ; assign Cout = A[15:0]&B[15:0] | B[15:0]&Cin | Cin & A[15:0]; endmodule17 June 2020 17yayavaram@yahoo.com
  • 18. 2-4 Decoder with Enable • Decoder is a combinational circuit that has ‘n’ input lines and maximum of 2n output lines. • The diagram shows a 2 to 4 Decoder with two inputs A & B , an enable pin E and four outputs D3,D2,D1,D0 . 17 June 2020 18yayavaram@yahoo.com
  • 19. contd • The working of the decoder can be under stood from the truth table shown below. 17 June 2020 19yayavaram@yahoo.com
  • 20. Ex: 2 to 4 Line Decoder • module decoder2_4 (A,B,E,D); input A,B,E; output [3:0]D; assign D[3] =~(~A & ~B & ~E); assign D[2] =~(~A & B & ~E); assign D[1] =~( A & ~B & ~E); assign D[0] =~( A & B & ~E); endmodule 17 June 2020 20yayavaram@yahoo.com
  • 21. Ex: Half Subtractor • The diagram below shows the Half Subtractor.It has two inputs .A & B and two outputs Difference (D) and borrow(B). • Difference is given by = A ^ B • Borrow is given by Bo = 17 June 2020 21yayavaram@yahoo.com
  • 22. Verilog Code • module half_sub(D,Bo,A,B); input A; input B; output D, Bo; assign D = A ^ B ; • assign borrow=(~A)&B; • endmodule 17 June 2020 22yayavaram@yahoo.com
  • 23. Full Subtractor • Similar to Full adder, Full subtractor has three input bits and two output bits, Difference and Borrow. • The logic diagram is shown below. 17 June 2020 23yayavaram@yahoo.com
  • 24. contd • In the diagram A,B,C are inputs ;and D and Bo are outputs. • The Difference of the Full subtractor is given by • D = A^(B^C) • Bo =(B&C)|(A&(B^C)’) 17 June 2020 24yayavaram@yahoo.com
  • 25. Verilog Code • module full_sub (D,Bo,A,B,C); input A,B,C; output D, Bo; assign X = B^C; • assign D = A ^ X; • assign N =~ C; • assign Y=B & N; • assign N1 =~ X; • assign z = A & N1; • assign Bo = Y | z; • endmodule 17 June 2020 25yayavaram@yahoo.com
  • 26. Verilog Code(Another way) From the Block Diagram the assignment model is • module full_sub (D,Bo,A,B,C); input A,B,C; output D, Bo; assign D = A ^ (B^C); assign Bo = B & C| (A&(B^C)’); • endmodule 17 June 2020 26yayavaram@yahoo.com
  • 27. THANQ FOR WATCHING PATIENTLY 17 June 2020 27yayavaram@yahoo.com